R/LogViewer.r

# 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


#' LogViewer Class
#'
#' @field Username 
#' @field Password 
#' @field SvrAddress 
#' @field Protocol 
#' @field Port 
#'
#' @importFrom R6 R6Class
#' @importFrom jsonlite fromJSON toJSON
#' @export
LogViewer <- R6::R6Class(
  'LogViewer',
  public = list(
    `Username` = NULL,
    `Password` = NULL,
    `SvrAddress` = NULL,
    `Protocol` = NULL,
    `Port` = NULL,
    initialize = function(`Username`, `Password`, `SvrAddress`, `Protocol`, `Port`){
      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(`SvrAddress`)) {
        stopifnot(is.character(`SvrAddress`), length(`SvrAddress`) == 1)
        self$`SvrAddress` <- `SvrAddress`
      }
      if (!missing(`Protocol`)) {
        stopifnot(is.character(`Protocol`), length(`Protocol`) == 1)
        self$`Protocol` <- `Protocol`
      }
      if (!missing(`Port`)) {
        stopifnot(is.character(`Port`), length(`Port`) == 1)
        self$`Port` <- `Port`
      }
    },
    toJSON = function() {
      LogViewerObject <- list()
      if (!is.null(self$`Username`)) {
        LogViewerObject[['Username']] <- self$`Username`
      }
      if (!is.null(self$`Password`)) {
        LogViewerObject[['Password']] <- self$`Password`
      }
      if (!is.null(self$`SvrAddress`)) {
        LogViewerObject[['SvrAddress']] <- self$`SvrAddress`
      }
      if (!is.null(self$`Protocol`)) {
        LogViewerObject[['Protocol']] <- self$`Protocol`
      }
      if (!is.null(self$`Port`)) {
        LogViewerObject[['Port']] <- self$`Port`
      }

      LogViewerObject
    },
    fromJSON = function(LogViewerJson) {
      LogViewerObject <- jsonlite::fromJSON(LogViewerJson)
      if (!is.null(LogViewerObject$`Username`)) {
        self$`Username` <- LogViewerObject$`Username`
      }
      if (!is.null(LogViewerObject$`Password`)) {
        self$`Password` <- LogViewerObject$`Password`
      }
      if (!is.null(LogViewerObject$`SvrAddress`)) {
        self$`SvrAddress` <- LogViewerObject$`SvrAddress`
      }
      if (!is.null(LogViewerObject$`Protocol`)) {
        self$`Protocol` <- LogViewerObject$`Protocol`
      }
      if (!is.null(LogViewerObject$`Port`)) {
        self$`Port` <- LogViewerObject$`Port`
      }
    },
    toJSONString = function() {
       sprintf(
        '{
           "Username": %s,
           "Password": %s,
           "SvrAddress": %s,
           "Protocol": %s,
           "Port": %s
        }',
        self$`Username`,
        self$`Password`,
        self$`SvrAddress`,
        self$`Protocol`,
        self$`Port`
      )
    },
    fromJSONString = function(LogViewerJson) {
      LogViewerObject <- jsonlite::fromJSON(LogViewerJson)
      self$`Username` <- LogViewerObject$`Username`
      self$`Password` <- LogViewerObject$`Password`
      self$`SvrAddress` <- LogViewerObject$`SvrAddress`
      self$`Protocol` <- LogViewerObject$`Protocol`
      self$`Port` <- LogViewerObject$`Port`
    }
  )
)
riteshkarvaloc/dkubeR documentation built on Feb. 25, 2021, 9:28 p.m.