"""
@generated by mypy-protobuf.  Do not edit manually!
isort:skip_file
"""

import builtins
import collections.abc
import google.protobuf.descriptor
import google.protobuf.duration_pb2
import google.protobuf.internal.containers
import google.protobuf.message
import google.protobuf.timestamp_pb2
import typing

DESCRIPTOR: google.protobuf.descriptor.FileDescriptor

@typing.final
class ScanPolicy(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    ID_FIELD_NUMBER: builtins.int
    REGISTRY_ID_FIELD_NUMBER: builtins.int
    NAME_FIELD_NUMBER: builtins.int
    DESCRIPTION_FIELD_NUMBER: builtins.int
    RULES_FIELD_NUMBER: builtins.int
    CREATED_AT_FIELD_NUMBER: builtins.int
    DISABLED_FIELD_NUMBER: builtins.int
    id: builtins.str
    """Output only. ID of the scan policy."""
    registry_id: builtins.str
    """ID of the registry that the scan policy belongs to.
    Required. The maximum string length in characters is 50.
    """
    name: builtins.str
    """Name of the scan policy."""
    description: builtins.str
    """Description of the scan policy.
    The maximum string length in characters is 256.
    """
    disabled: builtins.bool
    """Turns off scan policy."""
    @property
    def rules(self) -> global___ScanRules:
        """The rules of scan policy."""

    @property
    def created_at(self) -> google.protobuf.timestamp_pb2.Timestamp:
        """Output only. Creation timestamp."""

    def __init__(
        self,
        *,
        id: builtins.str = ...,
        registry_id: builtins.str = ...,
        name: builtins.str = ...,
        description: builtins.str = ...,
        rules: global___ScanRules | None = ...,
        created_at: google.protobuf.timestamp_pb2.Timestamp | None = ...,
        disabled: builtins.bool = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["created_at", b"created_at", "rules", b"rules"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["created_at", b"created_at", "description", b"description", "disabled", b"disabled", "id", b"id", "name", b"name", "registry_id", b"registry_id", "rules", b"rules"]) -> None: ...

global___ScanPolicy = ScanPolicy

@typing.final
class ScanRules(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    PUSH_RULE_FIELD_NUMBER: builtins.int
    SCHEDULE_RULES_FIELD_NUMBER: builtins.int
    @property
    def push_rule(self) -> global___PushRule:
        """Description of on-push scan rule."""

    @property
    def schedule_rules(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___ScheduledRule]:
        """Description of time based rescan rule."""

    def __init__(
        self,
        *,
        push_rule: global___PushRule | None = ...,
        schedule_rules: collections.abc.Iterable[global___ScheduledRule] | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["push_rule", b"push_rule"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["push_rule", b"push_rule", "schedule_rules", b"schedule_rules"]) -> None: ...

global___ScanRules = ScanRules

@typing.final
class PushRule(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    REPOSITORY_PREFIXES_FIELD_NUMBER: builtins.int
    DISABLED_FIELD_NUMBER: builtins.int
    disabled: builtins.bool
    """Turns off scan rule."""
    @property
    def repository_prefixes(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]:
        """List of repositories that are scanned with rule. Child repositories are included into parent node. "*" - means all repositories in registry"""

    def __init__(
        self,
        *,
        repository_prefixes: collections.abc.Iterable[builtins.str] | None = ...,
        disabled: builtins.bool = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing.Literal["disabled", b"disabled", "repository_prefixes", b"repository_prefixes"]) -> None: ...

global___PushRule = PushRule

@typing.final
class ScheduledRule(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    REPOSITORY_PREFIXES_FIELD_NUMBER: builtins.int
    RESCAN_PERIOD_FIELD_NUMBER: builtins.int
    DISABLED_FIELD_NUMBER: builtins.int
    disabled: builtins.bool
    """Turns off scan rule."""
    @property
    def repository_prefixes(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]:
        """List of repositories that are scanned with rule. Child repositories are included into parent node. "*" - means all repositories in registry"""

    @property
    def rescan_period(self) -> google.protobuf.duration_pb2.Duration:
        """Period of time since last scan to trigger automatic rescan."""

    def __init__(
        self,
        *,
        repository_prefixes: collections.abc.Iterable[builtins.str] | None = ...,
        rescan_period: google.protobuf.duration_pb2.Duration | None = ...,
        disabled: builtins.bool = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["rescan_period", b"rescan_period"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["disabled", b"disabled", "repository_prefixes", b"repository_prefixes", "rescan_period", b"rescan_period"]) -> None: ...

global___ScheduledRule = ScheduledRule
