/*
 * 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 machine.
 *
 * @extends models['Resource']
 */
class LabVirtualMachine extends models['Resource'] {
  /**
   * Create a LabVirtualMachine.
   * @property {string} [notes] The notes of the virtual machine.
   * @property {string} [ownerObjectId] The object identifier of the owner of
   * the virtual machine.
   * @property {string} [ownerUserPrincipalName] The user principal name of the
   * virtual machine owner.
   * @property {string} [createdByUserId] The object identifier of the creator
   * of the virtual machine.
   * @property {string} [createdByUser] The email address of creator of the
   * virtual machine.
   * @property {date} [createdDate] The creation date of the virtual machine.
   * @property {string} [computeId] The resource identifier (Microsoft.Compute)
   * of the virtual machine.
   * @property {string} [customImageId] The custom image identifier of the
   * virtual machine.
   * @property {string} [osType] The OS type of the virtual machine.
   * @property {string} [size] The size of the virtual machine.
   * @property {string} [userName] The user name of the virtual machine.
   * @property {string} [password] The password of the virtual machine
   * administrator.
   * @property {string} [sshKey] The SSH key of the virtual machine
   * administrator.
   * @property {boolean} [isAuthenticationWithSshKey] Indicates whether this
   * virtual machine uses an SSH key for authentication.
   * @property {string} [fqdn] The fully-qualified domain name of the virtual
   * machine.
   * @property {string} [labSubnetName] The lab subnet name of the virtual
   * machine.
   * @property {string} [labVirtualNetworkId] The lab virtual network
   * identifier of the virtual machine.
   * @property {boolean} [disallowPublicIpAddress] Indicates whether the
   * virtual machine is to be created without a public IP address.
   * @property {array} [artifacts] The artifacts to be installed on the virtual
   * machine.
   * @property {object} [artifactDeploymentStatus] The artifact deployment
   * status for the virtual machine.
   * @property {string} [artifactDeploymentStatus.deploymentStatus] The
   * deployment status of the artifact.
   * @property {number} [artifactDeploymentStatus.artifactsApplied] The total
   * count of the artifacts that were successfully applied.
   * @property {number} [artifactDeploymentStatus.totalArtifacts] The total
   * count of the artifacts that were tentatively applied.
   * @property {object} [galleryImageReference] The Microsoft Azure Marketplace
   * image reference of the virtual machine.
   * @property {string} [galleryImageReference.offer] The offer of the gallery
   * image.
   * @property {string} [galleryImageReference.publisher] The publisher of the
   * gallery image.
   * @property {string} [galleryImageReference.sku] The SKU of the gallery
   * image.
   * @property {string} [galleryImageReference.osType] The OS type of the
   * gallery image.
   * @property {string} [galleryImageReference.version] The version of the
   * gallery image.
   * @property {string} [planId] The id of the plan associated with the virtual
   * machine image
   * @property {object} [computeVm] The compute virtual machine properties.
   * @property {array} [computeVm.statuses] Gets the statuses of the virtual
   * machine.
   * @property {string} [computeVm.osType] Gets the OS type of the virtual
   * machine.
   * @property {string} [computeVm.vmSize] Gets the size of the virtual
   * machine.
   * @property {string} [computeVm.networkInterfaceId] Gets the network
   * interface ID of the virtual machine.
   * @property {string} [computeVm.osDiskId] Gets OS disk blob uri for the
   * virtual machine.
   * @property {array} [computeVm.dataDiskIds] Gets data disks blob uri for the
   * virtual machine.
   * @property {array} [computeVm.dataDisks] Gets all data disks attached to
   * the virtual machine.
   * @property {object} [networkInterface] The network interface properties.
   * @property {string} [networkInterface.virtualNetworkId] The resource ID of
   * the virtual network.
   * @property {string} [networkInterface.subnetId] The resource ID of the sub
   * net.
   * @property {string} [networkInterface.publicIpAddressId] The resource ID of
   * the public IP address.
   * @property {string} [networkInterface.publicIpAddress] The public IP
   * address.
   * @property {string} [networkInterface.privateIpAddress] The private IP
   * address.
   * @property {string} [networkInterface.dnsName] The DNS name.
   * @property {string} [networkInterface.rdpAuthority] The RdpAuthority
   * property is a server DNS host name or IP address followed by the service
   * port number for RDP (Remote Desktop Protocol).
   * @property {string} [networkInterface.sshAuthority] The SshAuthority
   * property is a server DNS host name or IP address followed by the service
   * port number for SSH.
   * @property {object} [networkInterface.sharedPublicIpAddressConfiguration]
   * The configuration for sharing a public IP address across multiple virtual
   * machines.
   * @property {array}
   * [networkInterface.sharedPublicIpAddressConfiguration.inboundNatRules] The
   * incoming NAT rules
   * @property {object} [applicableSchedule] The applicable schedule for the
   * virtual machine.
   * @property {object} [applicableSchedule.labVmsShutdown] The auto-shutdown
   * schedule, if one has been set at the lab or lab resource level.
   * @property {string} [applicableSchedule.labVmsShutdown.status] The status
   * of the schedule (i.e. Enabled, Disabled). Possible values include:
   * 'Enabled', 'Disabled'
   * @property {string} [applicableSchedule.labVmsShutdown.taskType] The task
   * type of the schedule (e.g. LabVmsShutdownTask, LabVmAutoStart).
   * @property {object} [applicableSchedule.labVmsShutdown.weeklyRecurrence] If
   * the schedule will occur only some days of the week, specify the weekly
   * recurrence.
   * @property {array}
   * [applicableSchedule.labVmsShutdown.weeklyRecurrence.weekdays] The days of
   * the week for which the schedule is set (e.g. Sunday, Monday, Tuesday,
   * etc.).
   * @property {string}
   * [applicableSchedule.labVmsShutdown.weeklyRecurrence.time] The time of the
   * day the schedule will occur.
   * @property {object} [applicableSchedule.labVmsShutdown.dailyRecurrence] If
   * the schedule will occur once each day of the week, specify the daily
   * recurrence.
   * @property {string}
   * [applicableSchedule.labVmsShutdown.dailyRecurrence.time] The time of day
   * the schedule will occur.
   * @property {object} [applicableSchedule.labVmsShutdown.hourlyRecurrence] If
   * the schedule will occur multiple times a day, specify the hourly
   * recurrence.
   * @property {number}
   * [applicableSchedule.labVmsShutdown.hourlyRecurrence.minute] Minutes of the
   * hour the schedule will run.
   * @property {string} [applicableSchedule.labVmsShutdown.timeZoneId] The time
   * zone ID (e.g. Pacific Standard time).
   * @property {object}
   * [applicableSchedule.labVmsShutdown.notificationSettings] Notification
   * settings.
   * @property {string}
   * [applicableSchedule.labVmsShutdown.notificationSettings.status] If
   * notifications are enabled for this schedule (i.e. Enabled, Disabled).
   * Possible values include: 'Enabled', 'Disabled'
   * @property {number}
   * [applicableSchedule.labVmsShutdown.notificationSettings.timeInMinutes]
   * Time in minutes before event at which notification will be sent.
   * @property {string}
   * [applicableSchedule.labVmsShutdown.notificationSettings.webhookUrl] The
   * webhook URL to which the notification will be sent.
   * @property {string}
   * [applicableSchedule.labVmsShutdown.notificationSettings.emailRecipient]
   * The email recipient to send notifications to (can be a list of semi-colon
   * separated email addresses).
   * @property {string}
   * [applicableSchedule.labVmsShutdown.notificationSettings.notificationLocale]
   * The locale to use when sending a notification (fallback for unsupported
   * languages is EN).
   * @property {date} [applicableSchedule.labVmsShutdown.createdDate] The
   * creation date of the schedule.
   * @property {string} [applicableSchedule.labVmsShutdown.targetResourceId]
   * The resource ID to which the schedule belongs
   * @property {string} [applicableSchedule.labVmsShutdown.provisioningState]
   * The provisioning status of the resource.
   * @property {string} [applicableSchedule.labVmsShutdown.uniqueIdentifier]
   * The unique immutable identifier of a resource (Guid).
   * @property {object} [applicableSchedule.labVmsStartup] The auto-startup
   * schedule, if one has been set at the lab or lab resource level.
   * @property {string} [applicableSchedule.labVmsStartup.status] The status of
   * the schedule (i.e. Enabled, Disabled). Possible values include: 'Enabled',
   * 'Disabled'
   * @property {string} [applicableSchedule.labVmsStartup.taskType] The task
   * type of the schedule (e.g. LabVmsShutdownTask, LabVmAutoStart).
   * @property {object} [applicableSchedule.labVmsStartup.weeklyRecurrence] If
   * the schedule will occur only some days of the week, specify the weekly
   * recurrence.
   * @property {array}
   * [applicableSchedule.labVmsStartup.weeklyRecurrence.weekdays] The days of
   * the week for which the schedule is set (e.g. Sunday, Monday, Tuesday,
   * etc.).
   * @property {string}
   * [applicableSchedule.labVmsStartup.weeklyRecurrence.time] The time of the
   * day the schedule will occur.
   * @property {object} [applicableSchedule.labVmsStartup.dailyRecurrence] If
   * the schedule will occur once each day of the week, specify the daily
   * recurrence.
   * @property {string} [applicableSchedule.labVmsStartup.dailyRecurrence.time]
   * The time of day the schedule will occur.
   * @property {object} [applicableSchedule.labVmsStartup.hourlyRecurrence] If
   * the schedule will occur multiple times a day, specify the hourly
   * recurrence.
   * @property {number}
   * [applicableSchedule.labVmsStartup.hourlyRecurrence.minute] Minutes of the
   * hour the schedule will run.
   * @property {string} [applicableSchedule.labVmsStartup.timeZoneId] The time
   * zone ID (e.g. Pacific Standard time).
   * @property {object} [applicableSchedule.labVmsStartup.notificationSettings]
   * Notification settings.
   * @property {string}
   * [applicableSchedule.labVmsStartup.notificationSettings.status] If
   * notifications are enabled for this schedule (i.e. Enabled, Disabled).
   * Possible values include: 'Enabled', 'Disabled'
   * @property {number}
   * [applicableSchedule.labVmsStartup.notificationSettings.timeInMinutes] Time
   * in minutes before event at which notification will be sent.
   * @property {string}
   * [applicableSchedule.labVmsStartup.notificationSettings.webhookUrl] The
   * webhook URL to which the notification will be sent.
   * @property {string}
   * [applicableSchedule.labVmsStartup.notificationSettings.emailRecipient] The
   * email recipient to send notifications to (can be a list of semi-colon
   * separated email addresses).
   * @property {string}
   * [applicableSchedule.labVmsStartup.notificationSettings.notificationLocale]
   * The locale to use when sending a notification (fallback for unsupported
   * languages is EN).
   * @property {date} [applicableSchedule.labVmsStartup.createdDate] The
   * creation date of the schedule.
   * @property {string} [applicableSchedule.labVmsStartup.targetResourceId] The
   * resource ID to which the schedule belongs
   * @property {string} [applicableSchedule.labVmsStartup.provisioningState]
   * The provisioning status of the resource.
   * @property {string} [applicableSchedule.labVmsStartup.uniqueIdentifier] The
   * unique immutable identifier of a resource (Guid).
   * @property {date} [expirationDate] The expiration date for VM.
   * @property {boolean} [allowClaim] Indicates whether another user can take
   * ownership of the virtual machine
   * @property {string} [storageType] Storage type to use for virtual machine
   * (i.e. Standard, Premium).
   * @property {string} [virtualMachineCreationSource] Tells source of creation
   * of lab virtual machine. Output property only. Possible values include:
   * 'FromCustomImage', 'FromGalleryImage'
   * @property {string} [environmentId] The resource ID of the environment that
   * contains this virtual machine, if any.
   * @property {array} [dataDiskParameters] New or existing data disks to
   * attach to the virtual machine after creation
   * @property {array} [scheduleParameters] Virtual Machine schedules to be
   * created
   * @property {string} [lastKnownPowerState] Last known compute power state
   * captured in DTL
   * @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 LabVirtualMachine
   *
   * @returns {object} metadata of LabVirtualMachine
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'LabVirtualMachine',
      type: {
        name: 'Composite',
        className: 'LabVirtualMachine',
        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'
                  }
              }
            }
          },
          notes: {
            required: false,
            serializedName: 'properties.notes',
            type: {
              name: 'String'
            }
          },
          ownerObjectId: {
            required: false,
            serializedName: 'properties.ownerObjectId',
            type: {
              name: 'String'
            }
          },
          ownerUserPrincipalName: {
            required: false,
            serializedName: 'properties.ownerUserPrincipalName',
            type: {
              name: 'String'
            }
          },
          createdByUserId: {
            required: false,
            serializedName: 'properties.createdByUserId',
            type: {
              name: 'String'
            }
          },
          createdByUser: {
            required: false,
            serializedName: 'properties.createdByUser',
            type: {
              name: 'String'
            }
          },
          createdDate: {
            required: false,
            serializedName: 'properties.createdDate',
            type: {
              name: 'DateTime'
            }
          },
          computeId: {
            required: false,
            serializedName: 'properties.computeId',
            type: {
              name: 'String'
            }
          },
          customImageId: {
            required: false,
            serializedName: 'properties.customImageId',
            type: {
              name: 'String'
            }
          },
          osType: {
            required: false,
            serializedName: 'properties.osType',
            type: {
              name: 'String'
            }
          },
          size: {
            required: false,
            serializedName: 'properties.size',
            type: {
              name: 'String'
            }
          },
          userName: {
            required: false,
            serializedName: 'properties.userName',
            type: {
              name: 'String'
            }
          },
          password: {
            required: false,
            serializedName: 'properties.password',
            type: {
              name: 'String'
            }
          },
          sshKey: {
            required: false,
            serializedName: 'properties.sshKey',
            type: {
              name: 'String'
            }
          },
          isAuthenticationWithSshKey: {
            required: false,
            serializedName: 'properties.isAuthenticationWithSshKey',
            type: {
              name: 'Boolean'
            }
          },
          fqdn: {
            required: false,
            serializedName: 'properties.fqdn',
            type: {
              name: 'String'
            }
          },
          labSubnetName: {
            required: false,
            serializedName: 'properties.labSubnetName',
            type: {
              name: 'String'
            }
          },
          labVirtualNetworkId: {
            required: false,
            serializedName: 'properties.labVirtualNetworkId',
            type: {
              name: 'String'
            }
          },
          disallowPublicIpAddress: {
            required: false,
            serializedName: 'properties.disallowPublicIpAddress',
            type: {
              name: 'Boolean'
            }
          },
          artifacts: {
            required: false,
            serializedName: 'properties.artifacts',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'ArtifactInstallPropertiesElementType',
                  type: {
                    name: 'Composite',
                    className: 'ArtifactInstallProperties'
                  }
              }
            }
          },
          artifactDeploymentStatus: {
            required: false,
            serializedName: 'properties.artifactDeploymentStatus',
            type: {
              name: 'Composite',
              className: 'ArtifactDeploymentStatusProperties'
            }
          },
          galleryImageReference: {
            required: false,
            serializedName: 'properties.galleryImageReference',
            type: {
              name: 'Composite',
              className: 'GalleryImageReference'
            }
          },
          planId: {
            required: false,
            serializedName: 'properties.planId',
            type: {
              name: 'String'
            }
          },
          computeVm: {
            required: false,
            readOnly: true,
            serializedName: 'properties.computeVm',
            type: {
              name: 'Composite',
              className: 'ComputeVmProperties'
            }
          },
          networkInterface: {
            required: false,
            serializedName: 'properties.networkInterface',
            type: {
              name: 'Composite',
              className: 'NetworkInterfaceProperties'
            }
          },
          applicableSchedule: {
            required: false,
            readOnly: true,
            serializedName: 'properties.applicableSchedule',
            type: {
              name: 'Composite',
              className: 'ApplicableSchedule'
            }
          },
          expirationDate: {
            required: false,
            serializedName: 'properties.expirationDate',
            type: {
              name: 'DateTime'
            }
          },
          allowClaim: {
            required: false,
            serializedName: 'properties.allowClaim',
            type: {
              name: 'Boolean'
            }
          },
          storageType: {
            required: false,
            serializedName: 'properties.storageType',
            type: {
              name: 'String'
            }
          },
          virtualMachineCreationSource: {
            required: false,
            serializedName: 'properties.virtualMachineCreationSource',
            type: {
              name: 'String'
            }
          },
          environmentId: {
            required: false,
            serializedName: 'properties.environmentId',
            type: {
              name: 'String'
            }
          },
          dataDiskParameters: {
            required: false,
            serializedName: 'properties.dataDiskParameters',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'DataDiskPropertiesElementType',
                  type: {
                    name: 'Composite',
                    className: 'DataDiskProperties'
                  }
              }
            }
          },
          scheduleParameters: {
            required: false,
            serializedName: 'properties.scheduleParameters',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'ScheduleCreationParameterElementType',
                  type: {
                    name: 'Composite',
                    className: 'ScheduleCreationParameter'
                  }
              }
            }
          },
          lastKnownPowerState: {
            required: false,
            serializedName: 'properties.lastKnownPowerState',
            type: {
              name: 'String'
            }
          },
          provisioningState: {
            required: false,
            readOnly: true,
            serializedName: 'properties.provisioningState',
            type: {
              name: 'String'
            }
          },
          uniqueIdentifier: {
            required: false,
            readOnly: true,
            serializedName: 'properties.uniqueIdentifier',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = LabVirtualMachine;
