oci 2.3.7 → 2.3.8

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 (43) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/lib/oci/core/blockstorage_client.rb +56 -24
  4. data/lib/oci/core/compute_client.rb +578 -24
  5. data/lib/oci/core/core.rb +11 -0
  6. data/lib/oci/core/models/app_catalog_listing.rb +242 -0
  7. data/lib/oci/core/models/app_catalog_listing_resource_version.rb +295 -0
  8. data/lib/oci/core/models/app_catalog_listing_resource_version_agreements.rb +219 -0
  9. data/lib/oci/core/models/app_catalog_listing_resource_version_summary.rb +194 -0
  10. data/lib/oci/core/models/app_catalog_listing_summary.rb +188 -0
  11. data/lib/oci/core/models/app_catalog_subscription.rb +246 -0
  12. data/lib/oci/core/models/app_catalog_subscription_summary.rb +246 -0
  13. data/lib/oci/core/models/create_app_catalog_subscription_details.rb +232 -0
  14. data/lib/oci/core/models/create_nat_gateway_details.rb +239 -0
  15. data/lib/oci/core/models/launch_instance_details.rb +4 -0
  16. data/lib/oci/core/models/nat_gateway.rb +333 -0
  17. data/lib/oci/core/models/public_ip.rb +76 -13
  18. data/lib/oci/core/models/service_gateway.rb +9 -4
  19. data/lib/oci/core/models/update_nat_gateway_details.rb +208 -0
  20. data/lib/oci/core/models/update_service_gateway_details.rb +9 -4
  21. data/lib/oci/core/virtual_network_client.rb +546 -91
  22. data/lib/oci/core/virtual_network_client_composite_operations.rb +119 -0
  23. data/lib/oci/object_storage/models/bucket.rb +18 -4
  24. data/lib/oci/object_storage/models/copy_object_details.rb +269 -0
  25. data/lib/oci/object_storage/models/multipart_upload.rb +1 -1
  26. data/lib/oci/object_storage/models/namespace_metadata.rb +1 -1
  27. data/lib/oci/object_storage/models/object_lifecycle_policy.rb +167 -0
  28. data/lib/oci/object_storage/models/object_lifecycle_rule.rb +245 -0
  29. data/lib/oci/object_storage/models/object_name_filter.rb +153 -0
  30. data/lib/oci/object_storage/models/preauthenticated_request.rb +1 -1
  31. data/lib/oci/object_storage/models/put_object_lifecycle_policy_details.rb +147 -0
  32. data/lib/oci/object_storage/models/restore_objects_details.rb +2 -2
  33. data/lib/oci/object_storage/models/work_request.rb +304 -0
  34. data/lib/oci/object_storage/models/work_request_error.rb +168 -0
  35. data/lib/oci/object_storage/models/work_request_log_entry.rb +156 -0
  36. data/lib/oci/object_storage/models/work_request_resource.rb +225 -0
  37. data/lib/oci/object_storage/models/work_request_resource_metadata_key.rb +12 -0
  38. data/lib/oci/object_storage/models/work_request_summary.rb +304 -0
  39. data/lib/oci/object_storage/object_storage.rb +12 -0
  40. data/lib/oci/object_storage/object_storage_client.rb +542 -17
  41. data/lib/oci/object_storage/object_storage_client_composite_operations.rb +53 -0
  42. data/lib/oci/version.rb +1 -1
  43. metadata +24 -2
@@ -57,6 +57,10 @@ module OCI
57
57
  # If you do not specify the fault domain, the system selects one for you. To change the fault
58
58
  # domain for an instance, terminate it and launch a new instance in the preferred fault domain.
59
59
  #
60
+ # To get a list of fault domains, use the
61
+ # {#list_fault_domains list_fault_domains} operation in the
62
+ # Identity and Access Management Service API.
63
+ #
60
64
  # Example: `FAULT-DOMAIN-1`
61
65
  #
62
66
  # @return [String]
@@ -0,0 +1,333 @@
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
+ # A NAT (Network Address Translation) gateway, which represents a router that lets instances
9
+ # without public IPs contact the public internet without exposing the instance to inbound
10
+ # internet traffic. For more information, see
11
+ # [NAT Gateway](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/NATgateway.htm).
12
+ #
13
+ # To use any of the API operations, you must be authorized in an
14
+ # IAM policy. If you are not authorized, talk to an
15
+ # administrator. If you are an administrator who needs to write
16
+ # policies to give users access, see [Getting Started with
17
+ # Policies](https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm).
18
+ #
19
+ # **Warning:** Oracle recommends that you avoid using any confidential information when you
20
+ # supply string values using the API.
21
+ #
22
+ class Core::Models::NatGateway # rubocop:disable Metrics/LineLength
23
+ LIFECYCLE_STATE_ENUM = [
24
+ LIFECYCLE_STATE_PROVISIONING = 'PROVISIONING'.freeze,
25
+ LIFECYCLE_STATE_AVAILABLE = 'AVAILABLE'.freeze,
26
+ LIFECYCLE_STATE_TERMINATING = 'TERMINATING'.freeze,
27
+ LIFECYCLE_STATE_TERMINATED = 'TERMINATED'.freeze,
28
+ LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
29
+ ].freeze
30
+
31
+ # **[Required]** The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the compartment that contains
32
+ # the NAT gateway.
33
+ #
34
+ # @return [String]
35
+ attr_accessor :compartment_id
36
+
37
+ # Defined tags for this resource. Each key is predefined and scoped to a namespace.
38
+ # For more information, see [Resource Tags](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm).
39
+ #
40
+ # Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`
41
+ #
42
+ # @return [Hash<String, Hash<String, Object>>]
43
+ attr_accessor :defined_tags
44
+
45
+ # A user-friendly name. Does not have to be unique, and it's changeable.
46
+ # Avoid entering confidential information.
47
+ #
48
+ # @return [String]
49
+ attr_accessor :display_name
50
+
51
+ # Free-form tags for this resource. Each tag is a simple key-value pair with no
52
+ # predefined name, type, or namespace. For more information, see
53
+ # [Resource Tags](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm).
54
+ #
55
+ # Example: `{\"Department\": \"Finance\"}`
56
+ #
57
+ # @return [Hash<String, String>]
58
+ attr_accessor :freeform_tags
59
+
60
+ # **[Required]** The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the NAT gateway.
61
+ # @return [String]
62
+ attr_accessor :id
63
+
64
+ # **[Required]** Whether the NAT gateway blocks traffic through it. The default is `false`.
65
+ #
66
+ # Example: `true`
67
+ #
68
+ # @return [BOOLEAN]
69
+ attr_accessor :block_traffic
70
+
71
+ # **[Required]** The NAT gateway's current state.
72
+ # @return [String]
73
+ attr_reader :lifecycle_state
74
+
75
+ # **[Required]** The IP address associated with the NAT gateway.
76
+ #
77
+ # @return [String]
78
+ attr_accessor :nat_ip
79
+
80
+ # **[Required]** The date and time the NAT gateway was created, in the format defined by RFC3339.
81
+ #
82
+ # Example: `2016-08-25T21:10:29.600Z`
83
+ #
84
+ # @return [DateTime]
85
+ attr_accessor :time_created
86
+
87
+ # **[Required]** The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the VCN the NAT gateway
88
+ # belongs to.
89
+ #
90
+ # @return [String]
91
+ attr_accessor :vcn_id
92
+
93
+ # Attribute mapping from ruby-style variable name to JSON key.
94
+ def self.attribute_map
95
+ {
96
+ # rubocop:disable Style/SymbolLiteral
97
+ 'compartment_id': :'compartmentId',
98
+ 'defined_tags': :'definedTags',
99
+ 'display_name': :'displayName',
100
+ 'freeform_tags': :'freeformTags',
101
+ 'id': :'id',
102
+ 'block_traffic': :'blockTraffic',
103
+ 'lifecycle_state': :'lifecycleState',
104
+ 'nat_ip': :'natIp',
105
+ 'time_created': :'timeCreated',
106
+ 'vcn_id': :'vcnId'
107
+ # rubocop:enable Style/SymbolLiteral
108
+ }
109
+ end
110
+
111
+ # Attribute type mapping.
112
+ def self.swagger_types
113
+ {
114
+ # rubocop:disable Style/SymbolLiteral
115
+ 'compartment_id': :'String',
116
+ 'defined_tags': :'Hash<String, Hash<String, Object>>',
117
+ 'display_name': :'String',
118
+ 'freeform_tags': :'Hash<String, String>',
119
+ 'id': :'String',
120
+ 'block_traffic': :'BOOLEAN',
121
+ 'lifecycle_state': :'String',
122
+ 'nat_ip': :'String',
123
+ 'time_created': :'DateTime',
124
+ 'vcn_id': :'String'
125
+ # rubocop:enable Style/SymbolLiteral
126
+ }
127
+ end
128
+
129
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
130
+ # rubocop:disable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
131
+
132
+
133
+ # Initializes the object
134
+ # @param [Hash] attributes Model attributes in the form of hash
135
+ # @option attributes [String] :compartment_id The value to assign to the {#compartment_id} property
136
+ # @option attributes [Hash<String, Hash<String, Object>>] :defined_tags The value to assign to the {#defined_tags} property
137
+ # @option attributes [String] :display_name The value to assign to the {#display_name} property
138
+ # @option attributes [Hash<String, String>] :freeform_tags The value to assign to the {#freeform_tags} property
139
+ # @option attributes [String] :id The value to assign to the {#id} property
140
+ # @option attributes [BOOLEAN] :block_traffic The value to assign to the {#block_traffic} property
141
+ # @option attributes [String] :lifecycle_state The value to assign to the {#lifecycle_state} property
142
+ # @option attributes [String] :nat_ip The value to assign to the {#nat_ip} property
143
+ # @option attributes [DateTime] :time_created The value to assign to the {#time_created} property
144
+ # @option attributes [String] :vcn_id The value to assign to the {#vcn_id} property
145
+ def initialize(attributes = {})
146
+ return unless attributes.is_a?(Hash)
147
+
148
+ # convert string to symbol for hash key
149
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
150
+
151
+ self.compartment_id = attributes[:'compartmentId'] if attributes[:'compartmentId']
152
+
153
+ raise 'You cannot provide both :compartmentId and :compartment_id' if attributes.key?(:'compartmentId') && attributes.key?(:'compartment_id')
154
+
155
+ self.compartment_id = attributes[:'compartment_id'] if attributes[:'compartment_id']
156
+
157
+ self.defined_tags = attributes[:'definedTags'] if attributes[:'definedTags']
158
+
159
+ raise 'You cannot provide both :definedTags and :defined_tags' if attributes.key?(:'definedTags') && attributes.key?(:'defined_tags')
160
+
161
+ self.defined_tags = attributes[:'defined_tags'] if attributes[:'defined_tags']
162
+
163
+ self.display_name = attributes[:'displayName'] if attributes[:'displayName']
164
+
165
+ raise 'You cannot provide both :displayName and :display_name' if attributes.key?(:'displayName') && attributes.key?(:'display_name')
166
+
167
+ self.display_name = attributes[:'display_name'] if attributes[:'display_name']
168
+
169
+ self.freeform_tags = attributes[:'freeformTags'] if attributes[:'freeformTags']
170
+
171
+ raise 'You cannot provide both :freeformTags and :freeform_tags' if attributes.key?(:'freeformTags') && attributes.key?(:'freeform_tags')
172
+
173
+ self.freeform_tags = attributes[:'freeform_tags'] if attributes[:'freeform_tags']
174
+
175
+ self.id = attributes[:'id'] if attributes[:'id']
176
+
177
+ self.block_traffic = attributes[:'blockTraffic'] unless attributes[:'blockTraffic'].nil?
178
+ self.block_traffic = false if block_traffic.nil? && !attributes.key?(:'blockTraffic') # rubocop:disable Style/StringLiterals
179
+
180
+ raise 'You cannot provide both :blockTraffic and :block_traffic' if attributes.key?(:'blockTraffic') && attributes.key?(:'block_traffic')
181
+
182
+ self.block_traffic = attributes[:'block_traffic'] unless attributes[:'block_traffic'].nil?
183
+ self.block_traffic = false if block_traffic.nil? && !attributes.key?(:'blockTraffic') && !attributes.key?(:'block_traffic') # rubocop:disable Style/StringLiterals
184
+
185
+ self.lifecycle_state = attributes[:'lifecycleState'] if attributes[:'lifecycleState']
186
+
187
+ raise 'You cannot provide both :lifecycleState and :lifecycle_state' if attributes.key?(:'lifecycleState') && attributes.key?(:'lifecycle_state')
188
+
189
+ self.lifecycle_state = attributes[:'lifecycle_state'] if attributes[:'lifecycle_state']
190
+
191
+ self.nat_ip = attributes[:'natIp'] if attributes[:'natIp']
192
+
193
+ raise 'You cannot provide both :natIp and :nat_ip' if attributes.key?(:'natIp') && attributes.key?(:'nat_ip')
194
+
195
+ self.nat_ip = attributes[:'nat_ip'] if attributes[:'nat_ip']
196
+
197
+ self.time_created = attributes[:'timeCreated'] if attributes[:'timeCreated']
198
+
199
+ raise 'You cannot provide both :timeCreated and :time_created' if attributes.key?(:'timeCreated') && attributes.key?(:'time_created')
200
+
201
+ self.time_created = attributes[:'time_created'] if attributes[:'time_created']
202
+
203
+ self.vcn_id = attributes[:'vcnId'] if attributes[:'vcnId']
204
+
205
+ raise 'You cannot provide both :vcnId and :vcn_id' if attributes.key?(:'vcnId') && attributes.key?(:'vcn_id')
206
+
207
+ self.vcn_id = attributes[:'vcn_id'] if attributes[:'vcn_id']
208
+ end
209
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
210
+ # rubocop:enable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
211
+
212
+ # Custom attribute writer method checking allowed values (enum).
213
+ # @param [Object] lifecycle_state Object to be assigned
214
+ def lifecycle_state=(lifecycle_state)
215
+ # rubocop:disable Style/ConditionalAssignment
216
+ if lifecycle_state && !LIFECYCLE_STATE_ENUM.include?(lifecycle_state)
217
+ # rubocop: disable Metrics/LineLength
218
+ OCI.logger.debug("Unknown value for 'lifecycle_state' [" + lifecycle_state + "]. Mapping to 'LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE'") if OCI.logger
219
+ # rubocop: enable Metrics/LineLength
220
+ @lifecycle_state = LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE
221
+ else
222
+ @lifecycle_state = lifecycle_state
223
+ end
224
+ # rubocop:enable Style/ConditionalAssignment
225
+ end
226
+
227
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
228
+
229
+
230
+ # Checks equality by comparing each attribute.
231
+ # @param [Object] other the other object to be compared
232
+ def ==(other)
233
+ return true if equal?(other)
234
+ self.class == other.class &&
235
+ compartment_id == other.compartment_id &&
236
+ defined_tags == other.defined_tags &&
237
+ display_name == other.display_name &&
238
+ freeform_tags == other.freeform_tags &&
239
+ id == other.id &&
240
+ block_traffic == other.block_traffic &&
241
+ lifecycle_state == other.lifecycle_state &&
242
+ nat_ip == other.nat_ip &&
243
+ time_created == other.time_created &&
244
+ vcn_id == other.vcn_id
245
+ end
246
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
247
+
248
+ # @see the `==` method
249
+ # @param [Object] other the other object to be compared
250
+ def eql?(other)
251
+ self == other
252
+ end
253
+
254
+ # rubocop:disable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
255
+
256
+
257
+ # Calculates hash code according to all attributes.
258
+ # @return [Fixnum] Hash code
259
+ def hash
260
+ [compartment_id, defined_tags, display_name, freeform_tags, id, block_traffic, lifecycle_state, nat_ip, time_created, vcn_id].hash
261
+ end
262
+ # rubocop:enable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
263
+
264
+ # rubocop:disable Metrics/AbcSize, Layout/EmptyLines
265
+
266
+
267
+ # Builds the object from hash
268
+ # @param [Hash] attributes Model attributes in the form of hash
269
+ # @return [Object] Returns the model itself
270
+ def build_from_hash(attributes)
271
+ return nil unless attributes.is_a?(Hash)
272
+ self.class.swagger_types.each_pair do |key, type|
273
+ if type =~ /^Array<(.*)>/i
274
+ # check to ensure the input is an array given that the the attribute
275
+ # is documented as an array but the input is not
276
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
277
+ public_method("#{key}=").call(
278
+ attributes[self.class.attribute_map[key]]
279
+ .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
280
+ )
281
+ end
282
+ elsif !attributes[self.class.attribute_map[key]].nil?
283
+ public_method("#{key}=").call(
284
+ OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
285
+ )
286
+ end
287
+ # or else data not found in attributes(hash), not an issue as the data can be optional
288
+ end
289
+
290
+ self
291
+ end
292
+ # rubocop:enable Metrics/AbcSize, Layout/EmptyLines
293
+
294
+ # Returns the string representation of the object
295
+ # @return [String] String presentation of the object
296
+ def to_s
297
+ to_hash.to_s
298
+ end
299
+
300
+ # Returns the object in the form of hash
301
+ # @return [Hash] Returns the object in the form of hash
302
+ def to_hash
303
+ hash = {}
304
+ self.class.attribute_map.each_pair do |attr, param|
305
+ value = public_method(attr).call
306
+ next if value.nil? && !instance_variable_defined?("@#{attr}")
307
+ hash[param] = _to_hash(value)
308
+ end
309
+ hash
310
+ end
311
+
312
+ private
313
+
314
+ # Outputs non-array value in the form of hash
315
+ # For object, use to_hash. Otherwise, just return the value
316
+ # @param [Object] value Any valid value
317
+ # @return [Hash] Returns the value in the form of hash
318
+ def _to_hash(value)
319
+ if value.is_a?(Array)
320
+ value.compact.map { |v| _to_hash(v) }
321
+ elsif value.is_a?(Hash)
322
+ {}.tap do |hash|
323
+ value.each { |k, v| hash[k] = _to_hash(v) }
324
+ end
325
+ elsif value.respond_to? :to_hash
326
+ value.to_hash
327
+ else
328
+ value
329
+ end
330
+ end
331
+ end
332
+ end
333
+ # rubocop:enable Lint/UnneededCopDisableDirective
@@ -19,6 +19,12 @@ module OCI
19
19
  # supply string values using the API.
20
20
  #
21
21
  class Core::Models::PublicIp # rubocop:disable Metrics/LineLength
22
+ ASSIGNED_ENTITY_TYPE_ENUM = [
23
+ ASSIGNED_ENTITY_TYPE_PRIVATE_IP = 'PRIVATE_IP'.freeze,
24
+ ASSIGNED_ENTITY_TYPE_NAT_GATEWAY = 'NAT_GATEWAY'.freeze,
25
+ ASSIGNED_ENTITY_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
26
+ ].freeze
27
+
22
28
  LIFECYCLE_STATE_ENUM = [
23
29
  LIFECYCLE_STATE_PROVISIONING = 'PROVISIONING'.freeze,
24
30
  LIFECYCLE_STATE_AVAILABLE = 'AVAILABLE'.freeze,
@@ -43,9 +49,21 @@ module OCI
43
49
  SCOPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
44
50
  ].freeze
45
51
 
52
+ # The OCID of the entity the public IP is assigned to, or in the process of
53
+ # being assigned to.
54
+ #
55
+ # @return [String]
56
+ attr_accessor :assigned_entity_id
57
+
58
+ # The type of entity the public IP is assigned to, or in the process of being
59
+ # assigned to.
60
+ #
61
+ # @return [String]
62
+ attr_reader :assigned_entity_type
63
+
46
64
  # The public IP's availability domain. This property is set only for ephemeral public IPs
47
- # (that is, when the `scope` of the public IP is set to AVAILABILITY_DOMAIN). The value
48
- # is the availability domain of the assigned private IP.
65
+ # that are assigned to a private IP (that is, when the `scope` of the public IP is set to
66
+ # AVAILABILITY_DOMAIN). The value is the availability domain of the assigned private IP.
49
67
  #
50
68
  # Example: `Uocm:PHX-AD-1`
51
69
  #
@@ -53,8 +71,9 @@ module OCI
53
71
  attr_accessor :availability_domain
54
72
 
55
73
  # The OCID of the compartment containing the public IP. For an ephemeral public IP, this is
56
- # the same compartment as the private IP's. For a reserved public IP that is currently assigned,
57
- # this can be a different compartment than the assigned private IP's.
74
+ # the compartment of its assigned entity (which can be a private IP or a regional entity such
75
+ # as a NAT gateway). For a reserved public IP that is currently assigned,
76
+ # its compartment can be different from the assigned private IP's.
58
77
  #
59
78
  # @return [String]
60
79
  attr_accessor :compartment_id
@@ -99,10 +118,12 @@ module OCI
99
118
 
100
119
  # Defines when the public IP is deleted and released back to Oracle's public IP pool.
101
120
  #
102
- # * `EPHEMERAL`: The lifetime is tied to the lifetime of its assigned private IP. The
103
- # ephemeral public IP is automatically deleted when its private IP is deleted, when
104
- # the VNIC is terminated, or when the instance is terminated. An ephemeral
105
- # public IP must always be assigned to a private IP.
121
+ # * `EPHEMERAL`: The lifetime is tied to the lifetime of its assigned entity. An ephemeral
122
+ # public IP must always be assigned to an entity. If the assigned entity is a private IP,
123
+ # the ephemeral public IP is automatically deleted when the private IP is deleted, when
124
+ # the VNIC is terminated, or when the instance is terminated. If the assigned entity is a
125
+ # {NatGateway}, the ephemeral public IP is automatically
126
+ # deleted when the NAT gateway is terminated.
106
127
  #
107
128
  # * `RESERVED`: You control the public IP's lifetime. You can delete a reserved public IP
108
129
  # whenever you like. It does not need to be assigned to a private IP at all times.
@@ -113,20 +134,27 @@ module OCI
113
134
  # @return [String]
114
135
  attr_reader :lifetime
115
136
 
137
+ # Deprecated. Use `assignedEntityId` instead.
138
+ #
116
139
  # The OCID of the private IP that the public IP is currently assigned to, or in the
117
140
  # process of being assigned to.
118
141
  #
142
+ # **Note:** This is `null` if the public IP is not assigned to a private IP, or is
143
+ # in the process of being assigned to one.
144
+ #
119
145
  # @return [String]
120
146
  attr_accessor :private_ip_id
121
147
 
122
148
  # Whether the public IP is regional or specific to a particular availability domain.
123
149
  #
124
- # * `REGION`: The public IP exists within a region and can be assigned to a private IP
125
- # in any availability domain in the region. Reserved public IPs have `scope` = `REGION`.
150
+ # * `REGION`: The public IP exists within a region and is assigned to a regional entity
151
+ # (such as a {NatGateway}), or can be assigned to a private
152
+ # IP in any availability domain in the region. Reserved public IPs and ephemeral public IPs
153
+ # assigned to a regional entity have `scope` = `REGION`.
126
154
  #
127
- # * `AVAILABILITY_DOMAIN`: The public IP exists within the availability domain of the private IP
155
+ # * `AVAILABILITY_DOMAIN`: The public IP exists within the availability domain of the entity
128
156
  # it's assigned to, which is specified by the `availabilityDomain` property of the public IP object.
129
- # Ephemeral public IPs have `scope` = `AVAILABILITY_DOMAIN`.
157
+ # Ephemeral public IPs that are assigned to private IPs have `scope` = `AVAILABILITY_DOMAIN`.
130
158
  #
131
159
  # @return [String]
132
160
  attr_reader :scope
@@ -142,6 +170,8 @@ module OCI
142
170
  def self.attribute_map
143
171
  {
144
172
  # rubocop:disable Style/SymbolLiteral
173
+ 'assigned_entity_id': :'assignedEntityId',
174
+ 'assigned_entity_type': :'assignedEntityType',
145
175
  'availability_domain': :'availabilityDomain',
146
176
  'compartment_id': :'compartmentId',
147
177
  'defined_tags': :'definedTags',
@@ -162,6 +192,8 @@ module OCI
162
192
  def self.swagger_types
163
193
  {
164
194
  # rubocop:disable Style/SymbolLiteral
195
+ 'assigned_entity_id': :'String',
196
+ 'assigned_entity_type': :'String',
165
197
  'availability_domain': :'String',
166
198
  'compartment_id': :'String',
167
199
  'defined_tags': :'Hash<String, Hash<String, Object>>',
@@ -184,6 +216,8 @@ module OCI
184
216
 
185
217
  # Initializes the object
186
218
  # @param [Hash] attributes Model attributes in the form of hash
219
+ # @option attributes [String] :assigned_entity_id The value to assign to the {#assigned_entity_id} property
220
+ # @option attributes [String] :assigned_entity_type The value to assign to the {#assigned_entity_type} property
187
221
  # @option attributes [String] :availability_domain The value to assign to the {#availability_domain} property
188
222
  # @option attributes [String] :compartment_id The value to assign to the {#compartment_id} property
189
223
  # @option attributes [Hash<String, Hash<String, Object>>] :defined_tags The value to assign to the {#defined_tags} property
@@ -202,6 +236,18 @@ module OCI
202
236
  # convert string to symbol for hash key
203
237
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
204
238
 
239
+ self.assigned_entity_id = attributes[:'assignedEntityId'] if attributes[:'assignedEntityId']
240
+
241
+ raise 'You cannot provide both :assignedEntityId and :assigned_entity_id' if attributes.key?(:'assignedEntityId') && attributes.key?(:'assigned_entity_id')
242
+
243
+ self.assigned_entity_id = attributes[:'assigned_entity_id'] if attributes[:'assigned_entity_id']
244
+
245
+ self.assigned_entity_type = attributes[:'assignedEntityType'] if attributes[:'assignedEntityType']
246
+
247
+ raise 'You cannot provide both :assignedEntityType and :assigned_entity_type' if attributes.key?(:'assignedEntityType') && attributes.key?(:'assigned_entity_type')
248
+
249
+ self.assigned_entity_type = attributes[:'assigned_entity_type'] if attributes[:'assigned_entity_type']
250
+
205
251
  self.availability_domain = attributes[:'availabilityDomain'] if attributes[:'availabilityDomain']
206
252
 
207
253
  raise 'You cannot provide both :availabilityDomain and :availability_domain' if attributes.key?(:'availabilityDomain') && attributes.key?(:'availability_domain')
@@ -265,6 +311,21 @@ module OCI
265
311
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
266
312
  # rubocop:enable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
267
313
 
314
+ # Custom attribute writer method checking allowed values (enum).
315
+ # @param [Object] assigned_entity_type Object to be assigned
316
+ def assigned_entity_type=(assigned_entity_type)
317
+ # rubocop:disable Style/ConditionalAssignment
318
+ if assigned_entity_type && !ASSIGNED_ENTITY_TYPE_ENUM.include?(assigned_entity_type)
319
+ # rubocop: disable Metrics/LineLength
320
+ OCI.logger.debug("Unknown value for 'assigned_entity_type' [" + assigned_entity_type + "]. Mapping to 'ASSIGNED_ENTITY_TYPE_UNKNOWN_ENUM_VALUE'") if OCI.logger
321
+ # rubocop: enable Metrics/LineLength
322
+ @assigned_entity_type = ASSIGNED_ENTITY_TYPE_UNKNOWN_ENUM_VALUE
323
+ else
324
+ @assigned_entity_type = assigned_entity_type
325
+ end
326
+ # rubocop:enable Style/ConditionalAssignment
327
+ end
328
+
268
329
  # Custom attribute writer method checking allowed values (enum).
269
330
  # @param [Object] lifecycle_state Object to be assigned
270
331
  def lifecycle_state=(lifecycle_state)
@@ -318,6 +379,8 @@ module OCI
318
379
  def ==(other)
319
380
  return true if equal?(other)
320
381
  self.class == other.class &&
382
+ assigned_entity_id == other.assigned_entity_id &&
383
+ assigned_entity_type == other.assigned_entity_type &&
321
384
  availability_domain == other.availability_domain &&
322
385
  compartment_id == other.compartment_id &&
323
386
  defined_tags == other.defined_tags &&
@@ -345,7 +408,7 @@ module OCI
345
408
  # Calculates hash code according to all attributes.
346
409
  # @return [Fixnum] Hash code
347
410
  def hash
348
- [availability_domain, compartment_id, defined_tags, display_name, freeform_tags, id, ip_address, lifecycle_state, lifetime, private_ip_id, scope, time_created].hash
411
+ [assigned_entity_id, assigned_entity_type, availability_domain, compartment_id, defined_tags, display_name, freeform_tags, id, ip_address, lifecycle_state, lifetime, private_ip_id, scope, time_created].hash
349
412
  end
350
413
  # rubocop:enable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
351
414