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