# frozen_string_literal: false

# ----------------------------------------------------------------------------
#
#     ***     AUTO GENERATED CODE    ***    Type: MMv1     ***
#
# ----------------------------------------------------------------------------
#
#     This file is automatically generated by Magic Modules and manual
#     changes will be clobbered when the file is regenerated.
#
#     Please read more about how to change this file in README.md and
#     CONTRIBUTING.md located at the root of this package.
#
# ----------------------------------------------------------------------------
require 'google/compute/property/regionsecuritypolicy_rules_rate_limit_options_ban_threshold'
require 'google/compute/property/regionsecuritypolicy_rules_rate_limit_options_enforce_on_key_configs'
require 'google/compute/property/regionsecuritypolicy_rules_rate_limit_options_exceed_action_rpc_status'
require 'google/compute/property/regionsecuritypolicy_rules_rate_limit_options_exceed_redirect_options'
require 'google/compute/property/regionsecuritypolicy_rules_rate_limit_options_rate_limit_threshold'
module GoogleInSpec
  module Compute
    module Property
      class RegionSecurityPolicyRulesRateLimitOptions
        attr_reader :rate_limit_threshold

        attr_reader :conform_action

        attr_reader :exceed_action

        attr_reader :exceed_redirect_options

        attr_reader :exceed_action_rpc_status

        attr_reader :enforce_on_key

        attr_reader :enforce_on_key_name

        attr_reader :enforce_on_key_configs

        attr_reader :ban_threshold

        attr_reader :ban_duration_sec

        def initialize(args = nil, parent_identifier = nil)
          return if args.nil?
          @parent_identifier = parent_identifier
          @rate_limit_threshold = GoogleInSpec::Compute::Property::RegionSecurityPolicyRulesRateLimitOptionsRateLimitThreshold.new(args['rateLimitThreshold'], to_s)
          @conform_action = args['conformAction']
          @exceed_action = args['exceedAction']
          @exceed_redirect_options = GoogleInSpec::Compute::Property::RegionSecurityPolicyRulesRateLimitOptionsExceedRedirectOptions.new(args['exceedRedirectOptions'], to_s)
          @exceed_action_rpc_status = GoogleInSpec::Compute::Property::RegionSecurityPolicyRulesRateLimitOptionsExceedActionRpcStatus.new(args['exceedActionRpcStatus'], to_s)
          @enforce_on_key = args['enforceOnKey']
          @enforce_on_key_name = args['enforceOnKeyName']
          @enforce_on_key_configs = GoogleInSpec::Compute::Property::RegionSecurityPolicyRulesRateLimitOptionsEnforceOnKeyConfigsArray.parse(args['enforceOnKeyConfigs'], to_s)
          @ban_threshold = GoogleInSpec::Compute::Property::RegionSecurityPolicyRulesRateLimitOptionsBanThreshold.new(args['banThreshold'], to_s)
          @ban_duration_sec = args['banDurationSec']
        end

        def to_s
          "#{@parent_identifier} RegionSecurityPolicyRulesRateLimitOptions"
        end
      end
    end
  end
end
