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

Method to_dict

python/copilot/generated/rpc.py:10044–10063  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

10042 return ConnectedRemoteSessionMetadata(kind, modified_time, repository, session_id, start_time, name, pull_request_number, resource_id, stale_at, state, summary)
10043
10044 def to_dict(self) -> dict:
10045 result: dict = {}
10046 result["kind"] = to_enum(ConnectedRemoteSessionMetadataKind, self.kind)
10047 result["modifiedTime"] = self.modified_time.isoformat()
10048 result["repository"] = to_class(ConnectedRemoteSessionMetadataRepository, self.repository)
10049 result["sessionId"] = from_str(self.session_id)
10050 result["startTime"] = self.start_time.isoformat()
10051 if self.name is not None:
10052 result["name"] = from_union([from_str, from_none], self.name)
10053 if self.pull_request_number is not None:
10054 result["pullRequestNumber"] = from_union([from_int, from_none], self.pull_request_number)
10055 if self.resource_id is not None:
10056 result["resourceId"] = from_union([from_str, from_none], self.resource_id)
10057 if self.stale_at is not None:
10058 result["staleAt"] = from_union([lambda x: x.isoformat(), from_none], self.stale_at)
10059 if self.state is not None:
10060 result["state"] = from_union([from_str, from_none], self.state)
10061 if self.summary is not None:
10062 result["summary"] = from_union([from_str, from_none], self.summary)
10063 return result
10064
10065# Experimental: this type is part of an experimental API and may change or be removed.
10066@dataclass

Callers

nothing calls this directly

Calls 4

to_enumFunction · 0.70
to_classFunction · 0.70
from_strFunction · 0.70
from_unionFunction · 0.70

Tested by

no test coverage detected