R/entity_hard_conflict.R

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

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

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