# encoding: utf-8
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.

module Azure::Authorization::Mgmt::V2018_07_01_preview
  module Models
    #
    # Deny Assignment
    #
    class DenyAssignment

      include MsRestAzure

      # @return [String] The deny assignment ID.
      attr_accessor :id

      # @return [String] The deny assignment name.
      attr_accessor :name

      # @return [String] The deny assignment type.
      attr_accessor :type

      # @return [String] The display name of the deny assignment.
      attr_accessor :deny_assignment_name

      # @return [String] The description of the deny assignment.
      attr_accessor :description

      # @return [Array<DenyAssignmentPermission>] An array of permissions that
      # are denied by the deny assignment.
      attr_accessor :permissions

      # @return [String] The deny assignment scope.
      attr_accessor :scope

      # @return [Boolean] Determines if the deny assignment applies to child
      # scopes. Default value is false.
      attr_accessor :do_not_apply_to_child_scopes

      # @return [Array<Principal>] Array of principals to which the deny
      # assignment applies.
      attr_accessor :principals

      # @return [Array<Principal>] Array of principals to which the deny
      # assignment does not apply.
      attr_accessor :exclude_principals

      # @return [Boolean] Specifies whether this deny assignment was created by
      # Azure and cannot be edited or deleted.
      attr_accessor :is_system_protected


      #
      # Mapper for DenyAssignment class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'DenyAssignment',
          type: {
            name: 'Composite',
            class_name: 'DenyAssignment',
            model_properties: {
              id: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'id',
                type: {
                  name: 'String'
                }
              },
              name: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'name',
                type: {
                  name: 'String'
                }
              },
              type: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'type',
                type: {
                  name: 'String'
                }
              },
              deny_assignment_name: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.denyAssignmentName',
                type: {
                  name: 'String'
                }
              },
              description: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.description',
                type: {
                  name: 'String'
                }
              },
              permissions: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.permissions',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'DenyAssignmentPermissionElementType',
                      type: {
                        name: 'Composite',
                        class_name: 'DenyAssignmentPermission'
                      }
                  }
                }
              },
              scope: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.scope',
                type: {
                  name: 'String'
                }
              },
              do_not_apply_to_child_scopes: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.doNotApplyToChildScopes',
                type: {
                  name: 'Boolean'
                }
              },
              principals: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.principals',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'PrincipalElementType',
                      type: {
                        name: 'Composite',
                        class_name: 'Principal'
                      }
                  }
                }
              },
              exclude_principals: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.excludePrincipals',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'PrincipalElementType',
                      type: {
                        name: 'Composite',
                        class_name: 'Principal'
                      }
                  }
                }
              },
              is_system_protected: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.isSystemProtected',
                type: {
                  name: 'Boolean'
                }
              }
            }
          }
        }
      end
    end
  end
end
