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

/**
 * Identity attributes of a lab user.
 *
 */
class UserIdentity {
  /**
   * Create a UserIdentity.
   * @property {string} [principalName] Set to the principal name / UPN of the
   * client JWT making the request.
   * @property {string} [principalId] Set to the principal Id of the client JWT
   * making the request. Service principal will not have the principal Id.
   * @property {string} [tenantId] Set to the tenant ID of the client JWT
   * making the request.
   * @property {string} [objectId] Set to the object Id of the client JWT
   * making the request. Not all users have object Id. For CSP (reseller)
   * scenarios for example, object Id is not available.
   * @property {string} [appId] Set to the app Id of the client JWT making the
   * request.
   */
  constructor() {
  }

  /**
   * Defines the metadata of UserIdentity
   *
   * @returns {object} metadata of UserIdentity
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'UserIdentity',
      type: {
        name: 'Composite',
        className: 'UserIdentity',
        modelProperties: {
          principalName: {
            required: false,
            serializedName: 'principalName',
            type: {
              name: 'String'
            }
          },
          principalId: {
            required: false,
            serializedName: 'principalId',
            type: {
              name: 'String'
            }
          },
          tenantId: {
            required: false,
            serializedName: 'tenantId',
            type: {
              name: 'String'
            }
          },
          objectId: {
            required: false,
            serializedName: 'objectId',
            type: {
              name: 'String'
            }
          },
          appId: {
            required: false,
            serializedName: 'appId',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = UserIdentity;
