# 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
#' DkubeInfo Class
#'
#' @field version
#' @field platform
#' @field CICD
#' @field license
#' @field release
#' @field auth
#' @field rdma
#' @field frameworks
#' @field model_catalog_enabled
#' @field tensorflow
#'
#' @importFrom R6 R6Class
#' @importFrom jsonlite fromJSON toJSON
#' @export
DkubeInfo <- R6::R6Class(
'DkubeInfo',
public = list(
`version` = NULL,
`platform` = NULL,
`CICD` = NULL,
`license` = NULL,
`release` = NULL,
`auth` = NULL,
`rdma` = NULL,
`frameworks` = NULL,
`model_catalog_enabled` = NULL,
`tensorflow` = NULL,
initialize = function(`version`, `platform`, `CICD`, `license`, `release`, `auth`, `rdma`, `frameworks`, `model_catalog_enabled`, `tensorflow`){
if (!missing(`version`)) {
stopifnot(is.character(`version`), length(`version`) == 1)
self$`version` <- `version`
}
if (!missing(`platform`)) {
stopifnot(is.character(`platform`), length(`platform`) == 1)
self$`platform` <- `platform`
}
if (!missing(`CICD`)) {
stopifnot(R6::is.R6(`CICD`))
self$`CICD` <- `CICD`
}
if (!missing(`license`)) {
stopifnot(R6::is.R6(`license`))
self$`license` <- `license`
}
if (!missing(`release`)) {
stopifnot(R6::is.R6(`release`))
self$`release` <- `release`
}
if (!missing(`auth`)) {
stopifnot(R6::is.R6(`auth`))
self$`auth` <- `auth`
}
if (!missing(`rdma`)) {
self$`rdma` <- `rdma`
}
if (!missing(`frameworks`)) {
stopifnot(is.list(`frameworks`), length(`frameworks`) != 0)
lapply(`frameworks`, function(x) stopifnot(is.character(x)))
self$`frameworks` <- `frameworks`
}
if (!missing(`model_catalog_enabled`)) {
self$`model_catalog_enabled` <- `model_catalog_enabled`
}
if (!missing(`tensorflow`)) {
stopifnot(R6::is.R6(`tensorflow`))
self$`tensorflow` <- `tensorflow`
}
},
toJSON = function() {
DkubeInfoObject <- list()
if (!is.null(self$`version`)) {
DkubeInfoObject[['version']] <- self$`version`
}
if (!is.null(self$`platform`)) {
DkubeInfoObject[['platform']] <- self$`platform`
}
if (!is.null(self$`CICD`)) {
DkubeInfoObject[['CICD']] <- self$`CICD`$toJSON()
}
if (!is.null(self$`license`)) {
DkubeInfoObject[['license']] <- self$`license`$toJSON()
}
if (!is.null(self$`release`)) {
DkubeInfoObject[['release']] <- self$`release`$toJSON()
}
if (!is.null(self$`auth`)) {
DkubeInfoObject[['auth']] <- self$`auth`$toJSON()
}
if (!is.null(self$`rdma`)) {
DkubeInfoObject[['rdma']] <- self$`rdma`
}
if (!is.null(self$`frameworks`)) {
DkubeInfoObject[['frameworks']] <- self$`frameworks`
}
if (!is.null(self$`model_catalog_enabled`)) {
DkubeInfoObject[['model_catalog_enabled']] <- self$`model_catalog_enabled`
}
if (!is.null(self$`tensorflow`)) {
DkubeInfoObject[['tensorflow']] <- self$`tensorflow`$toJSON()
}
DkubeInfoObject
},
fromJSON = function(DkubeInfoJson) {
DkubeInfoObject <- jsonlite::fromJSON(DkubeInfoJson)
if (!is.null(DkubeInfoObject$`version`)) {
self$`version` <- DkubeInfoObject$`version`
}
if (!is.null(DkubeInfoObject$`platform`)) {
self$`platform` <- DkubeInfoObject$`platform`
}
if (!is.null(DkubeInfoObject$`CICD`)) {
CICDObject <- DkubeInfoCICD$new()
CICDObject$fromJSON(jsonlite::toJSON(DkubeInfoObject$CICD, auto_unbox = TRUE))
self$`CICD` <- CICDObject
}
if (!is.null(DkubeInfoObject$`license`)) {
licenseObject <- DkubeInfoLicense$new()
licenseObject$fromJSON(jsonlite::toJSON(DkubeInfoObject$license, auto_unbox = TRUE))
self$`license` <- licenseObject
}
if (!is.null(DkubeInfoObject$`release`)) {
releaseObject <- DkubeInfoRelease$new()
releaseObject$fromJSON(jsonlite::toJSON(DkubeInfoObject$release, auto_unbox = TRUE))
self$`release` <- releaseObject
}
if (!is.null(DkubeInfoObject$`auth`)) {
authObject <- AuthModel$new()
authObject$fromJSON(jsonlite::toJSON(DkubeInfoObject$auth, auto_unbox = TRUE))
self$`auth` <- authObject
}
if (!is.null(DkubeInfoObject$`rdma`)) {
self$`rdma` <- DkubeInfoObject$`rdma`
}
if (!is.null(DkubeInfoObject$`frameworks`)) {
self$`frameworks` <- DkubeInfoObject$`frameworks`
}
if (!is.null(DkubeInfoObject$`model_catalog_enabled`)) {
self$`model_catalog_enabled` <- DkubeInfoObject$`model_catalog_enabled`
}
if (!is.null(DkubeInfoObject$`tensorflow`)) {
tensorflowObject <- DLSupportTensorflow$new()
tensorflowObject$fromJSON(jsonlite::toJSON(DkubeInfoObject$tensorflow, auto_unbox = TRUE))
self$`tensorflow` <- tensorflowObject
}
},
toJSONString = function() {
sprintf(
'{
"version": %s,
"platform": %s,
"CICD": %s,
"license": %s,
"release": %s,
"auth": %s,
"rdma": %s,
"frameworks": [%s],
"model_catalog_enabled": %s,
"tensorflow": %s
}',
self$`version`,
self$`platform`,
self$`CICD`$toJSON(),
self$`license`$toJSON(),
self$`release`$toJSON(),
self$`auth`$toJSON(),
self$`rdma`,
lapply(self$`frameworks`, function(x) paste(paste0('"', x, '"'), sep=",")),
self$`model_catalog_enabled`,
self$`tensorflow`$toJSON()
)
},
fromJSONString = function(DkubeInfoJson) {
DkubeInfoObject <- jsonlite::fromJSON(DkubeInfoJson)
self$`version` <- DkubeInfoObject$`version`
self$`platform` <- DkubeInfoObject$`platform`
DkubeInfoCICDObject <- DkubeInfoCICD$new()
self$`CICD` <- DkubeInfoCICDObject$fromJSON(jsonlite::toJSON(DkubeInfoObject$CICD, auto_unbox = TRUE))
DkubeInfoLicenseObject <- DkubeInfoLicense$new()
self$`license` <- DkubeInfoLicenseObject$fromJSON(jsonlite::toJSON(DkubeInfoObject$license, auto_unbox = TRUE))
DkubeInfoReleaseObject <- DkubeInfoRelease$new()
self$`release` <- DkubeInfoReleaseObject$fromJSON(jsonlite::toJSON(DkubeInfoObject$release, auto_unbox = TRUE))
AuthModelObject <- AuthModel$new()
self$`auth` <- AuthModelObject$fromJSON(jsonlite::toJSON(DkubeInfoObject$auth, auto_unbox = TRUE))
self$`rdma` <- DkubeInfoObject$`rdma`
self$`frameworks` <- DkubeInfoObject$`frameworks`
self$`model_catalog_enabled` <- DkubeInfoObject$`model_catalog_enabled`
DLSupportTensorflowObject <- DLSupportTensorflow$new()
self$`tensorflow` <- DLSupportTensorflowObject$fromJSON(jsonlite::toJSON(DkubeInfoObject$tensorflow, auto_unbox = TRUE))
}
)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.