# encoding: utf-8
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.

module Azure::Network::Mgmt::V2020_04_01
  module Models
    #
    # Effective network security group.
    #
    class EffectiveNetworkSecurityGroup

      include MsRestAzure

      # @return [SubResource] The ID of network security group that is applied.
      attr_accessor :network_security_group

      # @return [EffectiveNetworkSecurityGroupAssociation] Associated
      # resources.
      attr_accessor :association

      # @return [Array<EffectiveNetworkSecurityRule>] A collection of effective
      # security rules.
      attr_accessor :effective_security_rules

      # @return [Hash{String => Array<String>}] Mapping of tags to list of IP
      # Addresses included within the tag.
      attr_accessor :tag_map


      #
      # Mapper for EffectiveNetworkSecurityGroup class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'EffectiveNetworkSecurityGroup',
          type: {
            name: 'Composite',
            class_name: 'EffectiveNetworkSecurityGroup',
            model_properties: {
              network_security_group: {
                client_side_validation: true,
                required: false,
                serialized_name: 'networkSecurityGroup',
                type: {
                  name: 'Composite',
                  class_name: 'SubResource'
                }
              },
              association: {
                client_side_validation: true,
                required: false,
                serialized_name: 'association',
                type: {
                  name: 'Composite',
                  class_name: 'EffectiveNetworkSecurityGroupAssociation'
                }
              },
              effective_security_rules: {
                client_side_validation: true,
                required: false,
                serialized_name: 'effectiveSecurityRules',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'EffectiveNetworkSecurityRuleElementType',
                      type: {
                        name: 'Composite',
                        class_name: 'EffectiveNetworkSecurityRule'
                      }
                  }
                }
              },
              tag_map: {
                client_side_validation: true,
                required: false,
                serialized_name: 'tagMap',
                type: {
                  name: 'Dictionary',
                  value: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'ArrayElementType',
                      type: {
                        name: 'Sequence',
                        element: {
                            client_side_validation: true,
                            required: false,
                            serialized_name: 'StringElementType',
                            type: {
                              name: 'String'
                            }
                        }
                      }
                  }
                }
              }
            }
          }
        }
      end
    end
  end
end
