Struct UploadResultEntry

One raw authoritative result entry returned after a successful OSM diff upload.

struct UploadResultEntry;

The type is format-neutral: XML parsing and HTTP transport are intentionally outside this model. OSM API 0.6 diffResult fields are preserved without pretending that field shape always identifies the originating action:

- create normally has old ID plus positive new ID/version; - modify normally has old ID plus new ID/version; - successful delete normally has only old ID; - delete-if-unused may instead return old ID plus current new ID/version when the requested deletion was not performed; - placeholder reuse can repeat the same type+oldId in a general result.

Use effectFor with the matching uploaded request entry when action/effect semantics matter. .init is invalid because oldId is zero.

Fields

NameTypeDescription
hasNewId bool
hasNewVersion bool
newId long
newVersion int
oldId long
type ElementType

Properties

NameTypeDescription
shapeValid[get] boolWhether the raw fields have a representable OSM API diff-result shape.

Methods

NameDescription
created (type, oldId, newId, newVersion) Construct a create-shaped acknowledgement.
deleted (type, id) Construct a bare delete-shaped acknowledgement.
effectFor (uploaded, effect) Interpret this result against the exact uploaded request entry.
modified (type, id, newVersion) Construct a modify-shaped acknowledgement.