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


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

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