# 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 Tag
#'
#' @description Tag Class
#'
#' @format An \code{R6Class} generator object
#'
#' @field abuse character [optional]
#'
#' @field category character [optional]
#'
#' @field confidence character [optional]
#'
#' @field confidence_level integer [optional]
#'
#' @field currency character
#'
#' @field is_cluster_definer character
#'
#' @field label character
#'
#' @field lastmod integer [optional]
#'
#' @field source character [optional]
#'
#' @field tagpack_creator character
#'
#' @field tagpack_is_public character
#'
#' @field tagpack_title character
#'
#' @field tagpack_uri character [optional]
#'
#' @importFrom R6 R6Class
#' @importFrom jsonlite fromJSON toJSON
#' @export
Tag <- R6::R6Class(
'Tag',
public = list(
`abuse` = NULL,
`category` = NULL,
`confidence` = NULL,
`confidence_level` = NULL,
`currency` = NULL,
`is_cluster_definer` = NULL,
`label` = NULL,
`lastmod` = NULL,
`source` = NULL,
`tagpack_creator` = NULL,
`tagpack_is_public` = NULL,
`tagpack_title` = NULL,
`tagpack_uri` = NULL,
initialize = function(
`currency`, `is_cluster_definer`, `label`, `tagpack_creator`, `tagpack_is_public`, `tagpack_title`, `abuse`=NULL, `category`=NULL, `confidence`=NULL, `confidence_level`=NULL, `lastmod`=NULL, `source`=NULL, `tagpack_uri`=NULL, ...
) {
local.optional.var <- list(...)
if (!missing(`currency`)) {
stopifnot(is.character(`currency`), length(`currency`) == 1)
self$`currency` <- `currency`
}
if (!missing(`is_cluster_definer`)) {
self$`is_cluster_definer` <- `is_cluster_definer`
}
if (!missing(`label`)) {
stopifnot(is.character(`label`), length(`label`) == 1)
self$`label` <- `label`
}
if (!missing(`tagpack_creator`)) {
stopifnot(is.character(`tagpack_creator`), length(`tagpack_creator`) == 1)
self$`tagpack_creator` <- `tagpack_creator`
}
if (!missing(`tagpack_is_public`)) {
self$`tagpack_is_public` <- `tagpack_is_public`
}
if (!missing(`tagpack_title`)) {
stopifnot(is.character(`tagpack_title`), length(`tagpack_title`) == 1)
self$`tagpack_title` <- `tagpack_title`
}
if (!is.null(`abuse`)) {
stopifnot(is.character(`abuse`), length(`abuse`) == 1)
self$`abuse` <- `abuse`
}
if (!is.null(`category`)) {
stopifnot(is.character(`category`), length(`category`) == 1)
self$`category` <- `category`
}
if (!is.null(`confidence`)) {
stopifnot(is.character(`confidence`), length(`confidence`) == 1)
self$`confidence` <- `confidence`
}
if (!is.null(`confidence_level`)) {
stopifnot(is.numeric(`confidence_level`), length(`confidence_level`) == 1)
self$`confidence_level` <- `confidence_level`
}
if (!is.null(`lastmod`)) {
stopifnot(is.numeric(`lastmod`), length(`lastmod`) == 1)
self$`lastmod` <- `lastmod`
}
if (!is.null(`source`)) {
stopifnot(is.character(`source`), length(`source`) == 1)
self$`source` <- `source`
}
if (!is.null(`tagpack_uri`)) {
stopifnot(is.character(`tagpack_uri`), length(`tagpack_uri`) == 1)
self$`tagpack_uri` <- `tagpack_uri`
}
},
toJSON = function() {
TagObject <- list()
if (!is.null(self$`abuse`)) {
TagObject[['abuse']] <-
self$`abuse`
}
if (!is.null(self$`category`)) {
TagObject[['category']] <-
self$`category`
}
if (!is.null(self$`confidence`)) {
TagObject[['confidence']] <-
self$`confidence`
}
if (!is.null(self$`confidence_level`)) {
TagObject[['confidence_level']] <-
self$`confidence_level`
}
if (!is.null(self$`currency`)) {
TagObject[['currency']] <-
self$`currency`
}
if (!is.null(self$`is_cluster_definer`)) {
TagObject[['is_cluster_definer']] <-
self$`is_cluster_definer`
}
if (!is.null(self$`label`)) {
TagObject[['label']] <-
self$`label`
}
if (!is.null(self$`lastmod`)) {
TagObject[['lastmod']] <-
self$`lastmod`
}
if (!is.null(self$`source`)) {
TagObject[['source']] <-
self$`source`
}
if (!is.null(self$`tagpack_creator`)) {
TagObject[['tagpack_creator']] <-
self$`tagpack_creator`
}
if (!is.null(self$`tagpack_is_public`)) {
TagObject[['tagpack_is_public']] <-
self$`tagpack_is_public`
}
if (!is.null(self$`tagpack_title`)) {
TagObject[['tagpack_title']] <-
self$`tagpack_title`
}
if (!is.null(self$`tagpack_uri`)) {
TagObject[['tagpack_uri']] <-
self$`tagpack_uri`
}
TagObject
},
fromJSON = function(TagJson) {
TagObject <- jsonlite::fromJSON(TagJson)
if (!is.null(TagObject$`abuse`)) {
self$`abuse` <- TagObject$`abuse`
}
if (!is.null(TagObject$`category`)) {
self$`category` <- TagObject$`category`
}
if (!is.null(TagObject$`confidence`)) {
self$`confidence` <- TagObject$`confidence`
}
if (!is.null(TagObject$`confidence_level`)) {
self$`confidence_level` <- TagObject$`confidence_level`
}
if (!is.null(TagObject$`currency`)) {
self$`currency` <- TagObject$`currency`
}
if (!is.null(TagObject$`is_cluster_definer`)) {
self$`is_cluster_definer` <- TagObject$`is_cluster_definer`
}
if (!is.null(TagObject$`label`)) {
self$`label` <- TagObject$`label`
}
if (!is.null(TagObject$`lastmod`)) {
self$`lastmod` <- TagObject$`lastmod`
}
if (!is.null(TagObject$`source`)) {
self$`source` <- TagObject$`source`
}
if (!is.null(TagObject$`tagpack_creator`)) {
self$`tagpack_creator` <- TagObject$`tagpack_creator`
}
if (!is.null(TagObject$`tagpack_is_public`)) {
self$`tagpack_is_public` <- TagObject$`tagpack_is_public`
}
if (!is.null(TagObject$`tagpack_title`)) {
self$`tagpack_title` <- TagObject$`tagpack_title`
}
if (!is.null(TagObject$`tagpack_uri`)) {
self$`tagpack_uri` <- TagObject$`tagpack_uri`
}
self
},
toJSONString = function() {
jsoncontent <- c(
if (!is.null(self$`abuse`)) {
sprintf(
'"abuse":
"%s"
',
self$`abuse`
)},
if (!is.null(self$`category`)) {
sprintf(
'"category":
"%s"
',
self$`category`
)},
if (!is.null(self$`confidence`)) {
sprintf(
'"confidence":
"%s"
',
self$`confidence`
)},
if (!is.null(self$`confidence_level`)) {
sprintf(
'"confidence_level":
%d
',
self$`confidence_level`
)},
if (!is.null(self$`currency`)) {
sprintf(
'"currency":
"%s"
',
self$`currency`
)},
if (!is.null(self$`is_cluster_definer`)) {
sprintf(
'"is_cluster_definer":
"%s"
',
self$`is_cluster_definer`
)},
if (!is.null(self$`label`)) {
sprintf(
'"label":
"%s"
',
self$`label`
)},
if (!is.null(self$`lastmod`)) {
sprintf(
'"lastmod":
%d
',
self$`lastmod`
)},
if (!is.null(self$`source`)) {
sprintf(
'"source":
"%s"
',
self$`source`
)},
if (!is.null(self$`tagpack_creator`)) {
sprintf(
'"tagpack_creator":
"%s"
',
self$`tagpack_creator`
)},
if (!is.null(self$`tagpack_is_public`)) {
sprintf(
'"tagpack_is_public":
"%s"
',
self$`tagpack_is_public`
)},
if (!is.null(self$`tagpack_title`)) {
sprintf(
'"tagpack_title":
"%s"
',
self$`tagpack_title`
)},
if (!is.null(self$`tagpack_uri`)) {
sprintf(
'"tagpack_uri":
"%s"
',
self$`tagpack_uri`
)}
)
jsoncontent <- paste(jsoncontent, collapse = ",")
paste('{', jsoncontent, '}', sep = "")
},
fromJSONString = function(TagJson) {
TagObject <- jsonlite::fromJSON(TagJson)
self$`abuse` <- TagObject$`abuse`
self$`category` <- TagObject$`category`
self$`confidence` <- TagObject$`confidence`
self$`confidence_level` <- TagObject$`confidence_level`
self$`currency` <- TagObject$`currency`
self$`is_cluster_definer` <- TagObject$`is_cluster_definer`
self$`label` <- TagObject$`label`
self$`lastmod` <- TagObject$`lastmod`
self$`source` <- TagObject$`source`
self$`tagpack_creator` <- TagObject$`tagpack_creator`
self$`tagpack_is_public` <- TagObject$`tagpack_is_public`
self$`tagpack_title` <- TagObject$`tagpack_title`
self$`tagpack_uri` <- TagObject$`tagpack_uri`
self
}
)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.