R/inline_response20035.R

# Binance Public Spot API
#
# OpenAPI Specifications for the Binance Public Spot API  API documents:   - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs)   - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en)
#
# The version of the OpenAPI document: 1.0
# 
# Generated by: https://openapi-generator.tech

#' @docType class
#' @title InlineResponse20035
#'
#' @description InlineResponse20035 Class
#'
#' @format An \code{R6Class} generator object
#'
#' @field id  character 
#'
#' @importFrom R6 R6Class
#' @importFrom jsonlite fromJSON toJSON
#' @export
InlineResponse20035 <- R6::R6Class(
  'InlineResponse20035',
  public = list(
    `id` = NULL,
    initialize = function(
        `id`, ...
    ) {
      local.optional.var <- list(...)
      if (!missing(`id`)) {
        stopifnot(is.character(`id`), length(`id`) == 1)
        self$`id` <- `id`
      }
    },
    toJSON = function() {
      InlineResponse20035Object <- list()
      if (!is.null(self$`id`)) {
        InlineResponse20035Object[['id']] <-
          self$`id`
      }

      InlineResponse20035Object
    },
    fromJSON = function(InlineResponse20035Json) {
      InlineResponse20035Object <- jsonlite::fromJSON(InlineResponse20035Json)
      if (!is.null(InlineResponse20035Object$`id`)) {
        self$`id` <- InlineResponse20035Object$`id`
      }
      self
    },
    toJSONString = function() {
      jsoncontent <- c(
        if (!is.null(self$`id`)) {
        sprintf(
        '"id":
          "%s"
                ',
        self$`id`
        )}
      )
      jsoncontent <- paste(jsoncontent, collapse = ",")
      paste('{', jsoncontent, '}', sep = "")
    },
    fromJSONString = function(InlineResponse20035Json) {
      InlineResponse20035Object <- jsonlite::fromJSON(InlineResponse20035Json)
      self$`id` <- InlineResponse20035Object$`id`
      self
    }
  )
)
grahamjwhite/binanceRapi documentation built on Nov. 22, 2022, 9:37 p.m.