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

/**
 * Role definition properties.
 *
 */
class RoleDefinitionProperties {
  /**
   * Create a RoleDefinitionProperties.
   * @member {string} [roleName] The role name.
   * @member {string} [description] The role definition description.
   * @member {string} [type] The role type.
   * @member {array} [permissions] Role definition permissions.
   * @member {array} [assignableScopes] Role definition assignable scopes.
   */
  constructor() {
  }

  /**
   * Defines the metadata of RoleDefinitionProperties
   *
   * @returns {object} metadata of RoleDefinitionProperties
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'RoleDefinitionProperties',
      type: {
        name: 'Composite',
        className: 'RoleDefinitionProperties',
        modelProperties: {
          roleName: {
            required: false,
            serializedName: 'roleName',
            type: {
              name: 'String'
            }
          },
          description: {
            required: false,
            serializedName: 'description',
            type: {
              name: 'String'
            }
          },
          type: {
            required: false,
            serializedName: 'type',
            type: {
              name: 'String'
            }
          },
          permissions: {
            required: false,
            serializedName: 'permissions',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'PermissionElementType',
                  type: {
                    name: 'Composite',
                    className: 'Permission'
                  }
              }
            }
          },
          assignableScopes: {
            required: false,
            serializedName: 'assignableScopes',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          }
        }
      }
    };
  }
}

module.exports = RoleDefinitionProperties;
