# 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 FirstLastNameIn
#' @description FirstLastNameIn Class
#' @format An \code{R6Class} generator object
#' @field id character [optional]
#'
#' @field firstName character [optional]
#'
#' @field lastName character [optional]
#'
#'
#' @importFrom R6 R6Class
#' @importFrom jsonlite fromJSON toJSON
#' @export
FirstLastNameIn <- R6::R6Class(
'FirstLastNameIn',
public = list(
`id` = NULL,
`firstName` = NULL,
`lastName` = NULL,
initialize = function(`id`=NULL, `firstName`=NULL, `lastName`=NULL, ...){
local.optional.var <- list(...)
if (!is.null(`id`)) {
stopifnot(is.character(`id`), length(`id`) == 1)
self$`id` <- `id`
}
if (!is.null(`firstName`)) {
stopifnot(is.character(`firstName`), length(`firstName`) == 1)
self$`firstName` <- `firstName`
}
if (!is.null(`lastName`)) {
stopifnot(is.character(`lastName`), length(`lastName`) == 1)
self$`lastName` <- `lastName`
}
},
toJSON = function() {
FirstLastNameInObject <- list()
if (!is.null(self$`id`)) {
FirstLastNameInObject[['id']] <-
self$`id`
}
if (!is.null(self$`firstName`)) {
FirstLastNameInObject[['firstName']] <-
self$`firstName`
}
if (!is.null(self$`lastName`)) {
FirstLastNameInObject[['lastName']] <-
self$`lastName`
}
FirstLastNameInObject
},
fromJSON = function(FirstLastNameInJson) {
FirstLastNameInObject <- jsonlite::fromJSON(FirstLastNameInJson)
if (!is.null(FirstLastNameInObject$`id`)) {
self$`id` <- FirstLastNameInObject$`id`
}
if (!is.null(FirstLastNameInObject$`firstName`)) {
self$`firstName` <- FirstLastNameInObject$`firstName`
}
if (!is.null(FirstLastNameInObject$`lastName`)) {
self$`lastName` <- FirstLastNameInObject$`lastName`
}
},
toJSONString = function() {
jsoncontent <- c(
if (!is.null(self$`id`)) {
sprintf(
'"id":
"%s"
',
self$`id`
)},
if (!is.null(self$`firstName`)) {
sprintf(
'"firstName":
"%s"
',
self$`firstName`
)},
if (!is.null(self$`lastName`)) {
sprintf(
'"lastName":
"%s"
',
self$`lastName`
)}
)
jsoncontent <- paste(jsoncontent, collapse = ",")
paste('{', jsoncontent, '}', sep = "")
},
fromJSONString = function(FirstLastNameInJson) {
FirstLastNameInObject <- jsonlite::fromJSON(FirstLastNameInJson)
self$`id` <- FirstLastNameInObject$`id`
self$`firstName` <- FirstLastNameInObject$`firstName`
self$`lastName` <- FirstLastNameInObject$`lastName`
self
}
)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.