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