R/idempotency.R

Defines functions get_idempotency_token can_set_idempotency_token

#' @include RcppExports.R

IDEMPOTENCY_TOKEN_FILL_TAG <- "idempotencyToken"

# Return whether the idempotency token can be automatically set.
can_set_idempotency_token <- function(value) {
  return(length(value) == 0 && tag_get(value, IDEMPOTENCY_TOKEN_FILL_TAG) != "")
}

# Return a randomly-generated idempotency token.
get_idempotency_token <- function() {
  return(uuid_v4(1))
}

Try the paws.common package in your browser

Any scripts or data that you put into this service are public.

paws.common documentation built on Aug. 8, 2025, 7:23 p.m.