# 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.data.json
import winsdk.windows.foundation
import winsdk.windows.foundation.collections
import winsdk.windows.system

class DiagnosticActionState(enum.IntEnum):
    INITIALIZING = 0
    DOWNLOADING = 1
    VERIFYING_TRUST = 2
    DETECTING = 3
    RESOLVING = 4
    VERIFYING_RESOLUTION = 5
    EXECUTING = 6

Self = typing.TypeVar('Self')

class DiagnosticActionResult(_winrt.Object):
    extended_error: winsdk.windows.foundation.HResult
    results: typing.Optional[winsdk.windows.foundation.collections.ValueSet]
    @staticmethod
    def _from(obj: _winrt.Object) -> DiagnosticActionResult: ...

class DiagnosticInvoker(_winrt.Object):
    is_supported: _winrt.Boolean
    @staticmethod
    def _from(obj: _winrt.Object) -> DiagnosticInvoker: ...
    @staticmethod
    def get_default() -> typing.Optional[DiagnosticInvoker]: ...
    @staticmethod
    def get_for_user(user: typing.Optional[winsdk.windows.system.User]) -> typing.Optional[DiagnosticInvoker]: ...
    def run_diagnostic_action_async(self, context: typing.Optional[winsdk.windows.data.json.JsonObject]) -> winsdk.windows.foundation.IAsyncOperationWithProgress[DiagnosticActionResult, DiagnosticActionState]: ...
    def run_diagnostic_action_from_string_async(self, context: str) -> winsdk.windows.foundation.IAsyncOperationWithProgress[DiagnosticActionResult, DiagnosticActionState]: ...

class ProcessCpuUsage(_winrt.Object):
    @staticmethod
    def _from(obj: _winrt.Object) -> ProcessCpuUsage: ...
    def get_report(self) -> typing.Optional[ProcessCpuUsageReport]: ...

class ProcessCpuUsageReport(_winrt.Object):
    kernel_time: datetime.timedelta
    user_time: datetime.timedelta
    @staticmethod
    def _from(obj: _winrt.Object) -> ProcessCpuUsageReport: ...

class ProcessDiagnosticInfo(_winrt.Object):
    cpu_usage: typing.Optional[ProcessCpuUsage]
    disk_usage: typing.Optional[ProcessDiskUsage]
    executable_file_name: str
    memory_usage: typing.Optional[ProcessMemoryUsage]
    parent: typing.Optional[ProcessDiagnosticInfo]
    process_id: _winrt.UInt32
    process_start_time: datetime.datetime
    is_packaged: _winrt.Boolean
    @staticmethod
    def _from(obj: _winrt.Object) -> ProcessDiagnosticInfo: ...
    def get_app_diagnostic_infos(self) -> typing.Optional[winsdk.windows.foundation.collections.IVector[winsdk.windows.system.AppDiagnosticInfo]]: ...
    @staticmethod
    def get_for_current_process() -> typing.Optional[ProcessDiagnosticInfo]: ...
    @staticmethod
    def get_for_processes() -> typing.Optional[winsdk.windows.foundation.collections.IVectorView[ProcessDiagnosticInfo]]: ...
    @staticmethod
    def try_get_for_process_id(process_id: _winrt.UInt32) -> typing.Optional[ProcessDiagnosticInfo]: ...

class ProcessDiskUsage(_winrt.Object):
    @staticmethod
    def _from(obj: _winrt.Object) -> ProcessDiskUsage: ...
    def get_report(self) -> typing.Optional[ProcessDiskUsageReport]: ...

class ProcessDiskUsageReport(_winrt.Object):
    bytes_read_count: _winrt.Int64
    bytes_written_count: _winrt.Int64
    other_bytes_count: _winrt.Int64
    other_operation_count: _winrt.Int64
    read_operation_count: _winrt.Int64
    write_operation_count: _winrt.Int64
    @staticmethod
    def _from(obj: _winrt.Object) -> ProcessDiskUsageReport: ...

class ProcessMemoryUsage(_winrt.Object):
    @staticmethod
    def _from(obj: _winrt.Object) -> ProcessMemoryUsage: ...
    def get_report(self) -> typing.Optional[ProcessMemoryUsageReport]: ...

class ProcessMemoryUsageReport(_winrt.Object):
    non_paged_pool_size_in_bytes: _winrt.UInt64
    page_fault_count: _winrt.UInt32
    page_file_size_in_bytes: _winrt.UInt64
    paged_pool_size_in_bytes: _winrt.UInt64
    peak_non_paged_pool_size_in_bytes: _winrt.UInt64
    peak_page_file_size_in_bytes: _winrt.UInt64
    peak_paged_pool_size_in_bytes: _winrt.UInt64
    peak_virtual_memory_size_in_bytes: _winrt.UInt64
    peak_working_set_size_in_bytes: _winrt.UInt64
    private_page_count: _winrt.UInt64
    virtual_memory_size_in_bytes: _winrt.UInt64
    working_set_size_in_bytes: _winrt.UInt64
    @staticmethod
    def _from(obj: _winrt.Object) -> ProcessMemoryUsageReport: ...

class SystemCpuUsage(_winrt.Object):
    @staticmethod
    def _from(obj: _winrt.Object) -> SystemCpuUsage: ...
    def get_report(self) -> typing.Optional[SystemCpuUsageReport]: ...

class SystemCpuUsageReport(_winrt.Object):
    idle_time: datetime.timedelta
    kernel_time: datetime.timedelta
    user_time: datetime.timedelta
    @staticmethod
    def _from(obj: _winrt.Object) -> SystemCpuUsageReport: ...

class SystemDiagnosticInfo(_winrt.Object):
    cpu_usage: typing.Optional[SystemCpuUsage]
    memory_usage: typing.Optional[SystemMemoryUsage]
    preferred_architecture: winsdk.windows.system.ProcessorArchitecture
    @staticmethod
    def _from(obj: _winrt.Object) -> SystemDiagnosticInfo: ...
    @staticmethod
    def get_for_current_system() -> typing.Optional[SystemDiagnosticInfo]: ...
    @staticmethod
    def is_architecture_supported(type: winsdk.windows.system.ProcessorArchitecture) -> _winrt.Boolean: ...

class SystemMemoryUsage(_winrt.Object):
    @staticmethod
    def _from(obj: _winrt.Object) -> SystemMemoryUsage: ...
    def get_report(self) -> typing.Optional[SystemMemoryUsageReport]: ...

class SystemMemoryUsageReport(_winrt.Object):
    available_size_in_bytes: _winrt.UInt64
    committed_size_in_bytes: _winrt.UInt64
    total_physical_size_in_bytes: _winrt.UInt64
    @staticmethod
    def _from(obj: _winrt.Object) -> SystemMemoryUsageReport: ...

