/*
 * Copyright (c) Microsoft Corporation. All rights reserved.
 * Licensed under the MIT License. See License.txt in the project root for
 * license information.
 *
 * Code generated by Microsoft (R) AutoRest Code Generator.
 * Changes may cause incorrect behavior and will be lost if the code is
 * regenerated.
 */

'use strict';

/**
 * All security rules associated with the network interface.
 *
 */
class SecurityRuleAssociations {
  /**
   * Create a SecurityRuleAssociations.
   * @property {object} [networkInterfaceAssociation] Network interface and
   * it's custom security rules.
   * @property {string} [networkInterfaceAssociation.id] Network interface ID.
   * @property {array} [networkInterfaceAssociation.securityRules] Collection
   * of custom security rules.
   * @property {object} [subnetAssociation] Subnet and it's custom security
   * rules.
   * @property {string} [subnetAssociation.id] Subnet ID.
   * @property {array} [subnetAssociation.securityRules] Collection of custom
   * security rules.
   * @property {array} [defaultSecurityRules] Collection of default security
   * rules of the network security group.
   * @property {array} [effectiveSecurityRules] Collection of effective
   * security rules.
   */
  constructor() {
  }

  /**
   * Defines the metadata of SecurityRuleAssociations
   *
   * @returns {object} metadata of SecurityRuleAssociations
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'SecurityRuleAssociations',
      type: {
        name: 'Composite',
        className: 'SecurityRuleAssociations',
        modelProperties: {
          networkInterfaceAssociation: {
            required: false,
            serializedName: 'networkInterfaceAssociation',
            type: {
              name: 'Composite',
              className: 'NetworkInterfaceAssociation'
            }
          },
          subnetAssociation: {
            required: false,
            serializedName: 'subnetAssociation',
            type: {
              name: 'Composite',
              className: 'SubnetAssociation'
            }
          },
          defaultSecurityRules: {
            required: false,
            serializedName: 'defaultSecurityRules',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'SecurityRuleElementType',
                  type: {
                    name: 'Composite',
                    className: 'SecurityRule'
                  }
              }
            }
          },
          effectiveSecurityRules: {
            required: false,
            serializedName: 'effectiveSecurityRules',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'EffectiveNetworkSecurityRuleElementType',
                  type: {
                    name: 'Composite',
                    className: 'EffectiveNetworkSecurityRule'
                  }
              }
            }
          }
        }
      }
    };
  }
}

module.exports = SecurityRuleAssociations;
