예제 #1
0
def _GetParent(asset):
    parent = [
        x.value for x in asset.resourceProperties.additionalProperties
        if x.key == "name"
    ]
    assert len(parent) == 1, ("No parent exists for this asset.")
    return _JsonValueToPythonValue(parent[0])
예제 #2
0
def _GetProjectId(asset):
    project_id = [
        x.value for x in asset.resourceProperties.additionalProperties
        if x.key == "projectId"
    ]
    assert len(project_id) == 1, ("No projectId exists for this asset.")
    return _JsonValueToPythonValue(project_id[0])