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
@@ -24,6 +24,46 @@ module OCI
24
24
  # rubocop:disable Layout/EmptyLines
25
25
 
26
26
 
27
+ # Calls {OCI::Core::ComputeManagementClient#attach_load_balancer} and then waits for the {OCI::Core::Models::InstancePool} acted upon
28
+ # to enter the given state(s).
29
+ #
30
+ # @param [String] instance_pool_id The OCID of the instance pool.
31
+ # @param [OCI::Core::Models::AttachLoadBalancerDetails] attach_load_balancer_details Load balancer being attached
32
+ # @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Core::Models::InstancePool#lifecycle_state}
33
+ # @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Core::ComputeManagementClient#attach_load_balancer}
34
+ # @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:
35
+ # * max_interval_seconds: The maximum interval between queries, in seconds.
36
+ # * max_wait_seconds The maximum time to wait, in seconds
37
+ #
38
+ # @return [OCI::Response] A {OCI::Response} object with data of type {OCI::Core::Models::InstancePool}
39
+ def attach_load_balancer_and_wait_for_state(instance_pool_id, attach_load_balancer_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
40
+ operation_result = @service_client.attach_load_balancer(instance_pool_id, attach_load_balancer_details, base_operation_opts)
41
+
42
+ return operation_result if wait_for_states.empty?
43
+
44
+ lowered_wait_for_states = wait_for_states.map(&:downcase)
45
+ wait_for_resource_id = operation_result.data.id
46
+
47
+ begin
48
+ waiter_result = @service_client.get_instance_pool(wait_for_resource_id).wait_until(
49
+ eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) },
50
+ max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
51
+ max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
52
+ )
53
+ result_to_return = waiter_result
54
+
55
+ return result_to_return
56
+ rescue StandardError
57
+ raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
58
+ end
59
+ end
60
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
61
+ # rubocop:enable Layout/EmptyLines
62
+
63
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
64
+ # rubocop:disable Layout/EmptyLines
65
+
66
+
27
67
  # Calls {OCI::Core::ComputeManagementClient#create_instance_pool} and then waits for the {OCI::Core::Models::InstancePool} acted upon
28
68
  # to enter the given state(s).
29
69
  #
@@ -63,6 +103,46 @@ module OCI
63
103
  # rubocop:disable Layout/EmptyLines
64
104
 
65
105
 
106
+ # Calls {OCI::Core::ComputeManagementClient#detach_load_balancer} and then waits for the {OCI::Core::Models::InstancePool} acted upon
107
+ # to enter the given state(s).
108
+ #
109
+ # @param [String] instance_pool_id The OCID of the instance pool.
110
+ # @param [OCI::Core::Models::DetachLoadBalancerDetails] detach_load_balancer_details Load balancer being detached
111
+ # @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Core::Models::InstancePool#lifecycle_state}
112
+ # @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Core::ComputeManagementClient#detach_load_balancer}
113
+ # @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:
114
+ # * max_interval_seconds: The maximum interval between queries, in seconds.
115
+ # * max_wait_seconds The maximum time to wait, in seconds
116
+ #
117
+ # @return [OCI::Response] A {OCI::Response} object with data of type {OCI::Core::Models::InstancePool}
118
+ def detach_load_balancer_and_wait_for_state(instance_pool_id, detach_load_balancer_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
119
+ operation_result = @service_client.detach_load_balancer(instance_pool_id, detach_load_balancer_details, base_operation_opts)
120
+
121
+ return operation_result if wait_for_states.empty?
122
+
123
+ lowered_wait_for_states = wait_for_states.map(&:downcase)
124
+ wait_for_resource_id = operation_result.data.id
125
+
126
+ begin
127
+ waiter_result = @service_client.get_instance_pool(wait_for_resource_id).wait_until(
128
+ eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) },
129
+ max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
130
+ max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
131
+ )
132
+ result_to_return = waiter_result
133
+
134
+ return result_to_return
135
+ rescue StandardError
136
+ raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
137
+ end
138
+ end
139
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
140
+ # rubocop:enable Layout/EmptyLines
141
+
142
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
143
+ # rubocop:disable Layout/EmptyLines
144
+
145
+
66
146
  # Calls {OCI::Core::ComputeManagementClient#reset_instance_pool} and then waits for the {OCI::Core::Models::InstancePool} acted upon
67
147
  # to enter the given state(s).
68
148
  #
@@ -19,6 +19,7 @@ require 'oci/core/models/app_catalog_subscription'
19
19
  require 'oci/core/models/app_catalog_subscription_summary'
20
20
  require 'oci/core/models/attach_boot_volume_details'
21
21
  require 'oci/core/models/attach_i_scsi_volume_details'
22
+ require 'oci/core/models/attach_load_balancer_details'
22
23
  require 'oci/core/models/attach_paravirtualized_volume_details'
23
24
  require 'oci/core/models/attach_vnic_details'
24
25
  require 'oci/core/models/attach_volume_details'
@@ -79,6 +80,7 @@ require 'oci/core/models/cross_connect_mapping'
79
80
  require 'oci/core/models/cross_connect_port_speed_shape'
80
81
  require 'oci/core/models/cross_connect_status'
81
82
  require 'oci/core/models/delete_virtual_circuit_public_prefix_details'
83
+ require 'oci/core/models/detach_load_balancer_details'
82
84
  require 'oci/core/models/device'
83
85
  require 'oci/core/models/dhcp_dns_option'
84
86
  require 'oci/core/models/dhcp_option'
@@ -104,6 +106,8 @@ require 'oci/core/models/image_source_via_object_storage_tuple_details'
104
106
  require 'oci/core/models/image_source_via_object_storage_uri_details'
105
107
  require 'oci/core/models/ingress_security_rule'
106
108
  require 'oci/core/models/instance'
109
+ require 'oci/core/models/instance_agent_config'
110
+ require 'oci/core/models/instance_agent_features'
107
111
  require 'oci/core/models/instance_configuration'
108
112
  require 'oci/core/models/instance_configuration_attach_vnic_details'
109
113
  require 'oci/core/models/instance_configuration_attach_volume_details'
@@ -124,6 +128,8 @@ require 'oci/core/models/instance_configuration_volume_source_from_volume_detail
124
128
  require 'oci/core/models/instance_console_connection'
125
129
  require 'oci/core/models/instance_credentials'
126
130
  require 'oci/core/models/instance_pool'
131
+ require 'oci/core/models/instance_pool_instance_load_balancer_backend'
132
+ require 'oci/core/models/instance_pool_load_balancer_attachment'
127
133
  require 'oci/core/models/instance_pool_placement_configuration'
128
134
  require 'oci/core/models/instance_pool_placement_secondary_vnic_subnet'
129
135
  require 'oci/core/models/instance_pool_summary'
@@ -132,6 +138,7 @@ require 'oci/core/models/instance_source_via_boot_volume_details'
132
138
  require 'oci/core/models/instance_source_via_image_details'
133
139
  require 'oci/core/models/instance_summary'
134
140
  require 'oci/core/models/internet_gateway'
141
+ require 'oci/core/models/launch_instance_agent_config_details'
135
142
  require 'oci/core/models/launch_instance_details'
136
143
  require 'oci/core/models/launch_options'
137
144
  require 'oci/core/models/letter_of_authority'
@@ -168,6 +175,7 @@ require 'oci/core/models/update_drg_attachment_details'
168
175
  require 'oci/core/models/update_drg_details'
169
176
  require 'oci/core/models/update_ip_sec_connection_details'
170
177
  require 'oci/core/models/update_image_details'
178
+ require 'oci/core/models/update_instance_agent_config_details'
171
179
  require 'oci/core/models/update_instance_configuration_details'
172
180
  require 'oci/core/models/update_instance_details'
173
181
  require 'oci/core/models/update_instance_pool_details'
@@ -0,0 +1,191 @@
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
+ # Represents a load balancer that is to be attached to an instance pool.
8
+ class Core::Models::AttachLoadBalancerDetails # rubocop:disable Metrics/LineLength
9
+ # **[Required]** The OCID of the load balancer to attach to the pool.
10
+ # @return [String]
11
+ attr_accessor :load_balancer_id
12
+
13
+ # **[Required]** The name of the backend set on the load balancer to add instances to.
14
+ # @return [String]
15
+ attr_accessor :backend_set_name
16
+
17
+ # **[Required]** The port value to use when creating the backend set.
18
+ # @return [Integer]
19
+ attr_accessor :port
20
+
21
+ # **[Required]** Indicates which vnic on each instance in the pool should be used to associate with the load balancer. possible values are \"PrimaryVnic\" or the displayName of one of the secondary VNICs on the instance configuration that is associated to the instance pool.
22
+ # @return [String]
23
+ attr_accessor :vnic_selection
24
+
25
+ # Attribute mapping from ruby-style variable name to JSON key.
26
+ def self.attribute_map
27
+ {
28
+ # rubocop:disable Style/SymbolLiteral
29
+ 'load_balancer_id': :'loadBalancerId',
30
+ 'backend_set_name': :'backendSetName',
31
+ 'port': :'port',
32
+ 'vnic_selection': :'vnicSelection'
33
+ # rubocop:enable Style/SymbolLiteral
34
+ }
35
+ end
36
+
37
+ # Attribute type mapping.
38
+ def self.swagger_types
39
+ {
40
+ # rubocop:disable Style/SymbolLiteral
41
+ 'load_balancer_id': :'String',
42
+ 'backend_set_name': :'String',
43
+ 'port': :'Integer',
44
+ 'vnic_selection': :'String'
45
+ # rubocop:enable Style/SymbolLiteral
46
+ }
47
+ end
48
+
49
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
50
+ # rubocop:disable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
51
+
52
+
53
+ # Initializes the object
54
+ # @param [Hash] attributes Model attributes in the form of hash
55
+ # @option attributes [String] :load_balancer_id The value to assign to the {#load_balancer_id} property
56
+ # @option attributes [String] :backend_set_name The value to assign to the {#backend_set_name} property
57
+ # @option attributes [Integer] :port The value to assign to the {#port} property
58
+ # @option attributes [String] :vnic_selection The value to assign to the {#vnic_selection} property
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
+ self.load_balancer_id = attributes[:'loadBalancerId'] if attributes[:'loadBalancerId']
66
+
67
+ raise 'You cannot provide both :loadBalancerId and :load_balancer_id' if attributes.key?(:'loadBalancerId') && attributes.key?(:'load_balancer_id')
68
+
69
+ self.load_balancer_id = attributes[:'load_balancer_id'] if attributes[:'load_balancer_id']
70
+
71
+ self.backend_set_name = attributes[:'backendSetName'] if attributes[:'backendSetName']
72
+
73
+ raise 'You cannot provide both :backendSetName and :backend_set_name' if attributes.key?(:'backendSetName') && attributes.key?(:'backend_set_name')
74
+
75
+ self.backend_set_name = attributes[:'backend_set_name'] if attributes[:'backend_set_name']
76
+
77
+ self.port = attributes[:'port'] if attributes[:'port']
78
+
79
+ self.vnic_selection = attributes[:'vnicSelection'] if attributes[:'vnicSelection']
80
+
81
+ raise 'You cannot provide both :vnicSelection and :vnic_selection' if attributes.key?(:'vnicSelection') && attributes.key?(:'vnic_selection')
82
+
83
+ self.vnic_selection = attributes[:'vnic_selection'] if attributes[:'vnic_selection']
84
+ end
85
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
86
+ # rubocop:enable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
87
+
88
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Metrics/LineLength, Layout/EmptyLines
89
+
90
+
91
+ # Checks equality by comparing each attribute.
92
+ # @param [Object] other the other object to be compared
93
+ def ==(other)
94
+ return true if equal?(other)
95
+
96
+ self.class == other.class &&
97
+ load_balancer_id == other.load_balancer_id &&
98
+ backend_set_name == other.backend_set_name &&
99
+ port == other.port &&
100
+ vnic_selection == other.vnic_selection
101
+ end
102
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Metrics/LineLength, Layout/EmptyLines
103
+
104
+ # @see the `==` method
105
+ # @param [Object] other the other object to be compared
106
+ def eql?(other)
107
+ self == other
108
+ end
109
+
110
+ # rubocop:disable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
111
+
112
+
113
+ # Calculates hash code according to all attributes.
114
+ # @return [Fixnum] Hash code
115
+ def hash
116
+ [load_balancer_id, backend_set_name, port, vnic_selection].hash
117
+ end
118
+ # rubocop:enable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
119
+
120
+ # rubocop:disable Metrics/AbcSize, Layout/EmptyLines
121
+
122
+
123
+ # Builds the object from hash
124
+ # @param [Hash] attributes Model attributes in the form of hash
125
+ # @return [Object] Returns the model itself
126
+ def build_from_hash(attributes)
127
+ return nil unless attributes.is_a?(Hash)
128
+
129
+ self.class.swagger_types.each_pair do |key, type|
130
+ if type =~ /^Array<(.*)>/i
131
+ # check to ensure the input is an array given that the the attribute
132
+ # is documented as an array but the input is not
133
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
134
+ public_method("#{key}=").call(
135
+ attributes[self.class.attribute_map[key]]
136
+ .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
137
+ )
138
+ end
139
+ elsif !attributes[self.class.attribute_map[key]].nil?
140
+ public_method("#{key}=").call(
141
+ OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
142
+ )
143
+ end
144
+ # or else data not found in attributes(hash), not an issue as the data can be optional
145
+ end
146
+
147
+ self
148
+ end
149
+ # rubocop:enable Metrics/AbcSize, Layout/EmptyLines
150
+
151
+ # Returns the string representation of the object
152
+ # @return [String] String presentation of the object
153
+ def to_s
154
+ to_hash.to_s
155
+ end
156
+
157
+ # Returns the object in the form of hash
158
+ # @return [Hash] Returns the object in the form of hash
159
+ def to_hash
160
+ hash = {}
161
+ self.class.attribute_map.each_pair do |attr, param|
162
+ value = public_method(attr).call
163
+ next if value.nil? && !instance_variable_defined?("@#{attr}")
164
+
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
+ end
190
+ end
191
+ # rubocop:enable Lint/UnneededCopDisableDirective
@@ -45,6 +45,11 @@ module OCI
45
45
  # @return [Integer]
46
46
  attr_accessor :size
47
47
 
48
+ # The load balancers to attach to the instance pool.
49
+ #
50
+ # @return [Array<OCI::Core::Models::AttachLoadBalancerDetails>]
51
+ attr_accessor :load_balancers
52
+
48
53
  # Attribute mapping from ruby-style variable name to JSON key.
49
54
  def self.attribute_map
50
55
  {
@@ -55,7 +60,8 @@ module OCI
55
60
  'freeform_tags': :'freeformTags',
56
61
  'instance_configuration_id': :'instanceConfigurationId',
57
62
  'placement_configurations': :'placementConfigurations',
58
- 'size': :'size'
63
+ 'size': :'size',
64
+ 'load_balancers': :'loadBalancers'
59
65
  # rubocop:enable Style/SymbolLiteral
60
66
  }
61
67
  end
@@ -70,7 +76,8 @@ module OCI
70
76
  'freeform_tags': :'Hash<String, String>',
71
77
  'instance_configuration_id': :'String',
72
78
  'placement_configurations': :'Array<OCI::Core::Models::CreateInstancePoolPlacementConfigurationDetails>',
73
- 'size': :'Integer'
79
+ 'size': :'Integer',
80
+ 'load_balancers': :'Array<OCI::Core::Models::AttachLoadBalancerDetails>'
74
81
  # rubocop:enable Style/SymbolLiteral
75
82
  }
76
83
  end
@@ -88,6 +95,7 @@ module OCI
88
95
  # @option attributes [String] :instance_configuration_id The value to assign to the {#instance_configuration_id} property
89
96
  # @option attributes [Array<OCI::Core::Models::CreateInstancePoolPlacementConfigurationDetails>] :placement_configurations The value to assign to the {#placement_configurations} property
90
97
  # @option attributes [Integer] :size The value to assign to the {#size} property
98
+ # @option attributes [Array<OCI::Core::Models::AttachLoadBalancerDetails>] :load_balancers The value to assign to the {#load_balancers} property
91
99
  def initialize(attributes = {})
92
100
  return unless attributes.is_a?(Hash)
93
101
 
@@ -131,6 +139,12 @@ module OCI
131
139
  self.placement_configurations = attributes[:'placement_configurations'] if attributes[:'placement_configurations']
132
140
 
133
141
  self.size = attributes[:'size'] if attributes[:'size']
142
+
143
+ self.load_balancers = attributes[:'loadBalancers'] if attributes[:'loadBalancers']
144
+
145
+ raise 'You cannot provide both :loadBalancers and :load_balancers' if attributes.key?(:'loadBalancers') && attributes.key?(:'load_balancers')
146
+
147
+ self.load_balancers = attributes[:'load_balancers'] if attributes[:'load_balancers']
134
148
  end
135
149
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
136
150
  # rubocop:enable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
@@ -150,7 +164,8 @@ module OCI
150
164
  freeform_tags == other.freeform_tags &&
151
165
  instance_configuration_id == other.instance_configuration_id &&
152
166
  placement_configurations == other.placement_configurations &&
153
- size == other.size
167
+ size == other.size &&
168
+ load_balancers == other.load_balancers
154
169
  end
155
170
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Metrics/LineLength, Layout/EmptyLines
156
171
 
@@ -166,7 +181,7 @@ module OCI
166
181
  # Calculates hash code according to all attributes.
167
182
  # @return [Fixnum] Hash code
168
183
  def hash
169
- [compartment_id, defined_tags, display_name, freeform_tags, instance_configuration_id, placement_configurations, size].hash
184
+ [compartment_id, defined_tags, display_name, freeform_tags, instance_configuration_id, placement_configurations, size, load_balancers].hash
170
185
  end
171
186
  # rubocop:enable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
172
187
 
@@ -0,0 +1,167 @@
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
+ # Represents a load balancer that is to be detached from an instance pool.
8
+ class Core::Models::DetachLoadBalancerDetails # rubocop:disable Metrics/LineLength
9
+ # **[Required]** The OCID of the load balancer to detach from the pool.
10
+ # @return [String]
11
+ attr_accessor :load_balancer_id
12
+
13
+ # **[Required]** The name of the backend set on the load balancer to detach from the pool.
14
+ # @return [String]
15
+ attr_accessor :backend_set_name
16
+
17
+ # Attribute mapping from ruby-style variable name to JSON key.
18
+ def self.attribute_map
19
+ {
20
+ # rubocop:disable Style/SymbolLiteral
21
+ 'load_balancer_id': :'loadBalancerId',
22
+ 'backend_set_name': :'backendSetName'
23
+ # rubocop:enable Style/SymbolLiteral
24
+ }
25
+ end
26
+
27
+ # Attribute type mapping.
28
+ def self.swagger_types
29
+ {
30
+ # rubocop:disable Style/SymbolLiteral
31
+ 'load_balancer_id': :'String',
32
+ 'backend_set_name': :'String'
33
+ # rubocop:enable Style/SymbolLiteral
34
+ }
35
+ end
36
+
37
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
38
+ # rubocop:disable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
39
+
40
+
41
+ # Initializes the object
42
+ # @param [Hash] attributes Model attributes in the form of hash
43
+ # @option attributes [String] :load_balancer_id The value to assign to the {#load_balancer_id} property
44
+ # @option attributes [String] :backend_set_name The value to assign to the {#backend_set_name} property
45
+ def initialize(attributes = {})
46
+ return unless attributes.is_a?(Hash)
47
+
48
+ # convert string to symbol for hash key
49
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
50
+
51
+ self.load_balancer_id = attributes[:'loadBalancerId'] if attributes[:'loadBalancerId']
52
+
53
+ raise 'You cannot provide both :loadBalancerId and :load_balancer_id' if attributes.key?(:'loadBalancerId') && attributes.key?(:'load_balancer_id')
54
+
55
+ self.load_balancer_id = attributes[:'load_balancer_id'] if attributes[:'load_balancer_id']
56
+
57
+ self.backend_set_name = attributes[:'backendSetName'] if attributes[:'backendSetName']
58
+
59
+ raise 'You cannot provide both :backendSetName and :backend_set_name' if attributes.key?(:'backendSetName') && attributes.key?(:'backend_set_name')
60
+
61
+ self.backend_set_name = attributes[:'backend_set_name'] if attributes[:'backend_set_name']
62
+ end
63
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
64
+ # rubocop:enable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
65
+
66
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Metrics/LineLength, Layout/EmptyLines
67
+
68
+
69
+ # Checks equality by comparing each attribute.
70
+ # @param [Object] other the other object to be compared
71
+ def ==(other)
72
+ return true if equal?(other)
73
+
74
+ self.class == other.class &&
75
+ load_balancer_id == other.load_balancer_id &&
76
+ backend_set_name == other.backend_set_name
77
+ end
78
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Metrics/LineLength, Layout/EmptyLines
79
+
80
+ # @see the `==` method
81
+ # @param [Object] other the other object to be compared
82
+ def eql?(other)
83
+ self == other
84
+ end
85
+
86
+ # rubocop:disable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
87
+
88
+
89
+ # Calculates hash code according to all attributes.
90
+ # @return [Fixnum] Hash code
91
+ def hash
92
+ [load_balancer_id, backend_set_name].hash
93
+ end
94
+ # rubocop:enable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
95
+
96
+ # rubocop:disable Metrics/AbcSize, Layout/EmptyLines
97
+
98
+
99
+ # Builds the object from hash
100
+ # @param [Hash] attributes Model attributes in the form of hash
101
+ # @return [Object] Returns the model itself
102
+ def build_from_hash(attributes)
103
+ return nil unless attributes.is_a?(Hash)
104
+
105
+ self.class.swagger_types.each_pair do |key, type|
106
+ if type =~ /^Array<(.*)>/i
107
+ # check to ensure the input is an array given that the the attribute
108
+ # is documented as an array but the input is not
109
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
110
+ public_method("#{key}=").call(
111
+ attributes[self.class.attribute_map[key]]
112
+ .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
113
+ )
114
+ end
115
+ elsif !attributes[self.class.attribute_map[key]].nil?
116
+ public_method("#{key}=").call(
117
+ OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
118
+ )
119
+ end
120
+ # or else data not found in attributes(hash), not an issue as the data can be optional
121
+ end
122
+
123
+ self
124
+ end
125
+ # rubocop:enable Metrics/AbcSize, Layout/EmptyLines
126
+
127
+ # Returns the string representation of the object
128
+ # @return [String] String presentation of the object
129
+ def to_s
130
+ to_hash.to_s
131
+ end
132
+
133
+ # Returns the object in the form of hash
134
+ # @return [Hash] Returns the object in the form of hash
135
+ def to_hash
136
+ hash = {}
137
+ self.class.attribute_map.each_pair do |attr, param|
138
+ value = public_method(attr).call
139
+ next if value.nil? && !instance_variable_defined?("@#{attr}")
140
+
141
+ hash[param] = _to_hash(value)
142
+ end
143
+ hash
144
+ end
145
+
146
+ private
147
+
148
+ # Outputs non-array value in the form of hash
149
+ # For object, use to_hash. Otherwise, just return the value
150
+ # @param [Object] value Any valid value
151
+ # @return [Hash] Returns the value in the form of hash
152
+ def _to_hash(value)
153
+ if value.is_a?(Array)
154
+ value.compact.map { |v| _to_hash(v) }
155
+ elsif value.is_a?(Hash)
156
+ {}.tap do |hash|
157
+ value.each { |k, v| hash[k] = _to_hash(v) }
158
+ end
159
+ elsif value.respond_to? :to_hash
160
+ value.to_hash
161
+ else
162
+ value
163
+ end
164
+ end
165
+ end
166
+ end
167
+ # rubocop:enable Lint/UnneededCopDisableDirective