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
@@ -63,10 +63,10 @@ module OracleBMC
63
63
  # check to ensure the input is an array given that the the attribute
64
64
  # is documented as an array but the input is not
65
65
  if attributes[self.class.attribute_map[key]].is_a?(Array)
66
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
66
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OracleBMC::Internal::Util.convert_to_type($1, v) } )
67
67
  end
68
68
  elsif !attributes[self.class.attribute_map[key]].nil?
69
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
69
+ self.send("#{key}=", OracleBMC::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
70
70
  end # or else data not found in attributes(hash), not an issue as the data can be optional
71
71
  end
72
72
 
@@ -111,47 +111,6 @@ module OracleBMC
111
111
  end
112
112
  end
113
113
 
114
- # Deserializes the data based on type
115
- # @param [String] type Data type
116
- # @param [String] value Value to be deserialized
117
- # @return [Object] Deserialized data
118
- def _deserialize(type, value)
119
- case type.to_sym
120
- when :DateTime
121
- DateTime.parse(value)
122
- when :Date
123
- Date.parse(value)
124
- when :String
125
- value.to_s
126
- when :Integer
127
- value.to_i
128
- when :Float
129
- value.to_f
130
- when :BOOLEAN
131
- if value.to_s =~ /^(true|t|yes|y|1)$/i
132
- true
133
- else
134
- false
135
- end
136
- when :Object
137
- # generic object (usually a Hash), return directly
138
- value
139
- when /\AArray<(?<inner_type>.+)>\z/
140
- inner_type = Regexp.last_match[:inner_type]
141
- value.map { |v| _deserialize(inner_type, v) }
142
- when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
143
- k_type = Regexp.last_match[:k_type]
144
- v_type = Regexp.last_match[:v_type]
145
- {}.tap do |hash|
146
- value.each do |k, v|
147
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
148
- end
149
- end
150
- else # model
151
- temp_model = OracleBMC.const_get(type.to_s).new
152
- temp_model.build_from_hash(value)
153
- end
154
- end
155
114
 
156
115
 
157
116
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -72,10 +72,10 @@ module OracleBMC
72
72
  # check to ensure the input is an array given that the the attribute
73
73
  # is documented as an array but the input is not
74
74
  if attributes[self.class.attribute_map[key]].is_a?(Array)
75
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
75
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OracleBMC::Internal::Util.convert_to_type($1, v) } )
76
76
  end
77
77
  elsif !attributes[self.class.attribute_map[key]].nil?
78
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
78
+ self.send("#{key}=", OracleBMC::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
79
79
  end # or else data not found in attributes(hash), not an issue as the data can be optional
80
80
  end
81
81
 
@@ -120,47 +120,6 @@ module OracleBMC
120
120
  end
121
121
  end
122
122
 
123
- # Deserializes the data based on type
124
- # @param [String] type Data type
125
- # @param [String] value Value to be deserialized
126
- # @return [Object] Deserialized data
127
- def _deserialize(type, value)
128
- case type.to_sym
129
- when :DateTime
130
- DateTime.parse(value)
131
- when :Date
132
- Date.parse(value)
133
- when :String
134
- value.to_s
135
- when :Integer
136
- value.to_i
137
- when :Float
138
- value.to_f
139
- when :BOOLEAN
140
- if value.to_s =~ /^(true|t|yes|y|1)$/i
141
- true
142
- else
143
- false
144
- end
145
- when :Object
146
- # generic object (usually a Hash), return directly
147
- value
148
- when /\AArray<(?<inner_type>.+)>\z/
149
- inner_type = Regexp.last_match[:inner_type]
150
- value.map { |v| _deserialize(inner_type, v) }
151
- when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
152
- k_type = Regexp.last_match[:k_type]
153
- v_type = Regexp.last_match[:v_type]
154
- {}.tap do |hash|
155
- value.each do |k, v|
156
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
157
- end
158
- end
159
- else # model
160
- temp_model = OracleBMC.const_get(type.to_s).new
161
- temp_model.build_from_hash(value)
162
- end
163
- end
164
123
 
165
124
 
166
125
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -54,10 +54,10 @@ module OracleBMC
54
54
  # check to ensure the input is an array given that the the attribute
55
55
  # is documented as an array but the input is not
56
56
  if attributes[self.class.attribute_map[key]].is_a?(Array)
57
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
57
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OracleBMC::Internal::Util.convert_to_type($1, v) } )
58
58
  end
59
59
  elsif !attributes[self.class.attribute_map[key]].nil?
60
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
60
+ self.send("#{key}=", OracleBMC::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
61
61
  end # or else data not found in attributes(hash), not an issue as the data can be optional
62
62
  end
63
63
 
@@ -102,47 +102,6 @@ module OracleBMC
102
102
  end
103
103
  end
104
104
 
105
- # Deserializes the data based on type
106
- # @param [String] type Data type
107
- # @param [String] value Value to be deserialized
108
- # @return [Object] Deserialized data
109
- def _deserialize(type, value)
110
- case type.to_sym
111
- when :DateTime
112
- DateTime.parse(value)
113
- when :Date
114
- Date.parse(value)
115
- when :String
116
- value.to_s
117
- when :Integer
118
- value.to_i
119
- when :Float
120
- value.to_f
121
- when :BOOLEAN
122
- if value.to_s =~ /^(true|t|yes|y|1)$/i
123
- true
124
- else
125
- false
126
- end
127
- when :Object
128
- # generic object (usually a Hash), return directly
129
- value
130
- when /\AArray<(?<inner_type>.+)>\z/
131
- inner_type = Regexp.last_match[:inner_type]
132
- value.map { |v| _deserialize(inner_type, v) }
133
- when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
134
- k_type = Regexp.last_match[:k_type]
135
- v_type = Regexp.last_match[:v_type]
136
- {}.tap do |hash|
137
- value.each do |k, v|
138
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
139
- end
140
- end
141
- else # model
142
- temp_model = OracleBMC.const_get(type.to_s).new
143
- temp_model.build_from_hash(value)
144
- end
145
- end
146
105
 
147
106
 
148
107
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -54,10 +54,10 @@ module OracleBMC
54
54
  # check to ensure the input is an array given that the the attribute
55
55
  # is documented as an array but the input is not
56
56
  if attributes[self.class.attribute_map[key]].is_a?(Array)
57
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
57
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OracleBMC::Internal::Util.convert_to_type($1, v) } )
58
58
  end
59
59
  elsif !attributes[self.class.attribute_map[key]].nil?
60
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
60
+ self.send("#{key}=", OracleBMC::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
61
61
  end # or else data not found in attributes(hash), not an issue as the data can be optional
62
62
  end
63
63
 
@@ -102,47 +102,6 @@ module OracleBMC
102
102
  end
103
103
  end
104
104
 
105
- # Deserializes the data based on type
106
- # @param [String] type Data type
107
- # @param [String] value Value to be deserialized
108
- # @return [Object] Deserialized data
109
- def _deserialize(type, value)
110
- case type.to_sym
111
- when :DateTime
112
- DateTime.parse(value)
113
- when :Date
114
- Date.parse(value)
115
- when :String
116
- value.to_s
117
- when :Integer
118
- value.to_i
119
- when :Float
120
- value.to_f
121
- when :BOOLEAN
122
- if value.to_s =~ /^(true|t|yes|y|1)$/i
123
- true
124
- else
125
- false
126
- end
127
- when :Object
128
- # generic object (usually a Hash), return directly
129
- value
130
- when /\AArray<(?<inner_type>.+)>\z/
131
- inner_type = Regexp.last_match[:inner_type]
132
- value.map { |v| _deserialize(inner_type, v) }
133
- when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
134
- k_type = Regexp.last_match[:k_type]
135
- v_type = Regexp.last_match[:v_type]
136
- {}.tap do |hash|
137
- value.each do |k, v|
138
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
139
- end
140
- end
141
- else # model
142
- temp_model = OracleBMC.const_get(type.to_s).new
143
- temp_model.build_from_hash(value)
144
- end
145
- end
146
105
 
147
106
 
148
107
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -54,10 +54,10 @@ module OracleBMC
54
54
  # check to ensure the input is an array given that the the attribute
55
55
  # is documented as an array but the input is not
56
56
  if attributes[self.class.attribute_map[key]].is_a?(Array)
57
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
57
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OracleBMC::Internal::Util.convert_to_type($1, v) } )
58
58
  end
59
59
  elsif !attributes[self.class.attribute_map[key]].nil?
60
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
60
+ self.send("#{key}=", OracleBMC::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
61
61
  end # or else data not found in attributes(hash), not an issue as the data can be optional
62
62
  end
63
63
 
@@ -102,47 +102,6 @@ module OracleBMC
102
102
  end
103
103
  end
104
104
 
105
- # Deserializes the data based on type
106
- # @param [String] type Data type
107
- # @param [String] value Value to be deserialized
108
- # @return [Object] Deserialized data
109
- def _deserialize(type, value)
110
- case type.to_sym
111
- when :DateTime
112
- DateTime.parse(value)
113
- when :Date
114
- Date.parse(value)
115
- when :String
116
- value.to_s
117
- when :Integer
118
- value.to_i
119
- when :Float
120
- value.to_f
121
- when :BOOLEAN
122
- if value.to_s =~ /^(true|t|yes|y|1)$/i
123
- true
124
- else
125
- false
126
- end
127
- when :Object
128
- # generic object (usually a Hash), return directly
129
- value
130
- when /\AArray<(?<inner_type>.+)>\z/
131
- inner_type = Regexp.last_match[:inner_type]
132
- value.map { |v| _deserialize(inner_type, v) }
133
- when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
134
- k_type = Regexp.last_match[:k_type]
135
- v_type = Regexp.last_match[:v_type]
136
- {}.tap do |hash|
137
- value.each do |k, v|
138
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
139
- end
140
- end
141
- else # model
142
- temp_model = OracleBMC.const_get(type.to_s).new
143
- temp_model.build_from_hash(value)
144
- end
145
- end
146
105
 
147
106
 
148
107
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -55,10 +55,10 @@ module OracleBMC
55
55
  # check to ensure the input is an array given that the the attribute
56
56
  # is documented as an array but the input is not
57
57
  if attributes[self.class.attribute_map[key]].is_a?(Array)
58
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
58
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OracleBMC::Internal::Util.convert_to_type($1, v) } )
59
59
  end
60
60
  elsif !attributes[self.class.attribute_map[key]].nil?
61
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
61
+ self.send("#{key}=", OracleBMC::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
62
62
  end # or else data not found in attributes(hash), not an issue as the data can be optional
63
63
  end
64
64
 
@@ -103,47 +103,6 @@ module OracleBMC
103
103
  end
104
104
  end
105
105
 
106
- # Deserializes the data based on type
107
- # @param [String] type Data type
108
- # @param [String] value Value to be deserialized
109
- # @return [Object] Deserialized data
110
- def _deserialize(type, value)
111
- case type.to_sym
112
- when :DateTime
113
- DateTime.parse(value)
114
- when :Date
115
- Date.parse(value)
116
- when :String
117
- value.to_s
118
- when :Integer
119
- value.to_i
120
- when :Float
121
- value.to_f
122
- when :BOOLEAN
123
- if value.to_s =~ /^(true|t|yes|y|1)$/i
124
- true
125
- else
126
- false
127
- end
128
- when :Object
129
- # generic object (usually a Hash), return directly
130
- value
131
- when /\AArray<(?<inner_type>.+)>\z/
132
- inner_type = Regexp.last_match[:inner_type]
133
- value.map { |v| _deserialize(inner_type, v) }
134
- when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
135
- k_type = Regexp.last_match[:k_type]
136
- v_type = Regexp.last_match[:v_type]
137
- {}.tap do |hash|
138
- value.each do |k, v|
139
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
140
- end
141
- end
142
- else # model
143
- temp_model = OracleBMC.const_get(type.to_s).new
144
- temp_model.build_from_hash(value)
145
- end
146
- end
147
106
 
148
107
 
149
108
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -38,6 +38,23 @@ module OracleBMC
38
38
  # @return [String]
39
39
  attr_accessor :display_name
40
40
 
41
+ # A DNS label for the VCN, used in conjunction with the VNIC's hostname and
42
+ # subnet's DNS label to form a fully qualified domain name (FQDN) for each VNIC
43
+ # within this subnet (e.g., `bminstance-1.subnet123.vcn1.oraclevcn.com`).
44
+ # Must be an alphanumeric string that begins with a letter.
45
+ # The value cannot be changed.
46
+ #
47
+ # The absence of this parameter means the Internet and VCN Resolver will
48
+ # not work for this VCN.
49
+ #
50
+ # For more information, see
51
+ # [DNS in Your Virtual Cloud Network](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/dns.htm).
52
+ #
53
+ # Example: `vcn1`
54
+ #
55
+ # @return [String]
56
+ attr_accessor :dns_label
57
+
41
58
  # The VCN's Oracle ID (OCID).
42
59
  # @return [String]
43
60
  attr_accessor :id
@@ -53,6 +70,17 @@ module OracleBMC
53
70
  # @return [DateTime]
54
71
  attr_accessor :time_created
55
72
 
73
+ # The VCN's domain name, which consists of the VCN's DNS label, and the
74
+ # `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: `vcn1.oraclevcn.com`
80
+ #
81
+ # @return [String]
82
+ attr_accessor :vcn_domain_name
83
+
56
84
 
57
85
  # Initializes the object
58
86
  # @param [Hash] attributes Model attributes in the form of hash
@@ -87,6 +115,10 @@ module OracleBMC
87
115
  self.display_name = attributes[:'displayName']
88
116
  end
89
117
 
118
+ if attributes[:'dnsLabel']
119
+ self.dns_label = attributes[:'dnsLabel']
120
+ end
121
+
90
122
  if attributes[:'id']
91
123
  self.id = attributes[:'id']
92
124
  end
@@ -99,6 +131,10 @@ module OracleBMC
99
131
  self.time_created = attributes[:'timeCreated']
100
132
  end
101
133
 
134
+ if attributes[:'vcnDomainName']
135
+ self.vcn_domain_name = attributes[:'vcnDomainName']
136
+ end
137
+
102
138
  end
103
139
 
104
140
  # Custom attribute writer method checking allowed values (enum).
@@ -121,9 +157,11 @@ module OracleBMC
121
157
  default_route_table_id == other_object.default_route_table_id &&
122
158
  default_security_list_id == other_object.default_security_list_id &&
123
159
  display_name == other_object.display_name &&
160
+ dns_label == other_object.dns_label &&
124
161
  id == other_object.id &&
125
162
  lifecycle_state == other_object.lifecycle_state &&
126
- time_created == other_object.time_created
163
+ time_created == other_object.time_created &&
164
+ vcn_domain_name == other_object.vcn_domain_name
127
165
  end
128
166
 
129
167
  # @see the `==` method
@@ -135,7 +173,7 @@ module OracleBMC
135
173
  # Calculates hash code according to all attributes.
136
174
  # @return [Fixnum] Hash code
137
175
  def hash
138
- [cidr_block, compartment_id, default_dhcp_options_id, default_route_table_id, default_security_list_id, display_name, id, lifecycle_state, time_created].hash
176
+ [cidr_block, compartment_id, default_dhcp_options_id, default_route_table_id, default_security_list_id, display_name, dns_label, id, lifecycle_state, time_created, vcn_domain_name].hash
139
177
  end
140
178
 
141
179
  # Builds the object from hash
@@ -148,10 +186,10 @@ module OracleBMC
148
186
  # check to ensure the input is an array given that the the attribute
149
187
  # is documented as an array but the input is not
150
188
  if attributes[self.class.attribute_map[key]].is_a?(Array)
151
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
189
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OracleBMC::Internal::Util.convert_to_type($1, v) } )
152
190
  end
153
191
  elsif !attributes[self.class.attribute_map[key]].nil?
154
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
192
+ self.send("#{key}=", OracleBMC::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
155
193
  end # or else data not found in attributes(hash), not an issue as the data can be optional
156
194
  end
157
195
 
@@ -196,47 +234,6 @@ module OracleBMC
196
234
  end
197
235
  end
198
236
 
199
- # Deserializes the data based on type
200
- # @param [String] type Data type
201
- # @param [String] value Value to be deserialized
202
- # @return [Object] Deserialized data
203
- def _deserialize(type, value)
204
- case type.to_sym
205
- when :DateTime
206
- DateTime.parse(value)
207
- when :Date
208
- Date.parse(value)
209
- when :String
210
- value.to_s
211
- when :Integer
212
- value.to_i
213
- when :Float
214
- value.to_f
215
- when :BOOLEAN
216
- if value.to_s =~ /^(true|t|yes|y|1)$/i
217
- true
218
- else
219
- false
220
- end
221
- when :Object
222
- # generic object (usually a Hash), return directly
223
- value
224
- when /\AArray<(?<inner_type>.+)>\z/
225
- inner_type = Regexp.last_match[:inner_type]
226
- value.map { |v| _deserialize(inner_type, v) }
227
- when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
228
- k_type = Regexp.last_match[:k_type]
229
- v_type = Regexp.last_match[:v_type]
230
- {}.tap do |hash|
231
- value.each do |k, v|
232
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
233
- end
234
- end
235
- else # model
236
- temp_model = OracleBMC.const_get(type.to_s).new
237
- temp_model.build_from_hash(value)
238
- end
239
- end
240
237
 
241
238
 
242
239
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -248,9 +245,11 @@ module OracleBMC
248
245
  :'default_route_table_id' => :'defaultRouteTableId',
249
246
  :'default_security_list_id' => :'defaultSecurityListId',
250
247
  :'display_name' => :'displayName',
248
+ :'dns_label' => :'dnsLabel',
251
249
  :'id' => :'id',
252
250
  :'lifecycle_state' => :'lifecycleState',
253
- :'time_created' => :'timeCreated'
251
+ :'time_created' => :'timeCreated',
252
+ :'vcn_domain_name' => :'vcnDomainName'
254
253
  }
255
254
  end
256
255
 
@@ -263,9 +262,11 @@ module OracleBMC
263
262
  :'default_route_table_id' => :'String',
264
263
  :'default_security_list_id' => :'String',
265
264
  :'display_name' => :'String',
265
+ :'dns_label' => :'String',
266
266
  :'id' => :'String',
267
267
  :'lifecycle_state' => :'String',
268
- :'time_created' => :'DateTime'
268
+ :'time_created' => :'DateTime',
269
+ :'vcn_domain_name' => :'String'
269
270
  }
270
271
  end
271
272
  end
@@ -25,7 +25,24 @@ module OracleBMC
25
25
  # @return [String]
26
26
  attr_accessor :display_name
27
27
 
28
- # The VNIC's Oracle ID (OCID).
28
+ # The hostname for the VNIC that is created during instance launch.
29
+ # Used for DNS. The value is the hostname portion of the instance's
30
+ # fully qualified domain name (FQDN) (e.g., `bminstance-1` in FQDN
31
+ # `bminstance-1.subnet123.vcn1.oraclevcn.com`).
32
+ # Must be unique across all VNICs in the subnet and comply with
33
+ # [RFC 952](https://tools.ietf.org/html/rfc952) and
34
+ # [RFC 1123](https://tools.ietf.org/html/rfc1123).
35
+ # The value cannot be changed.
36
+ #
37
+ # For more information, see
38
+ # [DNS in Your Virtual Cloud Network](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/dns.htm).
39
+ #
40
+ # Example: `bminstance-1`
41
+ #
42
+ # @return [String]
43
+ attr_accessor :hostname_label
44
+
45
+ # The OCID of the VNIC.
29
46
  # @return [String]
30
47
  attr_accessor :id
31
48
 
@@ -33,13 +50,13 @@ module OracleBMC
33
50
  # @return [String]
34
51
  attr_accessor :lifecycle_state
35
52
 
36
- # The private IP addresses of the VNIC, which is within the VNIC subnet
53
+ # The private IP address of the VNIC. The address is within the subnet's CIDR
37
54
  # and is accessible within the VCN.
38
55
  #
39
56
  # @return [String]
40
57
  attr_accessor :private_ip
41
58
 
42
- # The public IP address of the VNIC, which Oracle performs NAT for at the gateway.
59
+ # The public IP address of the VNIC.
43
60
  #
44
61
  # @return [String]
45
62
  attr_accessor :public_ip
@@ -77,6 +94,10 @@ module OracleBMC
77
94
  self.display_name = attributes[:'displayName']
78
95
  end
79
96
 
97
+ if attributes[:'hostnameLabel']
98
+ self.hostname_label = attributes[:'hostnameLabel']
99
+ end
100
+
80
101
  if attributes[:'id']
81
102
  self.id = attributes[:'id']
82
103
  end
@@ -120,6 +141,7 @@ module OracleBMC
120
141
  availability_domain == other_object.availability_domain &&
121
142
  compartment_id == other_object.compartment_id &&
122
143
  display_name == other_object.display_name &&
144
+ hostname_label == other_object.hostname_label &&
123
145
  id == other_object.id &&
124
146
  lifecycle_state == other_object.lifecycle_state &&
125
147
  private_ip == other_object.private_ip &&
@@ -137,7 +159,7 @@ module OracleBMC
137
159
  # Calculates hash code according to all attributes.
138
160
  # @return [Fixnum] Hash code
139
161
  def hash
140
- [availability_domain, compartment_id, display_name, id, lifecycle_state, private_ip, public_ip, subnet_id, time_created].hash
162
+ [availability_domain, compartment_id, display_name, hostname_label, id, lifecycle_state, private_ip, public_ip, subnet_id, time_created].hash
141
163
  end
142
164
 
143
165
  # Builds the object from hash
@@ -150,10 +172,10 @@ module OracleBMC
150
172
  # check to ensure the input is an array given that the the attribute
151
173
  # is documented as an array but the input is not
152
174
  if attributes[self.class.attribute_map[key]].is_a?(Array)
153
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
175
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OracleBMC::Internal::Util.convert_to_type($1, v) } )
154
176
  end
155
177
  elsif !attributes[self.class.attribute_map[key]].nil?
156
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
178
+ self.send("#{key}=", OracleBMC::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
157
179
  end # or else data not found in attributes(hash), not an issue as the data can be optional
158
180
  end
159
181
 
@@ -198,47 +220,6 @@ module OracleBMC
198
220
  end
199
221
  end
200
222
 
201
- # Deserializes the data based on type
202
- # @param [String] type Data type
203
- # @param [String] value Value to be deserialized
204
- # @return [Object] Deserialized data
205
- def _deserialize(type, value)
206
- case type.to_sym
207
- when :DateTime
208
- DateTime.parse(value)
209
- when :Date
210
- Date.parse(value)
211
- when :String
212
- value.to_s
213
- when :Integer
214
- value.to_i
215
- when :Float
216
- value.to_f
217
- when :BOOLEAN
218
- if value.to_s =~ /^(true|t|yes|y|1)$/i
219
- true
220
- else
221
- false
222
- end
223
- when :Object
224
- # generic object (usually a Hash), return directly
225
- value
226
- when /\AArray<(?<inner_type>.+)>\z/
227
- inner_type = Regexp.last_match[:inner_type]
228
- value.map { |v| _deserialize(inner_type, v) }
229
- when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
230
- k_type = Regexp.last_match[:k_type]
231
- v_type = Regexp.last_match[:v_type]
232
- {}.tap do |hash|
233
- value.each do |k, v|
234
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
235
- end
236
- end
237
- else # model
238
- temp_model = OracleBMC.const_get(type.to_s).new
239
- temp_model.build_from_hash(value)
240
- end
241
- end
242
223
 
243
224
 
244
225
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -247,6 +228,7 @@ module OracleBMC
247
228
  :'availability_domain' => :'availabilityDomain',
248
229
  :'compartment_id' => :'compartmentId',
249
230
  :'display_name' => :'displayName',
231
+ :'hostname_label' => :'hostnameLabel',
250
232
  :'id' => :'id',
251
233
  :'lifecycle_state' => :'lifecycleState',
252
234
  :'private_ip' => :'privateIp',
@@ -262,6 +244,7 @@ module OracleBMC
262
244
  :'availability_domain' => :'String',
263
245
  :'compartment_id' => :'String',
264
246
  :'display_name' => :'String',
247
+ :'hostname_label' => :'String',
265
248
  :'id' => :'String',
266
249
  :'lifecycle_state' => :'String',
267
250
  :'private_ip' => :'String',