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

import enum
import datetime
import sys
import types
import typing

import winsdk._winrt as _winrt
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(_winrt.Object):
    bitmap_pixel_format: winsdk.windows.graphics.imaging.BitmapPixelFormat
    height: _winrt.UInt32
    width: _winrt.UInt32
    description: str
    is_required: _winrt.Boolean
    model_feature_kind: LearningModelFeatureKindPreview
    name: str
    @staticmethod
    def _from(obj: _winrt.Object) -> ImageVariableDescriptorPreview: ...

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

class LearningModelBindingPreview(_winrt.Object, typing.Mapping[str, _winrt.Object]):
    size: _winrt.UInt32
    def __len__(self) -> int: ...
    def __iter__(self) -> typing.Iterator[str]: ...
    def __contains__(self, key: object) -> bool:...
    def __getitem__(self, key: str) -> _winrt.Object: ...
    @staticmethod
    def _from(obj: _winrt.Object) -> LearningModelBindingPreview: ...
    def __new__(cls: typing.Type[LearningModelBindingPreview], model: typing.Optional[LearningModelPreview]) -> LearningModelBindingPreview:...
    @typing.overload
    def bind(self, name: str, value: typing.Optional[_winrt.Object]) -> None: ...
    @typing.overload
    def bind(self, name: str, value: typing.Optional[_winrt.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, _winrt.Object]]]: ...
    def has_key(self, key: str) -> _winrt.Boolean: ...
    def lookup(self, key: str) -> typing.Optional[_winrt.Object]: ...
    def split(self) -> typing.Tuple[typing.Optional[winsdk.windows.foundation.collections.IMapView[str, _winrt.Object]], typing.Optional[winsdk.windows.foundation.collections.IMapView[str, _winrt.Object]]]: ...

class LearningModelDescriptionPreview(_winrt.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: _winrt.Int64
    @staticmethod
    def _from(obj: _winrt.Object) -> LearningModelDescriptionPreview: ...

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

class LearningModelPreview(_winrt.Object):
    inferencing_options: typing.Optional[InferencingOptionsPreview]
    description: typing.Optional[LearningModelDescriptionPreview]
    @staticmethod
    def _from(obj: _winrt.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, _winrt.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(_winrt.Object):
    description: str
    is_required: _winrt.Boolean
    model_feature_kind: LearningModelFeatureKindPreview
    name: str
    @staticmethod
    def _from(obj: _winrt.Object) -> LearningModelVariableDescriptorPreview: ...

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

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

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

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

