MCPcopy Create free account
hub / github.com/github/copilot-sdk / from_dict

Method from_dict

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

Source from the content-addressed store, hash-verified

267
268 @staticmethod
269 def from_dict(obj: Any) -> 'AccountQuotaSnapshot':
270 assert isinstance(obj, dict)
271 entitlement_requests = from_int(obj.get("entitlementRequests"))
272 is_unlimited_entitlement = from_bool(obj.get("isUnlimitedEntitlement"))
273 overage = from_float(obj.get("overage"))
274 overage_allowed_with_exhausted_quota = from_bool(obj.get("overageAllowedWithExhaustedQuota"))
275 remaining_percentage = from_float(obj.get("remainingPercentage"))
276 usage_allowed_with_exhausted_quota = from_bool(obj.get("usageAllowedWithExhaustedQuota"))
277 used_requests = from_int(obj.get("usedRequests"))
278 reset_date = from_union([from_str, from_none], obj.get("resetDate"))
279 return AccountQuotaSnapshot(entitlement_requests, is_unlimited_entitlement, overage, overage_allowed_with_exhausted_quota, remaining_percentage, usage_allowed_with_exhausted_quota, used_requests, reset_date)
280
281 def to_dict(self) -> dict:
282 result: dict = {}

Callers

nothing calls this directly

Calls 6

from_intFunction · 0.70
from_boolFunction · 0.70
from_floatFunction · 0.70
from_unionFunction · 0.70
getMethod · 0.45

Tested by

no test coverage detected