# This file was auto-generated by Fern from our API Definition.

import typing

import pydantic
import typing_extensions
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
from .collaborator import Collaborator
from .owned_by import OwnedBy


class SecretGroupManifest(UniversalBaseModel):
    type: typing.Literal["secret-group"] = pydantic.Field(default="secret-group")
    """
    +value=secret-group
    """

    name: str = pydantic.Field()
    """
    Name of the secret group
    """

    integration_fqn: str = pydantic.Field()
    """
    Secret Store to be associated with the secret group
    """

    collaborators: typing.List[Collaborator] = pydantic.Field()
    """
    Users and Teams that have access to Secret Group
    """

    owned_by: typing_extensions.Annotated[typing.Optional[OwnedBy], FieldMetadata(alias="ownedBy")] = pydantic.Field(
        alias="ownedBy", default=None
    )

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow")  # type: ignore # Pydantic v2
    else:

        class Config:
            smart_union = True
            extra = pydantic.Extra.allow
