R/orchestration_version.R

# FireCloud
#
# FireCloud API 
#
# The version of the OpenAPI document: 0.1
# 
# Generated by: https://openapi-generator.tech

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

      OrchestrationVersionObject
    },
    fromJSON = function(OrchestrationVersionJson) {
      OrchestrationVersionObject <- jsonlite::fromJSON(OrchestrationVersionJson)
      if (!is.null(OrchestrationVersionObject$`version`)) {
        self$`version` <- OrchestrationVersionObject$`version`
      }
      self
    },
    toJSONString = function() {
      jsoncontent <- c(
        if (!is.null(self$`version`)) {
        sprintf(
        '"version":
          "%s"
                ',
        self$`version`
        )}
      )
      jsoncontent <- paste(jsoncontent, collapse = ",")
      paste('{', jsoncontent, '}', sep = "")
    },
    fromJSONString = function(OrchestrationVersionJson) {
      OrchestrationVersionObject <- jsonlite::fromJSON(OrchestrationVersionJson)
      self$`version` <- OrchestrationVersionObject$`version`
      self
    }
  )
)
vjcitn/terraClientR documentation built on Dec. 23, 2021, 4:07 p.m.