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