lib/fastly/models/rate_limiter.rb in fastly-5.2.2 vs lib/fastly/models/rate_limiter.rb in fastly-5.3.0

- old
+ new

@@ -35,10 +35,11 @@ attr_accessor :penalty_box_duration # The action to take when a rate limiter violation is detected. attr_accessor :action + # Custom response to be sent when the rate limit is exceeded. Required if `action` is `response`. attr_accessor :response # Name of existing response object. Required if `action` is `response_object`. Note that the rate limiter response is only updated to reflect the response object content when saving the rate limiter configuration. attr_accessor :response_object_name @@ -102,11 +103,11 @@ :'rps_limit' => :'Integer', :'window_size' => :'Integer', :'client_key' => :'Array<String>', :'penalty_box_duration' => :'Integer', :'action' => :'String', - :'response' => :'RateLimiterResponse1', + :'response' => :'Hash<String, String>', :'response_object_name' => :'String', :'logger_type' => :'String', :'feature_revision' => :'Integer' } end @@ -170,10 +171,12 @@ if attributes.key?(:'action') self.action = attributes[:'action'] end if attributes.key?(:'response') - self.response = attributes[:'response'] + if (value = attributes[:'response']).is_a?(Hash) + self.response = value + end end if attributes.key?(:'response_object_name') self.response_object_name = attributes[:'response_object_name'] end