@dataclass
class EnumPair:
stringValue: str
instanceName: str
def to_json(self) -> dict:
return asdict(self)
@staticmethod
def from_json(json: Any) -> EnumPair:
return EnumPair(json["stringValue"], json["instanceName"])
def __eq__(self, other: Any) -> bool:
return (
isinstance(other, EnumPair)
and self.stringValue == other.stringValue
and self.instanceName == other.instanceName
)