R/remove_list_member.R

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

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

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