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

/**
 * Full view of network features for an app (presently VNET integration and
 * Hybrid Connections).
 *
 * @extends models['ProxyOnlyResource']
 */
class NetworkFeatures extends models['ProxyOnlyResource'] {
  /**
   * Create a NetworkFeatures.
   * @member {string} [virtualNetworkName] The Virtual Network name.
   * @member {object} [virtualNetworkConnection] The Virtual Network summary
   * view.
   * @member {string} [virtualNetworkConnection.vnetResourceId] The Virtual
   * Network's resource ID.
   * @member {string} [virtualNetworkConnection.certThumbprint] The client
   * certificate thumbprint.
   * @member {buffer} [virtualNetworkConnection.certBlob] A certificate file
   * (.cer) blob containing the public key of the private key used to
   * authenticate a
   * Point-To-Site VPN connection.
   * @member {array} [virtualNetworkConnection.routes] The routes that this
   * Virtual Network connection uses.
   * @member {boolean} [virtualNetworkConnection.resyncRequired]
   * <code>true</code> if a resync is required; otherwise, <code>false</code>.
   * @member {string} [virtualNetworkConnection.dnsServers] DNS servers to be
   * used by this Virtual Network. This should be a comma-separated list of IP
   * addresses.
   * @member {array} [hybridConnections] The Hybrid Connections summary view.
   * @member {array} [hybridConnectionsV2] The Hybrid Connection V2 (Service
   * Bus) view.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of NetworkFeatures
   *
   * @returns {object} metadata of NetworkFeatures
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'NetworkFeatures',
      type: {
        name: 'Composite',
        className: 'NetworkFeatures',
        modelProperties: {
          id: {
            required: false,
            readOnly: true,
            serializedName: 'id',
            type: {
              name: 'String'
            }
          },
          name: {
            required: false,
            readOnly: true,
            serializedName: 'name',
            type: {
              name: 'String'
            }
          },
          kind: {
            required: false,
            serializedName: 'kind',
            type: {
              name: 'String'
            }
          },
          type: {
            required: false,
            readOnly: true,
            serializedName: 'type',
            type: {
              name: 'String'
            }
          },
          virtualNetworkName: {
            required: false,
            readOnly: true,
            serializedName: 'properties.virtualNetworkName',
            type: {
              name: 'String'
            }
          },
          virtualNetworkConnection: {
            required: false,
            readOnly: true,
            serializedName: 'properties.virtualNetworkConnection',
            type: {
              name: 'Composite',
              className: 'VnetInfo'
            }
          },
          hybridConnections: {
            required: false,
            readOnly: true,
            serializedName: 'properties.hybridConnections',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'RelayServiceConnectionEntityElementType',
                  type: {
                    name: 'Composite',
                    className: 'RelayServiceConnectionEntity'
                  }
              }
            }
          },
          hybridConnectionsV2: {
            required: false,
            readOnly: true,
            serializedName: 'properties.hybridConnectionsV2',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'HybridConnectionElementType',
                  type: {
                    name: 'Composite',
                    className: 'HybridConnection'
                  }
              }
            }
          }
        }
      }
    };
  }
}

module.exports = NetworkFeatures;
