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

/**
 * Deny Assignment
 *
 */
class DenyAssignment {
  /**
   * Create a DenyAssignment.
   * @property {string} [id] The deny assignment ID.
   * @property {string} [name] The deny assignment name.
   * @property {string} [type] The deny assignment type.
   * @property {string} [denyAssignmentName] The display name of the deny
   * assignment.
   * @property {string} [description] The description of the deny assignment.
   * @property {array} [permissions] An array of permissions that are denied by
   * the deny assignment.
   * @property {string} [scope] The deny assignment scope.
   * @property {boolean} [doNotApplyToChildScopes] Determines if the deny
   * assignment applies to child scopes. Default value is false.
   * @property {array} [principals] Array of principals to which the deny
   * assignment applies.
   * @property {array} [excludePrincipals] Array of principals to which the
   * deny assignment does not apply.
   * @property {boolean} [isSystemProtected] Specifies whether this deny
   * assignment was created by Azure and cannot be edited or deleted.
   */
  constructor() {
  }

  /**
   * Defines the metadata of DenyAssignment
   *
   * @returns {object} metadata of DenyAssignment
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'DenyAssignment',
      type: {
        name: 'Composite',
        className: 'DenyAssignment',
        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'
            }
          },
          denyAssignmentName: {
            required: false,
            serializedName: 'properties.denyAssignmentName',
            type: {
              name: 'String'
            }
          },
          description: {
            required: false,
            serializedName: 'properties.description',
            type: {
              name: 'String'
            }
          },
          permissions: {
            required: false,
            serializedName: 'properties.permissions',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'DenyAssignmentPermissionElementType',
                  type: {
                    name: 'Composite',
                    className: 'DenyAssignmentPermission'
                  }
              }
            }
          },
          scope: {
            required: false,
            serializedName: 'properties.scope',
            type: {
              name: 'String'
            }
          },
          doNotApplyToChildScopes: {
            required: false,
            serializedName: 'properties.doNotApplyToChildScopes',
            type: {
              name: 'Boolean'
            }
          },
          principals: {
            required: false,
            serializedName: 'properties.principals',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'PrincipalElementType',
                  type: {
                    name: 'Composite',
                    className: 'Principal'
                  }
              }
            }
          },
          excludePrincipals: {
            required: false,
            serializedName: 'properties.excludePrincipals',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'PrincipalElementType',
                  type: {
                    name: 'Composite',
                    className: 'Principal'
                  }
              }
            }
          },
          isSystemProtected: {
            required: false,
            serializedName: 'properties.isSystemProtected',
            type: {
              name: 'Boolean'
            }
          }
        }
      }
    };
  }
}

module.exports = DenyAssignment;
