# FireCloud
#
# FireCloud API
#
# The version of the OpenAPI document: 0.1
#
# Generated by: https://openapi-generator.tech
#' @docType class
#' @title Profile
#'
#' @description Profile Class
#'
#' @format An \code{R6Class} generator object
#'
#' @field firstName character
#'
#' @field lastName character
#'
#' @field title character
#'
#' @field contactEmail character [optional]
#'
#' @field institute character
#'
#' @field institutionalProgram character
#'
#' @field programLocationCity character
#'
#' @field programLocationState character
#'
#' @field programLocationCountry character
#'
#' @field pi character
#'
#' @field nonProfitStatus character
#'
#' @importFrom R6 R6Class
#' @importFrom jsonlite fromJSON toJSON
#' @export
Profile <- R6::R6Class(
'Profile',
public = list(
`firstName` = NULL,
`lastName` = NULL,
`title` = NULL,
`contactEmail` = NULL,
`institute` = NULL,
`institutionalProgram` = NULL,
`programLocationCity` = NULL,
`programLocationState` = NULL,
`programLocationCountry` = NULL,
`pi` = NULL,
`nonProfitStatus` = NULL,
initialize = function(
`firstName`, `lastName`, `title`, `institute`, `institutionalProgram`, `programLocationCity`, `programLocationState`, `programLocationCountry`, `pi`, `nonProfitStatus`, `contactEmail`=NULL, ...
) {
local.optional.var <- list(...)
if (!missing(`firstName`)) {
stopifnot(is.character(`firstName`), length(`firstName`) == 1)
self$`firstName` <- `firstName`
}
if (!missing(`lastName`)) {
stopifnot(is.character(`lastName`), length(`lastName`) == 1)
self$`lastName` <- `lastName`
}
if (!missing(`title`)) {
stopifnot(is.character(`title`), length(`title`) == 1)
self$`title` <- `title`
}
if (!missing(`institute`)) {
stopifnot(is.character(`institute`), length(`institute`) == 1)
self$`institute` <- `institute`
}
if (!missing(`institutionalProgram`)) {
stopifnot(is.character(`institutionalProgram`), length(`institutionalProgram`) == 1)
self$`institutionalProgram` <- `institutionalProgram`
}
if (!missing(`programLocationCity`)) {
stopifnot(is.character(`programLocationCity`), length(`programLocationCity`) == 1)
self$`programLocationCity` <- `programLocationCity`
}
if (!missing(`programLocationState`)) {
stopifnot(is.character(`programLocationState`), length(`programLocationState`) == 1)
self$`programLocationState` <- `programLocationState`
}
if (!missing(`programLocationCountry`)) {
stopifnot(is.character(`programLocationCountry`), length(`programLocationCountry`) == 1)
self$`programLocationCountry` <- `programLocationCountry`
}
if (!missing(`pi`)) {
stopifnot(is.character(`pi`), length(`pi`) == 1)
self$`pi` <- `pi`
}
if (!missing(`nonProfitStatus`)) {
stopifnot(is.character(`nonProfitStatus`), length(`nonProfitStatus`) == 1)
self$`nonProfitStatus` <- `nonProfitStatus`
}
if (!is.null(`contactEmail`)) {
stopifnot(is.character(`contactEmail`), length(`contactEmail`) == 1)
self$`contactEmail` <- `contactEmail`
}
},
toJSON = function() {
ProfileObject <- list()
if (!is.null(self$`firstName`)) {
ProfileObject[['firstName']] <-
self$`firstName`
}
if (!is.null(self$`lastName`)) {
ProfileObject[['lastName']] <-
self$`lastName`
}
if (!is.null(self$`title`)) {
ProfileObject[['title']] <-
self$`title`
}
if (!is.null(self$`contactEmail`)) {
ProfileObject[['contactEmail']] <-
self$`contactEmail`
}
if (!is.null(self$`institute`)) {
ProfileObject[['institute']] <-
self$`institute`
}
if (!is.null(self$`institutionalProgram`)) {
ProfileObject[['institutionalProgram']] <-
self$`institutionalProgram`
}
if (!is.null(self$`programLocationCity`)) {
ProfileObject[['programLocationCity']] <-
self$`programLocationCity`
}
if (!is.null(self$`programLocationState`)) {
ProfileObject[['programLocationState']] <-
self$`programLocationState`
}
if (!is.null(self$`programLocationCountry`)) {
ProfileObject[['programLocationCountry']] <-
self$`programLocationCountry`
}
if (!is.null(self$`pi`)) {
ProfileObject[['pi']] <-
self$`pi`
}
if (!is.null(self$`nonProfitStatus`)) {
ProfileObject[['nonProfitStatus']] <-
self$`nonProfitStatus`
}
ProfileObject
},
fromJSON = function(ProfileJson) {
ProfileObject <- jsonlite::fromJSON(ProfileJson)
if (!is.null(ProfileObject$`firstName`)) {
self$`firstName` <- ProfileObject$`firstName`
}
if (!is.null(ProfileObject$`lastName`)) {
self$`lastName` <- ProfileObject$`lastName`
}
if (!is.null(ProfileObject$`title`)) {
self$`title` <- ProfileObject$`title`
}
if (!is.null(ProfileObject$`contactEmail`)) {
self$`contactEmail` <- ProfileObject$`contactEmail`
}
if (!is.null(ProfileObject$`institute`)) {
self$`institute` <- ProfileObject$`institute`
}
if (!is.null(ProfileObject$`institutionalProgram`)) {
self$`institutionalProgram` <- ProfileObject$`institutionalProgram`
}
if (!is.null(ProfileObject$`programLocationCity`)) {
self$`programLocationCity` <- ProfileObject$`programLocationCity`
}
if (!is.null(ProfileObject$`programLocationState`)) {
self$`programLocationState` <- ProfileObject$`programLocationState`
}
if (!is.null(ProfileObject$`programLocationCountry`)) {
self$`programLocationCountry` <- ProfileObject$`programLocationCountry`
}
if (!is.null(ProfileObject$`pi`)) {
self$`pi` <- ProfileObject$`pi`
}
if (!is.null(ProfileObject$`nonProfitStatus`)) {
self$`nonProfitStatus` <- ProfileObject$`nonProfitStatus`
}
self
},
toJSONString = function() {
jsoncontent <- c(
if (!is.null(self$`firstName`)) {
sprintf(
'"firstName":
"%s"
',
self$`firstName`
)},
if (!is.null(self$`lastName`)) {
sprintf(
'"lastName":
"%s"
',
self$`lastName`
)},
if (!is.null(self$`title`)) {
sprintf(
'"title":
"%s"
',
self$`title`
)},
if (!is.null(self$`contactEmail`)) {
sprintf(
'"contactEmail":
"%s"
',
self$`contactEmail`
)},
if (!is.null(self$`institute`)) {
sprintf(
'"institute":
"%s"
',
self$`institute`
)},
if (!is.null(self$`institutionalProgram`)) {
sprintf(
'"institutionalProgram":
"%s"
',
self$`institutionalProgram`
)},
if (!is.null(self$`programLocationCity`)) {
sprintf(
'"programLocationCity":
"%s"
',
self$`programLocationCity`
)},
if (!is.null(self$`programLocationState`)) {
sprintf(
'"programLocationState":
"%s"
',
self$`programLocationState`
)},
if (!is.null(self$`programLocationCountry`)) {
sprintf(
'"programLocationCountry":
"%s"
',
self$`programLocationCountry`
)},
if (!is.null(self$`pi`)) {
sprintf(
'"pi":
"%s"
',
self$`pi`
)},
if (!is.null(self$`nonProfitStatus`)) {
sprintf(
'"nonProfitStatus":
"%s"
',
self$`nonProfitStatus`
)}
)
jsoncontent <- paste(jsoncontent, collapse = ",")
paste('{', jsoncontent, '}', sep = "")
},
fromJSONString = function(ProfileJson) {
ProfileObject <- jsonlite::fromJSON(ProfileJson)
self$`firstName` <- ProfileObject$`firstName`
self$`lastName` <- ProfileObject$`lastName`
self$`title` <- ProfileObject$`title`
self$`contactEmail` <- ProfileObject$`contactEmail`
self$`institute` <- ProfileObject$`institute`
self$`institutionalProgram` <- ProfileObject$`institutionalProgram`
self$`programLocationCity` <- ProfileObject$`programLocationCity`
self$`programLocationState` <- ProfileObject$`programLocationState`
self$`programLocationCountry` <- ProfileObject$`programLocationCountry`
self$`pi` <- ProfileObject$`pi`
self$`nonProfitStatus` <- ProfileObject$`nonProfitStatus`
self
}
)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.