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

var models = require('./index');

var util = require('util');

/**
 * @class
 * Initializes a new instance of the Formula class.
 * @constructor
 * A formula.
 * @member {string} [description] The description of the formula.
 * 
 * @member {string} [author] The author of the formula.
 * 
 * @member {string} [osType] The OS type of the formula.
 * 
 * @member {date} [creationDate] The creation date of the formula.
 * 
 * @member {object} [formulaContent] The content of the formula.
 * 
 * @member {string} [formulaContent.notes] The notes of the virtual machine.
 * 
 * @member {string} [formulaContent.ownerObjectId] The object identifier of
 * the owner of the virtual machine.
 * 
 * @member {string} [formulaContent.createdByUserId] The object identifier of
 * the creator of the virtual machine.
 * 
 * @member {string} [formulaContent.createdByUser] The email address of
 * creator of the virtual machine.
 * 
 * @member {string} [formulaContent.computeId] The resource identifier
 * (Microsoft.Compute) of the virtual machine.
 * 
 * @member {string} [formulaContent.customImageId] The custom image identifier
 * of the virtual machine.
 * 
 * @member {string} [formulaContent.osType] The OS type of the virtual machine.
 * 
 * @member {string} [formulaContent.size] The size of the virtual machine.
 * 
 * @member {string} [formulaContent.userName] The user name of the virtual
 * machine.
 * 
 * @member {string} [formulaContent.password] The password of the virtual
 * machine administrator.
 * 
 * @member {string} [formulaContent.sshKey] The SSH key of the virtual machine
 * administrator.
 * 
 * @member {boolean} [formulaContent.isAuthenticationWithSshKey] A value
 * indicating whether this virtual machine uses an SSH key for authentication.
 * 
 * @member {string} [formulaContent.fqdn] The fully-qualified domain name of
 * the virtual machine.
 * 
 * @member {string} [formulaContent.labSubnetName] The lab subnet name of the
 * virtual machine.
 * 
 * @member {string} [formulaContent.labVirtualNetworkId] The lab virtual
 * network identifier of the virtual machine.
 * 
 * @member {boolean} [formulaContent.disallowPublicIpAddress] Indicates
 * whether the virtual machine is to be created without a public IP address.
 * 
 * @member {array} [formulaContent.artifacts] The artifacts to be installed on
 * the virtual machine.
 * 
 * @member {object} [formulaContent.artifactDeploymentStatus] The artifact
 * deployment status for the virtual machine.
 * 
 * @member {string} [formulaContent.artifactDeploymentStatus.deploymentStatus]
 * The deployment status of the artifact.
 * 
 * @member {number} [formulaContent.artifactDeploymentStatus.artifactsApplied]
 * The total count of the artifacts that were successfully applied.
 * 
 * @member {number} [formulaContent.artifactDeploymentStatus.totalArtifacts]
 * The total count of the artifacts that were tentatively applied.
 * 
 * @member {object} [formulaContent.galleryImageReference] The Microsoft Azure
 * Marketplace image reference of the virtual machine.
 * 
 * @member {string} [formulaContent.galleryImageReference.offer] The offer of
 * the gallery image.
 * 
 * @member {string} [formulaContent.galleryImageReference.publisher] The
 * publisher of the gallery image.
 * 
 * @member {string} [formulaContent.galleryImageReference.sku] The SKU of the
 * gallery image.
 * 
 * @member {string} [formulaContent.galleryImageReference.osType] The OS type
 * of the gallery image.
 * 
 * @member {string} [formulaContent.galleryImageReference.version] The version
 * of the gallery image.
 * 
 * @member {string} [formulaContent.provisioningState] The provisioning status
 * of the resource.
 * 
 * @member {string} [formulaContent.id] The identifier of the resource.
 * 
 * @member {string} [formulaContent.name] The name of the resource.
 * 
 * @member {string} [formulaContent.type] The type of the resource.
 * 
 * @member {string} [formulaContent.location] The location of the resource.
 * 
 * @member {object} [formulaContent.tags] The tags of the resource.
 * 
 * @member {object} [vm] Information about a VM from which a formula is to be
 * created.
 * 
 * @member {string} [vm.labVmId] The identifier of the VM from which a formula
 * is to be created.
 * 
 * @member {string} [provisioningState] The provisioning status of the
 * resource.
 * 
 * @member {string} [id] The identifier of the resource.
 * 
 * @member {string} [name] The name of the resource.
 * 
 * @member {string} [type] The type of the resource.
 * 
 * @member {string} [location] The location of the resource.
 * 
 * @member {object} [tags] The tags of the resource.
 * 
 */
function Formula() {
  Formula['super_'].call(this);
}

util.inherits(Formula, models['BaseResource']);

/**
 * Defines the metadata of Formula
 *
 * @returns {object} metadata of Formula
 *
 */
Formula.prototype.mapper = function () {
  return {
    required: false,
    serializedName: 'Formula',
    type: {
      name: 'Composite',
      className: 'Formula',
      modelProperties: {
        description: {
          required: false,
          serializedName: 'properties.description',
          type: {
            name: 'String'
          }
        },
        author: {
          required: false,
          serializedName: 'properties.author',
          type: {
            name: 'String'
          }
        },
        osType: {
          required: false,
          serializedName: 'properties.osType',
          type: {
            name: 'String'
          }
        },
        creationDate: {
          required: false,
          serializedName: 'properties.creationDate',
          type: {
            name: 'DateTime'
          }
        },
        formulaContent: {
          required: false,
          serializedName: 'properties.formulaContent',
          type: {
            name: 'Composite',
            className: 'LabVirtualMachine'
          }
        },
        vm: {
          required: false,
          serializedName: 'properties.vm',
          type: {
            name: 'Composite',
            className: 'FormulaPropertiesFromVm'
          }
        },
        provisioningState: {
          required: false,
          serializedName: 'properties.provisioningState',
          type: {
            name: 'String'
          }
        },
        id: {
          required: false,
          serializedName: 'id',
          type: {
            name: 'String'
          }
        },
        name: {
          required: false,
          serializedName: 'name',
          type: {
            name: 'String'
          }
        },
        type: {
          required: false,
          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'
                }
            }
          }
        }
      }
    }
  };
};

module.exports = Formula;
