# GraphSense API
#
# GraphSense API provides programmatic access to various ledgers' addresses, entities, blocks, transactions and tags for automated and highly efficient forensics tasks.
#
# The version of the OpenAPI document: 1.0.1
# Contact: contact@ikna.io
# Generated by: https://openapi-generator.tech
#' @docType class
#' @title SearchResultLevel5
#'
#' @description SearchResultLevel5 Class
#'
#' @format An \code{R6Class} generator object
#'
#' @field matching_addresses list( \link{Address} )
#'
#' @field neighbor \link{NeighborEntity}
#'
#' @field paths list( \link{SearchResultLevel6} )
#'
#' @importFrom R6 R6Class
#' @importFrom jsonlite fromJSON toJSON
#' @export
SearchResultLevel5 <- R6::R6Class(
'SearchResultLevel5',
public = list(
`matching_addresses` = NULL,
`neighbor` = NULL,
`paths` = NULL,
initialize = function(
`matching_addresses`, `neighbor`, `paths`, ...
) {
local.optional.var <- list(...)
if (!missing(`matching_addresses`)) {
stopifnot(is.vector(`matching_addresses`), length(`matching_addresses`) != 0)
sapply(`matching_addresses`, function(x) stopifnot(R6::is.R6(x)))
self$`matching_addresses` <- `matching_addresses`
}
if (!missing(`neighbor`)) {
stopifnot(R6::is.R6(`neighbor`))
self$`neighbor` <- `neighbor`
}
if (!missing(`paths`)) {
stopifnot(is.vector(`paths`), length(`paths`) != 0)
sapply(`paths`, function(x) stopifnot(R6::is.R6(x)))
self$`paths` <- `paths`
}
},
toJSON = function() {
SearchResultLevel5Object <- list()
if (!is.null(self$`matching_addresses`)) {
SearchResultLevel5Object[['matching_addresses']] <-
lapply(self$`matching_addresses`, function(x) x$toJSON())
}
if (!is.null(self$`neighbor`)) {
SearchResultLevel5Object[['neighbor']] <-
self$`neighbor`$toJSON()
}
if (!is.null(self$`paths`)) {
SearchResultLevel5Object[['paths']] <-
lapply(self$`paths`, function(x) x$toJSON())
}
SearchResultLevel5Object
},
fromJSON = function(SearchResultLevel5Json) {
SearchResultLevel5Object <- jsonlite::fromJSON(SearchResultLevel5Json)
if (!is.null(SearchResultLevel5Object$`matching_addresses`)) {
self$`matching_addresses` <- ApiClient$new()$deserializeObj(SearchResultLevel5Object$`matching_addresses`, "array[Address]", loadNamespace("graphsense"))
}
if (!is.null(SearchResultLevel5Object$`neighbor`)) {
neighborObject <- NeighborEntity$new()
neighborObject$fromJSON(jsonlite::toJSON(SearchResultLevel5Object$neighbor, auto_unbox = TRUE, digits = NA))
self$`neighbor` <- neighborObject
}
if (!is.null(SearchResultLevel5Object$`paths`)) {
self$`paths` <- ApiClient$new()$deserializeObj(SearchResultLevel5Object$`paths`, "array[SearchResultLevel6]", loadNamespace("graphsense"))
}
self
},
toJSONString = function() {
jsoncontent <- c(
if (!is.null(self$`matching_addresses`)) {
sprintf(
'"matching_addresses":
[%s]
',
paste(sapply(self$`matching_addresses`, function(x) jsonlite::toJSON(x$toJSON(), auto_unbox=TRUE, digits = NA)), collapse=",")
)},
if (!is.null(self$`neighbor`)) {
sprintf(
'"neighbor":
%s
',
jsonlite::toJSON(self$`neighbor`$toJSON(), auto_unbox=TRUE, digits = NA)
)},
if (!is.null(self$`paths`)) {
sprintf(
'"paths":
[%s]
',
paste(sapply(self$`paths`, function(x) jsonlite::toJSON(x$toJSON(), auto_unbox=TRUE, digits = NA)), collapse=",")
)}
)
jsoncontent <- paste(jsoncontent, collapse = ",")
paste('{', jsoncontent, '}', sep = "")
},
fromJSONString = function(SearchResultLevel5Json) {
SearchResultLevel5Object <- jsonlite::fromJSON(SearchResultLevel5Json)
self$`matching_addresses` <- ApiClient$new()$deserializeObj(SearchResultLevel5Object$`matching_addresses`, "array[Address]", loadNamespace("graphsense"))
self$`neighbor` <- NeighborEntity$new()$fromJSON(jsonlite::toJSON(SearchResultLevel5Object$neighbor, auto_unbox = TRUE, digits = NA))
self$`paths` <- ApiClient$new()$deserializeObj(SearchResultLevel5Object$`paths`, "array[SearchResultLevel6]", loadNamespace("graphsense"))
self
}
)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.