"""
@generated by mypy-protobuf.  Do not edit manually!
isort:skip_file
Copyright 2025 Ant Group Co., Ltd.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
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 sys
import typing

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

DESCRIPTOR: google.protobuf.descriptor.FileDescriptor

@typing_extensions.final
class ValueAttrProto(google.protobuf.message.Message):
    """Lightweight attribute proto used solely for ValueProto runtime metadata."""

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

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

    class _AttrTypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[ValueAttrProto._AttrType.ValueType], builtins.type):
        DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
        UNDEFINED: ValueAttrProto._AttrType.ValueType  # 0
        FLOAT: ValueAttrProto._AttrType.ValueType  # 1
        INT: ValueAttrProto._AttrType.ValueType  # 2
        STRING: ValueAttrProto._AttrType.ValueType  # 3
        BOOL: ValueAttrProto._AttrType.ValueType  # 4
        BYTES: ValueAttrProto._AttrType.ValueType  # 5
        FLOATS: ValueAttrProto._AttrType.ValueType  # 6
        INTS: ValueAttrProto._AttrType.ValueType  # 7
        STRINGS: ValueAttrProto._AttrType.ValueType  # 8
        EMPTY: ValueAttrProto._AttrType.ValueType  # 9
        """Represents an explicitly empty attribute value (e.g., empty list)"""

    class AttrType(_AttrType, metaclass=_AttrTypeEnumTypeWrapper): ...
    UNDEFINED: ValueAttrProto.AttrType.ValueType  # 0
    FLOAT: ValueAttrProto.AttrType.ValueType  # 1
    INT: ValueAttrProto.AttrType.ValueType  # 2
    STRING: ValueAttrProto.AttrType.ValueType  # 3
    BOOL: ValueAttrProto.AttrType.ValueType  # 4
    BYTES: ValueAttrProto.AttrType.ValueType  # 5
    FLOATS: ValueAttrProto.AttrType.ValueType  # 6
    INTS: ValueAttrProto.AttrType.ValueType  # 7
    STRINGS: ValueAttrProto.AttrType.ValueType  # 8
    EMPTY: ValueAttrProto.AttrType.ValueType  # 9
    """Represents an explicitly empty attribute value (e.g., empty list)"""

    TYPE_FIELD_NUMBER: builtins.int
    F_FIELD_NUMBER: builtins.int
    I_FIELD_NUMBER: builtins.int
    S_FIELD_NUMBER: builtins.int
    B_FIELD_NUMBER: builtins.int
    RAW_BYTES_FIELD_NUMBER: builtins.int
    FLOATS_FIELD_NUMBER: builtins.int
    INTS_FIELD_NUMBER: builtins.int
    STRS_FIELD_NUMBER: builtins.int
    type: global___ValueAttrProto.AttrType.ValueType
    f: builtins.float
    i: builtins.int
    s: builtins.str
    b: builtins.bool
    raw_bytes: builtins.bytes
    @property
    def floats(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.float]: ...
    @property
    def ints(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.int]: ...
    @property
    def strs(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: ...
    def __init__(
        self,
        *,
        type: global___ValueAttrProto.AttrType.ValueType = ...,
        f: builtins.float = ...,
        i: builtins.int = ...,
        s: builtins.str = ...,
        b: builtins.bool = ...,
        raw_bytes: builtins.bytes = ...,
        floats: collections.abc.Iterable[builtins.float] | None = ...,
        ints: collections.abc.Iterable[builtins.int] | None = ...,
        strs: collections.abc.Iterable[builtins.str] | None = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing_extensions.Literal["b", b"b", "f", b"f", "floats", b"floats", "i", b"i", "ints", b"ints", "raw_bytes", b"raw_bytes", "s", b"s", "strs", b"strs", "type", b"type"]) -> None: ...

global___ValueAttrProto = ValueAttrProto

@typing_extensions.final
class ValueProto(google.protobuf.message.Message):
    """Generic envelope for kernel-level transferable values.

    DESIGN PRINCIPLES
    * Small, stable schema: only descriptors needed for dynamic dispatch.
    * Payload is opaque to the envelope; per-kind versioning lives in
    value_version.
    * Backward-compatible evolution: only append new optional fields.

    Versioning Guidelines:
    - value_version: per-kind semantic payload version (maintained by KernelValue
    subclass).
    - Adding fields: assign new unique field numbers; never reuse old numbers.
    - Removing fields: reserve the field number & (optionally) name.
    """

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    @typing_extensions.final
    class RuntimeAttrsEntry(google.protobuf.message.Message):
        DESCRIPTOR: google.protobuf.descriptor.Descriptor

        KEY_FIELD_NUMBER: builtins.int
        VALUE_FIELD_NUMBER: builtins.int
        key: builtins.str
        @property
        def value(self) -> global___ValueAttrProto: ...
        def __init__(
            self,
            *,
            key: builtins.str = ...,
            value: global___ValueAttrProto | None = ...,
        ) -> None: ...
        def HasField(self, field_name: typing_extensions.Literal["value", b"value"]) -> builtins.bool: ...
        def ClearField(self, field_name: typing_extensions.Literal["key", b"key", "value", b"value"]) -> None: ...

    KIND_FIELD_NUMBER: builtins.int
    VALUE_VERSION_FIELD_NUMBER: builtins.int
    PAYLOAD_FIELD_NUMBER: builtins.int
    RUNTIME_ATTRS_FIELD_NUMBER: builtins.int
    kind: builtins.str
    """Globally unique identifier for Value subclass, e.g. "mplang.ndarray"."""
    value_version: builtins.int
    """Per-kind payload schema version (>=1)."""
    payload: builtins.bytes
    """Primary data payload bytes (layout defined by each Value subclass)."""
    @property
    def runtime_attrs(self) -> google.protobuf.internal.containers.MessageMap[builtins.str, global___ValueAttrProto]:
        """Additional runtime metadata required to recreate the Value instance."""
    def __init__(
        self,
        *,
        kind: builtins.str = ...,
        value_version: builtins.int = ...,
        payload: builtins.bytes = ...,
        runtime_attrs: collections.abc.Mapping[builtins.str, global___ValueAttrProto] | None = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing_extensions.Literal["kind", b"kind", "payload", b"payload", "runtime_attrs", b"runtime_attrs", "value_version", b"value_version"]) -> None: ...

global___ValueProto = ValueProto
