Struct OwnedChangeEntry

One format-independent owned OSM change entry.

struct OwnedChangeEntry;

Fields common to every element are stored once. The payload selected by type

Fields

NameTypeDescription
action ChangeActionRequested whole-object operation.
deleteIfUnused boolExplicit conditional-delete policy. Meaningful only for deleteObject.
id longElement identifier. Negative local/create IDs are preserved.
location LocationViewNode location when type is node and objectState is complete.
metadata OwnedMetadataOptional OSM element metadata with independent presence flags.
objectState ChangeObjectStateWhether full object content is present.
relationMembers OwnedRelationMember[]Ordered Relation members when type is relation.
tags OwnedTag[]Ordered tags, preserving input order and duplicates.
type ElementTypeOSM element kind.
wayNodes OwnedNodeRef[]Ordered Way node references when type is way.

Properties

NameTypeDescription
complete[get] boolWhether this entry carries a complete element state.
shapeValid[get] boolCheck only the representation-shape invariants of this entry.

Methods

NameDescription
deepCopy () Create an independently mutable copy.
deletion (type, id, metadata, ifUnused) Construct an identity-only deletion.
fromNode (action, value) Construct a complete Node change without copying child-array storage.
fromRelation (action, value) Construct a complete Relation change without copying child-array storage.
fromWay (action, value) Construct a complete Way change without copying child-array storage.

is

- node: location + tags; - way: wayNodes + tags; - relation: relationMembers + tags.

Unused payload arrays must be empty for a structurally valid entry. deleteIfUnused represents the Editing API/osmChange deletion policy explicitly. It is meaningful only for deleteObject and is never implied.

.init is safe to destroy and assign, but it is not a valid change operation: it describes a create action with identity-only content.