R/pa_calculation_group.R

# Engines API
#
# Allow clients to fetch Engines Analytics through APIs.
#
# The version of the OpenAPI document: 2
# Contact: analytics.api.support@factset.com
# Generated by: https://openapi-generator.tech

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

      PACalculationGroupObject
    },
    fromJSON = function(PACalculationGroupJson) {
      PACalculationGroupObject <- jsonlite::fromJSON(PACalculationGroupJson)
      if (!is.null(PACalculationGroupObject$`id`)) {
        self$`id` <- PACalculationGroupObject$`id`
      }
    },
    toJSONString = function() {
      jsoncontent <- c(
        if (!is.null(self$`id`)) {
        sprintf(
        '"id":
          "%s"
                ',
        self$`id`
        )}
      )
      jsoncontent <- paste(jsoncontent, collapse = ",")
      paste('{', jsoncontent, '}', sep = "")
    },
    fromJSONString = function(PACalculationGroupJson) {
      PACalculationGroupObject <- jsonlite::fromJSON(PACalculationGroupJson)
      self$`id` <- PACalculationGroupObject$`id`
      self
    }
  )
)

Try the factset.analyticsapi.engines package in your browser

Any scripts or data that you put into this service are public.

factset.analyticsapi.engines documentation built on Feb. 2, 2020, 5:06 p.m.