"""
@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.descriptor
import google.protobuf.internal.containers
import google.protobuf.message
import substrait.algebra_pb2
import substrait.extensions.extensions_pb2
import substrait.plan_pb2
import substrait.type_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 ExpressionReference(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    EXPRESSION_FIELD_NUMBER: builtins.int
    MEASURE_FIELD_NUMBER: builtins.int
    OUTPUT_NAMES_FIELD_NUMBER: builtins.int
    @property
    def expression(self) -> substrait.algebra_pb2.Expression: ...
    @property
    def measure(self) -> substrait.algebra_pb2.AggregateFunction: ...
    @property
    def output_names(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]:
        """Field names in depth-first order"""

    def __init__(
        self,
        *,
        expression: substrait.algebra_pb2.Expression | None = ...,
        measure: substrait.algebra_pb2.AggregateFunction | None = ...,
        output_names: collections.abc.Iterable[builtins.str] | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["expr_type", b"expr_type", "expression", b"expression", "measure", b"measure"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["expr_type", b"expr_type", "expression", b"expression", "measure", b"measure", "output_names", b"output_names"]) -> None: ...
    def WhichOneof(self, oneof_group: typing.Literal["expr_type", b"expr_type"]) -> typing.Literal["expression", "measure"] | None: ...

Global___ExpressionReference: typing_extensions.TypeAlias = ExpressionReference

@typing.final
class ExtendedExpression(google.protobuf.message.Message):
    """Describe a set of operations to complete.
    For compactness sake, identifiers are normalized at the plan level.
    """

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    VERSION_FIELD_NUMBER: builtins.int
    EXTENSION_URIS_FIELD_NUMBER: builtins.int
    EXTENSION_URNS_FIELD_NUMBER: builtins.int
    EXTENSIONS_FIELD_NUMBER: builtins.int
    REFERRED_EXPR_FIELD_NUMBER: builtins.int
    BASE_SCHEMA_FIELD_NUMBER: builtins.int
    ADVANCED_EXTENSIONS_FIELD_NUMBER: builtins.int
    EXPECTED_TYPE_URLS_FIELD_NUMBER: builtins.int
    @property
    def version(self) -> substrait.plan_pb2.Version:
        """Substrait version of the expression. Optional up to 0.17.0, required for later
        versions.
        """

    @property
    def extension_uris(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[substrait.extensions.extensions_pb2.SimpleExtensionURI]:
        """a list of yaml specifications this expression may depend on
        this is now deprecated and extension_urns should be used instead.
        """

    @property
    def extension_urns(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[substrait.extensions.extensions_pb2.SimpleExtensionURN]:
        """a list of extension specifications this expression may depend on,
        referenced by Extension URN
        """

    @property
    def extensions(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[substrait.extensions.extensions_pb2.SimpleExtensionDeclaration]:
        """a list of extensions this expression may depend on"""

    @property
    def referred_expr(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[Global___ExpressionReference]:
        """one or more expression trees with same order in plan rel"""

    @property
    def base_schema(self) -> substrait.type_pb2.NamedStruct: ...
    @property
    def advanced_extensions(self) -> substrait.extensions.extensions_pb2.AdvancedExtension:
        """additional extensions associated with this expression."""

    @property
    def expected_type_urls(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]:
        """A list of com.google.Any entities that this plan may use. Can be used to
        warn if some embedded message types are unknown. Note that this list may
        include message types that are ignorable (optimizations) or that are
        unused. In many cases, a consumer may be able to work with a plan even if
        one or more message types defined here are unknown.
        """

    def __init__(
        self,
        *,
        version: substrait.plan_pb2.Version | None = ...,
        extension_uris: collections.abc.Iterable[substrait.extensions.extensions_pb2.SimpleExtensionURI] | None = ...,
        extension_urns: collections.abc.Iterable[substrait.extensions.extensions_pb2.SimpleExtensionURN] | None = ...,
        extensions: collections.abc.Iterable[substrait.extensions.extensions_pb2.SimpleExtensionDeclaration] | None = ...,
        referred_expr: collections.abc.Iterable[Global___ExpressionReference] | None = ...,
        base_schema: substrait.type_pb2.NamedStruct | None = ...,
        advanced_extensions: substrait.extensions.extensions_pb2.AdvancedExtension | None = ...,
        expected_type_urls: collections.abc.Iterable[builtins.str] | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["advanced_extensions", b"advanced_extensions", "base_schema", b"base_schema", "version", b"version"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["advanced_extensions", b"advanced_extensions", "base_schema", b"base_schema", "expected_type_urls", b"expected_type_urls", "extension_uris", b"extension_uris", "extension_urns", b"extension_urns", "extensions", b"extensions", "referred_expr", b"referred_expr", "version", b"version"]) -> None: ...

Global___ExtendedExpression: typing_extensions.TypeAlias = ExtendedExpression
