comet_backup_ruby_sdk 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (130) hide show
  1. checksums.yaml +7 -0
  2. data/.rubocop.yml +25 -0
  3. data/Gemfile +15 -0
  4. data/LICENSE +7 -0
  5. data/README.md +81 -0
  6. data/Rakefile +22 -0
  7. data/comet_backup_ruby_sdk.gemspec +35 -0
  8. data/lib/comet/api_response_error.rb +27 -0
  9. data/lib/comet/comet_server.rb +2926 -0
  10. data/lib/comet/definitions.rb +550 -0
  11. data/lib/comet/models/add_bucket_response_message.rb +92 -0
  12. data/lib/comet/models/admin_account_properties_response.rb +76 -0
  13. data/lib/comet/models/admin_resource_response.rb +84 -0
  14. data/lib/comet/models/admin_security_options.rb +139 -0
  15. data/lib/comet/models/admin_u2fregistration.rb +84 -0
  16. data/lib/comet/models/admin_user_permissions.rb +102 -0
  17. data/lib/comet/models/available_download.rb +84 -0
  18. data/lib/comet/models/azure_destination_location.rb +102 -0
  19. data/lib/comet/models/b2destination_location.rb +110 -0
  20. data/lib/comet/models/b2storage_extra_info.rb +77 -0
  21. data/lib/comet/models/b2transaction_totals.rb +80 -0
  22. data/lib/comet/models/backup_job_advanced_options.rb +98 -0
  23. data/lib/comet/models/backup_job_detail.rb +199 -0
  24. data/lib/comet/models/backup_job_progress.rb +92 -0
  25. data/lib/comet/models/backup_rule_config.rb +188 -0
  26. data/lib/comet/models/backup_rule_event_triggers.rb +78 -0
  27. data/lib/comet/models/branding_options.rb +283 -0
  28. data/lib/comet/models/branding_properties.rb +245 -0
  29. data/lib/comet/models/browse_disk_drives_response.rb +91 -0
  30. data/lib/comet/models/browse_edbresponse.rb +91 -0
  31. data/lib/comet/models/browse_hvresponse.rb +91 -0
  32. data/lib/comet/models/browse_vssresponse.rb +91 -0
  33. data/lib/comet/models/bucket_properties.rb +89 -0
  34. data/lib/comet/models/bucket_usage_info.rb +91 -0
  35. data/lib/comet/models/comet_apiresponse_message.rb +76 -0
  36. data/lib/comet/models/comet_destination_location.rb +86 -0
  37. data/lib/comet/models/constellation_check_report.rb +89 -0
  38. data/lib/comet/models/constellation_stats.rb +86 -0
  39. data/lib/comet/models/constellation_status_apiresponse.rb +109 -0
  40. data/lib/comet/models/content_measurement.rb +89 -0
  41. data/lib/comet/models/content_measurement_component.rb +84 -0
  42. data/lib/comet/models/create_group_policy_response.rb +84 -0
  43. data/lib/comet/models/default_email_report_policy.rb +83 -0
  44. data/lib/comet/models/destination_config.rb +465 -0
  45. data/lib/comet/models/destination_location.rb +365 -0
  46. data/lib/comet/models/destination_statistics.rb +102 -0
  47. data/lib/comet/models/device_config.rb +96 -0
  48. data/lib/comet/models/disk_drive.rb +153 -0
  49. data/lib/comet/models/dispatcher_admin_sources_response.rb +92 -0
  50. data/lib/comet/models/dispatcher_stored_objects_response.rb +91 -0
  51. data/lib/comet/models/dispatcher_vault_snapshots_response.rb +91 -0
  52. data/lib/comet/models/edbfile_info.rb +92 -0
  53. data/lib/comet/models/email_options.rb +140 -0
  54. data/lib/comet/models/email_report_config.rb +90 -0
  55. data/lib/comet/models/email_report_generated_preview.rb +100 -0
  56. data/lib/comet/models/extra_file_exclusion.rb +82 -0
  57. data/lib/comet/models/ftpdestination_location.rb +124 -0
  58. data/lib/comet/models/get_group_policy_response.rb +91 -0
  59. data/lib/comet/models/get_profile_and_hash_response_message.rb +91 -0
  60. data/lib/comet/models/get_profile_hash_response_message.rb +84 -0
  61. data/lib/comet/models/group_policy.rb +83 -0
  62. data/lib/comet/models/hyper_vmachine_info.rb +78 -0
  63. data/lib/comet/models/live_user_connection.rb +125 -0
  64. data/lib/comet/models/local_destination_location.rb +92 -0
  65. data/lib/comet/models/mac_oscode_sign_properties.rb +113 -0
  66. data/lib/comet/models/mongo_dbconnection.rb +211 -0
  67. data/lib/comet/models/new_bucket_detail.rb +78 -0
  68. data/lib/comet/models/news_entry.rb +76 -0
  69. data/lib/comet/models/osinfo.rb +92 -0
  70. data/lib/comet/models/partition.rb +148 -0
  71. data/lib/comet/models/private_branding_properties.rb +185 -0
  72. data/lib/comet/models/protected_item_engine_type_policy.rb +84 -0
  73. data/lib/comet/models/public_branding_properties.rb +122 -0
  74. data/lib/comet/models/remote_server_address.rb +135 -0
  75. data/lib/comet/models/remote_storage_option.rb +147 -0
  76. data/lib/comet/models/replicator_state_apiresponse.rb +138 -0
  77. data/lib/comet/models/request_storage_vault_response_message.rb +84 -0
  78. data/lib/comet/models/restore_job_advanced_options.rb +104 -0
  79. data/lib/comet/models/retention_policy.rb +83 -0
  80. data/lib/comet/models/retention_range.rb +110 -0
  81. data/lib/comet/models/s3destination_location.rb +114 -0
  82. data/lib/comet/models/schedule_config.rb +82 -0
  83. data/lib/comet/models/search_clause.rb +111 -0
  84. data/lib/comet/models/server_config_options_branding_fragment.rb +69 -0
  85. data/lib/comet/models/server_config_options_software_build_role_fragment.rb +69 -0
  86. data/lib/comet/models/server_meta_version_info.rb +208 -0
  87. data/lib/comet/models/session_key_regenerated_response.rb +92 -0
  88. data/lib/comet/models/sftpdestination_location.rb +122 -0
  89. data/lib/comet/models/size_measurement.rb +80 -0
  90. data/lib/comet/models/software_build_role_options.rb +74 -0
  91. data/lib/comet/models/software_update_news_response.rb +102 -0
  92. data/lib/comet/models/source_basic_info.rb +93 -0
  93. data/lib/comet/models/source_config.rb +172 -0
  94. data/lib/comet/models/source_statistics.rb +69 -0
  95. data/lib/comet/models/spanned_destination_location.rb +77 -0
  96. data/lib/comet/models/spanned_storage_extra_info.rb +77 -0
  97. data/lib/comet/models/sshconnection.rb +114 -0
  98. data/lib/comet/models/stat_result.rb +86 -0
  99. data/lib/comet/models/storage_free_space_info.rb +98 -0
  100. data/lib/comet/models/storage_vault_provider_policy.rb +82 -0
  101. data/lib/comet/models/stored_object.rb +130 -0
  102. data/lib/comet/models/streamable_event.rb +74 -0
  103. data/lib/comet/models/swift_destination_location.rb +192 -0
  104. data/lib/comet/models/test_response.rb +82 -0
  105. data/lib/comet/models/totp_regenerated_response.rb +100 -0
  106. data/lib/comet/models/u2fregister_request.rb +78 -0
  107. data/lib/comet/models/u2fregistered_key.rb +86 -0
  108. data/lib/comet/models/u2fregistration_challenge_response.rb +122 -0
  109. data/lib/comet/models/u2fsign_request.rb +101 -0
  110. data/lib/comet/models/u2fsign_response.rb +94 -0
  111. data/lib/comet/models/uninstall_config.rb +74 -0
  112. data/lib/comet/models/update_campaign_device_status.rb +68 -0
  113. data/lib/comet/models/update_campaign_options.rb +86 -0
  114. data/lib/comet/models/update_campaign_properties.rb +100 -0
  115. data/lib/comet/models/update_campaign_status.rb +115 -0
  116. data/lib/comet/models/update_campaign_status_device_entry.rb +84 -0
  117. data/lib/comet/models/user_custom_email_settings.rb +77 -0
  118. data/lib/comet/models/user_on_server.rb +76 -0
  119. data/lib/comet/models/user_policy.rb +304 -0
  120. data/lib/comet/models/user_profile_config.rb +300 -0
  121. data/lib/comet/models/user_profile_fragment.rb +70 -0
  122. data/lib/comet/models/vault_snapshot.rb +84 -0
  123. data/lib/comet/models/vsscomponent.rb +92 -0
  124. data/lib/comet/models/vsswriter_info.rb +85 -0
  125. data/lib/comet/models/web_interface_branding_properties.rb +100 -0
  126. data/lib/comet/models/webhook_option.rb +84 -0
  127. data/lib/comet/models/win_smbauth.rb +92 -0
  128. data/lib/comet/models/windows_code_sign_properties.rb +130 -0
  129. data/lib/comet_backup_ruby_sdk.rb +130 -0
  130. metadata +227 -0
@@ -0,0 +1,78 @@
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
+ # NewBucketDetail is a typed class wrapper around the underlying Comet Server API data structure.
15
+ class NewBucketDetail
16
+
17
+ # @type [String] new_bucket_id
18
+ attr_accessor :new_bucket_id
19
+
20
+ # @type [String] new_bucket_key
21
+ attr_accessor :new_bucket_key
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
+ @unknown_json_fields = {}
28
+ end
29
+
30
+ # @param [String] json_string The complete object in JSON format
31
+ def from_json(json_string)
32
+ raise TypeError 'expected string' unless json_string.is_a? String
33
+
34
+ from_hash(JSON.parse(json_string))
35
+ end
36
+
37
+ # @param [Hash] obj The complete object as a Ruby hash
38
+ def from_hash(obj)
39
+ raise TypeError 'expected hash' unless obj.is_a? Hash
40
+
41
+ obj.each do |k, v|
42
+ case k
43
+ when 'NewBucketID'
44
+ raise TypeError 'expected string' unless v.is_a? String
45
+
46
+ @new_bucket_id = v
47
+ when 'NewBucketKey'
48
+ raise TypeError 'expected string' unless v.is_a? String
49
+
50
+ @new_bucket_key = v
51
+ else
52
+ @unknown_json_fields[k] = v
53
+ end
54
+ end
55
+ end
56
+
57
+ # @return [Hash] The complete object as a Ruby hash
58
+ def to_hash
59
+ ret = {}
60
+ ret['NewBucketID'] = @new_bucket_id
61
+ ret['NewBucketKey'] = @new_bucket_key
62
+ @unknown_json_fields.each do |k, v|
63
+ ret[k] = v
64
+ end
65
+ ret
66
+ end
67
+
68
+ # @return [Hash] The complete object as a Ruby hash
69
+ def to_h
70
+ to_hash
71
+ end
72
+
73
+ # @return [String] The complete object as a JSON string
74
+ def to_json(options = {})
75
+ to_hash.to_json(options)
76
+ end
77
+ end
78
+ end
@@ -0,0 +1,76 @@
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
+ # NewsEntry is a typed class wrapper around the underlying Comet Server API data structure.
15
+ class NewsEntry
16
+
17
+ # @type [Number] date_time
18
+ attr_accessor :date_time
19
+
20
+ # @type [String] text_content
21
+ attr_accessor :text_content
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
+ @unknown_json_fields = {}
28
+ end
29
+
30
+ # @param [String] json_string The complete object in JSON format
31
+ def from_json(json_string)
32
+ raise TypeError 'expected string' unless json_string.is_a? String
33
+
34
+ from_hash(JSON.parse(json_string))
35
+ end
36
+
37
+ # @param [Hash] obj The complete object as a Ruby hash
38
+ def from_hash(obj)
39
+ raise TypeError 'expected hash' unless obj.is_a? Hash
40
+
41
+ obj.each do |k, v|
42
+ case k
43
+ when 'DateTime'
44
+ @date_time = v
45
+ when 'TextContent'
46
+ raise TypeError 'expected string' unless v.is_a? String
47
+
48
+ @text_content = v
49
+ else
50
+ @unknown_json_fields[k] = v
51
+ end
52
+ end
53
+ end
54
+
55
+ # @return [Hash] The complete object as a Ruby hash
56
+ def to_hash
57
+ ret = {}
58
+ ret['DateTime'] = @date_time
59
+ ret['TextContent'] = @text_content
60
+ @unknown_json_fields.each do |k, v|
61
+ ret[k] = v
62
+ end
63
+ ret
64
+ end
65
+
66
+ # @return [Hash] The complete object as a Ruby hash
67
+ def to_h
68
+ to_hash
69
+ end
70
+
71
+ # @return [String] The complete object as a JSON string
72
+ def to_json(options = {})
73
+ to_hash.to_json(options)
74
+ end
75
+ end
76
+ end
@@ -0,0 +1,92 @@
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
+ # OSInfo is a typed class wrapper around the underlying Comet Server API data structure.
15
+ class OSInfo
16
+
17
+ # @type [String] version
18
+ attr_accessor :version
19
+
20
+ # @type [String] distribution
21
+ attr_accessor :distribution
22
+
23
+ # @type [String] build
24
+ attr_accessor :build
25
+
26
+ # @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
27
+ attr_accessor :unknown_json_fields
28
+
29
+ def initialize
30
+ @unknown_json_fields = {}
31
+ end
32
+
33
+ # @param [String] json_string The complete object in JSON format
34
+ def from_json(json_string)
35
+ raise TypeError 'expected string' unless json_string.is_a? String
36
+
37
+ from_hash(JSON.parse(json_string))
38
+ end
39
+
40
+ # @param [Hash] obj The complete object as a Ruby hash
41
+ def from_hash(obj)
42
+ raise TypeError 'expected hash' unless obj.is_a? Hash
43
+
44
+ obj.each do |k, v|
45
+ case k
46
+ when 'version'
47
+ raise TypeError 'expected string' unless v.is_a? String
48
+
49
+ @version = v
50
+ when 'distribution'
51
+ raise TypeError 'expected string' unless v.is_a? String
52
+
53
+ @distribution = v
54
+ when 'build'
55
+ raise TypeError 'expected string' unless v.is_a? String
56
+
57
+ @build = v
58
+ else
59
+ @unknown_json_fields[k] = v
60
+ end
61
+ end
62
+ end
63
+
64
+ # @return [Hash] The complete object as a Ruby hash
65
+ def to_hash
66
+ ret = {}
67
+ unless @version.nil?
68
+ ret['version'] = @version
69
+ end
70
+ unless @distribution.nil?
71
+ ret['distribution'] = @distribution
72
+ end
73
+ unless @build.nil?
74
+ ret['build'] = @build
75
+ end
76
+ @unknown_json_fields.each do |k, v|
77
+ ret[k] = v
78
+ end
79
+ ret
80
+ end
81
+
82
+ # @return [Hash] The complete object as a Ruby hash
83
+ def to_h
84
+ to_hash
85
+ end
86
+
87
+ # @return [String] The complete object as a JSON string
88
+ def to_json(options = {})
89
+ to_hash.to_json(options)
90
+ end
91
+ end
92
+ end
@@ -0,0 +1,148 @@
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
+ # Partition is a typed class wrapper around the underlying Comet Server API data structure.
15
+ class Partition
16
+
17
+ # @type [String] device_name
18
+ attr_accessor :device_name
19
+
20
+ # @type [String] filesystem
21
+ attr_accessor :filesystem
22
+
23
+ # @type [String] volume_name
24
+ attr_accessor :volume_name
25
+
26
+ # @type [String] volume_guid
27
+ attr_accessor :volume_guid
28
+
29
+ # @type [String] volume_serial
30
+ attr_accessor :volume_serial
31
+
32
+ # @type [Array<String>] mount_points
33
+ attr_accessor :mount_points
34
+
35
+ # @type [Number] read_offset
36
+ attr_accessor :read_offset
37
+
38
+ # @type [Number] size
39
+ attr_accessor :size
40
+
41
+ # @type [Number] used_size
42
+ attr_accessor :used_size
43
+
44
+ # @type [Number] flags
45
+ attr_accessor :flags
46
+
47
+ # @type [Number] bytes_per_filesystem_cluster
48
+ attr_accessor :bytes_per_filesystem_cluster
49
+
50
+ # @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
51
+ attr_accessor :unknown_json_fields
52
+
53
+ def initialize
54
+ @mount_points = []
55
+ @unknown_json_fields = {}
56
+ end
57
+
58
+ # @param [String] json_string The complete object in JSON format
59
+ def from_json(json_string)
60
+ raise TypeError 'expected string' unless json_string.is_a? String
61
+
62
+ from_hash(JSON.parse(json_string))
63
+ end
64
+
65
+ # @param [Hash] obj The complete object as a Ruby hash
66
+ def from_hash(obj)
67
+ raise TypeError 'expected hash' unless obj.is_a? Hash
68
+
69
+ obj.each do |k, v|
70
+ case k
71
+ when 'DeviceName'
72
+ raise TypeError 'expected string' unless v.is_a? String
73
+
74
+ @device_name = v
75
+ when 'Filesystem'
76
+ raise TypeError 'expected string' unless v.is_a? String
77
+
78
+ @filesystem = v
79
+ when 'VolumeName'
80
+ raise TypeError 'expected string' unless v.is_a? String
81
+
82
+ @volume_name = v
83
+ when 'VolumeGuid'
84
+ raise TypeError 'expected string' unless v.is_a? String
85
+
86
+ @volume_guid = v
87
+ when 'VolumeSerial'
88
+ raise TypeError 'expected string' unless v.is_a? String
89
+
90
+ @volume_serial = v
91
+ when 'MountPoints'
92
+ if v.nil?
93
+ @mount_points = []
94
+ else
95
+ @mount_points = Array.new(v.length)
96
+ v.each_with_index do |v1, i1|
97
+ raise TypeError 'expected string' unless v1.is_a? String
98
+
99
+ @mount_points[i1] = v1
100
+ end
101
+ end
102
+ when 'ReadOffset'
103
+ @read_offset = v
104
+ when 'Size'
105
+ @size = v
106
+ when 'UsedSize'
107
+ @used_size = v
108
+ when 'Flags'
109
+ @flags = v
110
+ when 'BytesPerFilesystemCluster'
111
+ @bytes_per_filesystem_cluster = v
112
+ else
113
+ @unknown_json_fields[k] = v
114
+ end
115
+ end
116
+ end
117
+
118
+ # @return [Hash] The complete object as a Ruby hash
119
+ def to_hash
120
+ ret = {}
121
+ ret['DeviceName'] = @device_name
122
+ ret['Filesystem'] = @filesystem
123
+ ret['VolumeName'] = @volume_name
124
+ ret['VolumeGuid'] = @volume_guid
125
+ ret['VolumeSerial'] = @volume_serial
126
+ ret['MountPoints'] = @mount_points
127
+ ret['ReadOffset'] = @read_offset
128
+ ret['Size'] = @size
129
+ ret['UsedSize'] = @used_size
130
+ ret['Flags'] = @flags
131
+ ret['BytesPerFilesystemCluster'] = @bytes_per_filesystem_cluster
132
+ @unknown_json_fields.each do |k, v|
133
+ ret[k] = v
134
+ end
135
+ ret
136
+ end
137
+
138
+ # @return [Hash] The complete object as a Ruby hash
139
+ def to_h
140
+ to_hash
141
+ end
142
+
143
+ # @return [String] The complete object as a JSON string
144
+ def to_json(options = {})
145
+ to_hash.to_json(options)
146
+ end
147
+ end
148
+ end
@@ -0,0 +1,185 @@
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
+ # PrivateBrandingProperties is a typed class wrapper around the underlying Comet Server API data structure.
15
+ class PrivateBrandingProperties
16
+
17
+ # @type [String] path_ico_file
18
+ attr_accessor :path_ico_file
19
+
20
+ # @type [String] path_icns_file
21
+ attr_accessor :path_icns_file
22
+
23
+ # @type [String] path_eula_rtf
24
+ attr_accessor :path_eula_rtf
25
+
26
+ # @type [String] path_tile_png
27
+ attr_accessor :path_tile_png
28
+
29
+ # @type [String] path_header_image
30
+ attr_accessor :path_header_image
31
+
32
+ # @type [String] package_identifier
33
+ attr_accessor :package_identifier
34
+
35
+ # @type [String] windows_code_sign_pkcs12file_path
36
+ attr_accessor :windows_code_sign_pkcs12file_path
37
+
38
+ # @type [Number] windows_code_sign_pkcs12password_format
39
+ attr_accessor :windows_code_sign_pkcs12password_format
40
+
41
+ # @type [String] windows_code_sign_pkcs12password
42
+ attr_accessor :windows_code_sign_pkcs12password
43
+
44
+ # @type [String] windows_code_sign_pkcs11engine
45
+ attr_accessor :windows_code_sign_pkcs11engine
46
+
47
+ # @type [String] windows_code_sign_pkcs11module
48
+ attr_accessor :windows_code_sign_pkcs11module
49
+
50
+ # @type [String] windows_code_sign_pkcs11certfile
51
+ attr_accessor :windows_code_sign_pkcs11certfile
52
+
53
+ # @type [String] windows_code_sign_pkcs11key_id
54
+ attr_accessor :windows_code_sign_pkcs11key_id
55
+
56
+ # @type [Number] windows_code_sign_pkcs11password_format
57
+ attr_accessor :windows_code_sign_pkcs11password_format
58
+
59
+ # @type [String] windows_code_sign_pkcs11password
60
+ attr_accessor :windows_code_sign_pkcs11password
61
+
62
+ # @type [Comet::MacOSCodeSignProperties] mac_oscode_sign
63
+ attr_accessor :mac_oscode_sign
64
+
65
+ # @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
66
+ attr_accessor :unknown_json_fields
67
+
68
+ def initialize
69
+ @unknown_json_fields = {}
70
+ end
71
+
72
+ # @param [String] json_string The complete object in JSON format
73
+ def from_json(json_string)
74
+ raise TypeError 'expected string' unless json_string.is_a? String
75
+
76
+ from_hash(JSON.parse(json_string))
77
+ end
78
+
79
+ # @param [Hash] obj The complete object as a Ruby hash
80
+ def from_hash(obj)
81
+ raise TypeError 'expected hash' unless obj.is_a? Hash
82
+
83
+ obj.each do |k, v|
84
+ case k
85
+ when 'PathIcoFile'
86
+ raise TypeError 'expected string' unless v.is_a? String
87
+
88
+ @path_ico_file = v
89
+ when 'PathIcnsFile'
90
+ raise TypeError 'expected string' unless v.is_a? String
91
+
92
+ @path_icns_file = v
93
+ when 'PathEulaRtf'
94
+ raise TypeError 'expected string' unless v.is_a? String
95
+
96
+ @path_eula_rtf = v
97
+ when 'PathTilePng'
98
+ raise TypeError 'expected string' unless v.is_a? String
99
+
100
+ @path_tile_png = v
101
+ when 'PathHeaderImage'
102
+ raise TypeError 'expected string' unless v.is_a? String
103
+
104
+ @path_header_image = v
105
+ when 'PackageIdentifier'
106
+ raise TypeError 'expected string' unless v.is_a? String
107
+
108
+ @package_identifier = v
109
+ when 'WindowsCodeSignPKCS12FilePath'
110
+ raise TypeError 'expected string' unless v.is_a? String
111
+
112
+ @windows_code_sign_pkcs12file_path = v
113
+ when 'WindowsCodeSignPKCS12PasswordFormat'
114
+ @windows_code_sign_pkcs12password_format = v
115
+ when 'WindowsCodeSignPKCS12Password'
116
+ raise TypeError 'expected string' unless v.is_a? String
117
+
118
+ @windows_code_sign_pkcs12password = v
119
+ when 'WindowsCodeSignPKCS11Engine'
120
+ raise TypeError 'expected string' unless v.is_a? String
121
+
122
+ @windows_code_sign_pkcs11engine = v
123
+ when 'WindowsCodeSignPKCS11Module'
124
+ raise TypeError 'expected string' unless v.is_a? String
125
+
126
+ @windows_code_sign_pkcs11module = v
127
+ when 'WindowsCodeSignPKCS11Certfile'
128
+ raise TypeError 'expected string' unless v.is_a? String
129
+
130
+ @windows_code_sign_pkcs11certfile = v
131
+ when 'WindowsCodeSignPKCS11KeyID'
132
+ raise TypeError 'expected string' unless v.is_a? String
133
+
134
+ @windows_code_sign_pkcs11key_id = v
135
+ when 'WindowsCodeSignPKCS11PasswordFormat'
136
+ @windows_code_sign_pkcs11password_format = v
137
+ when 'WindowsCodeSignPKCS11Password'
138
+ raise TypeError 'expected string' unless v.is_a? String
139
+
140
+ @windows_code_sign_pkcs11password = v
141
+ when 'MacOSCodeSign'
142
+ @mac_oscode_sign = Comet::MacOSCodeSignProperties.new
143
+ @mac_oscode_sign.from_hash(v)
144
+ else
145
+ @unknown_json_fields[k] = v
146
+ end
147
+ end
148
+ end
149
+
150
+ # @return [Hash] The complete object as a Ruby hash
151
+ def to_hash
152
+ ret = {}
153
+ ret['PathIcoFile'] = @path_ico_file
154
+ ret['PathIcnsFile'] = @path_icns_file
155
+ ret['PathEulaRtf'] = @path_eula_rtf
156
+ ret['PathTilePng'] = @path_tile_png
157
+ ret['PathHeaderImage'] = @path_header_image
158
+ ret['PackageIdentifier'] = @package_identifier
159
+ ret['WindowsCodeSignPKCS12FilePath'] = @windows_code_sign_pkcs12file_path
160
+ ret['WindowsCodeSignPKCS12PasswordFormat'] = @windows_code_sign_pkcs12password_format
161
+ ret['WindowsCodeSignPKCS12Password'] = @windows_code_sign_pkcs12password
162
+ ret['WindowsCodeSignPKCS11Engine'] = @windows_code_sign_pkcs11engine
163
+ ret['WindowsCodeSignPKCS11Module'] = @windows_code_sign_pkcs11module
164
+ ret['WindowsCodeSignPKCS11Certfile'] = @windows_code_sign_pkcs11certfile
165
+ ret['WindowsCodeSignPKCS11KeyID'] = @windows_code_sign_pkcs11key_id
166
+ ret['WindowsCodeSignPKCS11PasswordFormat'] = @windows_code_sign_pkcs11password_format
167
+ ret['WindowsCodeSignPKCS11Password'] = @windows_code_sign_pkcs11password
168
+ ret['MacOSCodeSign'] = @mac_oscode_sign
169
+ @unknown_json_fields.each do |k, v|
170
+ ret[k] = v
171
+ end
172
+ ret
173
+ end
174
+
175
+ # @return [Hash] The complete object as a Ruby hash
176
+ def to_h
177
+ to_hash
178
+ end
179
+
180
+ # @return [String] The complete object as a JSON string
181
+ def to_json(options = {})
182
+ to_hash.to_json(options)
183
+ end
184
+ end
185
+ end