# 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
#' DLFrameworkProject Class
#'
#' @field user
#' @field name
#' @field images
#'
#' @importFrom R6 R6Class
#' @importFrom jsonlite fromJSON toJSON
#' @export
DLFrameworkProject <- R6::R6Class(
'DLFrameworkProject',
public = list(
`user` = NULL,
`name` = NULL,
`images` = NULL,
initialize = function(`user`, `name`, `images`){
if (!missing(`user`)) {
stopifnot(is.character(`user`), length(`user`) == 1)
self$`user` <- `user`
}
if (!missing(`name`)) {
stopifnot(is.character(`name`), length(`name`) == 1)
self$`name` <- `name`
}
if (!missing(`images`)) {
stopifnot(is.list(`images`), length(`images`) != 0)
lapply(`images`, function(x) stopifnot(is.character(x)))
self$`images` <- `images`
}
},
toJSON = function() {
DLFrameworkProjectObject <- list()
if (!is.null(self$`user`)) {
DLFrameworkProjectObject[['user']] <- self$`user`
}
if (!is.null(self$`name`)) {
DLFrameworkProjectObject[['name']] <- self$`name`
}
if (!is.null(self$`images`)) {
DLFrameworkProjectObject[['images']] <- self$`images`
}
DLFrameworkProjectObject
},
fromJSON = function(DLFrameworkProjectJson) {
DLFrameworkProjectObject <- jsonlite::fromJSON(DLFrameworkProjectJson)
if (!is.null(DLFrameworkProjectObject$`user`)) {
self$`user` <- DLFrameworkProjectObject$`user`
}
if (!is.null(DLFrameworkProjectObject$`name`)) {
self$`name` <- DLFrameworkProjectObject$`name`
}
if (!is.null(DLFrameworkProjectObject$`images`)) {
self$`images` <- DLFrameworkProjectObject$`images`
}
},
toJSONString = function() {
sprintf(
'{
"user": %s,
"name": %s,
"images": [%s]
}',
self$`user`,
self$`name`,
lapply(self$`images`, function(x) paste(paste0('"', x, '"'), sep=","))
)
},
fromJSONString = function(DLFrameworkProjectJson) {
DLFrameworkProjectObject <- jsonlite::fromJSON(DLFrameworkProjectJson)
self$`user` <- DLFrameworkProjectObject$`user`
self$`name` <- DLFrameworkProjectObject$`name`
self$`images` <- DLFrameworkProjectObject$`images`
}
)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.