comet_backup_ruby_sdk 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.rubocop.yml +25 -0
- data/Gemfile +15 -0
- data/LICENSE +7 -0
- data/README.md +81 -0
- data/Rakefile +22 -0
- data/comet_backup_ruby_sdk.gemspec +35 -0
- data/lib/comet/api_response_error.rb +27 -0
- data/lib/comet/comet_server.rb +2926 -0
- data/lib/comet/definitions.rb +550 -0
- data/lib/comet/models/add_bucket_response_message.rb +92 -0
- data/lib/comet/models/admin_account_properties_response.rb +76 -0
- data/lib/comet/models/admin_resource_response.rb +84 -0
- data/lib/comet/models/admin_security_options.rb +139 -0
- data/lib/comet/models/admin_u2fregistration.rb +84 -0
- data/lib/comet/models/admin_user_permissions.rb +102 -0
- data/lib/comet/models/available_download.rb +84 -0
- data/lib/comet/models/azure_destination_location.rb +102 -0
- data/lib/comet/models/b2destination_location.rb +110 -0
- data/lib/comet/models/b2storage_extra_info.rb +77 -0
- data/lib/comet/models/b2transaction_totals.rb +80 -0
- data/lib/comet/models/backup_job_advanced_options.rb +98 -0
- data/lib/comet/models/backup_job_detail.rb +199 -0
- data/lib/comet/models/backup_job_progress.rb +92 -0
- data/lib/comet/models/backup_rule_config.rb +188 -0
- data/lib/comet/models/backup_rule_event_triggers.rb +78 -0
- data/lib/comet/models/branding_options.rb +283 -0
- data/lib/comet/models/branding_properties.rb +245 -0
- data/lib/comet/models/browse_disk_drives_response.rb +91 -0
- data/lib/comet/models/browse_edbresponse.rb +91 -0
- data/lib/comet/models/browse_hvresponse.rb +91 -0
- data/lib/comet/models/browse_vssresponse.rb +91 -0
- data/lib/comet/models/bucket_properties.rb +89 -0
- data/lib/comet/models/bucket_usage_info.rb +91 -0
- data/lib/comet/models/comet_apiresponse_message.rb +76 -0
- data/lib/comet/models/comet_destination_location.rb +86 -0
- data/lib/comet/models/constellation_check_report.rb +89 -0
- data/lib/comet/models/constellation_stats.rb +86 -0
- data/lib/comet/models/constellation_status_apiresponse.rb +109 -0
- data/lib/comet/models/content_measurement.rb +89 -0
- data/lib/comet/models/content_measurement_component.rb +84 -0
- data/lib/comet/models/create_group_policy_response.rb +84 -0
- data/lib/comet/models/default_email_report_policy.rb +83 -0
- data/lib/comet/models/destination_config.rb +465 -0
- data/lib/comet/models/destination_location.rb +365 -0
- data/lib/comet/models/destination_statistics.rb +102 -0
- data/lib/comet/models/device_config.rb +96 -0
- data/lib/comet/models/disk_drive.rb +153 -0
- data/lib/comet/models/dispatcher_admin_sources_response.rb +92 -0
- data/lib/comet/models/dispatcher_stored_objects_response.rb +91 -0
- data/lib/comet/models/dispatcher_vault_snapshots_response.rb +91 -0
- data/lib/comet/models/edbfile_info.rb +92 -0
- data/lib/comet/models/email_options.rb +140 -0
- data/lib/comet/models/email_report_config.rb +90 -0
- data/lib/comet/models/email_report_generated_preview.rb +100 -0
- data/lib/comet/models/extra_file_exclusion.rb +82 -0
- data/lib/comet/models/ftpdestination_location.rb +124 -0
- data/lib/comet/models/get_group_policy_response.rb +91 -0
- data/lib/comet/models/get_profile_and_hash_response_message.rb +91 -0
- data/lib/comet/models/get_profile_hash_response_message.rb +84 -0
- data/lib/comet/models/group_policy.rb +83 -0
- data/lib/comet/models/hyper_vmachine_info.rb +78 -0
- data/lib/comet/models/live_user_connection.rb +125 -0
- data/lib/comet/models/local_destination_location.rb +92 -0
- data/lib/comet/models/mac_oscode_sign_properties.rb +113 -0
- data/lib/comet/models/mongo_dbconnection.rb +211 -0
- data/lib/comet/models/new_bucket_detail.rb +78 -0
- data/lib/comet/models/news_entry.rb +76 -0
- data/lib/comet/models/osinfo.rb +92 -0
- data/lib/comet/models/partition.rb +148 -0
- data/lib/comet/models/private_branding_properties.rb +185 -0
- data/lib/comet/models/protected_item_engine_type_policy.rb +84 -0
- data/lib/comet/models/public_branding_properties.rb +122 -0
- data/lib/comet/models/remote_server_address.rb +135 -0
- data/lib/comet/models/remote_storage_option.rb +147 -0
- data/lib/comet/models/replicator_state_apiresponse.rb +138 -0
- data/lib/comet/models/request_storage_vault_response_message.rb +84 -0
- data/lib/comet/models/restore_job_advanced_options.rb +104 -0
- data/lib/comet/models/retention_policy.rb +83 -0
- data/lib/comet/models/retention_range.rb +110 -0
- data/lib/comet/models/s3destination_location.rb +114 -0
- data/lib/comet/models/schedule_config.rb +82 -0
- data/lib/comet/models/search_clause.rb +111 -0
- data/lib/comet/models/server_config_options_branding_fragment.rb +69 -0
- data/lib/comet/models/server_config_options_software_build_role_fragment.rb +69 -0
- data/lib/comet/models/server_meta_version_info.rb +208 -0
- data/lib/comet/models/session_key_regenerated_response.rb +92 -0
- data/lib/comet/models/sftpdestination_location.rb +122 -0
- data/lib/comet/models/size_measurement.rb +80 -0
- data/lib/comet/models/software_build_role_options.rb +74 -0
- data/lib/comet/models/software_update_news_response.rb +102 -0
- data/lib/comet/models/source_basic_info.rb +93 -0
- data/lib/comet/models/source_config.rb +172 -0
- data/lib/comet/models/source_statistics.rb +69 -0
- data/lib/comet/models/spanned_destination_location.rb +77 -0
- data/lib/comet/models/spanned_storage_extra_info.rb +77 -0
- data/lib/comet/models/sshconnection.rb +114 -0
- data/lib/comet/models/stat_result.rb +86 -0
- data/lib/comet/models/storage_free_space_info.rb +98 -0
- data/lib/comet/models/storage_vault_provider_policy.rb +82 -0
- data/lib/comet/models/stored_object.rb +130 -0
- data/lib/comet/models/streamable_event.rb +74 -0
- data/lib/comet/models/swift_destination_location.rb +192 -0
- data/lib/comet/models/test_response.rb +82 -0
- data/lib/comet/models/totp_regenerated_response.rb +100 -0
- data/lib/comet/models/u2fregister_request.rb +78 -0
- data/lib/comet/models/u2fregistered_key.rb +86 -0
- data/lib/comet/models/u2fregistration_challenge_response.rb +122 -0
- data/lib/comet/models/u2fsign_request.rb +101 -0
- data/lib/comet/models/u2fsign_response.rb +94 -0
- data/lib/comet/models/uninstall_config.rb +74 -0
- data/lib/comet/models/update_campaign_device_status.rb +68 -0
- data/lib/comet/models/update_campaign_options.rb +86 -0
- data/lib/comet/models/update_campaign_properties.rb +100 -0
- data/lib/comet/models/update_campaign_status.rb +115 -0
- data/lib/comet/models/update_campaign_status_device_entry.rb +84 -0
- data/lib/comet/models/user_custom_email_settings.rb +77 -0
- data/lib/comet/models/user_on_server.rb +76 -0
- data/lib/comet/models/user_policy.rb +304 -0
- data/lib/comet/models/user_profile_config.rb +300 -0
- data/lib/comet/models/user_profile_fragment.rb +70 -0
- data/lib/comet/models/vault_snapshot.rb +84 -0
- data/lib/comet/models/vsscomponent.rb +92 -0
- data/lib/comet/models/vsswriter_info.rb +85 -0
- data/lib/comet/models/web_interface_branding_properties.rb +100 -0
- data/lib/comet/models/webhook_option.rb +84 -0
- data/lib/comet/models/win_smbauth.rb +92 -0
- data/lib/comet/models/windows_code_sign_properties.rb +130 -0
- data/lib/comet_backup_ruby_sdk.rb +130 -0
- metadata +227 -0
@@ -0,0 +1,83 @@
|
|
1
|
+
#!/usr/bin/env ruby --enable-frozen-string-literal
|
2
|
+
#
|
3
|
+
# Copyright (c) 2020-2020 Comet Licensing Ltd.
|
4
|
+
# Please see the LICENSE file for usage information.
|
5
|
+
#
|
6
|
+
# SPDX-License-Identifier: MIT
|
7
|
+
#
|
8
|
+
# frozen_string_literal: true
|
9
|
+
|
10
|
+
require 'json'
|
11
|
+
|
12
|
+
module Comet
|
13
|
+
|
14
|
+
# DefaultEmailReportPolicy is a typed class wrapper around the underlying Comet Server API data structure.
|
15
|
+
class DefaultEmailReportPolicy
|
16
|
+
|
17
|
+
# @type [Boolean] should_override_default_reports
|
18
|
+
attr_accessor :should_override_default_reports
|
19
|
+
|
20
|
+
# @type [Array<Comet::EmailReportConfig>] reports
|
21
|
+
attr_accessor :reports
|
22
|
+
|
23
|
+
# @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
|
24
|
+
attr_accessor :unknown_json_fields
|
25
|
+
|
26
|
+
def initialize
|
27
|
+
@reports = []
|
28
|
+
@unknown_json_fields = {}
|
29
|
+
end
|
30
|
+
|
31
|
+
# @param [String] json_string The complete object in JSON format
|
32
|
+
def from_json(json_string)
|
33
|
+
raise TypeError 'expected string' unless json_string.is_a? String
|
34
|
+
|
35
|
+
from_hash(JSON.parse(json_string))
|
36
|
+
end
|
37
|
+
|
38
|
+
# @param [Hash] obj The complete object as a Ruby hash
|
39
|
+
def from_hash(obj)
|
40
|
+
raise TypeError 'expected hash' unless obj.is_a? Hash
|
41
|
+
|
42
|
+
obj.each do |k, v|
|
43
|
+
case k
|
44
|
+
when 'ShouldOverrideDefaultReports'
|
45
|
+
@should_override_default_reports = v
|
46
|
+
when 'Reports'
|
47
|
+
if v.nil?
|
48
|
+
@reports = []
|
49
|
+
else
|
50
|
+
@reports = Array.new(v.length)
|
51
|
+
v.each_with_index do |v1, i1|
|
52
|
+
@reports[i1] = Comet::EmailReportConfig.new
|
53
|
+
@reports[i1].from_hash(v1)
|
54
|
+
end
|
55
|
+
end
|
56
|
+
else
|
57
|
+
@unknown_json_fields[k] = v
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
# @return [Hash] The complete object as a Ruby hash
|
63
|
+
def to_hash
|
64
|
+
ret = {}
|
65
|
+
ret['ShouldOverrideDefaultReports'] = @should_override_default_reports
|
66
|
+
ret['Reports'] = @reports
|
67
|
+
@unknown_json_fields.each do |k, v|
|
68
|
+
ret[k] = v
|
69
|
+
end
|
70
|
+
ret
|
71
|
+
end
|
72
|
+
|
73
|
+
# @return [Hash] The complete object as a Ruby hash
|
74
|
+
def to_h
|
75
|
+
to_hash
|
76
|
+
end
|
77
|
+
|
78
|
+
# @return [String] The complete object as a JSON string
|
79
|
+
def to_json(options = {})
|
80
|
+
to_hash.to_json(options)
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
@@ -0,0 +1,465 @@
|
|
1
|
+
#!/usr/bin/env ruby --enable-frozen-string-literal
|
2
|
+
#
|
3
|
+
# Copyright (c) 2020-2020 Comet Licensing Ltd.
|
4
|
+
# Please see the LICENSE file for usage information.
|
5
|
+
#
|
6
|
+
# SPDX-License-Identifier: MIT
|
7
|
+
#
|
8
|
+
# frozen_string_literal: true
|
9
|
+
|
10
|
+
require 'json'
|
11
|
+
|
12
|
+
module Comet
|
13
|
+
|
14
|
+
# DestinationConfig is a typed class wrapper around the underlying Comet Server API data structure.
|
15
|
+
class DestinationConfig
|
16
|
+
|
17
|
+
# @type [String] description
|
18
|
+
attr_accessor :description
|
19
|
+
|
20
|
+
# @type [Number] create_time
|
21
|
+
attr_accessor :create_time
|
22
|
+
|
23
|
+
# @type [Number] modify_time
|
24
|
+
attr_accessor :modify_time
|
25
|
+
|
26
|
+
# @type [Array<String>] pre_exec
|
27
|
+
attr_accessor :pre_exec
|
28
|
+
|
29
|
+
# @type [Array<String>] post_exec
|
30
|
+
attr_accessor :post_exec
|
31
|
+
|
32
|
+
# @type [Number] destination_type
|
33
|
+
attr_accessor :destination_type
|
34
|
+
|
35
|
+
# @type [String] comet_server
|
36
|
+
attr_accessor :comet_server
|
37
|
+
|
38
|
+
# @type [String] comet_bucket
|
39
|
+
attr_accessor :comet_bucket
|
40
|
+
|
41
|
+
# @type [String] comet_bucket_key
|
42
|
+
attr_accessor :comet_bucket_key
|
43
|
+
|
44
|
+
# @type [String] s3server
|
45
|
+
attr_accessor :s3server
|
46
|
+
|
47
|
+
# @type [Boolean] s3uses_tls
|
48
|
+
attr_accessor :s3uses_tls
|
49
|
+
|
50
|
+
# @type [String] s3access_key
|
51
|
+
attr_accessor :s3access_key
|
52
|
+
|
53
|
+
# @type [String] s3secret_key
|
54
|
+
attr_accessor :s3secret_key
|
55
|
+
|
56
|
+
# @type [String] s3bucket_name
|
57
|
+
attr_accessor :s3bucket_name
|
58
|
+
|
59
|
+
# @type [String] s3subdir
|
60
|
+
attr_accessor :s3subdir
|
61
|
+
|
62
|
+
# @type [Boolean] s3uses_v2signing
|
63
|
+
attr_accessor :s3uses_v2signing
|
64
|
+
|
65
|
+
# @type [String] sftpserver
|
66
|
+
attr_accessor :sftpserver
|
67
|
+
|
68
|
+
# @type [String] sftpusername
|
69
|
+
attr_accessor :sftpusername
|
70
|
+
|
71
|
+
# @type [String] sftpremote_path
|
72
|
+
attr_accessor :sftpremote_path
|
73
|
+
|
74
|
+
# @type [Number] sftpauth_mode
|
75
|
+
attr_accessor :sftpauth_mode
|
76
|
+
|
77
|
+
# @type [String] sftppassword
|
78
|
+
attr_accessor :sftppassword
|
79
|
+
|
80
|
+
# @type [String] sftpprivate_key
|
81
|
+
attr_accessor :sftpprivate_key
|
82
|
+
|
83
|
+
# @type [Boolean] sftpcustom_auth__use_known_hosts_file
|
84
|
+
attr_accessor :sftpcustom_auth__use_known_hosts_file
|
85
|
+
|
86
|
+
# @type [String] sftpcustom_auth__known_hosts_file
|
87
|
+
attr_accessor :sftpcustom_auth__known_hosts_file
|
88
|
+
|
89
|
+
# @type [String] ftpserver
|
90
|
+
attr_accessor :ftpserver
|
91
|
+
|
92
|
+
# @type [String] ftpusername
|
93
|
+
attr_accessor :ftpusername
|
94
|
+
|
95
|
+
# @type [String] ftppassword
|
96
|
+
attr_accessor :ftppassword
|
97
|
+
|
98
|
+
# @type [Boolean] ftpbase_use_home_directory
|
99
|
+
attr_accessor :ftpbase_use_home_directory
|
100
|
+
|
101
|
+
# @type [String] ftpcustom_base_directory
|
102
|
+
attr_accessor :ftpcustom_base_directory
|
103
|
+
|
104
|
+
# @type [Number] ftpsmode
|
105
|
+
attr_accessor :ftpsmode
|
106
|
+
|
107
|
+
# @type [Number] ftpport
|
108
|
+
attr_accessor :ftpport
|
109
|
+
|
110
|
+
# @type [Number] ftpmax_connections
|
111
|
+
attr_accessor :ftpmax_connections
|
112
|
+
|
113
|
+
# @type [Boolean] ftpaccept_invalid_ssl
|
114
|
+
attr_accessor :ftpaccept_invalid_ssl
|
115
|
+
|
116
|
+
# @type [String] azbaccount_name
|
117
|
+
attr_accessor :azbaccount_name
|
118
|
+
|
119
|
+
# @type [String] azbaccount_key
|
120
|
+
attr_accessor :azbaccount_key
|
121
|
+
|
122
|
+
# @type [String] azbcontainer
|
123
|
+
attr_accessor :azbcontainer
|
124
|
+
|
125
|
+
# @type [String] azbrealm
|
126
|
+
attr_accessor :azbrealm
|
127
|
+
|
128
|
+
# @type [String] azbprefix
|
129
|
+
attr_accessor :azbprefix
|
130
|
+
|
131
|
+
# @type [String] localcopy_path
|
132
|
+
attr_accessor :localcopy_path
|
133
|
+
|
134
|
+
# @type [String] localcopy_win_smbusername
|
135
|
+
attr_accessor :localcopy_win_smbusername
|
136
|
+
|
137
|
+
# @type [String] localcopy_win_smbpassword
|
138
|
+
attr_accessor :localcopy_win_smbpassword
|
139
|
+
|
140
|
+
# @type [Number] localcopy_win_smbpassword_format
|
141
|
+
attr_accessor :localcopy_win_smbpassword_format
|
142
|
+
|
143
|
+
# @type [Comet::SwiftDestinationLocation] swift
|
144
|
+
attr_accessor :swift
|
145
|
+
|
146
|
+
# @type [Comet::B2DestinationLocation] b2
|
147
|
+
attr_accessor :b2
|
148
|
+
|
149
|
+
# @type [Array<Comet::DestinationLocation>] span_targets
|
150
|
+
attr_accessor :span_targets
|
151
|
+
|
152
|
+
# @type [Number] encryption_key_encryption_method
|
153
|
+
attr_accessor :encryption_key_encryption_method
|
154
|
+
|
155
|
+
# @type [String] encrypted_encryption_key
|
156
|
+
attr_accessor :encrypted_encryption_key
|
157
|
+
|
158
|
+
# @type [Number] repo_init_timestamp
|
159
|
+
attr_accessor :repo_init_timestamp
|
160
|
+
|
161
|
+
# @type [Boolean] storage_limit_enabled
|
162
|
+
attr_accessor :storage_limit_enabled
|
163
|
+
|
164
|
+
# @type [Number] storage_limit_bytes
|
165
|
+
attr_accessor :storage_limit_bytes
|
166
|
+
|
167
|
+
# @type [Comet::DestinationStatistics] statistics
|
168
|
+
attr_accessor :statistics
|
169
|
+
|
170
|
+
# @type [Comet::RetentionPolicy] default_retention
|
171
|
+
attr_accessor :default_retention
|
172
|
+
|
173
|
+
# @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
|
174
|
+
attr_accessor :unknown_json_fields
|
175
|
+
|
176
|
+
def initialize
|
177
|
+
@pre_exec = []
|
178
|
+
@post_exec = []
|
179
|
+
@span_targets = []
|
180
|
+
@unknown_json_fields = {}
|
181
|
+
end
|
182
|
+
|
183
|
+
# @param [String] json_string The complete object in JSON format
|
184
|
+
def from_json(json_string)
|
185
|
+
raise TypeError 'expected string' unless json_string.is_a? String
|
186
|
+
|
187
|
+
from_hash(JSON.parse(json_string))
|
188
|
+
end
|
189
|
+
|
190
|
+
# @param [Hash] obj The complete object as a Ruby hash
|
191
|
+
def from_hash(obj)
|
192
|
+
raise TypeError 'expected hash' unless obj.is_a? Hash
|
193
|
+
|
194
|
+
obj.each do |k, v|
|
195
|
+
case k
|
196
|
+
when 'Description'
|
197
|
+
raise TypeError 'expected string' unless v.is_a? String
|
198
|
+
|
199
|
+
@description = v
|
200
|
+
when 'CreateTime'
|
201
|
+
@create_time = v
|
202
|
+
when 'ModifyTime'
|
203
|
+
@modify_time = v
|
204
|
+
when 'PreExec'
|
205
|
+
if v.nil?
|
206
|
+
@pre_exec = []
|
207
|
+
else
|
208
|
+
@pre_exec = Array.new(v.length)
|
209
|
+
v.each_with_index do |v1, i1|
|
210
|
+
raise TypeError 'expected string' unless v1.is_a? String
|
211
|
+
|
212
|
+
@pre_exec[i1] = v1
|
213
|
+
end
|
214
|
+
end
|
215
|
+
when 'PostExec'
|
216
|
+
if v.nil?
|
217
|
+
@post_exec = []
|
218
|
+
else
|
219
|
+
@post_exec = Array.new(v.length)
|
220
|
+
v.each_with_index do |v1, i1|
|
221
|
+
raise TypeError 'expected string' unless v1.is_a? String
|
222
|
+
|
223
|
+
@post_exec[i1] = v1
|
224
|
+
end
|
225
|
+
end
|
226
|
+
when 'DestinationType'
|
227
|
+
@destination_type = v
|
228
|
+
when 'CometServer'
|
229
|
+
raise TypeError 'expected string' unless v.is_a? String
|
230
|
+
|
231
|
+
@comet_server = v
|
232
|
+
when 'CometBucket'
|
233
|
+
raise TypeError 'expected string' unless v.is_a? String
|
234
|
+
|
235
|
+
@comet_bucket = v
|
236
|
+
when 'CometBucketKey'
|
237
|
+
raise TypeError 'expected string' unless v.is_a? String
|
238
|
+
|
239
|
+
@comet_bucket_key = v
|
240
|
+
when 'S3Server'
|
241
|
+
raise TypeError 'expected string' unless v.is_a? String
|
242
|
+
|
243
|
+
@s3server = v
|
244
|
+
when 'S3UsesTLS'
|
245
|
+
@s3uses_tls = v
|
246
|
+
when 'S3AccessKey'
|
247
|
+
raise TypeError 'expected string' unless v.is_a? String
|
248
|
+
|
249
|
+
@s3access_key = v
|
250
|
+
when 'S3SecretKey'
|
251
|
+
raise TypeError 'expected string' unless v.is_a? String
|
252
|
+
|
253
|
+
@s3secret_key = v
|
254
|
+
when 'S3BucketName'
|
255
|
+
raise TypeError 'expected string' unless v.is_a? String
|
256
|
+
|
257
|
+
@s3bucket_name = v
|
258
|
+
when 'S3Subdir'
|
259
|
+
raise TypeError 'expected string' unless v.is_a? String
|
260
|
+
|
261
|
+
@s3subdir = v
|
262
|
+
when 'S3UsesV2Signing'
|
263
|
+
@s3uses_v2signing = v
|
264
|
+
when 'SFTPServer'
|
265
|
+
raise TypeError 'expected string' unless v.is_a? String
|
266
|
+
|
267
|
+
@sftpserver = v
|
268
|
+
when 'SFTPUsername'
|
269
|
+
raise TypeError 'expected string' unless v.is_a? String
|
270
|
+
|
271
|
+
@sftpusername = v
|
272
|
+
when 'SFTPRemotePath'
|
273
|
+
raise TypeError 'expected string' unless v.is_a? String
|
274
|
+
|
275
|
+
@sftpremote_path = v
|
276
|
+
when 'SFTPAuthMode'
|
277
|
+
@sftpauth_mode = v
|
278
|
+
when 'SFTPPassword'
|
279
|
+
raise TypeError 'expected string' unless v.is_a? String
|
280
|
+
|
281
|
+
@sftppassword = v
|
282
|
+
when 'SFTPPrivateKey'
|
283
|
+
raise TypeError 'expected string' unless v.is_a? String
|
284
|
+
|
285
|
+
@sftpprivate_key = v
|
286
|
+
when 'SFTPCustomAuth_UseKnownHostsFile'
|
287
|
+
@sftpcustom_auth__use_known_hosts_file = v
|
288
|
+
when 'SFTPCustomAuth_KnownHostsFile'
|
289
|
+
raise TypeError 'expected string' unless v.is_a? String
|
290
|
+
|
291
|
+
@sftpcustom_auth__known_hosts_file = v
|
292
|
+
when 'FTPServer'
|
293
|
+
raise TypeError 'expected string' unless v.is_a? String
|
294
|
+
|
295
|
+
@ftpserver = v
|
296
|
+
when 'FTPUsername'
|
297
|
+
raise TypeError 'expected string' unless v.is_a? String
|
298
|
+
|
299
|
+
@ftpusername = v
|
300
|
+
when 'FTPPassword'
|
301
|
+
raise TypeError 'expected string' unless v.is_a? String
|
302
|
+
|
303
|
+
@ftppassword = v
|
304
|
+
when 'FTPBaseUseHomeDirectory'
|
305
|
+
@ftpbase_use_home_directory = v
|
306
|
+
when 'FTPCustomBaseDirectory'
|
307
|
+
raise TypeError 'expected string' unless v.is_a? String
|
308
|
+
|
309
|
+
@ftpcustom_base_directory = v
|
310
|
+
when 'FTPSMode'
|
311
|
+
@ftpsmode = v
|
312
|
+
when 'FTPPort'
|
313
|
+
@ftpport = v
|
314
|
+
when 'FTPMaxConnections'
|
315
|
+
@ftpmax_connections = v
|
316
|
+
when 'FTPAcceptInvalidSSL'
|
317
|
+
@ftpaccept_invalid_ssl = v
|
318
|
+
when 'AZBAccountName'
|
319
|
+
raise TypeError 'expected string' unless v.is_a? String
|
320
|
+
|
321
|
+
@azbaccount_name = v
|
322
|
+
when 'AZBAccountKey'
|
323
|
+
raise TypeError 'expected string' unless v.is_a? String
|
324
|
+
|
325
|
+
@azbaccount_key = v
|
326
|
+
when 'AZBContainer'
|
327
|
+
raise TypeError 'expected string' unless v.is_a? String
|
328
|
+
|
329
|
+
@azbcontainer = v
|
330
|
+
when 'AZBRealm'
|
331
|
+
raise TypeError 'expected string' unless v.is_a? String
|
332
|
+
|
333
|
+
@azbrealm = v
|
334
|
+
when 'AZBPrefix'
|
335
|
+
raise TypeError 'expected string' unless v.is_a? String
|
336
|
+
|
337
|
+
@azbprefix = v
|
338
|
+
when 'LocalcopyPath'
|
339
|
+
raise TypeError 'expected string' unless v.is_a? String
|
340
|
+
|
341
|
+
@localcopy_path = v
|
342
|
+
when 'LocalcopyWinSMBUsername'
|
343
|
+
raise TypeError 'expected string' unless v.is_a? String
|
344
|
+
|
345
|
+
@localcopy_win_smbusername = v
|
346
|
+
when 'LocalcopyWinSMBPassword'
|
347
|
+
raise TypeError 'expected string' unless v.is_a? String
|
348
|
+
|
349
|
+
@localcopy_win_smbpassword = v
|
350
|
+
when 'LocalcopyWinSMBPasswordFormat'
|
351
|
+
@localcopy_win_smbpassword_format = v
|
352
|
+
when 'Swift'
|
353
|
+
@swift = Comet::SwiftDestinationLocation.new
|
354
|
+
@swift.from_hash(v)
|
355
|
+
when 'B2'
|
356
|
+
@b2 = Comet::B2DestinationLocation.new
|
357
|
+
@b2.from_hash(v)
|
358
|
+
when 'SpanTargets'
|
359
|
+
if v.nil?
|
360
|
+
@span_targets = []
|
361
|
+
else
|
362
|
+
@span_targets = Array.new(v.length)
|
363
|
+
v.each_with_index do |v1, i1|
|
364
|
+
@span_targets[i1] = Comet::DestinationLocation.new
|
365
|
+
@span_targets[i1].from_hash(v1)
|
366
|
+
end
|
367
|
+
end
|
368
|
+
when 'EncryptionKeyEncryptionMethod'
|
369
|
+
@encryption_key_encryption_method = v
|
370
|
+
when 'EncryptedEncryptionKey'
|
371
|
+
raise TypeError 'expected string' unless v.is_a? String
|
372
|
+
|
373
|
+
@encrypted_encryption_key = v
|
374
|
+
when 'RepoInitTimestamp'
|
375
|
+
@repo_init_timestamp = v
|
376
|
+
when 'StorageLimitEnabled'
|
377
|
+
@storage_limit_enabled = v
|
378
|
+
when 'StorageLimitBytes'
|
379
|
+
@storage_limit_bytes = v
|
380
|
+
when 'Statistics'
|
381
|
+
@statistics = Comet::DestinationStatistics.new
|
382
|
+
@statistics.from_hash(v)
|
383
|
+
when 'DefaultRetention'
|
384
|
+
@default_retention = Comet::RetentionPolicy.new
|
385
|
+
@default_retention.from_hash(v)
|
386
|
+
else
|
387
|
+
@unknown_json_fields[k] = v
|
388
|
+
end
|
389
|
+
end
|
390
|
+
end
|
391
|
+
|
392
|
+
# @return [Hash] The complete object as a Ruby hash
|
393
|
+
def to_hash
|
394
|
+
ret = {}
|
395
|
+
ret['Description'] = @description
|
396
|
+
ret['CreateTime'] = @create_time
|
397
|
+
ret['ModifyTime'] = @modify_time
|
398
|
+
ret['PreExec'] = @pre_exec
|
399
|
+
ret['PostExec'] = @post_exec
|
400
|
+
ret['DestinationType'] = @destination_type
|
401
|
+
ret['CometServer'] = @comet_server
|
402
|
+
ret['CometBucket'] = @comet_bucket
|
403
|
+
ret['CometBucketKey'] = @comet_bucket_key
|
404
|
+
ret['S3Server'] = @s3server
|
405
|
+
ret['S3UsesTLS'] = @s3uses_tls
|
406
|
+
ret['S3AccessKey'] = @s3access_key
|
407
|
+
ret['S3SecretKey'] = @s3secret_key
|
408
|
+
ret['S3BucketName'] = @s3bucket_name
|
409
|
+
ret['S3Subdir'] = @s3subdir
|
410
|
+
ret['S3UsesV2Signing'] = @s3uses_v2signing
|
411
|
+
ret['SFTPServer'] = @sftpserver
|
412
|
+
ret['SFTPUsername'] = @sftpusername
|
413
|
+
ret['SFTPRemotePath'] = @sftpremote_path
|
414
|
+
ret['SFTPAuthMode'] = @sftpauth_mode
|
415
|
+
ret['SFTPPassword'] = @sftppassword
|
416
|
+
ret['SFTPPrivateKey'] = @sftpprivate_key
|
417
|
+
ret['SFTPCustomAuth_UseKnownHostsFile'] = @sftpcustom_auth__use_known_hosts_file
|
418
|
+
ret['SFTPCustomAuth_KnownHostsFile'] = @sftpcustom_auth__known_hosts_file
|
419
|
+
ret['FTPServer'] = @ftpserver
|
420
|
+
ret['FTPUsername'] = @ftpusername
|
421
|
+
ret['FTPPassword'] = @ftppassword
|
422
|
+
ret['FTPBaseUseHomeDirectory'] = @ftpbase_use_home_directory
|
423
|
+
ret['FTPCustomBaseDirectory'] = @ftpcustom_base_directory
|
424
|
+
ret['FTPSMode'] = @ftpsmode
|
425
|
+
ret['FTPPort'] = @ftpport
|
426
|
+
ret['FTPMaxConnections'] = @ftpmax_connections
|
427
|
+
ret['FTPAcceptInvalidSSL'] = @ftpaccept_invalid_ssl
|
428
|
+
ret['AZBAccountName'] = @azbaccount_name
|
429
|
+
ret['AZBAccountKey'] = @azbaccount_key
|
430
|
+
ret['AZBContainer'] = @azbcontainer
|
431
|
+
ret['AZBRealm'] = @azbrealm
|
432
|
+
ret['AZBPrefix'] = @azbprefix
|
433
|
+
ret['LocalcopyPath'] = @localcopy_path
|
434
|
+
ret['LocalcopyWinSMBUsername'] = @localcopy_win_smbusername
|
435
|
+
ret['LocalcopyWinSMBPassword'] = @localcopy_win_smbpassword
|
436
|
+
ret['LocalcopyWinSMBPasswordFormat'] = @localcopy_win_smbpassword_format
|
437
|
+
ret['Swift'] = @swift
|
438
|
+
ret['B2'] = @b2
|
439
|
+
ret['SpanTargets'] = @span_targets
|
440
|
+
ret['EncryptionKeyEncryptionMethod'] = @encryption_key_encryption_method
|
441
|
+
ret['EncryptedEncryptionKey'] = @encrypted_encryption_key
|
442
|
+
ret['RepoInitTimestamp'] = @repo_init_timestamp
|
443
|
+
ret['StorageLimitEnabled'] = @storage_limit_enabled
|
444
|
+
ret['StorageLimitBytes'] = @storage_limit_bytes
|
445
|
+
unless @statistics.nil?
|
446
|
+
ret['Statistics'] = @statistics
|
447
|
+
end
|
448
|
+
ret['DefaultRetention'] = @default_retention
|
449
|
+
@unknown_json_fields.each do |k, v|
|
450
|
+
ret[k] = v
|
451
|
+
end
|
452
|
+
ret
|
453
|
+
end
|
454
|
+
|
455
|
+
# @return [Hash] The complete object as a Ruby hash
|
456
|
+
def to_h
|
457
|
+
to_hash
|
458
|
+
end
|
459
|
+
|
460
|
+
# @return [String] The complete object as a JSON string
|
461
|
+
def to_json(options = {})
|
462
|
+
to_hash.to_json(options)
|
463
|
+
end
|
464
|
+
end
|
465
|
+
end
|