Class: OCI::LoadBalancer::Models::UpdateLoadBalancerDetails
- Inherits:
-
Object
- Object
- OCI::LoadBalancer::Models::UpdateLoadBalancerDetails
- Defined in:
- lib/oci/load_balancer/models/update_load_balancer_details.rb
Overview
Configuration details to update a load balancer.
Warning: Oracle recommends that you avoid using any confidential information when you supply string values using the API.
Instance Attribute Summary collapse
-
#defined_tags ⇒ Hash<String, Hash<String, Object>>
Defined tags for this resource.
-
#display_name ⇒ String
The user-friendly display name for the load balancer.
-
#freeform_tags ⇒ Hash<String, String>
Free-form tags for this resource.
-
#is_delete_protection_enabled ⇒ BOOLEAN
Whether or not the load balancer has delete protection enabled.
-
#is_request_id_enabled ⇒ BOOLEAN
Whether or not the load balancer has the Request Id feature enabled for HTTP listeners.
-
#request_id_header ⇒ String
If isRequestIdEnabled is true then this field contains the name of the header field that contains the unique request id that is attached to every request from the load balancer to the load balancer backends and to every response from the load balancer.
-
#security_attributes ⇒ Hash<String, Hash<String, Object>>
Extended Defined tags for ZPR for this resource.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(other) ⇒ Object
Checks equality by comparing each attribute.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ UpdateLoadBalancerDetails
constructor
Initializes the object.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
Constructor Details
#initialize(attributes = {}) ⇒ UpdateLoadBalancerDetails
Initializes the object
136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 |
# File 'lib/oci/load_balancer/models/update_load_balancer_details.rb', line 136 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } self.display_name = attributes[:'displayName'] if attributes[:'displayName'] raise 'You cannot provide both :displayName and :display_name' if attributes.key?(:'displayName') && attributes.key?(:'display_name') self.display_name = attributes[:'display_name'] if attributes[:'display_name'] self.is_delete_protection_enabled = attributes[:'isDeleteProtectionEnabled'] unless attributes[:'isDeleteProtectionEnabled'].nil? raise 'You cannot provide both :isDeleteProtectionEnabled and :is_delete_protection_enabled' if attributes.key?(:'isDeleteProtectionEnabled') && attributes.key?(:'is_delete_protection_enabled') self.is_delete_protection_enabled = attributes[:'is_delete_protection_enabled'] unless attributes[:'is_delete_protection_enabled'].nil? self.is_request_id_enabled = attributes[:'isRequestIdEnabled'] unless attributes[:'isRequestIdEnabled'].nil? raise 'You cannot provide both :isRequestIdEnabled and :is_request_id_enabled' if attributes.key?(:'isRequestIdEnabled') && attributes.key?(:'is_request_id_enabled') self.is_request_id_enabled = attributes[:'is_request_id_enabled'] unless attributes[:'is_request_id_enabled'].nil? self.request_id_header = attributes[:'requestIdHeader'] if attributes[:'requestIdHeader'] raise 'You cannot provide both :requestIdHeader and :request_id_header' if attributes.key?(:'requestIdHeader') && attributes.key?(:'request_id_header') self.request_id_header = attributes[:'request_id_header'] if attributes[:'request_id_header'] self. = attributes[:'freeformTags'] if attributes[:'freeformTags'] raise 'You cannot provide both :freeformTags and :freeform_tags' if attributes.key?(:'freeformTags') && attributes.key?(:'freeform_tags') self. = attributes[:'freeform_tags'] if attributes[:'freeform_tags'] self. = attributes[:'definedTags'] if attributes[:'definedTags'] raise 'You cannot provide both :definedTags and :defined_tags' if attributes.key?(:'definedTags') && attributes.key?(:'defined_tags') self. = attributes[:'defined_tags'] if attributes[:'defined_tags'] self.security_attributes = attributes[:'securityAttributes'] if attributes[:'securityAttributes'] raise 'You cannot provide both :securityAttributes and :security_attributes' if attributes.key?(:'securityAttributes') && attributes.key?(:'security_attributes') self.security_attributes = attributes[:'security_attributes'] if attributes[:'security_attributes'] end |
Instance Attribute Details
#defined_tags ⇒ Hash<String, Hash<String, Object>>
Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
Example: {\"Operations\": {\"CostCenter\": \"42\"}}
84 85 86 |
# File 'lib/oci/load_balancer/models/update_load_balancer_details.rb', line 84 def @defined_tags end |
#display_name ⇒ String
The user-friendly display name for the load balancer. It does not have to be unique, and it is changeable. Avoid entering confidential information.
Example: example_load_balancer
20 21 22 |
# File 'lib/oci/load_balancer/models/update_load_balancer_details.rb', line 20 def display_name @display_name end |
#freeform_tags ⇒ Hash<String, String>
Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags.
Example: {\"Department\": \"Finance\"}
76 77 78 |
# File 'lib/oci/load_balancer/models/update_load_balancer_details.rb', line 76 def @freeform_tags end |
#is_delete_protection_enabled ⇒ BOOLEAN
Whether or not the load balancer has delete protection enabled.
If "true", the loadbalancer will be protected against deletion if configured to accept traffic.
If "false", the loadbalancer will not be protected against deletion.
If null or unset, the value for delete protection will not be changed.
Example: true
33 34 35 |
# File 'lib/oci/load_balancer/models/update_load_balancer_details.rb', line 33 def is_delete_protection_enabled @is_delete_protection_enabled end |
#is_request_id_enabled ⇒ BOOLEAN
Whether or not the load balancer has the Request Id feature enabled for HTTP listeners.
If "true", the load balancer will attach a unique request id header to every request passed through from the load balancer to load balancer backends. This same request id header also will be added to the response the lb received from the backend handling the request before the load balancer returns the response to the requestor. The name of the unique request id header is set the by value of requestIdHeader.
If "false", the loadbalancer not add this unique request id header to either the request passed through to the load balancer backends nor to the reponse returned to the user.
New load balancers have the Request Id feature enabled unless isRequestIdEnabled is set to False.
Example: true
51 52 53 |
# File 'lib/oci/load_balancer/models/update_load_balancer_details.rb', line 51 def is_request_id_enabled @is_request_id_enabled end |
#request_id_header ⇒ String
If isRequestIdEnabled is true then this field contains the name of the header field that contains the unique request id that is attached to every request from the load balancer to the load balancer backends and to every response from the load balancer.
If a request to the load balancer already contains a header with same name as specified in requestIdHeader then the load balancer will not change the value of that field.
If isRequestIdEnabled is false then this field is ignored.
Notes: * Unless the header name is "" it must start with "X-" prefix. * Setting the header name to "" will set it to the default: X-Request-Id.
68 69 70 |
# File 'lib/oci/load_balancer/models/update_load_balancer_details.rb', line 68 def request_id_header @request_id_header end |
#security_attributes ⇒ Hash<String, Hash<String, Object>>
Extended Defined tags for ZPR for this resource. Each key is predefined and scoped to a namespace.
Example: {\"Oracle-ZPR\": {\"MaxEgressCount\": {\"value\":\"42\",\"mode\":\"audit\", \"usagetype\" : \"zpr\"}}}
91 92 93 |
# File 'lib/oci/load_balancer/models/update_load_balancer_details.rb', line 91 def security_attributes @security_attributes end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
94 95 96 97 98 99 100 101 102 103 104 105 106 |
# File 'lib/oci/load_balancer/models/update_load_balancer_details.rb', line 94 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'display_name': :'displayName', 'is_delete_protection_enabled': :'isDeleteProtectionEnabled', 'is_request_id_enabled': :'isRequestIdEnabled', 'request_id_header': :'requestIdHeader', 'freeform_tags': :'freeformTags', 'defined_tags': :'definedTags', 'security_attributes': :'securityAttributes' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
109 110 111 112 113 114 115 116 117 118 119 120 121 |
# File 'lib/oci/load_balancer/models/update_load_balancer_details.rb', line 109 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'display_name': :'String', 'is_delete_protection_enabled': :'BOOLEAN', 'is_request_id_enabled': :'BOOLEAN', 'request_id_header': :'String', 'freeform_tags': :'Hash<String, String>', 'defined_tags': :'Hash<String, Hash<String, Object>>', 'security_attributes': :'Hash<String, Hash<String, Object>>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
192 193 194 195 196 197 198 199 200 201 202 203 |
# File 'lib/oci/load_balancer/models/update_load_balancer_details.rb', line 192 def ==(other) return true if equal?(other) self.class == other.class && display_name == other.display_name && is_delete_protection_enabled == other.is_delete_protection_enabled && is_request_id_enabled == other.is_request_id_enabled && request_id_header == other.request_id_header && == other. && == other. && security_attributes == other.security_attributes end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 |
# File 'lib/oci/load_balancer/models/update_load_balancer_details.rb', line 228 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /^Array<(.*)>/i # check to ensure the input is an array given that the the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) public_method("#{key}=").call( attributes[self.class.attribute_map[key]] .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) } ) end elsif !attributes[self.class.attribute_map[key]].nil? public_method("#{key}=").call( OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]) ) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#eql?(other) ⇒ Boolean
208 209 210 |
# File 'lib/oci/load_balancer/models/update_load_balancer_details.rb', line 208 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
217 218 219 |
# File 'lib/oci/load_balancer/models/update_load_balancer_details.rb', line 217 def hash [display_name, is_delete_protection_enabled, is_request_id_enabled, request_id_header, , , security_attributes].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
261 262 263 264 265 266 267 268 269 270 |
# File 'lib/oci/load_balancer/models/update_load_balancer_details.rb', line 261 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = public_method(attr).call next if value.nil? && !instance_variable_defined?("@#{attr}") hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
255 256 257 |
# File 'lib/oci/load_balancer/models/update_load_balancer_details.rb', line 255 def to_s to_hash.to_s end |