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

/**
 * File Server information.
 *
 * @extends models['ProxyResource']
 */
class FileServer extends models['ProxyResource'] {
  /**
   * Create a FileServer.
   * @member {string} [vmSize] VM size. VM size of the File Server.
   * @member {object} [sshConfiguration] SSH configuration. SSH configuration
   * for accessing the File Server node.
   * @member {array} [sshConfiguration.publicIPsToAllow] 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} [sshConfiguration.userAccountSettings] 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} [sshConfiguration.userAccountSettings.adminUserName] Name
   * of the administrator user account which can be used to SSH to nodes.
   * @member {string}
   * [sshConfiguration.userAccountSettings.adminUserSshPublicKey] SSH public
   * key of the administrator user account.
   * @member {string} [sshConfiguration.userAccountSettings.adminUserPassword]
   * Password of the administrator user account.
   * @member {object} [dataDisks] Data disks configuration. Information about
   * disks attached to File Server VM.
   * @member {number} [dataDisks.diskSizeInGB] Disk size in GB for the blank
   * data disks.
   * @member {string} [dataDisks.cachingType] Caching type for the disks.
   * Available values are none (default), readonly, readwrite. Caching type can
   * be set only for VM sizes supporting premium storage. Possible values
   * include: 'none', 'readonly', 'readwrite'
   * @member {number} [dataDisks.diskCount] Number of data disks attached to
   * the File Server. If multiple disks attached, they will be configured in
   * RAID level 0.
   * @member {string} [dataDisks.storageAccountType] Type of storage account to
   * be used on the disk. Possible values are: Standard_LRS or Premium_LRS.
   * Premium storage account type can only be used with VM sizes supporting
   * premium storage. Possible values include: 'Standard_LRS', 'Premium_LRS'
   * @member {object} [subnet] Subnet. File Server virtual network subnet
   * resource ID.
   * @member {string} [subnet.id] The ID of the resource
   * @member {object} [mountSettings] Mount settings. File Server mount
   * settings.
   * @member {string} [mountSettings.mountPoint] Path where the data disks are
   * mounted on the File Server.
   * @member {string} [mountSettings.fileServerPublicIP] Public IP address of
   * the File Server which can be used to SSH to the node from outside of the
   * subnet.
   * @member {string} [mountSettings.fileServerInternalIP] Internal IP address
   * of the File Server which can be used to access the File Server from within
   * the subnet.
   * @member {date} [provisioningStateTransitionTime] Provisioning State
   * Transition time. Time when the provisioning state was changed.
   * @member {date} [creationTime] Creation time. Time when the FileServer was
   * created.
   * @member {string} [provisioningState] Provisioning state. Provisioning
   * state of the File Server. Possible values: creating - The File Server is
   * getting created; updating - The File Server creation has been accepted and
   * it is getting updated; deleting - The user has requested that the File
   * Server be deleted, and it is in the process of being deleted; failed - The
   * File Server creation has failed with the specified error code. Details
   * about the error code are specified in the message field; succeeded - The
   * File Server creation has succeeded. Possible values include: 'creating',
   * 'updating', 'deleting', 'succeeded', 'failed'
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of FileServer
   *
   * @returns {object} metadata of FileServer
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'FileServer',
      type: {
        name: 'Composite',
        className: 'FileServer',
        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'
            }
          },
          vmSize: {
            required: false,
            serializedName: 'properties.vmSize',
            type: {
              name: 'String'
            }
          },
          sshConfiguration: {
            required: false,
            serializedName: 'properties.sshConfiguration',
            type: {
              name: 'Composite',
              className: 'SshConfiguration'
            }
          },
          dataDisks: {
            required: false,
            serializedName: 'properties.dataDisks',
            type: {
              name: 'Composite',
              className: 'DataDisks'
            }
          },
          subnet: {
            required: false,
            serializedName: 'properties.subnet',
            type: {
              name: 'Composite',
              className: 'ResourceId'
            }
          },
          mountSettings: {
            required: false,
            readOnly: true,
            serializedName: 'properties.mountSettings',
            type: {
              name: 'Composite',
              className: 'MountSettings'
            }
          },
          provisioningStateTransitionTime: {
            required: false,
            readOnly: true,
            serializedName: 'properties.provisioningStateTransitionTime',
            type: {
              name: 'DateTime'
            }
          },
          creationTime: {
            required: false,
            readOnly: true,
            serializedName: 'properties.creationTime',
            type: {
              name: 'DateTime'
            }
          },
          provisioningState: {
            required: false,
            nullable: false,
            readOnly: true,
            serializedName: 'properties.provisioningState',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = FileServer;
