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