4545from __future__ import annotations
4646
4747from datetime import datetime
48- from typing import Any
48+ from typing import TYPE_CHECKING , Any
4949
5050import github .Consts
5151import github .DeploymentStatus
52+ import github .GithubApp
5253import github .NamedUser
5354from github .GithubObject import Attribute , CompletableGithubObject , NotSet , Opt
5455from github .PaginatedList import PaginatedList
5556
57+ if TYPE_CHECKING :
58+ from github .GithubApp import GithubApp
59+ from github .NamedUser import NamedUser
60+
5661
5762class Deployment (CompletableGithubObject ):
5863 """
@@ -70,12 +75,15 @@ class Deployment(CompletableGithubObject):
7075
7176 def _initAttributes (self ) -> None :
7277 self ._created_at : Attribute [datetime ] = NotSet
73- self ._creator : Attribute [github . NamedUser . NamedUser ] = NotSet
78+ self ._creator : Attribute [NamedUser ] = NotSet
7479 self ._description : Attribute [str ] = NotSet
7580 self ._environment : Attribute [str ] = NotSet
7681 self ._id : Attribute [int ] = NotSet
82+ self ._message : Attribute [str ] = NotSet
83+ self ._node_id : Attribute [str ] = NotSet
7784 self ._original_environment : Attribute [str ] = NotSet
7885 self ._payload : Attribute [dict [str , Any ]] = NotSet
86+ self ._performed_via_github_app : Attribute [GithubApp ] = NotSet
7987 self ._production_environment : Attribute [bool ] = NotSet
8088 self ._ref : Attribute [str ] = NotSet
8189 self ._repository_url : Attribute [str ] = NotSet
@@ -95,7 +103,7 @@ def created_at(self) -> datetime:
95103 return self ._created_at .value
96104
97105 @property
98- def creator (self ) -> github . NamedUser . NamedUser :
106+ def creator (self ) -> NamedUser :
99107 self ._completeIfNotSet (self ._creator )
100108 return self ._creator .value
101109
@@ -114,6 +122,16 @@ def id(self) -> int:
114122 self ._completeIfNotSet (self ._id )
115123 return self ._id .value
116124
125+ @property
126+ def message (self ) -> str :
127+ self ._completeIfNotSet (self ._message )
128+ return self ._message .value
129+
130+ @property
131+ def node_id (self ) -> str :
132+ self ._completeIfNotSet (self ._node_id )
133+ return self ._node_id .value
134+
117135 @property
118136 def original_environment (self ) -> str :
119137 self ._completeIfNotSet (self ._original_environment )
@@ -124,6 +142,11 @@ def payload(self) -> dict[str, Any]:
124142 self ._completeIfNotSet (self ._payload )
125143 return self ._payload .value
126144
145+ @property
146+ def performed_via_github_app (self ) -> GithubApp :
147+ self ._completeIfNotSet (self ._performed_via_github_app )
148+ return self ._performed_via_github_app .value
149+
127150 @property
128151 def production_environment (self ) -> bool :
129152 self ._completeIfNotSet (self ._production_environment )
@@ -251,10 +274,18 @@ def _useAttributes(self, attributes: dict[str, Any]) -> None:
251274 self ._environment = self ._makeStringAttribute (attributes ["environment" ])
252275 if "id" in attributes : # pragma no branch
253276 self ._id = self ._makeIntAttribute (attributes ["id" ])
277+ if "message" in attributes : # pragma no branch
278+ self ._message = self ._makeStringAttribute (attributes ["message" ])
279+ if "node_id" in attributes : # pragma no branch
280+ self ._node_id = self ._makeStringAttribute (attributes ["node_id" ])
254281 if "original_environment" in attributes : # pragma no branch
255282 self ._original_environment = self ._makeStringAttribute (attributes ["original_environment" ])
256283 if "payload" in attributes : # pragma no branch
257284 self ._payload = self ._makeDictAttribute (attributes ["payload" ])
285+ if "performed_via_github_app" in attributes : # pragma no branch
286+ self ._performed_via_github_app = self ._makeClassAttribute (
287+ github .GithubApp .GithubApp , attributes ["performed_via_github_app" ]
288+ )
258289 if "production_environment" in attributes : # pragma no branch
259290 self ._production_environment = self ._makeBoolAttribute (attributes ["production_environment" ])
260291 if "ref" in attributes : # pragma no branch
0 commit comments