# Generated by the protocol buffer compiler.  DO NOT EDIT!
# sources: sigstore_monitor.proto
# plugin: python-betterproto
# This file has been @generated

from typing import TYPE_CHECKING

if TYPE_CHECKING:
    from dataclasses import dataclass
else:
    from pydantic.dataclasses import dataclass

from typing import List

import betterproto
from pydantic.dataclasses import rebuild_dataclass


@dataclass(eq=False, repr=False)
class TransparencyLogMonitorConfig(betterproto.Message):
    """
    TransparencyLogMonitorConfig describes the configuration for monitoring a single transparency log.
    """

    read_url: str = betterproto.string_field(1)
    """
    The base URL used for reading entries from the log. MUST use major_api_version
     to determine how to construct the full read path for log entries.
    """

    log_origin: str = betterproto.string_field(2)
    """
    The log origin, used to identify the log, verify checkpoints when the read URL
     differs from the origin, and to join with the trusted root for verification.
     Origin defined in https://github.com/C2SP/C2SP/blob/main/tlog-checkpoint.md#note-text.
    """

    major_api_version: int = betterproto.uint32_field(3)
    """
    The major API version. A value of 0 represents a service that
     has not yet been released.
    """


@dataclass(eq=False, repr=False)
class MonitorConfig(betterproto.Message):
    """
    MonitorConfig contains the configurations for monitoring transparency logs.
    """

    rekor_logs: List["TransparencyLogMonitorConfig"] = betterproto.message_field(1)
    """Grouping for Rekor signature transparency logs."""

    ct_logs: List["TransparencyLogMonitorConfig"] = betterproto.message_field(2)
    """Grouping for Certificate Transparency (CT) logs."""


rebuild_dataclass(MonitorConfig)  # type: ignore
