comet_backup_ruby_sdk 1.0.0 → 1.5.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 +37 -0
- data/Gemfile.lock +2 -2
- data/LICENSE +1 -1
- data/comet_backup_ruby_sdk.gemspec +1 -1
- data/lib/comet/api_response_error.rb +1 -1
- data/lib/comet/comet_server.rb +602 -291
- data/lib/comet/definitions.rb +48 -4
- data/lib/comet/models/add_bucket_response_message.rb +7 -7
- data/lib/comet/models/admin_account_properties_response.rb +4 -4
- data/lib/comet/models/admin_email_options.rb +5 -5
- data/lib/comet/models/admin_resource_response.rb +6 -6
- data/lib/comet/models/admin_security_options.rb +8 -8
- data/lib/comet/models/admin_u2fregistration.rb +5 -5
- data/lib/comet/models/admin_user_permissions.rb +3 -3
- data/lib/comet/models/available_download.rb +5 -5
- data/lib/comet/models/azure_destination_location.rb +8 -8
- data/lib/comet/models/b2destination_location.rb +8 -8
- data/lib/comet/models/b2storage_extra_info.rb +3 -3
- data/lib/comet/models/b2transaction_totals.rb +6 -6
- data/lib/comet/models/b2virtual_storage_role_settings.rb +6 -6
- data/lib/comet/models/backup_job_advanced_options.rb +5 -5
- data/lib/comet/models/backup_job_detail.rb +54 -21
- data/lib/comet/models/backup_job_progress.rb +8 -8
- data/lib/comet/models/backup_rule_config.rb +28 -12
- data/lib/comet/models/backup_rule_event_triggers.rb +3 -3
- data/lib/comet/models/branding_options.rb +37 -28
- data/lib/comet/models/branding_properties.rb +33 -24
- data/lib/comet/models/browse_disk_drives_response.rb +5 -5
- data/lib/comet/models/browse_edbresponse.rb +5 -5
- data/lib/comet/models/browse_hvresponse.rb +5 -5
- data/lib/comet/models/browse_office_365objects_response.rb +99 -0
- data/lib/comet/models/browse_sqlserver_response.rb +100 -0
- data/lib/comet/models/browse_vssresponse.rb +5 -5
- data/lib/comet/models/bucket_properties.rb +7 -7
- data/lib/comet/models/bucket_usage_info.rb +4 -4
- data/lib/comet/models/comet_apiresponse_message.rb +5 -5
- data/lib/comet/models/comet_destination_location.rb +6 -6
- data/lib/comet/models/constellation_check_report.rb +5 -5
- data/lib/comet/models/constellation_stats.rb +7 -7
- data/lib/comet/models/constellation_status_apiresponse.rb +5 -5
- data/lib/comet/models/content_measurement.rb +5 -5
- data/lib/comet/models/content_measurement_component.rb +5 -5
- data/lib/comet/models/create_group_policy_response.rb +6 -6
- data/lib/comet/models/custom_remote_bucket_settings.rb +75 -0
- data/lib/comet/models/default_email_report_policy.rb +3 -3
- data/lib/comet/models/destination_config.rb +66 -44
- data/lib/comet/models/destination_location.rb +41 -35
- data/lib/comet/models/destination_statistics.rb +6 -6
- data/lib/comet/models/device_config.rb +4 -4
- data/lib/comet/models/disk_drive.rb +14 -14
- data/lib/comet/models/dispatcher_admin_sources_response.rb +6 -6
- data/lib/comet/models/dispatcher_stored_objects_response.rb +5 -5
- data/lib/comet/models/dispatcher_vault_snapshots_response.rb +5 -5
- data/lib/comet/models/edbfile_info.rb +6 -6
- data/lib/comet/models/email_options.rb +10 -10
- data/lib/comet/models/email_report_config.rb +4 -4
- data/lib/comet/models/email_report_generated_preview.rb +8 -8
- data/lib/comet/models/external_ldapauthentication_source_settings.rb +40 -7
- data/lib/comet/models/extra_file_exclusion.rb +5 -5
- data/lib/comet/models/ftpdestination_location.rb +10 -10
- data/lib/comet/models/get_group_policy_response.rb +6 -6
- data/lib/comet/models/get_profile_and_hash_response_message.rb +6 -6
- data/lib/comet/models/get_profile_hash_response_message.rb +6 -6
- data/lib/comet/models/group_policy.rb +5 -5
- data/lib/comet/models/hyper_vmachine_info.rb +5 -5
- data/lib/comet/models/install_creds.rb +6 -6
- data/lib/comet/models/install_token.rb +8 -8
- data/lib/comet/models/install_token_response.rb +5 -5
- data/lib/comet/models/job_entry.rb +6 -6
- data/lib/comet/models/live_user_connection.rb +9 -9
- data/lib/comet/models/local_destination_location.rb +7 -7
- data/lib/comet/models/mac_oscode_sign_properties.rb +9 -9
- data/lib/comet/models/mongo_dbconnection.rb +16 -16
- data/lib/comet/models/mssqlconnection.rb +120 -0
- data/lib/comet/models/my_sqlconnection.rb +102 -0
- data/lib/comet/models/new_bucket_detail.rb +5 -5
- data/lib/comet/models/news_entry.rb +6 -6
- data/lib/comet/models/office_365connection.rb +123 -0
- data/lib/comet/models/office_365credential.rb +111 -0
- data/lib/comet/models/office_365custom_setting.rb +132 -0
- data/lib/comet/models/office_365object_info.rb +118 -0
- data/lib/comet/models/organization.rb +11 -5
- data/lib/comet/models/organization_response.rb +6 -6
- data/lib/comet/models/osinfo.rb +6 -6
- data/lib/comet/models/partition.rb +14 -14
- data/lib/comet/models/private_branding_properties.rb +27 -18
- data/lib/comet/models/protected_item_engine_type_policy.rb +4 -4
- data/lib/comet/models/public_branding_properties.rb +9 -9
- data/lib/comet/models/register_office_application_begin_response.rb +93 -0
- data/lib/comet/models/register_office_application_check_response.rb +100 -0
- data/lib/comet/models/remote_server_address.rb +18 -8
- data/lib/comet/models/remote_storage_option.rb +19 -9
- data/lib/comet/models/replicator_state_apiresponse.rb +15 -15
- data/lib/comet/models/request_storage_vault_response_message.rb +6 -6
- data/lib/comet/models/restore_job_advanced_options.rb +13 -7
- data/lib/comet/models/retention_policy.rb +4 -4
- data/lib/comet/models/retention_range.rb +11 -11
- data/lib/comet/models/s3destination_location.rb +8 -8
- data/lib/comet/models/schedule_config.rb +6 -6
- data/lib/comet/models/search_clause.rb +7 -7
- data/lib/comet/models/self_backup_statistics.rb +108 -0
- data/lib/comet/models/server_config_options_branding_fragment.rb +3 -3
- data/lib/comet/models/server_config_options_software_build_role_fragment.rb +3 -3
- data/lib/comet/models/server_meta_version_info.rb +33 -18
- data/lib/comet/models/session_key_regenerated_response.rb +7 -7
- data/lib/comet/models/sftpdestination_location.rb +10 -10
- data/lib/comet/models/size_measurement.rb +6 -6
- data/lib/comet/models/software_build_role_options.rb +3 -3
- data/lib/comet/models/software_update_news_response.rb +7 -7
- data/lib/comet/models/source_basic_info.rb +5 -5
- data/lib/comet/models/source_config.rb +27 -11
- data/lib/comet/models/source_statistics.rb +3 -3
- data/lib/comet/models/spanned_destination_location.rb +9 -3
- data/lib/comet/models/spanned_storage_extra_info.rb +3 -3
- data/lib/comet/models/sshconnection.rb +9 -9
- data/lib/comet/models/stat_result.rb +7 -7
- data/lib/comet/models/storage_free_space_info.rb +5 -5
- data/lib/comet/models/storage_vault_provider_policy.rb +4 -4
- data/lib/comet/models/stored_object.rb +96 -11
- data/lib/comet/models/streamable_event.rb +8 -6
- data/lib/comet/models/swift_destination_location.rb +16 -16
- data/lib/comet/models/test_response.rb +5 -5
- data/lib/comet/models/totp_regenerated_response.rb +8 -8
- data/lib/comet/models/u2fregister_request.rb +5 -5
- data/lib/comet/models/u2fregistered_key.rb +6 -6
- data/lib/comet/models/u2fregistration_challenge_response.rb +7 -7
- data/lib/comet/models/u2fsign_request.rb +6 -6
- data/lib/comet/models/u2fsign_response.rb +7 -7
- data/lib/comet/models/uninstall_config.rb +3 -3
- data/lib/comet/models/update_campaign_device_status.rb +4 -4
- data/lib/comet/models/update_campaign_options.rb +3 -3
- data/lib/comet/models/update_campaign_properties.rb +5 -5
- data/lib/comet/models/update_campaign_status.rb +5 -5
- data/lib/comet/models/update_campaign_status_device_entry.rb +6 -6
- data/lib/comet/models/user_custom_email_settings.rb +3 -3
- data/lib/comet/models/user_on_server.rb +5 -5
- data/lib/comet/models/user_policy.rb +7 -7
- data/lib/comet/models/user_profile_config.rb +19 -19
- data/lib/comet/models/user_profile_fragment.rb +4 -4
- data/lib/comet/models/vault_snapshot.rb +12 -6
- data/lib/comet/models/vsscomponent.rb +6 -6
- data/lib/comet/models/vsswriter_info.rb +4 -4
- data/lib/comet/models/wasabi_virtual_storage_role_settings.rb +6 -6
- data/lib/comet/models/web_interface_branding_properties.rb +7 -7
- data/lib/comet/models/webhook_option.rb +5 -5
- data/lib/comet/models/win_smbauth.rb +7 -7
- data/lib/comet/models/windows_code_sign_properties.rb +12 -12
- data/lib/comet_backup_ruby_sdk.rb +13 -1
- metadata +14 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env ruby --enable-frozen-string-literal
|
|
2
2
|
#
|
|
3
|
-
# Copyright (c) 2020-
|
|
3
|
+
# Copyright (c) 2020-2021 Comet Licensing Ltd.
|
|
4
4
|
# Please see the LICENSE file for usage information.
|
|
5
5
|
#
|
|
6
6
|
# SPDX-License-Identifier: MIT
|
|
@@ -38,6 +38,9 @@ module Comet
|
|
|
38
38
|
# @type [Comet::WasabiVirtualStorageRoleSettings] wasabi
|
|
39
39
|
attr_accessor :wasabi
|
|
40
40
|
|
|
41
|
+
# @type [Comet::CustomRemoteBucketSettings] custom
|
|
42
|
+
attr_accessor :custom
|
|
43
|
+
|
|
41
44
|
# @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
|
|
42
45
|
attr_accessor :unknown_json_fields
|
|
43
46
|
|
|
@@ -54,40 +57,41 @@ module Comet
|
|
|
54
57
|
@ldap = Comet::ExternalLDAPAuthenticationSourceSettings.new
|
|
55
58
|
@b2 = Comet::B2VirtualStorageRoleSettings.new
|
|
56
59
|
@wasabi = Comet::WasabiVirtualStorageRoleSettings.new
|
|
60
|
+
@custom = Comet::CustomRemoteBucketSettings.new
|
|
57
61
|
@unknown_json_fields = {}
|
|
58
62
|
end
|
|
59
63
|
|
|
60
64
|
# @param [String] json_string The complete object in JSON format
|
|
61
65
|
def from_json(json_string)
|
|
62
|
-
raise TypeError "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
|
|
66
|
+
raise TypeError, "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
|
|
63
67
|
|
|
64
68
|
from_hash(JSON.parse(json_string))
|
|
65
69
|
end
|
|
66
70
|
|
|
67
71
|
# @param [Hash] obj The complete object as a Ruby hash
|
|
68
72
|
def from_hash(obj)
|
|
69
|
-
raise TypeError "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
|
|
73
|
+
raise TypeError, "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
|
|
70
74
|
|
|
71
75
|
obj.each do |k, v|
|
|
72
76
|
case k
|
|
73
77
|
when 'Type'
|
|
74
|
-
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
78
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
75
79
|
|
|
76
80
|
@type = v
|
|
77
81
|
when 'Description'
|
|
78
|
-
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
82
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
79
83
|
|
|
80
84
|
@description = v
|
|
81
85
|
when 'RemoteAddress'
|
|
82
|
-
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
86
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
83
87
|
|
|
84
88
|
@remote_address = v
|
|
85
89
|
when 'Username'
|
|
86
|
-
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
90
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
87
91
|
|
|
88
92
|
@username = v
|
|
89
93
|
when 'Password'
|
|
90
|
-
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
94
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
91
95
|
|
|
92
96
|
@password = v
|
|
93
97
|
when 'LDAP'
|
|
@@ -99,6 +103,9 @@ module Comet
|
|
|
99
103
|
when 'Wasabi'
|
|
100
104
|
@wasabi = Comet::WasabiVirtualStorageRoleSettings.new
|
|
101
105
|
@wasabi.from_hash(v)
|
|
106
|
+
when 'Custom'
|
|
107
|
+
@custom = Comet::CustomRemoteBucketSettings.new
|
|
108
|
+
@custom.from_hash(v)
|
|
102
109
|
else
|
|
103
110
|
@unknown_json_fields[k] = v
|
|
104
111
|
end
|
|
@@ -128,6 +135,9 @@ module Comet
|
|
|
128
135
|
unless @wasabi.nil?
|
|
129
136
|
ret['Wasabi'] = @wasabi
|
|
130
137
|
end
|
|
138
|
+
unless @custom.nil?
|
|
139
|
+
ret['Custom'] = @custom
|
|
140
|
+
end
|
|
131
141
|
@unknown_json_fields.each do |k, v|
|
|
132
142
|
ret[k] = v
|
|
133
143
|
end
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env ruby --enable-frozen-string-literal
|
|
2
2
|
#
|
|
3
|
-
# Copyright (c) 2020-
|
|
3
|
+
# Copyright (c) 2020-2021 Comet Licensing Ltd.
|
|
4
4
|
# Please see the LICENSE file for usage information.
|
|
5
5
|
#
|
|
6
6
|
# SPDX-License-Identifier: MIT
|
|
@@ -38,6 +38,9 @@ module Comet
|
|
|
38
38
|
# @type [Comet::WasabiVirtualStorageRoleSettings] wasabi
|
|
39
39
|
attr_accessor :wasabi
|
|
40
40
|
|
|
41
|
+
# @type [Comet::CustomRemoteBucketSettings] custom
|
|
42
|
+
attr_accessor :custom
|
|
43
|
+
|
|
41
44
|
# @type [Boolean] storage_limit_enabled
|
|
42
45
|
attr_accessor :storage_limit_enabled
|
|
43
46
|
|
|
@@ -63,41 +66,42 @@ module Comet
|
|
|
63
66
|
@ldap = Comet::ExternalLDAPAuthenticationSourceSettings.new
|
|
64
67
|
@b2 = Comet::B2VirtualStorageRoleSettings.new
|
|
65
68
|
@wasabi = Comet::WasabiVirtualStorageRoleSettings.new
|
|
69
|
+
@custom = Comet::CustomRemoteBucketSettings.new
|
|
66
70
|
@storage_limit_bytes = 0
|
|
67
71
|
@unknown_json_fields = {}
|
|
68
72
|
end
|
|
69
73
|
|
|
70
74
|
# @param [String] json_string The complete object in JSON format
|
|
71
75
|
def from_json(json_string)
|
|
72
|
-
raise TypeError "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
|
|
76
|
+
raise TypeError, "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
|
|
73
77
|
|
|
74
78
|
from_hash(JSON.parse(json_string))
|
|
75
79
|
end
|
|
76
80
|
|
|
77
81
|
# @param [Hash] obj The complete object as a Ruby hash
|
|
78
82
|
def from_hash(obj)
|
|
79
|
-
raise TypeError "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
|
|
83
|
+
raise TypeError, "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
|
|
80
84
|
|
|
81
85
|
obj.each do |k, v|
|
|
82
86
|
case k
|
|
83
87
|
when 'Type'
|
|
84
|
-
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
88
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
85
89
|
|
|
86
90
|
@type = v
|
|
87
91
|
when 'Description'
|
|
88
|
-
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
92
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
89
93
|
|
|
90
94
|
@description = v
|
|
91
95
|
when 'RemoteAddress'
|
|
92
|
-
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
96
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
93
97
|
|
|
94
98
|
@remote_address = v
|
|
95
99
|
when 'Username'
|
|
96
|
-
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
100
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
97
101
|
|
|
98
102
|
@username = v
|
|
99
103
|
when 'Password'
|
|
100
|
-
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
104
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
101
105
|
|
|
102
106
|
@password = v
|
|
103
107
|
when 'LDAP'
|
|
@@ -109,10 +113,13 @@ module Comet
|
|
|
109
113
|
when 'Wasabi'
|
|
110
114
|
@wasabi = Comet::WasabiVirtualStorageRoleSettings.new
|
|
111
115
|
@wasabi.from_hash(v)
|
|
116
|
+
when 'Custom'
|
|
117
|
+
@custom = Comet::CustomRemoteBucketSettings.new
|
|
118
|
+
@custom.from_hash(v)
|
|
112
119
|
when 'StorageLimitEnabled'
|
|
113
120
|
@storage_limit_enabled = v
|
|
114
121
|
when 'StorageLimitBytes'
|
|
115
|
-
raise TypeError "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
122
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
116
123
|
|
|
117
124
|
@storage_limit_bytes = v
|
|
118
125
|
when 'RebrandStorage'
|
|
@@ -146,6 +153,9 @@ module Comet
|
|
|
146
153
|
unless @wasabi.nil?
|
|
147
154
|
ret['Wasabi'] = @wasabi
|
|
148
155
|
end
|
|
156
|
+
unless @custom.nil?
|
|
157
|
+
ret['Custom'] = @custom
|
|
158
|
+
end
|
|
149
159
|
ret['StorageLimitEnabled'] = @storage_limit_enabled
|
|
150
160
|
ret['StorageLimitBytes'] = @storage_limit_bytes
|
|
151
161
|
ret['RebrandStorage'] = @rebrand_storage
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env ruby --enable-frozen-string-literal
|
|
2
2
|
#
|
|
3
|
-
# Copyright (c) 2020-
|
|
3
|
+
# Copyright (c) 2020-2021 Comet Licensing Ltd.
|
|
4
4
|
# Please see the LICENSE file for usage information.
|
|
5
5
|
#
|
|
6
6
|
# SPDX-License-Identifier: MIT
|
|
@@ -75,63 +75,63 @@ module Comet
|
|
|
75
75
|
|
|
76
76
|
# @param [String] json_string The complete object in JSON format
|
|
77
77
|
def from_json(json_string)
|
|
78
|
-
raise TypeError "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
|
|
78
|
+
raise TypeError, "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
|
|
79
79
|
|
|
80
80
|
from_hash(JSON.parse(json_string))
|
|
81
81
|
end
|
|
82
82
|
|
|
83
83
|
# @param [Hash] obj The complete object as a Ruby hash
|
|
84
84
|
def from_hash(obj)
|
|
85
|
-
raise TypeError "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
|
|
85
|
+
raise TypeError, "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
|
|
86
86
|
|
|
87
87
|
obj.each do |k, v|
|
|
88
88
|
case k
|
|
89
89
|
when 'Description'
|
|
90
|
-
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
90
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
91
91
|
|
|
92
92
|
@description = v
|
|
93
93
|
when 'RemoteServerID'
|
|
94
|
-
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
94
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
95
95
|
|
|
96
96
|
@remote_server_id = v
|
|
97
97
|
when 'DisplayClass'
|
|
98
|
-
raise TypeError "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
98
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
99
99
|
|
|
100
100
|
@display_class = v
|
|
101
101
|
when 'ActiveWorkers'
|
|
102
|
-
raise TypeError "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
102
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
103
103
|
|
|
104
104
|
@active_workers = v
|
|
105
105
|
when 'TotalWorkers'
|
|
106
|
-
raise TypeError "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
106
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
107
107
|
|
|
108
108
|
@total_workers = v
|
|
109
109
|
when 'State'
|
|
110
|
-
raise TypeError "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
110
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
111
111
|
|
|
112
112
|
@state = v
|
|
113
113
|
when 'ItemsQueued'
|
|
114
|
-
raise TypeError "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
114
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
115
115
|
|
|
116
116
|
@items_queued = v
|
|
117
117
|
when 'BytesQueued'
|
|
118
|
-
raise TypeError "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
118
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
119
119
|
|
|
120
120
|
@bytes_queued = v
|
|
121
121
|
when 'LastWorkerSubmitTime'
|
|
122
|
-
raise TypeError "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
122
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
123
123
|
|
|
124
124
|
@last_worker_submit_time = v
|
|
125
125
|
when 'CurrentTime'
|
|
126
|
-
raise TypeError "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
126
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
127
127
|
|
|
128
128
|
@current_time = v
|
|
129
129
|
when 'ItemsReplicated'
|
|
130
|
-
raise TypeError "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
130
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
131
131
|
|
|
132
132
|
@items_replicated = v
|
|
133
133
|
when 'BytesReplicated'
|
|
134
|
-
raise TypeError "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
134
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
135
135
|
|
|
136
136
|
@bytes_replicated = v
|
|
137
137
|
else
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env ruby --enable-frozen-string-literal
|
|
2
2
|
#
|
|
3
|
-
# Copyright (c) 2020-
|
|
3
|
+
# Copyright (c) 2020-2021 Comet Licensing Ltd.
|
|
4
4
|
# Please see the LICENSE file for usage information.
|
|
5
5
|
#
|
|
6
6
|
# SPDX-License-Identifier: MIT
|
|
@@ -39,27 +39,27 @@ module Comet
|
|
|
39
39
|
|
|
40
40
|
# @param [String] json_string The complete object in JSON format
|
|
41
41
|
def from_json(json_string)
|
|
42
|
-
raise TypeError "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
|
|
42
|
+
raise TypeError, "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
|
|
43
43
|
|
|
44
44
|
from_hash(JSON.parse(json_string))
|
|
45
45
|
end
|
|
46
46
|
|
|
47
47
|
# @param [Hash] obj The complete object as a Ruby hash
|
|
48
48
|
def from_hash(obj)
|
|
49
|
-
raise TypeError "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
|
|
49
|
+
raise TypeError, "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
|
|
50
50
|
|
|
51
51
|
obj.each do |k, v|
|
|
52
52
|
case k
|
|
53
53
|
when 'Status'
|
|
54
|
-
raise TypeError "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
54
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
55
55
|
|
|
56
56
|
@status = v
|
|
57
57
|
when 'Message'
|
|
58
|
-
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
58
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
59
59
|
|
|
60
60
|
@message = v
|
|
61
61
|
when 'DestinationID'
|
|
62
|
-
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
62
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
63
63
|
|
|
64
64
|
@destination_id = v
|
|
65
65
|
else
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env ruby --enable-frozen-string-literal
|
|
2
2
|
#
|
|
3
|
-
# Copyright (c) 2020-
|
|
3
|
+
# Copyright (c) 2020-2021 Comet Licensing Ltd.
|
|
4
4
|
# Please see the LICENSE file for usage information.
|
|
5
5
|
#
|
|
6
6
|
# SPDX-License-Identifier: MIT
|
|
@@ -20,6 +20,9 @@ module Comet
|
|
|
20
20
|
# @type [Boolean] overwrite_existing_files
|
|
21
21
|
attr_accessor :overwrite_existing_files
|
|
22
22
|
|
|
23
|
+
# @type [Boolean] dest_is_original_location
|
|
24
|
+
attr_accessor :dest_is_original_location
|
|
25
|
+
|
|
23
26
|
# @type [String] dest_path
|
|
24
27
|
attr_accessor :dest_path
|
|
25
28
|
|
|
@@ -46,25 +49,27 @@ module Comet
|
|
|
46
49
|
|
|
47
50
|
# @param [String] json_string The complete object in JSON format
|
|
48
51
|
def from_json(json_string)
|
|
49
|
-
raise TypeError "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
|
|
52
|
+
raise TypeError, "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
|
|
50
53
|
|
|
51
54
|
from_hash(JSON.parse(json_string))
|
|
52
55
|
end
|
|
53
56
|
|
|
54
57
|
# @param [Hash] obj The complete object as a Ruby hash
|
|
55
58
|
def from_hash(obj)
|
|
56
|
-
raise TypeError "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
|
|
59
|
+
raise TypeError, "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
|
|
57
60
|
|
|
58
61
|
obj.each do |k, v|
|
|
59
62
|
case k
|
|
60
63
|
when 'Type'
|
|
61
|
-
raise TypeError "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
64
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
62
65
|
|
|
63
66
|
@type = v
|
|
64
67
|
when 'OverwriteExistingFiles'
|
|
65
68
|
@overwrite_existing_files = v
|
|
69
|
+
when 'DestIsOriginalLocation'
|
|
70
|
+
@dest_is_original_location = v
|
|
66
71
|
when 'DestPath'
|
|
67
|
-
raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
72
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
68
73
|
|
|
69
74
|
@dest_path = v
|
|
70
75
|
when 'ExactDestPaths'
|
|
@@ -73,13 +78,13 @@ module Comet
|
|
|
73
78
|
else
|
|
74
79
|
@exact_dest_paths = Array.new(v.length)
|
|
75
80
|
v.each_with_index do |v1, i1|
|
|
76
|
-
raise TypeError "'v1' expected String, got #{v1.class}" unless v1.is_a? String
|
|
81
|
+
raise TypeError, "'v1' expected String, got #{v1.class}" unless v1.is_a? String
|
|
77
82
|
|
|
78
83
|
@exact_dest_paths[i1] = v1
|
|
79
84
|
end
|
|
80
85
|
end
|
|
81
86
|
when 'ArchiveFormat'
|
|
82
|
-
raise TypeError "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
87
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
83
88
|
|
|
84
89
|
@archive_format = v
|
|
85
90
|
else
|
|
@@ -93,6 +98,7 @@ module Comet
|
|
|
93
98
|
ret = {}
|
|
94
99
|
ret['Type'] = @type
|
|
95
100
|
ret['OverwriteExistingFiles'] = @overwrite_existing_files
|
|
101
|
+
ret['DestIsOriginalLocation'] = @dest_is_original_location
|
|
96
102
|
ret['DestPath'] = @dest_path
|
|
97
103
|
ret['ExactDestPaths'] = @exact_dest_paths
|
|
98
104
|
ret['ArchiveFormat'] = @archive_format
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env ruby --enable-frozen-string-literal
|
|
2
2
|
#
|
|
3
|
-
# Copyright (c) 2020-
|
|
3
|
+
# Copyright (c) 2020-2021 Comet Licensing Ltd.
|
|
4
4
|
# Please see the LICENSE file for usage information.
|
|
5
5
|
#
|
|
6
6
|
# SPDX-License-Identifier: MIT
|
|
@@ -35,19 +35,19 @@ module Comet
|
|
|
35
35
|
|
|
36
36
|
# @param [String] json_string The complete object in JSON format
|
|
37
37
|
def from_json(json_string)
|
|
38
|
-
raise TypeError "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
|
|
38
|
+
raise TypeError, "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
|
|
39
39
|
|
|
40
40
|
from_hash(JSON.parse(json_string))
|
|
41
41
|
end
|
|
42
42
|
|
|
43
43
|
# @param [Hash] obj The complete object as a Ruby hash
|
|
44
44
|
def from_hash(obj)
|
|
45
|
-
raise TypeError "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
|
|
45
|
+
raise TypeError, "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
|
|
46
46
|
|
|
47
47
|
obj.each do |k, v|
|
|
48
48
|
case k
|
|
49
49
|
when 'Mode'
|
|
50
|
-
raise TypeError "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
50
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
51
51
|
|
|
52
52
|
@mode = v
|
|
53
53
|
when 'Ranges'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env ruby --enable-frozen-string-literal
|
|
2
2
|
#
|
|
3
|
-
# Copyright (c) 2020-
|
|
3
|
+
# Copyright (c) 2020-2021 Comet Licensing Ltd.
|
|
4
4
|
# Please see the LICENSE file for usage information.
|
|
5
5
|
#
|
|
6
6
|
# SPDX-License-Identifier: MIT
|
|
@@ -59,47 +59,47 @@ module Comet
|
|
|
59
59
|
|
|
60
60
|
# @param [String] json_string The complete object in JSON format
|
|
61
61
|
def from_json(json_string)
|
|
62
|
-
raise TypeError "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
|
|
62
|
+
raise TypeError, "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
|
|
63
63
|
|
|
64
64
|
from_hash(JSON.parse(json_string))
|
|
65
65
|
end
|
|
66
66
|
|
|
67
67
|
# @param [Hash] obj The complete object as a Ruby hash
|
|
68
68
|
def from_hash(obj)
|
|
69
|
-
raise TypeError "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
|
|
69
|
+
raise TypeError, "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
|
|
70
70
|
|
|
71
71
|
obj.each do |k, v|
|
|
72
72
|
case k
|
|
73
73
|
when 'Type'
|
|
74
|
-
raise TypeError "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
74
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
75
75
|
|
|
76
76
|
@type = v
|
|
77
77
|
when 'Timestamp'
|
|
78
|
-
raise TypeError "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
78
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
79
79
|
|
|
80
80
|
@timestamp = v
|
|
81
81
|
when 'Jobs'
|
|
82
|
-
raise TypeError "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
82
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
83
83
|
|
|
84
84
|
@jobs = v
|
|
85
85
|
when 'Days'
|
|
86
|
-
raise TypeError "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
86
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
87
87
|
|
|
88
88
|
@days = v
|
|
89
89
|
when 'Weeks'
|
|
90
|
-
raise TypeError "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
90
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
91
91
|
|
|
92
92
|
@weeks = v
|
|
93
93
|
when 'Months'
|
|
94
|
-
raise TypeError "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
94
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
95
95
|
|
|
96
96
|
@months = v
|
|
97
97
|
when 'WeekOffset'
|
|
98
|
-
raise TypeError "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
98
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
99
99
|
|
|
100
100
|
@week_offset = v
|
|
101
101
|
when 'MonthOffset'
|
|
102
|
-
raise TypeError "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
102
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
|
103
103
|
|
|
104
104
|
@month_offset = v
|
|
105
105
|
else
|