comet_backup_ruby_sdk 2.8.0 → 2.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +20 -0
- data/Gemfile.lock +1 -1
- data/comet_backup_ruby_sdk.gemspec +1 -1
- data/lib/comet/comet_server.rb +19 -1
- data/lib/comet/definitions.rb +193 -44
- data/lib/comet/models/admin_account_properties_response.rb +1 -0
- data/lib/comet/models/admin_security_options.rb +4 -0
- data/lib/comet/models/admin_u2fregistration.rb +2 -0
- data/lib/comet/models/admin_user_permissions.rb +73 -0
- data/lib/comet/models/admin_web_authn_registration.rb +2 -0
- data/lib/comet/models/allowed_admin_user.rb +4 -0
- data/lib/comet/models/authentication_role_options.rb +2 -0
- data/lib/comet/models/azure_destination_location.rb +2 -0
- data/lib/comet/models/b2destination_location.rb +2 -0
- data/lib/comet/models/backup_job_advanced_options.rb +3 -0
- data/lib/comet/models/backup_job_detail.rb +1 -0
- data/lib/comet/models/backup_job_progress.rb +4 -1
- data/lib/comet/models/backup_rule_config.rb +4 -0
- data/lib/comet/models/branding_options.rb +7 -0
- data/lib/comet/models/branding_properties.rb +5 -0
- data/lib/comet/models/bucket_properties.rb +2 -0
- data/lib/comet/models/comet_destination_location.rb +1 -0
- data/lib/comet/models/constellation_check_report.rb +2 -0
- data/lib/comet/models/constellation_stats.rb +5 -0
- data/lib/comet/models/content_measurement.rb +2 -0
- data/lib/comet/models/content_measurement_component.rb +12 -0
- data/lib/comet/models/default_email_report_policy.rb +4 -0
- data/lib/comet/models/destination_config.rb +35 -1
- data/lib/comet/models/destination_location.rb +33 -1
- data/lib/comet/models/destination_statistics.rb +2 -0
- data/lib/comet/models/device_config.rb +13 -0
- data/lib/comet/models/email_reporting_option.rb +2 -0
- data/lib/comet/models/external_ldapauthentication_source_server.rb +1 -0
- data/lib/comet/models/external_ldapauthentication_source_settings.rb +1 -0
- data/lib/comet/models/file_option.rb +132 -0
- data/lib/comet/models/ftpdestination_location.rb +5 -1
- data/lib/comet/models/install_token.rb +5 -0
- data/lib/comet/models/local_destination_location.rb +5 -0
- data/lib/comet/models/mac_oscode_sign_properties.rb +7 -0
- data/lib/comet/models/mssqlconnection.rb +3 -0
- data/lib/comet/models/mssqllogin_args.rb +2 -0
- data/lib/comet/models/my_sqlconnection.rb +2 -0
- data/lib/comet/models/news_entry.rb +1 -0
- data/lib/comet/models/office_365custom_setting.rb +3 -0
- data/lib/comet/models/office_365custom_setting_v2.rb +9 -0
- data/lib/comet/models/organization.rb +85 -70
- data/lib/comet/models/osinfo.rb +30 -0
- data/lib/comet/models/partition.rb +5 -0
- data/lib/comet/models/private_branding_properties.rb +5 -0
- data/lib/comet/models/psaconfig.rb +4 -0
- data/lib/comet/models/restore_job_advanced_options.rb +17 -0
- data/lib/comet/models/retention_range.rb +8 -0
- data/lib/comet/models/search_clause.rb +16 -0
- data/lib/comet/models/search_result_file_info.rb +39 -17
- data/lib/comet/models/self_backup_export_options.rb +4 -0
- data/lib/comet/models/self_backup_target.rb +5 -0
- data/lib/comet/models/server_config_options.rb +24 -0
- data/lib/comet/models/server_meta_branding_properties.rb +2 -0
- data/lib/comet/models/server_meta_version_info.rb +2 -0
- data/lib/comet/models/session_key_regenerated_response.rb +2 -0
- data/lib/comet/models/session_options.rb +2 -0
- data/lib/comet/models/sftpdestination_location.rb +7 -0
- data/lib/comet/models/single_field_source.rb +1 -0
- data/lib/comet/models/size_measurement.rb +3 -0
- data/lib/comet/models/software_update_news_response.rb +4 -0
- data/lib/comet/models/source_basic_info.rb +3 -0
- data/lib/comet/models/source_config.rb +26 -4
- data/lib/comet/models/source_include_pattern.rb +5 -0
- data/lib/comet/models/spanned_destination_location.rb +11 -0
- data/lib/comet/models/sshconnection.rb +6 -0
- data/lib/comet/models/storage_role_options.rb +1 -0
- data/lib/comet/models/stored_object.rb +7 -0
- data/lib/comet/models/streamable_event.rb +42 -0
- data/lib/comet/models/totp_regenerated_response.rb +3 -0
- data/lib/comet/models/update_campaign_device_status.rb +1 -0
- data/lib/comet/models/update_campaign_properties.rb +1 -0
- data/lib/comet/models/update_campaign_status.rb +1 -0
- data/lib/comet/models/update_campaign_status_device_entry.rb +1 -0
- data/lib/comet/models/user_profile_config.rb +9 -0
- data/lib/comet/models/user_profile_fragment.rb +1 -0
- data/lib/comet/models/vault_snapshot.rb +1 -0
- data/lib/comet/models/vsscomponent.rb +1 -0
- data/lib/comet/models/web_authn_credential.rb +2 -0
- data/lib/comet/models/web_authn_credential_descriptor.rb +1 -0
- data/lib/comet/models/web_authn_public_key_credential_creation_options.rb +1 -0
- data/lib/comet/models/web_authn_public_key_credential_request_options.rb +1 -0
- data/lib/comet/models/web_authn_user_entity.rb +1 -0
- data/lib/comet/models/web_interface_branding_properties.rb +2 -0
- data/lib/comet/models/webhook_option.rb +35 -16
- data/lib/comet/models/windows_code_sign_properties.rb +4 -0
- data/lib/comet_backup_ruby_sdk.rb +1 -0
- metadata +3 -2
@@ -15,6 +15,7 @@ module Comet
|
|
15
15
|
# @type [String] friendly_name
|
16
16
|
attr_accessor :friendly_name
|
17
17
|
|
18
|
+
# Unix timestamp in seconds
|
18
19
|
# @type [Number] registration_time
|
19
20
|
attr_accessor :registration_time
|
20
21
|
|
@@ -31,6 +32,10 @@ module Comet
|
|
31
32
|
# @type [String] device_timezone
|
32
33
|
attr_accessor :device_timezone
|
33
34
|
|
35
|
+
# This field is available in Comet 23.6.0 and later.
|
36
|
+
# @type [String] client_version
|
37
|
+
attr_accessor :client_version
|
38
|
+
|
34
39
|
# @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
|
35
40
|
attr_accessor :unknown_json_fields
|
36
41
|
|
@@ -44,6 +49,7 @@ module Comet
|
|
44
49
|
@platform_version = Comet::OSInfo.new
|
45
50
|
@sources = {}
|
46
51
|
@device_timezone = ''
|
52
|
+
@client_version = ''
|
47
53
|
@unknown_json_fields = {}
|
48
54
|
end
|
49
55
|
|
@@ -85,6 +91,10 @@ module Comet
|
|
85
91
|
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
86
92
|
|
87
93
|
@device_timezone = v
|
94
|
+
when 'ClientVersion'
|
95
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
96
|
+
|
97
|
+
@client_version = v
|
88
98
|
else
|
89
99
|
@unknown_json_fields[k] = v
|
90
100
|
end
|
@@ -107,6 +117,9 @@ module Comet
|
|
107
117
|
unless @device_timezone.nil?
|
108
118
|
ret['DeviceTimezone'] = @device_timezone
|
109
119
|
end
|
120
|
+
unless @client_version.nil?
|
121
|
+
ret['ClientVersion'] = @client_version
|
122
|
+
end
|
110
123
|
@unknown_json_fields.each do |k, v|
|
111
124
|
ret[k] = v
|
112
125
|
end
|
@@ -15,9 +15,11 @@ module Comet
|
|
15
15
|
# @type [Comet::EmailReportConfig] email_report_config
|
16
16
|
attr_accessor :email_report_config
|
17
17
|
|
18
|
+
# A supported language code (e.g. "en_US" or the DEFAULT_LANGUAGE constant)
|
18
19
|
# @type [String] language_code
|
19
20
|
attr_accessor :language_code
|
20
21
|
|
22
|
+
# The timezone in IANA format (e.g. "Pacific/Auckland" or the DEFAULT_TIMEZONE constant)
|
21
23
|
# @type [String] local_timezone
|
22
24
|
attr_accessor :local_timezone
|
23
25
|
|
@@ -0,0 +1,132 @@
|
|
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
|
+
# FileOption is a typed class wrapper around the underlying Comet Server API data structure.
|
13
|
+
# FileOption defines the configuration for Comet Server to log live events to a file. See the SEVT_
|
14
|
+
# constants for more information.
|
15
|
+
# This type is available in Comet 23.3.7 and later.
|
16
|
+
class FileOption
|
17
|
+
|
18
|
+
# The prefix for the log filename. It will be stored in the same file location as the Comet Server
|
19
|
+
# log files
|
20
|
+
# @type [String] filename
|
21
|
+
attr_accessor :filename
|
22
|
+
|
23
|
+
# Configure a subset of allowed event types (see SEVT_ constants). If the array is empty, all events
|
24
|
+
# will be sent
|
25
|
+
# @type [Array<Number>] allow_event_types
|
26
|
+
attr_accessor :allow_event_types
|
27
|
+
|
28
|
+
# One of the STREAM_LEVEL_ constants. This controls how much data is logged into the file
|
29
|
+
# @type [String] level
|
30
|
+
attr_accessor :level
|
31
|
+
|
32
|
+
# Enables pruning of log files
|
33
|
+
# @type [Boolean] pruning_enabled
|
34
|
+
attr_accessor :pruning_enabled
|
35
|
+
|
36
|
+
# Limit in days to keep log files when PruningEnabled is set to true. If not set or 0, uses server's
|
37
|
+
# PruneLogsAfterDays
|
38
|
+
# @type [Number] pruning_limit
|
39
|
+
attr_accessor :pruning_limit
|
40
|
+
|
41
|
+
# @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
|
42
|
+
attr_accessor :unknown_json_fields
|
43
|
+
|
44
|
+
def initialize
|
45
|
+
clear
|
46
|
+
end
|
47
|
+
|
48
|
+
def clear
|
49
|
+
@filename = ''
|
50
|
+
@allow_event_types = []
|
51
|
+
@level = ''
|
52
|
+
@pruning_limit = 0
|
53
|
+
@unknown_json_fields = {}
|
54
|
+
end
|
55
|
+
|
56
|
+
# @param [String] json_string The complete object in JSON format
|
57
|
+
def from_json(json_string)
|
58
|
+
raise TypeError, "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
|
59
|
+
|
60
|
+
from_hash(JSON.parse(json_string))
|
61
|
+
end
|
62
|
+
|
63
|
+
# @param [Hash] obj The complete object as a Ruby hash
|
64
|
+
def from_hash(obj)
|
65
|
+
raise TypeError, "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
|
66
|
+
|
67
|
+
obj.each do |k, v|
|
68
|
+
case k
|
69
|
+
when 'Filename'
|
70
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
71
|
+
|
72
|
+
@filename = v
|
73
|
+
when 'AllowEventTypes'
|
74
|
+
if v.nil?
|
75
|
+
@allow_event_types = []
|
76
|
+
else
|
77
|
+
@allow_event_types = Array.new(v.length)
|
78
|
+
v.each_with_index do |v1, i1|
|
79
|
+
raise TypeError, "'v1' expected Numeric, got #{v1.class}" unless v1.is_a? Numeric
|
80
|
+
|
81
|
+
@allow_event_types[i1] = v1
|
82
|
+
end
|
83
|
+
end
|
84
|
+
when 'Level'
|
85
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
86
|
+
|
87
|
+
@level = v
|
88
|
+
when 'PruningEnabled'
|
89
|
+
@pruning_enabled = v
|
90
|
+
when 'PruningLimit'
|
91
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
92
|
+
|
93
|
+
@pruning_limit = v
|
94
|
+
else
|
95
|
+
@unknown_json_fields[k] = v
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|
99
|
+
|
100
|
+
# @return [Hash] The complete object as a Ruby hash
|
101
|
+
def to_hash
|
102
|
+
ret = {}
|
103
|
+
ret['Filename'] = @filename
|
104
|
+
unless @allow_event_types.nil?
|
105
|
+
ret['AllowEventTypes'] = @allow_event_types
|
106
|
+
end
|
107
|
+
unless @level.nil?
|
108
|
+
ret['Level'] = @level
|
109
|
+
end
|
110
|
+
unless @pruning_enabled.nil?
|
111
|
+
ret['PruningEnabled'] = @pruning_enabled
|
112
|
+
end
|
113
|
+
unless @pruning_limit.nil?
|
114
|
+
ret['PruningLimit'] = @pruning_limit
|
115
|
+
end
|
116
|
+
@unknown_json_fields.each do |k, v|
|
117
|
+
ret[k] = v
|
118
|
+
end
|
119
|
+
ret
|
120
|
+
end
|
121
|
+
|
122
|
+
# @return [Hash] The complete object as a Ruby hash
|
123
|
+
def to_h
|
124
|
+
to_hash
|
125
|
+
end
|
126
|
+
|
127
|
+
# @return [String] The complete object as a JSON string
|
128
|
+
def to_json(options = {})
|
129
|
+
to_hash.to_json(options)
|
130
|
+
end
|
131
|
+
end
|
132
|
+
end
|
@@ -21,19 +21,23 @@ module Comet
|
|
21
21
|
# @type [String] ftppassword
|
22
22
|
attr_accessor :ftppassword
|
23
23
|
|
24
|
+
# If true, store data in the default home directory given by the FTP server. If false, store data in
|
25
|
+
# the FTPCustomBaseDirectory path.
|
24
26
|
# @type [Boolean] ftpbase_use_home_directory
|
25
27
|
attr_accessor :ftpbase_use_home_directory
|
26
28
|
|
29
|
+
# If FTPBaseUseHomeDirectory is false, this field controls the path where data is stored.
|
27
30
|
# @type [String] ftpcustom_base_directory
|
28
31
|
attr_accessor :ftpcustom_base_directory
|
29
32
|
|
30
|
-
#
|
33
|
+
# Control whether this is plaintext FTP or secure FTPS by using one of the FTPS_MODE_ constants.
|
31
34
|
# @type [Number] ftpsmode
|
32
35
|
attr_accessor :ftpsmode
|
33
36
|
|
34
37
|
# @type [Number] ftpport
|
35
38
|
attr_accessor :ftpport
|
36
39
|
|
40
|
+
# If set to zero, uses a system default value that is not unlimited.
|
37
41
|
# @type [Number] ftpmax_connections
|
38
42
|
attr_accessor :ftpmax_connections
|
39
43
|
|
@@ -15,18 +15,23 @@ module Comet
|
|
15
15
|
# @type [String] username
|
16
16
|
attr_accessor :username
|
17
17
|
|
18
|
+
# The URL of the Comet Server (Auth Role) for the target user to log in to.
|
18
19
|
# @type [String] server
|
19
20
|
attr_accessor :server
|
20
21
|
|
22
|
+
# The token for use with the "/TOKEN=" silent install flag.
|
21
23
|
# @type [String] token
|
22
24
|
attr_accessor :token
|
23
25
|
|
26
|
+
# Unix timestamp, in seconds.
|
24
27
|
# @type [Number] create_time
|
25
28
|
attr_accessor :create_time
|
26
29
|
|
30
|
+
# If the token has been used, it cannot be used again.
|
27
31
|
# @type [Boolean] used
|
28
32
|
attr_accessor :used
|
29
33
|
|
34
|
+
# Unix timestamp, in seconds.
|
30
35
|
# @type [Number] expire_time
|
31
36
|
attr_accessor :expire_time
|
32
37
|
|
@@ -15,12 +15,17 @@ module Comet
|
|
15
15
|
# @type [String] localcopy_path
|
16
16
|
attr_accessor :localcopy_path
|
17
17
|
|
18
|
+
# If logging in to a Windows network share (SMB/CIFS) is required, enter the username here.
|
18
19
|
# @type [String] localcopy_win_smbusername
|
19
20
|
attr_accessor :localcopy_win_smbusername
|
20
21
|
|
22
|
+
# If logging in to a Windows network share (SMB/CIFS) is required, enter the password here. The
|
23
|
+
# password may be hashed as per the LocalcopyWinSMBPasswordFormat field.
|
21
24
|
# @type [String] localcopy_win_smbpassword
|
22
25
|
attr_accessor :localcopy_win_smbpassword
|
23
26
|
|
27
|
+
# One of the PASSWORD_FORMAT_ constants. It controls the hash format of the LocalcopyWinSMBPassword
|
28
|
+
# field.
|
24
29
|
# @type [Number] localcopy_win_smbpassword_format
|
25
30
|
attr_accessor :localcopy_win_smbpassword_format
|
26
31
|
|
@@ -12,6 +12,7 @@ module Comet
|
|
12
12
|
# MacOSCodeSignProperties is a typed class wrapper around the underlying Comet Server API data structure.
|
13
13
|
class MacOSCodeSignProperties
|
14
14
|
|
15
|
+
# One of the MACOSCODESIGN_LEVEL_ constants
|
15
16
|
# @type [Number] level
|
16
17
|
attr_accessor :level
|
17
18
|
|
@@ -21,9 +22,13 @@ module Comet
|
|
21
22
|
# @type [Comet::SSHConnection] sshserver
|
22
23
|
attr_accessor :sshserver
|
23
24
|
|
25
|
+
# "Developer ID Installer" certificate, either a local filepath or a resource:// URI. Used for
|
26
|
+
# signing the final flat *.pkg.
|
24
27
|
# @type [String] certificate_name
|
25
28
|
attr_accessor :certificate_name
|
26
29
|
|
30
|
+
# "Developer ID Application" certificate, either a local filepath or a resource:// URI. Used for
|
31
|
+
# signing internal binaries if Notary is enabled
|
27
32
|
# @type [String] app_certificate_name
|
28
33
|
attr_accessor :app_certificate_name
|
29
34
|
|
@@ -33,6 +38,7 @@ module Comet
|
|
33
38
|
# @type [String] apple_idpass
|
34
39
|
attr_accessor :apple_idpass
|
35
40
|
|
41
|
+
# One of the ENCRYPTIONMETHOD_ constants
|
36
42
|
# @type [Number] apple_idpass_format
|
37
43
|
attr_accessor :apple_idpass_format
|
38
44
|
|
@@ -45,6 +51,7 @@ module Comet
|
|
45
51
|
# @type [String] pfx_file_password
|
46
52
|
attr_accessor :pfx_file_password
|
47
53
|
|
54
|
+
# One of the ENCRYPTIONMETHOD_ constants
|
48
55
|
# @type [Number] pfx_file_password_format
|
49
56
|
attr_accessor :pfx_file_password_format
|
50
57
|
|
@@ -12,6 +12,7 @@ module Comet
|
|
12
12
|
# MSSQLConnection is a typed class wrapper around the underlying Comet Server API data structure.
|
13
13
|
class MSSQLConnection
|
14
14
|
|
15
|
+
# One of the MSSQL_AUTH_ constants (e.g. "windows" or "native")
|
15
16
|
# @type [String] type
|
16
17
|
attr_accessor :type
|
17
18
|
|
@@ -22,11 +23,13 @@ module Comet
|
|
22
23
|
attr_accessor :password
|
23
24
|
|
24
25
|
# @type [String] hostname
|
26
|
+
# @deprecated This member has been deprecated since Comet version Unused
|
25
27
|
attr_accessor :hostname
|
26
28
|
|
27
29
|
# @type [String] instance_name
|
28
30
|
attr_accessor :instance_name
|
29
31
|
|
32
|
+
# One of the MSSQL_METHOD_ constants, to control using x86_32 or x86_64 OLEDB drivers
|
30
33
|
# @type [String] method
|
31
34
|
attr_accessor :method
|
32
35
|
|
@@ -27,6 +27,8 @@ module Comet
|
|
27
27
|
# @type [Boolean] method_is_oledb_32bit
|
28
28
|
attr_accessor :method_is_oledb_32bit
|
29
29
|
|
30
|
+
# If this MSSQLLoginArgs structure is used for a restore job (RestoreJobAdvancedOptions) using
|
31
|
+
# RESTORETYPE_MSSQL, then, this field controls the RECOVERY / NO RECOVERY option state.
|
30
32
|
# @type [Boolean] restore_no_recovery
|
31
33
|
attr_accessor :restore_no_recovery
|
32
34
|
|
@@ -10,6 +10,9 @@ require 'json'
|
|
10
10
|
module Comet
|
11
11
|
|
12
12
|
# Office365CustomSetting is a typed class wrapper around the underlying Comet Server API data structure.
|
13
|
+
# Office365CustomSetting is used in the EngineProps for an Office 365 Protected Item (see
|
14
|
+
# ENGINE_BUILTIN_MSOFFICE).
|
15
|
+
# If present, it will be automatically converted to the replacement Office365CustomSettingV2 type.
|
13
16
|
# @deprecated This type has been deprecated since Comet version 21.9.xx
|
14
17
|
class Office365CustomSetting
|
15
18
|
|
@@ -10,14 +10,23 @@ require 'json'
|
|
10
10
|
module Comet
|
11
11
|
|
12
12
|
# Office365CustomSettingV2 is a typed class wrapper around the underlying Comet Server API data structure.
|
13
|
+
# Office365CustomSettingV2 is used in the EngineProps for an Office 365 Protected Item (see
|
14
|
+
# ENGINE_BUILTIN_MSOFFICE).
|
15
|
+
# This type is available in Comet 21.9.xx and later.
|
13
16
|
class Office365CustomSettingV2
|
14
17
|
|
18
|
+
# If true, then backup the entire Office 365 Tenant except the selected members. If false, backup
|
19
|
+
# the selected members only.
|
15
20
|
# @type [Boolean] organization
|
16
21
|
attr_accessor :organization
|
17
22
|
|
23
|
+
# Key can be the ID of user, group or SharePoint
|
24
|
+
# Value is a bitset of the SERVICE_ constants, to select which services to back up for this member.
|
18
25
|
# @type [Hash{String => Number}] backup_options
|
19
26
|
attr_accessor :backup_options
|
20
27
|
|
28
|
+
# Key must be a group ID
|
29
|
+
# Value is a bitset of the SERVICE_ constants, to select which services to back up for this member.
|
21
30
|
# @type [Hash{String => Number}] member_backup_options
|
22
31
|
attr_accessor :member_backup_options
|
23
32
|
|
@@ -12,38 +12,41 @@ module Comet
|
|
12
12
|
# Organization is a typed class wrapper around the underlying Comet Server API data structure.
|
13
13
|
class Organization
|
14
14
|
|
15
|
-
# @type [String]
|
16
|
-
attr_accessor :
|
17
|
-
|
18
|
-
# @type [Array<String>] hosts
|
19
|
-
attr_accessor :hosts
|
20
|
-
|
21
|
-
# @type [Comet::SoftwareBuildRoleOptions] software_build_role
|
22
|
-
attr_accessor :software_build_role
|
15
|
+
# @type [Hash{String => Comet::FileOption}] audit_file_options
|
16
|
+
attr_accessor :audit_file_options
|
23
17
|
|
24
18
|
# @type [Comet::BrandingOptions] branding
|
25
19
|
attr_accessor :branding
|
26
20
|
|
27
|
-
# @type [Array<Comet::RemoteStorageOption>] remote_storage
|
28
|
-
attr_accessor :remote_storage
|
29
|
-
|
30
21
|
# @type [Comet::ConstellationRoleOptions] constellation_role
|
31
22
|
attr_accessor :constellation_role
|
32
23
|
|
33
|
-
# @type [Hash{String => Comet::WebhookOption}] webhook_options
|
34
|
-
attr_accessor :webhook_options
|
35
|
-
|
36
|
-
# @type [Array<Comet::PSAConfig>] psaconfigs
|
37
|
-
attr_accessor :psaconfigs
|
38
|
-
|
39
24
|
# @type [Comet::EmailOptions] email
|
40
25
|
attr_accessor :email
|
41
26
|
|
27
|
+
# @type [Array<String>] experimental_options
|
28
|
+
attr_accessor :experimental_options
|
29
|
+
|
30
|
+
# @type [Array<String>] hosts
|
31
|
+
attr_accessor :hosts
|
32
|
+
|
33
|
+
# @type [String] name
|
34
|
+
attr_accessor :name
|
35
|
+
|
42
36
|
# @type [Boolean] is_suspended
|
43
37
|
attr_accessor :is_suspended
|
44
38
|
|
45
|
-
# @type [Array<
|
46
|
-
attr_accessor :
|
39
|
+
# @type [Array<Comet::PSAConfig>] psaconfigs
|
40
|
+
attr_accessor :psaconfigs
|
41
|
+
|
42
|
+
# @type [Array<Comet::RemoteStorageOption>] remote_storage
|
43
|
+
attr_accessor :remote_storage
|
44
|
+
|
45
|
+
# @type [Comet::SoftwareBuildRoleOptions] software_build_role
|
46
|
+
attr_accessor :software_build_role
|
47
|
+
|
48
|
+
# @type [Hash{String => Comet::WebhookOption}] webhook_options
|
49
|
+
attr_accessor :webhook_options
|
47
50
|
|
48
51
|
# @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
|
49
52
|
attr_accessor :unknown_json_fields
|
@@ -53,16 +56,17 @@ module Comet
|
|
53
56
|
end
|
54
57
|
|
55
58
|
def clear
|
56
|
-
@
|
57
|
-
@hosts = []
|
58
|
-
@software_build_role = Comet::SoftwareBuildRoleOptions.new
|
59
|
+
@audit_file_options = {}
|
59
60
|
@branding = Comet::BrandingOptions.new
|
60
|
-
@remote_storage = []
|
61
61
|
@constellation_role = Comet::ConstellationRoleOptions.new
|
62
|
-
@webhook_options = {}
|
63
|
-
@psaconfigs = []
|
64
62
|
@email = Comet::EmailOptions.new
|
65
63
|
@experimental_options = []
|
64
|
+
@hosts = []
|
65
|
+
@name = ''
|
66
|
+
@psaconfigs = []
|
67
|
+
@remote_storage = []
|
68
|
+
@software_build_role = Comet::SoftwareBuildRoleOptions.new
|
69
|
+
@webhook_options = {}
|
66
70
|
@unknown_json_fields = {}
|
67
71
|
end
|
68
72
|
|
@@ -79,10 +83,36 @@ module Comet
|
|
79
83
|
|
80
84
|
obj.each do |k, v|
|
81
85
|
case k
|
82
|
-
when '
|
83
|
-
|
86
|
+
when 'AuditFileOptions'
|
87
|
+
@audit_file_options = {}
|
88
|
+
if v.nil?
|
89
|
+
@audit_file_options = {}
|
90
|
+
else
|
91
|
+
v.each do |k1, v1|
|
92
|
+
@audit_file_options[k1] = Comet::FileOption.new
|
93
|
+
@audit_file_options[k1].from_hash(v1)
|
94
|
+
end
|
95
|
+
end
|
96
|
+
when 'Branding'
|
97
|
+
@branding = Comet::BrandingOptions.new
|
98
|
+
@branding.from_hash(v)
|
99
|
+
when 'ConstellationRole'
|
100
|
+
@constellation_role = Comet::ConstellationRoleOptions.new
|
101
|
+
@constellation_role.from_hash(v)
|
102
|
+
when 'Email'
|
103
|
+
@email = Comet::EmailOptions.new
|
104
|
+
@email.from_hash(v)
|
105
|
+
when 'ExperimentalOptions'
|
106
|
+
if v.nil?
|
107
|
+
@experimental_options = []
|
108
|
+
else
|
109
|
+
@experimental_options = Array.new(v.length)
|
110
|
+
v.each_with_index do |v1, i1|
|
111
|
+
raise TypeError, "'v1' expected String, got #{v1.class}" unless v1.is_a? String
|
84
112
|
|
85
|
-
|
113
|
+
@experimental_options[i1] = v1
|
114
|
+
end
|
115
|
+
end
|
86
116
|
when 'Hosts'
|
87
117
|
if v.nil?
|
88
118
|
@hosts = []
|
@@ -94,12 +124,22 @@ module Comet
|
|
94
124
|
@hosts[i1] = v1
|
95
125
|
end
|
96
126
|
end
|
97
|
-
when '
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
@
|
127
|
+
when 'Name'
|
128
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
129
|
+
|
130
|
+
@name = v
|
131
|
+
when 'IsSuspended'
|
132
|
+
@is_suspended = v
|
133
|
+
when 'PSAConfigs'
|
134
|
+
if v.nil?
|
135
|
+
@psaconfigs = []
|
136
|
+
else
|
137
|
+
@psaconfigs = Array.new(v.length)
|
138
|
+
v.each_with_index do |v1, i1|
|
139
|
+
@psaconfigs[i1] = Comet::PSAConfig.new
|
140
|
+
@psaconfigs[i1].from_hash(v1)
|
141
|
+
end
|
142
|
+
end
|
103
143
|
when 'RemoteStorage'
|
104
144
|
if v.nil?
|
105
145
|
@remote_storage = []
|
@@ -110,9 +150,9 @@ module Comet
|
|
110
150
|
@remote_storage[i1].from_hash(v1)
|
111
151
|
end
|
112
152
|
end
|
113
|
-
when '
|
114
|
-
@
|
115
|
-
@
|
153
|
+
when 'SoftwareBuildRole'
|
154
|
+
@software_build_role = Comet::SoftwareBuildRoleOptions.new
|
155
|
+
@software_build_role.from_hash(v)
|
116
156
|
when 'WebhookOptions'
|
117
157
|
@webhook_options = {}
|
118
158
|
if v.nil?
|
@@ -123,32 +163,6 @@ module Comet
|
|
123
163
|
@webhook_options[k1].from_hash(v1)
|
124
164
|
end
|
125
165
|
end
|
126
|
-
when 'PSAConfigs'
|
127
|
-
if v.nil?
|
128
|
-
@psaconfigs = []
|
129
|
-
else
|
130
|
-
@psaconfigs = Array.new(v.length)
|
131
|
-
v.each_with_index do |v1, i1|
|
132
|
-
@psaconfigs[i1] = Comet::PSAConfig.new
|
133
|
-
@psaconfigs[i1].from_hash(v1)
|
134
|
-
end
|
135
|
-
end
|
136
|
-
when 'Email'
|
137
|
-
@email = Comet::EmailOptions.new
|
138
|
-
@email.from_hash(v)
|
139
|
-
when 'IsSuspended'
|
140
|
-
@is_suspended = v
|
141
|
-
when 'ExperimentalOptions'
|
142
|
-
if v.nil?
|
143
|
-
@experimental_options = []
|
144
|
-
else
|
145
|
-
@experimental_options = Array.new(v.length)
|
146
|
-
v.each_with_index do |v1, i1|
|
147
|
-
raise TypeError, "'v1' expected String, got #{v1.class}" unless v1.is_a? String
|
148
|
-
|
149
|
-
@experimental_options[i1] = v1
|
150
|
-
end
|
151
|
-
end
|
152
166
|
else
|
153
167
|
@unknown_json_fields[k] = v
|
154
168
|
end
|
@@ -158,19 +172,20 @@ module Comet
|
|
158
172
|
# @return [Hash] The complete object as a Ruby hash
|
159
173
|
def to_hash
|
160
174
|
ret = {}
|
161
|
-
ret['
|
162
|
-
ret['Hosts'] = @hosts
|
163
|
-
ret['SoftwareBuildRole'] = @software_build_role
|
175
|
+
ret['AuditFileOptions'] = @audit_file_options
|
164
176
|
ret['Branding'] = @branding
|
165
|
-
ret['RemoteStorage'] = @remote_storage
|
166
177
|
ret['ConstellationRole'] = @constellation_role
|
167
|
-
ret['WebhookOptions'] = @webhook_options
|
168
|
-
ret['PSAConfigs'] = @psaconfigs
|
169
178
|
ret['Email'] = @email
|
170
|
-
ret['IsSuspended'] = @is_suspended
|
171
179
|
unless @experimental_options.nil?
|
172
180
|
ret['ExperimentalOptions'] = @experimental_options
|
173
181
|
end
|
182
|
+
ret['Hosts'] = @hosts
|
183
|
+
ret['Name'] = @name
|
184
|
+
ret['IsSuspended'] = @is_suspended
|
185
|
+
ret['PSAConfigs'] = @psaconfigs
|
186
|
+
ret['RemoteStorage'] = @remote_storage
|
187
|
+
ret['SoftwareBuildRole'] = @software_build_role
|
188
|
+
ret['WebhookOptions'] = @webhook_options
|
174
189
|
@unknown_json_fields.each do |k, v|
|
175
190
|
ret[k] = v
|
176
191
|
end
|