R/extended_enabled.R

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

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

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