R/attribute_update_operation.R

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

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

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