def METHOD_NAME(revision):
    payload = {
        "account-id": "account-id-1",
        "authority-id": "authority-id-1",
        "name": "validation-set-1",
        "sequence": "1",
        "series": "16",
        "snaps": [validation_sets.Snap(name="snap-name").marshal()],
        "timestamp": "2020-10-29T16:36:56Z",
        "type": "validation-set",
    }
    if revision is not None:
        payload["revision"] = revision
    s = validation_sets.BuildAssertion.unmarshal(payload)
    assert repr(s) == "<BuildAssertion: 'validation-set-1'>"
    assert s.account_id == payload["account-id"]
    assert s.authority_id == payload["authority-id"]
    assert s.name == payload["name"]
    assert s.sequence == payload.get("sequence")
    assert s.series == payload.get("series")
    assert s.snaps == [validation_sets.Snap(name="snap-name")]
    assert s.timestamp == "2020-10-29T16:36:56Z"
    if revision is None:
        payload["revision"] = "0"
    assert s.marshal() == payload