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