Class: Google::Compute::Data::BackServCachKeyPoli
- Inherits:
-
Object
- Object
- Google::Compute::Data::BackServCachKeyPoli
- Includes:
- Comparable
- Defined in:
- lib/google/compute/property/backendservice_cache_key_policy.rb
Overview
A class to manage data for cache_key_policy for backend_service.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#include_host ⇒ Object
readonly
Returns the value of attribute include_host.
-
#include_protocol ⇒ Object
readonly
Returns the value of attribute include_protocol.
-
#include_query_string ⇒ Object
readonly
Returns the value of attribute include_query_string.
-
#query_string_blacklist ⇒ Object
readonly
Returns the value of attribute query_string_blacklist.
-
#query_string_whitelist ⇒ Object
readonly
Returns the value of attribute query_string_whitelist.
Instance Method Summary collapse
Instance Attribute Details
#include_host ⇒ Object (readonly)
Returns the value of attribute include_host.
37 38 39 |
# File 'lib/google/compute/property/backendservice_cache_key_policy.rb', line 37 def include_host @include_host end |
#include_protocol ⇒ Object (readonly)
Returns the value of attribute include_protocol.
38 39 40 |
# File 'lib/google/compute/property/backendservice_cache_key_policy.rb', line 38 def include_protocol @include_protocol end |
#include_query_string ⇒ Object (readonly)
Returns the value of attribute include_query_string.
39 40 41 |
# File 'lib/google/compute/property/backendservice_cache_key_policy.rb', line 39 def include_query_string @include_query_string end |
#query_string_blacklist ⇒ Object (readonly)
Returns the value of attribute query_string_blacklist.
40 41 42 |
# File 'lib/google/compute/property/backendservice_cache_key_policy.rb', line 40 def query_string_blacklist @query_string_blacklist end |
#query_string_whitelist ⇒ Object (readonly)
Returns the value of attribute query_string_whitelist.
41 42 43 |
# File 'lib/google/compute/property/backendservice_cache_key_policy.rb', line 41 def query_string_whitelist @query_string_whitelist end |
Instance Method Details
#<=>(other) ⇒ Object
72 73 74 75 76 77 78 79 80 |
# File 'lib/google/compute/property/backendservice_cache_key_policy.rb', line 72 def <=>(other) return false unless other.is_a? BackServCachKeyPoli 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/backendservice_cache_key_policy.rb', line 63 def ==(other) return false unless other.is_a? BackServCachKeyPoli 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/backendservice_cache_key_policy.rb', line 43 def to_json(_arg = nil) { 'includeHost' => include_host, 'includeProtocol' => include_protocol, 'includeQueryString' => include_query_string, 'queryStringBlacklist' => query_string_blacklist, 'queryStringWhitelist' => query_string_whitelist }.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/backendservice_cache_key_policy.rb', line 53 def to_s { include_host: include_host, include_protocol: include_protocol, include_query_string: include_query_string, query_string_blacklist: query_string_blacklist, query_string_whitelist: query_string_whitelist }.reject { |_k, v| v.nil? }.map { |k, v| "#{k}: #{v}" }.join(', ') end |