Handles SCIM metadata for resources: timestamping domain structs and
computing/formatting the SCIM meta object (including ETag/version).
Summary
Functions
Assembles the SCIM meta JSON object from pre-extracted values.
Computes a weak ETag version string given a raw version value and last-modified timestamp.
Formats a DateTime to ISO 8601 string, passes binaries through, returns nil for nil.
Parses an ISO 8601 string into a DateTime, passes DateTime through, returns nil for nil.
Updates metadata timestamps on a resource.
Functions
Assembles the SCIM meta JSON object from pre-extracted values.
created and last_modified may be DateTime structs or ISO 8601 strings.
version, location, and resource_type may be nil (keys are omitted when nil).
Computes a weak ETag version string given a raw version value and last-modified timestamp.
If version_value is non-nil, it is stringified and hashed. Otherwise last_modified
is used as the input. Returns nil if both are nil/unavailable.
Formats a DateTime to ISO 8601 string, passes binaries through, returns nil for nil.
Parses an ISO 8601 string into a DateTime, passes DateTime through, returns nil for nil.
Updates metadata timestamps on a resource.
Sets meta_last_modified to current time, and meta_created if it's nil. Optionally sets meta_resource_type if provided.