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