# sunagriAPI
#
# An instance of OpenSILEX WebService
#
# OpenAPI spec version: 3.3.0
#
# Generated by: https://github.com/swagger-api/swagger-codegen.git
#' WasGeneratedByDTO Class
#'
#' @field wasGeneratedByDocument
#' @field wasGeneratedByDescription
#'
#' @importFrom R6 R6Class
#' @importFrom jsonlite fromJSON toJSON
#' @export
WasGeneratedByDTO <- R6::R6Class(
'WasGeneratedByDTO',
public = list(
`wasGeneratedByDocument` = NULL,
`wasGeneratedByDescription` = NULL,
initialize = function(`wasGeneratedByDocument`, `wasGeneratedByDescription`){
if (!missing(`wasGeneratedByDocument`)) {
stopifnot(is.character(`wasGeneratedByDocument`), length(`wasGeneratedByDocument`) == 1)
self$`wasGeneratedByDocument` <- `wasGeneratedByDocument`
}
if (!missing(`wasGeneratedByDescription`)) {
stopifnot(is.character(`wasGeneratedByDescription`), length(`wasGeneratedByDescription`) == 1)
self$`wasGeneratedByDescription` <- `wasGeneratedByDescription`
}
},
toJSON = function() {
WasGeneratedByDTOObject <- list()
if (!is.null(self$`wasGeneratedByDocument`)) {
WasGeneratedByDTOObject[['wasGeneratedByDocument']] <- self$`wasGeneratedByDocument`
}
if (!is.null(self$`wasGeneratedByDescription`)) {
WasGeneratedByDTOObject[['wasGeneratedByDescription']] <- self$`wasGeneratedByDescription`
}
WasGeneratedByDTOObject
},
fromJSON = function(WasGeneratedByDTOJson) {
WasGeneratedByDTOObject <- jsonlite::fromJSON(WasGeneratedByDTOJson)
if (!is.null(WasGeneratedByDTOObject$`wasGeneratedByDocument`)) {
self$`wasGeneratedByDocument` <- WasGeneratedByDTOObject$`wasGeneratedByDocument`
}
if (!is.null(WasGeneratedByDTOObject$`wasGeneratedByDescription`)) {
self$`wasGeneratedByDescription` <- WasGeneratedByDTOObject$`wasGeneratedByDescription`
}
},
fromJSONObject = function(WasGeneratedByDTOObject) {
if (!is.null(WasGeneratedByDTOObject$`wasGeneratedByDocument`)) {
self$`wasGeneratedByDocument` <- WasGeneratedByDTOObject$`wasGeneratedByDocument`
}
if (!is.null(WasGeneratedByDTOObject$`wasGeneratedByDescription`)) {
self$`wasGeneratedByDescription` <- WasGeneratedByDTOObject$`wasGeneratedByDescription`
}
},
toJSONString = function() {
sprintf(
'{
"wasGeneratedByDocument": %s,
"wasGeneratedByDescription": %s
}',
jsonlite::toJSON(self$`wasGeneratedByDocument`,auto_unbox=TRUE, null = "null"),
jsonlite::toJSON(self$`wasGeneratedByDescription`,auto_unbox=TRUE, null = "null")
)
},
fromJSONString = function(WasGeneratedByDTOJson) {
WasGeneratedByDTOObject <- jsonlite::fromJSON(WasGeneratedByDTOJson)
self$`wasGeneratedByDocument` <- WasGeneratedByDTOObject$`wasGeneratedByDocument`
self$`wasGeneratedByDescription` <- WasGeneratedByDTOObject$`wasGeneratedByDescription`
}
)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.