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

/**
 * Description of a Virtual Network that is useable for private site access.
 *
 */
class PrivateAccessVirtualNetwork {
  /**
   * Create a PrivateAccessVirtualNetwork.
   * @member {string} [name] The name of the Virtual Network.
   * @member {number} [key] The key (ID) of the Virtual Network.
   * @member {string} [resourceId] The ARM uri of the Virtual Network
   * @member {array} [subnets] A List of subnets that access is allowed to on
   * this Virtual Network. An empty array (but not null) is interpreted to mean
   * that all subnets are allowed within this Virtual Network.
   */
  constructor() {
  }

  /**
   * Defines the metadata of PrivateAccessVirtualNetwork
   *
   * @returns {object} metadata of PrivateAccessVirtualNetwork
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'PrivateAccessVirtualNetwork',
      type: {
        name: 'Composite',
        className: 'PrivateAccessVirtualNetwork',
        modelProperties: {
          name: {
            required: false,
            serializedName: 'name',
            type: {
              name: 'String'
            }
          },
          key: {
            required: false,
            serializedName: 'key',
            type: {
              name: 'Number'
            }
          },
          resourceId: {
            required: false,
            serializedName: 'resourceId',
            type: {
              name: 'String'
            }
          },
          subnets: {
            required: false,
            serializedName: 'subnets',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'PrivateAccessSubnetElementType',
                  type: {
                    name: 'Composite',
                    className: 'PrivateAccessSubnet'
                  }
              }
            }
          }
        }
      }
    };
  }
}

module.exports = PrivateAccessVirtualNetwork;
