# WARNING: Please don't edit this file. It was generated by Python/WinRT v1.0.0-beta.10

import enum
import datetime
import sys
import types
import typing

import winsdk.system
import winsdk.windows.foundation
import winsdk.windows.foundation.collections
import winsdk.windows.graphics.imaging
import winsdk.windows.storage
import winsdk.windows.storage.streams

class FeatureElementKindPreview(enum.IntEnum):
    UNDEFINED = 0
    FLOAT = 1
    UINT8 = 2
    INT8 = 3
    UINT16 = 4
    INT16 = 5
    INT32 = 6
    INT64 = 7
    STRING = 8
    BOOLEAN = 9
    FLOAT16 = 10
    DOUBLE = 11
    UINT32 = 12
    UINT64 = 13
    COMPLEX64 = 14
    COMPLEX128 = 15

class LearningModelDeviceKindPreview(enum.IntEnum):
    LEARNING_DEVICE_ANY = 0
    LEARNING_DEVICE_CPU = 1
    LEARNING_DEVICE_GPU = 2
    LEARNING_DEVICE_NPU = 3
    LEARNING_DEVICE_DSP = 4
    LEARNING_DEVICE_FPGA = 5

class LearningModelFeatureKindPreview(enum.IntEnum):
    UNDEFINED = 0
    TENSOR = 1
    SEQUENCE = 2
    MAP = 3
    IMAGE = 4

Self = typing.TypeVar('Self')

class ImageVariableDescriptorPreview(winsdk.system.Object):
    bitmap_pixel_format: winsdk.windows.graphics.imaging.BitmapPixelFormat
    height: winsdk.system.UInt32
    width: winsdk.system.UInt32
    description: str
    is_required: winsdk.system.Boolean
    model_feature_kind: LearningModelFeatureKindPreview
    name: str
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> ImageVariableDescriptorPreview: ...

class InferencingOptionsPreview(winsdk.system.Object):
    reclaim_memory_after_evaluation: winsdk.system.Boolean
    preferred_device_kind: LearningModelDeviceKindPreview
    minimize_memory_allocation: winsdk.system.Boolean
    max_batch_size: winsdk.system.Int32
    is_tracing_enabled: winsdk.system.Boolean
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> InferencingOptionsPreview: ...

class LearningModelBindingPreview(winsdk.system.Object, typing.Mapping[str, winsdk.system.Object]):
    size: winsdk.system.UInt32
    def __len__(self) -> int: ...
    def __iter__(self) -> typing.Iterator[str]: ...
    def __contains__(self, key: object) -> bool:...
    def __getitem__(self, key: str) -> winsdk.system.Object: ...
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> LearningModelBindingPreview: ...
    def __new__(cls: typing.Type[LearningModelBindingPreview], model: typing.Optional[LearningModelPreview]) -> LearningModelBindingPreview:...
    @typing.overload
    def bind(self, name: str, value: typing.Optional[winsdk.system.Object], /) -> None: ...
    @typing.overload
    def bind(self, name: str, value: typing.Optional[winsdk.system.Object], metadata: typing.Optional[winsdk.windows.foundation.collections.IPropertySet], /) -> None: ...
    def clear(self) -> None: ...
    def first(self) -> typing.Optional[winsdk.windows.foundation.collections.IIterator[winsdk.windows.foundation.collections.IKeyValuePair[str, winsdk.system.Object]]]: ...
    def has_key(self, key: str, /) -> winsdk.system.Boolean: ...
    def lookup(self, key: str, /) -> typing.Optional[winsdk.system.Object]: ...
    def split(self) -> typing.Tuple[typing.Optional[winsdk.windows.foundation.collections.IMapView[str, winsdk.system.Object]], typing.Optional[winsdk.windows.foundation.collections.IMapView[str, winsdk.system.Object]]]: ...

class LearningModelDescriptionPreview(winsdk.system.Object):
    author: str
    description: str
    domain: str
    input_features: typing.Optional[winsdk.windows.foundation.collections.IIterable[ILearningModelVariableDescriptorPreview]]
    metadata: typing.Optional[winsdk.windows.foundation.collections.IMapView[str, str]]
    name: str
    output_features: typing.Optional[winsdk.windows.foundation.collections.IIterable[ILearningModelVariableDescriptorPreview]]
    version: winsdk.system.Int64
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> LearningModelDescriptionPreview: ...

class LearningModelEvaluationResultPreview(winsdk.system.Object):
    correlation_id: str
    outputs: typing.Optional[winsdk.windows.foundation.collections.IMapView[str, winsdk.system.Object]]
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> LearningModelEvaluationResultPreview: ...

class LearningModelPreview(winsdk.system.Object):
    inferencing_options: typing.Optional[InferencingOptionsPreview]
    description: typing.Optional[LearningModelDescriptionPreview]
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> LearningModelPreview: ...
    def evaluate_async(self, binding: typing.Optional[LearningModelBindingPreview], correlation_id: str, /) -> winsdk.windows.foundation.IAsyncOperation[LearningModelEvaluationResultPreview]: ...
    def evaluate_features_async(self, features: winsdk.windows.foundation.collections.IMap[str, winsdk.system.Object], correlation_id: str, /) -> winsdk.windows.foundation.IAsyncOperation[LearningModelEvaluationResultPreview]: ...
    @staticmethod
    def load_model_from_storage_file_async(model_file: typing.Optional[winsdk.windows.storage.IStorageFile], /) -> winsdk.windows.foundation.IAsyncOperation[LearningModelPreview]: ...
    @staticmethod
    def load_model_from_stream_async(model_stream: typing.Optional[winsdk.windows.storage.streams.IRandomAccessStreamReference], /) -> winsdk.windows.foundation.IAsyncOperation[LearningModelPreview]: ...

class LearningModelVariableDescriptorPreview(winsdk.system.Object):
    description: str
    is_required: winsdk.system.Boolean
    model_feature_kind: LearningModelFeatureKindPreview
    name: str
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> LearningModelVariableDescriptorPreview: ...

class MapVariableDescriptorPreview(winsdk.system.Object):
    description: str
    is_required: winsdk.system.Boolean
    model_feature_kind: LearningModelFeatureKindPreview
    name: str
    fields: typing.Optional[ILearningModelVariableDescriptorPreview]
    key_kind: FeatureElementKindPreview
    valid_integer_keys: typing.Optional[winsdk.windows.foundation.collections.IIterable[winsdk.system.Int64]]
    valid_string_keys: typing.Optional[winsdk.windows.foundation.collections.IIterable[str]]
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> MapVariableDescriptorPreview: ...

class SequenceVariableDescriptorPreview(winsdk.system.Object):
    description: str
    is_required: winsdk.system.Boolean
    model_feature_kind: LearningModelFeatureKindPreview
    name: str
    element_type: typing.Optional[ILearningModelVariableDescriptorPreview]
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> SequenceVariableDescriptorPreview: ...

class TensorVariableDescriptorPreview(winsdk.system.Object):
    description: str
    is_required: winsdk.system.Boolean
    model_feature_kind: LearningModelFeatureKindPreview
    name: str
    data_type: FeatureElementKindPreview
    shape: typing.Optional[winsdk.windows.foundation.collections.IIterable[winsdk.system.Int64]]
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> TensorVariableDescriptorPreview: ...

class ILearningModelVariableDescriptorPreview(winsdk.system.Object):
    description: str
    is_required: winsdk.system.Boolean
    model_feature_kind: LearningModelFeatureKindPreview
    name: str
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> ILearningModelVariableDescriptorPreview: ...

