oci 2.0.6 → 2.0.7

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 (93) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +23 -1
  3. data/lib/oci.rb +4 -7
  4. data/lib/oci/api_client.rb +51 -6
  5. data/lib/oci/auth/auth.rb +5 -2
  6. data/lib/oci/auth/federation_client.rb +2 -2
  7. data/lib/oci/auth/internal/auth_token_request_signer.rb +2 -2
  8. data/lib/oci/auth/security_token_container.rb +2 -2
  9. data/lib/oci/auth/session_key_supplier.rb +3 -4
  10. data/lib/oci/auth/signers/instance_principals_security_token_signer.rb +30 -17
  11. data/lib/oci/auth/signers/security_token_signer.rb +13 -6
  12. data/lib/oci/auth/signers/x509_federation_client_based_security_token_signer.rb +8 -4
  13. data/lib/oci/auth/url_based_certificate_retriever.rb +3 -4
  14. data/lib/oci/auth/util.rb +6 -4
  15. data/lib/oci/base_signer.rb +54 -50
  16. data/lib/oci/config_file_loader.rb +3 -11
  17. data/lib/oci/core/blockstorage_client.rb +211 -0
  18. data/lib/oci/core/compute_client.rb +4 -2
  19. data/lib/oci/core/core.rb +9 -0
  20. data/lib/oci/core/models/attach_i_scsi_volume_details.rb +5 -1
  21. data/lib/oci/core/models/attach_volume_details.rb +13 -1
  22. data/lib/oci/core/models/create_public_ip_details.rb +186 -0
  23. data/lib/oci/core/models/create_vnic_details.rb +8 -2
  24. data/lib/oci/core/models/create_volume_backup_details.rb +27 -1
  25. data/lib/oci/core/models/create_volume_backup_policy_assignment_details.rb +133 -0
  26. data/lib/oci/core/models/create_volume_details.rb +15 -1
  27. data/lib/oci/core/models/get_public_ip_by_ip_address_details.rb +125 -0
  28. data/lib/oci/core/models/get_public_ip_by_private_ip_id_details.rb +124 -0
  29. data/lib/oci/core/models/i_scsi_volume_attachment.rb +5 -1
  30. data/lib/oci/core/models/public_ip.rb +328 -0
  31. data/lib/oci/core/models/update_public_ip_details.rb +140 -0
  32. data/lib/oci/core/models/volume_attachment.rb +13 -1
  33. data/lib/oci/core/models/volume_backup.rb +72 -1
  34. data/lib/oci/core/models/volume_backup_policy.rb +161 -0
  35. data/lib/oci/core/models/volume_backup_policy_assignment.rb +159 -0
  36. data/lib/oci/core/models/volume_backup_schedule.rb +191 -0
  37. data/lib/oci/core/virtual_network_client.rb +374 -4
  38. data/lib/oci/database/database_client.rb +3 -1
  39. data/lib/oci/dns/dns.rb +34 -0
  40. data/lib/oci/dns/dns_client.rb +985 -0
  41. data/lib/oci/dns/models/create_zone_details.rb +174 -0
  42. data/lib/oci/dns/models/external_master.rb +145 -0
  43. data/lib/oci/dns/models/patch_domain_records_details.rb +120 -0
  44. data/lib/oci/dns/models/patch_rr_set_details.rb +120 -0
  45. data/lib/oci/dns/models/patch_zone_records_details.rb +120 -0
  46. data/lib/oci/dns/models/record.rb +204 -0
  47. data/lib/oci/dns/models/record_collection.rb +121 -0
  48. data/lib/oci/dns/models/record_details.rb +204 -0
  49. data/lib/oci/dns/models/record_operation.rb +253 -0
  50. data/lib/oci/dns/models/rr_set.rb +123 -0
  51. data/lib/oci/dns/models/sort_order.rb +12 -0
  52. data/lib/oci/dns/models/tsig.rb +149 -0
  53. data/lib/oci/dns/models/update_domain_records_details.rb +120 -0
  54. data/lib/oci/dns/models/update_rr_set_details.rb +120 -0
  55. data/lib/oci/dns/models/update_zone_details.rb +122 -0
  56. data/lib/oci/dns/models/update_zone_records_details.rb +120 -0
  57. data/lib/oci/dns/models/zone.rb +272 -0
  58. data/lib/oci/dns/models/zone_summary.rb +230 -0
  59. data/lib/oci/dns/util.rb +2 -0
  60. data/lib/oci/errors.rb +20 -0
  61. data/lib/oci/identity/identity_client.rb +1 -0
  62. data/lib/oci/identity/models/create_dynamic_group_details.rb +4 -2
  63. data/lib/oci/identity/models/dynamic_group.rb +9 -6
  64. data/lib/oci/identity/models/update_dynamic_group_details.rb +4 -2
  65. data/lib/oci/load_balancer/load_balancer.rb +6 -0
  66. data/lib/oci/load_balancer/load_balancer_client.rb +219 -0
  67. data/lib/oci/load_balancer/models/create_listener_details.rb +17 -1
  68. data/lib/oci/load_balancer/models/create_load_balancer_details.rb +12 -1
  69. data/lib/oci/load_balancer/models/create_path_route_set_details.rb +138 -0
  70. data/lib/oci/load_balancer/models/listener.rb +17 -1
  71. data/lib/oci/load_balancer/models/listener_details.rb +17 -1
  72. data/lib/oci/load_balancer/models/load_balancer.rb +12 -1
  73. data/lib/oci/load_balancer/models/path_match_type.rb +153 -0
  74. data/lib/oci/load_balancer/models/path_route.rb +161 -0
  75. data/lib/oci/load_balancer/models/path_route_set.rb +139 -0
  76. data/lib/oci/load_balancer/models/path_route_set_details.rb +122 -0
  77. data/lib/oci/load_balancer/models/update_listener_details.rb +17 -1
  78. data/lib/oci/load_balancer/models/update_path_route_set_details.rb +122 -0
  79. data/lib/oci/load_balancer/util.rb +1 -3
  80. data/lib/oci/object_storage/transfer/multipart/internal/file_part_io_wrapper.rb +111 -0
  81. data/lib/oci/object_storage/transfer/multipart/internal/multipart_upload_parts_collection.rb +41 -0
  82. data/lib/oci/object_storage/transfer/multipart/internal/seekable_non_file_part_io_wrapper.rb +48 -0
  83. data/lib/oci/object_storage/transfer/multipart/internal/stdin_part_io_wrapper.rb +54 -0
  84. data/lib/oci/object_storage/transfer/multipart/multipart_object_assembler.rb +545 -0
  85. data/lib/oci/object_storage/transfer/transfer.rb +31 -0
  86. data/lib/oci/object_storage/transfer/upload_manager.rb +212 -0
  87. data/lib/oci/object_storage/transfer/upload_manager_config.rb +60 -0
  88. data/lib/oci/regions.rb +3 -1
  89. data/lib/oci/response.rb +1 -3
  90. data/lib/oci/version.rb +1 -1
  91. data/lib/oci/waiter.rb +16 -11
  92. data/lib/oraclebmc.rb +1 -1
  93. metadata +46 -2
@@ -0,0 +1,272 @@
1
+ # Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
2
+
3
+ require 'date'
4
+
5
+ module OCI
6
+ # A DNS zone.
7
+ class Dns::Models::Zone
8
+
9
+ ZONE_TYPE_ENUM = [ZONE_TYPE_PRIMARY = 'PRIMARY',
10
+ ZONE_TYPE_SECONDARY = 'SECONDARY',
11
+ ZONE_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE']
12
+
13
+
14
+ LIFECYCLE_STATE_ENUM = [LIFECYCLE_STATE_ACTIVE = 'ACTIVE',
15
+ LIFECYCLE_STATE_CREATING = 'CREATING',
16
+ LIFECYCLE_STATE_DELETED = 'DELETED',
17
+ LIFECYCLE_STATE_DELETING = 'DELETING',
18
+ LIFECYCLE_STATE_FAILED = 'FAILED',
19
+ LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE']
20
+
21
+ # The name of the zone.
22
+ # @return [String]
23
+ attr_accessor :name
24
+
25
+ # The type of the zone. Must be either `PRIMARY` or `SECONDARY`.
26
+ #
27
+ # @return [String]
28
+ attr_accessor :zone_type
29
+
30
+ # The OCID of the compartment containing the zone.
31
+ # @return [String]
32
+ attr_accessor :compartment_id
33
+
34
+ # External master servers for the zone.
35
+ # @return [Array<OCI::Dns::Models::ExternalMaster>]
36
+ attr_accessor :external_masters
37
+
38
+ # The canonical absolute URL of the resource.
39
+ # @return [String]
40
+ attr_accessor :self_uri
41
+
42
+ # The OCID of the zone.
43
+ # @return [String]
44
+ attr_accessor :id
45
+
46
+ # The date and time the image was created in \"YYYY-MM-ddThh:mmZ\" format
47
+ # with a Z offset, as defined by RFC 3339.
48
+ #
49
+ # **Example:** `2016-07-22T17:23:59:60Z`
50
+ #
51
+ # @return [DateTime]
52
+ attr_accessor :time_created
53
+
54
+ # Version is the never-repeating, totally-orderable, version of the
55
+ # zone, from which the serial field of the zone's SOA record is
56
+ # derived.
57
+ #
58
+ # @return [String]
59
+ attr_accessor :version
60
+
61
+ # The current serial of the zone. As seen in the zone's SOA record.
62
+ #
63
+ # @return [Integer]
64
+ attr_accessor :serial
65
+
66
+ # The current state of the zone resource.
67
+ # @return [String]
68
+ attr_accessor :lifecycle_state
69
+
70
+
71
+ # Initializes the object
72
+ # @param [Hash] attributes Model attributes in the form of hash
73
+ # @option attributes [String] :name The value to assign to the {#name} property
74
+ # @option attributes [String] :zoneType The value to assign to the {#zone_type} property
75
+ # @option attributes [String] :compartmentId The value to assign to the {#compartment_id} property
76
+ # @option attributes [Array<OCI::Dns::Models::ExternalMaster>] :externalMasters The value to assign to the {#external_masters} property
77
+ # @option attributes [String] :self The value to assign to the {#self_uri} property
78
+ # @option attributes [String] :id The value to assign to the {#id} property
79
+ # @option attributes [DateTime] :timeCreated The value to assign to the {#time_created} property
80
+ # @option attributes [String] :version The value to assign to the {#version} property
81
+ # @option attributes [Integer] :serial The value to assign to the {#serial} property
82
+ # @option attributes [String] :lifecycleState The value to assign to the {#lifecycle_state} property
83
+ def initialize(attributes = {})
84
+ return unless attributes.is_a?(Hash)
85
+
86
+ # convert string to symbol for hash key
87
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
88
+
89
+ if attributes[:'name']
90
+ self.name = attributes[:'name']
91
+ end
92
+
93
+ if attributes[:'zoneType']
94
+ self.zone_type = attributes[:'zoneType']
95
+ end
96
+
97
+ if attributes[:'compartmentId']
98
+ self.compartment_id = attributes[:'compartmentId']
99
+ end
100
+
101
+ if attributes[:'externalMasters']
102
+ self.external_masters = attributes[:'externalMasters']
103
+ end
104
+
105
+ if attributes[:'self']
106
+ self.self_uri = attributes[:'self']
107
+ end
108
+
109
+ if attributes[:'id']
110
+ self.id = attributes[:'id']
111
+ end
112
+
113
+ if attributes[:'timeCreated']
114
+ self.time_created = attributes[:'timeCreated']
115
+ end
116
+
117
+ if attributes[:'version']
118
+ self.version = attributes[:'version']
119
+ end
120
+
121
+ if attributes[:'serial']
122
+ self.serial = attributes[:'serial']
123
+ end
124
+
125
+ if attributes[:'lifecycleState']
126
+ self.lifecycle_state = attributes[:'lifecycleState']
127
+ end
128
+
129
+ end
130
+
131
+ # Custom attribute writer method checking allowed values (enum).
132
+ # @param [Object] zone_type Object to be assigned
133
+ def zone_type=(zone_type)
134
+ if zone_type && !ZONE_TYPE_ENUM.include?(zone_type)
135
+ @zone_type = ZONE_TYPE_UNKNOWN_ENUM_VALUE
136
+ else
137
+ @zone_type = zone_type
138
+ end
139
+ end
140
+
141
+ # Custom attribute writer method checking allowed values (enum).
142
+ # @param [Object] lifecycle_state Object to be assigned
143
+ def lifecycle_state=(lifecycle_state)
144
+ if lifecycle_state && !LIFECYCLE_STATE_ENUM.include?(lifecycle_state)
145
+ @lifecycle_state = LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE
146
+ else
147
+ @lifecycle_state = lifecycle_state
148
+ end
149
+ end
150
+
151
+ # Checks equality by comparing each attribute.
152
+ # @param [Object] other_object to be compared
153
+ def ==(other_object)
154
+ return true if self.equal?(other_object)
155
+ self.class == other_object.class &&
156
+ name == other_object.name &&
157
+ zone_type == other_object.zone_type &&
158
+ compartment_id == other_object.compartment_id &&
159
+ external_masters == other_object.external_masters &&
160
+ self_uri == other_object.self_uri &&
161
+ id == other_object.id &&
162
+ time_created == other_object.time_created &&
163
+ version == other_object.version &&
164
+ serial == other_object.serial &&
165
+ lifecycle_state == other_object.lifecycle_state
166
+ end
167
+
168
+ # @see the `==` method
169
+ # @param [Object] other_object to be compared
170
+ def eql?(other_object)
171
+ self == other_object
172
+ end
173
+
174
+ # Calculates hash code according to all attributes.
175
+ # @return [Fixnum] Hash code
176
+ def hash
177
+ [name, zone_type, compartment_id, external_masters, self_uri, id, time_created, version, serial, lifecycle_state].hash
178
+ end
179
+
180
+ # Builds the object from hash
181
+ # @param [Hash] attributes Model attributes in the form of hash
182
+ # @return [Object] Returns the model itself
183
+ def build_from_hash(attributes)
184
+ return nil unless attributes.is_a?(Hash)
185
+ self.class.swagger_types.each_pair do |key, type|
186
+ if type =~ /^Array<(.*)>/i
187
+ # check to ensure the input is an array given that the the attribute
188
+ # is documented as an array but the input is not
189
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
190
+ self.public_method("#{key}=").call(attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
191
+ end
192
+ elsif !attributes[self.class.attribute_map[key]].nil?
193
+ self.public_method("#{key}=").call(OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
194
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
195
+ end
196
+
197
+ self
198
+ end
199
+
200
+ # Returns the string representation of the object
201
+ # @return [String] String presentation of the object
202
+ def to_s
203
+ to_hash.to_s
204
+ end
205
+
206
+ # Returns the object in the form of hash
207
+ # @return [Hash] Returns the object in the form of hash
208
+ def to_hash
209
+ hash = {}
210
+ self.class.attribute_map.each_pair do |attr, param|
211
+ value = public_method(attr).call
212
+ next if value.nil? && !instance_variable_defined?("@#{attr}")
213
+ hash[param] = _to_hash(value)
214
+ end
215
+ hash
216
+ end
217
+
218
+ private
219
+
220
+ # Outputs non-array value in the form of hash
221
+ # For object, use to_hash. Otherwise, just return the value
222
+ # @param [Object] value Any valid value
223
+ # @return [Hash] Returns the value in the form of hash
224
+ def _to_hash(value)
225
+ if value.is_a?(Array)
226
+ value.compact.map{ |v| _to_hash(v) }
227
+ elsif value.is_a?(Hash)
228
+ {}.tap do |hash|
229
+ value.each { |k, v| hash[k] = _to_hash(v) }
230
+ end
231
+ elsif value.respond_to? :to_hash
232
+ value.to_hash
233
+ else
234
+ value
235
+ end
236
+ end
237
+
238
+
239
+
240
+ # Attribute mapping from ruby-style variable name to JSON key.
241
+ def self.attribute_map
242
+ {
243
+ :'name' => :'name',
244
+ :'zone_type' => :'zoneType',
245
+ :'compartment_id' => :'compartmentId',
246
+ :'external_masters' => :'externalMasters',
247
+ :'self_uri' => :'self',
248
+ :'id' => :'id',
249
+ :'time_created' => :'timeCreated',
250
+ :'version' => :'version',
251
+ :'serial' => :'serial',
252
+ :'lifecycle_state' => :'lifecycleState'
253
+ }
254
+ end
255
+
256
+ # Attribute type mapping.
257
+ def self.swagger_types
258
+ {
259
+ :'name' => :'String',
260
+ :'zone_type' => :'String',
261
+ :'compartment_id' => :'String',
262
+ :'external_masters' => :'Array<OCI::Dns::Models::ExternalMaster>',
263
+ :'self_uri' => :'String',
264
+ :'id' => :'String',
265
+ :'time_created' => :'DateTime',
266
+ :'version' => :'String',
267
+ :'serial' => :'Integer',
268
+ :'lifecycle_state' => :'String'
269
+ }
270
+ end
271
+ end
272
+ end
@@ -0,0 +1,230 @@
1
+ # Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
2
+
3
+ require 'date'
4
+
5
+ module OCI
6
+ # A DNS zone.
7
+ class Dns::Models::ZoneSummary
8
+
9
+ ZONE_TYPE_ENUM = [ZONE_TYPE_PRIMARY = 'PRIMARY',
10
+ ZONE_TYPE_SECONDARY = 'SECONDARY',
11
+ ZONE_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE']
12
+
13
+ # The name of the zone.
14
+ # @return [String]
15
+ attr_accessor :name
16
+
17
+ # The type of the zone. Must be either `PRIMARY` or `SECONDARY`.
18
+ #
19
+ # @return [String]
20
+ attr_accessor :zone_type
21
+
22
+ # The OCID of the compartment containing the zone.
23
+ # @return [String]
24
+ attr_accessor :compartment_id
25
+
26
+ # The canonical absolute URL of the resource.
27
+ # @return [String]
28
+ attr_accessor :self_uri
29
+
30
+ # The OCID of the zone.
31
+ # @return [String]
32
+ attr_accessor :id
33
+
34
+ # The date and time the image was created in \"YYYY-MM-ddThh:mmZ\" format
35
+ # with a Z offset, as defined by RFC 3339.
36
+ #
37
+ # **Example:** `2016-07-22T17:23:59:60Z`
38
+ #
39
+ # @return [DateTime]
40
+ attr_accessor :time_created
41
+
42
+ # Version is the never-repeating, totally-orderable, version of the
43
+ # zone, from which the serial field of the zone's SOA record is
44
+ # derived.
45
+ #
46
+ # @return [String]
47
+ attr_accessor :version
48
+
49
+ # The current serial of the zone. As seen in the zone's SOA record.
50
+ #
51
+ # @return [Integer]
52
+ attr_accessor :serial
53
+
54
+
55
+ # Initializes the object
56
+ # @param [Hash] attributes Model attributes in the form of hash
57
+ # @option attributes [String] :name The value to assign to the {#name} property
58
+ # @option attributes [String] :zoneType The value to assign to the {#zone_type} property
59
+ # @option attributes [String] :compartmentId The value to assign to the {#compartment_id} property
60
+ # @option attributes [String] :self The value to assign to the {#self_uri} property
61
+ # @option attributes [String] :id The value to assign to the {#id} property
62
+ # @option attributes [DateTime] :timeCreated The value to assign to the {#time_created} property
63
+ # @option attributes [String] :version The value to assign to the {#version} property
64
+ # @option attributes [Integer] :serial The value to assign to the {#serial} property
65
+ def initialize(attributes = {})
66
+ return unless attributes.is_a?(Hash)
67
+
68
+ # convert string to symbol for hash key
69
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
70
+
71
+ if attributes[:'name']
72
+ self.name = attributes[:'name']
73
+ end
74
+
75
+ if attributes[:'zoneType']
76
+ self.zone_type = attributes[:'zoneType']
77
+ end
78
+
79
+ if attributes[:'compartmentId']
80
+ self.compartment_id = attributes[:'compartmentId']
81
+ end
82
+
83
+ if attributes[:'self']
84
+ self.self_uri = attributes[:'self']
85
+ end
86
+
87
+ if attributes[:'id']
88
+ self.id = attributes[:'id']
89
+ end
90
+
91
+ if attributes[:'timeCreated']
92
+ self.time_created = attributes[:'timeCreated']
93
+ end
94
+
95
+ if attributes[:'version']
96
+ self.version = attributes[:'version']
97
+ end
98
+
99
+ if attributes[:'serial']
100
+ self.serial = attributes[:'serial']
101
+ end
102
+
103
+ end
104
+
105
+ # Custom attribute writer method checking allowed values (enum).
106
+ # @param [Object] zone_type Object to be assigned
107
+ def zone_type=(zone_type)
108
+ if zone_type && !ZONE_TYPE_ENUM.include?(zone_type)
109
+ @zone_type = ZONE_TYPE_UNKNOWN_ENUM_VALUE
110
+ else
111
+ @zone_type = zone_type
112
+ end
113
+ end
114
+
115
+ # Checks equality by comparing each attribute.
116
+ # @param [Object] other_object to be compared
117
+ def ==(other_object)
118
+ return true if self.equal?(other_object)
119
+ self.class == other_object.class &&
120
+ name == other_object.name &&
121
+ zone_type == other_object.zone_type &&
122
+ compartment_id == other_object.compartment_id &&
123
+ self_uri == other_object.self_uri &&
124
+ id == other_object.id &&
125
+ time_created == other_object.time_created &&
126
+ version == other_object.version &&
127
+ serial == other_object.serial
128
+ end
129
+
130
+ # @see the `==` method
131
+ # @param [Object] other_object to be compared
132
+ def eql?(other_object)
133
+ self == other_object
134
+ end
135
+
136
+ # Calculates hash code according to all attributes.
137
+ # @return [Fixnum] Hash code
138
+ def hash
139
+ [name, zone_type, compartment_id, self_uri, id, time_created, version, serial].hash
140
+ end
141
+
142
+ # Builds the object from hash
143
+ # @param [Hash] attributes Model attributes in the form of hash
144
+ # @return [Object] Returns the model itself
145
+ def build_from_hash(attributes)
146
+ return nil unless attributes.is_a?(Hash)
147
+ self.class.swagger_types.each_pair do |key, type|
148
+ if type =~ /^Array<(.*)>/i
149
+ # check to ensure the input is an array given that the the attribute
150
+ # is documented as an array but the input is not
151
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
152
+ self.public_method("#{key}=").call(attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
153
+ end
154
+ elsif !attributes[self.class.attribute_map[key]].nil?
155
+ self.public_method("#{key}=").call(OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
156
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
157
+ end
158
+
159
+ self
160
+ end
161
+
162
+ # Returns the string representation of the object
163
+ # @return [String] String presentation of the object
164
+ def to_s
165
+ to_hash.to_s
166
+ end
167
+
168
+ # Returns the object in the form of hash
169
+ # @return [Hash] Returns the object in the form of hash
170
+ def to_hash
171
+ hash = {}
172
+ self.class.attribute_map.each_pair do |attr, param|
173
+ value = public_method(attr).call
174
+ next if value.nil? && !instance_variable_defined?("@#{attr}")
175
+ hash[param] = _to_hash(value)
176
+ end
177
+ hash
178
+ end
179
+
180
+ private
181
+
182
+ # Outputs non-array value in the form of hash
183
+ # For object, use to_hash. Otherwise, just return the value
184
+ # @param [Object] value Any valid value
185
+ # @return [Hash] Returns the value in the form of hash
186
+ def _to_hash(value)
187
+ if value.is_a?(Array)
188
+ value.compact.map{ |v| _to_hash(v) }
189
+ elsif value.is_a?(Hash)
190
+ {}.tap do |hash|
191
+ value.each { |k, v| hash[k] = _to_hash(v) }
192
+ end
193
+ elsif value.respond_to? :to_hash
194
+ value.to_hash
195
+ else
196
+ value
197
+ end
198
+ end
199
+
200
+
201
+
202
+ # Attribute mapping from ruby-style variable name to JSON key.
203
+ def self.attribute_map
204
+ {
205
+ :'name' => :'name',
206
+ :'zone_type' => :'zoneType',
207
+ :'compartment_id' => :'compartmentId',
208
+ :'self_uri' => :'self',
209
+ :'id' => :'id',
210
+ :'time_created' => :'timeCreated',
211
+ :'version' => :'version',
212
+ :'serial' => :'serial'
213
+ }
214
+ end
215
+
216
+ # Attribute type mapping.
217
+ def self.swagger_types
218
+ {
219
+ :'name' => :'String',
220
+ :'zone_type' => :'String',
221
+ :'compartment_id' => :'String',
222
+ :'self_uri' => :'String',
223
+ :'id' => :'String',
224
+ :'time_created' => :'DateTime',
225
+ :'version' => :'String',
226
+ :'serial' => :'Integer'
227
+ }
228
+ end
229
+ end
230
+ end