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

/**
 * SSH configuration.
 *
 */
class SshConfiguration {
  /**
   * Create a SshConfiguration.
   * @member {array} [publicIPsToAllow] Allowed public IPs. List of source IP
   * ranges to allow SSH connection from. The default value is '*' (all source
   * IPs are allowed). Maximum number of IP ranges that can be specified is
   * 400.
   * @member {object} userAccountSettings User account settings. Settings for
   * administrator user account to be created on a node. The account can be
   * used to establish SSH connection to the node.
   * @member {string} [userAccountSettings.adminUserName] Name of the
   * administrator user account which can be used to SSH to nodes.
   * @member {string} [userAccountSettings.adminUserSshPublicKey] SSH public
   * key of the administrator user account.
   * @member {string} [userAccountSettings.adminUserPassword] Password of the
   * administrator user account.
   */
  constructor() {
  }

  /**
   * Defines the metadata of SshConfiguration
   *
   * @returns {object} metadata of SshConfiguration
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'SshConfiguration',
      type: {
        name: 'Composite',
        className: 'SshConfiguration',
        modelProperties: {
          publicIPsToAllow: {
            required: false,
            serializedName: 'publicIPsToAllow',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          userAccountSettings: {
            required: true,
            serializedName: 'userAccountSettings',
            type: {
              name: 'Composite',
              className: 'UserAccountSettings'
            }
          }
        }
      }
    };
  }
}

module.exports = SshConfiguration;
