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

from ...core.unchecked_base_model import UncheckedBaseModel
from .open_text_application_security_credential import (
    OpenTextApplicationSecurityCredential,
)
import pydantic
from ...core.pydantic_utilities import IS_PYDANTIC_V2
import typing


class AppsecOpenTextApplicationSecurity(UncheckedBaseModel):
    """
    Configuration for OpenText Application Security (formerly Fortify Software Security Center) as an application security provider.

    **This provider is for on-premise installations of OpenText Application Security. For the SaaS product, please use the OpenText Core Application Security provider.**

    As this provider is for an on-premise only product, either a Synqly Bridge Agent must be used or the OpenText Application Security installation must be accessible from a public URL.

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

    credential: OpenTextApplicationSecurityCredential = pydantic.Field()
    """
    Credentials used for accessing the OpenText Application Security API.
    """

    url: str = pydantic.Field()
    """
    Base URL for the OpenText Application Security API. This URL should
    be the same as the URL used to access the OpenText Application
    Security web interface.
    
    **If a Synqly Bridge Agent is not used, this URL must be a publically accessible**
    
    For more information on using a Synqly Bridge Agent, see the [Synqly Bridge Agent documentation](https://docs.synqly.com/bridge/agent-setup).
    """

    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
