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

/**
 * Represents settings of an environment, from which environment instances
 * would be created
 *
 * @extends models['Resource']
 */
class EnvironmentSettingFragment extends models['Resource'] {
  /**
   * Create a EnvironmentSettingFragment.
   * @property {string} [configurationState] Describes the user's progress in
   * configuring their environment setting. Possible values include:
   * 'NotApplicable', 'Completed'
   * @property {string} [description] Describes the environment and its
   * resource settings
   * @property {string} [title] Brief title describing the environment and its
   * resource settings
   * @property {object} [resourceSettings] The resource specific settings
   * @property {string} [resourceSettings.galleryImageResourceId] The resource
   * id of the gallery image used for creating the virtual machine
   * @property {string} [resourceSettings.size] The size of the virtual
   * machine. Possible values include: 'Basic', 'Standard', 'Performance'
   * @property {object} [resourceSettings.referenceVm] Details specific to
   * Reference Vm
   * @property {string} [resourceSettings.referenceVm.userName] The username of
   * the virtual machine
   * @property {string} [resourceSettings.referenceVm.password] The password of
   * the virtual machine. This will be set to null in GET resource API
   * @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 EnvironmentSettingFragment
   *
   * @returns {object} metadata of EnvironmentSettingFragment
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'EnvironmentSettingFragment',
      type: {
        name: 'Composite',
        className: 'EnvironmentSettingFragment',
        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'
                  }
              }
            }
          },
          configurationState: {
            required: false,
            serializedName: 'properties.configurationState',
            type: {
              name: 'String'
            }
          },
          description: {
            required: false,
            serializedName: 'properties.description',
            type: {
              name: 'String'
            }
          },
          title: {
            required: false,
            serializedName: 'properties.title',
            type: {
              name: 'String'
            }
          },
          resourceSettings: {
            required: false,
            serializedName: 'properties.resourceSettings',
            type: {
              name: 'Composite',
              className: 'ResourceSettingsFragment'
            }
          },
          provisioningState: {
            required: false,
            serializedName: 'properties.provisioningState',
            type: {
              name: 'String'
            }
          },
          uniqueIdentifier: {
            required: false,
            serializedName: 'properties.uniqueIdentifier',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = EnvironmentSettingFragment;
