# 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 UDFSharing
#'
#' @description UDFSharing Class
#'
#' @format An \code{R6Class} generator object
#'
#' @field actions list( \link{UDFActions} ) [optional]
#'
#' @field namespace character [optional]
#'
#' @field namespace_type character [optional]
#'
#' @importFrom R6 R6Class
#' @importFrom jsonlite fromJSON toJSON
#' @export
UDFSharing <- R6::R6Class(
'UDFSharing',
public = list(
`actions` = NULL,
`namespace` = NULL,
`namespace_type` = NULL,
initialize = function(
`actions`=NULL, `namespace`=NULL, `namespace_type`=NULL, ...
) {
local.optional.var <- list(...)
if (!is.null(`actions`)) {
stopifnot(is.vector(`actions`), length(`actions`) != 0)
sapply(`actions`, function(x) stopifnot(R6::is.R6(x)))
self$`actions` <- `actions`
}
if (!is.null(`namespace`)) {
stopifnot(is.character(`namespace`), length(`namespace`) == 1)
self$`namespace` <- `namespace`
}
if (!is.null(`namespace_type`)) {
stopifnot(is.character(`namespace_type`), length(`namespace_type`) == 1)
self$`namespace_type` <- `namespace_type`
}
},
toJSON = function() {
UDFSharingObject <- list()
if (!is.null(self$`actions`)) {
UDFSharingObject[['actions']] <-
lapply(self$`actions`, function(x) x$toJSON())
}
if (!is.null(self$`namespace`)) {
UDFSharingObject[['namespace']] <-
self$`namespace`
}
if (!is.null(self$`namespace_type`)) {
UDFSharingObject[['namespace_type']] <-
self$`namespace_type`
}
UDFSharingObject
},
fromJSON = function(UDFSharingJson) {
UDFSharingObject <- jsonlite::fromJSON(UDFSharingJson)
if (!is.null(UDFSharingObject$`actions`)) {
self$`actions` <- ApiClient$new()$deserializeObj(UDFSharingObject$`actions`, "array[UDFActions]", loadNamespace("tiledbcloud"))
}
if (!is.null(UDFSharingObject$`namespace`)) {
self$`namespace` <- UDFSharingObject$`namespace`
}
if (!is.null(UDFSharingObject$`namespace_type`)) {
self$`namespace_type` <- UDFSharingObject$`namespace_type`
}
self
},
toJSONString = function() {
jsoncontent <- c(
if (!is.null(self$`actions`)) {
sprintf(
'"actions":
[%s]
',
paste(sapply(self$`actions`, function(x) jsonlite::toJSON(x$toJSON(), auto_unbox=TRUE, digits = NA)), collapse=",")
)},
if (!is.null(self$`namespace`)) {
sprintf(
'"namespace":
"%s"
',
self$`namespace`
)},
if (!is.null(self$`namespace_type`)) {
sprintf(
'"namespace_type":
"%s"
',
self$`namespace_type`
)}
)
jsoncontent <- paste(jsoncontent, collapse = ",")
paste('{', jsoncontent, '}', sep = "")
},
fromJSONString = function(UDFSharingJson) {
UDFSharingObject <- jsonlite::fromJSON(UDFSharingJson)
self$`actions` <- ApiClient$new()$deserializeObj(UDFSharingObject$`actions`, "array[UDFActions]", loadNamespace("tiledbcloud"))
self$`namespace` <- UDFSharingObject$`namespace`
self$`namespace_type` <- UDFSharingObject$`namespace_type`
self
}
)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.