# generated by datamodel-codegen:
#   filename:  schema/entity/policies/accessControl/rule.json
#   timestamp: 2022-01-16T19:33:03+00:00

from __future__ import annotations

from typing import List, Optional

from pydantic import BaseModel, Extra, Field

from .. import filters
from . import tagBased


class AccessControlRule(BaseModel):
    class Config:
        extra = Extra.forbid

    name: Optional[str] = Field(None, description='Name that identifies this Rule.')
    filters: filters.Filters1
    actions: List[tagBased.TagBased] = Field(
        ...,
        description='A set of access control enforcements to take on the entities.',
        min_items=1,
    )
    enabled: Optional[bool] = Field(True, description='Is the rule enabled.')
