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

from ...core.unchecked_base_model import UncheckedBaseModel
from .snyk_credential import SnykCredential
import pydantic
from .snyk_region import SnykRegion
from ...core.pydantic_utilities import IS_PYDANTIC_V2
import typing


class AppSecSnyk(UncheckedBaseModel):
    """
    Configuration for Snyk as an application security provider.

    [Configuration guide](https://docs.synqly.com/guides/provider-configuration/snyk-appsec-setup)
    """

    credential: SnykCredential = pydantic.Field()
    """
    Credentials used for accessing the Snyk API.
    """

    organization_id: str = pydantic.Field()
    """
    The ID of the Snyk organization to use. This value can be found in the Snyk Organizations Settings page.
    """

    region: SnykRegion = pydantic.Field()
    """
    The data region that the Snyk organization is hosted in. This value can be found in the Snyk URL and on the Snyk login page. For more information, see the [Snyk documentation](https://docs.snyk.io/snyk-data-and-governance/regional-hosting-and-data-residency#regional-urls).
    """

    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
