mirror of
https://github.com/status-im/PyGithub.git
synced 2026-08-31 19:01:15 +00:00
42 lines
1.5 KiB
Python
42 lines
1.5 KiB
Python
# WARNING: this file is generated automaticaly.
|
|
# Do not modify it manually, your work would be lost.
|
|
|
|
import GithubObject
|
|
##########
|
|
import GitTreeElement
|
|
|
|
class GitTree( GithubObject.GithubObject ):
|
|
@property
|
|
def sha( self ):
|
|
self._completeIfNotSet( self._sha )
|
|
return self._NoneIfNotSet( self._sha )
|
|
|
|
@property
|
|
def tree( self ):
|
|
self._completeIfNotSet( self._tree )
|
|
return self._NoneIfNotSet( self._tree )
|
|
|
|
@property
|
|
def url( self ):
|
|
self._completeIfNotSet( self._url )
|
|
return self._NoneIfNotSet( self._url )
|
|
|
|
def _initAttributes( self ):
|
|
self._sha = GithubObject.NotSet
|
|
self._tree = GithubObject.NotSet
|
|
self._url = GithubObject.NotSet
|
|
|
|
def _useAttributes( self, attributes ):
|
|
if "sha" in attributes: # pragma no branch
|
|
assert attributes[ "sha" ] is None or isinstance( attributes[ "sha" ], ( str, unicode ) ), attributes[ "sha" ]
|
|
self._sha = attributes[ "sha" ]
|
|
if "tree" in attributes: # pragma no branch
|
|
assert all( isinstance( element, dict ) for element in attributes[ "tree" ] ), attributes[ "tree" ]
|
|
self._tree = [
|
|
GitTreeElement.GitTreeElement( self._requester, element, completed = False )
|
|
for element in attributes[ "tree" ]
|
|
]
|
|
if "url" in attributes: # pragma no branch
|
|
assert attributes[ "url" ] is None or isinstance( attributes[ "url" ], ( str, unicode ) ), attributes[ "url" ]
|
|
self._url = attributes[ "url" ]
|