lib/fastly/models/healthcheck_response.rb in fastly-4.0.0.alpha4 vs lib/fastly/models/healthcheck_response.rb in fastly-4.0.0
- old
+ new
@@ -11,19 +11,22 @@
require 'date'
require 'time'
module Fastly
class HealthcheckResponse
- # How often to run the healthcheck in milliseconds.
+ # How often to run the health check in milliseconds.
attr_accessor :check_interval
# A freeform descriptive note.
attr_accessor :comment
# The status code expected from the host.
attr_accessor :expected_response
+ # Array of custom headers that will be added to the health check probes.
+ attr_accessor :headers
+
# Which host to check.
attr_accessor :host
# Whether to use version 1.0 or 1.1 HTTP.
attr_accessor :http_version
@@ -32,23 +35,23 @@
attr_accessor :initial
# Which HTTP method to use.
attr_accessor :method
- # The name of the healthcheck.
+ # The name of the health check.
attr_accessor :name
# The path to check.
attr_accessor :path
- # How many healthchecks must succeed to be considered healthy.
+ # How many health checks must succeed to be considered healthy.
attr_accessor :threshold
# Timeout in milliseconds.
attr_accessor :timeout
- # The number of most recent healthcheck queries to keep for this healthcheck.
+ # The number of most recent health check queries to keep for this health check.
attr_accessor :window
attr_accessor :service_id
attr_accessor :version
@@ -66,10 +69,11 @@
def self.attribute_map
{
:'check_interval' => :'check_interval',
:'comment' => :'comment',
:'expected_response' => :'expected_response',
+ :'headers' => :'headers',
:'host' => :'host',
:'http_version' => :'http_version',
:'initial' => :'initial',
:'method' => :'method',
:'name' => :'name',
@@ -94,10 +98,11 @@
def self.fastly_types
{
:'check_interval' => :'Integer',
:'comment' => :'String',
:'expected_response' => :'Integer',
+ :'headers' => :'Array<String>',
:'host' => :'String',
:'http_version' => :'String',
:'initial' => :'Integer',
:'method' => :'String',
:'name' => :'String',
@@ -115,12 +120,10 @@
# List of attributes with nullable: true
def self.fastly_nullable
Set.new([
:'comment',
- :'service_id',
- :'version',
:'created_at',
:'deleted_at',
:'updated_at'
])
end
@@ -159,10 +162,16 @@
if attributes.key?(:'expected_response')
self.expected_response = attributes[:'expected_response']
end
+ if attributes.key?(:'headers')
+ if (value = attributes[:'headers']).is_a?(Array)
+ self.headers = value
+ end
+ end
+
if attributes.key?(:'host')
self.host = attributes[:'host']
end
if attributes.key?(:'http_version')
@@ -237,10 +246,11 @@
return true if self.equal?(o)
self.class == o.class &&
check_interval == o.check_interval &&
comment == o.comment &&
expected_response == o.expected_response &&
+ headers == o.headers &&
host == o.host &&
http_version == o.http_version &&
initial == o.initial &&
method == o.method &&
name == o.name &&
@@ -262,10 +272,10 @@
end
# Calculates hash code according to all attributes.
# @return [Integer] Hash code
def hash
- [check_interval, comment, expected_response, host, http_version, initial, method, name, path, threshold, timeout, window, service_id, version, created_at, deleted_at, updated_at].hash
+ [check_interval, comment, expected_response, headers, host, http_version, initial, method, name, path, threshold, timeout, window, service_id, version, created_at, deleted_at, updated_at].hash
end
# Builds the object from hash
# @param [Hash] attributes Model attributes in the form of hash
# @return [Object] Returns the model itself