# 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 ArrayMetadataEntry
#'
#' @description ArrayMetadataEntry Class
#'
#' @format An \code{R6Class} generator object
#'
#' @field key character [optional]
#'
#' @field type character [optional]
#'
#' @field valueNum integer [optional]
#'
#' @field value list( integer ) [optional]
#'
#' @field del character [optional]
#'
#' @importFrom R6 R6Class
#' @importFrom jsonlite fromJSON toJSON
#' @export
ArrayMetadataEntry <- R6::R6Class(
'ArrayMetadataEntry',
public = list(
`key` = NULL,
`type` = NULL,
`valueNum` = NULL,
`value` = NULL,
`del` = NULL,
initialize = function(
`key`=NULL, `type`=NULL, `valueNum`=NULL, `value`=NULL, `del`=NULL, ...
) {
local.optional.var <- list(...)
if (!is.null(`key`)) {
stopifnot(is.character(`key`), length(`key`) == 1)
self$`key` <- `key`
}
if (!is.null(`type`)) {
stopifnot(is.character(`type`), length(`type`) == 1)
self$`type` <- `type`
}
if (!is.null(`valueNum`)) {
stopifnot(is.numeric(`valueNum`), length(`valueNum`) == 1)
self$`valueNum` <- `valueNum`
}
if (!is.null(`value`)) {
stopifnot(is.vector(`value`), length(`value`) != 0)
sapply(`value`, function(x) stopifnot(is.character(x)))
self$`value` <- `value`
}
if (!is.null(`del`)) {
self$`del` <- `del`
}
},
toJSON = function() {
ArrayMetadataEntryObject <- list()
if (!is.null(self$`key`)) {
ArrayMetadataEntryObject[['key']] <-
self$`key`
}
if (!is.null(self$`type`)) {
ArrayMetadataEntryObject[['type']] <-
self$`type`
}
if (!is.null(self$`valueNum`)) {
ArrayMetadataEntryObject[['valueNum']] <-
self$`valueNum`
}
if (!is.null(self$`value`)) {
ArrayMetadataEntryObject[['value']] <-
self$`value`
}
if (!is.null(self$`del`)) {
ArrayMetadataEntryObject[['del']] <-
self$`del`
}
ArrayMetadataEntryObject
},
fromJSON = function(ArrayMetadataEntryJson) {
ArrayMetadataEntryObject <- jsonlite::fromJSON(ArrayMetadataEntryJson)
if (!is.null(ArrayMetadataEntryObject$`key`)) {
self$`key` <- ArrayMetadataEntryObject$`key`
}
if (!is.null(ArrayMetadataEntryObject$`type`)) {
self$`type` <- ArrayMetadataEntryObject$`type`
}
if (!is.null(ArrayMetadataEntryObject$`valueNum`)) {
self$`valueNum` <- ArrayMetadataEntryObject$`valueNum`
}
if (!is.null(ArrayMetadataEntryObject$`value`)) {
self$`value` <- ApiClient$new()$deserializeObj(ArrayMetadataEntryObject$`value`, "array[integer]", loadNamespace("tiledbcloud"))
}
if (!is.null(ArrayMetadataEntryObject$`del`)) {
self$`del` <- ArrayMetadataEntryObject$`del`
}
self
},
toJSONString = function() {
jsoncontent <- c(
if (!is.null(self$`key`)) {
sprintf(
'"key":
"%s"
',
self$`key`
)},
if (!is.null(self$`type`)) {
sprintf(
'"type":
"%s"
',
self$`type`
)},
if (!is.null(self$`valueNum`)) {
sprintf(
'"valueNum":
%d
',
self$`valueNum`
)},
if (!is.null(self$`value`)) {
sprintf(
'"value":
[%s]
',
paste(unlist(lapply(self$`value`, function(x) paste0('"', x, '"'))), collapse=",")
)},
if (!is.null(self$`del`)) {
sprintf(
'"del":
"%s"
',
self$`del`
)}
)
jsoncontent <- paste(jsoncontent, collapse = ",")
paste('{', jsoncontent, '}', sep = "")
},
fromJSONString = function(ArrayMetadataEntryJson) {
ArrayMetadataEntryObject <- jsonlite::fromJSON(ArrayMetadataEntryJson)
self$`key` <- ArrayMetadataEntryObject$`key`
self$`type` <- ArrayMetadataEntryObject$`type`
self$`valueNum` <- ArrayMetadataEntryObject$`valueNum`
self$`value` <- ApiClient$new()$deserializeObj(ArrayMetadataEntryObject$`value`, "array[integer]", loadNamespace("tiledbcloud"))
self$`del` <- ArrayMetadataEntryObject$`del`
self
}
)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.