Class: OCI::LoadBalancer::Models::UpdateHealthCheckerDetails
- Inherits:
-
Object
- Object
- OCI::LoadBalancer::Models::UpdateHealthCheckerDetails
- Defined in:
- lib/oci/load_balancer/models/update_health_checker_details.rb
Overview
The health checker's configuration details.
Instance Attribute Summary collapse
-
#interval_in_millis ⇒ Integer
[Required] The interval between health checks, in milliseconds.
-
#is_force_plain_text ⇒ BOOLEAN
Specifies if health checks should always be done using plain text instead of depending on whether or not the associated backend set is using SSL.
-
#port ⇒ Integer
[Required] The backend server port against which to run the health check.
-
#protocol ⇒ String
[Required] The protocol the health check must use; either HTTP or TCP.
-
#response_body_regex ⇒ String
[Required] A regular expression for parsing the response body from the backend server.
-
#retries ⇒ Integer
[Required] The number of retries to attempt before a backend server is considered "unhealthy".
-
#return_code ⇒ Integer
[Required] The status code a healthy backend server should return.
-
#timeout_in_millis ⇒ Integer
[Required] The maximum time, in milliseconds, to wait for a reply to a health check.
-
#url_path ⇒ String
The path against which to run the health check.
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 = {}) ⇒ UpdateHealthCheckerDetails
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 = {}) ⇒ UpdateHealthCheckerDetails
Initializes the object
132 133 134 135 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 |
# File 'lib/oci/load_balancer/models/update_health_checker_details.rb', line 132 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.protocol = attributes[:'protocol'] if attributes[:'protocol'] self.url_path = attributes[:'urlPath'] if attributes[:'urlPath'] raise 'You cannot provide both :urlPath and :url_path' if attributes.key?(:'urlPath') && attributes.key?(:'url_path') self.url_path = attributes[:'url_path'] if attributes[:'url_path'] self.port = attributes[:'port'] if attributes[:'port'] self.return_code = attributes[:'returnCode'] if attributes[:'returnCode'] raise 'You cannot provide both :returnCode and :return_code' if attributes.key?(:'returnCode') && attributes.key?(:'return_code') self.return_code = attributes[:'return_code'] if attributes[:'return_code'] self.retries = attributes[:'retries'] if attributes[:'retries'] self.timeout_in_millis = attributes[:'timeoutInMillis'] if attributes[:'timeoutInMillis'] raise 'You cannot provide both :timeoutInMillis and :timeout_in_millis' if attributes.key?(:'timeoutInMillis') && attributes.key?(:'timeout_in_millis') self.timeout_in_millis = attributes[:'timeout_in_millis'] if attributes[:'timeout_in_millis'] self.interval_in_millis = attributes[:'intervalInMillis'] if attributes[:'intervalInMillis'] raise 'You cannot provide both :intervalInMillis and :interval_in_millis' if attributes.key?(:'intervalInMillis') && attributes.key?(:'interval_in_millis') self.interval_in_millis = attributes[:'interval_in_millis'] if attributes[:'interval_in_millis'] self.response_body_regex = attributes[:'responseBodyRegex'] if attributes[:'responseBodyRegex'] raise 'You cannot provide both :responseBodyRegex and :response_body_regex' if attributes.key?(:'responseBodyRegex') && attributes.key?(:'response_body_regex') self.response_body_regex = attributes[:'response_body_regex'] if attributes[:'response_body_regex'] self.is_force_plain_text = attributes[:'isForcePlainText'] unless attributes[:'isForcePlainText'].nil? self.is_force_plain_text = false if is_force_plain_text.nil? && !attributes.key?(:'isForcePlainText') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :isForcePlainText and :is_force_plain_text' if attributes.key?(:'isForcePlainText') && attributes.key?(:'is_force_plain_text') self.is_force_plain_text = attributes[:'is_force_plain_text'] unless attributes[:'is_force_plain_text'].nil? self.is_force_plain_text = false if is_force_plain_text.nil? && !attributes.key?(:'isForcePlainText') && !attributes.key?(:'is_force_plain_text') # rubocop:disable Style/StringLiterals end |
Instance Attribute Details
#interval_in_millis ⇒ Integer
[Required] The interval between health checks, in milliseconds.
Example: 10000
60 61 62 |
# File 'lib/oci/load_balancer/models/update_health_checker_details.rb', line 60 def interval_in_millis @interval_in_millis end |
#is_force_plain_text ⇒ BOOLEAN
Specifies if health checks should always be done using plain text instead of depending on whether or not the associated backend set is using SSL.
If "true", health checks will be done using plain text even if the associated backend set is configured to use SSL.
If "false", health checks will be done using SSL encryption if the associated backend set is configured to use SSL. If the backend set is not so configured the health checks will be done using plain text.
Example: true
81 82 83 |
# File 'lib/oci/load_balancer/models/update_health_checker_details.rb', line 81 def is_force_plain_text @is_force_plain_text end |
#port ⇒ Integer
[Required] The backend server port against which to run the health check.
Example: 8080
30 31 32 |
# File 'lib/oci/load_balancer/models/update_health_checker_details.rb', line 30 def port @port end |
#protocol ⇒ String
[Required] The protocol the health check must use; either HTTP or TCP.
Example: HTTP
16 17 18 |
# File 'lib/oci/load_balancer/models/update_health_checker_details.rb', line 16 def protocol @protocol end |
#response_body_regex ⇒ String
[Required] A regular expression for parsing the response body from the backend server.
Example: ^((?!false).|\s)*$
67 68 69 |
# File 'lib/oci/load_balancer/models/update_health_checker_details.rb', line 67 def response_body_regex @response_body_regex end |
#retries ⇒ Integer
[Required] The number of retries to attempt before a backend server is considered "unhealthy". This number also applies when recovering a server to the "healthy" state.
Example: 3
45 46 47 |
# File 'lib/oci/load_balancer/models/update_health_checker_details.rb', line 45 def retries @retries end |
#return_code ⇒ Integer
[Required] The status code a healthy backend server should return.
Example: 200
37 38 39 |
# File 'lib/oci/load_balancer/models/update_health_checker_details.rb', line 37 def return_code @return_code end |
#timeout_in_millis ⇒ Integer
[Required] The maximum time, in milliseconds, to wait for a reply to a health check. A health check is successful only if a reply returns within this timeout period.
Example: 3000
53 54 55 |
# File 'lib/oci/load_balancer/models/update_health_checker_details.rb', line 53 def timeout_in_millis @timeout_in_millis end |
#url_path ⇒ String
The path against which to run the health check.
Example: /healthcheck
23 24 25 |
# File 'lib/oci/load_balancer/models/update_health_checker_details.rb', line 23 def url_path @url_path end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
# File 'lib/oci/load_balancer/models/update_health_checker_details.rb', line 84 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'protocol': :'protocol', 'url_path': :'urlPath', 'port': :'port', 'return_code': :'returnCode', 'retries': :'retries', 'timeout_in_millis': :'timeoutInMillis', 'interval_in_millis': :'intervalInMillis', 'response_body_regex': :'responseBodyRegex', 'is_force_plain_text': :'isForcePlainText' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 |
# File 'lib/oci/load_balancer/models/update_health_checker_details.rb', line 101 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'protocol': :'String', 'url_path': :'String', 'port': :'Integer', 'return_code': :'Integer', 'retries': :'Integer', 'timeout_in_millis': :'Integer', 'interval_in_millis': :'Integer', 'response_body_regex': :'String', 'is_force_plain_text': :'BOOLEAN' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
190 191 192 193 194 195 196 197 198 199 200 201 202 203 |
# File 'lib/oci/load_balancer/models/update_health_checker_details.rb', line 190 def ==(other) return true if equal?(other) self.class == other.class && protocol == other.protocol && url_path == other.url_path && port == other.port && return_code == other.return_code && retries == other.retries && timeout_in_millis == other.timeout_in_millis && interval_in_millis == other.interval_in_millis && response_body_regex == other.response_body_regex && is_force_plain_text == other.is_force_plain_text 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_health_checker_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_health_checker_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_health_checker_details.rb', line 217 def hash [protocol, url_path, port, return_code, retries, timeout_in_millis, interval_in_millis, response_body_regex, is_force_plain_text].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_health_checker_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_health_checker_details.rb', line 255 def to_s to_hash.to_s end |