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

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

if sys.version_info >= (3, 10):
    import typing as typing_extensions
else:
    import typing_extensions

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
    SCAN_POLICY_OPTIONS_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 scan_policy_options(self) -> global___ScanPolicyOptions:
        """Scan policy options."""

    @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 = ...,
        scan_policy_options: global___ScanPolicyOptions | None = ...,
        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", "scan_policy_options", b"scan_policy_options"]) -> 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", "scan_policy_options", b"scan_policy_options"]) -> None: ...

global___ScanPolicy = ScanPolicy

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

    SCAN_LANG_PACKAGES_FIELD_NUMBER: builtins.int
    scan_lang_packages: builtins.bool
    """Flag indicating whether language packages should be scanned."""
    def __init__(
        self,
        *,
        scan_lang_packages: builtins.bool = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing.Literal["scan_lang_packages", b"scan_lang_packages"]) -> None: ...

global___ScanPolicyOptions = ScanPolicyOptions

@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

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

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

global___PushRule = PushRule

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

    class _IntervalUnit:
        ValueType = typing.NewType("ValueType", builtins.int)
        V: typing_extensions.TypeAlias = ValueType

    class _IntervalUnitEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[ScheduledRule._IntervalUnit.ValueType], builtins.type):
        DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
        INTERVAL_UNIT_UNSPECIFIED: ScheduledRule._IntervalUnit.ValueType  # 0
        DAYS: ScheduledRule._IntervalUnit.ValueType  # 1
        """Time unit is days."""

    class IntervalUnit(_IntervalUnit, metaclass=_IntervalUnitEnumTypeWrapper): ...
    INTERVAL_UNIT_UNSPECIFIED: ScheduledRule.IntervalUnit.ValueType  # 0
    DAYS: ScheduledRule.IntervalUnit.ValueType  # 1
    """Time unit is days."""

    AMOUNT_FIELD_NUMBER: builtins.int
    INTERVAL_UNIT_FIELD_NUMBER: builtins.int
    PATHS_FIELD_NUMBER: builtins.int
    DISABLED_FIELD_NUMBER: builtins.int
    amount: builtins.int
    """Amount of time units for the scan interval."""
    interval_unit: global___ScheduledRule.IntervalUnit.ValueType
    """Unit for the scan interval."""
    disabled: builtins.bool
    """Turns off scan rule."""
    @property
    def paths(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]:
        """List of paths that are scanned with rule. Child paths are included into parent node. "*" - means all artifacts in registry"""

    def __init__(
        self,
        *,
        amount: builtins.int = ...,
        interval_unit: global___ScheduledRule.IntervalUnit.ValueType = ...,
        paths: collections.abc.Iterable[builtins.str] | None = ...,
        disabled: builtins.bool = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing.Literal["amount", b"amount", "disabled", b"disabled", "interval_unit", b"interval_unit", "paths", b"paths"]) -> None: ...

global___ScheduledRule = ScheduledRule
