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