# Agave Platform Science API
#
# Power your digital lab and reduce the time from theory to discovery using the Agave Science-as-a-Service API Platform. Agave provides hosted services that allow researchers to manage data, conduct experiments, and publish and share results from anywhere at any time.
#
# Agave Platform version: 2.2.14
#
# Generated by: https://github.com/swagger-api/swagger-codegen.git
#' ApplicationArgument Class
#'
#' This is the base model for all Application input, output, and parameter objects.
#'
#' @field details
#' @field id The id of this argument. This will be the replacement string in your wrapper scripts.
#' @field semantics
#' @field value
#'
#' @importFrom R6 R6Class
#' @importFrom jsonlite fromJSON toJSON
#' @export
ApplicationArgument <- R6::R6Class(
'ApplicationArgument',
public = list(
`details` = NULL,
`id` = NULL,
`semantics` = NULL,
`value` = NULL,
initialize = function(`details`, `id`, `semantics`, `value`){
if (!missing(`details`)) {
stopifnot(R6::is.R6(`details`))
self$`details` <- `details`
}
if (!missing(`id`)) {
stopifnot(is.character(`id`), length(`id`) == 1)
self$`id` <- `id`
}
if (!missing(`semantics`)) {
stopifnot(R6::is.R6(`semantics`))
self$`semantics` <- `semantics`
}
if (!missing(`value`)) {
stopifnot(R6::is.R6(`value`))
self$`value` <- `value`
}
},
asJSON = function() {
self$toJSON()
},
toJSON = function() {
ApplicationArgumentObject <- list()
if (!is.null(self$`details`)) {
ApplicationArgumentObject[['details']] <- self$`details`$toJSON()
}
else {
ApplicationArgumentObject[['details']] <- NULL
}
if (!is.null(self$`id`)) {
ApplicationArgumentObject[['id']] <- self$`id`
}
else {
ApplicationArgumentObject[['id']] <- NULL
}
if (!is.null(self$`semantics`)) {
ApplicationArgumentObject[['semantics']] <- self$`semantics`$toJSON()
}
else {
ApplicationArgumentObject[['semantics']] <- NULL
}
if (!is.null(self$`value`)) {
ApplicationArgumentObject[['value']] <- self$`value`$toJSON()
}
else {
ApplicationArgumentObject[['value']] <- NULL
}
ApplicationArgumentObject
},
fromJSON = function(ApplicationArgumentObject) {
if (is.character(ApplicationArgumentObject)) {
ApplicationArgumentObject <- jsonlite::fromJSON(ApplicationArgumentJson)
}
if ("result" %in% names(ApplicationArgumentObject)) {
ApplicationArgumentObject <- ApplicationArgumentObject$result
}
if (!is.null(ApplicationArgumentObject$`details`)) {
detailsObject <- ApplicationArgumentDetails$new()
detailsObject$fromJSON(jsonlite::toJSON(ApplicationArgumentObject$details, auto_unbox = TRUE))
self$`details` <- detailsObject
}
if (!is.null(ApplicationArgumentObject$`id`)) {
self$`id` <- ApplicationArgumentObject$`id`
}
if (!is.null(ApplicationArgumentObject$`semantics`)) {
semanticsObject <- ApplicationArgumentSemantics$new()
semanticsObject$fromJSON(jsonlite::toJSON(ApplicationArgumentObject$semantics, auto_unbox = TRUE))
self$`semantics` <- semanticsObject
}
if (!is.null(ApplicationArgumentObject$`value`)) {
valueObject <- ApplicationArgumentValue$new()
valueObject$fromJSON(jsonlite::toJSON(ApplicationArgumentObject$value, auto_unbox = TRUE))
self$`value` <- valueObject
}
},
toJSONString = function() {
sprintf(
'{
"details": %s,
"id": %s,
"semantics": %s,
"value": %s
}',
self$`details`$toJSON(),
ifelse( is.null(self$`id`),"null",paste0(c('"', self$`id`, '"'))),
self$`semantics`$toJSON(),
self$`value`$toJSON()
)
},
fromJSONString = function(ApplicationArgumentJson) {
ApplicationArgumentObject <- jsonlite::fromJSON(ApplicationArgumentJson)
self::fromJSON(ApplicationArgumentObject)
}
)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.