comet_backup_ruby_sdk 2.4.0 → 2.6.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/CHANGELOG.md +15 -1
- data/Gemfile.lock +1 -1
- data/comet_backup_ruby_sdk.gemspec +1 -1
- data/lib/comet/api_response_error.rb +0 -0
- data/lib/comet/comet_server.rb +43 -25
- data/lib/comet/definitions.rb +39 -4
- data/lib/comet/models/add_bucket_response_message.rb +0 -0
- data/lib/comet/models/admin_account_properties_response.rb +0 -0
- data/lib/comet/models/admin_email_options.rb +0 -0
- data/lib/comet/models/admin_resource_response.rb +0 -0
- data/lib/comet/models/admin_security_options.rb +0 -0
- data/lib/comet/models/admin_u2fregistration.rb +0 -0
- data/lib/comet/models/admin_user_permissions.rb +0 -0
- data/lib/comet/models/admin_web_authn_registration.rb +0 -0
- data/lib/comet/models/allowed_admin_user.rb +0 -0
- data/lib/comet/models/amazon_awsvirtual_storage_role_settings.rb +21 -0
- data/lib/comet/models/authentication_role_options.rb +0 -0
- data/lib/comet/models/available_download.rb +0 -0
- data/lib/comet/models/azure_destination_location.rb +0 -0
- data/lib/comet/models/b2destination_location.rb +0 -0
- data/lib/comet/models/b2storage_extra_info.rb +0 -0
- data/lib/comet/models/b2transaction_totals.rb +0 -0
- data/lib/comet/models/b2virtual_storage_role_settings.rb +0 -0
- data/lib/comet/models/backup_job_advanced_options.rb +0 -0
- data/lib/comet/models/backup_job_detail.rb +0 -0
- data/lib/comet/models/backup_job_progress.rb +0 -0
- data/lib/comet/models/backup_rule_config.rb +0 -0
- data/lib/comet/models/backup_rule_event_triggers.rb +0 -0
- data/lib/comet/models/branding_options.rb +64 -0
- data/lib/comet/models/branding_properties.rb +64 -0
- data/lib/comet/models/browse_disk_drives_response.rb +0 -0
- data/lib/comet/models/browse_edbresponse.rb +0 -0
- data/lib/comet/models/browse_hvresponse.rb +0 -0
- data/lib/comet/models/browse_office_365list_virtual_accounts_response.rb +0 -0
- data/lib/comet/models/browse_office_365objects_response.rb +0 -0
- data/lib/comet/models/browse_sqlserver_response.rb +0 -0
- data/lib/comet/models/browse_vssresponse.rb +0 -0
- data/lib/comet/models/bucket_properties.rb +0 -0
- data/lib/comet/models/bucket_usage_info.rb +0 -0
- data/lib/comet/models/comet_apiresponse_message.rb +0 -0
- data/lib/comet/models/comet_destination_location.rb +0 -0
- data/lib/comet/models/constellation_check_report.rb +0 -0
- data/lib/comet/models/constellation_role_options.rb +0 -0
- data/lib/comet/models/constellation_stats.rb +0 -0
- data/lib/comet/models/constellation_status_apiresponse.rb +0 -0
- data/lib/comet/models/content_measurement.rb +0 -0
- data/lib/comet/models/content_measurement_component.rb +0 -0
- data/lib/comet/models/count_jobs_response.rb +0 -0
- data/lib/comet/models/create_group_policy_response.rb +0 -0
- data/lib/comet/models/custom_remote_bucket_settings.rb +0 -0
- data/lib/comet/models/days_of_week_config.rb +0 -0
- data/lib/comet/models/default_email_report_policy.rb +0 -0
- data/lib/comet/models/default_source_with_osrestriction.rb +0 -0
- data/lib/comet/models/destination_config.rb +15 -0
- data/lib/comet/models/destination_location.rb +15 -0
- data/lib/comet/models/destination_statistics.rb +0 -0
- data/lib/comet/models/device_config.rb +0 -0
- data/lib/comet/models/disk_drive.rb +0 -0
- data/lib/comet/models/dispatcher_admin_sources_response.rb +0 -0
- data/lib/comet/models/dispatcher_stored_objects_response.rb +0 -0
- data/lib/comet/models/dispatcher_vault_snapshots_response.rb +0 -0
- data/lib/comet/models/dispatcher_windisk_snapshot_response.rb +0 -0
- data/lib/comet/models/edbfile_info.rb +0 -0
- data/lib/comet/models/email_options.rb +0 -0
- data/lib/comet/models/email_report_config.rb +10 -0
- data/lib/comet/models/email_report_generated_preview.rb +0 -0
- data/lib/comet/models/email_reporting_option.rb +0 -0
- data/lib/comet/models/external_authentication_source.rb +0 -0
- data/lib/comet/models/external_ldapauthentication_source_server.rb +0 -0
- data/lib/comet/models/external_ldapauthentication_source_settings.rb +0 -0
- data/lib/comet/models/extra_file_exclusion.rb +0 -0
- data/lib/comet/models/ftpdestination_location.rb +0 -0
- data/lib/comet/models/get_group_policy_response.rb +0 -0
- data/lib/comet/models/get_profile_and_hash_response_message.rb +0 -0
- data/lib/comet/models/get_profile_hash_response_message.rb +0 -0
- data/lib/comet/models/global_override_options.rb +0 -0
- data/lib/comet/models/group_policy.rb +0 -0
- data/lib/comet/models/hour_sched_config.rb +0 -0
- data/lib/comet/models/httpconnector_options.rb +0 -0
- data/lib/comet/models/hyper_vmachine_info.rb +0 -0
- data/lib/comet/models/install_creds.rb +0 -0
- data/lib/comet/models/install_token.rb +0 -0
- data/lib/comet/models/install_token_response.rb +0 -0
- data/lib/comet/models/job_entry.rb +0 -0
- data/lib/comet/models/license_options.rb +0 -0
- data/lib/comet/models/live_user_connection.rb +0 -0
- data/lib/comet/models/local_destination_location.rb +0 -0
- data/lib/comet/models/local_storage_directory.rb +0 -0
- data/lib/comet/models/mac_oscode_sign_properties.rb +0 -0
- data/lib/comet/models/mongo_dbconnection.rb +1 -0
- data/lib/comet/models/mssqlconnection.rb +0 -0
- data/lib/comet/models/mssqllogin_args.rb +0 -0
- data/lib/comet/models/my_sqlconnection.rb +0 -0
- data/lib/comet/models/new_bucket_detail.rb +0 -0
- data/lib/comet/models/news_entry.rb +0 -0
- data/lib/comet/models/office_365connection.rb +0 -0
- data/lib/comet/models/office_365credential.rb +0 -0
- data/lib/comet/models/office_365custom_setting.rb +0 -0
- data/lib/comet/models/office_365custom_setting_v2.rb +0 -0
- data/lib/comet/models/office_365mixed_virtual_account.rb +0 -0
- data/lib/comet/models/office_365object_info.rb +0 -0
- data/lib/comet/models/organization.rb +0 -0
- data/lib/comet/models/organization_login_urlresponse.rb +0 -0
- data/lib/comet/models/organization_response.rb +0 -0
- data/lib/comet/models/osinfo.rb +0 -0
- data/lib/comet/models/partition.rb +0 -0
- data/lib/comet/models/private_branding_properties.rb +64 -0
- data/lib/comet/models/protected_item_engine_type_policy.rb +0 -0
- data/lib/comet/models/psaconfig.rb +20 -14
- data/lib/comet/models/public_branding_properties.rb +0 -0
- data/lib/comet/models/ratelimit_options.rb +0 -0
- data/lib/comet/models/ratelimit_rule.rb +0 -0
- data/lib/comet/models/register_office_application_begin_response.rb +0 -0
- data/lib/comet/models/register_office_application_check_response.rb +0 -0
- data/lib/comet/models/remote_server_address.rb +0 -0
- data/lib/comet/models/remote_storage_option.rb +0 -0
- data/lib/comet/models/replica_server.rb +0 -0
- data/lib/comet/models/replicator_state_apiresponse.rb +0 -0
- data/lib/comet/models/request_storage_vault_response_message.rb +0 -0
- data/lib/comet/models/restore_job_advanced_options.rb +0 -0
- data/lib/comet/models/retention_policy.rb +0 -0
- data/lib/comet/models/retention_range.rb +0 -0
- data/lib/comet/models/s3destination_location.rb +15 -0
- data/lib/comet/models/s3generic_virtual_storage_role.rb +21 -0
- data/lib/comet/models/schedule_config.rb +0 -0
- data/lib/comet/models/search_clause.rb +0 -0
- data/lib/comet/models/self_backup_export_options.rb +0 -0
- data/lib/comet/models/self_backup_options.rb +0 -0
- data/lib/comet/models/self_backup_statistics.rb +0 -0
- data/lib/comet/models/self_backup_target.rb +0 -0
- data/lib/comet/models/server_config_options.rb +0 -0
- data/lib/comet/models/server_config_options_branding_fragment.rb +0 -0
- data/lib/comet/models/server_config_options_software_build_role_fragment.rb +0 -0
- data/lib/comet/models/server_meta_branding_properties.rb +0 -0
- data/lib/comet/models/server_meta_version_info.rb +0 -0
- data/lib/comet/models/session_key_regenerated_response.rb +0 -0
- data/lib/comet/models/session_options.rb +0 -0
- data/lib/comet/models/sftpdestination_location.rb +0 -0
- data/lib/comet/models/single_field_source.rb +106 -0
- data/lib/comet/models/size_measurement.rb +0 -0
- data/lib/comet/models/software_build_role_options.rb +0 -0
- data/lib/comet/models/software_update_news_response.rb +0 -0
- data/lib/comet/models/source_basic_info.rb +0 -0
- data/lib/comet/models/source_config.rb +0 -0
- data/lib/comet/models/source_include_pattern.rb +0 -0
- data/lib/comet/models/source_statistics.rb +0 -0
- data/lib/comet/models/spanned_destination_location.rb +0 -0
- data/lib/comet/models/spanned_storage_extra_info.rb +0 -0
- data/lib/comet/models/sshconnection.rb +0 -0
- data/lib/comet/models/stat_result.rb +0 -0
- data/lib/comet/models/storage_free_space_info.rb +0 -0
- data/lib/comet/models/storage_role_options.rb +0 -0
- data/lib/comet/models/storage_vault_provider_policy.rb +0 -0
- data/lib/comet/models/stored_object.rb +0 -0
- data/lib/comet/models/storj_destination_location.rb +0 -0
- data/lib/comet/models/storj_virtual_storage_role_setting.rb +0 -0
- data/lib/comet/models/streamable_event.rb +0 -0
- data/lib/comet/models/swift_destination_location.rb +0 -0
- data/lib/comet/models/test_response.rb +0 -0
- data/lib/comet/models/time_span.rb +82 -0
- data/lib/comet/models/totp_regenerated_response.rb +0 -0
- data/lib/comet/models/u2fregister_request.rb +0 -0
- data/lib/comet/models/u2fregistered_key.rb +0 -0
- data/lib/comet/models/u2fregistration_challenge_response.rb +0 -0
- data/lib/comet/models/u2fsign_request.rb +0 -0
- data/lib/comet/models/u2fsign_response.rb +0 -0
- data/lib/comet/models/uninstall_config.rb +0 -0
- data/lib/comet/models/update_campaign_device_status.rb +0 -0
- data/lib/comet/models/update_campaign_options.rb +0 -0
- data/lib/comet/models/update_campaign_properties.rb +0 -0
- data/lib/comet/models/update_campaign_status.rb +0 -0
- data/lib/comet/models/update_campaign_status_device_entry.rb +0 -0
- data/lib/comet/models/user_custom_email_settings.rb +0 -0
- data/lib/comet/models/user_on_server.rb +0 -0
- data/lib/comet/models/user_policy.rb +0 -0
- data/lib/comet/models/user_profile_config.rb +11 -0
- data/lib/comet/models/user_profile_fragment.rb +0 -0
- data/lib/comet/models/user_server_config.rb +0 -0
- data/lib/comet/models/vault_snapshot.rb +0 -0
- data/lib/comet/models/vmdksnapshot_view_options.rb +9 -0
- data/lib/comet/models/vsscomponent.rb +0 -0
- data/lib/comet/models/vsswriter_info.rb +0 -0
- data/lib/comet/models/wasabi_virtual_storage_role_settings.rb +21 -0
- data/lib/comet/models/web_authn_authenticator_selection.rb +0 -0
- data/lib/comet/models/web_authn_credential.rb +0 -0
- data/lib/comet/models/web_authn_credential_assertion.rb +0 -0
- data/lib/comet/models/web_authn_credential_descriptor.rb +0 -0
- data/lib/comet/models/web_authn_credential_entity.rb +0 -0
- data/lib/comet/models/web_authn_credential_parameter.rb +0 -0
- data/lib/comet/models/web_authn_public_key_credential_creation_options.rb +0 -0
- data/lib/comet/models/web_authn_public_key_credential_request_options.rb +0 -0
- data/lib/comet/models/web_authn_registration_challenge_response.rb +0 -0
- data/lib/comet/models/web_authn_relying_party_entity.rb +0 -0
- data/lib/comet/models/web_authn_sign_request.rb +0 -0
- data/lib/comet/models/web_authn_sign_response.rb +0 -0
- data/lib/comet/models/web_authn_user_entity.rb +0 -0
- data/lib/comet/models/web_interface_branding_properties.rb +0 -0
- data/lib/comet/models/webhook_option.rb +0 -0
- data/lib/comet/models/win_smbauth.rb +0 -0
- data/lib/comet/models/windows_code_sign_properties.rb +64 -0
- data/lib/comet_backup_ruby_sdk.rb +2 -0
- metadata +4 -2
|
@@ -12,17 +12,20 @@ module Comet
|
|
|
12
12
|
# PSAConfig is a typed class wrapper around the underlying Comet Server API data structure.
|
|
13
13
|
class PSAConfig
|
|
14
14
|
|
|
15
|
-
# @type [
|
|
16
|
-
attr_accessor :
|
|
15
|
+
# @type [Boolean] alerts_disabled
|
|
16
|
+
attr_accessor :alerts_disabled
|
|
17
17
|
|
|
18
18
|
# @type [Hash{String => String}] custom_headers
|
|
19
19
|
attr_accessor :custom_headers
|
|
20
20
|
|
|
21
|
+
# @type [String] partner_key
|
|
22
|
+
attr_accessor :partner_key
|
|
23
|
+
|
|
21
24
|
# @type [Number] type
|
|
22
25
|
attr_accessor :type
|
|
23
26
|
|
|
24
|
-
# @type [String]
|
|
25
|
-
attr_accessor :
|
|
27
|
+
# @type [String] url
|
|
28
|
+
attr_accessor :url
|
|
26
29
|
|
|
27
30
|
# @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
|
|
28
31
|
attr_accessor :unknown_json_fields
|
|
@@ -32,10 +35,10 @@ module Comet
|
|
|
32
35
|
end
|
|
33
36
|
|
|
34
37
|
def clear
|
|
35
|
-
@url = ''
|
|
36
38
|
@custom_headers = {}
|
|
37
|
-
@type = 0
|
|
38
39
|
@partner_key = ''
|
|
40
|
+
@type = 0
|
|
41
|
+
@url = ''
|
|
39
42
|
@unknown_json_fields = {}
|
|
40
43
|
end
|
|
41
44
|
|
|
@@ -52,10 +55,8 @@ module Comet
|
|
|
52
55
|
|
|
53
56
|
obj.each do |k, v|
|
|
54
57
|
case k
|
|
55
|
-
when '
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
@url = v
|
|
58
|
+
when 'AlertsDisabled'
|
|
59
|
+
@alerts_disabled = v
|
|
59
60
|
when 'CustomHeaders'
|
|
60
61
|
@custom_headers = {}
|
|
61
62
|
if v.nil?
|
|
@@ -67,14 +68,18 @@ module Comet
|
|
|
67
68
|
@custom_headers[k1] = v1
|
|
68
69
|
end
|
|
69
70
|
end
|
|
71
|
+
when 'PartnerKey'
|
|
72
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
73
|
+
|
|
74
|
+
@partner_key = v
|
|
70
75
|
when 'Type'
|
|
71
76
|
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
72
77
|
|
|
73
78
|
@type = v
|
|
74
|
-
when '
|
|
79
|
+
when 'URL'
|
|
75
80
|
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
76
81
|
|
|
77
|
-
@
|
|
82
|
+
@url = v
|
|
78
83
|
else
|
|
79
84
|
@unknown_json_fields[k] = v
|
|
80
85
|
end
|
|
@@ -84,14 +89,15 @@ module Comet
|
|
|
84
89
|
# @return [Hash] The complete object as a Ruby hash
|
|
85
90
|
def to_hash
|
|
86
91
|
ret = {}
|
|
87
|
-
ret['
|
|
92
|
+
ret['AlertsDisabled'] = @alerts_disabled
|
|
88
93
|
unless @custom_headers.nil?
|
|
89
94
|
ret['CustomHeaders'] = @custom_headers
|
|
90
95
|
end
|
|
91
|
-
ret['Type'] = @type
|
|
92
96
|
unless @partner_key.nil?
|
|
93
97
|
ret['PartnerKey'] = @partner_key
|
|
94
98
|
end
|
|
99
|
+
ret['Type'] = @type
|
|
100
|
+
ret['URL'] = @url
|
|
95
101
|
@unknown_json_fields.each do |k, v|
|
|
96
102
|
ret[k] = v
|
|
97
103
|
end
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -36,6 +36,12 @@ module Comet
|
|
|
36
36
|
# @type [Boolean] s3uses_v2signing
|
|
37
37
|
attr_accessor :s3uses_v2signing
|
|
38
38
|
|
|
39
|
+
# @type [Boolean] s3remove_deleted
|
|
40
|
+
attr_accessor :s3remove_deleted
|
|
41
|
+
|
|
42
|
+
# @type [Number] s3object_lock_days
|
|
43
|
+
attr_accessor :s3object_lock_days
|
|
44
|
+
|
|
39
45
|
# @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
|
|
40
46
|
attr_accessor :unknown_json_fields
|
|
41
47
|
|
|
@@ -50,6 +56,7 @@ module Comet
|
|
|
50
56
|
@s3bucket_name = ''
|
|
51
57
|
@s3subdir = ''
|
|
52
58
|
@s3custom_region = ''
|
|
59
|
+
@s3object_lock_days = 0
|
|
53
60
|
@unknown_json_fields = {}
|
|
54
61
|
end
|
|
55
62
|
|
|
@@ -94,6 +101,12 @@ module Comet
|
|
|
94
101
|
@s3custom_region = v
|
|
95
102
|
when 'S3UsesV2Signing'
|
|
96
103
|
@s3uses_v2signing = v
|
|
104
|
+
when 'S3RemoveDeleted'
|
|
105
|
+
@s3remove_deleted = v
|
|
106
|
+
when 'S3ObjectLockDays'
|
|
107
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
108
|
+
|
|
109
|
+
@s3object_lock_days = v
|
|
97
110
|
else
|
|
98
111
|
@unknown_json_fields[k] = v
|
|
99
112
|
end
|
|
@@ -111,6 +124,8 @@ module Comet
|
|
|
111
124
|
ret['S3Subdir'] = @s3subdir
|
|
112
125
|
ret['S3CustomRegion'] = @s3custom_region
|
|
113
126
|
ret['S3UsesV2Signing'] = @s3uses_v2signing
|
|
127
|
+
ret['S3RemoveDeleted'] = @s3remove_deleted
|
|
128
|
+
ret['S3ObjectLockDays'] = @s3object_lock_days
|
|
114
129
|
@unknown_json_fields.each do |k, v|
|
|
115
130
|
ret[k] = v
|
|
116
131
|
end
|
|
@@ -27,6 +27,15 @@ module Comet
|
|
|
27
27
|
# @type [String] secret_key
|
|
28
28
|
attr_accessor :secret_key
|
|
29
29
|
|
|
30
|
+
# @type [Boolean] use_object_lock
|
|
31
|
+
attr_accessor :use_object_lock
|
|
32
|
+
|
|
33
|
+
# @type [Number] object_lock_days
|
|
34
|
+
attr_accessor :object_lock_days
|
|
35
|
+
|
|
36
|
+
# @type [Boolean] remove_deleted
|
|
37
|
+
attr_accessor :remove_deleted
|
|
38
|
+
|
|
30
39
|
# @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
|
|
31
40
|
attr_accessor :unknown_json_fields
|
|
32
41
|
|
|
@@ -40,6 +49,7 @@ module Comet
|
|
|
40
49
|
@master_bucket = ''
|
|
41
50
|
@access_key = ''
|
|
42
51
|
@secret_key = ''
|
|
52
|
+
@object_lock_days = 0
|
|
43
53
|
@unknown_json_fields = {}
|
|
44
54
|
end
|
|
45
55
|
|
|
@@ -76,6 +86,14 @@ module Comet
|
|
|
76
86
|
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
77
87
|
|
|
78
88
|
@secret_key = v
|
|
89
|
+
when 'UseObjectLock'
|
|
90
|
+
@use_object_lock = v
|
|
91
|
+
when 'ObjectLockDays'
|
|
92
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
93
|
+
|
|
94
|
+
@object_lock_days = v
|
|
95
|
+
when 'RemoveDeleted'
|
|
96
|
+
@remove_deleted = v
|
|
79
97
|
else
|
|
80
98
|
@unknown_json_fields[k] = v
|
|
81
99
|
end
|
|
@@ -90,6 +108,9 @@ module Comet
|
|
|
90
108
|
ret['MasterBucket'] = @master_bucket
|
|
91
109
|
ret['AccessKey'] = @access_key
|
|
92
110
|
ret['SecretKey'] = @secret_key
|
|
111
|
+
ret['UseObjectLock'] = @use_object_lock
|
|
112
|
+
ret['ObjectLockDays'] = @object_lock_days
|
|
113
|
+
ret['RemoveDeleted'] = @remove_deleted
|
|
93
114
|
@unknown_json_fields.each do |k, v|
|
|
94
115
|
ret[k] = v
|
|
95
116
|
end
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Copyright (c) 2020-2023 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
|
+
# SingleFieldSource is a typed class wrapper around the underlying Comet Server API data structure.
|
|
13
|
+
class SingleFieldSource
|
|
14
|
+
|
|
15
|
+
# @type [String] field_name
|
|
16
|
+
attr_accessor :field_name
|
|
17
|
+
|
|
18
|
+
# @type [String] field_type
|
|
19
|
+
attr_accessor :field_type
|
|
20
|
+
|
|
21
|
+
# @type [Boolean] bool_val
|
|
22
|
+
attr_accessor :bool_val
|
|
23
|
+
|
|
24
|
+
# @type [Number] int_val
|
|
25
|
+
attr_accessor :int_val
|
|
26
|
+
|
|
27
|
+
# @type [String] str_val
|
|
28
|
+
attr_accessor :str_val
|
|
29
|
+
|
|
30
|
+
# @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
|
|
31
|
+
attr_accessor :unknown_json_fields
|
|
32
|
+
|
|
33
|
+
def initialize
|
|
34
|
+
clear
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
def clear
|
|
38
|
+
@field_name = ''
|
|
39
|
+
@field_type = ''
|
|
40
|
+
@int_val = 0
|
|
41
|
+
@str_val = ''
|
|
42
|
+
@unknown_json_fields = {}
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# @param [String] json_string The complete object in JSON format
|
|
46
|
+
def from_json(json_string)
|
|
47
|
+
raise TypeError, "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
|
|
48
|
+
|
|
49
|
+
from_hash(JSON.parse(json_string))
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# @param [Hash] obj The complete object as a Ruby hash
|
|
53
|
+
def from_hash(obj)
|
|
54
|
+
raise TypeError, "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
|
|
55
|
+
|
|
56
|
+
obj.each do |k, v|
|
|
57
|
+
case k
|
|
58
|
+
when 'FieldName'
|
|
59
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
60
|
+
|
|
61
|
+
@field_name = v
|
|
62
|
+
when 'FieldType'
|
|
63
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
64
|
+
|
|
65
|
+
@field_type = v
|
|
66
|
+
when 'BoolVal'
|
|
67
|
+
@bool_val = v
|
|
68
|
+
when 'IntVal'
|
|
69
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
70
|
+
|
|
71
|
+
@int_val = v
|
|
72
|
+
when 'StrVal'
|
|
73
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
74
|
+
|
|
75
|
+
@str_val = v
|
|
76
|
+
else
|
|
77
|
+
@unknown_json_fields[k] = v
|
|
78
|
+
end
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# @return [Hash] The complete object as a Ruby hash
|
|
83
|
+
def to_hash
|
|
84
|
+
ret = {}
|
|
85
|
+
ret['FieldName'] = @field_name
|
|
86
|
+
ret['FieldType'] = @field_type
|
|
87
|
+
ret['BoolVal'] = @bool_val
|
|
88
|
+
ret['IntVal'] = @int_val
|
|
89
|
+
ret['StrVal'] = @str_val
|
|
90
|
+
@unknown_json_fields.each do |k, v|
|
|
91
|
+
ret[k] = v
|
|
92
|
+
end
|
|
93
|
+
ret
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# @return [Hash] The complete object as a Ruby hash
|
|
97
|
+
def to_h
|
|
98
|
+
to_hash
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# @return [String] The complete object as a JSON string
|
|
102
|
+
def to_json(options = {})
|
|
103
|
+
to_hash.to_json(options)
|
|
104
|
+
end
|
|
105
|
+
end
|
|
106
|
+
end
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Copyright (c) 2020-2023 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
|
+
# TimeSpan is a typed class wrapper around the underlying Comet Server API data structure.
|
|
13
|
+
class TimeSpan
|
|
14
|
+
|
|
15
|
+
# @type [Number] frequency_type
|
|
16
|
+
attr_accessor :frequency_type
|
|
17
|
+
|
|
18
|
+
# @type [Number] seconds
|
|
19
|
+
attr_accessor :seconds
|
|
20
|
+
|
|
21
|
+
# @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
|
|
22
|
+
attr_accessor :unknown_json_fields
|
|
23
|
+
|
|
24
|
+
def initialize
|
|
25
|
+
clear
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
def clear
|
|
29
|
+
@frequency_type = 0
|
|
30
|
+
@seconds = 0
|
|
31
|
+
@unknown_json_fields = {}
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# @param [String] json_string The complete object in JSON format
|
|
35
|
+
def from_json(json_string)
|
|
36
|
+
raise TypeError, "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
|
|
37
|
+
|
|
38
|
+
from_hash(JSON.parse(json_string))
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# @param [Hash] obj The complete object as a Ruby hash
|
|
42
|
+
def from_hash(obj)
|
|
43
|
+
raise TypeError, "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
|
|
44
|
+
|
|
45
|
+
obj.each do |k, v|
|
|
46
|
+
case k
|
|
47
|
+
when 'FrequencyType'
|
|
48
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
49
|
+
|
|
50
|
+
@frequency_type = v
|
|
51
|
+
when 'Seconds'
|
|
52
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
53
|
+
|
|
54
|
+
@seconds = v
|
|
55
|
+
else
|
|
56
|
+
@unknown_json_fields[k] = v
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# @return [Hash] The complete object as a Ruby hash
|
|
62
|
+
def to_hash
|
|
63
|
+
ret = {}
|
|
64
|
+
ret['FrequencyType'] = @frequency_type
|
|
65
|
+
ret['Seconds'] = @seconds
|
|
66
|
+
@unknown_json_fields.each do |k, v|
|
|
67
|
+
ret[k] = v
|
|
68
|
+
end
|
|
69
|
+
ret
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# @return [Hash] The complete object as a Ruby hash
|
|
73
|
+
def to_h
|
|
74
|
+
to_hash
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# @return [String] The complete object as a JSON string
|
|
78
|
+
def to_json(options = {})
|
|
79
|
+
to_hash.to_json(options)
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
end
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -55,6 +55,9 @@ module Comet
|
|
|
55
55
|
# @type [Boolean] is_suspended
|
|
56
56
|
attr_accessor :is_suspended
|
|
57
57
|
|
|
58
|
+
# @type [Number] last_suspended
|
|
59
|
+
attr_accessor :last_suspended
|
|
60
|
+
|
|
58
61
|
# @type [Boolean] all_protected_items_quota_enabled
|
|
59
62
|
attr_accessor :all_protected_items_quota_enabled
|
|
60
63
|
|
|
@@ -130,6 +133,7 @@ module Comet
|
|
|
130
133
|
@sources = {}
|
|
131
134
|
@backup_rules = {}
|
|
132
135
|
@devices = {}
|
|
136
|
+
@last_suspended = 0
|
|
133
137
|
@all_protected_items_quota_bytes = 0
|
|
134
138
|
@maximum_devices = 0
|
|
135
139
|
@quota_office_365protected_accounts = 0
|
|
@@ -244,6 +248,10 @@ module Comet
|
|
|
244
248
|
end
|
|
245
249
|
when 'IsSuspended'
|
|
246
250
|
@is_suspended = v
|
|
251
|
+
when 'LastSuspended'
|
|
252
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
253
|
+
|
|
254
|
+
@last_suspended = v
|
|
247
255
|
when 'AllProtectedItemsQuotaEnabled'
|
|
248
256
|
@all_protected_items_quota_enabled = v
|
|
249
257
|
when 'AllProtectedItemsQuotaBytes'
|
|
@@ -326,6 +334,9 @@ module Comet
|
|
|
326
334
|
ret['BackupRules'] = @backup_rules
|
|
327
335
|
ret['Devices'] = @devices
|
|
328
336
|
ret['IsSuspended'] = @is_suspended
|
|
337
|
+
unless @last_suspended.nil?
|
|
338
|
+
ret['LastSuspended'] = @last_suspended
|
|
339
|
+
end
|
|
329
340
|
ret['AllProtectedItemsQuotaEnabled'] = @all_protected_items_quota_enabled
|
|
330
341
|
ret['AllProtectedItemsQuotaBytes'] = @all_protected_items_quota_bytes
|
|
331
342
|
ret['MaximumDevices'] = @maximum_devices
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -21,6 +21,9 @@ module Comet
|
|
|
21
21
|
# @type [String] list_path
|
|
22
22
|
attr_accessor :list_path
|
|
23
23
|
|
|
24
|
+
# @type [String] partition_name
|
|
25
|
+
attr_accessor :partition_name
|
|
26
|
+
|
|
24
27
|
# @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
|
|
25
28
|
attr_accessor :unknown_json_fields
|
|
26
29
|
|
|
@@ -31,6 +34,7 @@ module Comet
|
|
|
31
34
|
def clear
|
|
32
35
|
@partition_guid = ''
|
|
33
36
|
@list_path = ''
|
|
37
|
+
@partition_name = ''
|
|
34
38
|
@unknown_json_fields = {}
|
|
35
39
|
end
|
|
36
40
|
|
|
@@ -57,6 +61,10 @@ module Comet
|
|
|
57
61
|
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
58
62
|
|
|
59
63
|
@list_path = v
|
|
64
|
+
when 'PartitionName'
|
|
65
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
66
|
+
|
|
67
|
+
@partition_name = v
|
|
60
68
|
else
|
|
61
69
|
@unknown_json_fields[k] = v
|
|
62
70
|
end
|
|
@@ -69,6 +77,7 @@ module Comet
|
|
|
69
77
|
ret['Enabled'] = @enabled
|
|
70
78
|
ret['PartitionGUID'] = @partition_guid
|
|
71
79
|
ret['ListPath'] = @list_path
|
|
80
|
+
ret['PartitionName'] = @partition_name
|
|
72
81
|
@unknown_json_fields.each do |k, v|
|
|
73
82
|
ret[k] = v
|
|
74
83
|
end
|
|
File without changes
|
|
File without changes
|
|
@@ -21,6 +21,15 @@ module Comet
|
|
|
21
21
|
# @type [String] secret_key
|
|
22
22
|
attr_accessor :secret_key
|
|
23
23
|
|
|
24
|
+
# @type [Boolean] use_object_lock
|
|
25
|
+
attr_accessor :use_object_lock
|
|
26
|
+
|
|
27
|
+
# @type [Number] object_lock_days
|
|
28
|
+
attr_accessor :object_lock_days
|
|
29
|
+
|
|
30
|
+
# @type [Boolean] remove_deleted
|
|
31
|
+
attr_accessor :remove_deleted
|
|
32
|
+
|
|
24
33
|
# @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
|
|
25
34
|
attr_accessor :unknown_json_fields
|
|
26
35
|
|
|
@@ -32,6 +41,7 @@ module Comet
|
|
|
32
41
|
@master_bucket = ''
|
|
33
42
|
@access_key = ''
|
|
34
43
|
@secret_key = ''
|
|
44
|
+
@object_lock_days = 0
|
|
35
45
|
@unknown_json_fields = {}
|
|
36
46
|
end
|
|
37
47
|
|
|
@@ -60,6 +70,14 @@ module Comet
|
|
|
60
70
|
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
61
71
|
|
|
62
72
|
@secret_key = v
|
|
73
|
+
when 'UseObjectLock'
|
|
74
|
+
@use_object_lock = v
|
|
75
|
+
when 'ObjectLockDays'
|
|
76
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
77
|
+
|
|
78
|
+
@object_lock_days = v
|
|
79
|
+
when 'RemoveDeleted'
|
|
80
|
+
@remove_deleted = v
|
|
63
81
|
else
|
|
64
82
|
@unknown_json_fields[k] = v
|
|
65
83
|
end
|
|
@@ -72,6 +90,9 @@ module Comet
|
|
|
72
90
|
ret['MasterBucket'] = @master_bucket
|
|
73
91
|
ret['AccessKey'] = @access_key
|
|
74
92
|
ret['SecretKey'] = @secret_key
|
|
93
|
+
ret['UseObjectLock'] = @use_object_lock
|
|
94
|
+
ret['ObjectLockDays'] = @object_lock_days
|
|
95
|
+
ret['RemoveDeleted'] = @remove_deleted
|
|
75
96
|
@unknown_json_fields.each do |k, v|
|
|
76
97
|
ret[k] = v
|
|
77
98
|
end
|
|
File without changes
|
|
File without changes
|