# 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
#' Counters Class
#'
#' @field active
#' @field total
#' @field failed
#' @field complete
#'
#' @importFrom R6 R6Class
#' @importFrom jsonlite fromJSON toJSON
#' @export
Counters <- R6::R6Class(
'Counters',
public = list(
`active` = NULL,
`total` = NULL,
`failed` = NULL,
`complete` = NULL,
initialize = function(`active`, `total`, `failed`, `complete`){
if (!missing(`active`)) {
stopifnot(is.character(`active`), length(`active`) == 1)
self$`active` <- `active`
}
if (!missing(`total`)) {
stopifnot(is.character(`total`), length(`total`) == 1)
self$`total` <- `total`
}
if (!missing(`failed`)) {
stopifnot(is.character(`failed`), length(`failed`) == 1)
self$`failed` <- `failed`
}
if (!missing(`complete`)) {
stopifnot(is.character(`complete`), length(`complete`) == 1)
self$`complete` <- `complete`
}
},
toJSON = function() {
CountersObject <- list()
if (!is.null(self$`active`)) {
CountersObject[['active']] <- self$`active`
}
if (!is.null(self$`total`)) {
CountersObject[['total']] <- self$`total`
}
if (!is.null(self$`failed`)) {
CountersObject[['failed']] <- self$`failed`
}
if (!is.null(self$`complete`)) {
CountersObject[['complete']] <- self$`complete`
}
CountersObject
},
fromJSON = function(CountersJson) {
CountersObject <- jsonlite::fromJSON(CountersJson)
if (!is.null(CountersObject$`active`)) {
self$`active` <- CountersObject$`active`
}
if (!is.null(CountersObject$`total`)) {
self$`total` <- CountersObject$`total`
}
if (!is.null(CountersObject$`failed`)) {
self$`failed` <- CountersObject$`failed`
}
if (!is.null(CountersObject$`complete`)) {
self$`complete` <- CountersObject$`complete`
}
},
toJSONString = function() {
sprintf(
'{
"active": %s,
"total": %s,
"failed": %s,
"complete": %s
}',
self$`active`,
self$`total`,
self$`failed`,
self$`complete`
)
},
fromJSONString = function(CountersJson) {
CountersObject <- jsonlite::fromJSON(CountersJson)
self$`active` <- CountersObject$`active`
self$`total` <- CountersObject$`total`
self$`failed` <- CountersObject$`failed`
self$`complete` <- CountersObject$`complete`
}
)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.