# HCA Matrix Service
#
# Human Cell Atlas Matrix Service API
#
# The version of the OpenAPI document: 1.0.0
#
# Generated by: https://openapi-generator.tech
#' @docType class
#' @title V1MatrixErrorResponse
#' @description V1MatrixErrorResponse Class
#' @format An \code{R6Class} generator object
#' @field status_code integer [optional]
#'
#' @field message character [optional]
#'
#'
#' @importFrom R6 R6Class
#' @importFrom jsonlite fromJSON toJSON
#' @export
V1MatrixErrorResponse <- R6::R6Class(
'V1MatrixErrorResponse',
public = list(
`status_code` = NULL,
`message` = NULL,
initialize = function(`status_code`=NULL, `message`=NULL, ...){
local.optional.var <- list(...)
if (!is.null(`status_code`)) {
stopifnot(is.numeric(`status_code`), length(`status_code`) == 1)
self$`status_code` <- `status_code`
}
if (!is.null(`message`)) {
stopifnot(is.character(`message`), length(`message`) == 1)
self$`message` <- `message`
}
},
toJSON = function() {
V1MatrixErrorResponseObject <- list()
if (!is.null(self$`status_code`)) {
V1MatrixErrorResponseObject[['status_code']] <-
self$`status_code`
}
if (!is.null(self$`message`)) {
V1MatrixErrorResponseObject[['message']] <-
self$`message`
}
V1MatrixErrorResponseObject
},
fromJSON = function(V1MatrixErrorResponseJson) {
V1MatrixErrorResponseObject <- jsonlite::fromJSON(V1MatrixErrorResponseJson)
if (!is.null(V1MatrixErrorResponseObject$`status_code`)) {
self$`status_code` <- V1MatrixErrorResponseObject$`status_code`
}
if (!is.null(V1MatrixErrorResponseObject$`message`)) {
self$`message` <- V1MatrixErrorResponseObject$`message`
}
},
toJSONString = function() {
jsoncontent <- c(
if (!is.null(self$`status_code`)) {
sprintf(
'"status_code":
%d
',
self$`status_code`
)},
if (!is.null(self$`message`)) {
sprintf(
'"message":
"%s"
',
self$`message`
)}
)
jsoncontent <- paste(jsoncontent, collapse = ",")
paste('{', jsoncontent, '}', sep = "")
},
fromJSONString = function(V1MatrixErrorResponseJson) {
V1MatrixErrorResponseObject <- jsonlite::fromJSON(V1MatrixErrorResponseJson)
self$`status_code` <- V1MatrixErrorResponseObject$`status_code`
self$`message` <- V1MatrixErrorResponseObject$`message`
self
}
)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.