# generated by datamodel-codegen:
#   filename:  user-mappings.spec.json

from __future__ import annotations

from dataclasses import dataclass
from typing import Dict, List, Optional, Union


@dataclass
class DetailedIdentity:
    username: str
    """
    Human friendly username used for ACLs/Interceptors
    """
    principal: Optional[str] = None
    """
    The Identity ID (i.e. claims.sub value when using OAuth)
    """
    groups: Optional[List[str]] = None
    """
    List of groups to be mapped to the principal. Groups apply to all of GW, not just the vClusters
    """


Identities = List[Union[str, DetailedIdentity]]


@dataclass
class UserMappings:
    """
    vCluster identities user-mappings.
    """

    identities: Identities


@dataclass
class UserMappingsConfig:
    """
    Specification for user-mapping management
    """

    userMappings: Optional[Dict[str, UserMappings]] = None
