# generated by datamodel-codegen:
#   filename:  schema/api/teams/createRole.json
#   timestamp: 2022-04-20T15:52:56+00:00

from __future__ import annotations

from typing import Optional

from pydantic import BaseModel, Extra, Field

from ...entity.teams import role
from ...type import entityReference


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

    name: role.RoleName
    displayName: Optional[str] = Field(
        None,
        description="Optional name used for display purposes. Example 'Data Consumer'",
    )
    description: Optional[str] = Field(
        None, description='Optional description of the role'
    )
    policies: entityReference.EntityReferenceList = Field(
        ...,
        description='Policies that is attached to this role. At least one policy is required.',
    )
