=begin
#Datadog API V2 Collection

#Collection of all Datadog Public endpoints.

The version of the OpenAPI document: 1.0
Contact: support@datadoghq.com
Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator

 Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
 This product includes software developed at Datadog (https://www.datadoghq.com/).
 Copyright 2020-Present Datadog, Inc.

=end

require 'date'
require 'time'

module DatadogAPIClient::V2
  # Meta response containing information about the API.
  class SensitiveDataScannerMeta
    include BaseGenericModel

    # Maximum number of scanning rules allowed for the org.
    attr_accessor :count_limit

    # Maximum number of scanning groups allowed for the org.
    attr_accessor :group_count_limit

    # Whether or not scanned events are highlighted in Logs or RUM for the org.
    attr_accessor :has_highlight_enabled

    # Whether or not scanned events have multi-pass enabled.
    attr_accessor :has_multi_pass_enabled

    # Whether or not the org is compliant to the payment card industry standard.
    attr_accessor :is_pci_compliant

    # Version of the API.
    attr_reader :version

    # Attribute mapping from ruby-style variable name to JSON key.
    # @!visibility private
    def self.attribute_map
      {
        :'count_limit' => :'count_limit',
        :'group_count_limit' => :'group_count_limit',
        :'has_highlight_enabled' => :'has_highlight_enabled',
        :'has_multi_pass_enabled' => :'has_multi_pass_enabled',
        :'is_pci_compliant' => :'is_pci_compliant',
        :'version' => :'version'
      }
    end

    # Attribute type mapping.
    # @!visibility private
    def self.openapi_types
      {
        :'count_limit' => :'Integer',
        :'group_count_limit' => :'Integer',
        :'has_highlight_enabled' => :'Boolean',
        :'has_multi_pass_enabled' => :'Boolean',
        :'is_pci_compliant' => :'Boolean',
        :'version' => :'Integer'
      }
    end

    # Initializes the object
    # @param attributes [Hash] Model attributes in the form of hash
    # @!visibility private
    def initialize(attributes = {})
      if (!attributes.is_a?(Hash))
        fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SensitiveDataScannerMeta` initialize method"
      end

      # check to see if the attribute exists and convert string to symbol for hash key
      attributes = attributes.each_with_object({}) { |(k, v), h|
        if (!self.class.attribute_map.key?(k.to_sym))
          fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SensitiveDataScannerMeta`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
        end
        h[k.to_sym] = v
      }

      if attributes.key?(:'count_limit')
        self.count_limit = attributes[:'count_limit']
      end

      if attributes.key?(:'group_count_limit')
        self.group_count_limit = attributes[:'group_count_limit']
      end

      if attributes.key?(:'has_highlight_enabled')
        self.has_highlight_enabled = attributes[:'has_highlight_enabled']
      end

      if attributes.key?(:'has_multi_pass_enabled')
        self.has_multi_pass_enabled = attributes[:'has_multi_pass_enabled']
      end

      if attributes.key?(:'is_pci_compliant')
        self.is_pci_compliant = attributes[:'is_pci_compliant']
      end

      if attributes.key?(:'version')
        self.version = attributes[:'version']
      end
    end

    # Check to see if the all the properties in the model are valid
    # @return true if the model is valid
    # @!visibility private
    def valid?
      return false if !@version.nil? && @version < 0
      true
    end

    # Custom attribute writer method with validation
    # @param version [Object] Object to be assigned
    # @!visibility private
    def version=(version)
      if !version.nil? && version < 0
        fail ArgumentError, 'invalid value for "version", must be greater than or equal to 0.'
      end
      @version = version
    end

    # Checks equality by comparing each attribute.
    # @param o [Object] Object to be compared
    # @!visibility private
    def ==(o)
      return true if self.equal?(o)
      self.class == o.class &&
          count_limit == o.count_limit &&
          group_count_limit == o.group_count_limit &&
          has_highlight_enabled == o.has_highlight_enabled &&
          has_multi_pass_enabled == o.has_multi_pass_enabled &&
          is_pci_compliant == o.is_pci_compliant &&
          version == o.version
    end

    # Calculates hash code according to all attributes.
    # @return [Integer] Hash code
    # @!visibility private
    def hash
      [count_limit, group_count_limit, has_highlight_enabled, has_multi_pass_enabled, is_pci_compliant, version].hash
    end
  end
end
