# NamSor API v2
#
# NamSor API v2 : enpoints to process personal names (gender, cultural origin or ethnicity) in all alphabets or languages. Use GET methods for small tests, but prefer POST methods for higher throughput (batch processing of up to 100 names at a time). Need something you can't find here? We have many more features coming soon. Let us know, we'll do our best to add it!
#
# The version of the OpenAPI document: 2.0.10
# Contact: contact@namsor.com
# Generated by: https://openapi-generator.tech
#' @docType class
#' @title APIKeyOut
#' @description APIKeyOut Class
#' @format An \code{R6Class} generator object
#' @field apiKey character [optional]
#'
#' @field userId character [optional]
#'
#' @field admin character [optional]
#'
#' @field vetted character [optional]
#'
#' @field learnable character [optional]
#'
#' @field anonymized character [optional]
#'
#' @field partner character [optional]
#'
#' @field striped character [optional]
#'
#' @field corporate character [optional]
#'
#' @field disabled character [optional]
#'
#'
#' @importFrom R6 R6Class
#' @importFrom jsonlite fromJSON toJSON
#' @export
APIKeyOut <- R6::R6Class(
'APIKeyOut',
public = list(
`apiKey` = NULL,
`userId` = NULL,
`admin` = NULL,
`vetted` = NULL,
`learnable` = NULL,
`anonymized` = NULL,
`partner` = NULL,
`striped` = NULL,
`corporate` = NULL,
`disabled` = NULL,
initialize = function(`apiKey`=NULL, `userId`=NULL, `admin`=NULL, `vetted`=NULL, `learnable`=NULL, `anonymized`=NULL, `partner`=NULL, `striped`=NULL, `corporate`=NULL, `disabled`=NULL, ...){
local.optional.var <- list(...)
if (!is.null(`apiKey`)) {
stopifnot(is.character(`apiKey`), length(`apiKey`) == 1)
self$`apiKey` <- `apiKey`
}
if (!is.null(`userId`)) {
stopifnot(is.character(`userId`), length(`userId`) == 1)
self$`userId` <- `userId`
}
if (!is.null(`admin`)) {
self$`admin` <- `admin`
}
if (!is.null(`vetted`)) {
self$`vetted` <- `vetted`
}
if (!is.null(`learnable`)) {
self$`learnable` <- `learnable`
}
if (!is.null(`anonymized`)) {
self$`anonymized` <- `anonymized`
}
if (!is.null(`partner`)) {
self$`partner` <- `partner`
}
if (!is.null(`striped`)) {
self$`striped` <- `striped`
}
if (!is.null(`corporate`)) {
self$`corporate` <- `corporate`
}
if (!is.null(`disabled`)) {
self$`disabled` <- `disabled`
}
},
toJSON = function() {
APIKeyOutObject <- list()
if (!is.null(self$`apiKey`)) {
APIKeyOutObject[['apiKey']] <-
self$`apiKey`
}
if (!is.null(self$`userId`)) {
APIKeyOutObject[['userId']] <-
self$`userId`
}
if (!is.null(self$`admin`)) {
APIKeyOutObject[['admin']] <-
self$`admin`
}
if (!is.null(self$`vetted`)) {
APIKeyOutObject[['vetted']] <-
self$`vetted`
}
if (!is.null(self$`learnable`)) {
APIKeyOutObject[['learnable']] <-
self$`learnable`
}
if (!is.null(self$`anonymized`)) {
APIKeyOutObject[['anonymized']] <-
self$`anonymized`
}
if (!is.null(self$`partner`)) {
APIKeyOutObject[['partner']] <-
self$`partner`
}
if (!is.null(self$`striped`)) {
APIKeyOutObject[['striped']] <-
self$`striped`
}
if (!is.null(self$`corporate`)) {
APIKeyOutObject[['corporate']] <-
self$`corporate`
}
if (!is.null(self$`disabled`)) {
APIKeyOutObject[['disabled']] <-
self$`disabled`
}
APIKeyOutObject
},
fromJSON = function(APIKeyOutJson) {
APIKeyOutObject <- jsonlite::fromJSON(APIKeyOutJson)
if (!is.null(APIKeyOutObject$`apiKey`)) {
self$`apiKey` <- APIKeyOutObject$`apiKey`
}
if (!is.null(APIKeyOutObject$`userId`)) {
self$`userId` <- APIKeyOutObject$`userId`
}
if (!is.null(APIKeyOutObject$`admin`)) {
self$`admin` <- APIKeyOutObject$`admin`
}
if (!is.null(APIKeyOutObject$`vetted`)) {
self$`vetted` <- APIKeyOutObject$`vetted`
}
if (!is.null(APIKeyOutObject$`learnable`)) {
self$`learnable` <- APIKeyOutObject$`learnable`
}
if (!is.null(APIKeyOutObject$`anonymized`)) {
self$`anonymized` <- APIKeyOutObject$`anonymized`
}
if (!is.null(APIKeyOutObject$`partner`)) {
self$`partner` <- APIKeyOutObject$`partner`
}
if (!is.null(APIKeyOutObject$`striped`)) {
self$`striped` <- APIKeyOutObject$`striped`
}
if (!is.null(APIKeyOutObject$`corporate`)) {
self$`corporate` <- APIKeyOutObject$`corporate`
}
if (!is.null(APIKeyOutObject$`disabled`)) {
self$`disabled` <- APIKeyOutObject$`disabled`
}
},
toJSONString = function() {
jsoncontent <- c(
if (!is.null(self$`apiKey`)) {
sprintf(
'"apiKey":
"%s"
',
self$`apiKey`
)},
if (!is.null(self$`userId`)) {
sprintf(
'"userId":
"%s"
',
self$`userId`
)},
if (!is.null(self$`admin`)) {
sprintf(
'"admin":
"%s"
',
self$`admin`
)},
if (!is.null(self$`vetted`)) {
sprintf(
'"vetted":
"%s"
',
self$`vetted`
)},
if (!is.null(self$`learnable`)) {
sprintf(
'"learnable":
"%s"
',
self$`learnable`
)},
if (!is.null(self$`anonymized`)) {
sprintf(
'"anonymized":
"%s"
',
self$`anonymized`
)},
if (!is.null(self$`partner`)) {
sprintf(
'"partner":
"%s"
',
self$`partner`
)},
if (!is.null(self$`striped`)) {
sprintf(
'"striped":
"%s"
',
self$`striped`
)},
if (!is.null(self$`corporate`)) {
sprintf(
'"corporate":
"%s"
',
self$`corporate`
)},
if (!is.null(self$`disabled`)) {
sprintf(
'"disabled":
"%s"
',
self$`disabled`
)}
)
jsoncontent <- paste(jsoncontent, collapse = ",")
paste('{', jsoncontent, '}', sep = "")
},
fromJSONString = function(APIKeyOutJson) {
APIKeyOutObject <- jsonlite::fromJSON(APIKeyOutJson)
self$`apiKey` <- APIKeyOutObject$`apiKey`
self$`userId` <- APIKeyOutObject$`userId`
self$`admin` <- APIKeyOutObject$`admin`
self$`vetted` <- APIKeyOutObject$`vetted`
self$`learnable` <- APIKeyOutObject$`learnable`
self$`anonymized` <- APIKeyOutObject$`anonymized`
self$`partner` <- APIKeyOutObject$`partner`
self$`striped` <- APIKeyOutObject$`striped`
self$`corporate` <- APIKeyOutObject$`corporate`
self$`disabled` <- APIKeyOutObject$`disabled`
self
}
)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.