# FireCloud
#
# FireCloud API
#
# The version of the OpenAPI document: 0.1
#
# Generated by: https://openapi-generator.tech
#' @docType class
#' @title NewMethodConfigIngest
#'
#' @description NewMethodConfigIngest Class
#'
#' @format An \code{R6Class} generator object
#'
#' @field namespace character
#'
#' @field name character
#'
#' @field rootEntityType character
#'
#' @field inputs named list( character )
#'
#' @field outputs named list( character )
#'
#' @field prerequisites named list( character )
#'
#' @field methodRepoMethod named list( character )
#'
#' @field methodConfigVersion integer
#'
#' @field deleted character
#'
#' @importFrom R6 R6Class
#' @importFrom jsonlite fromJSON toJSON
#' @export
NewMethodConfigIngest <- R6::R6Class(
'NewMethodConfigIngest',
public = list(
`namespace` = NULL,
`name` = NULL,
`rootEntityType` = NULL,
`inputs` = NULL,
`outputs` = NULL,
`prerequisites` = NULL,
`methodRepoMethod` = NULL,
`methodConfigVersion` = NULL,
`deleted` = NULL,
initialize = function(
`namespace`, `name`, `rootEntityType`, `inputs`, `outputs`, `prerequisites`, `methodRepoMethod`, `methodConfigVersion`, `deleted`, ...
) {
local.optional.var <- list(...)
if (!missing(`namespace`)) {
stopifnot(is.character(`namespace`), length(`namespace`) == 1)
self$`namespace` <- `namespace`
}
if (!missing(`name`)) {
stopifnot(is.character(`name`), length(`name`) == 1)
self$`name` <- `name`
}
if (!missing(`rootEntityType`)) {
stopifnot(is.character(`rootEntityType`), length(`rootEntityType`) == 1)
self$`rootEntityType` <- `rootEntityType`
}
if (!missing(`inputs`)) {
stopifnot(is.vector(`inputs`), length(`inputs`) != 0)
sapply(`inputs`, function(x) stopifnot(is.character(x)))
self$`inputs` <- `inputs`
}
if (!missing(`outputs`)) {
stopifnot(is.vector(`outputs`), length(`outputs`) != 0)
sapply(`outputs`, function(x) stopifnot(is.character(x)))
self$`outputs` <- `outputs`
}
if (!missing(`prerequisites`)) {
stopifnot(is.vector(`prerequisites`), length(`prerequisites`) != 0)
sapply(`prerequisites`, function(x) stopifnot(is.character(x)))
self$`prerequisites` <- `prerequisites`
}
if (!missing(`methodRepoMethod`)) {
stopifnot(is.vector(`methodRepoMethod`), length(`methodRepoMethod`) != 0)
sapply(`methodRepoMethod`, function(x) stopifnot(is.character(x)))
self$`methodRepoMethod` <- `methodRepoMethod`
}
if (!missing(`methodConfigVersion`)) {
stopifnot(is.numeric(`methodConfigVersion`), length(`methodConfigVersion`) == 1)
self$`methodConfigVersion` <- `methodConfigVersion`
}
if (!missing(`deleted`)) {
self$`deleted` <- `deleted`
}
},
toJSON = function() {
NewMethodConfigIngestObject <- list()
if (!is.null(self$`namespace`)) {
NewMethodConfigIngestObject[['namespace']] <-
self$`namespace`
}
if (!is.null(self$`name`)) {
NewMethodConfigIngestObject[['name']] <-
self$`name`
}
if (!is.null(self$`rootEntityType`)) {
NewMethodConfigIngestObject[['rootEntityType']] <-
self$`rootEntityType`
}
if (!is.null(self$`inputs`)) {
NewMethodConfigIngestObject[['inputs']] <-
self$`inputs`
}
if (!is.null(self$`outputs`)) {
NewMethodConfigIngestObject[['outputs']] <-
self$`outputs`
}
if (!is.null(self$`prerequisites`)) {
NewMethodConfigIngestObject[['prerequisites']] <-
self$`prerequisites`
}
if (!is.null(self$`methodRepoMethod`)) {
NewMethodConfigIngestObject[['methodRepoMethod']] <-
self$`methodRepoMethod`
}
if (!is.null(self$`methodConfigVersion`)) {
NewMethodConfigIngestObject[['methodConfigVersion']] <-
self$`methodConfigVersion`
}
if (!is.null(self$`deleted`)) {
NewMethodConfigIngestObject[['deleted']] <-
self$`deleted`
}
NewMethodConfigIngestObject
},
fromJSON = function(NewMethodConfigIngestJson) {
NewMethodConfigIngestObject <- jsonlite::fromJSON(NewMethodConfigIngestJson)
if (!is.null(NewMethodConfigIngestObject$`namespace`)) {
self$`namespace` <- NewMethodConfigIngestObject$`namespace`
}
if (!is.null(NewMethodConfigIngestObject$`name`)) {
self$`name` <- NewMethodConfigIngestObject$`name`
}
if (!is.null(NewMethodConfigIngestObject$`rootEntityType`)) {
self$`rootEntityType` <- NewMethodConfigIngestObject$`rootEntityType`
}
if (!is.null(NewMethodConfigIngestObject$`inputs`)) {
self$`inputs` <- ApiClient$new()$deserializeObj(NewMethodConfigIngestObject$`inputs`, "map(character)", loadNamespace("openapi"))
}
if (!is.null(NewMethodConfigIngestObject$`outputs`)) {
self$`outputs` <- ApiClient$new()$deserializeObj(NewMethodConfigIngestObject$`outputs`, "map(character)", loadNamespace("openapi"))
}
if (!is.null(NewMethodConfigIngestObject$`prerequisites`)) {
self$`prerequisites` <- ApiClient$new()$deserializeObj(NewMethodConfigIngestObject$`prerequisites`, "map(character)", loadNamespace("openapi"))
}
if (!is.null(NewMethodConfigIngestObject$`methodRepoMethod`)) {
self$`methodRepoMethod` <- ApiClient$new()$deserializeObj(NewMethodConfigIngestObject$`methodRepoMethod`, "map(character)", loadNamespace("openapi"))
}
if (!is.null(NewMethodConfigIngestObject$`methodConfigVersion`)) {
self$`methodConfigVersion` <- NewMethodConfigIngestObject$`methodConfigVersion`
}
if (!is.null(NewMethodConfigIngestObject$`deleted`)) {
self$`deleted` <- NewMethodConfigIngestObject$`deleted`
}
self
},
toJSONString = function() {
jsoncontent <- c(
if (!is.null(self$`namespace`)) {
sprintf(
'"namespace":
"%s"
',
self$`namespace`
)},
if (!is.null(self$`name`)) {
sprintf(
'"name":
"%s"
',
self$`name`
)},
if (!is.null(self$`rootEntityType`)) {
sprintf(
'"rootEntityType":
"%s"
',
self$`rootEntityType`
)},
if (!is.null(self$`inputs`)) {
sprintf(
'"inputs":
"%s"
',
jsonlite::toJSON(lapply(self$`inputs`, function(x){ x }), auto_unbox = TRUE, digits=NA)
)},
if (!is.null(self$`outputs`)) {
sprintf(
'"outputs":
"%s"
',
jsonlite::toJSON(lapply(self$`outputs`, function(x){ x }), auto_unbox = TRUE, digits=NA)
)},
if (!is.null(self$`prerequisites`)) {
sprintf(
'"prerequisites":
"%s"
',
jsonlite::toJSON(lapply(self$`prerequisites`, function(x){ x }), auto_unbox = TRUE, digits=NA)
)},
if (!is.null(self$`methodRepoMethod`)) {
sprintf(
'"methodRepoMethod":
"%s"
',
jsonlite::toJSON(lapply(self$`methodRepoMethod`, function(x){ x }), auto_unbox = TRUE, digits=NA)
)},
if (!is.null(self$`methodConfigVersion`)) {
sprintf(
'"methodConfigVersion":
%d
',
self$`methodConfigVersion`
)},
if (!is.null(self$`deleted`)) {
sprintf(
'"deleted":
"%s"
',
self$`deleted`
)}
)
jsoncontent <- paste(jsoncontent, collapse = ",")
paste('{', jsoncontent, '}', sep = "")
},
fromJSONString = function(NewMethodConfigIngestJson) {
NewMethodConfigIngestObject <- jsonlite::fromJSON(NewMethodConfigIngestJson)
self$`namespace` <- NewMethodConfigIngestObject$`namespace`
self$`name` <- NewMethodConfigIngestObject$`name`
self$`rootEntityType` <- NewMethodConfigIngestObject$`rootEntityType`
self$`inputs` <- ApiClient$new()$deserializeObj(NewMethodConfigIngestObject$`inputs`, "map(character)", loadNamespace("openapi"))
self$`outputs` <- ApiClient$new()$deserializeObj(NewMethodConfigIngestObject$`outputs`, "map(character)", loadNamespace("openapi"))
self$`prerequisites` <- ApiClient$new()$deserializeObj(NewMethodConfigIngestObject$`prerequisites`, "map(character)", loadNamespace("openapi"))
self$`methodRepoMethod` <- ApiClient$new()$deserializeObj(NewMethodConfigIngestObject$`methodRepoMethod`, "map(character)", loadNamespace("openapi"))
self$`methodConfigVersion` <- NewMethodConfigIngestObject$`methodConfigVersion`
self$`deleted` <- NewMethodConfigIngestObject$`deleted`
self
}
)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.