oraclebmc 1.1.2 → 1.2.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 (129) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE.txt +2 -2
  3. data/README.md +2 -2
  4. data/lib/oraclebmc/api_client.rb +1 -50
  5. data/lib/oraclebmc/core/compute_client.rb +33 -0
  6. data/lib/oraclebmc/core/core.rb +2 -0
  7. data/lib/oraclebmc/core/models/attach_i_scsi_volume_details.rb +2 -43
  8. data/lib/oraclebmc/core/models/attach_volume_details.rb +2 -43
  9. data/lib/oraclebmc/core/models/capture_console_history_details.rb +2 -43
  10. data/lib/oraclebmc/core/models/console_history.rb +2 -43
  11. data/lib/oraclebmc/core/models/cpe.rb +2 -43
  12. data/lib/oraclebmc/core/models/create_cpe_details.rb +2 -43
  13. data/lib/oraclebmc/core/models/create_dhcp_details.rb +2 -43
  14. data/lib/oraclebmc/core/models/create_drg_attachment_details.rb +2 -43
  15. data/lib/oraclebmc/core/models/create_drg_details.rb +2 -43
  16. data/lib/oraclebmc/core/models/create_image_details.rb +2 -43
  17. data/lib/oraclebmc/core/models/create_internet_gateway_details.rb +2 -43
  18. data/lib/oraclebmc/core/models/create_ip_sec_connection_details.rb +2 -43
  19. data/lib/oraclebmc/core/models/create_route_table_details.rb +2 -43
  20. data/lib/oraclebmc/core/models/create_security_list_details.rb +2 -43
  21. data/lib/oraclebmc/core/models/create_subnet_details.rb +28 -44
  22. data/lib/oraclebmc/core/models/create_vcn_details.rb +33 -47
  23. data/lib/oraclebmc/core/models/create_volume_backup_details.rb +2 -43
  24. data/lib/oraclebmc/core/models/create_volume_details.rb +2 -43
  25. data/lib/oraclebmc/core/models/dhcp_dns_option.rb +16 -49
  26. data/lib/oraclebmc/core/models/dhcp_option.rb +7 -43
  27. data/lib/oraclebmc/core/models/dhcp_options.rb +2 -43
  28. data/lib/oraclebmc/core/models/dhcp_search_domain_option.rb +143 -0
  29. data/lib/oraclebmc/core/models/drg.rb +2 -43
  30. data/lib/oraclebmc/core/models/drg_attachment.rb +2 -43
  31. data/lib/oraclebmc/core/models/egress_security_rule.rb +2 -43
  32. data/lib/oraclebmc/core/models/i_scsi_volume_attachment.rb +2 -43
  33. data/lib/oraclebmc/core/models/icmp_options.rb +2 -43
  34. data/lib/oraclebmc/core/models/image.rb +2 -43
  35. data/lib/oraclebmc/core/models/ingress_security_rule.rb +2 -43
  36. data/lib/oraclebmc/core/models/instance.rb +7 -43
  37. data/lib/oraclebmc/core/models/instance_credentials.rb +132 -0
  38. data/lib/oraclebmc/core/models/internet_gateway.rb +2 -43
  39. data/lib/oraclebmc/core/models/ip_sec_connection.rb +2 -43
  40. data/lib/oraclebmc/core/models/ip_sec_connection_device_config.rb +2 -43
  41. data/lib/oraclebmc/core/models/ip_sec_connection_device_status.rb +2 -43
  42. data/lib/oraclebmc/core/models/launch_instance_details.rb +32 -44
  43. data/lib/oraclebmc/core/models/port_range.rb +2 -43
  44. data/lib/oraclebmc/core/models/route_rule.rb +2 -43
  45. data/lib/oraclebmc/core/models/route_table.rb +2 -43
  46. data/lib/oraclebmc/core/models/security_list.rb +2 -43
  47. data/lib/oraclebmc/core/models/shape.rb +2 -43
  48. data/lib/oraclebmc/core/models/subnet.rb +45 -44
  49. data/lib/oraclebmc/core/models/tcp_options.rb +2 -43
  50. data/lib/oraclebmc/core/models/tunnel_config.rb +2 -43
  51. data/lib/oraclebmc/core/models/tunnel_status.rb +2 -43
  52. data/lib/oraclebmc/core/models/udp_options.rb +2 -43
  53. data/lib/oraclebmc/core/models/update_cpe_details.rb +2 -43
  54. data/lib/oraclebmc/core/models/update_dhcp_details.rb +2 -43
  55. data/lib/oraclebmc/core/models/update_drg_attachment_details.rb +2 -43
  56. data/lib/oraclebmc/core/models/update_drg_details.rb +2 -43
  57. data/lib/oraclebmc/core/models/update_image_details.rb +2 -43
  58. data/lib/oraclebmc/core/models/update_instance_details.rb +2 -43
  59. data/lib/oraclebmc/core/models/update_internet_gateway_details.rb +2 -43
  60. data/lib/oraclebmc/core/models/update_ip_sec_connection_details.rb +2 -43
  61. data/lib/oraclebmc/core/models/update_route_table_details.rb +2 -43
  62. data/lib/oraclebmc/core/models/update_security_list_details.rb +2 -43
  63. data/lib/oraclebmc/core/models/update_subnet_details.rb +2 -43
  64. data/lib/oraclebmc/core/models/update_vcn_details.rb +2 -43
  65. data/lib/oraclebmc/core/models/update_volume_backup_details.rb +2 -43
  66. data/lib/oraclebmc/core/models/update_volume_details.rb +2 -43
  67. data/lib/oraclebmc/core/models/vcn.rb +48 -47
  68. data/lib/oraclebmc/core/models/vnic.rb +30 -47
  69. data/lib/oraclebmc/core/models/vnic_attachment.rb +2 -43
  70. data/lib/oraclebmc/core/models/volume.rb +2 -43
  71. data/lib/oraclebmc/core/models/volume_attachment.rb +2 -43
  72. data/lib/oraclebmc/core/models/volume_backup.rb +2 -43
  73. data/lib/oraclebmc/core/virtual_network_client.rb +10 -4
  74. data/lib/oraclebmc/identity/models/add_user_to_group_details.rb +2 -43
  75. data/lib/oraclebmc/identity/models/api_key.rb +2 -43
  76. data/lib/oraclebmc/identity/models/availability_domain.rb +2 -43
  77. data/lib/oraclebmc/identity/models/compartment.rb +2 -43
  78. data/lib/oraclebmc/identity/models/create_api_key_details.rb +2 -43
  79. data/lib/oraclebmc/identity/models/create_compartment_details.rb +2 -43
  80. data/lib/oraclebmc/identity/models/create_group_details.rb +2 -43
  81. data/lib/oraclebmc/identity/models/create_policy_details.rb +2 -43
  82. data/lib/oraclebmc/identity/models/create_swift_password_details.rb +2 -43
  83. data/lib/oraclebmc/identity/models/create_user_details.rb +2 -43
  84. data/lib/oraclebmc/identity/models/group.rb +2 -43
  85. data/lib/oraclebmc/identity/models/policy.rb +2 -43
  86. data/lib/oraclebmc/identity/models/swift_password.rb +2 -43
  87. data/lib/oraclebmc/identity/models/ui_password.rb +2 -43
  88. data/lib/oraclebmc/identity/models/update_compartment_details.rb +2 -43
  89. data/lib/oraclebmc/identity/models/update_group_details.rb +2 -43
  90. data/lib/oraclebmc/identity/models/update_policy_details.rb +2 -43
  91. data/lib/oraclebmc/identity/models/update_state_details.rb +2 -43
  92. data/lib/oraclebmc/identity/models/update_swift_password_details.rb +2 -43
  93. data/lib/oraclebmc/identity/models/update_user_details.rb +2 -43
  94. data/lib/oraclebmc/identity/models/user.rb +2 -43
  95. data/lib/oraclebmc/identity/models/user_group_membership.rb +2 -43
  96. data/lib/oraclebmc/internal/internal.rb +11 -0
  97. data/lib/oraclebmc/internal/util.rb +69 -0
  98. data/lib/oraclebmc/load_balancer/models/backend.rb +2 -43
  99. data/lib/oraclebmc/load_balancer/models/backend_details.rb +2 -43
  100. data/lib/oraclebmc/load_balancer/models/backend_set.rb +2 -43
  101. data/lib/oraclebmc/load_balancer/models/backend_set_details.rb +2 -43
  102. data/lib/oraclebmc/load_balancer/models/certificate.rb +2 -43
  103. data/lib/oraclebmc/load_balancer/models/certificate_details.rb +2 -43
  104. data/lib/oraclebmc/load_balancer/models/create_backend_details.rb +2 -43
  105. data/lib/oraclebmc/load_balancer/models/create_backend_set_details.rb +2 -43
  106. data/lib/oraclebmc/load_balancer/models/create_certificate_details.rb +2 -43
  107. data/lib/oraclebmc/load_balancer/models/create_listener_details.rb +2 -43
  108. data/lib/oraclebmc/load_balancer/models/create_load_balancer_details.rb +2 -43
  109. data/lib/oraclebmc/load_balancer/models/health_checker.rb +2 -43
  110. data/lib/oraclebmc/load_balancer/models/health_checker_details.rb +2 -43
  111. data/lib/oraclebmc/load_balancer/models/ip_address.rb +2 -43
  112. data/lib/oraclebmc/load_balancer/models/listener.rb +2 -43
  113. data/lib/oraclebmc/load_balancer/models/listener_details.rb +2 -43
  114. data/lib/oraclebmc/load_balancer/models/load_balancer.rb +2 -43
  115. data/lib/oraclebmc/load_balancer/models/load_balancer_policy.rb +2 -43
  116. data/lib/oraclebmc/load_balancer/models/load_balancer_protocol.rb +2 -43
  117. data/lib/oraclebmc/load_balancer/models/load_balancer_shape.rb +2 -43
  118. data/lib/oraclebmc/load_balancer/models/ssl_configuration.rb +2 -43
  119. data/lib/oraclebmc/load_balancer/models/ssl_configuration_details.rb +2 -43
  120. data/lib/oraclebmc/load_balancer/models/update_backend_details.rb +2 -43
  121. data/lib/oraclebmc/load_balancer/models/update_backend_set_details.rb +2 -43
  122. data/lib/oraclebmc/load_balancer/models/update_health_checker_details.rb +2 -43
  123. data/lib/oraclebmc/load_balancer/models/update_listener_details.rb +2 -43
  124. data/lib/oraclebmc/load_balancer/models/update_load_balancer_details.rb +2 -43
  125. data/lib/oraclebmc/load_balancer/models/work_request.rb +2 -43
  126. data/lib/oraclebmc/load_balancer/models/work_request_error.rb +2 -43
  127. data/lib/oraclebmc/version.rb +1 -1
  128. data/lib/oraclebmc.rb +1 -0
  129. metadata +6 -2
@@ -22,6 +22,24 @@ module OracleBMC
22
22
  # @return [String]
23
23
  attr_accessor :display_name
24
24
 
25
+ # The hostname for the VNIC that is created during instance launch.
26
+ # Used for DNS. The value is the hostname portion of the instance's
27
+ # fully qualified domain name (FQDN) (e.g., `bminstance-1` in FQDN
28
+ # `bminstance-1.subnet123.vcn1.oraclevcn.com`).
29
+ # Must be unique across all VNICs in the subnet and comply with
30
+ # [RFC 952](https://tools.ietf.org/html/rfc952) and
31
+ # [RFC 1123](https://tools.ietf.org/html/rfc1123).
32
+ # The value cannot be changed, and it can be retrieved from the
33
+ # {Vnic}.
34
+ #
35
+ # For more information, see
36
+ # [DNS in Your Virtual Cloud Network](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/dns.htm).
37
+ #
38
+ # Example: `bminstance-1`
39
+ #
40
+ # @return [String]
41
+ attr_accessor :hostname_label
42
+
25
43
  # The OCID of the image used to boot the instance.
26
44
  # @return [String]
27
45
  attr_accessor :image_id
@@ -45,6 +63,10 @@ module OracleBMC
45
63
  # following iSCSI IP address: 169.254.0.2, and boot volume IQN:
46
64
  # iqn.2015-02.oracle.boot.
47
65
  #
66
+ # For more information about the Bring Your Own Image feature of
67
+ # Oracle Bare Metal Cloud Services, see
68
+ # [Bring Your Own Image](https://docs.us-phoenix-1.oraclecloud.com/Content/Compute/References/bringyourownimage.htm).
69
+ #
48
70
  # For more information about iPXE, see http://ipxe.org.
49
71
  #
50
72
  # @return [String]
@@ -146,6 +168,10 @@ module OracleBMC
146
168
  self.display_name = attributes[:'displayName']
147
169
  end
148
170
 
171
+ if attributes[:'hostnameLabel']
172
+ self.hostname_label = attributes[:'hostnameLabel']
173
+ end
174
+
149
175
  if attributes[:'imageId']
150
176
  self.image_id = attributes[:'imageId']
151
177
  end
@@ -176,6 +202,7 @@ module OracleBMC
176
202
  availability_domain == other_object.availability_domain &&
177
203
  compartment_id == other_object.compartment_id &&
178
204
  display_name == other_object.display_name &&
205
+ hostname_label == other_object.hostname_label &&
179
206
  image_id == other_object.image_id &&
180
207
  ipxe_script == other_object.ipxe_script &&
181
208
  metadata == other_object.metadata &&
@@ -192,7 +219,7 @@ module OracleBMC
192
219
  # Calculates hash code according to all attributes.
193
220
  # @return [Fixnum] Hash code
194
221
  def hash
195
- [availability_domain, compartment_id, display_name, image_id, ipxe_script, metadata, shape, subnet_id].hash
222
+ [availability_domain, compartment_id, display_name, hostname_label, image_id, ipxe_script, metadata, shape, subnet_id].hash
196
223
  end
197
224
 
198
225
  # Builds the object from hash
@@ -205,10 +232,10 @@ module OracleBMC
205
232
  # check to ensure the input is an array given that the the attribute
206
233
  # is documented as an array but the input is not
207
234
  if attributes[self.class.attribute_map[key]].is_a?(Array)
208
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
235
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OracleBMC::Internal::Util.convert_to_type($1, v) } )
209
236
  end
210
237
  elsif !attributes[self.class.attribute_map[key]].nil?
211
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
238
+ self.send("#{key}=", OracleBMC::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
212
239
  end # or else data not found in attributes(hash), not an issue as the data can be optional
213
240
  end
214
241
 
@@ -253,47 +280,6 @@ module OracleBMC
253
280
  end
254
281
  end
255
282
 
256
- # Deserializes the data based on type
257
- # @param [String] type Data type
258
- # @param [String] value Value to be deserialized
259
- # @return [Object] Deserialized data
260
- def _deserialize(type, value)
261
- case type.to_sym
262
- when :DateTime
263
- DateTime.parse(value)
264
- when :Date
265
- Date.parse(value)
266
- when :String
267
- value.to_s
268
- when :Integer
269
- value.to_i
270
- when :Float
271
- value.to_f
272
- when :BOOLEAN
273
- if value.to_s =~ /^(true|t|yes|y|1)$/i
274
- true
275
- else
276
- false
277
- end
278
- when :Object
279
- # generic object (usually a Hash), return directly
280
- value
281
- when /\AArray<(?<inner_type>.+)>\z/
282
- inner_type = Regexp.last_match[:inner_type]
283
- value.map { |v| _deserialize(inner_type, v) }
284
- when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
285
- k_type = Regexp.last_match[:k_type]
286
- v_type = Regexp.last_match[:v_type]
287
- {}.tap do |hash|
288
- value.each do |k, v|
289
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
290
- end
291
- end
292
- else # model
293
- temp_model = OracleBMC.const_get(type.to_s).new
294
- temp_model.build_from_hash(value)
295
- end
296
- end
297
283
 
298
284
 
299
285
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -302,6 +288,7 @@ module OracleBMC
302
288
  :'availability_domain' => :'availabilityDomain',
303
289
  :'compartment_id' => :'compartmentId',
304
290
  :'display_name' => :'displayName',
291
+ :'hostname_label' => :'hostnameLabel',
305
292
  :'image_id' => :'imageId',
306
293
  :'ipxe_script' => :'ipxeScript',
307
294
  :'metadata' => :'metadata',
@@ -316,6 +303,7 @@ module OracleBMC
316
303
  :'availability_domain' => :'String',
317
304
  :'compartment_id' => :'String',
318
305
  :'display_name' => :'String',
306
+ :'hostname_label' => :'String',
319
307
  :'image_id' => :'String',
320
308
  :'ipxe_script' => :'String',
321
309
  :'metadata' => :'Hash<String, String>',
@@ -65,10 +65,10 @@ module OracleBMC
65
65
  # check to ensure the input is an array given that the the attribute
66
66
  # is documented as an array but the input is not
67
67
  if attributes[self.class.attribute_map[key]].is_a?(Array)
68
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
68
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OracleBMC::Internal::Util.convert_to_type($1, v) } )
69
69
  end
70
70
  elsif !attributes[self.class.attribute_map[key]].nil?
71
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
71
+ self.send("#{key}=", OracleBMC::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
72
72
  end # or else data not found in attributes(hash), not an issue as the data can be optional
73
73
  end
74
74
 
@@ -113,47 +113,6 @@ module OracleBMC
113
113
  end
114
114
  end
115
115
 
116
- # Deserializes the data based on type
117
- # @param [String] type Data type
118
- # @param [String] value Value to be deserialized
119
- # @return [Object] Deserialized data
120
- def _deserialize(type, value)
121
- case type.to_sym
122
- when :DateTime
123
- DateTime.parse(value)
124
- when :Date
125
- Date.parse(value)
126
- when :String
127
- value.to_s
128
- when :Integer
129
- value.to_i
130
- when :Float
131
- value.to_f
132
- when :BOOLEAN
133
- if value.to_s =~ /^(true|t|yes|y|1)$/i
134
- true
135
- else
136
- false
137
- end
138
- when :Object
139
- # generic object (usually a Hash), return directly
140
- value
141
- when /\AArray<(?<inner_type>.+)>\z/
142
- inner_type = Regexp.last_match[:inner_type]
143
- value.map { |v| _deserialize(inner_type, v) }
144
- when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
145
- k_type = Regexp.last_match[:k_type]
146
- v_type = Regexp.last_match[:v_type]
147
- {}.tap do |hash|
148
- value.each do |k, v|
149
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
150
- end
151
- end
152
- else # model
153
- temp_model = OracleBMC.const_get(type.to_s).new
154
- temp_model.build_from_hash(value)
155
- end
156
- end
157
116
 
158
117
 
159
118
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -67,10 +67,10 @@ module OracleBMC
67
67
  # check to ensure the input is an array given that the the attribute
68
68
  # is documented as an array but the input is not
69
69
  if attributes[self.class.attribute_map[key]].is_a?(Array)
70
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
70
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OracleBMC::Internal::Util.convert_to_type($1, v) } )
71
71
  end
72
72
  elsif !attributes[self.class.attribute_map[key]].nil?
73
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
73
+ self.send("#{key}=", OracleBMC::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
74
74
  end # or else data not found in attributes(hash), not an issue as the data can be optional
75
75
  end
76
76
 
@@ -115,47 +115,6 @@ module OracleBMC
115
115
  end
116
116
  end
117
117
 
118
- # Deserializes the data based on type
119
- # @param [String] type Data type
120
- # @param [String] value Value to be deserialized
121
- # @return [Object] Deserialized data
122
- def _deserialize(type, value)
123
- case type.to_sym
124
- when :DateTime
125
- DateTime.parse(value)
126
- when :Date
127
- Date.parse(value)
128
- when :String
129
- value.to_s
130
- when :Integer
131
- value.to_i
132
- when :Float
133
- value.to_f
134
- when :BOOLEAN
135
- if value.to_s =~ /^(true|t|yes|y|1)$/i
136
- true
137
- else
138
- false
139
- end
140
- when :Object
141
- # generic object (usually a Hash), return directly
142
- value
143
- when /\AArray<(?<inner_type>.+)>\z/
144
- inner_type = Regexp.last_match[:inner_type]
145
- value.map { |v| _deserialize(inner_type, v) }
146
- when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
147
- k_type = Regexp.last_match[:k_type]
148
- v_type = Regexp.last_match[:v_type]
149
- {}.tap do |hash|
150
- value.each do |k, v|
151
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
152
- end
153
- end
154
- else # model
155
- temp_model = OracleBMC.const_get(type.to_s).new
156
- temp_model.build_from_hash(value)
157
- end
158
- end
159
118
 
160
119
 
161
120
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -126,10 +126,10 @@ module OracleBMC
126
126
  # check to ensure the input is an array given that the the attribute
127
127
  # is documented as an array but the input is not
128
128
  if attributes[self.class.attribute_map[key]].is_a?(Array)
129
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
129
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OracleBMC::Internal::Util.convert_to_type($1, v) } )
130
130
  end
131
131
  elsif !attributes[self.class.attribute_map[key]].nil?
132
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
132
+ self.send("#{key}=", OracleBMC::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
133
133
  end # or else data not found in attributes(hash), not an issue as the data can be optional
134
134
  end
135
135
 
@@ -174,47 +174,6 @@ module OracleBMC
174
174
  end
175
175
  end
176
176
 
177
- # Deserializes the data based on type
178
- # @param [String] type Data type
179
- # @param [String] value Value to be deserialized
180
- # @return [Object] Deserialized data
181
- def _deserialize(type, value)
182
- case type.to_sym
183
- when :DateTime
184
- DateTime.parse(value)
185
- when :Date
186
- Date.parse(value)
187
- when :String
188
- value.to_s
189
- when :Integer
190
- value.to_i
191
- when :Float
192
- value.to_f
193
- when :BOOLEAN
194
- if value.to_s =~ /^(true|t|yes|y|1)$/i
195
- true
196
- else
197
- false
198
- end
199
- when :Object
200
- # generic object (usually a Hash), return directly
201
- value
202
- when /\AArray<(?<inner_type>.+)>\z/
203
- inner_type = Regexp.last_match[:inner_type]
204
- value.map { |v| _deserialize(inner_type, v) }
205
- when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
206
- k_type = Regexp.last_match[:k_type]
207
- v_type = Regexp.last_match[:v_type]
208
- {}.tap do |hash|
209
- value.each do |k, v|
210
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
211
- end
212
- end
213
- else # model
214
- temp_model = OracleBMC.const_get(type.to_s).new
215
- temp_model.build_from_hash(value)
216
- end
217
- end
218
177
 
219
178
 
220
179
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -135,10 +135,10 @@ module OracleBMC
135
135
  # check to ensure the input is an array given that the the attribute
136
136
  # is documented as an array but the input is not
137
137
  if attributes[self.class.attribute_map[key]].is_a?(Array)
138
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
138
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OracleBMC::Internal::Util.convert_to_type($1, v) } )
139
139
  end
140
140
  elsif !attributes[self.class.attribute_map[key]].nil?
141
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
141
+ self.send("#{key}=", OracleBMC::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
142
142
  end # or else data not found in attributes(hash), not an issue as the data can be optional
143
143
  end
144
144
 
@@ -183,47 +183,6 @@ module OracleBMC
183
183
  end
184
184
  end
185
185
 
186
- # Deserializes the data based on type
187
- # @param [String] type Data type
188
- # @param [String] value Value to be deserialized
189
- # @return [Object] Deserialized data
190
- def _deserialize(type, value)
191
- case type.to_sym
192
- when :DateTime
193
- DateTime.parse(value)
194
- when :Date
195
- Date.parse(value)
196
- when :String
197
- value.to_s
198
- when :Integer
199
- value.to_i
200
- when :Float
201
- value.to_f
202
- when :BOOLEAN
203
- if value.to_s =~ /^(true|t|yes|y|1)$/i
204
- true
205
- else
206
- false
207
- end
208
- when :Object
209
- # generic object (usually a Hash), return directly
210
- value
211
- when /\AArray<(?<inner_type>.+)>\z/
212
- inner_type = Regexp.last_match[:inner_type]
213
- value.map { |v| _deserialize(inner_type, v) }
214
- when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
215
- k_type = Regexp.last_match[:k_type]
216
- v_type = Regexp.last_match[:v_type]
217
- {}.tap do |hash|
218
- value.each do |k, v|
219
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
220
- end
221
- end
222
- else # model
223
- temp_model = OracleBMC.const_get(type.to_s).new
224
- temp_model.build_from_hash(value)
225
- end
226
- end
227
186
 
228
187
 
229
188
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -56,10 +56,10 @@ module OracleBMC
56
56
  # check to ensure the input is an array given that the the attribute
57
57
  # is documented as an array but the input is not
58
58
  if attributes[self.class.attribute_map[key]].is_a?(Array)
59
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
59
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OracleBMC::Internal::Util.convert_to_type($1, v) } )
60
60
  end
61
61
  elsif !attributes[self.class.attribute_map[key]].nil?
62
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
62
+ self.send("#{key}=", OracleBMC::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
63
63
  end # or else data not found in attributes(hash), not an issue as the data can be optional
64
64
  end
65
65
 
@@ -104,47 +104,6 @@ module OracleBMC
104
104
  end
105
105
  end
106
106
 
107
- # Deserializes the data based on type
108
- # @param [String] type Data type
109
- # @param [String] value Value to be deserialized
110
- # @return [Object] Deserialized data
111
- def _deserialize(type, value)
112
- case type.to_sym
113
- when :DateTime
114
- DateTime.parse(value)
115
- when :Date
116
- Date.parse(value)
117
- when :String
118
- value.to_s
119
- when :Integer
120
- value.to_i
121
- when :Float
122
- value.to_f
123
- when :BOOLEAN
124
- if value.to_s =~ /^(true|t|yes|y|1)$/i
125
- true
126
- else
127
- false
128
- end
129
- when :Object
130
- # generic object (usually a Hash), return directly
131
- value
132
- when /\AArray<(?<inner_type>.+)>\z/
133
- inner_type = Regexp.last_match[:inner_type]
134
- value.map { |v| _deserialize(inner_type, v) }
135
- when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
136
- k_type = Regexp.last_match[:k_type]
137
- v_type = Regexp.last_match[:v_type]
138
- {}.tap do |hash|
139
- value.each do |k, v|
140
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
141
- end
142
- end
143
- else # model
144
- temp_model = OracleBMC.const_get(type.to_s).new
145
- temp_model.build_from_hash(value)
146
- end
147
- end
148
107
 
149
108
 
150
109
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -37,6 +37,23 @@ module OracleBMC
37
37
  # @return [String]
38
38
  attr_accessor :display_name
39
39
 
40
+ # A DNS label for the subnet, used in conjunction with the VNIC's hostname and
41
+ # VCN's DNS label to form a fully qualified domain name (FQDN) for each VNIC
42
+ # within this subnet (e.g., `bminstance-1.subnet123.vcn1.oraclevcn.com`).
43
+ # Must be an alphanumeric string that begins with a letter and is unique within the VCN.
44
+ # The value cannot be changed.
45
+ #
46
+ # The absence of this parameter means the Internet and VCN Resolver
47
+ # will not resolve hostnames of instances in this subnet.
48
+ #
49
+ # For more information, see
50
+ # [DNS in Your Virtual Cloud Network](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/dns.htm).
51
+ #
52
+ # Example: `subnet123`
53
+ #
54
+ # @return [String]
55
+ attr_accessor :dns_label
56
+
40
57
  # The subnet's Oracle ID (OCID).
41
58
  # @return [String]
42
59
  attr_accessor :id
@@ -53,6 +70,17 @@ module OracleBMC
53
70
  # @return [Array<String>]
54
71
  attr_accessor :security_list_ids
55
72
 
73
+ # The subnet's domain name, which consists of the subnet's DNS label,
74
+ # the VCN's DNS label, and the `oraclevcn.com` domain.
75
+ #
76
+ # For more information, see
77
+ # [DNS in Your Virtual Cloud Network](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/dns.htm).
78
+ #
79
+ # Example: `subnet123.vcn1.oraclevcn.com`
80
+ #
81
+ # @return [String]
82
+ attr_accessor :subnet_domain_name
83
+
56
84
  # The date and time the subnet was created, in the format defined by RFC3339.
57
85
  #
58
86
  # Example: `2016-08-25T21:10:29.600Z`
@@ -108,6 +136,10 @@ module OracleBMC
108
136
  self.display_name = attributes[:'displayName']
109
137
  end
110
138
 
139
+ if attributes[:'dnsLabel']
140
+ self.dns_label = attributes[:'dnsLabel']
141
+ end
142
+
111
143
  if attributes[:'id']
112
144
  self.id = attributes[:'id']
113
145
  end
@@ -124,6 +156,10 @@ module OracleBMC
124
156
  self.security_list_ids = attributes[:'securityListIds']
125
157
  end
126
158
 
159
+ if attributes[:'subnetDomainName']
160
+ self.subnet_domain_name = attributes[:'subnetDomainName']
161
+ end
162
+
127
163
  if attributes[:'timeCreated']
128
164
  self.time_created = attributes[:'timeCreated']
129
165
  end
@@ -161,10 +197,12 @@ module OracleBMC
161
197
  compartment_id == other_object.compartment_id &&
162
198
  dhcp_options_id == other_object.dhcp_options_id &&
163
199
  display_name == other_object.display_name &&
200
+ dns_label == other_object.dns_label &&
164
201
  id == other_object.id &&
165
202
  lifecycle_state == other_object.lifecycle_state &&
166
203
  route_table_id == other_object.route_table_id &&
167
204
  security_list_ids == other_object.security_list_ids &&
205
+ subnet_domain_name == other_object.subnet_domain_name &&
168
206
  time_created == other_object.time_created &&
169
207
  vcn_id == other_object.vcn_id &&
170
208
  virtual_router_ip == other_object.virtual_router_ip &&
@@ -180,7 +218,7 @@ module OracleBMC
180
218
  # Calculates hash code according to all attributes.
181
219
  # @return [Fixnum] Hash code
182
220
  def hash
183
- [availability_domain, cidr_block, compartment_id, dhcp_options_id, display_name, id, lifecycle_state, route_table_id, security_list_ids, time_created, vcn_id, virtual_router_ip, virtual_router_mac].hash
221
+ [availability_domain, cidr_block, compartment_id, dhcp_options_id, display_name, dns_label, id, lifecycle_state, route_table_id, security_list_ids, subnet_domain_name, time_created, vcn_id, virtual_router_ip, virtual_router_mac].hash
184
222
  end
185
223
 
186
224
  # Builds the object from hash
@@ -193,10 +231,10 @@ module OracleBMC
193
231
  # check to ensure the input is an array given that the the attribute
194
232
  # is documented as an array but the input is not
195
233
  if attributes[self.class.attribute_map[key]].is_a?(Array)
196
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
234
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OracleBMC::Internal::Util.convert_to_type($1, v) } )
197
235
  end
198
236
  elsif !attributes[self.class.attribute_map[key]].nil?
199
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
237
+ self.send("#{key}=", OracleBMC::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
200
238
  end # or else data not found in attributes(hash), not an issue as the data can be optional
201
239
  end
202
240
 
@@ -241,47 +279,6 @@ module OracleBMC
241
279
  end
242
280
  end
243
281
 
244
- # Deserializes the data based on type
245
- # @param [String] type Data type
246
- # @param [String] value Value to be deserialized
247
- # @return [Object] Deserialized data
248
- def _deserialize(type, value)
249
- case type.to_sym
250
- when :DateTime
251
- DateTime.parse(value)
252
- when :Date
253
- Date.parse(value)
254
- when :String
255
- value.to_s
256
- when :Integer
257
- value.to_i
258
- when :Float
259
- value.to_f
260
- when :BOOLEAN
261
- if value.to_s =~ /^(true|t|yes|y|1)$/i
262
- true
263
- else
264
- false
265
- end
266
- when :Object
267
- # generic object (usually a Hash), return directly
268
- value
269
- when /\AArray<(?<inner_type>.+)>\z/
270
- inner_type = Regexp.last_match[:inner_type]
271
- value.map { |v| _deserialize(inner_type, v) }
272
- when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
273
- k_type = Regexp.last_match[:k_type]
274
- v_type = Regexp.last_match[:v_type]
275
- {}.tap do |hash|
276
- value.each do |k, v|
277
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
278
- end
279
- end
280
- else # model
281
- temp_model = OracleBMC.const_get(type.to_s).new
282
- temp_model.build_from_hash(value)
283
- end
284
- end
285
282
 
286
283
 
287
284
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -292,10 +289,12 @@ module OracleBMC
292
289
  :'compartment_id' => :'compartmentId',
293
290
  :'dhcp_options_id' => :'dhcpOptionsId',
294
291
  :'display_name' => :'displayName',
292
+ :'dns_label' => :'dnsLabel',
295
293
  :'id' => :'id',
296
294
  :'lifecycle_state' => :'lifecycleState',
297
295
  :'route_table_id' => :'routeTableId',
298
296
  :'security_list_ids' => :'securityListIds',
297
+ :'subnet_domain_name' => :'subnetDomainName',
299
298
  :'time_created' => :'timeCreated',
300
299
  :'vcn_id' => :'vcnId',
301
300
  :'virtual_router_ip' => :'virtualRouterIp',
@@ -311,10 +310,12 @@ module OracleBMC
311
310
  :'compartment_id' => :'String',
312
311
  :'dhcp_options_id' => :'String',
313
312
  :'display_name' => :'String',
313
+ :'dns_label' => :'String',
314
314
  :'id' => :'String',
315
315
  :'lifecycle_state' => :'String',
316
316
  :'route_table_id' => :'String',
317
317
  :'security_list_ids' => :'Array<String>',
318
+ :'subnet_domain_name' => :'String',
318
319
  :'time_created' => :'DateTime',
319
320
  :'vcn_id' => :'String',
320
321
  :'virtual_router_ip' => :'String',
@@ -67,10 +67,10 @@ module OracleBMC
67
67
  # check to ensure the input is an array given that the the attribute
68
68
  # is documented as an array but the input is not
69
69
  if attributes[self.class.attribute_map[key]].is_a?(Array)
70
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
70
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OracleBMC::Internal::Util.convert_to_type($1, v) } )
71
71
  end
72
72
  elsif !attributes[self.class.attribute_map[key]].nil?
73
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
73
+ self.send("#{key}=", OracleBMC::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
74
74
  end # or else data not found in attributes(hash), not an issue as the data can be optional
75
75
  end
76
76
 
@@ -115,47 +115,6 @@ module OracleBMC
115
115
  end
116
116
  end
117
117
 
118
- # Deserializes the data based on type
119
- # @param [String] type Data type
120
- # @param [String] value Value to be deserialized
121
- # @return [Object] Deserialized data
122
- def _deserialize(type, value)
123
- case type.to_sym
124
- when :DateTime
125
- DateTime.parse(value)
126
- when :Date
127
- Date.parse(value)
128
- when :String
129
- value.to_s
130
- when :Integer
131
- value.to_i
132
- when :Float
133
- value.to_f
134
- when :BOOLEAN
135
- if value.to_s =~ /^(true|t|yes|y|1)$/i
136
- true
137
- else
138
- false
139
- end
140
- when :Object
141
- # generic object (usually a Hash), return directly
142
- value
143
- when /\AArray<(?<inner_type>.+)>\z/
144
- inner_type = Regexp.last_match[:inner_type]
145
- value.map { |v| _deserialize(inner_type, v) }
146
- when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
147
- k_type = Regexp.last_match[:k_type]
148
- v_type = Regexp.last_match[:v_type]
149
- {}.tap do |hash|
150
- value.each do |k, v|
151
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
152
- end
153
- end
154
- else # model
155
- temp_model = OracleBMC.const_get(type.to_s).new
156
- temp_model.build_from_hash(value)
157
- end
158
- end
159
118
 
160
119
 
161
120
  # Attribute mapping from ruby-style variable name to JSON key.