/*
 * 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 a lab.
 *
 * @extends models['Resource']
 */
class Lab extends models['Resource'] {
  /**
   * Create a Lab.
   * @property {number} [maxUsersInLab] Maximum number of users allowed in the
   * lab.
   * @property {number} [userQuota] Maximum value MaxUsersInLab can be set to,
   * as specified by the service
   * @property {string} [invitationCode] Invitation code that users can use to
   * join a lab.
   * @property {string} [createdByObjectId] Object id of the user that created
   * the lab.
   * @property {moment.duration} [usageQuota] Maximum duration a user can use
   * an environment for in the lab.
   * @property {string} [userAccessMode] Lab user access mode (open to all vs.
   * restricted to those listed on the lab). Possible values include:
   * 'Restricted', 'Open'
   * @property {string} [createdByUserPrincipalName] Lab creator name
   * @property {date} [createdDate] Creation date for the lab
   * @property {string} [provisioningState] The provisioning status of the
   * resource.
   * @property {string} [uniqueIdentifier] The unique immutable identifier of a
   * resource (Guid).
   * @property {object} [latestOperationResult] The details of the latest
   * operation. ex: status, error
   * @property {string} [latestOperationResult.status] The current status of
   * the operation.
   * @property {string} [latestOperationResult.errorCode] Error code on
   * failure.
   * @property {string} [latestOperationResult.errorMessage] The error message.
   * @property {string} [latestOperationResult.requestUri] Request URI of the
   * operation.
   * @property {string} [latestOperationResult.httpMethod] The HttpMethod -
   * PUT/POST/DELETE for the operation.
   * @property {string} [latestOperationResult.operationUrl] The URL to use to
   * check long-running operation status
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of Lab
   *
   * @returns {object} metadata of Lab
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'Lab',
      type: {
        name: 'Composite',
        className: 'Lab',
        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'
                  }
              }
            }
          },
          maxUsersInLab: {
            required: false,
            serializedName: 'properties.maxUsersInLab',
            type: {
              name: 'Number'
            }
          },
          userQuota: {
            required: false,
            readOnly: true,
            serializedName: 'properties.userQuota',
            type: {
              name: 'Number'
            }
          },
          invitationCode: {
            required: false,
            readOnly: true,
            serializedName: 'properties.invitationCode',
            type: {
              name: 'String'
            }
          },
          createdByObjectId: {
            required: false,
            readOnly: true,
            serializedName: 'properties.createdByObjectId',
            type: {
              name: 'String'
            }
          },
          usageQuota: {
            required: false,
            serializedName: 'properties.usageQuota',
            type: {
              name: 'TimeSpan'
            }
          },
          userAccessMode: {
            required: false,
            serializedName: 'properties.userAccessMode',
            type: {
              name: 'String'
            }
          },
          createdByUserPrincipalName: {
            required: false,
            readOnly: true,
            serializedName: 'properties.createdByUserPrincipalName',
            type: {
              name: 'String'
            }
          },
          createdDate: {
            required: false,
            readOnly: true,
            serializedName: 'properties.createdDate',
            type: {
              name: 'DateTime'
            }
          },
          provisioningState: {
            required: false,
            serializedName: 'properties.provisioningState',
            type: {
              name: 'String'
            }
          },
          uniqueIdentifier: {
            required: false,
            serializedName: 'properties.uniqueIdentifier',
            type: {
              name: 'String'
            }
          },
          latestOperationResult: {
            required: false,
            readOnly: true,
            serializedName: 'properties.latestOperationResult',
            type: {
              name: 'Composite',
              className: 'LatestOperationResult'
            }
          }
        }
      }
    };
  }
}

module.exports = Lab;
