# TileDB Storage Platform API
#
# TileDB Storage Platform REST API
#
# The version of the OpenAPI document: 2.2.19
#
# Generated by: https://openapi-generator.tech
#' @docType class
#' @title TokenScope
#'
#' @description TokenScope Class
#'
#' @format An \code{R6Class} generator object
#'
#' @importFrom R6 R6Class
#' @importFrom jsonlite fromJSON toJSON
#' @export
TokenScope <- R6::R6Class(
"TokenScope",
public = list(
initialize = function(...) {
local.optional.var <- list(...)
val <- unlist(local.optional.var)
# MANUAL EDIT AFTER OPENAPI AUTOGEN
.check_openapi_enum("TokenScope", val, .parse_TokenScope())
private$value <- val
},
toJSON = function() {
jsonlite::toJSON(private$value, auto_unbox = TRUE)
},
fromJSON = function(TokenScopeJson) {
private$value <- jsonlite::fromJSON(TokenScopeJson,
simplifyVector = FALSE)
self
},
toJSONString = function() {
as.character(jsonlite::toJSON(private$value,
auto_unbox = TRUE))
},
fromJSONString = function(TokenScopeJson) {
private$value <- jsonlite::fromJSON(TokenScopeJson,
simplifyVector = FALSE)
self
}
),
private = list(
value = NULL
)
)
# add to utils.R
.parse_TokenScope <- function(vals) {
res <- gsub("^\\[|\\]$", "",
"[password_reset, confirm_email, *, user:read, user:read-write, user:admin, array:read, array:read-write, array:admin]"
)
unlist(strsplit(res, ", "))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.