R/workspace_bucket_options.R

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

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

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