oci 2.3.6 → 2.3.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (76) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +11 -10
  3. data/lib/oci.rb +1 -0
  4. data/lib/oci/api_client.rb +2 -2
  5. data/lib/oci/audit/audit_client.rb +11 -9
  6. data/lib/oci/base_signer.rb +13 -13
  7. data/lib/oci/container_engine/container_engine_client.rb +43 -39
  8. data/lib/oci/container_engine/models/node_error.rb +1 -1
  9. data/lib/oci/container_engine/models/work_request_error.rb +1 -1
  10. data/lib/oci/core/blockstorage_client.rb +421 -75
  11. data/lib/oci/core/compute_client.rb +77 -75
  12. data/lib/oci/core/compute_client_composite_operations.rb +40 -0
  13. data/lib/oci/core/core.rb +4 -0
  14. data/lib/oci/core/models/boot_volume.rb +18 -4
  15. data/lib/oci/core/models/boot_volume_kms_key.rb +152 -0
  16. data/lib/oci/core/models/create_boot_volume_details.rb +15 -1
  17. data/lib/oci/core/models/create_image_details.rb +2 -0
  18. data/lib/oci/core/models/create_volume_details.rb +15 -1
  19. data/lib/oci/core/models/fast_connect_provider_service.rb +1 -1
  20. data/lib/oci/core/models/image.rb +2 -0
  21. data/lib/oci/core/models/instance.rb +2 -0
  22. data/lib/oci/core/models/instance_source_via_image_details.rb +18 -4
  23. data/lib/oci/core/models/launch_options.rb +2 -0
  24. data/lib/oci/core/models/update_boot_volume_kms_key_details.rb +154 -0
  25. data/lib/oci/core/models/update_volume_kms_key_details.rb +154 -0
  26. data/lib/oci/core/models/volume.rb +15 -1
  27. data/lib/oci/core/models/volume_kms_key.rb +152 -0
  28. data/lib/oci/core/virtual_network_client.rb +233 -231
  29. data/lib/oci/core/virtual_network_client_composite_operations.rb +80 -0
  30. data/lib/oci/database/database_client.rb +123 -121
  31. data/lib/oci/database/database_client_composite_operations.rb +399 -0
  32. data/lib/oci/database/models/patch.rb +1 -1
  33. data/lib/oci/database/models/patch_summary.rb +1 -1
  34. data/lib/oci/dns/dns_client.rb +38 -36
  35. data/lib/oci/email/email_client.rb +21 -19
  36. data/lib/oci/email/models/sender.rb +1 -1
  37. data/lib/oci/email/models/suppression.rb +1 -1
  38. data/lib/oci/file_storage/file_storage_client.rb +49 -47
  39. data/lib/oci/identity/identity_client.rb +151 -149
  40. data/lib/oci/identity/identity_client_composite_operations.rb +40 -0
  41. data/lib/oci/key_management/key_management.rb +40 -0
  42. data/lib/oci/key_management/kms_crypto_client.rb +258 -0
  43. data/lib/oci/key_management/kms_crypto_client_composite_operations.rb +24 -0
  44. data/lib/oci/key_management/kms_management_client.rb +716 -0
  45. data/lib/oci/key_management/kms_management_client_composite_operations.rb +181 -0
  46. data/lib/oci/key_management/kms_vault_client.rb +533 -0
  47. data/lib/oci/key_management/kms_vault_client_composite_operations.rb +182 -0
  48. data/lib/oci/key_management/models/create_key_details.rb +180 -0
  49. data/lib/oci/key_management/models/create_vault_details.rb +194 -0
  50. data/lib/oci/key_management/models/decrypt_data_details.rb +177 -0
  51. data/lib/oci/key_management/models/decrypted_data.rb +160 -0
  52. data/lib/oci/key_management/models/encrypt_data_details.rb +177 -0
  53. data/lib/oci/key_management/models/encrypted_data.rb +146 -0
  54. data/lib/oci/key_management/models/generate_key_details.rb +195 -0
  55. data/lib/oci/key_management/models/generated_key.rb +177 -0
  56. data/lib/oci/key_management/models/key.rb +318 -0
  57. data/lib/oci/key_management/models/key_shape.rb +178 -0
  58. data/lib/oci/key_management/models/key_summary.rb +287 -0
  59. data/lib/oci/key_management/models/key_version.rb +205 -0
  60. data/lib/oci/key_management/models/key_version_summary.rb +205 -0
  61. data/lib/oci/key_management/models/schedule_vault_deletion_details.rb +153 -0
  62. data/lib/oci/key_management/models/update_key_details.rb +152 -0
  63. data/lib/oci/key_management/models/update_vault_details.rb +152 -0
  64. data/lib/oci/key_management/models/vault.rb +350 -0
  65. data/lib/oci/key_management/models/vault_summary.rb +334 -0
  66. data/lib/oci/key_management/util.rb +2 -0
  67. data/lib/oci/load_balancer/load_balancer_client.rb +89 -87
  68. data/lib/oci/object_storage/models/bucket.rb +18 -4
  69. data/lib/oci/object_storage/models/create_bucket_details.rb +18 -4
  70. data/lib/oci/object_storage/models/multipart_upload.rb +1 -1
  71. data/lib/oci/object_storage/models/preauthenticated_request.rb +1 -1
  72. data/lib/oci/object_storage/models/update_bucket_details.rb +22 -4
  73. data/lib/oci/object_storage/object_storage_client.rb +63 -58
  74. data/lib/oci/resource_search/resource_search_client.rb +11 -9
  75. data/lib/oci/version.rb +1 -1
  76. metadata +32 -2
@@ -0,0 +1,152 @@
1
+ # Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
2
+
3
+ require 'date'
4
+
5
+ # rubocop:disable Lint/UnneededCopDisableDirective
6
+ module OCI
7
+ # UpdateVaultDetails model.
8
+ class KeyManagement::Models::UpdateVaultDetails # rubocop:disable Metrics/LineLength
9
+ # A user-friendly name for the vault. It does not have to be unique, and it is changeable.
10
+ # Avoid entering confidential information.
11
+ #
12
+ # @return [String]
13
+ attr_accessor :display_name
14
+
15
+ # Attribute mapping from ruby-style variable name to JSON key.
16
+ def self.attribute_map
17
+ {
18
+ # rubocop:disable Style/SymbolLiteral
19
+ 'display_name': :'displayName'
20
+ # rubocop:enable Style/SymbolLiteral
21
+ }
22
+ end
23
+
24
+ # Attribute type mapping.
25
+ def self.swagger_types
26
+ {
27
+ # rubocop:disable Style/SymbolLiteral
28
+ 'display_name': :'String'
29
+ # rubocop:enable Style/SymbolLiteral
30
+ }
31
+ end
32
+
33
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
34
+ # rubocop:disable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
35
+
36
+
37
+ # Initializes the object
38
+ # @param [Hash] attributes Model attributes in the form of hash
39
+ # @option attributes [String] :display_name The value to assign to the {#display_name} property
40
+ def initialize(attributes = {})
41
+ return unless attributes.is_a?(Hash)
42
+
43
+ # convert string to symbol for hash key
44
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
45
+
46
+ self.display_name = attributes[:'displayName'] if attributes[:'displayName']
47
+
48
+ raise 'You cannot provide both :displayName and :display_name' if attributes.key?(:'displayName') && attributes.key?(:'display_name')
49
+
50
+ self.display_name = attributes[:'display_name'] if attributes[:'display_name']
51
+ end
52
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
53
+ # rubocop:enable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
54
+
55
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
56
+
57
+
58
+ # Checks equality by comparing each attribute.
59
+ # @param [Object] other the other object to be compared
60
+ def ==(other)
61
+ return true if equal?(other)
62
+ self.class == other.class &&
63
+ display_name == other.display_name
64
+ end
65
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
66
+
67
+ # @see the `==` method
68
+ # @param [Object] other the other object to be compared
69
+ def eql?(other)
70
+ self == other
71
+ end
72
+
73
+ # rubocop:disable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
74
+
75
+
76
+ # Calculates hash code according to all attributes.
77
+ # @return [Fixnum] Hash code
78
+ def hash
79
+ [display_name].hash
80
+ end
81
+ # rubocop:enable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
82
+
83
+ # rubocop:disable Metrics/AbcSize, Layout/EmptyLines
84
+
85
+
86
+ # Builds the object from hash
87
+ # @param [Hash] attributes Model attributes in the form of hash
88
+ # @return [Object] Returns the model itself
89
+ def build_from_hash(attributes)
90
+ return nil unless attributes.is_a?(Hash)
91
+ self.class.swagger_types.each_pair do |key, type|
92
+ if type =~ /^Array<(.*)>/i
93
+ # check to ensure the input is an array given that the the attribute
94
+ # is documented as an array but the input is not
95
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
96
+ public_method("#{key}=").call(
97
+ attributes[self.class.attribute_map[key]]
98
+ .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
99
+ )
100
+ end
101
+ elsif !attributes[self.class.attribute_map[key]].nil?
102
+ public_method("#{key}=").call(
103
+ OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
104
+ )
105
+ end
106
+ # or else data not found in attributes(hash), not an issue as the data can be optional
107
+ end
108
+
109
+ self
110
+ end
111
+ # rubocop:enable Metrics/AbcSize, Layout/EmptyLines
112
+
113
+ # Returns the string representation of the object
114
+ # @return [String] String presentation of the object
115
+ def to_s
116
+ to_hash.to_s
117
+ end
118
+
119
+ # Returns the object in the form of hash
120
+ # @return [Hash] Returns the object in the form of hash
121
+ def to_hash
122
+ hash = {}
123
+ self.class.attribute_map.each_pair do |attr, param|
124
+ value = public_method(attr).call
125
+ next if value.nil? && !instance_variable_defined?("@#{attr}")
126
+ hash[param] = _to_hash(value)
127
+ end
128
+ hash
129
+ end
130
+
131
+ private
132
+
133
+ # Outputs non-array value in the form of hash
134
+ # For object, use to_hash. Otherwise, just return the value
135
+ # @param [Object] value Any valid value
136
+ # @return [Hash] Returns the value in the form of hash
137
+ def _to_hash(value)
138
+ if value.is_a?(Array)
139
+ value.compact.map { |v| _to_hash(v) }
140
+ elsif value.is_a?(Hash)
141
+ {}.tap do |hash|
142
+ value.each { |k, v| hash[k] = _to_hash(v) }
143
+ end
144
+ elsif value.respond_to? :to_hash
145
+ value.to_hash
146
+ else
147
+ value
148
+ end
149
+ end
150
+ end
151
+ end
152
+ # rubocop:enable Lint/UnneededCopDisableDirective
@@ -0,0 +1,350 @@
1
+ # Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
2
+
3
+ require 'date'
4
+ require 'logger'
5
+
6
+ # rubocop:disable Lint/UnneededCopDisableDirective
7
+ module OCI
8
+ # Vault model.
9
+ class KeyManagement::Models::Vault # rubocop:disable Metrics/LineLength
10
+ LIFECYCLE_STATE_ENUM = [
11
+ LIFECYCLE_STATE_CREATING = 'CREATING'.freeze,
12
+ LIFECYCLE_STATE_ACTIVE = 'ACTIVE'.freeze,
13
+ LIFECYCLE_STATE_DELETING = 'DELETING'.freeze,
14
+ LIFECYCLE_STATE_DELETED = 'DELETED'.freeze,
15
+ LIFECYCLE_STATE_PENDING_DELETION = 'PENDING_DELETION'.freeze,
16
+ LIFECYCLE_STATE_SCHEDULING_DELETION = 'SCHEDULING_DELETION'.freeze,
17
+ LIFECYCLE_STATE_CANCELLING_DELETION = 'CANCELLING_DELETION'.freeze,
18
+ LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
19
+ ].freeze
20
+
21
+ VAULT_TYPE_ENUM = [
22
+ VAULT_TYPE_VIRTUAL_PRIVATE = 'VIRTUAL_PRIVATE'.freeze,
23
+ VAULT_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
24
+ ].freeze
25
+
26
+ # **[Required]** The OCID of the compartment that contains this vault.
27
+ # @return [String]
28
+ attr_accessor :compartment_id
29
+
30
+ # **[Required]** The service endpoint to perform cryptographic operations against. Cryptographic operations include 'Encrypt,' 'Decrypt,' and 'GenerateDataEncryptionKey' operations.
31
+ #
32
+ # @return [String]
33
+ attr_accessor :crypto_endpoint
34
+
35
+ # Usage of predefined tag keys. These predefined keys are scoped to namespaces.
36
+ # Example: `{\"foo-namespace\": {\"bar-key\": \"foo-value\"}}`
37
+ #
38
+ # @return [Hash<String, Hash<String, Object>>]
39
+ attr_accessor :defined_tags
40
+
41
+ # **[Required]** A user-friendly name for the vault. It does not have to be unique, and it is changeable.
42
+ # Avoid entering confidential information.
43
+ #
44
+ # @return [String]
45
+ attr_accessor :display_name
46
+
47
+ # Simple key-value pair that is applied without any predefined name, type, or scope.
48
+ # Exists for cross-compatibility only.
49
+ # Example: `{\"bar-key\": \"value\"}`
50
+ #
51
+ # @return [Hash<String, String>]
52
+ attr_accessor :freeform_tags
53
+
54
+ # **[Required]** The OCID of the vault.
55
+ # @return [String]
56
+ attr_accessor :id
57
+
58
+ # **[Required]** The vault's current state.
59
+ #
60
+ # Example: `DELETED`
61
+ #
62
+ # @return [String]
63
+ attr_reader :lifecycle_state
64
+
65
+ # **[Required]** The service endpoint to perform management operations against. Management operations include 'Create,' 'Update,' 'List,' 'Get,' and 'Delete' operations.
66
+ #
67
+ # @return [String]
68
+ attr_accessor :management_endpoint
69
+
70
+ # **[Required]** The date and time this vault was created, expressed in [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format.
71
+ #
72
+ # Example: `2018-04-03T21:10:29.600Z`
73
+ #
74
+ # @return [DateTime]
75
+ attr_accessor :time_created
76
+
77
+ # An optional property for the deletion time of the Vault expressed in [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format.
78
+ # Example: `2018-04-03T21:10:29.600Z`
79
+ #
80
+ # @return [DateTime]
81
+ attr_accessor :time_of_deletion
82
+
83
+ # **[Required]** The type of vault. Each type of vault stores the key with different degrees of isolation and has different options and pricing.
84
+ # @return [String]
85
+ attr_reader :vault_type
86
+
87
+ # Attribute mapping from ruby-style variable name to JSON key.
88
+ def self.attribute_map
89
+ {
90
+ # rubocop:disable Style/SymbolLiteral
91
+ 'compartment_id': :'compartmentId',
92
+ 'crypto_endpoint': :'cryptoEndpoint',
93
+ 'defined_tags': :'definedTags',
94
+ 'display_name': :'displayName',
95
+ 'freeform_tags': :'freeformTags',
96
+ 'id': :'id',
97
+ 'lifecycle_state': :'lifecycleState',
98
+ 'management_endpoint': :'managementEndpoint',
99
+ 'time_created': :'timeCreated',
100
+ 'time_of_deletion': :'timeOfDeletion',
101
+ 'vault_type': :'vaultType'
102
+ # rubocop:enable Style/SymbolLiteral
103
+ }
104
+ end
105
+
106
+ # Attribute type mapping.
107
+ def self.swagger_types
108
+ {
109
+ # rubocop:disable Style/SymbolLiteral
110
+ 'compartment_id': :'String',
111
+ 'crypto_endpoint': :'String',
112
+ 'defined_tags': :'Hash<String, Hash<String, Object>>',
113
+ 'display_name': :'String',
114
+ 'freeform_tags': :'Hash<String, String>',
115
+ 'id': :'String',
116
+ 'lifecycle_state': :'String',
117
+ 'management_endpoint': :'String',
118
+ 'time_created': :'DateTime',
119
+ 'time_of_deletion': :'DateTime',
120
+ 'vault_type': :'String'
121
+ # rubocop:enable Style/SymbolLiteral
122
+ }
123
+ end
124
+
125
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
126
+ # rubocop:disable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
127
+
128
+
129
+ # Initializes the object
130
+ # @param [Hash] attributes Model attributes in the form of hash
131
+ # @option attributes [String] :compartment_id The value to assign to the {#compartment_id} property
132
+ # @option attributes [String] :crypto_endpoint The value to assign to the {#crypto_endpoint} property
133
+ # @option attributes [Hash<String, Hash<String, Object>>] :defined_tags The value to assign to the {#defined_tags} property
134
+ # @option attributes [String] :display_name The value to assign to the {#display_name} property
135
+ # @option attributes [Hash<String, String>] :freeform_tags The value to assign to the {#freeform_tags} property
136
+ # @option attributes [String] :id The value to assign to the {#id} property
137
+ # @option attributes [String] :lifecycle_state The value to assign to the {#lifecycle_state} property
138
+ # @option attributes [String] :management_endpoint The value to assign to the {#management_endpoint} property
139
+ # @option attributes [DateTime] :time_created The value to assign to the {#time_created} property
140
+ # @option attributes [DateTime] :time_of_deletion The value to assign to the {#time_of_deletion} property
141
+ # @option attributes [String] :vault_type The value to assign to the {#vault_type} property
142
+ def initialize(attributes = {})
143
+ return unless attributes.is_a?(Hash)
144
+
145
+ # convert string to symbol for hash key
146
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
147
+
148
+ self.compartment_id = attributes[:'compartmentId'] if attributes[:'compartmentId']
149
+
150
+ raise 'You cannot provide both :compartmentId and :compartment_id' if attributes.key?(:'compartmentId') && attributes.key?(:'compartment_id')
151
+
152
+ self.compartment_id = attributes[:'compartment_id'] if attributes[:'compartment_id']
153
+
154
+ self.crypto_endpoint = attributes[:'cryptoEndpoint'] if attributes[:'cryptoEndpoint']
155
+
156
+ raise 'You cannot provide both :cryptoEndpoint and :crypto_endpoint' if attributes.key?(:'cryptoEndpoint') && attributes.key?(:'crypto_endpoint')
157
+
158
+ self.crypto_endpoint = attributes[:'crypto_endpoint'] if attributes[:'crypto_endpoint']
159
+
160
+ self.defined_tags = attributes[:'definedTags'] if attributes[:'definedTags']
161
+
162
+ raise 'You cannot provide both :definedTags and :defined_tags' if attributes.key?(:'definedTags') && attributes.key?(:'defined_tags')
163
+
164
+ self.defined_tags = attributes[:'defined_tags'] if attributes[:'defined_tags']
165
+
166
+ self.display_name = attributes[:'displayName'] if attributes[:'displayName']
167
+
168
+ raise 'You cannot provide both :displayName and :display_name' if attributes.key?(:'displayName') && attributes.key?(:'display_name')
169
+
170
+ self.display_name = attributes[:'display_name'] if attributes[:'display_name']
171
+
172
+ self.freeform_tags = attributes[:'freeformTags'] if attributes[:'freeformTags']
173
+
174
+ raise 'You cannot provide both :freeformTags and :freeform_tags' if attributes.key?(:'freeformTags') && attributes.key?(:'freeform_tags')
175
+
176
+ self.freeform_tags = attributes[:'freeform_tags'] if attributes[:'freeform_tags']
177
+
178
+ self.id = attributes[:'id'] if attributes[:'id']
179
+
180
+ self.lifecycle_state = attributes[:'lifecycleState'] if attributes[:'lifecycleState']
181
+
182
+ raise 'You cannot provide both :lifecycleState and :lifecycle_state' if attributes.key?(:'lifecycleState') && attributes.key?(:'lifecycle_state')
183
+
184
+ self.lifecycle_state = attributes[:'lifecycle_state'] if attributes[:'lifecycle_state']
185
+
186
+ self.management_endpoint = attributes[:'managementEndpoint'] if attributes[:'managementEndpoint']
187
+
188
+ raise 'You cannot provide both :managementEndpoint and :management_endpoint' if attributes.key?(:'managementEndpoint') && attributes.key?(:'management_endpoint')
189
+
190
+ self.management_endpoint = attributes[:'management_endpoint'] if attributes[:'management_endpoint']
191
+
192
+ self.time_created = attributes[:'timeCreated'] if attributes[:'timeCreated']
193
+
194
+ raise 'You cannot provide both :timeCreated and :time_created' if attributes.key?(:'timeCreated') && attributes.key?(:'time_created')
195
+
196
+ self.time_created = attributes[:'time_created'] if attributes[:'time_created']
197
+
198
+ self.time_of_deletion = attributes[:'timeOfDeletion'] if attributes[:'timeOfDeletion']
199
+
200
+ raise 'You cannot provide both :timeOfDeletion and :time_of_deletion' if attributes.key?(:'timeOfDeletion') && attributes.key?(:'time_of_deletion')
201
+
202
+ self.time_of_deletion = attributes[:'time_of_deletion'] if attributes[:'time_of_deletion']
203
+
204
+ self.vault_type = attributes[:'vaultType'] if attributes[:'vaultType']
205
+
206
+ raise 'You cannot provide both :vaultType and :vault_type' if attributes.key?(:'vaultType') && attributes.key?(:'vault_type')
207
+
208
+ self.vault_type = attributes[:'vault_type'] if attributes[:'vault_type']
209
+ end
210
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
211
+ # rubocop:enable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
212
+
213
+ # Custom attribute writer method checking allowed values (enum).
214
+ # @param [Object] lifecycle_state Object to be assigned
215
+ def lifecycle_state=(lifecycle_state)
216
+ # rubocop:disable Style/ConditionalAssignment
217
+ if lifecycle_state && !LIFECYCLE_STATE_ENUM.include?(lifecycle_state)
218
+ # rubocop: disable Metrics/LineLength
219
+ OCI.logger.debug("Unknown value for 'lifecycle_state' [" + lifecycle_state + "]. Mapping to 'LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE'") if OCI.logger
220
+ # rubocop: enable Metrics/LineLength
221
+ @lifecycle_state = LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE
222
+ else
223
+ @lifecycle_state = lifecycle_state
224
+ end
225
+ # rubocop:enable Style/ConditionalAssignment
226
+ end
227
+
228
+ # Custom attribute writer method checking allowed values (enum).
229
+ # @param [Object] vault_type Object to be assigned
230
+ def vault_type=(vault_type)
231
+ # rubocop:disable Style/ConditionalAssignment
232
+ if vault_type && !VAULT_TYPE_ENUM.include?(vault_type)
233
+ # rubocop: disable Metrics/LineLength
234
+ OCI.logger.debug("Unknown value for 'vault_type' [" + vault_type + "]. Mapping to 'VAULT_TYPE_UNKNOWN_ENUM_VALUE'") if OCI.logger
235
+ # rubocop: enable Metrics/LineLength
236
+ @vault_type = VAULT_TYPE_UNKNOWN_ENUM_VALUE
237
+ else
238
+ @vault_type = vault_type
239
+ end
240
+ # rubocop:enable Style/ConditionalAssignment
241
+ end
242
+
243
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
244
+
245
+
246
+ # Checks equality by comparing each attribute.
247
+ # @param [Object] other the other object to be compared
248
+ def ==(other)
249
+ return true if equal?(other)
250
+ self.class == other.class &&
251
+ compartment_id == other.compartment_id &&
252
+ crypto_endpoint == other.crypto_endpoint &&
253
+ defined_tags == other.defined_tags &&
254
+ display_name == other.display_name &&
255
+ freeform_tags == other.freeform_tags &&
256
+ id == other.id &&
257
+ lifecycle_state == other.lifecycle_state &&
258
+ management_endpoint == other.management_endpoint &&
259
+ time_created == other.time_created &&
260
+ time_of_deletion == other.time_of_deletion &&
261
+ vault_type == other.vault_type
262
+ end
263
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
264
+
265
+ # @see the `==` method
266
+ # @param [Object] other the other object to be compared
267
+ def eql?(other)
268
+ self == other
269
+ end
270
+
271
+ # rubocop:disable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
272
+
273
+
274
+ # Calculates hash code according to all attributes.
275
+ # @return [Fixnum] Hash code
276
+ def hash
277
+ [compartment_id, crypto_endpoint, defined_tags, display_name, freeform_tags, id, lifecycle_state, management_endpoint, time_created, time_of_deletion, vault_type].hash
278
+ end
279
+ # rubocop:enable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
280
+
281
+ # rubocop:disable Metrics/AbcSize, Layout/EmptyLines
282
+
283
+
284
+ # Builds the object from hash
285
+ # @param [Hash] attributes Model attributes in the form of hash
286
+ # @return [Object] Returns the model itself
287
+ def build_from_hash(attributes)
288
+ return nil unless attributes.is_a?(Hash)
289
+ self.class.swagger_types.each_pair do |key, type|
290
+ if type =~ /^Array<(.*)>/i
291
+ # check to ensure the input is an array given that the the attribute
292
+ # is documented as an array but the input is not
293
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
294
+ public_method("#{key}=").call(
295
+ attributes[self.class.attribute_map[key]]
296
+ .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
297
+ )
298
+ end
299
+ elsif !attributes[self.class.attribute_map[key]].nil?
300
+ public_method("#{key}=").call(
301
+ OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
302
+ )
303
+ end
304
+ # or else data not found in attributes(hash), not an issue as the data can be optional
305
+ end
306
+
307
+ self
308
+ end
309
+ # rubocop:enable Metrics/AbcSize, Layout/EmptyLines
310
+
311
+ # Returns the string representation of the object
312
+ # @return [String] String presentation of the object
313
+ def to_s
314
+ to_hash.to_s
315
+ end
316
+
317
+ # Returns the object in the form of hash
318
+ # @return [Hash] Returns the object in the form of hash
319
+ def to_hash
320
+ hash = {}
321
+ self.class.attribute_map.each_pair do |attr, param|
322
+ value = public_method(attr).call
323
+ next if value.nil? && !instance_variable_defined?("@#{attr}")
324
+ hash[param] = _to_hash(value)
325
+ end
326
+ hash
327
+ end
328
+
329
+ private
330
+
331
+ # Outputs non-array value in the form of hash
332
+ # For object, use to_hash. Otherwise, just return the value
333
+ # @param [Object] value Any valid value
334
+ # @return [Hash] Returns the value in the form of hash
335
+ def _to_hash(value)
336
+ if value.is_a?(Array)
337
+ value.compact.map { |v| _to_hash(v) }
338
+ elsif value.is_a?(Hash)
339
+ {}.tap do |hash|
340
+ value.each { |k, v| hash[k] = _to_hash(v) }
341
+ end
342
+ elsif value.respond_to? :to_hash
343
+ value.to_hash
344
+ else
345
+ value
346
+ end
347
+ end
348
+ end
349
+ end
350
+ # rubocop:enable Lint/UnneededCopDisableDirective