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

/**
 * Network Mapping model. Ideally it should have been possible to inherit this
 * class from prev version in InheritedModels as long as there is no difference
 * in structure or method signature. Since there were no base Models for
 * certain fields and methods viz NetworkMappingProperties and Load with
 * required return type, the class has been introduced in its entirety with
 * references to base models to facilitate exensions in subsequent versions.
 *
 * @extends models['Resource']
 */
class NetworkMapping extends models['Resource'] {
  /**
   * Create a NetworkMapping.
   * @member {object} [properties] The Network Mapping Properties.
   * @member {string} [properties.state] The pairing state for network mapping.
   * @member {string} [properties.primaryNetworkFriendlyName] The primary
   * network friendly name.
   * @member {string} [properties.primaryNetworkId] The primary network id for
   * network mapping.
   * @member {string} [properties.primaryFabricFriendlyName] The primary fabric
   * friendly name.
   * @member {string} [properties.recoveryNetworkFriendlyName] The recovery
   * network friendly name.
   * @member {string} [properties.recoveryNetworkId] The recovery network id
   * for network mapping.
   * @member {string} [properties.recoveryFabricArmId] The recovery fabric ARM
   * id.
   * @member {string} [properties.recoveryFabricFriendlyName] The recovery
   * fabric friendly name.
   * @member {object} [properties.fabricSpecificSettings] The fabric specific
   * settings.
   * @member {string} [properties.fabricSpecificSettings.instanceType]
   * Polymorphic Discriminator
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of NetworkMapping
   *
   * @returns {object} metadata of NetworkMapping
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'NetworkMapping',
      type: {
        name: 'Composite',
        className: 'NetworkMapping',
        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'
            }
          },
          properties: {
            required: false,
            serializedName: 'properties',
            type: {
              name: 'Composite',
              className: 'NetworkMappingProperties'
            }
          }
        }
      }
    };
  }
}

module.exports = NetworkMapping;
