# 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/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule'
require 'google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule_dictionary'
require 'google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule_dictionary_cloud_storage_path'
require 'google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule_dictionary_word_list'
require 'google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule_exclude_info_types'
require 'google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule_exclude_info_types_info_types'
require 'google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_exclusion_rule_regex'
require 'google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_hotword_rule'
require 'google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_hotword_rule_hotword_regex'
require 'google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_hotword_rule_likelihood_adjustment'
require 'google/dlp/property/inspecttemplate_inspect_config_rule_set_rules_hotword_rule_proximity'
module GoogleInSpec
  module DLP
    module Property
      class InspectTemplateInspectConfigRuleSetRules
        attr_reader :hotword_rule

        attr_reader :exclusion_rule

        def initialize(args = nil, parent_identifier = nil)
          return if args.nil?
          @parent_identifier = parent_identifier
          @hotword_rule = GoogleInSpec::DLP::Property::InspectTemplateInspectConfigRuleSetRulesHotwordRule.new(args['hotwordRule'], to_s)
          @exclusion_rule = GoogleInSpec::DLP::Property::InspectTemplateInspectConfigRuleSetRulesExclusionRule.new(args['exclusionRule'], to_s)
        end

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

      class InspectTemplateInspectConfigRuleSetRulesArray
        def self.parse(value, parent_identifier)
          return if value.nil?
          return InspectTemplateInspectConfigRuleSetRules.new(value, parent_identifier) unless value.is_a?(::Array)
          value.map { |v| InspectTemplateInspectConfigRuleSetRules.new(v, parent_identifier) }
        end
      end
    end
  end
end
