/*
 * 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 lab.
 *
 * @extends models['UpdateResource']
 */
class LabFragment extends models['UpdateResource'] {
  /**
   * Create a LabFragment.
   * @property {string} [labStorageType] Type of storage used by the lab. It
   * can be either Premium or Standard. Default is Premium. Possible values
   * include: 'Standard', 'Premium'
   * @property {array} [mandatoryArtifactsResourceIdsLinux] The ordered list of
   * artifact resource IDs that should be applied on all Linux VM creations by
   * default, prior to the artifacts specified by the user.
   * @property {array} [mandatoryArtifactsResourceIdsWindows] The ordered list
   * of artifact resource IDs that should be applied on all Windows VM
   * creations by default, prior to the artifacts specified by the user.
   * @property {string} [premiumDataDisks] The setting to enable usage of
   * premium data disks.
   * When its value is 'Enabled', creation of standard or premium data disks is
   * allowed.
   * When its value is 'Disabled', only creation of standard data disks is
   * allowed. Possible values include: 'Disabled', 'Enabled'
   * @property {string} [environmentPermission] The access rights to be granted
   * to the user when provisioning an environment. Possible values include:
   * 'Reader', 'Contributor'
   * @property {object} [announcement] The properties of any lab announcement
   * associated with this lab
   * @property {string} [announcement.title] The plain text title for the lab
   * announcement
   * @property {string} [announcement.markdown] The markdown text (if any) that
   * this lab displays in the UI. If left empty/null, nothing will be shown.
   * @property {string} [announcement.enabled] Is the lab announcement
   * active/enabled at this time?. Possible values include: 'Enabled',
   * 'Disabled'
   * @property {date} [announcement.expirationDate] The time at which the
   * announcement expires (null for never)
   * @property {boolean} [announcement.expired] Has this announcement expired?
   * @property {object} [support] The properties of any lab support message
   * associated with this lab
   * @property {string} [support.enabled] Is the lab support banner
   * active/enabled at this time?. Possible values include: 'Enabled',
   * 'Disabled'
   * @property {string} [support.markdown] The markdown text (if any) that this
   * lab displays in the UI. If left empty/null, nothing will be shown.
   * @property {object} [extendedProperties] Extended properties of the lab
   * used for experimental features
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of LabFragment
   *
   * @returns {object} metadata of LabFragment
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'LabFragment',
      type: {
        name: 'Composite',
        className: 'LabFragment',
        modelProperties: {
          tags: {
            required: false,
            serializedName: 'tags',
            type: {
              name: 'Dictionary',
              value: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          labStorageType: {
            required: false,
            serializedName: 'properties.labStorageType',
            type: {
              name: 'String'
            }
          },
          mandatoryArtifactsResourceIdsLinux: {
            required: false,
            serializedName: 'properties.mandatoryArtifactsResourceIdsLinux',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          mandatoryArtifactsResourceIdsWindows: {
            required: false,
            serializedName: 'properties.mandatoryArtifactsResourceIdsWindows',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          premiumDataDisks: {
            required: false,
            serializedName: 'properties.premiumDataDisks',
            type: {
              name: 'String'
            }
          },
          environmentPermission: {
            required: false,
            serializedName: 'properties.environmentPermission',
            type: {
              name: 'String'
            }
          },
          announcement: {
            required: false,
            serializedName: 'properties.announcement',
            type: {
              name: 'Composite',
              className: 'LabAnnouncementPropertiesFragment'
            }
          },
          support: {
            required: false,
            serializedName: 'properties.support',
            type: {
              name: 'Composite',
              className: 'LabSupportPropertiesFragment'
            }
          },
          extendedProperties: {
            required: false,
            serializedName: 'properties.extendedProperties',
            type: {
              name: 'Dictionary',
              value: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          }
        }
      }
    };
  }
}

module.exports = LabFragment;
