MCPcopy Index your code
hub / github.com/github/copilot-sdk / from_dict

Method from_dict

python/copilot/generated/rpc.py:20093–20110  ·  view source on GitHub ↗
(obj: Any)

Source from the content-addressed store, hash-verified

20091
20092 @staticmethod
20093 def from_dict(obj: Any) -> 'SessionMetadataSnapshot':
20094 assert isinstance(obj, dict)
20095 already_in_use = from_bool(obj.get("alreadyInUse"))
20096 current_mode = MetadataSnapshotCurrentMode(obj.get("currentMode"))
20097 is_remote = from_bool(obj.get("isRemote"))
20098 modified_time = from_datetime(obj.get("modifiedTime"))
20099 session_id = from_str(obj.get("sessionId"))
20100 start_time = from_datetime(obj.get("startTime"))
20101 working_directory = from_str(obj.get("workingDirectory"))
20102 client_name = from_union([from_str, from_none], obj.get("clientName"))
20103 initial_name = from_union([from_str, from_none], obj.get("initialName"))
20104 remote_metadata = from_union([MetadataSnapshotRemoteMetadata.from_dict, from_none], obj.get("remoteMetadata"))
20105 selected_model = from_union([from_str, from_none], obj.get("selectedModel"))
20106 session_limits = from_union([SessionLimitsConfig.from_dict, from_none], obj.get("sessionLimits"))
20107 summary = from_union([from_str, from_none], obj.get("summary"))
20108 workspace = from_union([WorkspaceSummary.from_dict, from_none], obj.get("workspace"))
20109 workspace_path = from_union([from_none, from_str], obj.get("workspacePath"))
20110 return SessionMetadataSnapshot(already_in_use, current_mode, is_remote, modified_time, session_id, start_time, working_directory, client_name, initial_name, remote_metadata, selected_model, session_limits, summary, workspace, workspace_path)
20111
20112 def to_dict(self) -> dict:
20113 result: dict = {}

Callers

nothing calls this directly

Calls 7

from_boolFunction · 0.70
from_datetimeFunction · 0.70
from_strFunction · 0.70
from_unionFunction · 0.70
getMethod · 0.45

Tested by

no test coverage detected