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

const models = require('./index');

/**
 * A virtual network.
 *
 * @extends models['Resource']
 */
class VirtualNetwork extends models['Resource'] {
  /**
   * Create a VirtualNetwork.
   * @property {array} [allowedSubnets] The allowed subnets of the virtual
   * network.
   * @property {string} [description] The description of the virtual network.
   * @property {string} [externalProviderResourceId] The Microsoft.Network
   * resource identifier of the virtual network.
   * @property {array} [externalSubnets] The external subnet properties.
   * @property {array} [subnetOverrides] The subnet overrides of the virtual
   * network.
   * @property {date} [createdDate] The creation date of the virtual network.
   * @property {string} [provisioningState] The provisioning status of the
   * resource.
   * @property {string} [uniqueIdentifier] The unique immutable identifier of a
   * resource (Guid).
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of VirtualNetwork
   *
   * @returns {object} metadata of VirtualNetwork
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'VirtualNetwork',
      type: {
        name: 'Composite',
        className: 'VirtualNetwork',
        modelProperties: {
          id: {
            required: false,
            readOnly: true,
            serializedName: 'id',
            type: {
              name: 'String'
            }
          },
          name: {
            required: false,
            readOnly: true,
            serializedName: 'name',
            type: {
              name: 'String'
            }
          },
          type: {
            required: false,
            readOnly: true,
            serializedName: 'type',
            type: {
              name: 'String'
            }
          },
          location: {
            required: false,
            serializedName: 'location',
            type: {
              name: 'String'
            }
          },
          tags: {
            required: false,
            serializedName: 'tags',
            type: {
              name: 'Dictionary',
              value: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          allowedSubnets: {
            required: false,
            serializedName: 'properties.allowedSubnets',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'SubnetElementType',
                  type: {
                    name: 'Composite',
                    className: 'Subnet'
                  }
              }
            }
          },
          description: {
            required: false,
            serializedName: 'properties.description',
            type: {
              name: 'String'
            }
          },
          externalProviderResourceId: {
            required: false,
            serializedName: 'properties.externalProviderResourceId',
            type: {
              name: 'String'
            }
          },
          externalSubnets: {
            required: false,
            readOnly: true,
            serializedName: 'properties.externalSubnets',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'ExternalSubnetElementType',
                  type: {
                    name: 'Composite',
                    className: 'ExternalSubnet'
                  }
              }
            }
          },
          subnetOverrides: {
            required: false,
            serializedName: 'properties.subnetOverrides',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'SubnetOverrideElementType',
                  type: {
                    name: 'Composite',
                    className: 'SubnetOverride'
                  }
              }
            }
          },
          createdDate: {
            required: false,
            readOnly: true,
            serializedName: 'properties.createdDate',
            type: {
              name: 'DateTime'
            }
          },
          provisioningState: {
            required: false,
            readOnly: true,
            serializedName: 'properties.provisioningState',
            type: {
              name: 'String'
            }
          },
          uniqueIdentifier: {
            required: false,
            readOnly: true,
            serializedName: 'properties.uniqueIdentifier',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = VirtualNetwork;
