Class: Google::Compute::Data::HealChecHttpHealChec
- Inherits:
-
Object
- Object
- Google::Compute::Data::HealChecHttpHealChec
- Includes:
- Comparable
- Defined in:
- lib/google/compute/property/healthcheck_http_health_check.rb,
lib/google/compute/property/healthcheck_https_health_check.rb
Overview
A class to manage data for https_health_check for health_check.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#host ⇒ Object
readonly
Returns the value of attribute host.
-
#port ⇒ Object
readonly
Returns the value of attribute port.
-
#port_name ⇒ Object
readonly
Returns the value of attribute port_name.
-
#proxy_header ⇒ Object
readonly
Returns the value of attribute proxy_header.
-
#request_path ⇒ Object
readonly
Returns the value of attribute request_path.
Instance Method Summary collapse
Instance Attribute Details
#host ⇒ Object (readonly)
Returns the value of attribute host.
37 38 39 |
# File 'lib/google/compute/property/healthcheck_http_health_check.rb', line 37 def host @host end |
#port ⇒ Object (readonly)
Returns the value of attribute port.
39 40 41 |
# File 'lib/google/compute/property/healthcheck_http_health_check.rb', line 39 def port @port end |
#port_name ⇒ Object (readonly)
Returns the value of attribute port_name.
40 41 42 |
# File 'lib/google/compute/property/healthcheck_http_health_check.rb', line 40 def port_name @port_name end |
#proxy_header ⇒ Object (readonly)
Returns the value of attribute proxy_header.
41 42 43 |
# File 'lib/google/compute/property/healthcheck_http_health_check.rb', line 41 def proxy_header @proxy_header end |
#request_path ⇒ Object (readonly)
Returns the value of attribute request_path.
38 39 40 |
# File 'lib/google/compute/property/healthcheck_http_health_check.rb', line 38 def request_path @request_path end |
Instance Method Details
#<=>(other) ⇒ Object
72 73 74 75 76 77 78 79 80 |
# File 'lib/google/compute/property/healthcheck_http_health_check.rb', line 72 def <=>(other) return false unless other.is_a? HealChecHttpHealChec compare_fields(other).each do |compare| next if compare[:self].nil? || compare[:other].nil? result = compare[:self] <=> compare[:other] return result unless result.zero? end 0 end |
#==(other) ⇒ Object
63 64 65 66 67 68 69 70 |
# File 'lib/google/compute/property/healthcheck_http_health_check.rb', line 63 def ==(other) return false unless other.is_a? HealChecHttpHealChec compare_fields(other).each do |compare| next if compare[:self].nil? || compare[:other].nil? return false if compare[:self] != compare[:other] end true end |
#to_json(_arg = nil) ⇒ Object
43 44 45 46 47 48 49 50 51 |
# File 'lib/google/compute/property/healthcheck_http_health_check.rb', line 43 def to_json(_arg = nil) { 'host' => host, 'requestPath' => request_path, 'port' => port, 'portName' => port_name, 'proxyHeader' => proxy_header }.reject { |_k, v| v.nil? }.to_json end |
#to_s ⇒ Object
53 54 55 56 57 58 59 60 61 |
# File 'lib/google/compute/property/healthcheck_http_health_check.rb', line 53 def to_s { host: host, request_path: request_path, port: port, port_name: port_name, proxy_header: proxy_header }.reject { |_k, v| v.nil? }.map { |k, v| "#{k}: #{v}" }.join(', ') end |