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