oci 2.5.0 → 2.5.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (141) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +5 -1
  3. data/lib/oci.rb +4 -0
  4. data/lib/oci/auth/federation_client.rb +4 -4
  5. data/lib/oci/auth/signers/instance_principals_security_token_signer.rb +22 -16
  6. data/lib/oci/autoscaling/auto_scaling_client.rb +774 -0
  7. data/lib/oci/autoscaling/auto_scaling_client_composite_operations.rb +24 -0
  8. data/lib/oci/autoscaling/autoscaling.rb +38 -0
  9. data/lib/oci/autoscaling/models/action.rb +182 -0
  10. data/lib/oci/autoscaling/models/auto_scaling_configuration.rb +282 -0
  11. data/lib/oci/autoscaling/models/auto_scaling_configuration_summary.rb +234 -0
  12. data/lib/oci/autoscaling/models/auto_scaling_policy.rb +222 -0
  13. data/lib/oci/autoscaling/models/auto_scaling_policy_summary.rb +179 -0
  14. data/lib/oci/autoscaling/models/capacity.rb +170 -0
  15. data/lib/oci/autoscaling/models/condition.rb +186 -0
  16. data/lib/oci/autoscaling/models/create_auto_scaling_configuration_details.rb +256 -0
  17. data/lib/oci/autoscaling/models/create_auto_scaling_policy_details.rb +196 -0
  18. data/lib/oci/autoscaling/models/create_condition_details.rb +176 -0
  19. data/lib/oci/autoscaling/models/create_threshold_policy_details.rb +166 -0
  20. data/lib/oci/autoscaling/models/instance_pool_resource.rb +148 -0
  21. data/lib/oci/autoscaling/models/metric.rb +186 -0
  22. data/lib/oci/autoscaling/models/resource.rb +177 -0
  23. data/lib/oci/autoscaling/models/threshold.rb +188 -0
  24. data/lib/oci/autoscaling/models/threshold_policy.rb +173 -0
  25. data/lib/oci/autoscaling/models/update_auto_scaling_configuration_details.rb +219 -0
  26. data/lib/oci/autoscaling/models/update_auto_scaling_policy_details.rb +194 -0
  27. data/lib/oci/autoscaling/models/update_condition_details.rb +176 -0
  28. data/lib/oci/autoscaling/models/update_threshold_policy_details.rb +164 -0
  29. data/lib/oci/autoscaling/util.rb +2 -0
  30. data/lib/oci/core/blockstorage_client.rb +1 -1
  31. data/lib/oci/core/compute_client.rb +1 -1
  32. data/lib/oci/core/compute_management_client.rb +135 -1
  33. data/lib/oci/core/compute_management_client_composite_operations.rb +80 -0
  34. data/lib/oci/core/core.rb +8 -0
  35. data/lib/oci/core/models/attach_load_balancer_details.rb +191 -0
  36. data/lib/oci/core/models/create_instance_pool_details.rb +19 -4
  37. data/lib/oci/core/models/detach_load_balancer_details.rb +167 -0
  38. data/lib/oci/core/models/image.rb +14 -1
  39. data/lib/oci/core/models/instance.rb +18 -2
  40. data/lib/oci/core/models/instance_agent_config.rb +154 -0
  41. data/lib/oci/core/models/instance_agent_features.rb +154 -0
  42. data/lib/oci/core/models/instance_pool.rb +19 -4
  43. data/lib/oci/core/models/instance_pool_instance_load_balancer_backend.rb +219 -0
  44. data/lib/oci/core/models/instance_pool_load_balancer_attachment.rb +253 -0
  45. data/lib/oci/core/models/instance_summary.rb +19 -4
  46. data/lib/oci/core/models/launch_instance_agent_config_details.rb +155 -0
  47. data/lib/oci/core/models/launch_instance_details.rb +14 -1
  48. data/lib/oci/core/models/update_instance_agent_config_details.rb +154 -0
  49. data/lib/oci/core/models/update_instance_details.rb +16 -1
  50. data/lib/oci/core/virtual_network_client.rb +1 -1
  51. data/lib/oci/database/database_client.rb +12 -14
  52. data/lib/oci/database/models/autonomous_data_warehouse_connection_strings.rb +3 -1
  53. data/lib/oci/database/models/autonomous_database_connection_strings.rb +3 -1
  54. data/lib/oci/database/models/create_data_guard_association_details.rb +2 -7
  55. data/lib/oci/database/models/create_data_guard_association_to_existing_db_system_details.rb +5 -1
  56. data/lib/oci/database/models/create_data_guard_association_with_new_db_system_details.rb +4 -1
  57. data/lib/oci/database/models/database_summary.rb +1 -1
  58. data/lib/oci/database/models/db_node.rb +15 -1
  59. data/lib/oci/database/models/db_node_summary.rb +15 -1
  60. data/lib/oci/database/models/db_system.rb +15 -1
  61. data/lib/oci/database/models/db_system_summary.rb +15 -1
  62. data/lib/oci/database/models/db_version_summary.rb +1 -1
  63. data/lib/oci/database/models/launch_db_system_base.rb +33 -2
  64. data/lib/oci/database/models/launch_db_system_details.rb +5 -1
  65. data/lib/oci/database/models/launch_db_system_from_backup_details.rb +5 -1
  66. data/lib/oci/database/models/update_db_system_details.rb +1 -1
  67. data/lib/oci/identity/identity.rb +4 -0
  68. data/lib/oci/identity/identity_client.rb +468 -12
  69. data/lib/oci/identity/identity_client_composite_operations.rb +79 -0
  70. data/lib/oci/identity/models/change_tag_namespace_compartment_detail.rb +154 -0
  71. data/lib/oci/identity/models/create_identity_provider_details.rb +2 -1
  72. data/lib/oci/identity/models/mfa_totp_device.rb +279 -0
  73. data/lib/oci/identity/models/mfa_totp_device_summary.rb +267 -0
  74. data/lib/oci/identity/models/mfa_totp_token.rb +155 -0
  75. data/lib/oci/identity/models/tag_namespace_summary.rb +1 -1
  76. data/lib/oci/identity/models/user.rb +18 -4
  77. data/lib/oci/monitoring/models/aggregated_datapoint.rb +166 -0
  78. data/lib/oci/monitoring/models/alarm.rb +538 -0
  79. data/lib/oci/monitoring/models/alarm_history_collection.rb +183 -0
  80. data/lib/oci/monitoring/models/alarm_history_entry.rb +187 -0
  81. data/lib/oci/monitoring/models/alarm_status_summary.rb +277 -0
  82. data/lib/oci/monitoring/models/alarm_summary.rb +386 -0
  83. data/lib/oci/monitoring/models/create_alarm_details.rb +423 -0
  84. data/lib/oci/monitoring/models/datapoint.rb +179 -0
  85. data/lib/oci/monitoring/models/failed_metric_record.rb +166 -0
  86. data/lib/oci/monitoring/models/list_metrics_details.rb +271 -0
  87. data/lib/oci/monitoring/models/metric.rb +197 -0
  88. data/lib/oci/monitoring/models/metric_data.rb +243 -0
  89. data/lib/oci/monitoring/models/metric_data_details.rb +227 -0
  90. data/lib/oci/monitoring/models/post_metric_data_details.rb +194 -0
  91. data/lib/oci/monitoring/models/post_metric_data_response_details.rb +170 -0
  92. data/lib/oci/monitoring/models/summarize_metrics_data_details.rb +229 -0
  93. data/lib/oci/monitoring/models/suppression.rb +196 -0
  94. data/lib/oci/monitoring/models/update_alarm_details.rb +423 -0
  95. data/lib/oci/monitoring/monitoring.rb +37 -0
  96. data/lib/oci/monitoring/monitoring_client.rb +923 -0
  97. data/lib/oci/monitoring/monitoring_client_composite_operations.rb +145 -0
  98. data/lib/oci/monitoring/util.rb +2 -0
  99. data/lib/oci/ons/models/backoff_retry_policy.rb +192 -0
  100. data/lib/oci/ons/models/confirmation_result.rb +221 -0
  101. data/lib/oci/ons/models/create_subscription_details.rb +238 -0
  102. data/lib/oci/ons/models/create_topic_details.rb +209 -0
  103. data/lib/oci/ons/models/delivery_policy.rb +153 -0
  104. data/lib/oci/ons/models/message_details.rb +163 -0
  105. data/lib/oci/ons/models/notification_topic.rb +302 -0
  106. data/lib/oci/ons/models/notification_topic_summary.rb +303 -0
  107. data/lib/oci/ons/models/publish_result.rb +168 -0
  108. data/lib/oci/ons/models/subscription.rb +273 -0
  109. data/lib/oci/ons/models/subscription_summary.rb +300 -0
  110. data/lib/oci/ons/models/topic_attributes_details.rb +184 -0
  111. data/lib/oci/ons/models/update_subscription_details.rb +188 -0
  112. data/lib/oci/ons/notification_control_plane_client.rb +463 -0
  113. data/lib/oci/ons/notification_control_plane_client_composite_operations.rb +24 -0
  114. data/lib/oci/ons/notification_data_plane_client.rb +680 -0
  115. data/lib/oci/ons/notification_data_plane_client_composite_operations.rb +104 -0
  116. data/lib/oci/ons/ons.rb +33 -0
  117. data/lib/oci/ons/util.rb +2 -0
  118. data/lib/oci/regions.rb +5 -0
  119. data/lib/oci/resource_manager/models/apply_job_plan_resolution.rb +189 -0
  120. data/lib/oci/resource_manager/models/config_source.rb +208 -0
  121. data/lib/oci/resource_manager/models/create_config_source_details.rb +187 -0
  122. data/lib/oci/resource_manager/models/create_job_details.rb +225 -0
  123. data/lib/oci/resource_manager/models/create_stack_details.rb +239 -0
  124. data/lib/oci/resource_manager/models/create_zip_upload_config_source_details.rb +166 -0
  125. data/lib/oci/resource_manager/models/failure_details.rb +185 -0
  126. data/lib/oci/resource_manager/models/job.rb +399 -0
  127. data/lib/oci/resource_manager/models/job_summary.rb +311 -0
  128. data/lib/oci/resource_manager/models/log_entry.rb +225 -0
  129. data/lib/oci/resource_manager/models/stack.rb +305 -0
  130. data/lib/oci/resource_manager/models/stack_summary.rb +249 -0
  131. data/lib/oci/resource_manager/models/update_config_source_details.rb +184 -0
  132. data/lib/oci/resource_manager/models/update_job_details.rb +188 -0
  133. data/lib/oci/resource_manager/models/update_stack_details.rb +225 -0
  134. data/lib/oci/resource_manager/models/update_zip_upload_config_source_details.rb +164 -0
  135. data/lib/oci/resource_manager/models/zip_upload_config_source.rb +149 -0
  136. data/lib/oci/resource_manager/resource_manager.rb +36 -0
  137. data/lib/oci/resource_manager/resource_manager_client.rb +1264 -0
  138. data/lib/oci/resource_manager/resource_manager_client_composite_operations.rb +263 -0
  139. data/lib/oci/resource_manager/util.rb +2 -0
  140. data/lib/oci/version.rb +1 -1
  141. metadata +100 -2
@@ -110,6 +110,9 @@ module OCI
110
110
  # @return [String]
111
111
  attr_accessor :operating_system_version
112
112
 
113
+ # @return [OCI::Core::Models::InstanceAgentFeatures]
114
+ attr_accessor :agent_features
115
+
113
116
  # Image size (1 MB = 1048576 bytes)
114
117
  #
115
118
  # Example: `47694`
@@ -140,6 +143,7 @@ module OCI
140
143
  'lifecycle_state': :'lifecycleState',
141
144
  'operating_system': :'operatingSystem',
142
145
  'operating_system_version': :'operatingSystemVersion',
146
+ 'agent_features': :'agentFeatures',
143
147
  'size_in_mbs': :'sizeInMBs',
144
148
  'time_created': :'timeCreated'
145
149
  # rubocop:enable Style/SymbolLiteral
@@ -162,6 +166,7 @@ module OCI
162
166
  'lifecycle_state': :'String',
163
167
  'operating_system': :'String',
164
168
  'operating_system_version': :'String',
169
+ 'agent_features': :'OCI::Core::Models::InstanceAgentFeatures',
165
170
  'size_in_mbs': :'Integer',
166
171
  'time_created': :'DateTime'
167
172
  # rubocop:enable Style/SymbolLiteral
@@ -186,6 +191,7 @@ module OCI
186
191
  # @option attributes [String] :lifecycle_state The value to assign to the {#lifecycle_state} property
187
192
  # @option attributes [String] :operating_system The value to assign to the {#operating_system} property
188
193
  # @option attributes [String] :operating_system_version The value to assign to the {#operating_system_version} property
194
+ # @option attributes [OCI::Core::Models::InstanceAgentFeatures] :agent_features The value to assign to the {#agent_features} property
189
195
  # @option attributes [Integer] :size_in_mbs The value to assign to the {#size_in_mbs} property
190
196
  # @option attributes [DateTime] :time_created The value to assign to the {#time_created} property
191
197
  def initialize(attributes = {})
@@ -262,6 +268,12 @@ module OCI
262
268
 
263
269
  self.operating_system_version = attributes[:'operating_system_version'] if attributes[:'operating_system_version']
264
270
 
271
+ self.agent_features = attributes[:'agentFeatures'] if attributes[:'agentFeatures']
272
+
273
+ raise 'You cannot provide both :agentFeatures and :agent_features' if attributes.key?(:'agentFeatures') && attributes.key?(:'agent_features')
274
+
275
+ self.agent_features = attributes[:'agent_features'] if attributes[:'agent_features']
276
+
265
277
  self.size_in_mbs = attributes[:'sizeInMBs'] if attributes[:'sizeInMBs']
266
278
 
267
279
  raise 'You cannot provide both :sizeInMBs and :size_in_mbs' if attributes.key?(:'sizeInMBs') && attributes.key?(:'size_in_mbs')
@@ -328,6 +340,7 @@ module OCI
328
340
  lifecycle_state == other.lifecycle_state &&
329
341
  operating_system == other.operating_system &&
330
342
  operating_system_version == other.operating_system_version &&
343
+ agent_features == other.agent_features &&
331
344
  size_in_mbs == other.size_in_mbs &&
332
345
  time_created == other.time_created
333
346
  end
@@ -345,7 +358,7 @@ module OCI
345
358
  # Calculates hash code according to all attributes.
346
359
  # @return [Fixnum] Hash code
347
360
  def hash
348
- [base_image_id, compartment_id, create_image_allowed, defined_tags, display_name, freeform_tags, id, launch_mode, launch_options, lifecycle_state, operating_system, operating_system_version, size_in_mbs, time_created].hash
361
+ [base_image_id, compartment_id, create_image_allowed, defined_tags, display_name, freeform_tags, id, launch_mode, launch_options, lifecycle_state, operating_system, operating_system_version, agent_features, size_in_mbs, time_created].hash
349
362
  end
350
363
  # rubocop:enable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
351
364
 
@@ -154,7 +154,10 @@ module OCI
154
154
 
155
155
  # **[Required]** The region that contains the availability domain the instance is running in.
156
156
  #
157
- # Example: `phx`
157
+ # For the us-phoenix-1 and us-ashburn-1 regions, `phx` and `iad` are returned, respectively.
158
+ # For all other regions, the full region name is returned.
159
+ #
160
+ # Examples: `phx`, `eu-frankfurt-1`
158
161
  #
159
162
  # @return [String]
160
163
  attr_accessor :region
@@ -177,6 +180,9 @@ module OCI
177
180
  # @return [DateTime]
178
181
  attr_accessor :time_created
179
182
 
183
+ # @return [OCI::Core::Models::InstanceAgentConfig]
184
+ attr_accessor :agent_config
185
+
180
186
  # The date and time the instance is expected to be stopped / started, in the format defined by RFC3339.
181
187
  # After that time if instance hasn't been rebooted, Oracle will reboot the instance within 24 hours of the due time.
182
188
  # Regardless of how the instance was stopped, the flag will be reset to empty as soon as instance reaches Stopped state.
@@ -207,6 +213,7 @@ module OCI
207
213
  'shape': :'shape',
208
214
  'source_details': :'sourceDetails',
209
215
  'time_created': :'timeCreated',
216
+ 'agent_config': :'agentConfig',
210
217
  'time_maintenance_reboot_due': :'timeMaintenanceRebootDue'
211
218
  # rubocop:enable Style/SymbolLiteral
212
219
  }
@@ -234,6 +241,7 @@ module OCI
234
241
  'shape': :'String',
235
242
  'source_details': :'OCI::Core::Models::InstanceSourceDetails',
236
243
  'time_created': :'DateTime',
244
+ 'agent_config': :'OCI::Core::Models::InstanceAgentConfig',
237
245
  'time_maintenance_reboot_due': :'DateTime'
238
246
  # rubocop:enable Style/SymbolLiteral
239
247
  }
@@ -263,6 +271,7 @@ module OCI
263
271
  # @option attributes [String] :shape The value to assign to the {#shape} property
264
272
  # @option attributes [OCI::Core::Models::InstanceSourceDetails] :source_details The value to assign to the {#source_details} property
265
273
  # @option attributes [DateTime] :time_created The value to assign to the {#time_created} property
274
+ # @option attributes [OCI::Core::Models::InstanceAgentConfig] :agent_config The value to assign to the {#agent_config} property
266
275
  # @option attributes [DateTime] :time_maintenance_reboot_due The value to assign to the {#time_maintenance_reboot_due} property
267
276
  def initialize(attributes = {})
268
277
  return unless attributes.is_a?(Hash)
@@ -362,6 +371,12 @@ module OCI
362
371
 
363
372
  self.time_created = attributes[:'time_created'] if attributes[:'time_created']
364
373
 
374
+ self.agent_config = attributes[:'agentConfig'] if attributes[:'agentConfig']
375
+
376
+ raise 'You cannot provide both :agentConfig and :agent_config' if attributes.key?(:'agentConfig') && attributes.key?(:'agent_config')
377
+
378
+ self.agent_config = attributes[:'agent_config'] if attributes[:'agent_config']
379
+
365
380
  self.time_maintenance_reboot_due = attributes[:'timeMaintenanceRebootDue'] if attributes[:'timeMaintenanceRebootDue']
366
381
 
367
382
  raise 'You cannot provide both :timeMaintenanceRebootDue and :time_maintenance_reboot_due' if attributes.key?(:'timeMaintenanceRebootDue') && attributes.key?(:'time_maintenance_reboot_due')
@@ -428,6 +443,7 @@ module OCI
428
443
  shape == other.shape &&
429
444
  source_details == other.source_details &&
430
445
  time_created == other.time_created &&
446
+ agent_config == other.agent_config &&
431
447
  time_maintenance_reboot_due == other.time_maintenance_reboot_due
432
448
  end
433
449
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Metrics/LineLength, Layout/EmptyLines
@@ -444,7 +460,7 @@ module OCI
444
460
  # Calculates hash code according to all attributes.
445
461
  # @return [Fixnum] Hash code
446
462
  def hash
447
- [availability_domain, compartment_id, defined_tags, display_name, extended_metadata, fault_domain, freeform_tags, id, image_id, ipxe_script, launch_mode, launch_options, lifecycle_state, metadata, region, shape, source_details, time_created, time_maintenance_reboot_due].hash
463
+ [availability_domain, compartment_id, defined_tags, display_name, extended_metadata, fault_domain, freeform_tags, id, image_id, ipxe_script, launch_mode, launch_options, lifecycle_state, metadata, region, shape, source_details, time_created, agent_config, time_maintenance_reboot_due].hash
448
464
  end
449
465
  # rubocop:enable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
450
466
 
@@ -0,0 +1,154 @@
1
+ # Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
2
+
3
+ require 'date'
4
+
5
+ # rubocop:disable Lint/UnneededCopDisableDirective
6
+ module OCI
7
+ # Instance agent configuration on the instance
8
+ class Core::Models::InstanceAgentConfig # rubocop:disable Metrics/LineLength
9
+ # Whether the agent running on the instance can gather performance metrics and monitor the instance.
10
+ #
11
+ # @return [BOOLEAN]
12
+ attr_accessor :is_monitoring_disabled
13
+
14
+ # Attribute mapping from ruby-style variable name to JSON key.
15
+ def self.attribute_map
16
+ {
17
+ # rubocop:disable Style/SymbolLiteral
18
+ 'is_monitoring_disabled': :'isMonitoringDisabled'
19
+ # rubocop:enable Style/SymbolLiteral
20
+ }
21
+ end
22
+
23
+ # Attribute type mapping.
24
+ def self.swagger_types
25
+ {
26
+ # rubocop:disable Style/SymbolLiteral
27
+ 'is_monitoring_disabled': :'BOOLEAN'
28
+ # rubocop:enable Style/SymbolLiteral
29
+ }
30
+ end
31
+
32
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
33
+ # rubocop:disable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
34
+
35
+
36
+ # Initializes the object
37
+ # @param [Hash] attributes Model attributes in the form of hash
38
+ # @option attributes [BOOLEAN] :is_monitoring_disabled The value to assign to the {#is_monitoring_disabled} property
39
+ def initialize(attributes = {})
40
+ return unless attributes.is_a?(Hash)
41
+
42
+ # convert string to symbol for hash key
43
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
44
+
45
+ self.is_monitoring_disabled = attributes[:'isMonitoringDisabled'] unless attributes[:'isMonitoringDisabled'].nil?
46
+
47
+ raise 'You cannot provide both :isMonitoringDisabled and :is_monitoring_disabled' if attributes.key?(:'isMonitoringDisabled') && attributes.key?(:'is_monitoring_disabled')
48
+
49
+ self.is_monitoring_disabled = attributes[:'is_monitoring_disabled'] unless attributes[:'is_monitoring_disabled'].nil?
50
+ end
51
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
52
+ # rubocop:enable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
53
+
54
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Metrics/LineLength, Layout/EmptyLines
55
+
56
+
57
+ # Checks equality by comparing each attribute.
58
+ # @param [Object] other the other object to be compared
59
+ def ==(other)
60
+ return true if equal?(other)
61
+
62
+ self.class == other.class &&
63
+ is_monitoring_disabled == other.is_monitoring_disabled
64
+ end
65
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Metrics/LineLength, 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
+ [is_monitoring_disabled].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
+
92
+ self.class.swagger_types.each_pair do |key, type|
93
+ if type =~ /^Array<(.*)>/i
94
+ # check to ensure the input is an array given that the the attribute
95
+ # is documented as an array but the input is not
96
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
97
+ public_method("#{key}=").call(
98
+ attributes[self.class.attribute_map[key]]
99
+ .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
100
+ )
101
+ end
102
+ elsif !attributes[self.class.attribute_map[key]].nil?
103
+ public_method("#{key}=").call(
104
+ OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
105
+ )
106
+ end
107
+ # or else data not found in attributes(hash), not an issue as the data can be optional
108
+ end
109
+
110
+ self
111
+ end
112
+ # rubocop:enable Metrics/AbcSize, Layout/EmptyLines
113
+
114
+ # Returns the string representation of the object
115
+ # @return [String] String presentation of the object
116
+ def to_s
117
+ to_hash.to_s
118
+ end
119
+
120
+ # Returns the object in the form of hash
121
+ # @return [Hash] Returns the object in the form of hash
122
+ def to_hash
123
+ hash = {}
124
+ self.class.attribute_map.each_pair do |attr, param|
125
+ value = public_method(attr).call
126
+ next if value.nil? && !instance_variable_defined?("@#{attr}")
127
+
128
+ hash[param] = _to_hash(value)
129
+ end
130
+ hash
131
+ end
132
+
133
+ private
134
+
135
+ # Outputs non-array value in the form of hash
136
+ # For object, use to_hash. Otherwise, just return the value
137
+ # @param [Object] value Any valid value
138
+ # @return [Hash] Returns the value in the form of hash
139
+ def _to_hash(value)
140
+ if value.is_a?(Array)
141
+ value.compact.map { |v| _to_hash(v) }
142
+ elsif value.is_a?(Hash)
143
+ {}.tap do |hash|
144
+ value.each { |k, v| hash[k] = _to_hash(v) }
145
+ end
146
+ elsif value.respond_to? :to_hash
147
+ value.to_hash
148
+ else
149
+ value
150
+ end
151
+ end
152
+ end
153
+ end
154
+ # rubocop:enable Lint/UnneededCopDisableDirective
@@ -0,0 +1,154 @@
1
+ # Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
2
+
3
+ require 'date'
4
+
5
+ # rubocop:disable Lint/UnneededCopDisableDirective
6
+ module OCI
7
+ # Instance agent features supported on the image
8
+ class Core::Models::InstanceAgentFeatures # rubocop:disable Metrics/LineLength
9
+ # Whether the agent running on the instance can gather performance metrics and monitor the instance.
10
+ #
11
+ # @return [BOOLEAN]
12
+ attr_accessor :is_monitoring_supported
13
+
14
+ # Attribute mapping from ruby-style variable name to JSON key.
15
+ def self.attribute_map
16
+ {
17
+ # rubocop:disable Style/SymbolLiteral
18
+ 'is_monitoring_supported': :'isMonitoringSupported'
19
+ # rubocop:enable Style/SymbolLiteral
20
+ }
21
+ end
22
+
23
+ # Attribute type mapping.
24
+ def self.swagger_types
25
+ {
26
+ # rubocop:disable Style/SymbolLiteral
27
+ 'is_monitoring_supported': :'BOOLEAN'
28
+ # rubocop:enable Style/SymbolLiteral
29
+ }
30
+ end
31
+
32
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
33
+ # rubocop:disable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
34
+
35
+
36
+ # Initializes the object
37
+ # @param [Hash] attributes Model attributes in the form of hash
38
+ # @option attributes [BOOLEAN] :is_monitoring_supported The value to assign to the {#is_monitoring_supported} property
39
+ def initialize(attributes = {})
40
+ return unless attributes.is_a?(Hash)
41
+
42
+ # convert string to symbol for hash key
43
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
44
+
45
+ self.is_monitoring_supported = attributes[:'isMonitoringSupported'] unless attributes[:'isMonitoringSupported'].nil?
46
+
47
+ raise 'You cannot provide both :isMonitoringSupported and :is_monitoring_supported' if attributes.key?(:'isMonitoringSupported') && attributes.key?(:'is_monitoring_supported')
48
+
49
+ self.is_monitoring_supported = attributes[:'is_monitoring_supported'] unless attributes[:'is_monitoring_supported'].nil?
50
+ end
51
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
52
+ # rubocop:enable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
53
+
54
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Metrics/LineLength, Layout/EmptyLines
55
+
56
+
57
+ # Checks equality by comparing each attribute.
58
+ # @param [Object] other the other object to be compared
59
+ def ==(other)
60
+ return true if equal?(other)
61
+
62
+ self.class == other.class &&
63
+ is_monitoring_supported == other.is_monitoring_supported
64
+ end
65
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Metrics/LineLength, 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
+ [is_monitoring_supported].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
+
92
+ self.class.swagger_types.each_pair do |key, type|
93
+ if type =~ /^Array<(.*)>/i
94
+ # check to ensure the input is an array given that the the attribute
95
+ # is documented as an array but the input is not
96
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
97
+ public_method("#{key}=").call(
98
+ attributes[self.class.attribute_map[key]]
99
+ .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
100
+ )
101
+ end
102
+ elsif !attributes[self.class.attribute_map[key]].nil?
103
+ public_method("#{key}=").call(
104
+ OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
105
+ )
106
+ end
107
+ # or else data not found in attributes(hash), not an issue as the data can be optional
108
+ end
109
+
110
+ self
111
+ end
112
+ # rubocop:enable Metrics/AbcSize, Layout/EmptyLines
113
+
114
+ # Returns the string representation of the object
115
+ # @return [String] String presentation of the object
116
+ def to_s
117
+ to_hash.to_s
118
+ end
119
+
120
+ # Returns the object in the form of hash
121
+ # @return [Hash] Returns the object in the form of hash
122
+ def to_hash
123
+ hash = {}
124
+ self.class.attribute_map.each_pair do |attr, param|
125
+ value = public_method(attr).call
126
+ next if value.nil? && !instance_variable_defined?("@#{attr}")
127
+
128
+ hash[param] = _to_hash(value)
129
+ end
130
+ hash
131
+ end
132
+
133
+ private
134
+
135
+ # Outputs non-array value in the form of hash
136
+ # For object, use to_hash. Otherwise, just return the value
137
+ # @param [Object] value Any valid value
138
+ # @return [Hash] Returns the value in the form of hash
139
+ def _to_hash(value)
140
+ if value.is_a?(Array)
141
+ value.compact.map { |v| _to_hash(v) }
142
+ elsif value.is_a?(Hash)
143
+ {}.tap do |hash|
144
+ value.each { |k, v| hash[k] = _to_hash(v) }
145
+ end
146
+ elsif value.respond_to? :to_hash
147
+ value.to_hash
148
+ else
149
+ value
150
+ end
151
+ end
152
+ end
153
+ end
154
+ # rubocop:enable Lint/UnneededCopDisableDirective
@@ -70,6 +70,11 @@ module OCI
70
70
  # @return [DateTime]
71
71
  attr_accessor :time_created
72
72
 
73
+ # The load balancers attached to the instance pool.
74
+ #
75
+ # @return [Array<OCI::Core::Models::InstancePoolLoadBalancerAttachment>]
76
+ attr_accessor :load_balancers
77
+
73
78
  # Attribute mapping from ruby-style variable name to JSON key.
74
79
  def self.attribute_map
75
80
  {
@@ -83,7 +88,8 @@ module OCI
83
88
  'lifecycle_state': :'lifecycleState',
84
89
  'placement_configurations': :'placementConfigurations',
85
90
  'size': :'size',
86
- 'time_created': :'timeCreated'
91
+ 'time_created': :'timeCreated',
92
+ 'load_balancers': :'loadBalancers'
87
93
  # rubocop:enable Style/SymbolLiteral
88
94
  }
89
95
  end
@@ -101,7 +107,8 @@ module OCI
101
107
  'lifecycle_state': :'String',
102
108
  'placement_configurations': :'Array<OCI::Core::Models::InstancePoolPlacementConfiguration>',
103
109
  'size': :'Integer',
104
- 'time_created': :'DateTime'
110
+ 'time_created': :'DateTime',
111
+ 'load_balancers': :'Array<OCI::Core::Models::InstancePoolLoadBalancerAttachment>'
105
112
  # rubocop:enable Style/SymbolLiteral
106
113
  }
107
114
  end
@@ -122,6 +129,7 @@ module OCI
122
129
  # @option attributes [Array<OCI::Core::Models::InstancePoolPlacementConfiguration>] :placement_configurations The value to assign to the {#placement_configurations} property
123
130
  # @option attributes [Integer] :size The value to assign to the {#size} property
124
131
  # @option attributes [DateTime] :time_created The value to assign to the {#time_created} property
132
+ # @option attributes [Array<OCI::Core::Models::InstancePoolLoadBalancerAttachment>] :load_balancers The value to assign to the {#load_balancers} property
125
133
  def initialize(attributes = {})
126
134
  return unless attributes.is_a?(Hash)
127
135
 
@@ -179,6 +187,12 @@ module OCI
179
187
  raise 'You cannot provide both :timeCreated and :time_created' if attributes.key?(:'timeCreated') && attributes.key?(:'time_created')
180
188
 
181
189
  self.time_created = attributes[:'time_created'] if attributes[:'time_created']
190
+
191
+ self.load_balancers = attributes[:'loadBalancers'] if attributes[:'loadBalancers']
192
+
193
+ raise 'You cannot provide both :loadBalancers and :load_balancers' if attributes.key?(:'loadBalancers') && attributes.key?(:'load_balancers')
194
+
195
+ self.load_balancers = attributes[:'load_balancers'] if attributes[:'load_balancers']
182
196
  end
183
197
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
184
198
  # rubocop:enable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
@@ -216,7 +230,8 @@ module OCI
216
230
  lifecycle_state == other.lifecycle_state &&
217
231
  placement_configurations == other.placement_configurations &&
218
232
  size == other.size &&
219
- time_created == other.time_created
233
+ time_created == other.time_created &&
234
+ load_balancers == other.load_balancers
220
235
  end
221
236
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Metrics/LineLength, Layout/EmptyLines
222
237
 
@@ -232,7 +247,7 @@ module OCI
232
247
  # Calculates hash code according to all attributes.
233
248
  # @return [Fixnum] Hash code
234
249
  def hash
235
- [id, compartment_id, defined_tags, display_name, freeform_tags, instance_configuration_id, lifecycle_state, placement_configurations, size, time_created].hash
250
+ [id, compartment_id, defined_tags, display_name, freeform_tags, instance_configuration_id, lifecycle_state, placement_configurations, size, time_created, load_balancers].hash
236
251
  end
237
252
  # rubocop:enable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
238
253