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

/**
 * Azure role assignment details.
 *
 */
class RoleAssignment {
  /**
   * Create a RoleAssignment.
   * @member {string} [id] The ARM Id of the role assignment.
   * @member {string} [name] The name of the role assignment.
   * @member {string} [scope] Role assignment scope.
   * @member {string} [principalId] Principal Id.
   * @member {string} [roleDefinitionId] Role definition id.
   */
  constructor() {
  }

  /**
   * Defines the metadata of RoleAssignment
   *
   * @returns {object} metadata of RoleAssignment
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'RoleAssignment',
      type: {
        name: 'Composite',
        className: 'RoleAssignment',
        modelProperties: {
          id: {
            required: false,
            serializedName: 'id',
            type: {
              name: 'String'
            }
          },
          name: {
            required: false,
            serializedName: 'name',
            type: {
              name: 'String'
            }
          },
          scope: {
            required: false,
            serializedName: 'scope',
            type: {
              name: 'String'
            }
          },
          principalId: {
            required: false,
            serializedName: 'principalId',
            type: {
              name: 'String'
            }
          },
          roleDefinitionId: {
            required: false,
            serializedName: 'roleDefinitionId',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = RoleAssignment;
