# Dkube api server
#
# No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
#
# OpenAPI spec version: 2.2.1.11
#
# Generated by: https://github.com/swagger-api/swagger-codegen.git
#' Registry Class
#'
#' @field name
#' @field kind
#' @field iam-role
#' @field username
#' @field password
#' @field token
#'
#' @importFrom R6 R6Class
#' @importFrom jsonlite fromJSON toJSON
#' @export
Registry <- R6::R6Class(
'Registry',
public = list(
`name` = NULL,
`kind` = NULL,
`iam-role` = NULL,
`username` = NULL,
`password` = NULL,
`token` = NULL,
initialize = function(`name`, `kind`, `iam-role`, `username`, `password`, `token`){
if (!missing(`name`)) {
stopifnot(is.character(`name`), length(`name`) == 1)
self$`name` <- `name`
}
if (!missing(`kind`)) {
stopifnot(is.character(`kind`), length(`kind`) == 1)
self$`kind` <- `kind`
}
if (!missing(`iam-role`)) {
stopifnot(is.character(`iam-role`), length(`iam-role`) == 1)
self$`iam-role` <- `iam-role`
}
if (!missing(`username`)) {
stopifnot(is.character(`username`), length(`username`) == 1)
self$`username` <- `username`
}
if (!missing(`password`)) {
stopifnot(is.character(`password`), length(`password`) == 1)
self$`password` <- `password`
}
if (!missing(`token`)) {
stopifnot(is.character(`token`), length(`token`) == 1)
self$`token` <- `token`
}
},
toJSON = function() {
RegistryObject <- list()
if (!is.null(self$`name`)) {
RegistryObject[['name']] <- self$`name`
}
if (!is.null(self$`kind`)) {
RegistryObject[['kind']] <- self$`kind`
}
if (!is.null(self$`iam-role`)) {
RegistryObject[['iam-role']] <- self$`iam-role`
}
if (!is.null(self$`username`)) {
RegistryObject[['username']] <- self$`username`
}
if (!is.null(self$`password`)) {
RegistryObject[['password']] <- self$`password`
}
if (!is.null(self$`token`)) {
RegistryObject[['token']] <- self$`token`
}
RegistryObject
},
fromJSON = function(RegistryJson) {
RegistryObject <- jsonlite::fromJSON(RegistryJson)
if (!is.null(RegistryObject$`name`)) {
self$`name` <- RegistryObject$`name`
}
if (!is.null(RegistryObject$`kind`)) {
self$`kind` <- RegistryObject$`kind`
}
if (!is.null(RegistryObject$`iam-role`)) {
self$`iam-role` <- RegistryObject$`iam-role`
}
if (!is.null(RegistryObject$`username`)) {
self$`username` <- RegistryObject$`username`
}
if (!is.null(RegistryObject$`password`)) {
self$`password` <- RegistryObject$`password`
}
if (!is.null(RegistryObject$`token`)) {
self$`token` <- RegistryObject$`token`
}
},
toJSONString = function() {
sprintf(
'{
"name": %s,
"kind": %s,
"iam-role": %s,
"username": %s,
"password": %s,
"token": %s
}',
self$`name`,
self$`kind`,
self$`iam-role`,
self$`username`,
self$`password`,
self$`token`
)
},
fromJSONString = function(RegistryJson) {
RegistryObject <- jsonlite::fromJSON(RegistryJson)
self$`name` <- RegistryObject$`name`
self$`kind` <- RegistryObject$`kind`
self$`iam-role` <- RegistryObject$`iam-role`
self$`username` <- RegistryObject$`username`
self$`password` <- RegistryObject$`password`
self$`token` <- RegistryObject$`token`
}
)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.