# OpenSilex API
#
# No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
#
# OpenAPI spec version: 1.0.0-rc+2
#
# Generated by: https://github.com/swagger-api/swagger-codegen.git
#' ApiModulesInfo Class
#'
#' @field name
#' @field version
#'
#' @importFrom R6 R6Class
#' @importFrom jsonlite fromJSON toJSON
#' @export
ApiModulesInfo <- R6::R6Class(
'ApiModulesInfo',
public = list(
`name` = NULL,
`version` = NULL,
initialize = function(`name`, `version`){
if (!missing(`name`)) {
stopifnot(is.character(`name`), length(`name`) == 1)
self$`name` <- `name`
}
if (!missing(`version`)) {
stopifnot(is.character(`version`), length(`version`) == 1)
self$`version` <- `version`
}
},
toJSON = function() {
ApiModulesInfoObject <- list()
if (!is.null(self$`name`)) {
ApiModulesInfoObject[['name']] <- self$`name`
}
if (!is.null(self$`version`)) {
ApiModulesInfoObject[['version']] <- self$`version`
}
ApiModulesInfoObject
},
fromJSON = function(ApiModulesInfoJson) {
ApiModulesInfoObject <- jsonlite::fromJSON(ApiModulesInfoJson)
if (!is.null(ApiModulesInfoObject$`name`)) {
self$`name` <- ApiModulesInfoObject$`name`
}
if (!is.null(ApiModulesInfoObject$`version`)) {
self$`version` <- ApiModulesInfoObject$`version`
}
},
fromJSONObject = function(ApiModulesInfoObject) {
if (!is.null(ApiModulesInfoObject$`name`)) {
self$`name` <- ApiModulesInfoObject$`name`
}
if (!is.null(ApiModulesInfoObject$`version`)) {
self$`version` <- ApiModulesInfoObject$`version`
}
},
toJSONString = function() {
sprintf(
'{
"name": %s,
"version": %s
}',
ifelse(is.null(self$`name`), "null",jsonlite::toJSON(self$`name`,auto_unbox=TRUE, null = "null")),
ifelse(is.null(self$`version`), "null",jsonlite::toJSON(self$`version`,auto_unbox=TRUE, null = "null"))
)
},
fromJSONString = function(ApiModulesInfoJson) {
ApiModulesInfoObject <- jsonlite::fromJSON(ApiModulesInfoJson)
self$`name` <- ApiModulesInfoObject$`name`
self$`version` <- ApiModulesInfoObject$`version`
}
)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.