R/D3StateModel.r

# Dkube api server
#
# No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
#
# OpenAPI spec version: 2.2.1.11
# 
# Generated by: https://github.com/swagger-api/swagger-codegen.git


#' D3StateModel Class
#'
#' @field state 
#'
#' @importFrom R6 R6Class
#' @importFrom jsonlite fromJSON toJSON
#' @export
D3StateModel <- R6::R6Class(
  'D3StateModel',
  public = list(
    `state` = NULL,
    initialize = function(`state`){
      if (!missing(`state`)) {
        stopifnot(is.character(`state`), length(`state`) == 1)
        self$`state` <- `state`
      }
    },
    toJSON = function() {
      D3StateModelObject <- list()
      if (!is.null(self$`state`)) {
        D3StateModelObject[['state']] <- self$`state`
      }

      D3StateModelObject
    },
    fromJSON = function(D3StateModelJson) {
      D3StateModelObject <- jsonlite::fromJSON(D3StateModelJson)
      if (!is.null(D3StateModelObject$`state`)) {
        self$`state` <- D3StateModelObject$`state`
      }
    },
    toJSONString = function() {
       sprintf(
        '{
           "state": %s
        }',
        self$`state`
      )
    },
    fromJSONString = function(D3StateModelJson) {
      D3StateModelObject <- jsonlite::fromJSON(D3StateModelJson)
      self$`state` <- D3StateModelObject$`state`
    }
  )
)
riteshkarvaloc/dkubeR documentation built on Feb. 25, 2021, 9:28 p.m.