# generated by datamodel-codegen:
#   filename:  api/teams/createRole.json
#   timestamp: 2022-10-03T15:16:21+00:00

from __future__ import annotations

from typing import Optional

from pydantic import BaseModel, Extra, Field

from ...entity.teams import role
from ...type import basic, 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[basic.Markdown] = 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.',
    )
