oci 2.0.0 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -1
  3. data/lib/oci.rb +8 -0
  4. data/lib/oci/api_client.rb +11 -5
  5. data/lib/oci/config.rb +3 -2
  6. data/lib/oci/config_file_loader.rb +5 -5
  7. data/lib/oci/core/blockstorage_client.rb +1 -1
  8. data/lib/oci/core/compute_client.rb +58 -4
  9. data/lib/oci/core/core.rb +1 -0
  10. data/lib/oci/core/models/capture_console_history_details.rb +13 -1
  11. data/lib/oci/core/models/create_instance_console_connection_details.rb +2 -2
  12. data/lib/oci/core/models/create_vnic_details.rb +18 -1
  13. data/lib/oci/core/models/create_volume_details.rb +14 -1
  14. data/lib/oci/core/models/instance_console_connection.rb +6 -6
  15. data/lib/oci/core/models/route_rule.rb +4 -1
  16. data/lib/oci/core/models/update_console_history_details.rb +121 -0
  17. data/lib/oci/core/models/update_vnic_details.rb +21 -4
  18. data/lib/oci/core/models/vnic.rb +18 -1
  19. data/lib/oci/core/models/volume.rb +13 -2
  20. data/lib/oci/core/models/volume_backup.rb +29 -2
  21. data/lib/oci/core/virtual_network_client.rb +7 -1
  22. data/lib/oci/database/database.rb +43 -0
  23. data/lib/oci/database/database_client.rb +1246 -0
  24. data/lib/oci/database/models/create_data_guard_association_details.rb +225 -0
  25. data/lib/oci/database/models/create_data_guard_association_to_existing_db_system_details.rb +138 -0
  26. data/lib/oci/database/models/create_database_details.rb +194 -0
  27. data/lib/oci/database/models/create_db_home_details.rb +141 -0
  28. data/lib/oci/database/models/create_db_home_with_db_system_id_details.rb +152 -0
  29. data/lib/oci/database/models/data_guard_association.rb +374 -0
  30. data/lib/oci/database/models/database.rb +261 -0
  31. data/lib/oci/database/models/database_summary.rb +261 -0
  32. data/lib/oci/database/models/db_home.rb +216 -0
  33. data/lib/oci/database/models/db_home_summary.rb +216 -0
  34. data/lib/oci/database/models/db_node.rb +220 -0
  35. data/lib/oci/database/models/db_node_summary.rb +220 -0
  36. data/lib/oci/database/models/db_system.rb +518 -0
  37. data/lib/oci/database/models/db_system_shape_summary.rb +142 -0
  38. data/lib/oci/database/models/db_system_summary.rb +518 -0
  39. data/lib/oci/database/models/db_version_summary.rb +131 -0
  40. data/lib/oci/database/models/failover_data_guard_association_details.rb +120 -0
  41. data/lib/oci/database/models/launch_db_system_details.rb +394 -0
  42. data/lib/oci/database/models/patch.rb +247 -0
  43. data/lib/oci/database/models/patch_details.rb +144 -0
  44. data/lib/oci/database/models/patch_history_entry.rb +218 -0
  45. data/lib/oci/database/models/patch_history_entry_summary.rb +218 -0
  46. data/lib/oci/database/models/patch_summary.rb +247 -0
  47. data/lib/oci/database/models/reinstate_data_guard_association_details.rb +120 -0
  48. data/lib/oci/database/models/switchover_data_guard_association_details.rb +120 -0
  49. data/lib/oci/database/models/update_db_home_details.rb +119 -0
  50. data/lib/oci/database/models/update_db_system_details.rb +153 -0
  51. data/lib/oci/database/util.rb +1 -0
  52. data/lib/oci/errors.rb +3 -4
  53. data/lib/oci/regions.rb +4 -2
  54. data/lib/oci/response_headers.rb +0 -1
  55. data/lib/oci/signer.rb +8 -7
  56. data/lib/oci/version.rb +1 -1
  57. data/lib/oraclebmc.rb +3 -1
  58. metadata +33 -2
@@ -0,0 +1,247 @@
1
+ # Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
2
+
3
+ require 'date'
4
+
5
+ module OCI
6
+ class Database::Models::Patch
7
+
8
+ AVAILABLE_ACTIONS_ENUM = [AVAILABLE_ACTIONS_APPLY = 'APPLY',
9
+ AVAILABLE_ACTIONS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE']
10
+
11
+
12
+ LAST_ACTION_ENUM = [LAST_ACTION_APPLY = 'APPLY',
13
+ LAST_ACTION_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE']
14
+
15
+
16
+ LIFECYCLE_STATE_ENUM = [LIFECYCLE_STATE_AVAILABLE = 'AVAILABLE',
17
+ LIFECYCLE_STATE_SUCCESS = 'SUCCESS',
18
+ LIFECYCLE_STATE_IN_PROGRESS = 'IN_PROGRESS',
19
+ LIFECYCLE_STATE_FAILED = 'FAILED',
20
+ LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE']
21
+
22
+ # Actions that can possibly be performed using this patch.
23
+ # @return [Array<String>]
24
+ attr_accessor :available_actions
25
+
26
+ # The text describing this patch package.
27
+ # @return [String]
28
+ attr_accessor :description
29
+
30
+ # The OCID of the patch.
31
+ # @return [String]
32
+ attr_accessor :id
33
+
34
+ # Action that is currently being performed or was completed last.
35
+ # @return [String]
36
+ attr_accessor :last_action
37
+
38
+ # A descriptive text associated with the lifecycleState.
39
+ # Typically can contain additional displayable text.
40
+ #
41
+ # @return [String]
42
+ attr_accessor :lifecycle_details
43
+
44
+ # The current state of the patch as a result of lastAction.
45
+ # @return [String]
46
+ attr_accessor :lifecycle_state
47
+
48
+ # The date and time that the patch was released.
49
+ # @return [DateTime]
50
+ attr_accessor :time_released
51
+
52
+ # The version of this patch package.
53
+ # @return [String]
54
+ attr_accessor :version
55
+
56
+
57
+ # Initializes the object
58
+ # @param [Hash] attributes Model attributes in the form of hash
59
+ def initialize(attributes = {})
60
+ return unless attributes.is_a?(Hash)
61
+
62
+ # convert string to symbol for hash key
63
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
64
+
65
+ if attributes[:'availableActions']
66
+ self.available_actions = attributes[:'availableActions']
67
+ end
68
+
69
+ if attributes[:'description']
70
+ self.description = attributes[:'description']
71
+ end
72
+
73
+ if attributes[:'id']
74
+ self.id = attributes[:'id']
75
+ end
76
+
77
+ if attributes[:'lastAction']
78
+ self.last_action = attributes[:'lastAction']
79
+ end
80
+
81
+ if attributes[:'lifecycleDetails']
82
+ self.lifecycle_details = attributes[:'lifecycleDetails']
83
+ end
84
+
85
+ if attributes[:'lifecycleState']
86
+ self.lifecycle_state = attributes[:'lifecycleState']
87
+ end
88
+
89
+ if attributes[:'timeReleased']
90
+ self.time_released = attributes[:'timeReleased']
91
+ end
92
+
93
+ if attributes[:'version']
94
+ self.version = attributes[:'version']
95
+ end
96
+
97
+ end
98
+
99
+ # Custom attribute writer method checking allowed values (enum).
100
+ # @param [Object] available_actions Object to be assigned
101
+ def available_actions=(available_actions)
102
+ if available_actions.nil?
103
+ @available_actions = nil
104
+ else
105
+ @available_actions =
106
+ available_actions.collect do |item|
107
+ AVAILABLE_ACTIONS_ENUM.include?(item) ? item : AVAILABLE_ACTIONS_UNKNOWN_ENUM_VALUE
108
+ end
109
+ end
110
+ end
111
+
112
+ # Custom attribute writer method checking allowed values (enum).
113
+ # @param [Object] last_action Object to be assigned
114
+ def last_action=(last_action)
115
+ if last_action && !LAST_ACTION_ENUM.include?(last_action)
116
+ @last_action = LAST_ACTION_UNKNOWN_ENUM_VALUE
117
+ else
118
+ @last_action = last_action
119
+ end
120
+ end
121
+
122
+ # Custom attribute writer method checking allowed values (enum).
123
+ # @param [Object] lifecycle_state Object to be assigned
124
+ def lifecycle_state=(lifecycle_state)
125
+ if lifecycle_state && !LIFECYCLE_STATE_ENUM.include?(lifecycle_state)
126
+ @lifecycle_state = LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE
127
+ else
128
+ @lifecycle_state = lifecycle_state
129
+ end
130
+ end
131
+
132
+ # Checks equality by comparing each attribute.
133
+ # @param [Object] other_object to be compared
134
+ def ==(other_object)
135
+ return true if self.equal?(other_object)
136
+ self.class == other_object.class &&
137
+ available_actions == other_object.available_actions &&
138
+ description == other_object.description &&
139
+ id == other_object.id &&
140
+ last_action == other_object.last_action &&
141
+ lifecycle_details == other_object.lifecycle_details &&
142
+ lifecycle_state == other_object.lifecycle_state &&
143
+ time_released == other_object.time_released &&
144
+ version == other_object.version
145
+ end
146
+
147
+ # @see the `==` method
148
+ # @param [Object] other_object to be compared
149
+ def eql?(other_object)
150
+ self == other_object
151
+ end
152
+
153
+ # Calculates hash code according to all attributes.
154
+ # @return [Fixnum] Hash code
155
+ def hash
156
+ [available_actions, description, id, last_action, lifecycle_details, lifecycle_state, time_released, version].hash
157
+ end
158
+
159
+ # Builds the object from hash
160
+ # @param [Hash] attributes Model attributes in the form of hash
161
+ # @return [Object] Returns the model itself
162
+ def build_from_hash(attributes)
163
+ return nil unless attributes.is_a?(Hash)
164
+ self.class.swagger_types.each_pair do |key, type|
165
+ if type =~ /^Array<(.*)>/i
166
+ # check to ensure the input is an array given that the the attribute
167
+ # is documented as an array but the input is not
168
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
169
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
170
+ end
171
+ elsif !attributes[self.class.attribute_map[key]].nil?
172
+ self.send("#{key}=", OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
173
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
174
+ end
175
+
176
+ self
177
+ end
178
+
179
+ # Returns the string representation of the object
180
+ # @return [String] String presentation of the object
181
+ def to_s
182
+ to_hash.to_s
183
+ end
184
+
185
+ # Returns the object in the form of hash
186
+ # @return [Hash] Returns the object in the form of hash
187
+ def to_hash
188
+ hash = {}
189
+ self.class.attribute_map.each_pair do |attr, param|
190
+ value = self.send(attr)
191
+ next if value.nil?
192
+ hash[param] = _to_hash(value)
193
+ end
194
+ hash
195
+ end
196
+
197
+ private
198
+
199
+ # Outputs non-array value in the form of hash
200
+ # For object, use to_hash. Otherwise, just return the value
201
+ # @param [Object] value Any valid value
202
+ # @return [Hash] Returns the value in the form of hash
203
+ def _to_hash(value)
204
+ if value.is_a?(Array)
205
+ value.compact.map{ |v| _to_hash(v) }
206
+ elsif value.is_a?(Hash)
207
+ {}.tap do |hash|
208
+ value.each { |k, v| hash[k] = _to_hash(v) }
209
+ end
210
+ elsif value.respond_to? :to_hash
211
+ value.to_hash
212
+ else
213
+ value
214
+ end
215
+ end
216
+
217
+
218
+
219
+ # Attribute mapping from ruby-style variable name to JSON key.
220
+ def self.attribute_map
221
+ {
222
+ :'available_actions' => :'availableActions',
223
+ :'description' => :'description',
224
+ :'id' => :'id',
225
+ :'last_action' => :'lastAction',
226
+ :'lifecycle_details' => :'lifecycleDetails',
227
+ :'lifecycle_state' => :'lifecycleState',
228
+ :'time_released' => :'timeReleased',
229
+ :'version' => :'version'
230
+ }
231
+ end
232
+
233
+ # Attribute type mapping.
234
+ def self.swagger_types
235
+ {
236
+ :'available_actions' => :'Array<String>',
237
+ :'description' => :'String',
238
+ :'id' => :'String',
239
+ :'last_action' => :'String',
240
+ :'lifecycle_details' => :'String',
241
+ :'lifecycle_state' => :'String',
242
+ :'time_released' => :'DateTime',
243
+ :'version' => :'String'
244
+ }
245
+ end
246
+ end
247
+ end
@@ -0,0 +1,144 @@
1
+ # Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
2
+
3
+ require 'date'
4
+
5
+ module OCI
6
+ class Database::Models::PatchDetails
7
+
8
+ ACTION_ENUM = [ACTION_APPLY = 'APPLY']
9
+
10
+ # The action to perform on the patch.
11
+ # @return [String]
12
+ attr_accessor :action
13
+
14
+ # The OCID of the patch.
15
+ # @return [String]
16
+ attr_accessor :patch_id
17
+
18
+
19
+ # Initializes the object
20
+ # @param [Hash] attributes Model attributes in the form of hash
21
+ def initialize(attributes = {})
22
+ return unless attributes.is_a?(Hash)
23
+
24
+ # convert string to symbol for hash key
25
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
26
+
27
+ if attributes[:'action']
28
+ self.action = attributes[:'action']
29
+ end
30
+
31
+ if attributes[:'patchId']
32
+ self.patch_id = attributes[:'patchId']
33
+ end
34
+
35
+ end
36
+
37
+ # Custom attribute writer method checking allowed values (enum).
38
+ # @param [Object] action Object to be assigned
39
+ def action=(action)
40
+ if action && !ACTION_ENUM.include?(action)
41
+ fail "Invalid value for 'action': this must be one of the values in ACTION_ENUM."
42
+ else
43
+ @action = action
44
+ end
45
+ end
46
+
47
+ # Checks equality by comparing each attribute.
48
+ # @param [Object] other_object to be compared
49
+ def ==(other_object)
50
+ return true if self.equal?(other_object)
51
+ self.class == other_object.class &&
52
+ action == other_object.action &&
53
+ patch_id == other_object.patch_id
54
+ end
55
+
56
+ # @see the `==` method
57
+ # @param [Object] other_object to be compared
58
+ def eql?(other_object)
59
+ self == other_object
60
+ end
61
+
62
+ # Calculates hash code according to all attributes.
63
+ # @return [Fixnum] Hash code
64
+ def hash
65
+ [action, patch_id].hash
66
+ end
67
+
68
+ # Builds the object from hash
69
+ # @param [Hash] attributes Model attributes in the form of hash
70
+ # @return [Object] Returns the model itself
71
+ def build_from_hash(attributes)
72
+ return nil unless attributes.is_a?(Hash)
73
+ self.class.swagger_types.each_pair do |key, type|
74
+ if type =~ /^Array<(.*)>/i
75
+ # check to ensure the input is an array given that the the attribute
76
+ # is documented as an array but the input is not
77
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
78
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
79
+ end
80
+ elsif !attributes[self.class.attribute_map[key]].nil?
81
+ self.send("#{key}=", OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
82
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
83
+ end
84
+
85
+ self
86
+ end
87
+
88
+ # Returns the string representation of the object
89
+ # @return [String] String presentation of the object
90
+ def to_s
91
+ to_hash.to_s
92
+ end
93
+
94
+ # Returns the object in the form of hash
95
+ # @return [Hash] Returns the object in the form of hash
96
+ def to_hash
97
+ hash = {}
98
+ self.class.attribute_map.each_pair do |attr, param|
99
+ value = self.send(attr)
100
+ next if value.nil?
101
+ hash[param] = _to_hash(value)
102
+ end
103
+ hash
104
+ end
105
+
106
+ private
107
+
108
+ # Outputs non-array value in the form of hash
109
+ # For object, use to_hash. Otherwise, just return the value
110
+ # @param [Object] value Any valid value
111
+ # @return [Hash] Returns the value in the form of hash
112
+ def _to_hash(value)
113
+ if value.is_a?(Array)
114
+ value.compact.map{ |v| _to_hash(v) }
115
+ elsif value.is_a?(Hash)
116
+ {}.tap do |hash|
117
+ value.each { |k, v| hash[k] = _to_hash(v) }
118
+ end
119
+ elsif value.respond_to? :to_hash
120
+ value.to_hash
121
+ else
122
+ value
123
+ end
124
+ end
125
+
126
+
127
+
128
+ # Attribute mapping from ruby-style variable name to JSON key.
129
+ def self.attribute_map
130
+ {
131
+ :'action' => :'action',
132
+ :'patch_id' => :'patchId'
133
+ }
134
+ end
135
+
136
+ # Attribute type mapping.
137
+ def self.swagger_types
138
+ {
139
+ :'action' => :'String',
140
+ :'patch_id' => :'String'
141
+ }
142
+ end
143
+ end
144
+ end
@@ -0,0 +1,218 @@
1
+ # Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
2
+
3
+ require 'date'
4
+
5
+ module OCI
6
+ class Database::Models::PatchHistoryEntry
7
+
8
+ ACTION_ENUM = [ACTION_APPLY = 'APPLY',
9
+ ACTION_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE']
10
+
11
+
12
+ LIFECYCLE_STATE_ENUM = [LIFECYCLE_STATE_IN_PROGRESS = 'IN_PROGRESS',
13
+ LIFECYCLE_STATE_SUCCEEDED = 'SUCCEEDED',
14
+ LIFECYCLE_STATE_FAILED = 'FAILED',
15
+ LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE']
16
+
17
+ # The action being performed or was completed.
18
+ # @return [String]
19
+ attr_accessor :action
20
+
21
+ # The OCID of the patch history entry.
22
+ # @return [String]
23
+ attr_accessor :id
24
+
25
+ # A descriptive text associated with the lifecycleState.
26
+ # Typically contains additional displayable text.
27
+ #
28
+ # @return [String]
29
+ attr_accessor :lifecycle_details
30
+
31
+ # The current state of the action.
32
+ # @return [String]
33
+ attr_accessor :lifecycle_state
34
+
35
+ # The OCID of the patch.
36
+ # @return [String]
37
+ attr_accessor :patch_id
38
+
39
+ # The date and time when the patch action completed.
40
+ # @return [DateTime]
41
+ attr_accessor :time_ended
42
+
43
+ # The date and time when the patch action started.
44
+ # @return [DateTime]
45
+ attr_accessor :time_started
46
+
47
+
48
+ # Initializes the object
49
+ # @param [Hash] attributes Model attributes in the form of hash
50
+ def initialize(attributes = {})
51
+ return unless attributes.is_a?(Hash)
52
+
53
+ # convert string to symbol for hash key
54
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
55
+
56
+ if attributes[:'action']
57
+ self.action = attributes[:'action']
58
+ end
59
+
60
+ if attributes[:'id']
61
+ self.id = attributes[:'id']
62
+ end
63
+
64
+ if attributes[:'lifecycleDetails']
65
+ self.lifecycle_details = attributes[:'lifecycleDetails']
66
+ end
67
+
68
+ if attributes[:'lifecycleState']
69
+ self.lifecycle_state = attributes[:'lifecycleState']
70
+ end
71
+
72
+ if attributes[:'patchId']
73
+ self.patch_id = attributes[:'patchId']
74
+ end
75
+
76
+ if attributes[:'timeEnded']
77
+ self.time_ended = attributes[:'timeEnded']
78
+ end
79
+
80
+ if attributes[:'timeStarted']
81
+ self.time_started = attributes[:'timeStarted']
82
+ end
83
+
84
+ end
85
+
86
+ # Custom attribute writer method checking allowed values (enum).
87
+ # @param [Object] action Object to be assigned
88
+ def action=(action)
89
+ if action && !ACTION_ENUM.include?(action)
90
+ @action = ACTION_UNKNOWN_ENUM_VALUE
91
+ else
92
+ @action = action
93
+ end
94
+ end
95
+
96
+ # Custom attribute writer method checking allowed values (enum).
97
+ # @param [Object] lifecycle_state Object to be assigned
98
+ def lifecycle_state=(lifecycle_state)
99
+ if lifecycle_state && !LIFECYCLE_STATE_ENUM.include?(lifecycle_state)
100
+ @lifecycle_state = LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE
101
+ else
102
+ @lifecycle_state = lifecycle_state
103
+ end
104
+ end
105
+
106
+ # Checks equality by comparing each attribute.
107
+ # @param [Object] other_object to be compared
108
+ def ==(other_object)
109
+ return true if self.equal?(other_object)
110
+ self.class == other_object.class &&
111
+ action == other_object.action &&
112
+ id == other_object.id &&
113
+ lifecycle_details == other_object.lifecycle_details &&
114
+ lifecycle_state == other_object.lifecycle_state &&
115
+ patch_id == other_object.patch_id &&
116
+ time_ended == other_object.time_ended &&
117
+ time_started == other_object.time_started
118
+ end
119
+
120
+ # @see the `==` method
121
+ # @param [Object] other_object to be compared
122
+ def eql?(other_object)
123
+ self == other_object
124
+ end
125
+
126
+ # Calculates hash code according to all attributes.
127
+ # @return [Fixnum] Hash code
128
+ def hash
129
+ [action, id, lifecycle_details, lifecycle_state, patch_id, time_ended, time_started].hash
130
+ end
131
+
132
+ # Builds the object from hash
133
+ # @param [Hash] attributes Model attributes in the form of hash
134
+ # @return [Object] Returns the model itself
135
+ def build_from_hash(attributes)
136
+ return nil unless attributes.is_a?(Hash)
137
+ self.class.swagger_types.each_pair do |key, type|
138
+ if type =~ /^Array<(.*)>/i
139
+ # check to ensure the input is an array given that the the attribute
140
+ # is documented as an array but the input is not
141
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
142
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
143
+ end
144
+ elsif !attributes[self.class.attribute_map[key]].nil?
145
+ self.send("#{key}=", OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
146
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
147
+ end
148
+
149
+ self
150
+ end
151
+
152
+ # Returns the string representation of the object
153
+ # @return [String] String presentation of the object
154
+ def to_s
155
+ to_hash.to_s
156
+ end
157
+
158
+ # Returns the object in the form of hash
159
+ # @return [Hash] Returns the object in the form of hash
160
+ def to_hash
161
+ hash = {}
162
+ self.class.attribute_map.each_pair do |attr, param|
163
+ value = self.send(attr)
164
+ next if value.nil?
165
+ hash[param] = _to_hash(value)
166
+ end
167
+ hash
168
+ end
169
+
170
+ private
171
+
172
+ # Outputs non-array value in the form of hash
173
+ # For object, use to_hash. Otherwise, just return the value
174
+ # @param [Object] value Any valid value
175
+ # @return [Hash] Returns the value in the form of hash
176
+ def _to_hash(value)
177
+ if value.is_a?(Array)
178
+ value.compact.map{ |v| _to_hash(v) }
179
+ elsif value.is_a?(Hash)
180
+ {}.tap do |hash|
181
+ value.each { |k, v| hash[k] = _to_hash(v) }
182
+ end
183
+ elsif value.respond_to? :to_hash
184
+ value.to_hash
185
+ else
186
+ value
187
+ end
188
+ end
189
+
190
+
191
+
192
+ # Attribute mapping from ruby-style variable name to JSON key.
193
+ def self.attribute_map
194
+ {
195
+ :'action' => :'action',
196
+ :'id' => :'id',
197
+ :'lifecycle_details' => :'lifecycleDetails',
198
+ :'lifecycle_state' => :'lifecycleState',
199
+ :'patch_id' => :'patchId',
200
+ :'time_ended' => :'timeEnded',
201
+ :'time_started' => :'timeStarted'
202
+ }
203
+ end
204
+
205
+ # Attribute type mapping.
206
+ def self.swagger_types
207
+ {
208
+ :'action' => :'String',
209
+ :'id' => :'String',
210
+ :'lifecycle_details' => :'String',
211
+ :'lifecycle_state' => :'String',
212
+ :'patch_id' => :'String',
213
+ :'time_ended' => :'DateTime',
214
+ :'time_started' => :'DateTime'
215
+ }
216
+ end
217
+ end
218
+ end