# 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 MLModelFavorite
#'
#' @description MLModelFavorite Class
#'
#' @format An \code{R6Class} generator object
#'
#' @field mlmodel_uuid character [optional]
#'
#' @field namespace character [optional]
#'
#' @field name character [optional]
#'
#' @importFrom R6 R6Class
#' @importFrom jsonlite fromJSON toJSON
#' @export
MLModelFavorite <- R6::R6Class(
'MLModelFavorite',
public = list(
`mlmodel_uuid` = NULL,
`namespace` = NULL,
`name` = NULL,
initialize = function(
`mlmodel_uuid`=NULL, `namespace`=NULL, `name`=NULL, ...
) {
local.optional.var <- list(...)
if (!is.null(`mlmodel_uuid`)) {
stopifnot(is.character(`mlmodel_uuid`), length(`mlmodel_uuid`) == 1)
self$`mlmodel_uuid` <- `mlmodel_uuid`
}
if (!is.null(`namespace`)) {
stopifnot(is.character(`namespace`), length(`namespace`) == 1)
self$`namespace` <- `namespace`
}
if (!is.null(`name`)) {
stopifnot(is.character(`name`), length(`name`) == 1)
self$`name` <- `name`
}
},
toJSON = function() {
MLModelFavoriteObject <- list()
if (!is.null(self$`mlmodel_uuid`)) {
MLModelFavoriteObject[['mlmodel_uuid']] <-
self$`mlmodel_uuid`
}
if (!is.null(self$`namespace`)) {
MLModelFavoriteObject[['namespace']] <-
self$`namespace`
}
if (!is.null(self$`name`)) {
MLModelFavoriteObject[['name']] <-
self$`name`
}
MLModelFavoriteObject
},
fromJSON = function(MLModelFavoriteJson) {
MLModelFavoriteObject <- jsonlite::fromJSON(MLModelFavoriteJson)
if (!is.null(MLModelFavoriteObject$`mlmodel_uuid`)) {
self$`mlmodel_uuid` <- MLModelFavoriteObject$`mlmodel_uuid`
}
if (!is.null(MLModelFavoriteObject$`namespace`)) {
self$`namespace` <- MLModelFavoriteObject$`namespace`
}
if (!is.null(MLModelFavoriteObject$`name`)) {
self$`name` <- MLModelFavoriteObject$`name`
}
self
},
toJSONString = function() {
jsoncontent <- c(
if (!is.null(self$`mlmodel_uuid`)) {
sprintf(
'"mlmodel_uuid":
"%s"
',
self$`mlmodel_uuid`
)},
if (!is.null(self$`namespace`)) {
sprintf(
'"namespace":
"%s"
',
self$`namespace`
)},
if (!is.null(self$`name`)) {
sprintf(
'"name":
"%s"
',
self$`name`
)}
)
jsoncontent <- paste(jsoncontent, collapse = ",")
paste('{', jsoncontent, '}', sep = "")
},
fromJSONString = function(MLModelFavoriteJson) {
MLModelFavoriteObject <- jsonlite::fromJSON(MLModelFavoriteJson)
self$`mlmodel_uuid` <- MLModelFavoriteObject$`mlmodel_uuid`
self$`namespace` <- MLModelFavoriteObject$`namespace`
self$`name` <- MLModelFavoriteObject$`name`
self
}
)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.