"""
@generated by mypy-protobuf.  Do not edit manually!
isort:skip_file
SPDX-License-Identifier: Apache-2.0"""

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

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

if sys.version_info >= (3, 13):
    from warnings import deprecated
else:
    from typing_extensions import deprecated

DESCRIPTOR: google.protobuf.descriptor.FileDescriptor

@deprecated("""This message has been marked as deprecated using proto message options.""")
@typing.final
class SimpleExtensionURI(google.protobuf.message.Message):
    """This message is deprecated, use SimpleExtensionURN moving forwards"""

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    EXTENSION_URI_ANCHOR_FIELD_NUMBER: builtins.int
    URI_FIELD_NUMBER: builtins.int
    extension_uri_anchor: builtins.int
    """A surrogate key used in the context of a single plan used to reference the
    URI associated with an extension.
    0 is a valid anchor/reference, but prefer non-zero values for ergonomics.
    """
    uri: builtins.str
    """The URI where this extension YAML can be retrieved. This is the "namespace"
    of this extension.
    """
    def __init__(
        self,
        *,
        extension_uri_anchor: builtins.int = ...,
        uri: builtins.str = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing.Literal["extension_uri_anchor", b"extension_uri_anchor", "uri", b"uri"]) -> None: ...

Global___SimpleExtensionURI: typing_extensions.TypeAlias = SimpleExtensionURI

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

    EXTENSION_URN_ANCHOR_FIELD_NUMBER: builtins.int
    URN_FIELD_NUMBER: builtins.int
    extension_urn_anchor: builtins.int
    """A surrogate key used in the context of a single plan used to reference the
    URN associated with an extension.
    0 is a valid anchor/reference, but prefer non-zero values for ergonomics.
    """
    urn: builtins.str
    """The extension URN that uniquely identifies this extension. This must follow the
    format extension:<OWNER>:<ID> and serves as the "namespace" of this extension.
    """
    def __init__(
        self,
        *,
        extension_urn_anchor: builtins.int = ...,
        urn: builtins.str = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing.Literal["extension_urn_anchor", b"extension_urn_anchor", "urn", b"urn"]) -> None: ...

Global___SimpleExtensionURN: typing_extensions.TypeAlias = SimpleExtensionURN

@typing.final
class SimpleExtensionDeclaration(google.protobuf.message.Message):
    """Describes a mapping between a specific extension entity and the uri/urn where
    that extension can be found.
    """

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    @typing.final
    class ExtensionType(google.protobuf.message.Message):
        """Describes a Type"""

        DESCRIPTOR: google.protobuf.descriptor.Descriptor

        EXTENSION_URI_REFERENCE_FIELD_NUMBER: builtins.int
        EXTENSION_URN_REFERENCE_FIELD_NUMBER: builtins.int
        TYPE_ANCHOR_FIELD_NUMBER: builtins.int
        NAME_FIELD_NUMBER: builtins.int
        extension_uri_reference: builtins.int
        """references the extension_uri_anchor defined for a specific extension URI.
        this is now deprecated and extension_urn_reference should be used instead.
        """
        extension_urn_reference: builtins.int
        """references the extension_urn_anchor defined for a specific extension URN.
        If both extension_urn_reference and extension_uri_reference are present,
        extension_urn_reference takes precedence.
        """
        type_anchor: builtins.int
        """A surrogate key used in the context of a single plan to reference a
        specific extension type.
        0 is a valid anchor/reference, but prefer non-zero values for ergonomics.
        """
        name: builtins.str
        """the name of the type in the defined extension YAML."""
        def __init__(
            self,
            *,
            extension_uri_reference: builtins.int = ...,
            extension_urn_reference: builtins.int = ...,
            type_anchor: builtins.int = ...,
            name: builtins.str = ...,
        ) -> None: ...
        def ClearField(self, field_name: typing.Literal["extension_uri_reference", b"extension_uri_reference", "extension_urn_reference", b"extension_urn_reference", "name", b"name", "type_anchor", b"type_anchor"]) -> None: ...

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

        EXTENSION_URI_REFERENCE_FIELD_NUMBER: builtins.int
        EXTENSION_URN_REFERENCE_FIELD_NUMBER: builtins.int
        TYPE_VARIATION_ANCHOR_FIELD_NUMBER: builtins.int
        NAME_FIELD_NUMBER: builtins.int
        extension_uri_reference: builtins.int
        """references the extension_uri_anchor defined for a specific extension URI.
        this is now deprecated and extension_urn_reference should be used instead.
        """
        extension_urn_reference: builtins.int
        """references the extension_urn_anchor defined for a specific extension URN.
        If both extension_urn_reference and extension_uri_reference are present,
        extension_urn_reference takes precedence.
        """
        type_variation_anchor: builtins.int
        """A surrogate key used in the context of a single plan to reference a
        specific type variation.
        Use non-zero values; 0 is reserved for the system-preferred variation.
        """
        name: builtins.str
        """the name of the type in the defined extension YAML."""
        def __init__(
            self,
            *,
            extension_uri_reference: builtins.int = ...,
            extension_urn_reference: builtins.int = ...,
            type_variation_anchor: builtins.int = ...,
            name: builtins.str = ...,
        ) -> None: ...
        def ClearField(self, field_name: typing.Literal["extension_uri_reference", b"extension_uri_reference", "extension_urn_reference", b"extension_urn_reference", "name", b"name", "type_variation_anchor", b"type_variation_anchor"]) -> None: ...

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

        EXTENSION_URI_REFERENCE_FIELD_NUMBER: builtins.int
        EXTENSION_URN_REFERENCE_FIELD_NUMBER: builtins.int
        FUNCTION_ANCHOR_FIELD_NUMBER: builtins.int
        NAME_FIELD_NUMBER: builtins.int
        extension_uri_reference: builtins.int
        """references the extension_uri_anchor defined for a specific extension URI.
        this is now deprecated and extension_urn_reference should be used instead.
        """
        extension_urn_reference: builtins.int
        """references the extension_urn_anchor defined for a specific extension URN.
        If both extension_urn_reference and extension_uri_reference are present,
        extension_urn_reference takes precedence.
        """
        function_anchor: builtins.int
        """A surrogate key used in the context of a single plan to reference a
        specific function.
        0 is a valid anchor/reference, but prefer non-zero values for ergonomics.
        """
        name: builtins.str
        """A function signature"""
        def __init__(
            self,
            *,
            extension_uri_reference: builtins.int = ...,
            extension_urn_reference: builtins.int = ...,
            function_anchor: builtins.int = ...,
            name: builtins.str = ...,
        ) -> None: ...
        def ClearField(self, field_name: typing.Literal["extension_uri_reference", b"extension_uri_reference", "extension_urn_reference", b"extension_urn_reference", "function_anchor", b"function_anchor", "name", b"name"]) -> None: ...

    EXTENSION_TYPE_FIELD_NUMBER: builtins.int
    EXTENSION_TYPE_VARIATION_FIELD_NUMBER: builtins.int
    EXTENSION_FUNCTION_FIELD_NUMBER: builtins.int
    @property
    def extension_type(self) -> Global___SimpleExtensionDeclaration.ExtensionType: ...
    @property
    def extension_type_variation(self) -> Global___SimpleExtensionDeclaration.ExtensionTypeVariation: ...
    @property
    def extension_function(self) -> Global___SimpleExtensionDeclaration.ExtensionFunction: ...
    def __init__(
        self,
        *,
        extension_type: Global___SimpleExtensionDeclaration.ExtensionType | None = ...,
        extension_type_variation: Global___SimpleExtensionDeclaration.ExtensionTypeVariation | None = ...,
        extension_function: Global___SimpleExtensionDeclaration.ExtensionFunction | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["extension_function", b"extension_function", "extension_type", b"extension_type", "extension_type_variation", b"extension_type_variation", "mapping_type", b"mapping_type"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["extension_function", b"extension_function", "extension_type", b"extension_type", "extension_type_variation", b"extension_type_variation", "mapping_type", b"mapping_type"]) -> None: ...
    def WhichOneof(self, oneof_group: typing.Literal["mapping_type", b"mapping_type"]) -> typing.Literal["extension_type", "extension_type_variation", "extension_function"] | None: ...

Global___SimpleExtensionDeclaration: typing_extensions.TypeAlias = SimpleExtensionDeclaration

@typing.final
class AdvancedExtension(google.protobuf.message.Message):
    """A generic object that can be used to embed additional extension information
    into the serialized substrait plan.
    """

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    OPTIMIZATION_FIELD_NUMBER: builtins.int
    ENHANCEMENT_FIELD_NUMBER: builtins.int
    @property
    def optimization(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[google.protobuf.any_pb2.Any]:
        """An optimization is helpful information that don't influence semantics. May
        be ignored by a consumer.
        """

    @property
    def enhancement(self) -> google.protobuf.any_pb2.Any:
        """An enhancement alter semantics. Cannot be ignored by a consumer."""

    def __init__(
        self,
        *,
        optimization: collections.abc.Iterable[google.protobuf.any_pb2.Any] | None = ...,
        enhancement: google.protobuf.any_pb2.Any | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["enhancement", b"enhancement"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["enhancement", b"enhancement", "optimization", b"optimization"]) -> None: ...

Global___AdvancedExtension: typing_extensions.TypeAlias = AdvancedExtension
