/*
 * 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';

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

  /**
   * Defines the metadata of SecurityGroupNetworkInterface
   *
   * @returns {object} metadata of SecurityGroupNetworkInterface
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'SecurityGroupNetworkInterface',
      type: {
        name: 'Composite',
        className: 'SecurityGroupNetworkInterface',
        modelProperties: {
          id: {
            required: false,
            serializedName: 'id',
            type: {
              name: 'String'
            }
          },
          securityRuleAssociations: {
            required: false,
            serializedName: 'securityRuleAssociations',
            type: {
              name: 'Composite',
              className: 'SecurityRuleAssociations'
            }
          }
        }
      }
    };
  }
}

module.exports = SecurityGroupNetworkInterface;
