from __future__ import annotations
from typing import List, Protocol, Sequence, runtime_checkable

@runtime_checkable
class IMatrixData(Protocol):
    """Protocol matching ZOSAPI.Common.IMatrixData (2D array of doubles)."""

    def ReadData(self, Size: int, Data: List[float]) -> None: ...
    def WriteData(self, Size: int, Data: List[float]) -> None: ...
    def GetValueAt(self, Row: int, Col: int) -> float: ...
    def SetValueAt(self, Row: int, Col: int, Value: float) -> None: ...

    @property
    def IsReadOnly(self) -> bool: ...

    @property
    def Rows(self) -> int: ...

    @property
    def Cols(self) -> int: ...

    @property
    def TotalLength(self) -> int: ...

    @property
    def Data(self) -> Sequence[Sequence[float]]: ...
    @Data.setter
    def Data(self, values: Sequence[Sequence[float]]) -> None: ...
