comet_backup_ruby_sdk 2.40.0 → 2.42.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +11 -0
  3. data/Gemfile.lock +1 -1
  4. data/comet_backup_ruby_sdk.gemspec +1 -1
  5. data/lib/comet/comet_server.rb +264 -6
  6. data/lib/comet/definitions.rb +45 -7
  7. data/lib/comet/models/admin_options.rb +72 -0
  8. data/lib/comet/models/backup_job_detail.rb +12 -0
  9. data/lib/comet/models/block_info.rb +82 -0
  10. data/lib/comet/models/browse_proxmox_nodes_response.rb +99 -0
  11. data/lib/comet/models/browse_proxmox_response.rb +98 -0
  12. data/lib/comet/models/browse_proxmox_storage_response.rb +98 -0
  13. data/lib/comet/models/browse_vmware_datacenters_response.rb +100 -0
  14. data/lib/comet/models/browse_vmware_datastores_response.rb +100 -0
  15. data/lib/comet/models/browse_vmware_hosts_response.rb +100 -0
  16. data/lib/comet/models/browse_vmware_networks_response.rb +100 -0
  17. data/lib/comet/models/browse_vmware_response.rb +2 -0
  18. data/lib/comet/models/disk_drive.rb +16 -0
  19. data/lib/comet/models/dispatcher_list_snapshot_virtual_machines_response.rb +99 -0
  20. data/lib/comet/models/external_authentication_source.rb +3 -3
  21. data/lib/comet/models/hyper_vmachine_info.rb +57 -0
  22. data/lib/comet/models/hyper_vrestore_target_options.rb +73 -0
  23. data/lib/comet/models/office_365custom_setting_v2.rb +64 -6
  24. data/lib/comet/models/office_365mixed_virtual_account.rb +8 -8
  25. data/lib/comet/models/partition.rb +20 -0
  26. data/lib/comet/models/partition_conflict.rb +91 -0
  27. data/lib/comet/models/policy_options.rb +80 -0
  28. data/lib/comet/models/proxmox_connection.rb +72 -0
  29. data/lib/comet/models/proxmox_restore_target_options.rb +92 -0
  30. data/lib/comet/models/pvebackup_disk.rb +86 -0
  31. data/lib/comet/models/pvebackup_node.rb +100 -0
  32. data/lib/comet/models/pvebackup_vm.rb +122 -0
  33. data/lib/comet/models/pvedisk.rb +137 -0
  34. data/lib/comet/models/pveparams.rb +138 -0
  35. data/lib/comet/models/pverestore_selection.rb +94 -0
  36. data/lib/comet/models/pvestorage_name.rb +83 -0
  37. data/lib/comet/models/pvevm.rb +148 -0
  38. data/lib/comet/models/registration_lobby_connection.rb +11 -0
  39. data/lib/comet/models/remote_server_address.rb +3 -3
  40. data/lib/comet/models/remote_storage_option.rb +3 -3
  41. data/lib/comet/models/replica_server.rb +3 -3
  42. data/lib/comet/models/request_storage_vault_response_message.rb +17 -0
  43. data/lib/comet/models/restore_job_advanced_options.rb +35 -0
  44. data/lib/comet/models/retention_range.rb +18 -0
  45. data/lib/comet/models/schedule_config.rb +18 -0
  46. data/lib/comet/models/self_backup_export_options.rb +2 -2
  47. data/lib/comet/models/self_backup_target.rb +2 -2
  48. data/lib/comet/models/user_policy.rb +11 -0
  49. data/lib/comet/models/vmdisk_info.rb +105 -0
  50. data/lib/comet/models/vminfo.rb +137 -0
  51. data/lib/comet/models/vminfo_list.rb +80 -0
  52. data/lib/comet/models/vmware_datacenter_info.rb +74 -0
  53. data/lib/comet/models/vmware_datastore_info.rb +74 -0
  54. data/lib/comet/models/vmware_host_info.rb +74 -0
  55. data/lib/comet/models/vmware_machine_info.rb +1 -0
  56. data/lib/comet/models/vmware_network_info.rb +74 -0
  57. data/lib/comet/models/vmware_restore_target_options.rb +119 -0
  58. data/lib/comet_backup_ruby_sdk.rb +33 -0
  59. metadata +33 -2
@@ -0,0 +1,100 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright (c) 2020-2025 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
+ # BrowseVMwareNetworksResponse is a typed class wrapper around the underlying Comet Server API data structure.
13
+ # BrowseVMwareHostsResponse contains a list of VMware Networks for a specific VMware Datacenter,
14
+ # when remotely browsing a VMware vSphere connection.
15
+ class BrowseVMwareNetworksResponse
16
+
17
+ # If the operation was successful, the status will be in the 200-299 range.
18
+ # @type [Number] status
19
+ attr_accessor :status
20
+
21
+ # @type [String] message
22
+ attr_accessor :message
23
+
24
+ # @type [Array<Comet::VMwareNetworkInfo>] networks
25
+ attr_accessor :networks
26
+
27
+ # @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
28
+ attr_accessor :unknown_json_fields
29
+
30
+ def initialize
31
+ clear
32
+ end
33
+
34
+ def clear
35
+ @status = 0
36
+ @message = ''
37
+ @networks = []
38
+ @unknown_json_fields = {}
39
+ end
40
+
41
+ # @param [String] json_string The complete object in JSON format
42
+ def from_json(json_string)
43
+ raise TypeError, "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
44
+
45
+ from_hash(JSON.parse(json_string))
46
+ end
47
+
48
+ # @param [Hash] obj The complete object as a Ruby hash
49
+ def from_hash(obj)
50
+ raise TypeError, "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
51
+
52
+ obj.each do |k, v|
53
+ case k
54
+ when 'Status'
55
+ raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
56
+
57
+ @status = v
58
+ when 'Message'
59
+ raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
60
+
61
+ @message = v
62
+ when 'Networks'
63
+ if v.nil?
64
+ @networks = []
65
+ else
66
+ @networks = Array.new(v.length)
67
+ v.each_with_index do |v1, i1|
68
+ @networks[i1] = Comet::VMwareNetworkInfo.new
69
+ @networks[i1].from_hash(v1)
70
+ end
71
+ end
72
+ else
73
+ @unknown_json_fields[k] = v
74
+ end
75
+ end
76
+ end
77
+
78
+ # @return [Hash] The complete object as a Ruby hash
79
+ def to_hash
80
+ ret = {}
81
+ ret['Status'] = @status
82
+ ret['Message'] = @message
83
+ ret['Networks'] = @networks
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
@@ -10,6 +10,8 @@ require 'json'
10
10
  module Comet
11
11
 
12
12
  # BrowseVMwareResponse is a typed class wrapper around the underlying Comet Server API data structure.
13
+ # BrowseVMwareResponse contains a list of Virtual Machines when remotely browsing a VMware vSphere
14
+ # connection.
13
15
  class BrowseVMwareResponse
14
16
 
15
17
  # If the operation was successful, the status will be in the 200-299 range.
@@ -59,6 +59,10 @@ module Comet
59
59
  # @type [Number] sector_size
60
60
  attr_accessor :sector_size
61
61
 
62
+ # Used to indicate the partition conflicts on the disk.
63
+ # @type [Array<Comet::PartitionConflict>] partition_conflicts
64
+ attr_accessor :partition_conflicts
65
+
62
66
  # @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
63
67
  attr_accessor :unknown_json_fields
64
68
 
@@ -80,6 +84,7 @@ module Comet
80
84
  @heads = 0
81
85
  @sectors = 0
82
86
  @sector_size = 0
87
+ @partition_conflicts = []
83
88
  @unknown_json_fields = {}
84
89
  end
85
90
 
@@ -161,6 +166,16 @@ module Comet
161
166
  raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
162
167
 
163
168
  @sector_size = v
169
+ when 'PartitionConflicts'
170
+ if v.nil?
171
+ @partition_conflicts = []
172
+ else
173
+ @partition_conflicts = Array.new(v.length)
174
+ v.each_with_index do |v1, i1|
175
+ @partition_conflicts[i1] = Comet::PartitionConflict.new
176
+ @partition_conflicts[i1].from_hash(v1)
177
+ end
178
+ end
164
179
  else
165
180
  @unknown_json_fields[k] = v
166
181
  end
@@ -183,6 +198,7 @@ module Comet
183
198
  ret['Heads'] = @heads
184
199
  ret['Sectors'] = @sectors
185
200
  ret['SectorSize'] = @sector_size
201
+ ret['PartitionConflicts'] = @partition_conflicts
186
202
  @unknown_json_fields.each do |k, v|
187
203
  ret[k] = v
188
204
  end
@@ -0,0 +1,99 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright (c) 2020-2025 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
+ # DispatcherListSnapshotVirtualMachinesResponse is a typed class wrapper around the underlying Comet Server API data structure.
13
+ # This type is available in Comet 24.12.x and later.
14
+ class DispatcherListSnapshotVirtualMachinesResponse
15
+
16
+ # If the operation was successful, the status will be in the 200-299 range.
17
+ # @type [Number] status
18
+ attr_accessor :status
19
+
20
+ # @type [String] message
21
+ attr_accessor :message
22
+
23
+ # @type [Array<Comet::VMInfo>] vms
24
+ attr_accessor :vms
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
+ clear
31
+ end
32
+
33
+ def clear
34
+ @status = 0
35
+ @message = ''
36
+ @vms = []
37
+ @unknown_json_fields = {}
38
+ end
39
+
40
+ # @param [String] json_string The complete object in JSON format
41
+ def from_json(json_string)
42
+ raise TypeError, "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
43
+
44
+ from_hash(JSON.parse(json_string))
45
+ end
46
+
47
+ # @param [Hash] obj The complete object as a Ruby hash
48
+ def from_hash(obj)
49
+ raise TypeError, "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
50
+
51
+ obj.each do |k, v|
52
+ case k
53
+ when 'Status'
54
+ raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
55
+
56
+ @status = v
57
+ when 'Message'
58
+ raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
59
+
60
+ @message = v
61
+ when 'VMs'
62
+ if v.nil?
63
+ @vms = []
64
+ else
65
+ @vms = Array.new(v.length)
66
+ v.each_with_index do |v1, i1|
67
+ @vms[i1] = Comet::VMInfo.new
68
+ @vms[i1].from_hash(v1)
69
+ end
70
+ end
71
+ else
72
+ @unknown_json_fields[k] = v
73
+ end
74
+ end
75
+ end
76
+
77
+ # @return [Hash] The complete object as a Ruby hash
78
+ def to_hash
79
+ ret = {}
80
+ ret['Status'] = @status
81
+ ret['Message'] = @message
82
+ ret['VMs'] = @vms
83
+ @unknown_json_fields.each do |k, v|
84
+ ret[k] = v
85
+ end
86
+ ret
87
+ end
88
+
89
+ # @return [Hash] The complete object as a Ruby hash
90
+ def to_h
91
+ to_hash
92
+ end
93
+
94
+ # @return [String] The complete object as a JSON string
95
+ def to_json(options = {})
96
+ to_hash.to_json(options)
97
+ end
98
+ end
99
+ end
@@ -18,15 +18,15 @@ module Comet
18
18
  # @type [String] description
19
19
  attr_accessor :description
20
20
 
21
- # For use with Comet Server (Storage Role / Auth Role)
21
+ # For use with Comet Server (Storage Gateway / Management Console)
22
22
  # @type [String] remote_address
23
23
  attr_accessor :remote_address
24
24
 
25
- # For use with Comet Server (Storage Role / Auth Role)
25
+ # For use with Comet Server (Storage Gateway / Management Console)
26
26
  # @type [String] username
27
27
  attr_accessor :username
28
28
 
29
- # For use with Comet Server (Storage Role / Auth Role)
29
+ # For use with Comet Server (Storage Gateway / Management Console)
30
30
  # @type [String] password
31
31
  attr_accessor :password
32
32
 
@@ -18,6 +18,26 @@ module Comet
18
18
  # @type [String] display_name
19
19
  attr_accessor :display_name
20
20
 
21
+ # This field is available in Comet 24.12.x and later.
22
+ # @type [Number] memory_limit_mb
23
+ attr_accessor :memory_limit_mb
24
+
25
+ # This field is available in Comet 24.12.x and later.
26
+ # @type [Number] cpucores
27
+ attr_accessor :cpucores
28
+
29
+ # This field is available in Comet 24.12.x and later.
30
+ # @type [Array<String>] hard_drives
31
+ attr_accessor :hard_drives
32
+
33
+ # This field is available in Comet 24.12.x and later.
34
+ # @type [Number] generation
35
+ attr_accessor :generation
36
+
37
+ # This field is available in Comet 24.12.x and later.
38
+ # @type [String] config_file_path
39
+ attr_accessor :config_file_path
40
+
21
41
  # @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
22
42
  attr_accessor :unknown_json_fields
23
43
 
@@ -28,6 +48,11 @@ module Comet
28
48
  def clear
29
49
  @id = ''
30
50
  @display_name = ''
51
+ @memory_limit_mb = 0
52
+ @cpucores = 0
53
+ @hard_drives = []
54
+ @generation = 0
55
+ @config_file_path = ''
31
56
  @unknown_json_fields = {}
32
57
  end
33
58
 
@@ -52,6 +77,33 @@ module Comet
52
77
  raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
53
78
 
54
79
  @display_name = v
80
+ when 'MemoryLimitMB'
81
+ raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
82
+
83
+ @memory_limit_mb = v
84
+ when 'CPUCores'
85
+ raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
86
+
87
+ @cpucores = v
88
+ when 'HardDrives'
89
+ if v.nil?
90
+ @hard_drives = []
91
+ else
92
+ @hard_drives = Array.new(v.length)
93
+ v.each_with_index do |v1, i1|
94
+ raise TypeError, "'v1' expected String, got #{v1.class}" unless v1.is_a? String
95
+
96
+ @hard_drives[i1] = v1
97
+ end
98
+ end
99
+ when 'Generation'
100
+ raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
101
+
102
+ @generation = v
103
+ when 'ConfigFilePath'
104
+ raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
105
+
106
+ @config_file_path = v
55
107
  else
56
108
  @unknown_json_fields[k] = v
57
109
  end
@@ -63,6 +115,11 @@ module Comet
63
115
  ret = {}
64
116
  ret['ID'] = @id
65
117
  ret['Name'] = @display_name
118
+ ret['MemoryLimitMB'] = @memory_limit_mb
119
+ ret['CPUCores'] = @cpucores
120
+ ret['HardDrives'] = @hard_drives
121
+ ret['Generation'] = @generation
122
+ ret['ConfigFilePath'] = @config_file_path
66
123
  @unknown_json_fields.each do |k, v|
67
124
  ret[k] = v
68
125
  end
@@ -0,0 +1,73 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright (c) 2020-2025 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
+ # HyperVRestoreTargetOptions is a typed class wrapper around the underlying Comet Server API data structure.
13
+ class HyperVRestoreTargetOptions
14
+
15
+ # @type [String] disk_storage_path
16
+ attr_accessor :disk_storage_path
17
+
18
+ # @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
19
+ attr_accessor :unknown_json_fields
20
+
21
+ def initialize
22
+ clear
23
+ end
24
+
25
+ def clear
26
+ @disk_storage_path = ''
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, "'json_string' expected String, got #{json_string.class}" 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, "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
40
+
41
+ obj.each do |k, v|
42
+ case k
43
+ when 'DiskStoragePath'
44
+ raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
45
+
46
+ @disk_storage_path = v
47
+ else
48
+ @unknown_json_fields[k] = v
49
+ end
50
+ end
51
+ end
52
+
53
+ # @return [Hash] The complete object as a Ruby hash
54
+ def to_hash
55
+ ret = {}
56
+ ret['DiskStoragePath'] = @disk_storage_path
57
+ @unknown_json_fields.each do |k, v|
58
+ ret[k] = v
59
+ end
60
+ ret
61
+ end
62
+
63
+ # @return [Hash] The complete object as a Ruby hash
64
+ def to_h
65
+ to_hash
66
+ end
67
+
68
+ # @return [String] The complete object as a JSON string
69
+ def to_json(options = {})
70
+ to_hash.to_json(options)
71
+ end
72
+ end
73
+ end
@@ -15,21 +15,39 @@ module Comet
15
15
  # This type is available in Comet 21.9.xx and later.
16
16
  class Office365CustomSettingV2
17
17
 
18
- # If true, then backup the entire Office 365 Tenant except the selected members. If false, backup
19
- # the selected members only.
18
+ # If true, then backup everything except the selected users (group members are still included)
20
19
  # @type [Boolean] organization
20
+ # @deprecated This member has been deprecated since Comet version 24.12.2
21
21
  attr_accessor :organization
22
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.
23
+ # If true, exclude all filtered IDs and Members. Backup everything else
24
+ # @type [Boolean] filter_mode
25
+ attr_accessor :filter_mode
26
+
27
+ # If true, backup everything, ignoring selection and filter options
28
+ # @type [Boolean] whole_org
29
+ attr_accessor :whole_org
30
+
31
+ # Key is the ID of User, Group, or Site
32
+ # Value is a bitset of the SERVICE_ constants, to select which services to backup for accounts
25
33
  # @type [Hash{String => Number}] backup_options
26
34
  attr_accessor :backup_options
27
35
 
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.
36
+ # Key is the ID of a Group or Team Site
37
+ # Value is a bitset of the SERVICE_ constants, to select which services to backup for members
30
38
  # @type [Hash{String => Number}] member_backup_options
31
39
  attr_accessor :member_backup_options
32
40
 
41
+ # Key is the ID of a User, Group, or Site
42
+ # Value is a bitset of the SERVICE_ constants, to select which services to not backup for accounts
43
+ # @type [Hash{String => Number}] filter_options
44
+ attr_accessor :filter_options
45
+
46
+ # Key is the ID of a Group or Team Site
47
+ # Value is a bitset of the SERVICE_ constants, to select which services to not backup for members
48
+ # @type [Hash{String => Number}] filter_member_options
49
+ attr_accessor :filter_member_options
50
+
33
51
  # @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
34
52
  attr_accessor :unknown_json_fields
35
53
 
@@ -40,6 +58,8 @@ module Comet
40
58
  def clear
41
59
  @backup_options = {}
42
60
  @member_backup_options = {}
61
+ @filter_options = {}
62
+ @filter_member_options = {}
43
63
  @unknown_json_fields = {}
44
64
  end
45
65
 
@@ -58,6 +78,10 @@ module Comet
58
78
  case k
59
79
  when 'Organization'
60
80
  @organization = v
81
+ when 'FilterMode'
82
+ @filter_mode = v
83
+ when 'WholeOrg'
84
+ @whole_org = v
61
85
  when 'BackupOptions'
62
86
  @backup_options = {}
63
87
  if v.nil?
@@ -80,6 +104,28 @@ module Comet
80
104
  @member_backup_options[k1] = v1
81
105
  end
82
106
  end
107
+ when 'FilterOptions'
108
+ @filter_options = {}
109
+ if v.nil?
110
+ @filter_options = {}
111
+ else
112
+ v.each do |k1, v1|
113
+ raise TypeError, "'v1' expected Numeric, got #{v1.class}" unless v1.is_a? Numeric
114
+
115
+ @filter_options[k1] = v1
116
+ end
117
+ end
118
+ when 'FilterMemberOptions'
119
+ @filter_member_options = {}
120
+ if v.nil?
121
+ @filter_member_options = {}
122
+ else
123
+ v.each do |k1, v1|
124
+ raise TypeError, "'v1' expected Numeric, got #{v1.class}" unless v1.is_a? Numeric
125
+
126
+ @filter_member_options[k1] = v1
127
+ end
128
+ end
83
129
  else
84
130
  @unknown_json_fields[k] = v
85
131
  end
@@ -90,12 +136,24 @@ module Comet
90
136
  def to_hash
91
137
  ret = {}
92
138
  ret['Organization'] = @organization
139
+ unless @filter_mode.nil?
140
+ ret['FilterMode'] = @filter_mode
141
+ end
142
+ unless @whole_org.nil?
143
+ ret['WholeOrg'] = @whole_org
144
+ end
93
145
  unless @backup_options.nil?
94
146
  ret['BackupOptions'] = @backup_options
95
147
  end
96
148
  unless @member_backup_options.nil?
97
149
  ret['MemberBackupOptions'] = @member_backup_options
98
150
  end
151
+ unless @filter_options.nil?
152
+ ret['FilterOptions'] = @filter_options
153
+ end
154
+ unless @filter_member_options.nil?
155
+ ret['FilterMemberOptions'] = @filter_member_options
156
+ end
99
157
  @unknown_json_fields.each do |k, v|
100
158
  ret[k] = v
101
159
  end
@@ -24,6 +24,9 @@ module Comet
24
24
  # @type [Number] enabled_service_option
25
25
  attr_accessor :enabled_service_option
26
26
 
27
+ # @type [Boolean] has_license
28
+ attr_accessor :has_license
29
+
27
30
  # @type [String] id
28
31
  attr_accessor :id
29
32
 
@@ -57,9 +60,6 @@ module Comet
57
60
  # @type [Number] member_service_options
58
61
  attr_accessor :member_service_options
59
62
 
60
- # @type [Boolean] has_license
61
- attr_accessor :has_license
62
-
63
63
  # @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
64
64
  attr_accessor :unknown_json_fields
65
65
 
@@ -112,6 +112,8 @@ module Comet
112
112
  raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
113
113
 
114
114
  @enabled_service_option = v
115
+ when 'hasLicense'
116
+ @has_license = v
115
117
  when 'id'
116
118
  raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
117
119
 
@@ -163,8 +165,6 @@ module Comet
163
165
  raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
164
166
 
165
167
  @member_service_options = v
166
- when 'hasLicense'
167
- @has_license = v
168
168
  else
169
169
  @unknown_json_fields[k] = v
170
170
  end
@@ -186,6 +186,9 @@ module Comet
186
186
  unless @enabled_service_option.nil?
187
187
  ret['EnabledServiceOption'] = @enabled_service_option
188
188
  end
189
+ unless @has_license.nil?
190
+ ret['hasLicense'] = @has_license
191
+ end
189
192
  ret['id'] = @id
190
193
  unless @job_title.nil?
191
194
  ret['JobTitle'] = @job_title
@@ -217,9 +220,6 @@ module Comet
217
220
  unless @member_service_options.nil?
218
221
  ret['MemberServiceOptions'] = @member_service_options
219
222
  end
220
- unless @has_license.nil?
221
- ret['hasLicense'] = @has_license
222
- end
223
223
  @unknown_json_fields.each do |k, v|
224
224
  ret[k] = v
225
225
  end
@@ -15,6 +15,14 @@ module Comet
15
15
  # @type [String] device_name
16
16
  attr_accessor :device_name
17
17
 
18
+ # The partition's MBR or GPT id, if any
19
+ # @type [String] partition_guid
20
+ attr_accessor :partition_guid
21
+
22
+ # The partition's offset within the physical disk
23
+ # @type [Number] partition_offset
24
+ attr_accessor :partition_offset
25
+
18
26
  # The name of the filesystem used on this partition (e.g. "NTFS")
19
27
  # @type [String] filesystem
20
28
  attr_accessor :filesystem
@@ -59,6 +67,8 @@ module Comet
59
67
 
60
68
  def clear
61
69
  @device_name = ''
70
+ @partition_guid = ''
71
+ @partition_offset = 0
62
72
  @filesystem = ''
63
73
  @volume_name = ''
64
74
  @volume_guid = ''
@@ -89,6 +99,14 @@ module Comet
89
99
  raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
90
100
 
91
101
  @device_name = v
102
+ when 'PartitionGuid'
103
+ raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
104
+
105
+ @partition_guid = v
106
+ when 'PartitionOffset'
107
+ raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
108
+
109
+ @partition_offset = v
92
110
  when 'Filesystem'
93
111
  raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
94
112
 
@@ -146,6 +164,8 @@ module Comet
146
164
  def to_hash
147
165
  ret = {}
148
166
  ret['DeviceName'] = @device_name
167
+ ret['PartitionGuid'] = @partition_guid
168
+ ret['PartitionOffset'] = @partition_offset
149
169
  ret['Filesystem'] = @filesystem
150
170
  ret['VolumeName'] = @volume_name
151
171
  ret['VolumeGuid'] = @volume_guid