# Altana Atlas API
#
# Altana Atlas for Regulatory Risk and Trade Compliance
#
# OpenAPI spec version: {{ version or \"v0.0.1\" }}
# Contact: engineering@altanatech.com
# Generated by: https://github.com/swagger-api/swagger-codegen.git
#' Restriction Class
#'
#' @field type
#' @field description
#'
#' @importFrom R6 R6Class
#' @importFrom jsonlite fromJSON toJSON
#' @export
Restriction <- R6::R6Class(
'Restriction',
public = list(
`type` = NULL,
`description` = NULL,
initialize = function(`type`, `description`){
if (!missing(`type`)) {
stopifnot(is.character(`type`), length(`type`) == 1)
self$`type` <- `type`
}
if (!missing(`description`)) {
stopifnot(is.character(`description`), length(`description`) == 1)
self$`description` <- `description`
}
},
toJSON = function() {
RestrictionObject <- list()
if (!is.null(self$`type`)) {
RestrictionObject[['type']] <- self$`type`
}
if (!is.null(self$`description`)) {
RestrictionObject[['description']] <- self$`description`
}
RestrictionObject
},
fromJSON = function(RestrictionJson) {
RestrictionObject <- jsonlite::fromJSON(RestrictionJson)
if (!is.null(RestrictionObject$`type`)) {
self$`type` <- RestrictionObject$`type`
}
if (!is.null(RestrictionObject$`description`)) {
self$`description` <- RestrictionObject$`description`
}
},
toJSONString = function() {
sprintf(
'{
"type": %s,
"description": %s
}',
self$`type`,
self$`description`
)
},
fromJSONString = function(RestrictionJson) {
RestrictionObject <- jsonlite::fromJSON(RestrictionJson)
self$`type` <- RestrictionObject$`type`
self$`description` <- RestrictionObject$`description`
}
)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.