# Dkube api server
#
# No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
#
# OpenAPI spec version: 2.2.1.11
#
# Generated by: https://github.com/swagger-api/swagger-codegen.git
#' Data16 Class
#'
#' @field name
#' @field description
#' @field serving
#'
#' @importFrom R6 R6Class
#' @importFrom jsonlite fromJSON toJSON
#' @export
Data16 <- R6::R6Class(
'Data16',
public = list(
`name` = NULL,
`description` = NULL,
`serving` = NULL,
initialize = function(`name`, `description`, `serving`){
if (!missing(`name`)) {
stopifnot(is.character(`name`), length(`name`) == 1)
self$`name` <- `name`
}
if (!missing(`description`)) {
stopifnot(is.character(`description`), length(`description`) == 1)
self$`description` <- `description`
}
if (!missing(`serving`)) {
stopifnot(R6::is.R6(`serving`))
self$`serving` <- `serving`
}
},
toJSON = function() {
Data16Object <- list()
if (!is.null(self$`name`)) {
Data16Object[['name']] <- self$`name`
}
if (!is.null(self$`description`)) {
Data16Object[['description']] <- self$`description`
}
if (!is.null(self$`serving`)) {
Data16Object[['serving']] <- self$`serving`$toJSON()
}
Data16Object
},
fromJSON = function(Data16Json) {
Data16Object <- jsonlite::fromJSON(Data16Json)
if (!is.null(Data16Object$`name`)) {
self$`name` <- Data16Object$`name`
}
if (!is.null(Data16Object$`description`)) {
self$`description` <- Data16Object$`description`
}
if (!is.null(Data16Object$`serving`)) {
servingObject <- InferenceJobModel$new()
servingObject$fromJSON(jsonlite::toJSON(Data16Object$serving, auto_unbox = TRUE))
self$`serving` <- servingObject
}
},
toJSONString = function() {
sprintf(
'{
"name": %s,
"description": %s,
"serving": %s
}',
self$`name`,
self$`description`,
self$`serving`$toJSON()
)
},
fromJSONString = function(Data16Json) {
Data16Object <- jsonlite::fromJSON(Data16Json)
self$`name` <- Data16Object$`name`
self$`description` <- Data16Object$`description`
InferenceJobModelObject <- InferenceJobModel$new()
self$`serving` <- InferenceJobModelObject$fromJSON(jsonlite::toJSON(Data16Object$serving, auto_unbox = TRUE))
}
)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.