Method: OCI::Waas::Models::AddressRateLimiting#initialize
- Defined in:
- lib/oci/waas/models/address_rate_limiting.rb
#initialize(attributes = {}) ⇒ AddressRateLimiting
Initializes the object
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/oci/waas/models/address_rate_limiting.rb', line 59 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.is_enabled = attributes[:'isEnabled'] unless attributes[:'isEnabled'].nil? raise 'You cannot provide both :isEnabled and :is_enabled' if attributes.key?(:'isEnabled') && attributes.key?(:'is_enabled') self.is_enabled = attributes[:'is_enabled'] unless attributes[:'is_enabled'].nil? self.allowed_rate_per_address = attributes[:'allowedRatePerAddress'] if attributes[:'allowedRatePerAddress'] raise 'You cannot provide both :allowedRatePerAddress and :allowed_rate_per_address' if attributes.key?(:'allowedRatePerAddress') && attributes.key?(:'allowed_rate_per_address') self.allowed_rate_per_address = attributes[:'allowed_rate_per_address'] if attributes[:'allowed_rate_per_address'] self.max_delayed_count_per_address = attributes[:'maxDelayedCountPerAddress'] if attributes[:'maxDelayedCountPerAddress'] raise 'You cannot provide both :maxDelayedCountPerAddress and :max_delayed_count_per_address' if attributes.key?(:'maxDelayedCountPerAddress') && attributes.key?(:'max_delayed_count_per_address') self.max_delayed_count_per_address = attributes[:'max_delayed_count_per_address'] if attributes[:'max_delayed_count_per_address'] self.block_response_code = attributes[:'blockResponseCode'] if attributes[:'blockResponseCode'] raise 'You cannot provide both :blockResponseCode and :block_response_code' if attributes.key?(:'blockResponseCode') && attributes.key?(:'block_response_code') self.block_response_code = attributes[:'block_response_code'] if attributes[:'block_response_code'] end |