# 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
#' PreprocessingJobModelExecutor Class
#'
#' @field choice
#' @field buildfromproject
#' @field custom
#'
#' @importFrom R6 R6Class
#' @importFrom jsonlite fromJSON toJSON
#' @export
PreprocessingJobModelExecutor <- R6::R6Class(
'PreprocessingJobModelExecutor',
public = list(
`choice` = NULL,
`buildfromproject` = NULL,
`custom` = NULL,
initialize = function(`choice`, `buildfromproject`, `custom`){
if (!missing(`choice`)) {
stopifnot(is.character(`choice`), length(`choice`) == 1)
self$`choice` <- `choice`
}
if (!missing(`buildfromproject`)) {
self$`buildfromproject` <- `buildfromproject`
}
if (!missing(`custom`)) {
stopifnot(R6::is.R6(`custom`))
self$`custom` <- `custom`
}
},
toJSON = function() {
PreprocessingJobModelExecutorObject <- list()
if (!is.null(self$`choice`)) {
PreprocessingJobModelExecutorObject[['choice']] <- self$`choice`
}
if (!is.null(self$`buildfromproject`)) {
PreprocessingJobModelExecutorObject[['buildfromproject']] <- self$`buildfromproject`
}
if (!is.null(self$`custom`)) {
PreprocessingJobModelExecutorObject[['custom']] <- self$`custom`$toJSON()
}
PreprocessingJobModelExecutorObject
},
fromJSON = function(PreprocessingJobModelExecutorJson) {
PreprocessingJobModelExecutorObject <- jsonlite::fromJSON(PreprocessingJobModelExecutorJson)
if (!is.null(PreprocessingJobModelExecutorObject$`choice`)) {
self$`choice` <- PreprocessingJobModelExecutorObject$`choice`
}
if (!is.null(PreprocessingJobModelExecutorObject$`buildfromproject`)) {
self$`buildfromproject` <- PreprocessingJobModelExecutorObject$`buildfromproject`
}
if (!is.null(PreprocessingJobModelExecutorObject$`custom`)) {
customObject <- CustomContainerModel$new()
customObject$fromJSON(jsonlite::toJSON(PreprocessingJobModelExecutorObject$custom, auto_unbox = TRUE))
self$`custom` <- customObject
}
},
toJSONString = function() {
sprintf(
'{
"choice": %s,
"buildfromproject": %s,
"custom": %s
}',
self$`choice`,
self$`buildfromproject`,
self$`custom`$toJSON()
)
},
fromJSONString = function(PreprocessingJobModelExecutorJson) {
PreprocessingJobModelExecutorObject <- jsonlite::fromJSON(PreprocessingJobModelExecutorJson)
self$`choice` <- PreprocessingJobModelExecutorObject$`choice`
self$`buildfromproject` <- PreprocessingJobModelExecutorObject$`buildfromproject`
CustomContainerModelObject <- CustomContainerModel$new()
self$`custom` <- CustomContainerModelObject$fromJSON(jsonlite::toJSON(PreprocessingJobModelExecutorObject$custom, auto_unbox = TRUE))
}
)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.