R/inline_object1.R

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

#' @docType class
#' @title InlineObject1
#'
#' @description InlineObject1 Class
#'
#' @format An \code{R6Class} generator object
#'
#' @field synopsis  character [optional]
#'
#' @field documentation  character [optional]
#'
#' @field payload  character [optional]
#'
#' @field snapshotComment  character [optional]
#'
#' @importFrom R6 R6Class
#' @importFrom jsonlite fromJSON toJSON
#' @export
InlineObject1 <- R6::R6Class(
  'InlineObject1',
  public = list(
    `synopsis` = NULL,
    `documentation` = NULL,
    `payload` = NULL,
    `snapshotComment` = NULL,
    initialize = function(
        `synopsis`='Quickly aligns short nucleotide sequences.', `documentation`='BWA is a software package for mapping low-divergent sequences
against a large reference genome, such as the human genome.
It consists of three algorithms: BWA-backtrack, BWA-SW and BWA-MEM.
', `payload`='task wc {File in_file command { cat ${in_file} | wc -l } output { Int count = read_int(stdout()) }}
', `snapshotComment`='Improve spline reticulation', ...
    ) {
      local.optional.var <- list(...)
      if (!is.null(`synopsis`)) {
        stopifnot(is.character(`synopsis`), length(`synopsis`) == 1)
        self$`synopsis` <- `synopsis`
      }
      if (!is.null(`documentation`)) {
        stopifnot(is.character(`documentation`), length(`documentation`) == 1)
        self$`documentation` <- `documentation`
      }
      if (!is.null(`payload`)) {
        stopifnot(is.character(`payload`), length(`payload`) == 1)
        self$`payload` <- `payload`
      }
      if (!is.null(`snapshotComment`)) {
        stopifnot(is.character(`snapshotComment`), length(`snapshotComment`) == 1)
        self$`snapshotComment` <- `snapshotComment`
      }
    },
    toJSON = function() {
      InlineObject1Object <- list()
      if (!is.null(self$`synopsis`)) {
        InlineObject1Object[['synopsis']] <-
          self$`synopsis`
      }
      if (!is.null(self$`documentation`)) {
        InlineObject1Object[['documentation']] <-
          self$`documentation`
      }
      if (!is.null(self$`payload`)) {
        InlineObject1Object[['payload']] <-
          self$`payload`
      }
      if (!is.null(self$`snapshotComment`)) {
        InlineObject1Object[['snapshotComment']] <-
          self$`snapshotComment`
      }

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