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

/**
 * Configuration of a virtual network to which API Management service is
 * deployed.
 *
 */
class VirtualNetworkConfiguration {
  /**
   * Create a VirtualNetworkConfiguration.
   * @property {string} [vnetid] The virtual network ID. This is typically a
   * GUID. Expect a null GUID by default.
   * @property {string} [subnetname] The name of the subnet.
   * @property {string} [subnetResourceId] The full resource ID of a subnet in
   * a virtual network to deploy the API Management service in.
   */
  constructor() {
  }

  /**
   * Defines the metadata of VirtualNetworkConfiguration
   *
   * @returns {object} metadata of VirtualNetworkConfiguration
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'VirtualNetworkConfiguration',
      type: {
        name: 'Composite',
        className: 'VirtualNetworkConfiguration',
        modelProperties: {
          vnetid: {
            required: false,
            readOnly: true,
            serializedName: 'vnetid',
            type: {
              name: 'String'
            }
          },
          subnetname: {
            required: false,
            readOnly: true,
            serializedName: 'subnetname',
            type: {
              name: 'String'
            }
          },
          subnetResourceId: {
            required: false,
            serializedName: 'subnetResourceId',
            constraints: {
              Pattern: /^\/subscriptions\/[^\/]*\/resourceGroups\/[^\/]*\/providers\/Microsoft.(ClassicNetwork|Network)\/virtualNetworks\/[^\/]*\/subnets\/[^\/]*$/
            },
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = VirtualNetworkConfiguration;
