comet_backup_ruby_sdk 1.4.0 → 1.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +5 -0
- data/CHANGELOG.md +40 -0
- data/Gemfile.lock +2 -2
- data/RELEASING.md +6 -4
- data/comet_backup_ruby_sdk.gemspec +1 -1
- data/lib/comet/api_response_error.rb +0 -0
- data/lib/comet/comet_server.rb +227 -2
- data/lib/comet/definitions.rb +68 -5
- 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/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 +33 -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 +9 -0
- data/lib/comet/models/branding_properties.rb +9 -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_365objects_response.rb +99 -0
- data/lib/comet/models/browse_sqlserver_response.rb +100 -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_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/create_group_policy_response.rb +0 -0
- data/lib/comet/models/custom_remote_bucket_settings.rb +0 -0
- data/lib/comet/models/default_email_report_policy.rb +0 -0
- data/lib/comet/models/default_source_with_osrestriction.rb +83 -0
- data/lib/comet/models/destination_config.rb +0 -0
- data/lib/comet/models/destination_location.rb +0 -0
- data/lib/comet/models/destination_statistics.rb +0 -0
- data/lib/comet/models/device_config.rb +11 -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/edbfile_info.rb +0 -0
- data/lib/comet/models/email_options.rb +0 -0
- data/lib/comet/models/email_report_config.rb +0 -0
- data/lib/comet/models/email_report_generated_preview.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/group_policy.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/live_user_connection.rb +11 -0
- data/lib/comet/models/local_destination_location.rb +0 -0
- data/lib/comet/models/mac_oscode_sign_properties.rb +0 -0
- data/lib/comet/models/mongo_dbconnection.rb +0 -0
- 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 +0 -0
- data/lib/comet/models/news_entry.rb +0 -0
- 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 +6 -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 +9 -0
- data/lib/comet/models/protected_item_engine_type_policy.rb +0 -0
- data/lib/comet/models/public_branding_properties.rb +0 -0
- 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 +0 -0
- data/lib/comet/models/remote_storage_option.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 +10 -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 +0 -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_statistics.rb +108 -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 +135 -0
- data/lib/comet/models/server_meta_version_info.rb +15 -0
- data/lib/comet/models/session_key_regenerated_response.rb +0 -0
- data/lib/comet/models/sftpdestination_location.rb +0 -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 +84 -0
- data/lib/comet/models/source_statistics.rb +8 -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_vault_provider_policy.rb +0 -0
- data/lib/comet/models/stored_object.rb +85 -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/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 +15 -0
- data/lib/comet/models/user_profile_config.rb +0 -0
- data/lib/comet/models/user_profile_fragment.rb +0 -0
- data/lib/comet/models/vault_snapshot.rb +0 -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 +0 -0
- data/lib/comet/models/web_interface_branding_properties.rb +0 -0
- data/lib/comet/models/webhook_option.rb +16 -0
- data/lib/comet/models/win_smbauth.rb +0 -0
- data/lib/comet/models/windows_code_sign_properties.rb +0 -0
- data/lib/comet_backup_ruby_sdk.rb +14 -0
- metadata +17 -3
@@ -0,0 +1,100 @@
|
|
1
|
+
#!/usr/bin/env ruby --enable-frozen-string-literal
|
2
|
+
#
|
3
|
+
# Copyright (c) 2020-2021 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
|
+
# RegisterOfficeApplicationCheckResponse is a typed class wrapper around the underlying Comet Server API data structure.
|
15
|
+
class RegisterOfficeApplicationCheckResponse
|
16
|
+
|
17
|
+
# @type [String] continuation
|
18
|
+
attr_accessor :continuation
|
19
|
+
|
20
|
+
# @type [Boolean] completed
|
21
|
+
attr_accessor :completed
|
22
|
+
|
23
|
+
# @type [String] error
|
24
|
+
attr_accessor :error
|
25
|
+
|
26
|
+
# @type [Comet::Office365Credential] result
|
27
|
+
attr_accessor :result
|
28
|
+
|
29
|
+
# @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
|
30
|
+
attr_accessor :unknown_json_fields
|
31
|
+
|
32
|
+
def initialize
|
33
|
+
clear
|
34
|
+
end
|
35
|
+
|
36
|
+
def clear
|
37
|
+
@continuation = ''
|
38
|
+
@error = ''
|
39
|
+
@result = Comet::Office365Credential.new
|
40
|
+
@unknown_json_fields = {}
|
41
|
+
end
|
42
|
+
|
43
|
+
# @param [String] json_string The complete object in JSON format
|
44
|
+
def from_json(json_string)
|
45
|
+
raise TypeError, "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
|
46
|
+
|
47
|
+
from_hash(JSON.parse(json_string))
|
48
|
+
end
|
49
|
+
|
50
|
+
# @param [Hash] obj The complete object as a Ruby hash
|
51
|
+
def from_hash(obj)
|
52
|
+
raise TypeError, "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
|
53
|
+
|
54
|
+
obj.each do |k, v|
|
55
|
+
case k
|
56
|
+
when 'Continuation'
|
57
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
58
|
+
|
59
|
+
@continuation = v
|
60
|
+
when 'Completed'
|
61
|
+
@completed = v
|
62
|
+
when 'Error'
|
63
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
64
|
+
|
65
|
+
@error = v
|
66
|
+
when 'Result'
|
67
|
+
@result = Comet::Office365Credential.new
|
68
|
+
@result.from_hash(v)
|
69
|
+
else
|
70
|
+
@unknown_json_fields[k] = v
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
# @return [Hash] The complete object as a Ruby hash
|
76
|
+
def to_hash
|
77
|
+
ret = {}
|
78
|
+
ret['Continuation'] = @continuation
|
79
|
+
ret['Completed'] = @completed
|
80
|
+
ret['Error'] = @error
|
81
|
+
unless @result.nil?
|
82
|
+
ret['Result'] = @result
|
83
|
+
end
|
84
|
+
@unknown_json_fields.each do |k, v|
|
85
|
+
ret[k] = v
|
86
|
+
end
|
87
|
+
ret
|
88
|
+
end
|
89
|
+
|
90
|
+
# @return [Hash] The complete object as a Ruby hash
|
91
|
+
def to_h
|
92
|
+
to_hash
|
93
|
+
end
|
94
|
+
|
95
|
+
# @return [String] The complete object as a JSON string
|
96
|
+
def to_json(options = {})
|
97
|
+
to_hash.to_json(options)
|
98
|
+
end
|
99
|
+
end
|
100
|
+
end
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -32,6 +32,9 @@ module Comet
|
|
32
32
|
# @type [Number] archive_format
|
33
33
|
attr_accessor :archive_format
|
34
34
|
|
35
|
+
# @type [Comet::Office365Credential] office_365credential
|
36
|
+
attr_accessor :office_365credential
|
37
|
+
|
35
38
|
# @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
|
36
39
|
attr_accessor :unknown_json_fields
|
37
40
|
|
@@ -44,6 +47,7 @@ module Comet
|
|
44
47
|
@dest_path = ''
|
45
48
|
@exact_dest_paths = []
|
46
49
|
@archive_format = 0
|
50
|
+
@office_365credential = Comet::Office365Credential.new
|
47
51
|
@unknown_json_fields = {}
|
48
52
|
end
|
49
53
|
|
@@ -87,6 +91,9 @@ module Comet
|
|
87
91
|
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
88
92
|
|
89
93
|
@archive_format = v
|
94
|
+
when 'Office365Credential'
|
95
|
+
@office_365credential = Comet::Office365Credential.new
|
96
|
+
@office_365credential.from_hash(v)
|
90
97
|
else
|
91
98
|
@unknown_json_fields[k] = v
|
92
99
|
end
|
@@ -102,6 +109,9 @@ module Comet
|
|
102
109
|
ret['DestPath'] = @dest_path
|
103
110
|
ret['ExactDestPaths'] = @exact_dest_paths
|
104
111
|
ret['ArchiveFormat'] = @archive_format
|
112
|
+
unless @office_365credential.nil?
|
113
|
+
ret['Office365Credential'] = @office_365credential
|
114
|
+
end
|
105
115
|
@unknown_json_fields.each do |k, v|
|
106
116
|
ret[k] = v
|
107
117
|
end
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,108 @@
|
|
1
|
+
#!/usr/bin/env ruby --enable-frozen-string-literal
|
2
|
+
#
|
3
|
+
# Copyright (c) 2020-2021 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
|
+
# SelfBackupStatistics is a typed class wrapper around the underlying Comet Server API data structure.
|
15
|
+
class SelfBackupStatistics
|
16
|
+
|
17
|
+
# @type [Number] current_run_start
|
18
|
+
attr_accessor :current_run_start
|
19
|
+
|
20
|
+
# @type [Number] last_run_start
|
21
|
+
attr_accessor :last_run_start
|
22
|
+
|
23
|
+
# @type [Number] last_run_end
|
24
|
+
attr_accessor :last_run_end
|
25
|
+
|
26
|
+
# @type [Boolean] last_run_success
|
27
|
+
attr_accessor :last_run_success
|
28
|
+
|
29
|
+
# @type [Number] last_run_size
|
30
|
+
attr_accessor :last_run_size
|
31
|
+
|
32
|
+
# @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
|
33
|
+
attr_accessor :unknown_json_fields
|
34
|
+
|
35
|
+
def initialize
|
36
|
+
clear
|
37
|
+
end
|
38
|
+
|
39
|
+
def clear
|
40
|
+
@current_run_start = 0
|
41
|
+
@last_run_start = 0
|
42
|
+
@last_run_end = 0
|
43
|
+
@last_run_size = 0
|
44
|
+
@unknown_json_fields = {}
|
45
|
+
end
|
46
|
+
|
47
|
+
# @param [String] json_string The complete object in JSON format
|
48
|
+
def from_json(json_string)
|
49
|
+
raise TypeError, "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
|
50
|
+
|
51
|
+
from_hash(JSON.parse(json_string))
|
52
|
+
end
|
53
|
+
|
54
|
+
# @param [Hash] obj The complete object as a Ruby hash
|
55
|
+
def from_hash(obj)
|
56
|
+
raise TypeError, "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
|
57
|
+
|
58
|
+
obj.each do |k, v|
|
59
|
+
case k
|
60
|
+
when 'CurrentRunStart'
|
61
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
62
|
+
|
63
|
+
@current_run_start = v
|
64
|
+
when 'LastRunStart'
|
65
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
66
|
+
|
67
|
+
@last_run_start = v
|
68
|
+
when 'LastRunEnd'
|
69
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
70
|
+
|
71
|
+
@last_run_end = v
|
72
|
+
when 'LastRunSuccess'
|
73
|
+
@last_run_success = v
|
74
|
+
when 'LastRunSize'
|
75
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
76
|
+
|
77
|
+
@last_run_size = v
|
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['CurrentRunStart'] = @current_run_start
|
88
|
+
ret['LastRunStart'] = @last_run_start
|
89
|
+
ret['LastRunEnd'] = @last_run_end
|
90
|
+
ret['LastRunSuccess'] = @last_run_success
|
91
|
+
ret['LastRunSize'] = @last_run_size
|
92
|
+
@unknown_json_fields.each do |k, v|
|
93
|
+
ret[k] = v
|
94
|
+
end
|
95
|
+
ret
|
96
|
+
end
|
97
|
+
|
98
|
+
# @return [Hash] The complete object as a Ruby hash
|
99
|
+
def to_h
|
100
|
+
to_hash
|
101
|
+
end
|
102
|
+
|
103
|
+
# @return [String] The complete object as a JSON string
|
104
|
+
def to_json(options = {})
|
105
|
+
to_hash.to_json(options)
|
106
|
+
end
|
107
|
+
end
|
108
|
+
end
|
File without changes
|
File without changes
|
@@ -0,0 +1,135 @@
|
|
1
|
+
#!/usr/bin/env ruby --enable-frozen-string-literal
|
2
|
+
#
|
3
|
+
# Copyright (c) 2020-2021 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
|
+
# ServerMetaBrandingProperties is a typed class wrapper around the underlying Comet Server API data structure.
|
15
|
+
class ServerMetaBrandingProperties
|
16
|
+
|
17
|
+
# @type [String] brand_name
|
18
|
+
attr_accessor :brand_name
|
19
|
+
|
20
|
+
# @type [String] product_name
|
21
|
+
attr_accessor :product_name
|
22
|
+
|
23
|
+
# @type [Boolean] has_image
|
24
|
+
attr_accessor :has_image
|
25
|
+
|
26
|
+
# @type [String] top_color
|
27
|
+
attr_accessor :top_color
|
28
|
+
|
29
|
+
# @type [Boolean] hide_news_area
|
30
|
+
attr_accessor :hide_news_area
|
31
|
+
|
32
|
+
# @type [Boolean] allow_unauthenticated_downloads
|
33
|
+
attr_accessor :allow_unauthenticated_downloads
|
34
|
+
|
35
|
+
# @type [Boolean] allow_authenticated_downloads
|
36
|
+
attr_accessor :allow_authenticated_downloads
|
37
|
+
|
38
|
+
# @type [Number] prune_logs_after_days
|
39
|
+
attr_accessor :prune_logs_after_days
|
40
|
+
|
41
|
+
# @type [Number] expired_in_seconds
|
42
|
+
attr_accessor :expired_in_seconds
|
43
|
+
|
44
|
+
# @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
|
45
|
+
attr_accessor :unknown_json_fields
|
46
|
+
|
47
|
+
def initialize
|
48
|
+
clear
|
49
|
+
end
|
50
|
+
|
51
|
+
def clear
|
52
|
+
@brand_name = ''
|
53
|
+
@product_name = ''
|
54
|
+
@top_color = ''
|
55
|
+
@prune_logs_after_days = 0
|
56
|
+
@expired_in_seconds = 0
|
57
|
+
@unknown_json_fields = {}
|
58
|
+
end
|
59
|
+
|
60
|
+
# @param [String] json_string The complete object in JSON format
|
61
|
+
def from_json(json_string)
|
62
|
+
raise TypeError, "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
|
63
|
+
|
64
|
+
from_hash(JSON.parse(json_string))
|
65
|
+
end
|
66
|
+
|
67
|
+
# @param [Hash] obj The complete object as a Ruby hash
|
68
|
+
def from_hash(obj)
|
69
|
+
raise TypeError, "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
|
70
|
+
|
71
|
+
obj.each do |k, v|
|
72
|
+
case k
|
73
|
+
when 'BrandName'
|
74
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
75
|
+
|
76
|
+
@brand_name = v
|
77
|
+
when 'ProductName'
|
78
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
79
|
+
|
80
|
+
@product_name = v
|
81
|
+
when 'HasImage'
|
82
|
+
@has_image = v
|
83
|
+
when 'TopColor'
|
84
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
85
|
+
|
86
|
+
@top_color = v
|
87
|
+
when 'HideNewsArea'
|
88
|
+
@hide_news_area = v
|
89
|
+
when 'AllowUnauthenticatedDownloads'
|
90
|
+
@allow_unauthenticated_downloads = v
|
91
|
+
when 'AllowAuthenticatedDownloads'
|
92
|
+
@allow_authenticated_downloads = v
|
93
|
+
when 'PruneLogsAfterDays'
|
94
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
95
|
+
|
96
|
+
@prune_logs_after_days = v
|
97
|
+
when 'ExpiredInSeconds'
|
98
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
99
|
+
|
100
|
+
@expired_in_seconds = v
|
101
|
+
else
|
102
|
+
@unknown_json_fields[k] = v
|
103
|
+
end
|
104
|
+
end
|
105
|
+
end
|
106
|
+
|
107
|
+
# @return [Hash] The complete object as a Ruby hash
|
108
|
+
def to_hash
|
109
|
+
ret = {}
|
110
|
+
ret['BrandName'] = @brand_name
|
111
|
+
ret['ProductName'] = @product_name
|
112
|
+
ret['HasImage'] = @has_image
|
113
|
+
ret['TopColor'] = @top_color
|
114
|
+
ret['HideNewsArea'] = @hide_news_area
|
115
|
+
ret['AllowUnauthenticatedDownloads'] = @allow_unauthenticated_downloads
|
116
|
+
ret['AllowAuthenticatedDownloads'] = @allow_authenticated_downloads
|
117
|
+
ret['PruneLogsAfterDays'] = @prune_logs_after_days
|
118
|
+
ret['ExpiredInSeconds'] = @expired_in_seconds
|
119
|
+
@unknown_json_fields.each do |k, v|
|
120
|
+
ret[k] = v
|
121
|
+
end
|
122
|
+
ret
|
123
|
+
end
|
124
|
+
|
125
|
+
# @return [Hash] The complete object as a Ruby hash
|
126
|
+
def to_h
|
127
|
+
to_hash
|
128
|
+
end
|
129
|
+
|
130
|
+
# @return [String] The complete object as a JSON string
|
131
|
+
def to_json(options = {})
|
132
|
+
to_hash.to_json(options)
|
133
|
+
end
|
134
|
+
end
|
135
|
+
end
|
@@ -77,6 +77,9 @@ module Comet
|
|
77
77
|
# @type [Boolean] scheduled_email_thread_last_wake_sent_emails
|
78
78
|
attr_accessor :scheduled_email_thread_last_wake_sent_emails
|
79
79
|
|
80
|
+
# @type [Array<Comet::SelfBackupStatistics>] self_backup
|
81
|
+
attr_accessor :self_backup
|
82
|
+
|
80
83
|
# @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
|
81
84
|
attr_accessor :unknown_json_fields
|
82
85
|
|
@@ -100,6 +103,7 @@ module Comet
|
|
100
103
|
@scheduled_email_thread_last_calculate_duration_nanos = 0
|
101
104
|
@scheduled_email_thread_waiting_until = 0
|
102
105
|
@scheduled_email_thread_last_wake_time = 0
|
106
|
+
@self_backup = []
|
103
107
|
@unknown_json_fields = {}
|
104
108
|
end
|
105
109
|
|
@@ -195,6 +199,16 @@ module Comet
|
|
195
199
|
@scheduled_email_thread_last_wake_time = v
|
196
200
|
when 'ScheduledEmailThreadLastWakeSentEmails'
|
197
201
|
@scheduled_email_thread_last_wake_sent_emails = v
|
202
|
+
when 'SelfBackup'
|
203
|
+
if v.nil?
|
204
|
+
@self_backup = []
|
205
|
+
else
|
206
|
+
@self_backup = Array.new(v.length)
|
207
|
+
v.each_with_index do |v1, i1|
|
208
|
+
@self_backup[i1] = Comet::SelfBackupStatistics.new
|
209
|
+
@self_backup[i1].from_hash(v1)
|
210
|
+
end
|
211
|
+
end
|
198
212
|
else
|
199
213
|
@unknown_json_fields[k] = v
|
200
214
|
end
|
@@ -227,6 +241,7 @@ module Comet
|
|
227
241
|
ret['ScheduledEmailThreadWaitingUntil'] = @scheduled_email_thread_waiting_until
|
228
242
|
ret['ScheduledEmailThreadLastWakeTime'] = @scheduled_email_thread_last_wake_time
|
229
243
|
ret['ScheduledEmailThreadLastWakeSentEmails'] = @scheduled_email_thread_last_wake_sent_emails
|
244
|
+
ret['SelfBackup'] = @self_backup
|
230
245
|
@unknown_json_fields.each do |k, v|
|
231
246
|
ret[k] = v
|
232
247
|
end
|