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