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