MCPcopy Create free account
hub / github.com/LaunchPlatform/beanhub-cli / Repository

Class Repository

beanhub_cli/internal_api/models/repository.py:13–93  ·  view source on GitHub ↗

Attributes: username (str): name (str): type_ (RepositoryType): public (bool): active (bool):

Source from the content-addressed store, hash-verified

11
12@_attrs_define
13class Repository:
14 """
15 Attributes:
16 username (str):
17 name (str):
18 type_ (RepositoryType):
19 public (bool):
20 active (bool):
21 """
22
23 username: str
24 name: str
25 type_: RepositoryType
26 public: bool
27 active: bool
28 additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
29
30 def to_dict(self) -> dict[str, Any]:
31 username = self.username
32
33 name = self.name
34
35 type_ = self.type_.value
36
37 public = self.public
38
39 active = self.active
40
41 field_dict: dict[str, Any] = {}
42 field_dict.update(self.additional_properties)
43 field_dict.update(
44 {
45 "username": username,
46 "name": name,
47 "type": type_,
48 "public": public,
49 "active": active,
50 }
51 )
52
53 return field_dict
54
55 @classmethod
56 def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
57 d = src_dict.copy()
58 username = d.pop("username")
59
60 name = d.pop("name")
61
62 type_ = RepositoryType(d.pop("type"))
63
64 public = d.pop("public")
65
66 active = d.pop("active")
67
68 repository = cls(
69 username=username,
70 name=name,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected