R/managed_group_ref.R

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

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

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