R/InlineResponse20047Data.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


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

      InlineResponse20047DataObject
    },
    fromJSON = function(InlineResponse20047DataJson) {
      InlineResponse20047DataObject <- jsonlite::fromJSON(InlineResponse20047DataJson)
      if (!is.null(InlineResponse20047DataObject$`volumes`)) {
        self$`volumes` <- InlineResponse20047DataObject$`volumes`
      }
    },
    toJSONString = function() {
       sprintf(
        '{
           "volumes": [%s]
        }',
        lapply(self$`volumes`, function(x) paste(paste0('"', x, '"'), sep=","))
      )
    },
    fromJSONString = function(InlineResponse20047DataJson) {
      InlineResponse20047DataObject <- jsonlite::fromJSON(InlineResponse20047DataJson)
      self$`volumes` <- InlineResponse20047DataObject$`volumes`
    }
  )
)
riteshkarvaloc/dkubeR documentation built on Feb. 25, 2021, 9:28 p.m.