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