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