# 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 UDFInfoUpdate
#'
#' @description UDFInfoUpdate Class
#'
#' @format An \code{R6Class} generator object
#'
#' @field name character [optional]
#'
#' @field language \link{UDFLanguage} [optional]
#'
#' @field version character [optional]
#'
#' @field image_name character [optional]
#'
#' @field type \link{UDFType} [optional]
#'
#' @field exec character [optional]
#'
#' @field exec_raw character [optional]
#'
#' @field readme character [optional]
#'
#' @field license_id character [optional]
#'
#' @field license_text character [optional]
#'
#' @field tags list( character ) [optional]
#'
#' @importFrom R6 R6Class
#' @importFrom jsonlite fromJSON toJSON
#' @export
UDFInfoUpdate <- R6::R6Class(
'UDFInfoUpdate',
public = list(
`name` = NULL,
`language` = NULL,
`version` = NULL,
`image_name` = NULL,
`type` = NULL,
`exec` = NULL,
`exec_raw` = NULL,
`readme` = NULL,
`license_id` = NULL,
`license_text` = NULL,
`tags` = NULL,
initialize = function(
`name`=NULL, `language`=NULL, `version`=NULL, `image_name`=NULL, `type`=NULL, `exec`=NULL, `exec_raw`=NULL, `readme`=NULL, `license_id`=NULL, `license_text`=NULL, `tags`=NULL, ...
) {
local.optional.var <- list(...)
if (!is.null(`name`)) {
stopifnot(is.character(`name`), length(`name`) == 1)
self$`name` <- `name`
}
if (!is.null(`language`)) {
stopifnot(R6::is.R6(`language`))
self$`language` <- `language`
}
if (!is.null(`version`)) {
stopifnot(is.character(`version`), length(`version`) == 1)
self$`version` <- `version`
}
if (!is.null(`image_name`)) {
stopifnot(is.character(`image_name`), length(`image_name`) == 1)
self$`image_name` <- `image_name`
}
if (!is.null(`type`)) {
stopifnot(R6::is.R6(`type`))
self$`type` <- `type`
}
if (!is.null(`exec`)) {
stopifnot(is.character(`exec`), length(`exec`) == 1)
self$`exec` <- `exec`
}
if (!is.null(`exec_raw`)) {
stopifnot(is.character(`exec_raw`), length(`exec_raw`) == 1)
self$`exec_raw` <- `exec_raw`
}
if (!is.null(`readme`)) {
stopifnot(is.character(`readme`), length(`readme`) == 1)
self$`readme` <- `readme`
}
if (!is.null(`license_id`)) {
stopifnot(is.character(`license_id`), length(`license_id`) == 1)
self$`license_id` <- `license_id`
}
if (!is.null(`license_text`)) {
stopifnot(is.character(`license_text`), length(`license_text`) == 1)
self$`license_text` <- `license_text`
}
if (!is.null(`tags`)) {
stopifnot(is.vector(`tags`), length(`tags`) != 0)
sapply(`tags`, function(x) stopifnot(is.character(x)))
self$`tags` <- `tags`
}
},
toJSON = function() {
UDFInfoUpdateObject <- list()
if (!is.null(self$`name`)) {
UDFInfoUpdateObject[['name']] <-
self$`name`
}
if (!is.null(self$`language`)) {
UDFInfoUpdateObject[['language']] <-
self$`language`$toJSON()
}
if (!is.null(self$`version`)) {
UDFInfoUpdateObject[['version']] <-
self$`version`
}
if (!is.null(self$`image_name`)) {
UDFInfoUpdateObject[['image_name']] <-
self$`image_name`
}
if (!is.null(self$`type`)) {
UDFInfoUpdateObject[['type']] <-
self$`type`$toJSON()
}
if (!is.null(self$`exec`)) {
UDFInfoUpdateObject[['exec']] <-
self$`exec`
}
if (!is.null(self$`exec_raw`)) {
UDFInfoUpdateObject[['exec_raw']] <-
self$`exec_raw`
}
if (!is.null(self$`readme`)) {
UDFInfoUpdateObject[['readme']] <-
self$`readme`
}
if (!is.null(self$`license_id`)) {
UDFInfoUpdateObject[['license_id']] <-
self$`license_id`
}
if (!is.null(self$`license_text`)) {
UDFInfoUpdateObject[['license_text']] <-
self$`license_text`
}
if (!is.null(self$`tags`)) {
UDFInfoUpdateObject[['tags']] <-
self$`tags`
}
UDFInfoUpdateObject
},
fromJSON = function(UDFInfoUpdateJson) {
UDFInfoUpdateObject <- jsonlite::fromJSON(UDFInfoUpdateJson)
if (!is.null(UDFInfoUpdateObject$`name`)) {
self$`name` <- UDFInfoUpdateObject$`name`
}
if (!is.null(UDFInfoUpdateObject$`language`)) {
# MANUAL EDIT AFTER OPENAPI AUTOGEN
# For enums, OpenAPI autogen (1) generates a constructor which requires being called
# with one arguent; (2) generates callsites (such as here) that calls that constructor
# with zero arguments.
#
#languageObject <- UDFLanguage$new()
#languageObject$fromJSON(jsonlite::toJSON(UDFInfoUpdateObject$language, auto_unbox = TRUE, digits = NA))
languageObject <- UDFLanguage$new(UDFInfoUpdateObject$language)
self$`language` <- languageObject
}
if (!is.null(UDFInfoUpdateObject$`version`)) {
self$`version` <- UDFInfoUpdateObject$`version`
}
if (!is.null(UDFInfoUpdateObject$`image_name`)) {
self$`image_name` <- UDFInfoUpdateObject$`image_name`
}
if (!is.null(UDFInfoUpdateObject$`type`)) {
# MANUAL EDIT AFTER OPENAPI AUTOGEN
# For enums, OpenAPI autogen (1) generates a constructor which requires being called
# with one arguent; (2) generates callsites (such as here) that calls that constructor
# with zero arguments.
#
#typeObject <- UDFType$new()
#typeObject$fromJSON(jsonlite::toJSON(UDFInfoUpdateObject$type, auto_unbox = TRUE, digits = NA))
typeObject <- UDFType$new(UDFInfoUpdateObject$type)
self$`type` <- typeObject
}
if (!is.null(UDFInfoUpdateObject$`exec`)) {
self$`exec` <- UDFInfoUpdateObject$`exec`
}
if (!is.null(UDFInfoUpdateObject$`exec_raw`)) {
self$`exec_raw` <- UDFInfoUpdateObject$`exec_raw`
}
if (!is.null(UDFInfoUpdateObject$`readme`)) {
self$`readme` <- UDFInfoUpdateObject$`readme`
}
if (!is.null(UDFInfoUpdateObject$`license_id`)) {
self$`license_id` <- UDFInfoUpdateObject$`license_id`
}
if (!is.null(UDFInfoUpdateObject$`license_text`)) {
self$`license_text` <- UDFInfoUpdateObject$`license_text`
}
if (!is.null(UDFInfoUpdateObject$`tags`)) {
self$`tags` <- ApiClient$new()$deserializeObj(UDFInfoUpdateObject$`tags`, "array[character]", loadNamespace("tiledbcloud"))
}
self
},
toJSONString = function() {
jsoncontent <- c(
if (!is.null(self$`name`)) {
sprintf(
'"name":
"%s"
',
self$`name`
)},
if (!is.null(self$`language`)) {
sprintf(
'"language":
%s
',
jsonlite::toJSON(self$`language`$toJSON(), auto_unbox=TRUE, digits = NA)
)},
if (!is.null(self$`version`)) {
sprintf(
'"version":
"%s"
',
self$`version`
)},
if (!is.null(self$`image_name`)) {
sprintf(
'"image_name":
"%s"
',
self$`image_name`
)},
if (!is.null(self$`type`)) {
sprintf(
'"type":
%s
',
jsonlite::toJSON(self$`type`$toJSON(), auto_unbox=TRUE, digits = NA)
)},
if (!is.null(self$`exec`)) {
sprintf(
'"exec":
"%s"
',
self$`exec`
)},
if (!is.null(self$`exec_raw`)) {
sprintf(
'"exec_raw":
%s
',
# MANUAL EDIT AFTER OPENAPI AUTOGEN: needs toJSON here to escape any double quotes inside
# the string, e.g. 'it is "ok" with me' -> "it is \"ok\" with me". Needs auto_unbox, else
# we get ["it is \"ok\" with me"] (note the [...]).
jsonlite::toJSON(self$exec_raw, auto_unbox=TRUE)
)},
if (!is.null(self$`readme`)) {
sprintf(
'"readme":
"%s"
',
self$`readme`
)},
if (!is.null(self$`license_id`)) {
sprintf(
'"license_id":
"%s"
',
self$`license_id`
)},
if (!is.null(self$`license_text`)) {
sprintf(
'"license_text":
"%s"
',
self$`license_text`
)},
if (!is.null(self$`tags`)) {
sprintf(
'"tags":
[%s]
',
paste(unlist(lapply(self$`tags`, function(x) paste0('"', x, '"'))), collapse=",")
)}
)
jsoncontent <- paste(jsoncontent, collapse = ",")
paste('{', jsoncontent, '}', sep = "")
},
fromJSONString = function(UDFInfoUpdateJson) {
UDFInfoUpdateObject <- jsonlite::fromJSON(UDFInfoUpdateJson)
self$`name` <- UDFInfoUpdateObject$`name`
self$`language` <- UDFLanguage$new()$fromJSON(jsonlite::toJSON(UDFInfoUpdateObject$language, auto_unbox = TRUE, digits = NA))
self$`version` <- UDFInfoUpdateObject$`version`
self$`image_name` <- UDFInfoUpdateObject$`image_name`
self$`type` <- UDFType$new()$fromJSON(jsonlite::toJSON(UDFInfoUpdateObject$type, auto_unbox = TRUE, digits = NA))
self$`exec` <- UDFInfoUpdateObject$`exec`
self$`exec_raw` <- UDFInfoUpdateObject$`exec_raw`
self$`readme` <- UDFInfoUpdateObject$`readme`
self$`license_id` <- UDFInfoUpdateObject$`license_id`
self$`license_text` <- UDFInfoUpdateObject$`license_text`
self$`tags` <- ApiClient$new()$deserializeObj(UDFInfoUpdateObject$`tags`, "array[character]", loadNamespace("tiledbcloud"))
self
}
)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.