diff --git a/.Rbuildignore b/.Rbuildignore new file mode 100644 index 0000000..75126be --- /dev/null +++ b/.Rbuildignore @@ -0,0 +1,20 @@ +^.*\.Rproj$ # Designates the directory as an RStudio Project +^\.Rproj\.user$ # Used by RStudio for temporary files +^README\.Rmd$ # An Rmd file used to generate README.md +^LICENSE\.md$ # Full text of the license +^cran-comments\.md$ # Comments for CRAN submission +^data-raw$ # Code used to create data included in the package +^pkgdown$ # Resources used for the package website +^_pkgdown\.yml$ # Configuration info for the package website +^\.github$ # Contributing guidelines, CoC, issue templates, etc. +^\.Rhistory$ +^\.gitignore$ +^\.openapi-generator-ignore$ +^\.travis\.yml$ +^\.lintr$ +^\.github$ +^\.openapi-generator$ +^docs$ +^git_push\.sh$ +^openapi\.Rcheck$ +^\.\.Rcheck$ diff --git a/.github/workflows/r-client.yaml b/.github/workflows/r-client.yaml new file mode 100644 index 0000000..90f293b --- /dev/null +++ b/.github/workflows/r-client.yaml @@ -0,0 +1,33 @@ +# This file is automatically generated by openapi-generator (https://openapi-generator.tech) +# +# Based on https://github.com/r-lib/actions/tree/v2/examples +on: + push: + branches: [main, master] + pull_request: + branches: [main, master] + +name: R-CMD-check + +jobs: + R-CMD-check: + runs-on: ubuntu-latest + env: + R_KEEP_PKG_SOURCE: yes + steps: + - uses: actions/checkout@v4 + - uses: r-lib/actions/setup-r@v2 + with: + use-public-rspm: true + - uses: r-lib/actions/setup-r-dependencies@v2 + with: + extra-packages: any::rcmdcheck, any::roxygen2, any::lintr, local::. + needs: check, roxygen2, lint + - name: Lint + run: lintr::lint_package() + shell: Rscript {0} + - name: Roxygenize + run: | + roxygen2::roxygenize('.', roclets = c('rd', 'collate', 'namespace')) + shell: Rscript {0} + - uses: r-lib/actions/check-r-package@v2 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5d21150 --- /dev/null +++ b/.gitignore @@ -0,0 +1,35 @@ +# ref: https://github.com/github/gitignore/blob/master/R.gitignore + +# History files +.Rhistory +.Rapp.history + +# Session Data files +.RData + +# Example code in package build process +*-Ex.R + +# Output files from R CMD build +/*.tar.gz + +# Output files from R CMD check +/*.Rcheck/ + +# RStudio files +.Rproj.user/ + +# produced vignettes +vignettes/*.html +vignettes/*.pdf + +# OAuth2 token, see https://github.com/hadley/httr/releases/tag/v0.3 +.httr-oauth + +# knitr and R markdown default cache directories +/*_cache/ +/cache/ + +# Temporary files created by R markdown +*.utf8.md +*.knit.md diff --git a/.lintr b/.lintr new file mode 100644 index 0000000..54ee36a --- /dev/null +++ b/.lintr @@ -0,0 +1,7 @@ +linters: linters_with_defaults( + line_length_linter(160), + object_name_linter = NULL, + cyclocomp_linter = NULL + ) +exclusions: list( + ) diff --git a/.openapi-generator-ignore b/.openapi-generator-ignore new file mode 100644 index 0000000..7484ee5 --- /dev/null +++ b/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES new file mode 100644 index 0000000..e073125 --- /dev/null +++ b/.openapi-generator/FILES @@ -0,0 +1,49 @@ +.Rbuildignore +.github/workflows/r-client.yaml +.gitignore +.lintr +.openapi-generator-ignore +.travis.yml +DESCRIPTION +NAMESPACE +R/api_client.R +R/api_response.R +R/default_api.R +R/dimension.R +R/get_record_request_body.R +R/get_records_request_body.R +R/get_values_request_body.R +R/group_by_request_body.R +R/http_validation_error.R +R/measure.R +R/order_by_column.R +R/s3_permissions_request.R +R/validation_error.R +R/validation_error_loc_inner.R +README.md +docs/DefaultApi.md +docs/Dimension.md +docs/GetRecordRequestBody.md +docs/GetRecordsRequestBody.md +docs/GetValuesRequestBody.md +docs/GroupByRequestBody.md +docs/HTTPValidationError.md +docs/Measure.md +docs/OrderByColumn.md +docs/S3PermissionsRequest.md +docs/ValidationError.md +docs/ValidationErrorLocInner.md +git_push.sh +tests/testthat.R +tests/testthat/test_default_api.R +tests/testthat/test_dimension.R +tests/testthat/test_get_record_request_body.R +tests/testthat/test_get_records_request_body.R +tests/testthat/test_get_values_request_body.R +tests/testthat/test_group_by_request_body.R +tests/testthat/test_http_validation_error.R +tests/testthat/test_measure.R +tests/testthat/test_order_by_column.R +tests/testthat/test_s3_permissions_request.R +tests/testthat/test_validation_error.R +tests/testthat/test_validation_error_loc_inner.R diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION new file mode 100644 index 0000000..09a6d30 --- /dev/null +++ b/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.8.0 diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..b96a0ef --- /dev/null +++ b/.travis.yml @@ -0,0 +1,18 @@ +# ref: https://docs.travis-ci.com/user/languages/r/ +language: r +cache: + directories: + - /home/travis/R/Library +r_packages: +- jsonlite +- httr +- testthat +# uncomment below to install deps with devtools +#install: +#- R -e 'devtools::install_deps(dep = T)' +script: +- R CMD build . +- R CMD check *tar.gz +- R CMD INSTALL *tar.gz +after_failure: +- cat ${TRAVIS_BUILD_DIR}/namsor.Rcheck/tests/testthat.Rout.fail diff --git a/DESCRIPTION b/DESCRIPTION new file mode 100644 index 0000000..fa8fc17 --- /dev/null +++ b/DESCRIPTION @@ -0,0 +1,15 @@ +Package: laminr.api +Title: R Package Client for FastAPI +Version: 1.0.0 +Author: person("OpenAPI Generator community", email = "team@openapitools.org", role = c("aut", "cre")) +Maintainer: OpenAPI Generator community +Description: No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) +URL: https://github.com/data-intuitive/laminr.api +BugReports: https://github.com/data-intuitive/laminr.api/issues +Depends: R (>= 3.3) +Encoding: UTF-8 +License: Unlicense +LazyData: true +Suggests: testthat +Imports: jsonlite, httr, R6, base64enc, stringr +RoxygenNote: 7.2.1 diff --git a/NAMESPACE b/NAMESPACE new file mode 100644 index 0000000..ba0d259 --- /dev/null +++ b/NAMESPACE @@ -0,0 +1,29 @@ +# Generated by openapi-generator: https://openapi-generator.tech +# Do not edit by hand + +import(R6) +import(jsonlite) +import(httr) +import(base64enc) +import(stringr) + + +# Core +export(ApiClient) +export(ApiResponse) + +# Models +export(Dimension) +export(GetRecordRequestBody) +export(GetRecordsRequestBody) +export(GetValuesRequestBody) +export(GroupByRequestBody) +export(HTTPValidationError) +export(Measure) +export(OrderByColumn) +export(S3PermissionsRequest) +export(ValidationError) +export(ValidationErrorLocInner) + +# APIs +export(DefaultApi) diff --git a/R/api_client.R b/R/api_client.R new file mode 100644 index 0000000..e03bf4c --- /dev/null +++ b/R/api_client.R @@ -0,0 +1,390 @@ +#' FastAPI +#' +#' No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) +#' +#' The version of the OpenAPI document: 0.1.0 +#' Generated by: https://openapi-generator.tech +#' +#' ApiClient Class +#' +#' Generic API client for OpenAPI client library builds. +#' OpenAPI generic API client. This client handles the client- +#' server communication, and is invariant across implementations. Specifics of +#' the methods and models for each application are generated from the OpenAPI Generator +#' templates. +#' +#' NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +#' Ref: https://openapi-generator.tech +#' Do not edit the class manually. +#' +#' @docType class +#' @title ApiClient +#' @description ApiClient Class +#' @format An \code{R6Class} generator object +#' @field base_path Base url +#' @field user_agent Default user agent +#' @field default_headers Default headers +#' @field username Username for HTTP basic authentication +#' @field password Password for HTTP basic authentication +#' @field api_keys API keys +#' @field bearer_token Bearer token +#' @field timeout Default timeout in seconds +#' @field retry_status_codes vector of status codes to retry +#' @field max_retry_attempts maximum number of retries for the status codes +#' @importFrom httr add_headers accept timeout content +#' @export +ApiClient <- R6::R6Class( + "ApiClient", + public = list( + # base path of all requests + base_path = "http://localhost", + # user agent in the HTTP request + user_agent = "OpenAPI-Generator/1.0.0/r", + # default headers in the HTTP request + default_headers = NULL, + # username (HTTP basic authentication) + username = NULL, + # password (HTTP basic authentication) + password = NULL, + # API keys + api_keys = NULL, + # Bearer token + bearer_token = NULL, + # Time Out (seconds) + timeout = NULL, + # Vector of status codes to retry + retry_status_codes = NULL, + # Maximum number of retry attempts for the retry status codes + max_retry_attempts = NULL, + #' Initialize a new ApiClient. + #' + #' @description + #' Initialize a new ApiClient. + #' + #' @param base_path Base path. + #' @param user_agent User agent. + #' @param default_headers Default headers. + #' @param username User name. + #' @param password Password. + #' @param api_keys API keys. + #' @param access_token Access token. + #' @param bearer_token Bearer token. + #' @param timeout Timeout. + #' @param retry_status_codes Status codes for retry. + #' @param max_retry_attempts Maxmium number of retry. + #' @export + initialize = function(base_path = NULL, user_agent = NULL, + default_headers = NULL, + username = NULL, password = NULL, api_keys = NULL, + access_token = NULL, bearer_token = NULL, timeout = NULL, + retry_status_codes = NULL, max_retry_attempts = NULL) { + if (!is.null(base_path)) { + self$base_path <- base_path + } + + if (!is.null(default_headers)) { + self$default_headers <- default_headers + } + + if (!is.null(username)) { + self$username <- username + } + + if (!is.null(password)) { + self$password <- password + } + + if (!is.null(access_token)) { + self$access_token <- access_token + } + + if (!is.null(bearer_token)) { + self$bearer_token <- bearer_token + } + + if (!is.null(api_keys)) { + self$api_keys <- api_keys + } else { + self$api_keys <- list() + } + + if (!is.null(user_agent)) { + self$`user_agent` <- user_agent + } + + if (!is.null(timeout)) { + self$timeout <- timeout + } + + if (!is.null(retry_status_codes)) { + self$retry_status_codes <- retry_status_codes + } + + if (!is.null(max_retry_attempts)) { + self$max_retry_attempts <- max_retry_attempts + } + }, + #' Prepare to make an API call with the retry logic. + #' + #' @description + #' Prepare to make an API call with the retry logic. + #' + #' @param url URL. + #' @param method HTTP method. + #' @param query_params The query parameters. + #' @param header_params The header parameters. + #' @param form_params The form parameters. + #' @param file_params The form parameters for uploading files. + #' @param accepts The list of Accept headers. + #' @param content_types The list of Content-Type headers. + #' @param body The HTTP request body. + #' @param stream_callback Callback function to process the data stream + #' @param ... Other optional arguments. + #' @return HTTP response + #' @export + CallApi = function(url, method, query_params, header_params, form_params, + file_params, accepts, content_types, + body, stream_callback = NULL, ...) { + + resp <- self$Execute(url, method, query_params, header_params, + form_params, file_params, + accepts, content_types, + body, stream_callback = stream_callback, ...) + + if (is.null(self$max_retry_attempts)) { + self$max_retry_attempts <- 3 + } + + if (!is.null(self$retry_status_codes)) { + + for (i in 1 : self$max_retry_attempts) { + if (resp$status_code %in% self$retry_status_codes) { + Sys.sleep((2 ^ i) + stats::runif(n = 1, min = 0, max = 1)) + resp <- self$Execute(url, method, query_params, header_params, + form_params, file_params, accepts, content_types, + body, stream_callback = stream_callback, ...) + } else { + break + } + } + } + + resp + }, + #' Make an API call + #' + #' @description + #' Make an API call + #' + #' @param url URL. + #' @param method HTTP method. + #' @param query_params The query parameters. + #' @param header_params The header parameters. + #' @param form_params The form parameters. + #' @param file_params The form parameters for uploading files. + #' @param accepts The list of Accept headers + #' @param content_types The list of Content-Type headers + #' @param body The HTTP request body. + #' @param stream_callback Callback function to process data stream + #' @param ... Other optional arguments. + #' @return HTTP response + #' @export + Execute = function(url, method, query_params, header_params, + form_params, file_params, + accepts, content_types, + body, stream_callback = NULL, ...) { + headers <- httr::add_headers(c(header_params, self$default_headers)) + + http_timeout <- NULL + if (!is.null(self$timeout)) { + http_timeout <- httr::timeout(self$timeout) + } + + # set HTTP accept header + accept = self$select_header(accepts) + if (!is.null(accept)) { + headers['Accept'] = accept + } + + # set HTTP content-type header + content_type = self$select_header(content_types) + if (!is.null(content_type)) { + headers['Content-Type'] = content_type + } + + if (typeof(stream_callback) == "closure") { # stream data + if (method == "GET") { + httr::GET(url, query = query_params, headers, http_timeout, + httr::user_agent(self$`user_agent`), write_stream(stream_callback), ...) + } else if (method == "POST") { + httr::POST(url, query = query_params, headers, body = body, + httr::content_type("application/json"), http_timeout, + httr::user_agent(self$`user_agent`), write_stream(stream_callback), ...) + } else if (method == "PUT") { + httr::PUT(url, query = query_params, headers, body = body, + httr::content_type("application/json"), http_timeout, + http_timeout, httr::user_agent(self$`user_agent`), write_stream(stream_callback), ...) + } else if (method == "PATCH") { + httr::PATCH(url, query = query_params, headers, body = body, + httr::content_type("application/json"), http_timeout, + http_timeout, httr::user_agent(self$`user_agent`), write_stream(stream_callback), ...) + } else if (method == "HEAD") { + httr::HEAD(url, query = query_params, headers, http_timeout, + http_timeout, httr::user_agent(self$`user_agent`), write_stream(stream_callback), ...) + } else if (method == "DELETE") { + httr::DELETE(url, query = query_params, headers, http_timeout, + http_timeout, httr::user_agent(self$`user_agent`), write_stream(stream_callback), ...) + } else { + err_msg <- "Http method must be `GET`, `HEAD`, `OPTIONS`, `POST`, `PATCH`, `PUT` or `DELETE`." + stop(err_msg) + } + } else { # no streaming + if (method == "GET") { + httr_response <- httr::GET(url, query = query_params, headers, http_timeout, + httr::user_agent(self$`user_agent`), ...) + } else if (method == "POST") { + httr_response <- httr::POST(url, query = query_params, headers, body = body, + httr::content_type("application/json"), http_timeout, + httr::user_agent(self$`user_agent`), ...) + } else if (method == "PUT") { + httr_response <- httr::PUT(url, query = query_params, headers, body = body, + httr::content_type("application/json"), http_timeout, + http_timeout, httr::user_agent(self$`user_agent`), ...) + } else if (method == "PATCH") { + httr_response <- httr::PATCH(url, query = query_params, headers, body = body, + httr::content_type("application/json"), http_timeout, + http_timeout, httr::user_agent(self$`user_agent`), ...) + } else if (method == "HEAD") { + httr_response <- httr::HEAD(url, query = query_params, headers, http_timeout, + http_timeout, httr::user_agent(self$`user_agent`), ...) + } else if (method == "DELETE") { + httr_response <- httr::DELETE(url, query = query_params, headers, http_timeout, + http_timeout, httr::user_agent(self$`user_agent`), ...) + } else { + err_msg <- "Http method must be `GET`, `HEAD`, `OPTIONS`, `POST`, `PATCH`, `PUT` or `DELETE`." + stop(err_msg) + } + + # return ApiResponse + api_response <- ApiResponse$new() + api_response$status_code <- httr::status_code(httr_response) + api_response$status_code_desc <- httr::http_status(httr_response)$reason + api_response$response <- httr::content(httr_response, "raw") + api_response$headers <- httr::headers(httr_response) + + api_response + } + }, + #' Deserialize the content of API response to the given type. + #' + #' @description + #' Deserialize the content of API response to the given type. + #' + #' @param raw_response Raw response. + #' @param return_type R return type. + #' @param pkg_env Package environment. + #' @return Deserialized object. + #' @export + deserialize = function(raw_response, return_type, pkg_env) { + resp_obj <- jsonlite::fromJSON(raw_response) + self$deserializeObj(resp_obj, return_type, pkg_env) + }, + #' Deserialize the response from jsonlite object based on the given type + #' + #' @description + #' Deserialize the response from jsonlite object based on the given type + #' by handling complex and nested types by iterating recursively + #' Example return_types will be like "array[integer]", "map(Pet)", "array[map(Tag)]", etc., + #' + #' @param obj Response object. + #' @param return_type R return type. + #' @param pkg_env Package environment. + #' @return Deserialized object. + #' @export + deserializeObj = function(obj, return_type, pkg_env) { + return_obj <- NULL + primitive_types <- c("character", "numeric", "integer", "logical", "complex") + + # To handle the "map" type + if (startsWith(return_type, "map(")) { + inner_return_type <- regmatches(return_type, + regexec(pattern = "map\\((.*)\\)", return_type))[[1]][2] + return_obj <- lapply(names(obj), function(name) { + self$deserializeObj(obj[[name]], inner_return_type, pkg_env) + }) + names(return_obj) <- names(obj) + } else if (startsWith(return_type, "array[")) { + # To handle the "array" type + inner_return_type <- regmatches(return_type, + regexec(pattern = "array\\[(.*)\\]", return_type))[[1]][2] + if (c(inner_return_type) %in% primitive_types) { + return_obj <- vector("list", length = length(obj)) + if (length(obj) > 0) { + for (row in 1:length(obj)) { + return_obj[[row]] <- self$deserializeObj(obj[row], inner_return_type, pkg_env) + } + } + } else { + if (!is.null(nrow(obj))) { + return_obj <- vector("list", length = nrow(obj)) + if (nrow(obj) > 0) { + for (row in 1:nrow(obj)) { + return_obj[[row]] <- self$deserializeObj(obj[row, , drop = FALSE], + inner_return_type, pkg_env) + } + } + } + } + } else if (exists(return_type, pkg_env) && !(c(return_type) %in% primitive_types)) { + # To handle model objects which are not array or map containers. Ex:"Pet" + return_type <- get(return_type, envir = as.environment(pkg_env)) + return_obj <- return_type$new() + # check if discriminator is defined + if (!is.null(return_obj$`_discriminator_property_name`)) { + data_type <- return_obj$`_discriminator_property_name` + # use discriminator mapping if provided + if (!is.null(return_obj$`_discriminator_mapping_name`)) { + data_type <- (return_obj$`_discriminator_mapping_name`)[[obj[[data_type]]]] + } else { + # no mapping provided, use the value directly + data_type <- obj[[data_type]] + } + # create an object of the mapped type (e.g. Cat) + return_type <- get(data_type, envir = as.environment(pkg_env)) + return_obj <- return_type$new() + } + return_obj$fromJSON( + jsonlite::toJSON(obj, digits = NA, auto_unbox = TRUE) + ) + } else { + # To handle primitive type + return_obj <- obj + } + return_obj + }, + #' Return a property header (for accept or content-type). + #' + #' @description + #' Return a property header (for accept or content-type). If JSON-related MIME is found, + #' return it. Otherwise, return the first one, if any. + #' + #' @param headers A list of headers + #' @return A header (e.g. 'application/json') + #' @export + select_header = function(headers) { + if (length(headers) == 0) { + return(invisible(NULL)) + } else { + for (header in headers) { + if (str_detect(header, "(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$")) { + # return JSON-related MIME + return(header) + } + } + + # not json mime type, simply return the first one + return(headers[1]) + } + } + ) +) diff --git a/R/api_response.R b/R/api_response.R new file mode 100644 index 0000000..25e5ce1 --- /dev/null +++ b/R/api_response.R @@ -0,0 +1,69 @@ +#' FastAPI +#' +#' No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) +#' +#' The version of the OpenAPI document: 0.1.0 +#' Generated by: https://openapi-generator.tech +#' +#' @docType class +#' @title ApiResponse +#' @description ApiResponse Class +#' @format An \code{R6Class} generator object +#' @field content The deserialized response body. +#' @field response The raw response from the endpoint. +#' @field status_code The HTTP response status code. +#' @field status_code_desc The brief description of the HTTP response status code. +#' @field headers The HTTP response headers. +#' @export +ApiResponse <- R6::R6Class( + "ApiResponse", + public = list( + content = NULL, + response = NULL, + status_code = NULL, + status_code_desc = NULL, + headers = NULL, + #' Initialize a new ApiResponse class. + #' + #' @description + #' Initialize a new ApiResponse class. + #' + #' @param content The deserialized response body. + #' @param response The raw response from the endpoint. + #' @param status_code The HTTP response status code. + #' @param status_code_desc The brief description of the HTTP response status code. + #' @param headers The HTTP response headers. + #' @export + initialize = function(content = NULL, + response = NULL, + status_code = NULL, + status_code_desc = NULL, + headers = NULL) { + self$content <- content + self$response <- response + self$status_code <- status_code + self$status_code_desc <- status_code_desc + self$headers <- headers + }, + + #' Return the response as text + #' + #' @description + #' The response is stored as a raw vector. Use this to access the response after + #' converting it to text. If the response is not coercible to text NA is returned. + #' + #' @param from_encoding The encoding of the raw response. + #' @param to_encoding The target encoding of the return value. + #' @export + response_as_text = function(from_encoding = "", to_encoding = "UTF-8") { + if (is.null(self$response)) { + self$response <- charToRaw(jsonlite::toJSON("NULL")) + } + text_response <- iconv(readBin(self$response, character()), from = from_encoding, to = to_encoding) + if (is.na(text_response)) { + warning("The response is binary and will not be converted to text.") + } + return(text_response) + } + ) +) diff --git a/R/default_api.R b/R/default_api.R new file mode 100644 index 0000000..3983bb6 --- /dev/null +++ b/R/default_api.R @@ -0,0 +1,3531 @@ +#' FastAPI +#' +#' No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) +#' +#' The version of the OpenAPI document: 0.1.0 +#' Generated by: https://openapi-generator.tech +#' +#' @docType class +#' @title Default operations +#' @description DefaultApi +#' @format An \code{R6Class} generator object +#' @field api_client Handles the client-server communication. +#' +#' @section Methods: +#' \describe{ +#' \strong{ AddCollaboratorInstancesInstanceIdCollaboratorsAccountIdPut } \emph{ Add Collaborator } +#' +#' \itemize{ +#' \item \emph{ @param } instance_id character +#' \item \emph{ @param } account_id character +#' \item \emph{ @param } schema_id character +#' \item \emph{ @param } role Enum < [admin, write, read] > +#' \item \emph{ @param } authorization character +#' \item \emph{ @returnType } \link{AnyType} \cr +#' +#' +#' \item status code : 200 | Successful Response +#' +#' \item return type : AnyType +#' \item response headers : +#' +#' \tabular{ll}{ +#' } +#' \item status code : 422 | Validation Error +#' +#' \item return type : HTTPValidationError +#' \item response headers : +#' +#' \tabular{ll}{ +#' } +#' } +#' +#' \strong{ CreateInstanceInstancesPut } \emph{ Create Instance } +#' +#' \itemize{ +#' \item \emph{ @param } name character +#' \item \emph{ @param } storage character +#' \item \emph{ @param } schema_str character +#' \item \emph{ @param } db_server_key character +#' \item \emph{ @param } db_server_url character +#' \item \emph{ @param } authorization character +#' \item \emph{ @returnType } \link{AnyType} \cr +#' +#' +#' \item status code : 200 | Successful Response +#' +#' \item return type : AnyType +#' \item response headers : +#' +#' \tabular{ll}{ +#' } +#' \item status code : 422 | Validation Error +#' +#' \item return type : HTTPValidationError +#' \item response headers : +#' +#' \tabular{ll}{ +#' } +#' } +#' +#' \strong{ CreateRecordInstancesInstanceIdModulesModuleNameModelNamePut } \emph{ Create Record } +#' +#' \itemize{ +#' \item \emph{ @param } instance_id character +#' \item \emph{ @param } module_name character +#' \item \emph{ @param } model_name character +#' \item \emph{ @param } schema_id character +#' \item \emph{ @param } body AnyType +#' \item \emph{ @param } authorization character +#' \item \emph{ @returnType } \link{AnyType} \cr +#' +#' +#' \item status code : 200 | Successful Response +#' +#' \item return type : AnyType +#' \item response headers : +#' +#' \tabular{ll}{ +#' } +#' \item status code : 422 | Validation Error +#' +#' \item return type : HTTPValidationError +#' \item response headers : +#' +#' \tabular{ll}{ +#' } +#' } +#' +#' \strong{ DeleteCollaboratorInstancesInstanceIdCollaboratorsAccountIdDelete } \emph{ Delete Collaborator } +#' +#' \itemize{ +#' \item \emph{ @param } instance_id character +#' \item \emph{ @param } account_id character +#' \item \emph{ @param } authorization character +#' \item \emph{ @returnType } \link{AnyType} \cr +#' +#' +#' \item status code : 200 | Successful Response +#' +#' \item return type : AnyType +#' \item response headers : +#' +#' \tabular{ll}{ +#' } +#' \item status code : 422 | Validation Error +#' +#' \item return type : HTTPValidationError +#' \item response headers : +#' +#' \tabular{ll}{ +#' } +#' } +#' +#' \strong{ DeleteInstanceInstancesInstanceIdDelete } \emph{ Delete Instance } +#' +#' \itemize{ +#' \item \emph{ @param } instance_id character +#' \item \emph{ @param } instance_name character +#' \item \emph{ @param } authorization character +#' \item \emph{ @returnType } \link{AnyType} \cr +#' +#' +#' \item status code : 200 | Successful Response +#' +#' \item return type : AnyType +#' \item response headers : +#' +#' \tabular{ll}{ +#' } +#' \item status code : 422 | Validation Error +#' +#' \item return type : HTTPValidationError +#' \item response headers : +#' +#' \tabular{ll}{ +#' } +#' } +#' +#' \strong{ DeleteRecordInstancesInstanceIdModulesModuleNameModelNameUidDelete } \emph{ Delete Record } +#' +#' \itemize{ +#' \item \emph{ @param } instance_id character +#' \item \emph{ @param } module_name character +#' \item \emph{ @param } model_name character +#' \item \emph{ @param } uid character +#' \item \emph{ @param } schema_id character +#' \item \emph{ @param } authorization character +#' \item \emph{ @returnType } \link{AnyType} \cr +#' +#' +#' \item status code : 200 | Successful Response +#' +#' \item return type : AnyType +#' \item response headers : +#' +#' \tabular{ll}{ +#' } +#' \item status code : 422 | Validation Error +#' +#' \item return type : HTTPValidationError +#' \item response headers : +#' +#' \tabular{ll}{ +#' } +#' } +#' +#' \strong{ GeneratePasswordInstancesInstanceIdDbPasswordGet } \emph{ Generate Password } +#' +#' \itemize{ +#' \item \emph{ @param } instance_id character +#' \item \emph{ @param } authorization character +#' \item \emph{ @returnType } \link{AnyType} \cr +#' +#' +#' \item status code : 200 | Successful Response +#' +#' \item return type : AnyType +#' \item response headers : +#' +#' \tabular{ll}{ +#' } +#' \item status code : 422 | Validation Error +#' +#' \item return type : HTTPValidationError +#' \item response headers : +#' +#' \tabular{ll}{ +#' } +#' } +#' +#' \strong{ GenerateUrlInstancesInstanceIdDbUrlGet } \emph{ Generate Url } +#' +#' \itemize{ +#' \item \emph{ @param } instance_id character +#' \item \emph{ @param } authorization character +#' \item \emph{ @returnType } \link{AnyType} \cr +#' +#' +#' \item status code : 200 | Successful Response +#' +#' \item return type : AnyType +#' \item response headers : +#' +#' \tabular{ll}{ +#' } +#' \item status code : 422 | Validation Error +#' +#' \item return type : HTTPValidationError +#' \item response headers : +#' +#' \tabular{ll}{ +#' } +#' } +#' +#' \strong{ GetInstanceStatisticsInstancesInstanceIdStatisticsGet } \emph{ Get Instance Statistics } +#' +#' \itemize{ +#' \item \emph{ @param } instance_id character +#' \item \emph{ @param } schema_id character +#' \item \emph{ @param } q list( character ) +#' \item \emph{ @param } authorization character +#' \item \emph{ @returnType } \link{AnyType} \cr +#' +#' +#' \item status code : 200 | Successful Response +#' +#' \item return type : AnyType +#' \item response headers : +#' +#' \tabular{ll}{ +#' } +#' \item status code : 422 | Validation Error +#' +#' \item return type : HTTPValidationError +#' \item response headers : +#' +#' \tabular{ll}{ +#' } +#' } +#' +#' \strong{ GetNonEmptyTablesInstancesInstanceIdNonEmptyTablesGet } \emph{ Get Non Empty Tables } +#' +#' \itemize{ +#' \item \emph{ @param } instance_id character +#' \item \emph{ @param } schema_id character +#' \item \emph{ @param } authorization character +#' \item \emph{ @returnType } \link{AnyType} \cr +#' +#' +#' \item status code : 200 | Successful Response +#' +#' \item return type : AnyType +#' \item response headers : +#' +#' \tabular{ll}{ +#' } +#' \item status code : 422 | Validation Error +#' +#' \item return type : HTTPValidationError +#' \item response headers : +#' +#' \tabular{ll}{ +#' } +#' } +#' +#' \strong{ GetRecordInstancesInstanceIdModulesModuleNameModelNameIdOrUidPost } \emph{ Get Record } +#' +#' \itemize{ +#' \item \emph{ @param } instance_id character +#' \item \emph{ @param } module_name character +#' \item \emph{ @param } model_name character +#' \item \emph{ @param } id_or_uid character +#' \item \emph{ @param } schema_id character +#' \item \emph{ @param } limit_to_many integer +#' \item \emph{ @param } include_foreign_keys character +#' \item \emph{ @param } authorization character +#' \item \emph{ @param } get_record_request_body \link{GetRecordRequestBody} +#' \item \emph{ @returnType } \link{AnyType} \cr +#' +#' +#' \item status code : 200 | Successful Response +#' +#' \item return type : AnyType +#' \item response headers : +#' +#' \tabular{ll}{ +#' } +#' \item status code : 422 | Validation Error +#' +#' \item return type : HTTPValidationError +#' \item response headers : +#' +#' \tabular{ll}{ +#' } +#' } +#' +#' \strong{ GetRecordsInstancesInstanceIdModulesModuleNameModelNamePost } \emph{ Get Records } +#' +#' \itemize{ +#' \item \emph{ @param } instance_id character +#' \item \emph{ @param } module_name character +#' \item \emph{ @param } model_name character +#' \item \emph{ @param } schema_id character +#' \item \emph{ @param } limit integer +#' \item \emph{ @param } offset integer +#' \item \emph{ @param } limit_to_many integer +#' \item \emph{ @param } include_foreign_keys character +#' \item \emph{ @param } authorization character +#' \item \emph{ @param } get_records_request_body \link{GetRecordsRequestBody} +#' \item \emph{ @returnType } \link{AnyType} \cr +#' +#' +#' \item status code : 200 | Successful Response +#' +#' \item return type : AnyType +#' \item response headers : +#' +#' \tabular{ll}{ +#' } +#' \item status code : 422 | Validation Error +#' +#' \item return type : HTTPValidationError +#' \item response headers : +#' +#' \tabular{ll}{ +#' } +#' } +#' +#' \strong{ GetRelationsInstancesInstanceIdSchemaModuleNameModelNameGet } \emph{ Get Relations } +#' +#' \itemize{ +#' \item \emph{ @param } module_name character +#' \item \emph{ @param } model_name character +#' \item \emph{ @param } instance_id character +#' \item \emph{ @param } authorization character +#' \item \emph{ @returnType } \link{AnyType} \cr +#' +#' +#' \item status code : 200 | Successful Response +#' +#' \item return type : AnyType +#' \item response headers : +#' +#' \tabular{ll}{ +#' } +#' \item status code : 422 | Validation Error +#' +#' \item return type : HTTPValidationError +#' \item response headers : +#' +#' \tabular{ll}{ +#' } +#' } +#' +#' \strong{ GetSchemaInstancesInstanceIdSchemaGet } \emph{ Get Schema } +#' +#' \itemize{ +#' \item \emph{ @param } instance_id character +#' \item \emph{ @param } authorization character +#' \item \emph{ @returnType } \link{AnyType} \cr +#' +#' +#' \item status code : 200 | Successful Response +#' +#' \item return type : AnyType +#' \item response headers : +#' +#' \tabular{ll}{ +#' } +#' \item status code : 422 | Validation Error +#' +#' \item return type : HTTPValidationError +#' \item response headers : +#' +#' \tabular{ll}{ +#' } +#' } +#' +#' \strong{ GetValuesInstancesInstanceIdModulesModuleNameModelNameFieldsFieldPathPost } \emph{ Get Values } +#' +#' \itemize{ +#' \item \emph{ @param } instance_id character +#' \item \emph{ @param } module_name character +#' \item \emph{ @param } model_name character +#' \item \emph{ @param } field_path character +#' \item \emph{ @param } schema_id character +#' \item \emph{ @param } limit integer +#' \item \emph{ @param } offset integer +#' \item \emph{ @param } authorization character +#' \item \emph{ @param } get_values_request_body \link{GetValuesRequestBody} +#' \item \emph{ @returnType } \link{AnyType} \cr +#' +#' +#' \item status code : 200 | Successful Response +#' +#' \item return type : AnyType +#' \item response headers : +#' +#' \tabular{ll}{ +#' } +#' \item status code : 422 | Validation Error +#' +#' \item return type : HTTPValidationError +#' \item response headers : +#' +#' \tabular{ll}{ +#' } +#' } +#' +#' \strong{ GrantS3PermissionsStoragesS3BucketNamePermissionsPut } \emph{ Grant S3 Permissions } +#' +#' \itemize{ +#' \item \emph{ @param } bucket_name character +#' \item \emph{ @param } s3_permissions_request \link{S3PermissionsRequest} +#' \item \emph{ @param } aws_account_id character +#' \item \emph{ @param } aws_user_name character +#' \item \emph{ @param } authorization character +#' \item \emph{ @returnType } \link{AnyType} \cr +#' +#' +#' \item status code : 200 | Successful Response +#' +#' \item return type : AnyType +#' \item response headers : +#' +#' \tabular{ll}{ +#' } +#' \item status code : 422 | Validation Error +#' +#' \item return type : HTTPValidationError +#' \item response headers : +#' +#' \tabular{ll}{ +#' } +#' } +#' +#' \strong{ GroupByInstancesInstanceIdModulesModuleNameModelNameGroupByPost } \emph{ Group By } +#' +#' \itemize{ +#' \item \emph{ @param } instance_id character +#' \item \emph{ @param } module_name character +#' \item \emph{ @param } model_name character +#' \item \emph{ @param } schema_id character +#' \item \emph{ @param } group_by_request_body \link{GroupByRequestBody} +#' \item \emph{ @param } authorization character +#' \item \emph{ @returnType } \link{AnyType} \cr +#' +#' +#' \item status code : 200 | Successful Response +#' +#' \item return type : AnyType +#' \item response headers : +#' +#' \tabular{ll}{ +#' } +#' \item status code : 422 | Validation Error +#' +#' \item return type : HTTPValidationError +#' \item response headers : +#' +#' \tabular{ll}{ +#' } +#' } +#' +#' \strong{ TransferOwnershipInstancesInstanceIdOwnerHandlePatch } \emph{ Transfer Ownership } +#' +#' \itemize{ +#' \item \emph{ @param } instance_id character +#' \item \emph{ @param } handle character +#' \item \emph{ @param } schema_id character +#' \item \emph{ @param } authorization character +#' \item \emph{ @returnType } \link{AnyType} \cr +#' +#' +#' \item status code : 200 | Successful Response +#' +#' \item return type : AnyType +#' \item response headers : +#' +#' \tabular{ll}{ +#' } +#' \item status code : 422 | Validation Error +#' +#' \item return type : HTTPValidationError +#' \item response headers : +#' +#' \tabular{ll}{ +#' } +#' } +#' +#' \strong{ UpdateCollaboratorInstancesInstanceIdCollaboratorsAccountIdPatch } \emph{ Update Collaborator } +#' +#' \itemize{ +#' \item \emph{ @param } instance_id character +#' \item \emph{ @param } account_id character +#' \item \emph{ @param } role Enum < [admin, write, read] > +#' \item \emph{ @param } authorization character +#' \item \emph{ @returnType } \link{AnyType} \cr +#' +#' +#' \item status code : 200 | Successful Response +#' +#' \item return type : AnyType +#' \item response headers : +#' +#' \tabular{ll}{ +#' } +#' \item status code : 422 | Validation Error +#' +#' \item return type : HTTPValidationError +#' \item response headers : +#' +#' \tabular{ll}{ +#' } +#' } +#' +#' \strong{ UpdateRecordInstancesInstanceIdModulesModuleNameModelNameUidPatch } \emph{ Update Record } +#' +#' \itemize{ +#' \item \emph{ @param } instance_id character +#' \item \emph{ @param } module_name character +#' \item \emph{ @param } model_name character +#' \item \emph{ @param } uid character +#' \item \emph{ @param } schema_id character +#' \item \emph{ @param } body AnyType +#' \item \emph{ @param } authorization character +#' \item \emph{ @returnType } \link{AnyType} \cr +#' +#' +#' \item status code : 200 | Successful Response +#' +#' \item return type : AnyType +#' \item response headers : +#' +#' \tabular{ll}{ +#' } +#' \item status code : 422 | Validation Error +#' +#' \item return type : HTTPValidationError +#' \item response headers : +#' +#' \tabular{ll}{ +#' } +#' } +#' +#' } +#' +#' +#' @examples +#' \dontrun{ +#' #################### AddCollaboratorInstancesInstanceIdCollaboratorsAccountIdPut #################### +#' +#' library(openapi) +#' var_instance_id <- "instance_id_example" # character | +#' var_account_id <- "account_id_example" # character | +#' var_schema_id <- "schema_id_example" # character | +#' var_role <- "read" # character | (Optional) +#' var_authorization <- "authorization_example" # character | (Optional) +#' +#' #Add Collaborator +#' api_instance <- DefaultApi$new() +#' +#' # to save the result into a file, simply add the optional `data_file` parameter, e.g. +#' # result <- api_instance$AddCollaboratorInstancesInstanceIdCollaboratorsAccountIdPut(var_instance_id, var_account_id, var_schema_id, role = var_role, authorization = var_authorizationdata_file = "result.txt") +#' result <- api_instance$AddCollaboratorInstancesInstanceIdCollaboratorsAccountIdPut(var_instance_id, var_account_id, var_schema_id, role = var_role, authorization = var_authorization) +#' dput(result) +#' +#' +#' #################### CreateInstanceInstancesPut #################### +#' +#' library(openapi) +#' var_name <- "name_example" # character | +#' var_storage <- "create-s3" # character | (Optional) +#' var_schema_str <- "schema_str_example" # character | (Optional) +#' var_db_server_key <- "db_server_key_example" # character | (Optional) +#' var_db_server_url <- "db_server_url_example" # character | (Optional) +#' var_authorization <- "authorization_example" # character | (Optional) +#' +#' #Create Instance +#' api_instance <- DefaultApi$new() +#' +#' # to save the result into a file, simply add the optional `data_file` parameter, e.g. +#' # result <- api_instance$CreateInstanceInstancesPut(var_name, storage = var_storage, schema_str = var_schema_str, db_server_key = var_db_server_key, db_server_url = var_db_server_url, authorization = var_authorizationdata_file = "result.txt") +#' result <- api_instance$CreateInstanceInstancesPut(var_name, storage = var_storage, schema_str = var_schema_str, db_server_key = var_db_server_key, db_server_url = var_db_server_url, authorization = var_authorization) +#' dput(result) +#' +#' +#' #################### CreateRecordInstancesInstanceIdModulesModuleNameModelNamePut #################### +#' +#' library(openapi) +#' var_instance_id <- "instance_id_example" # character | +#' var_module_name <- "module_name_example" # character | +#' var_model_name <- "model_name_example" # character | +#' var_schema_id <- "schema_id_example" # character | +#' var_body <- TODO # AnyType | +#' var_authorization <- "authorization_example" # character | (Optional) +#' +#' #Create Record +#' api_instance <- DefaultApi$new() +#' +#' # to save the result into a file, simply add the optional `data_file` parameter, e.g. +#' # result <- api_instance$CreateRecordInstancesInstanceIdModulesModuleNameModelNamePut(var_instance_id, var_module_name, var_model_name, var_schema_id, var_body, authorization = var_authorizationdata_file = "result.txt") +#' result <- api_instance$CreateRecordInstancesInstanceIdModulesModuleNameModelNamePut(var_instance_id, var_module_name, var_model_name, var_schema_id, var_body, authorization = var_authorization) +#' dput(result) +#' +#' +#' #################### DeleteCollaboratorInstancesInstanceIdCollaboratorsAccountIdDelete #################### +#' +#' library(openapi) +#' var_instance_id <- "instance_id_example" # character | +#' var_account_id <- "account_id_example" # character | +#' var_authorization <- "authorization_example" # character | (Optional) +#' +#' #Delete Collaborator +#' api_instance <- DefaultApi$new() +#' +#' # to save the result into a file, simply add the optional `data_file` parameter, e.g. +#' # result <- api_instance$DeleteCollaboratorInstancesInstanceIdCollaboratorsAccountIdDelete(var_instance_id, var_account_id, authorization = var_authorizationdata_file = "result.txt") +#' result <- api_instance$DeleteCollaboratorInstancesInstanceIdCollaboratorsAccountIdDelete(var_instance_id, var_account_id, authorization = var_authorization) +#' dput(result) +#' +#' +#' #################### DeleteInstanceInstancesInstanceIdDelete #################### +#' +#' library(openapi) +#' var_instance_id <- "instance_id_example" # character | +#' var_instance_name <- "instance_name_example" # character | +#' var_authorization <- "authorization_example" # character | (Optional) +#' +#' #Delete Instance +#' api_instance <- DefaultApi$new() +#' +#' # to save the result into a file, simply add the optional `data_file` parameter, e.g. +#' # result <- api_instance$DeleteInstanceInstancesInstanceIdDelete(var_instance_id, var_instance_name, authorization = var_authorizationdata_file = "result.txt") +#' result <- api_instance$DeleteInstanceInstancesInstanceIdDelete(var_instance_id, var_instance_name, authorization = var_authorization) +#' dput(result) +#' +#' +#' #################### DeleteRecordInstancesInstanceIdModulesModuleNameModelNameUidDelete #################### +#' +#' library(openapi) +#' var_instance_id <- "instance_id_example" # character | +#' var_module_name <- "module_name_example" # character | +#' var_model_name <- "model_name_example" # character | +#' var_uid <- "uid_example" # character | +#' var_schema_id <- "schema_id_example" # character | +#' var_authorization <- "authorization_example" # character | (Optional) +#' +#' #Delete Record +#' api_instance <- DefaultApi$new() +#' +#' # to save the result into a file, simply add the optional `data_file` parameter, e.g. +#' # result <- api_instance$DeleteRecordInstancesInstanceIdModulesModuleNameModelNameUidDelete(var_instance_id, var_module_name, var_model_name, var_uid, var_schema_id, authorization = var_authorizationdata_file = "result.txt") +#' result <- api_instance$DeleteRecordInstancesInstanceIdModulesModuleNameModelNameUidDelete(var_instance_id, var_module_name, var_model_name, var_uid, var_schema_id, authorization = var_authorization) +#' dput(result) +#' +#' +#' #################### GeneratePasswordInstancesInstanceIdDbPasswordGet #################### +#' +#' library(openapi) +#' var_instance_id <- "instance_id_example" # character | +#' var_authorization <- "authorization_example" # character | (Optional) +#' +#' #Generate Password +#' api_instance <- DefaultApi$new() +#' +#' # to save the result into a file, simply add the optional `data_file` parameter, e.g. +#' # result <- api_instance$GeneratePasswordInstancesInstanceIdDbPasswordGet(var_instance_id, authorization = var_authorizationdata_file = "result.txt") +#' result <- api_instance$GeneratePasswordInstancesInstanceIdDbPasswordGet(var_instance_id, authorization = var_authorization) +#' dput(result) +#' +#' +#' #################### GenerateUrlInstancesInstanceIdDbUrlGet #################### +#' +#' library(openapi) +#' var_instance_id <- "instance_id_example" # character | +#' var_authorization <- "authorization_example" # character | (Optional) +#' +#' #Generate Url +#' api_instance <- DefaultApi$new() +#' +#' # to save the result into a file, simply add the optional `data_file` parameter, e.g. +#' # result <- api_instance$GenerateUrlInstancesInstanceIdDbUrlGet(var_instance_id, authorization = var_authorizationdata_file = "result.txt") +#' result <- api_instance$GenerateUrlInstancesInstanceIdDbUrlGet(var_instance_id, authorization = var_authorization) +#' dput(result) +#' +#' +#' #################### GetInstanceStatisticsInstancesInstanceIdStatisticsGet #################### +#' +#' library(openapi) +#' var_instance_id <- "instance_id_example" # character | +#' var_schema_id <- "schema_id_example" # character | +#' var_q <- c("inner_example") # array[character] | In ${module}.${model} format (case-sensitive) (Optional) +#' var_authorization <- "authorization_example" # character | (Optional) +#' +#' #Get Instance Statistics +#' api_instance <- DefaultApi$new() +#' +#' # to save the result into a file, simply add the optional `data_file` parameter, e.g. +#' # result <- api_instance$GetInstanceStatisticsInstancesInstanceIdStatisticsGet(var_instance_id, var_schema_id, q = var_q, authorization = var_authorizationdata_file = "result.txt") +#' result <- api_instance$GetInstanceStatisticsInstancesInstanceIdStatisticsGet(var_instance_id, var_schema_id, q = var_q, authorization = var_authorization) +#' dput(result) +#' +#' +#' #################### GetNonEmptyTablesInstancesInstanceIdNonEmptyTablesGet #################### +#' +#' library(openapi) +#' var_instance_id <- "instance_id_example" # character | +#' var_schema_id <- "schema_id_example" # character | +#' var_authorization <- "authorization_example" # character | (Optional) +#' +#' #Get Non Empty Tables +#' api_instance <- DefaultApi$new() +#' +#' # to save the result into a file, simply add the optional `data_file` parameter, e.g. +#' # result <- api_instance$GetNonEmptyTablesInstancesInstanceIdNonEmptyTablesGet(var_instance_id, var_schema_id, authorization = var_authorizationdata_file = "result.txt") +#' result <- api_instance$GetNonEmptyTablesInstancesInstanceIdNonEmptyTablesGet(var_instance_id, var_schema_id, authorization = var_authorization) +#' dput(result) +#' +#' +#' #################### GetRecordInstancesInstanceIdModulesModuleNameModelNameIdOrUidPost #################### +#' +#' library(openapi) +#' var_instance_id <- "instance_id_example" # character | +#' var_module_name <- "module_name_example" # character | +#' var_model_name <- "model_name_example" # character | +#' var_id_or_uid <- "id_or_uid_example" # character | +#' var_schema_id <- "schema_id_example" # character | +#' var_limit_to_many <- 10 # integer | (Optional) +#' var_include_foreign_keys <- FALSE # character | (Optional) +#' var_authorization <- "authorization_example" # character | (Optional) +#' var_get_record_request_body <- GetRecordRequestBody$new(c("select_example")) # GetRecordRequestBody | (Optional) +#' +#' #Get Record +#' api_instance <- DefaultApi$new() +#' +#' # to save the result into a file, simply add the optional `data_file` parameter, e.g. +#' # result <- api_instance$GetRecordInstancesInstanceIdModulesModuleNameModelNameIdOrUidPost(var_instance_id, var_module_name, var_model_name, var_id_or_uid, var_schema_id, limit_to_many = var_limit_to_many, include_foreign_keys = var_include_foreign_keys, authorization = var_authorization, get_record_request_body = var_get_record_request_bodydata_file = "result.txt") +#' result <- api_instance$GetRecordInstancesInstanceIdModulesModuleNameModelNameIdOrUidPost(var_instance_id, var_module_name, var_model_name, var_id_or_uid, var_schema_id, limit_to_many = var_limit_to_many, include_foreign_keys = var_include_foreign_keys, authorization = var_authorization, get_record_request_body = var_get_record_request_body) +#' dput(result) +#' +#' +#' #################### GetRecordsInstancesInstanceIdModulesModuleNameModelNamePost #################### +#' +#' library(openapi) +#' var_instance_id <- "instance_id_example" # character | +#' var_module_name <- "module_name_example" # character | +#' var_model_name <- "model_name_example" # character | +#' var_schema_id <- "schema_id_example" # character | +#' var_limit <- 50 # integer | (Optional) +#' var_offset <- 0 # integer | (Optional) +#' var_limit_to_many <- 10 # integer | (Optional) +#' var_include_foreign_keys <- FALSE # character | (Optional) +#' var_authorization <- "authorization_example" # character | (Optional) +#' var_get_records_request_body <- GetRecordsRequestBody$new(c("select_example"), 123, c(OrderByColumn$new("field_example", "descending_example")), "search_example") # GetRecordsRequestBody | (Optional) +#' +#' #Get Records +#' api_instance <- DefaultApi$new() +#' +#' # to save the result into a file, simply add the optional `data_file` parameter, e.g. +#' # result <- api_instance$GetRecordsInstancesInstanceIdModulesModuleNameModelNamePost(var_instance_id, var_module_name, var_model_name, var_schema_id, limit = var_limit, offset = var_offset, limit_to_many = var_limit_to_many, include_foreign_keys = var_include_foreign_keys, authorization = var_authorization, get_records_request_body = var_get_records_request_bodydata_file = "result.txt") +#' result <- api_instance$GetRecordsInstancesInstanceIdModulesModuleNameModelNamePost(var_instance_id, var_module_name, var_model_name, var_schema_id, limit = var_limit, offset = var_offset, limit_to_many = var_limit_to_many, include_foreign_keys = var_include_foreign_keys, authorization = var_authorization, get_records_request_body = var_get_records_request_body) +#' dput(result) +#' +#' +#' #################### GetRelationsInstancesInstanceIdSchemaModuleNameModelNameGet #################### +#' +#' library(openapi) +#' var_module_name <- "module_name_example" # character | +#' var_model_name <- "model_name_example" # character | +#' var_instance_id <- "instance_id_example" # character | +#' var_authorization <- "authorization_example" # character | (Optional) +#' +#' #Get Relations +#' api_instance <- DefaultApi$new() +#' +#' # to save the result into a file, simply add the optional `data_file` parameter, e.g. +#' # result <- api_instance$GetRelationsInstancesInstanceIdSchemaModuleNameModelNameGet(var_module_name, var_model_name, var_instance_id, authorization = var_authorizationdata_file = "result.txt") +#' result <- api_instance$GetRelationsInstancesInstanceIdSchemaModuleNameModelNameGet(var_module_name, var_model_name, var_instance_id, authorization = var_authorization) +#' dput(result) +#' +#' +#' #################### GetSchemaInstancesInstanceIdSchemaGet #################### +#' +#' library(openapi) +#' var_instance_id <- "instance_id_example" # character | +#' var_authorization <- "authorization_example" # character | (Optional) +#' +#' #Get Schema +#' api_instance <- DefaultApi$new() +#' +#' # to save the result into a file, simply add the optional `data_file` parameter, e.g. +#' # result <- api_instance$GetSchemaInstancesInstanceIdSchemaGet(var_instance_id, authorization = var_authorizationdata_file = "result.txt") +#' result <- api_instance$GetSchemaInstancesInstanceIdSchemaGet(var_instance_id, authorization = var_authorization) +#' dput(result) +#' +#' +#' #################### GetValuesInstancesInstanceIdModulesModuleNameModelNameFieldsFieldPathPost #################### +#' +#' library(openapi) +#' var_instance_id <- "instance_id_example" # character | +#' var_module_name <- "module_name_example" # character | +#' var_model_name <- "model_name_example" # character | +#' var_field_path <- "field_path_example" # character | +#' var_schema_id <- "schema_id_example" # character | +#' var_limit <- 50 # integer | (Optional) +#' var_offset <- 0 # integer | (Optional) +#' var_authorization <- "authorization_example" # character | (Optional) +#' var_get_values_request_body <- GetValuesRequestBody$new(123, c(OrderByColumn$new("field_example", "descending_example")), "search_example") # GetValuesRequestBody | (Optional) +#' +#' #Get Values +#' api_instance <- DefaultApi$new() +#' +#' # to save the result into a file, simply add the optional `data_file` parameter, e.g. +#' # result <- api_instance$GetValuesInstancesInstanceIdModulesModuleNameModelNameFieldsFieldPathPost(var_instance_id, var_module_name, var_model_name, var_field_path, var_schema_id, limit = var_limit, offset = var_offset, authorization = var_authorization, get_values_request_body = var_get_values_request_bodydata_file = "result.txt") +#' result <- api_instance$GetValuesInstancesInstanceIdModulesModuleNameModelNameFieldsFieldPathPost(var_instance_id, var_module_name, var_model_name, var_field_path, var_schema_id, limit = var_limit, offset = var_offset, authorization = var_authorization, get_values_request_body = var_get_values_request_body) +#' dput(result) +#' +#' +#' #################### GrantS3PermissionsStoragesS3BucketNamePermissionsPut #################### +#' +#' library(openapi) +#' var_bucket_name <- "bucket_name_example" # character | +#' var_s3_permissions_request <- S3PermissionsRequest$new("aws_access_key_id_example", "aws_secret_access_key_example", "region_example") # S3PermissionsRequest | +#' var_aws_account_id <- "767398070972" # character | (Optional) +#' var_aws_user_name <- "lamin-manager" # character | (Optional) +#' var_authorization <- "authorization_example" # character | (Optional) +#' +#' #Grant S3 Permissions +#' api_instance <- DefaultApi$new() +#' +#' # to save the result into a file, simply add the optional `data_file` parameter, e.g. +#' # result <- api_instance$GrantS3PermissionsStoragesS3BucketNamePermissionsPut(var_bucket_name, var_s3_permissions_request, aws_account_id = var_aws_account_id, aws_user_name = var_aws_user_name, authorization = var_authorizationdata_file = "result.txt") +#' result <- api_instance$GrantS3PermissionsStoragesS3BucketNamePermissionsPut(var_bucket_name, var_s3_permissions_request, aws_account_id = var_aws_account_id, aws_user_name = var_aws_user_name, authorization = var_authorization) +#' dput(result) +#' +#' +#' #################### GroupByInstancesInstanceIdModulesModuleNameModelNameGroupByPost #################### +#' +#' library(openapi) +#' var_instance_id <- "instance_id_example" # character | +#' var_module_name <- "module_name_example" # character | +#' var_model_name <- "model_name_example" # character | +#' var_schema_id <- "schema_id_example" # character | +#' var_group_by_request_body <- GroupByRequestBody$new(c(Dimension$new("field_name_example", "count")), c(Measure$new("field_name_example", "count", "alias_example")), 123) # GroupByRequestBody | +#' var_authorization <- "authorization_example" # character | (Optional) +#' +#' #Group By +#' api_instance <- DefaultApi$new() +#' +#' # to save the result into a file, simply add the optional `data_file` parameter, e.g. +#' # result <- api_instance$GroupByInstancesInstanceIdModulesModuleNameModelNameGroupByPost(var_instance_id, var_module_name, var_model_name, var_schema_id, var_group_by_request_body, authorization = var_authorizationdata_file = "result.txt") +#' result <- api_instance$GroupByInstancesInstanceIdModulesModuleNameModelNameGroupByPost(var_instance_id, var_module_name, var_model_name, var_schema_id, var_group_by_request_body, authorization = var_authorization) +#' dput(result) +#' +#' +#' #################### TransferOwnershipInstancesInstanceIdOwnerHandlePatch #################### +#' +#' library(openapi) +#' var_instance_id <- "instance_id_example" # character | +#' var_handle <- "handle_example" # character | +#' var_schema_id <- "schema_id_example" # character | +#' var_authorization <- "authorization_example" # character | (Optional) +#' +#' #Transfer Ownership +#' api_instance <- DefaultApi$new() +#' +#' # to save the result into a file, simply add the optional `data_file` parameter, e.g. +#' # result <- api_instance$TransferOwnershipInstancesInstanceIdOwnerHandlePatch(var_instance_id, var_handle, var_schema_id, authorization = var_authorizationdata_file = "result.txt") +#' result <- api_instance$TransferOwnershipInstancesInstanceIdOwnerHandlePatch(var_instance_id, var_handle, var_schema_id, authorization = var_authorization) +#' dput(result) +#' +#' +#' #################### UpdateCollaboratorInstancesInstanceIdCollaboratorsAccountIdPatch #################### +#' +#' library(openapi) +#' var_instance_id <- "instance_id_example" # character | +#' var_account_id <- "account_id_example" # character | +#' var_role <- "role_example" # character | +#' var_authorization <- "authorization_example" # character | (Optional) +#' +#' #Update Collaborator +#' api_instance <- DefaultApi$new() +#' +#' # to save the result into a file, simply add the optional `data_file` parameter, e.g. +#' # result <- api_instance$UpdateCollaboratorInstancesInstanceIdCollaboratorsAccountIdPatch(var_instance_id, var_account_id, var_role, authorization = var_authorizationdata_file = "result.txt") +#' result <- api_instance$UpdateCollaboratorInstancesInstanceIdCollaboratorsAccountIdPatch(var_instance_id, var_account_id, var_role, authorization = var_authorization) +#' dput(result) +#' +#' +#' #################### UpdateRecordInstancesInstanceIdModulesModuleNameModelNameUidPatch #################### +#' +#' library(openapi) +#' var_instance_id <- "instance_id_example" # character | +#' var_module_name <- "module_name_example" # character | +#' var_model_name <- "model_name_example" # character | +#' var_uid <- "uid_example" # character | +#' var_schema_id <- "schema_id_example" # character | +#' var_body <- TODO # AnyType | +#' var_authorization <- "authorization_example" # character | (Optional) +#' +#' #Update Record +#' api_instance <- DefaultApi$new() +#' +#' # to save the result into a file, simply add the optional `data_file` parameter, e.g. +#' # result <- api_instance$UpdateRecordInstancesInstanceIdModulesModuleNameModelNameUidPatch(var_instance_id, var_module_name, var_model_name, var_uid, var_schema_id, var_body, authorization = var_authorizationdata_file = "result.txt") +#' result <- api_instance$UpdateRecordInstancesInstanceIdModulesModuleNameModelNameUidPatch(var_instance_id, var_module_name, var_model_name, var_uid, var_schema_id, var_body, authorization = var_authorization) +#' dput(result) +#' +#' +#' } +#' @importFrom R6 R6Class +#' @importFrom base64enc base64encode +#' @export +DefaultApi <- R6::R6Class( + "DefaultApi", + public = list( + api_client = NULL, + #' Initialize a new DefaultApi. + #' + #' @description + #' Initialize a new DefaultApi. + #' + #' @param api_client An instance of API client. + #' @export + initialize = function(api_client) { + if (!missing(api_client)) { + self$api_client <- api_client + } else { + self$api_client <- ApiClient$new() + } + }, + #' Add Collaborator + #' + #' @description + #' Add Collaborator + #' + #' @param instance_id + #' @param account_id + #' @param schema_id + #' @param role (optional) No description (default value: "read") + #' @param authorization (optional) No description + #' @param data_file (optional) name of the data file to save the result + #' @param ... Other optional arguments + #' @return AnyType + #' @export + AddCollaboratorInstancesInstanceIdCollaboratorsAccountIdPut = function(instance_id, account_id, schema_id, role = "read", authorization = NULL, data_file = NULL, ...) { + local_var_response <- self$AddCollaboratorInstancesInstanceIdCollaboratorsAccountIdPutWithHttpInfo(instance_id, account_id, schema_id, role, authorization, data_file = data_file, ...) + if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { + local_var_response$content + } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { + local_var_response + } else if (local_var_response$status_code >= 400 && local_var_response$status_code <= 499) { + local_var_response + } else if (local_var_response$status_code >= 500 && local_var_response$status_code <= 599) { + local_var_response + } + }, + #' Add Collaborator + #' + #' @description + #' Add Collaborator + #' + #' @param instance_id + #' @param account_id + #' @param schema_id + #' @param role (optional) No description (default value: "read") + #' @param authorization (optional) No description + #' @param data_file (optional) name of the data file to save the result + #' @param ... Other optional arguments + #' @return API response (AnyType) with additional information such as HTTP status code, headers + #' @export + AddCollaboratorInstancesInstanceIdCollaboratorsAccountIdPutWithHttpInfo = function(instance_id, account_id, schema_id, role = "read", authorization = NULL, data_file = NULL, ...) { + args <- list(...) + query_params <- list() + header_params <- c() + form_params <- list() + file_params <- list() + local_var_body <- NULL + oauth_scopes <- NULL + is_oauth <- FALSE + + if (missing(`instance_id`)) { + stop("Missing required parameter `instance_id`.") + } + + if (missing(`account_id`)) { + stop("Missing required parameter `account_id`.") + } + + if (missing(`schema_id`)) { + stop("Missing required parameter `schema_id`.") + } + + + + + + + header_params["Authorization"] <- `authorization` + + query_params[["schema_id"]] <- `schema_id` + + if (!(`role` %in% c("admin", "write", "read"))) { + stop("Invalid value for role when calling DefaultApi$AddCollaboratorInstancesInstanceIdCollaboratorsAccountIdPut. Must be [admin, write, read].") + } + query_params[["role"]] <- `role` + + local_var_url_path <- "/instances/{instance_id}/collaborators/{account_id}" + if (!missing(`instance_id`)) { + local_var_url_path <- gsub("\\{instance_id\\}", URLencode(as.character(`instance_id`), reserved = TRUE), local_var_url_path) + } + + if (!missing(`account_id`)) { + local_var_url_path <- gsub("\\{account_id\\}", URLencode(as.character(`account_id`), reserved = TRUE), local_var_url_path) + } + + + # The Accept request HTTP header + local_var_accepts <- list("application/json") + + # The Content-Type representation header + local_var_content_types <- list() + + local_var_resp <- self$api_client$CallApi(url = paste0(self$api_client$base_path, local_var_url_path), + method = "PUT", + query_params = query_params, + header_params = header_params, + form_params = form_params, + file_params = file_params, + accepts = local_var_accepts, + content_types = local_var_content_types, + body = local_var_body, + is_oauth = is_oauth, + oauth_scopes = oauth_scopes, + ...) + + if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { + # save response in a file + if (!is.null(data_file)) { + write(local_var_resp$response, data_file) + } + + deserialized_resp_obj <- tryCatch( + self$api_client$deserialize(local_var_resp$response_as_text(), "AnyType", loadNamespace("openapi")), + error = function(e) { + stop("Failed to deserialize response") + } + ) + local_var_resp$content <- deserialized_resp_obj + local_var_resp + } else if (local_var_resp$status_code >= 300 && local_var_resp$status_code <= 399) { + ApiResponse$new(paste("Server returned ", local_var_resp$status_code, " response status code."), local_var_resp) + } else if (local_var_resp$status_code >= 400 && local_var_resp$status_code <= 499) { + ApiResponse$new("API client error", local_var_resp) + } else if (local_var_resp$status_code >= 500 && local_var_resp$status_code <= 599) { + if (is.null(local_var_resp$response) || local_var_resp$response == "") { + local_var_resp$response <- "API server error" + } + local_var_resp + } + }, + #' Create Instance + #' + #' @description + #' Create Instance + #' + #' @param name + #' @param storage (optional) No description (default value: "create-s3") + #' @param schema_str (optional) No description + #' @param db_server_key (optional) No description + #' @param db_server_url (optional) No description + #' @param authorization (optional) No description + #' @param data_file (optional) name of the data file to save the result + #' @param ... Other optional arguments + #' @return AnyType + #' @export + CreateInstanceInstancesPut = function(name, storage = "create-s3", schema_str = NULL, db_server_key = NULL, db_server_url = NULL, authorization = NULL, data_file = NULL, ...) { + local_var_response <- self$CreateInstanceInstancesPutWithHttpInfo(name, storage, schema_str, db_server_key, db_server_url, authorization, data_file = data_file, ...) + if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { + local_var_response$content + } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { + local_var_response + } else if (local_var_response$status_code >= 400 && local_var_response$status_code <= 499) { + local_var_response + } else if (local_var_response$status_code >= 500 && local_var_response$status_code <= 599) { + local_var_response + } + }, + #' Create Instance + #' + #' @description + #' Create Instance + #' + #' @param name + #' @param storage (optional) No description (default value: "create-s3") + #' @param schema_str (optional) No description + #' @param db_server_key (optional) No description + #' @param db_server_url (optional) No description + #' @param authorization (optional) No description + #' @param data_file (optional) name of the data file to save the result + #' @param ... Other optional arguments + #' @return API response (AnyType) with additional information such as HTTP status code, headers + #' @export + CreateInstanceInstancesPutWithHttpInfo = function(name, storage = "create-s3", schema_str = NULL, db_server_key = NULL, db_server_url = NULL, authorization = NULL, data_file = NULL, ...) { + args <- list(...) + query_params <- list() + header_params <- c() + form_params <- list() + file_params <- list() + local_var_body <- NULL + oauth_scopes <- NULL + is_oauth <- FALSE + + if (missing(`name`)) { + stop("Missing required parameter `name`.") + } + + + + + + + + header_params["Authorization"] <- `authorization` + + query_params[["name"]] <- `name` + + query_params[["storage"]] <- `storage` + + query_params[["schema_str"]] <- `schema_str` + + query_params[["db_server_key"]] <- `db_server_key` + + query_params[["db_server_url"]] <- `db_server_url` + + local_var_url_path <- "/instances" + + # The Accept request HTTP header + local_var_accepts <- list("application/json") + + # The Content-Type representation header + local_var_content_types <- list() + + local_var_resp <- self$api_client$CallApi(url = paste0(self$api_client$base_path, local_var_url_path), + method = "PUT", + query_params = query_params, + header_params = header_params, + form_params = form_params, + file_params = file_params, + accepts = local_var_accepts, + content_types = local_var_content_types, + body = local_var_body, + is_oauth = is_oauth, + oauth_scopes = oauth_scopes, + ...) + + if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { + # save response in a file + if (!is.null(data_file)) { + write(local_var_resp$response, data_file) + } + + deserialized_resp_obj <- tryCatch( + self$api_client$deserialize(local_var_resp$response_as_text(), "AnyType", loadNamespace("openapi")), + error = function(e) { + stop("Failed to deserialize response") + } + ) + local_var_resp$content <- deserialized_resp_obj + local_var_resp + } else if (local_var_resp$status_code >= 300 && local_var_resp$status_code <= 399) { + ApiResponse$new(paste("Server returned ", local_var_resp$status_code, " response status code."), local_var_resp) + } else if (local_var_resp$status_code >= 400 && local_var_resp$status_code <= 499) { + ApiResponse$new("API client error", local_var_resp) + } else if (local_var_resp$status_code >= 500 && local_var_resp$status_code <= 599) { + if (is.null(local_var_resp$response) || local_var_resp$response == "") { + local_var_resp$response <- "API server error" + } + local_var_resp + } + }, + #' Create Record + #' + #' @description + #' Create Record + #' + #' @param instance_id + #' @param module_name + #' @param model_name + #' @param schema_id + #' @param body + #' @param authorization (optional) No description + #' @param data_file (optional) name of the data file to save the result + #' @param ... Other optional arguments + #' @return AnyType + #' @export + CreateRecordInstancesInstanceIdModulesModuleNameModelNamePut = function(instance_id, module_name, model_name, schema_id, body, authorization = NULL, data_file = NULL, ...) { + local_var_response <- self$CreateRecordInstancesInstanceIdModulesModuleNameModelNamePutWithHttpInfo(instance_id, module_name, model_name, schema_id, body, authorization, data_file = data_file, ...) + if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { + local_var_response$content + } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { + local_var_response + } else if (local_var_response$status_code >= 400 && local_var_response$status_code <= 499) { + local_var_response + } else if (local_var_response$status_code >= 500 && local_var_response$status_code <= 599) { + local_var_response + } + }, + #' Create Record + #' + #' @description + #' Create Record + #' + #' @param instance_id + #' @param module_name + #' @param model_name + #' @param schema_id + #' @param body + #' @param authorization (optional) No description + #' @param data_file (optional) name of the data file to save the result + #' @param ... Other optional arguments + #' @return API response (AnyType) with additional information such as HTTP status code, headers + #' @export + CreateRecordInstancesInstanceIdModulesModuleNameModelNamePutWithHttpInfo = function(instance_id, module_name, model_name, schema_id, body, authorization = NULL, data_file = NULL, ...) { + args <- list(...) + query_params <- list() + header_params <- c() + form_params <- list() + file_params <- list() + local_var_body <- NULL + oauth_scopes <- NULL + is_oauth <- FALSE + + if (missing(`instance_id`)) { + stop("Missing required parameter `instance_id`.") + } + + if (missing(`module_name`)) { + stop("Missing required parameter `module_name`.") + } + + if (missing(`model_name`)) { + stop("Missing required parameter `model_name`.") + } + + if (missing(`schema_id`)) { + stop("Missing required parameter `schema_id`.") + } + + if (missing(`body`)) { + stop("Missing required parameter `body`.") + } + + + + + + + + header_params["Authorization"] <- `authorization` + + query_params[["schema_id"]] <- `schema_id` + + if (!is.null(`body`)) { + local_var_body <- `body`$toJSONString() + } else { + body <- NULL + } + + local_var_url_path <- "/instances/{instance_id}/modules/{module_name}/{model_name}" + if (!missing(`instance_id`)) { + local_var_url_path <- gsub("\\{instance_id\\}", URLencode(as.character(`instance_id`), reserved = TRUE), local_var_url_path) + } + + if (!missing(`module_name`)) { + local_var_url_path <- gsub("\\{module_name\\}", URLencode(as.character(`module_name`), reserved = TRUE), local_var_url_path) + } + + if (!missing(`model_name`)) { + local_var_url_path <- gsub("\\{model_name\\}", URLencode(as.character(`model_name`), reserved = TRUE), local_var_url_path) + } + + + # The Accept request HTTP header + local_var_accepts <- list("application/json") + + # The Content-Type representation header + local_var_content_types <- list("application/json") + + local_var_resp <- self$api_client$CallApi(url = paste0(self$api_client$base_path, local_var_url_path), + method = "PUT", + query_params = query_params, + header_params = header_params, + form_params = form_params, + file_params = file_params, + accepts = local_var_accepts, + content_types = local_var_content_types, + body = local_var_body, + is_oauth = is_oauth, + oauth_scopes = oauth_scopes, + ...) + + if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { + # save response in a file + if (!is.null(data_file)) { + write(local_var_resp$response, data_file) + } + + deserialized_resp_obj <- tryCatch( + self$api_client$deserialize(local_var_resp$response_as_text(), "AnyType", loadNamespace("openapi")), + error = function(e) { + stop("Failed to deserialize response") + } + ) + local_var_resp$content <- deserialized_resp_obj + local_var_resp + } else if (local_var_resp$status_code >= 300 && local_var_resp$status_code <= 399) { + ApiResponse$new(paste("Server returned ", local_var_resp$status_code, " response status code."), local_var_resp) + } else if (local_var_resp$status_code >= 400 && local_var_resp$status_code <= 499) { + ApiResponse$new("API client error", local_var_resp) + } else if (local_var_resp$status_code >= 500 && local_var_resp$status_code <= 599) { + if (is.null(local_var_resp$response) || local_var_resp$response == "") { + local_var_resp$response <- "API server error" + } + local_var_resp + } + }, + #' Delete Collaborator + #' + #' @description + #' Delete Collaborator + #' + #' @param instance_id + #' @param account_id + #' @param authorization (optional) No description + #' @param data_file (optional) name of the data file to save the result + #' @param ... Other optional arguments + #' @return AnyType + #' @export + DeleteCollaboratorInstancesInstanceIdCollaboratorsAccountIdDelete = function(instance_id, account_id, authorization = NULL, data_file = NULL, ...) { + local_var_response <- self$DeleteCollaboratorInstancesInstanceIdCollaboratorsAccountIdDeleteWithHttpInfo(instance_id, account_id, authorization, data_file = data_file, ...) + if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { + local_var_response$content + } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { + local_var_response + } else if (local_var_response$status_code >= 400 && local_var_response$status_code <= 499) { + local_var_response + } else if (local_var_response$status_code >= 500 && local_var_response$status_code <= 599) { + local_var_response + } + }, + #' Delete Collaborator + #' + #' @description + #' Delete Collaborator + #' + #' @param instance_id + #' @param account_id + #' @param authorization (optional) No description + #' @param data_file (optional) name of the data file to save the result + #' @param ... Other optional arguments + #' @return API response (AnyType) with additional information such as HTTP status code, headers + #' @export + DeleteCollaboratorInstancesInstanceIdCollaboratorsAccountIdDeleteWithHttpInfo = function(instance_id, account_id, authorization = NULL, data_file = NULL, ...) { + args <- list(...) + query_params <- list() + header_params <- c() + form_params <- list() + file_params <- list() + local_var_body <- NULL + oauth_scopes <- NULL + is_oauth <- FALSE + + if (missing(`instance_id`)) { + stop("Missing required parameter `instance_id`.") + } + + if (missing(`account_id`)) { + stop("Missing required parameter `account_id`.") + } + + + + + header_params["Authorization"] <- `authorization` + + local_var_url_path <- "/instances/{instance_id}/collaborators/{account_id}" + if (!missing(`instance_id`)) { + local_var_url_path <- gsub("\\{instance_id\\}", URLencode(as.character(`instance_id`), reserved = TRUE), local_var_url_path) + } + + if (!missing(`account_id`)) { + local_var_url_path <- gsub("\\{account_id\\}", URLencode(as.character(`account_id`), reserved = TRUE), local_var_url_path) + } + + + # The Accept request HTTP header + local_var_accepts <- list("application/json") + + # The Content-Type representation header + local_var_content_types <- list() + + local_var_resp <- self$api_client$CallApi(url = paste0(self$api_client$base_path, local_var_url_path), + method = "DELETE", + query_params = query_params, + header_params = header_params, + form_params = form_params, + file_params = file_params, + accepts = local_var_accepts, + content_types = local_var_content_types, + body = local_var_body, + is_oauth = is_oauth, + oauth_scopes = oauth_scopes, + ...) + + if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { + # save response in a file + if (!is.null(data_file)) { + write(local_var_resp$response, data_file) + } + + deserialized_resp_obj <- tryCatch( + self$api_client$deserialize(local_var_resp$response_as_text(), "AnyType", loadNamespace("openapi")), + error = function(e) { + stop("Failed to deserialize response") + } + ) + local_var_resp$content <- deserialized_resp_obj + local_var_resp + } else if (local_var_resp$status_code >= 300 && local_var_resp$status_code <= 399) { + ApiResponse$new(paste("Server returned ", local_var_resp$status_code, " response status code."), local_var_resp) + } else if (local_var_resp$status_code >= 400 && local_var_resp$status_code <= 499) { + ApiResponse$new("API client error", local_var_resp) + } else if (local_var_resp$status_code >= 500 && local_var_resp$status_code <= 599) { + if (is.null(local_var_resp$response) || local_var_resp$response == "") { + local_var_resp$response <- "API server error" + } + local_var_resp + } + }, + #' Delete Instance + #' + #' @description + #' Delete Instance + #' + #' @param instance_id + #' @param instance_name + #' @param authorization (optional) No description + #' @param data_file (optional) name of the data file to save the result + #' @param ... Other optional arguments + #' @return AnyType + #' @export + DeleteInstanceInstancesInstanceIdDelete = function(instance_id, instance_name, authorization = NULL, data_file = NULL, ...) { + local_var_response <- self$DeleteInstanceInstancesInstanceIdDeleteWithHttpInfo(instance_id, instance_name, authorization, data_file = data_file, ...) + if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { + local_var_response$content + } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { + local_var_response + } else if (local_var_response$status_code >= 400 && local_var_response$status_code <= 499) { + local_var_response + } else if (local_var_response$status_code >= 500 && local_var_response$status_code <= 599) { + local_var_response + } + }, + #' Delete Instance + #' + #' @description + #' Delete Instance + #' + #' @param instance_id + #' @param instance_name + #' @param authorization (optional) No description + #' @param data_file (optional) name of the data file to save the result + #' @param ... Other optional arguments + #' @return API response (AnyType) with additional information such as HTTP status code, headers + #' @export + DeleteInstanceInstancesInstanceIdDeleteWithHttpInfo = function(instance_id, instance_name, authorization = NULL, data_file = NULL, ...) { + args <- list(...) + query_params <- list() + header_params <- c() + form_params <- list() + file_params <- list() + local_var_body <- NULL + oauth_scopes <- NULL + is_oauth <- FALSE + + if (missing(`instance_id`)) { + stop("Missing required parameter `instance_id`.") + } + + if (missing(`instance_name`)) { + stop("Missing required parameter `instance_name`.") + } + + + + + header_params["Authorization"] <- `authorization` + + query_params[["instance_name"]] <- `instance_name` + + local_var_url_path <- "/instances/{instance_id}" + if (!missing(`instance_id`)) { + local_var_url_path <- gsub("\\{instance_id\\}", URLencode(as.character(`instance_id`), reserved = TRUE), local_var_url_path) + } + + + # The Accept request HTTP header + local_var_accepts <- list("application/json") + + # The Content-Type representation header + local_var_content_types <- list() + + local_var_resp <- self$api_client$CallApi(url = paste0(self$api_client$base_path, local_var_url_path), + method = "DELETE", + query_params = query_params, + header_params = header_params, + form_params = form_params, + file_params = file_params, + accepts = local_var_accepts, + content_types = local_var_content_types, + body = local_var_body, + is_oauth = is_oauth, + oauth_scopes = oauth_scopes, + ...) + + if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { + # save response in a file + if (!is.null(data_file)) { + write(local_var_resp$response, data_file) + } + + deserialized_resp_obj <- tryCatch( + self$api_client$deserialize(local_var_resp$response_as_text(), "AnyType", loadNamespace("openapi")), + error = function(e) { + stop("Failed to deserialize response") + } + ) + local_var_resp$content <- deserialized_resp_obj + local_var_resp + } else if (local_var_resp$status_code >= 300 && local_var_resp$status_code <= 399) { + ApiResponse$new(paste("Server returned ", local_var_resp$status_code, " response status code."), local_var_resp) + } else if (local_var_resp$status_code >= 400 && local_var_resp$status_code <= 499) { + ApiResponse$new("API client error", local_var_resp) + } else if (local_var_resp$status_code >= 500 && local_var_resp$status_code <= 599) { + if (is.null(local_var_resp$response) || local_var_resp$response == "") { + local_var_resp$response <- "API server error" + } + local_var_resp + } + }, + #' Delete Record + #' + #' @description + #' Delete Record + #' + #' @param instance_id + #' @param module_name + #' @param model_name + #' @param uid + #' @param schema_id + #' @param authorization (optional) No description + #' @param data_file (optional) name of the data file to save the result + #' @param ... Other optional arguments + #' @return AnyType + #' @export + DeleteRecordInstancesInstanceIdModulesModuleNameModelNameUidDelete = function(instance_id, module_name, model_name, uid, schema_id, authorization = NULL, data_file = NULL, ...) { + local_var_response <- self$DeleteRecordInstancesInstanceIdModulesModuleNameModelNameUidDeleteWithHttpInfo(instance_id, module_name, model_name, uid, schema_id, authorization, data_file = data_file, ...) + if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { + local_var_response$content + } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { + local_var_response + } else if (local_var_response$status_code >= 400 && local_var_response$status_code <= 499) { + local_var_response + } else if (local_var_response$status_code >= 500 && local_var_response$status_code <= 599) { + local_var_response + } + }, + #' Delete Record + #' + #' @description + #' Delete Record + #' + #' @param instance_id + #' @param module_name + #' @param model_name + #' @param uid + #' @param schema_id + #' @param authorization (optional) No description + #' @param data_file (optional) name of the data file to save the result + #' @param ... Other optional arguments + #' @return API response (AnyType) with additional information such as HTTP status code, headers + #' @export + DeleteRecordInstancesInstanceIdModulesModuleNameModelNameUidDeleteWithHttpInfo = function(instance_id, module_name, model_name, uid, schema_id, authorization = NULL, data_file = NULL, ...) { + args <- list(...) + query_params <- list() + header_params <- c() + form_params <- list() + file_params <- list() + local_var_body <- NULL + oauth_scopes <- NULL + is_oauth <- FALSE + + if (missing(`instance_id`)) { + stop("Missing required parameter `instance_id`.") + } + + if (missing(`module_name`)) { + stop("Missing required parameter `module_name`.") + } + + if (missing(`model_name`)) { + stop("Missing required parameter `model_name`.") + } + + if (missing(`uid`)) { + stop("Missing required parameter `uid`.") + } + + if (missing(`schema_id`)) { + stop("Missing required parameter `schema_id`.") + } + + + + + + + + header_params["Authorization"] <- `authorization` + + query_params[["schema_id"]] <- `schema_id` + + local_var_url_path <- "/instances/{instance_id}/modules/{module_name}/{model_name}/{uid}" + if (!missing(`instance_id`)) { + local_var_url_path <- gsub("\\{instance_id\\}", URLencode(as.character(`instance_id`), reserved = TRUE), local_var_url_path) + } + + if (!missing(`module_name`)) { + local_var_url_path <- gsub("\\{module_name\\}", URLencode(as.character(`module_name`), reserved = TRUE), local_var_url_path) + } + + if (!missing(`model_name`)) { + local_var_url_path <- gsub("\\{model_name\\}", URLencode(as.character(`model_name`), reserved = TRUE), local_var_url_path) + } + + if (!missing(`uid`)) { + local_var_url_path <- gsub("\\{uid\\}", URLencode(as.character(`uid`), reserved = TRUE), local_var_url_path) + } + + + # The Accept request HTTP header + local_var_accepts <- list("application/json") + + # The Content-Type representation header + local_var_content_types <- list() + + local_var_resp <- self$api_client$CallApi(url = paste0(self$api_client$base_path, local_var_url_path), + method = "DELETE", + query_params = query_params, + header_params = header_params, + form_params = form_params, + file_params = file_params, + accepts = local_var_accepts, + content_types = local_var_content_types, + body = local_var_body, + is_oauth = is_oauth, + oauth_scopes = oauth_scopes, + ...) + + if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { + # save response in a file + if (!is.null(data_file)) { + write(local_var_resp$response, data_file) + } + + deserialized_resp_obj <- tryCatch( + self$api_client$deserialize(local_var_resp$response_as_text(), "AnyType", loadNamespace("openapi")), + error = function(e) { + stop("Failed to deserialize response") + } + ) + local_var_resp$content <- deserialized_resp_obj + local_var_resp + } else if (local_var_resp$status_code >= 300 && local_var_resp$status_code <= 399) { + ApiResponse$new(paste("Server returned ", local_var_resp$status_code, " response status code."), local_var_resp) + } else if (local_var_resp$status_code >= 400 && local_var_resp$status_code <= 499) { + ApiResponse$new("API client error", local_var_resp) + } else if (local_var_resp$status_code >= 500 && local_var_resp$status_code <= 599) { + if (is.null(local_var_resp$response) || local_var_resp$response == "") { + local_var_resp$response <- "API server error" + } + local_var_resp + } + }, + #' Generate Password + #' + #' @description + #' Generate Password + #' + #' @param instance_id + #' @param authorization (optional) No description + #' @param data_file (optional) name of the data file to save the result + #' @param ... Other optional arguments + #' @return AnyType + #' @export + GeneratePasswordInstancesInstanceIdDbPasswordGet = function(instance_id, authorization = NULL, data_file = NULL, ...) { + local_var_response <- self$GeneratePasswordInstancesInstanceIdDbPasswordGetWithHttpInfo(instance_id, authorization, data_file = data_file, ...) + if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { + local_var_response$content + } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { + local_var_response + } else if (local_var_response$status_code >= 400 && local_var_response$status_code <= 499) { + local_var_response + } else if (local_var_response$status_code >= 500 && local_var_response$status_code <= 599) { + local_var_response + } + }, + #' Generate Password + #' + #' @description + #' Generate Password + #' + #' @param instance_id + #' @param authorization (optional) No description + #' @param data_file (optional) name of the data file to save the result + #' @param ... Other optional arguments + #' @return API response (AnyType) with additional information such as HTTP status code, headers + #' @export + GeneratePasswordInstancesInstanceIdDbPasswordGetWithHttpInfo = function(instance_id, authorization = NULL, data_file = NULL, ...) { + args <- list(...) + query_params <- list() + header_params <- c() + form_params <- list() + file_params <- list() + local_var_body <- NULL + oauth_scopes <- NULL + is_oauth <- FALSE + + if (missing(`instance_id`)) { + stop("Missing required parameter `instance_id`.") + } + + + + header_params["Authorization"] <- `authorization` + + local_var_url_path <- "/instances/{instance_id}/db/password" + if (!missing(`instance_id`)) { + local_var_url_path <- gsub("\\{instance_id\\}", URLencode(as.character(`instance_id`), reserved = TRUE), local_var_url_path) + } + + + # The Accept request HTTP header + local_var_accepts <- list("application/json") + + # The Content-Type representation header + local_var_content_types <- list() + + local_var_resp <- self$api_client$CallApi(url = paste0(self$api_client$base_path, local_var_url_path), + method = "GET", + query_params = query_params, + header_params = header_params, + form_params = form_params, + file_params = file_params, + accepts = local_var_accepts, + content_types = local_var_content_types, + body = local_var_body, + is_oauth = is_oauth, + oauth_scopes = oauth_scopes, + ...) + + if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { + # save response in a file + if (!is.null(data_file)) { + write(local_var_resp$response, data_file) + } + + deserialized_resp_obj <- tryCatch( + self$api_client$deserialize(local_var_resp$response_as_text(), "AnyType", loadNamespace("openapi")), + error = function(e) { + stop("Failed to deserialize response") + } + ) + local_var_resp$content <- deserialized_resp_obj + local_var_resp + } else if (local_var_resp$status_code >= 300 && local_var_resp$status_code <= 399) { + ApiResponse$new(paste("Server returned ", local_var_resp$status_code, " response status code."), local_var_resp) + } else if (local_var_resp$status_code >= 400 && local_var_resp$status_code <= 499) { + ApiResponse$new("API client error", local_var_resp) + } else if (local_var_resp$status_code >= 500 && local_var_resp$status_code <= 599) { + if (is.null(local_var_resp$response) || local_var_resp$response == "") { + local_var_resp$response <- "API server error" + } + local_var_resp + } + }, + #' Generate Url + #' + #' @description + #' Generate Url + #' + #' @param instance_id + #' @param authorization (optional) No description + #' @param data_file (optional) name of the data file to save the result + #' @param ... Other optional arguments + #' @return AnyType + #' @export + GenerateUrlInstancesInstanceIdDbUrlGet = function(instance_id, authorization = NULL, data_file = NULL, ...) { + local_var_response <- self$GenerateUrlInstancesInstanceIdDbUrlGetWithHttpInfo(instance_id, authorization, data_file = data_file, ...) + if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { + local_var_response$content + } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { + local_var_response + } else if (local_var_response$status_code >= 400 && local_var_response$status_code <= 499) { + local_var_response + } else if (local_var_response$status_code >= 500 && local_var_response$status_code <= 599) { + local_var_response + } + }, + #' Generate Url + #' + #' @description + #' Generate Url + #' + #' @param instance_id + #' @param authorization (optional) No description + #' @param data_file (optional) name of the data file to save the result + #' @param ... Other optional arguments + #' @return API response (AnyType) with additional information such as HTTP status code, headers + #' @export + GenerateUrlInstancesInstanceIdDbUrlGetWithHttpInfo = function(instance_id, authorization = NULL, data_file = NULL, ...) { + args <- list(...) + query_params <- list() + header_params <- c() + form_params <- list() + file_params <- list() + local_var_body <- NULL + oauth_scopes <- NULL + is_oauth <- FALSE + + if (missing(`instance_id`)) { + stop("Missing required parameter `instance_id`.") + } + + + + header_params["Authorization"] <- `authorization` + + local_var_url_path <- "/instances/{instance_id}/db/url" + if (!missing(`instance_id`)) { + local_var_url_path <- gsub("\\{instance_id\\}", URLencode(as.character(`instance_id`), reserved = TRUE), local_var_url_path) + } + + + # The Accept request HTTP header + local_var_accepts <- list("application/json") + + # The Content-Type representation header + local_var_content_types <- list() + + local_var_resp <- self$api_client$CallApi(url = paste0(self$api_client$base_path, local_var_url_path), + method = "GET", + query_params = query_params, + header_params = header_params, + form_params = form_params, + file_params = file_params, + accepts = local_var_accepts, + content_types = local_var_content_types, + body = local_var_body, + is_oauth = is_oauth, + oauth_scopes = oauth_scopes, + ...) + + if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { + # save response in a file + if (!is.null(data_file)) { + write(local_var_resp$response, data_file) + } + + deserialized_resp_obj <- tryCatch( + self$api_client$deserialize(local_var_resp$response_as_text(), "AnyType", loadNamespace("openapi")), + error = function(e) { + stop("Failed to deserialize response") + } + ) + local_var_resp$content <- deserialized_resp_obj + local_var_resp + } else if (local_var_resp$status_code >= 300 && local_var_resp$status_code <= 399) { + ApiResponse$new(paste("Server returned ", local_var_resp$status_code, " response status code."), local_var_resp) + } else if (local_var_resp$status_code >= 400 && local_var_resp$status_code <= 499) { + ApiResponse$new("API client error", local_var_resp) + } else if (local_var_resp$status_code >= 500 && local_var_resp$status_code <= 599) { + if (is.null(local_var_resp$response) || local_var_resp$response == "") { + local_var_resp$response <- "API server error" + } + local_var_resp + } + }, + #' Get Instance Statistics + #' + #' @description + #' Get Instance Statistics + #' + #' @param instance_id + #' @param schema_id + #' @param q (optional) In ${module}.${model} format (case-sensitive) + #' @param authorization (optional) No description + #' @param data_file (optional) name of the data file to save the result + #' @param ... Other optional arguments + #' @return AnyType + #' @export + GetInstanceStatisticsInstancesInstanceIdStatisticsGet = function(instance_id, schema_id, q = NULL, authorization = NULL, data_file = NULL, ...) { + local_var_response <- self$GetInstanceStatisticsInstancesInstanceIdStatisticsGetWithHttpInfo(instance_id, schema_id, q, authorization, data_file = data_file, ...) + if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { + local_var_response$content + } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { + local_var_response + } else if (local_var_response$status_code >= 400 && local_var_response$status_code <= 499) { + local_var_response + } else if (local_var_response$status_code >= 500 && local_var_response$status_code <= 599) { + local_var_response + } + }, + #' Get Instance Statistics + #' + #' @description + #' Get Instance Statistics + #' + #' @param instance_id + #' @param schema_id + #' @param q (optional) In ${module}.${model} format (case-sensitive) + #' @param authorization (optional) No description + #' @param data_file (optional) name of the data file to save the result + #' @param ... Other optional arguments + #' @return API response (AnyType) with additional information such as HTTP status code, headers + #' @export + GetInstanceStatisticsInstancesInstanceIdStatisticsGetWithHttpInfo = function(instance_id, schema_id, q = NULL, authorization = NULL, data_file = NULL, ...) { + args <- list(...) + query_params <- list() + header_params <- c() + form_params <- list() + file_params <- list() + local_var_body <- NULL + oauth_scopes <- NULL + is_oauth <- FALSE + + if (missing(`instance_id`)) { + stop("Missing required parameter `instance_id`.") + } + + if (missing(`schema_id`)) { + stop("Missing required parameter `schema_id`.") + } + + + + + + header_params["Authorization"] <- `authorization` + + query_params[["schema_id"]] <- `schema_id` + + # explore + for (query_item in `q`) { + query_params[["q"]] <- c(query_params[["q"]], list(`q` = query_item)) + } + + local_var_url_path <- "/instances/{instance_id}/statistics" + if (!missing(`instance_id`)) { + local_var_url_path <- gsub("\\{instance_id\\}", URLencode(as.character(`instance_id`), reserved = TRUE), local_var_url_path) + } + + + # The Accept request HTTP header + local_var_accepts <- list("application/json") + + # The Content-Type representation header + local_var_content_types <- list() + + local_var_resp <- self$api_client$CallApi(url = paste0(self$api_client$base_path, local_var_url_path), + method = "GET", + query_params = query_params, + header_params = header_params, + form_params = form_params, + file_params = file_params, + accepts = local_var_accepts, + content_types = local_var_content_types, + body = local_var_body, + is_oauth = is_oauth, + oauth_scopes = oauth_scopes, + ...) + + if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { + # save response in a file + if (!is.null(data_file)) { + write(local_var_resp$response, data_file) + } + + deserialized_resp_obj <- tryCatch( + self$api_client$deserialize(local_var_resp$response_as_text(), "AnyType", loadNamespace("openapi")), + error = function(e) { + stop("Failed to deserialize response") + } + ) + local_var_resp$content <- deserialized_resp_obj + local_var_resp + } else if (local_var_resp$status_code >= 300 && local_var_resp$status_code <= 399) { + ApiResponse$new(paste("Server returned ", local_var_resp$status_code, " response status code."), local_var_resp) + } else if (local_var_resp$status_code >= 400 && local_var_resp$status_code <= 499) { + ApiResponse$new("API client error", local_var_resp) + } else if (local_var_resp$status_code >= 500 && local_var_resp$status_code <= 599) { + if (is.null(local_var_resp$response) || local_var_resp$response == "") { + local_var_resp$response <- "API server error" + } + local_var_resp + } + }, + #' Get Non Empty Tables + #' + #' @description + #' Get Non Empty Tables + #' + #' @param instance_id + #' @param schema_id + #' @param authorization (optional) No description + #' @param data_file (optional) name of the data file to save the result + #' @param ... Other optional arguments + #' @return AnyType + #' @export + GetNonEmptyTablesInstancesInstanceIdNonEmptyTablesGet = function(instance_id, schema_id, authorization = NULL, data_file = NULL, ...) { + local_var_response <- self$GetNonEmptyTablesInstancesInstanceIdNonEmptyTablesGetWithHttpInfo(instance_id, schema_id, authorization, data_file = data_file, ...) + if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { + local_var_response$content + } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { + local_var_response + } else if (local_var_response$status_code >= 400 && local_var_response$status_code <= 499) { + local_var_response + } else if (local_var_response$status_code >= 500 && local_var_response$status_code <= 599) { + local_var_response + } + }, + #' Get Non Empty Tables + #' + #' @description + #' Get Non Empty Tables + #' + #' @param instance_id + #' @param schema_id + #' @param authorization (optional) No description + #' @param data_file (optional) name of the data file to save the result + #' @param ... Other optional arguments + #' @return API response (AnyType) with additional information such as HTTP status code, headers + #' @export + GetNonEmptyTablesInstancesInstanceIdNonEmptyTablesGetWithHttpInfo = function(instance_id, schema_id, authorization = NULL, data_file = NULL, ...) { + args <- list(...) + query_params <- list() + header_params <- c() + form_params <- list() + file_params <- list() + local_var_body <- NULL + oauth_scopes <- NULL + is_oauth <- FALSE + + if (missing(`instance_id`)) { + stop("Missing required parameter `instance_id`.") + } + + if (missing(`schema_id`)) { + stop("Missing required parameter `schema_id`.") + } + + + + + header_params["Authorization"] <- `authorization` + + query_params[["schema_id"]] <- `schema_id` + + local_var_url_path <- "/instances/{instance_id}/non_empty_tables" + if (!missing(`instance_id`)) { + local_var_url_path <- gsub("\\{instance_id\\}", URLencode(as.character(`instance_id`), reserved = TRUE), local_var_url_path) + } + + + # The Accept request HTTP header + local_var_accepts <- list("application/json") + + # The Content-Type representation header + local_var_content_types <- list() + + local_var_resp <- self$api_client$CallApi(url = paste0(self$api_client$base_path, local_var_url_path), + method = "GET", + query_params = query_params, + header_params = header_params, + form_params = form_params, + file_params = file_params, + accepts = local_var_accepts, + content_types = local_var_content_types, + body = local_var_body, + is_oauth = is_oauth, + oauth_scopes = oauth_scopes, + ...) + + if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { + # save response in a file + if (!is.null(data_file)) { + write(local_var_resp$response, data_file) + } + + deserialized_resp_obj <- tryCatch( + self$api_client$deserialize(local_var_resp$response_as_text(), "AnyType", loadNamespace("openapi")), + error = function(e) { + stop("Failed to deserialize response") + } + ) + local_var_resp$content <- deserialized_resp_obj + local_var_resp + } else if (local_var_resp$status_code >= 300 && local_var_resp$status_code <= 399) { + ApiResponse$new(paste("Server returned ", local_var_resp$status_code, " response status code."), local_var_resp) + } else if (local_var_resp$status_code >= 400 && local_var_resp$status_code <= 499) { + ApiResponse$new("API client error", local_var_resp) + } else if (local_var_resp$status_code >= 500 && local_var_resp$status_code <= 599) { + if (is.null(local_var_resp$response) || local_var_resp$response == "") { + local_var_resp$response <- "API server error" + } + local_var_resp + } + }, + #' Get Record + #' + #' @description + #' Get Record + #' + #' @param instance_id + #' @param module_name + #' @param model_name + #' @param id_or_uid + #' @param schema_id + #' @param limit_to_many (optional) No description (default value: 10) + #' @param include_foreign_keys (optional) No description (default value: FALSE) + #' @param authorization (optional) No description + #' @param get_record_request_body (optional) No description + #' @param data_file (optional) name of the data file to save the result + #' @param ... Other optional arguments + #' @return AnyType + #' @export + GetRecordInstancesInstanceIdModulesModuleNameModelNameIdOrUidPost = function(instance_id, module_name, model_name, id_or_uid, schema_id, limit_to_many = 10, include_foreign_keys = FALSE, authorization = NULL, get_record_request_body = NULL, data_file = NULL, ...) { + local_var_response <- self$GetRecordInstancesInstanceIdModulesModuleNameModelNameIdOrUidPostWithHttpInfo(instance_id, module_name, model_name, id_or_uid, schema_id, limit_to_many, include_foreign_keys, authorization, get_record_request_body, data_file = data_file, ...) + if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { + local_var_response$content + } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { + local_var_response + } else if (local_var_response$status_code >= 400 && local_var_response$status_code <= 499) { + local_var_response + } else if (local_var_response$status_code >= 500 && local_var_response$status_code <= 599) { + local_var_response + } + }, + #' Get Record + #' + #' @description + #' Get Record + #' + #' @param instance_id + #' @param module_name + #' @param model_name + #' @param id_or_uid + #' @param schema_id + #' @param limit_to_many (optional) No description (default value: 10) + #' @param include_foreign_keys (optional) No description (default value: FALSE) + #' @param authorization (optional) No description + #' @param get_record_request_body (optional) No description + #' @param data_file (optional) name of the data file to save the result + #' @param ... Other optional arguments + #' @return API response (AnyType) with additional information such as HTTP status code, headers + #' @export + GetRecordInstancesInstanceIdModulesModuleNameModelNameIdOrUidPostWithHttpInfo = function(instance_id, module_name, model_name, id_or_uid, schema_id, limit_to_many = 10, include_foreign_keys = FALSE, authorization = NULL, get_record_request_body = NULL, data_file = NULL, ...) { + args <- list(...) + query_params <- list() + header_params <- c() + form_params <- list() + file_params <- list() + local_var_body <- NULL + oauth_scopes <- NULL + is_oauth <- FALSE + + if (missing(`instance_id`)) { + stop("Missing required parameter `instance_id`.") + } + + if (missing(`module_name`)) { + stop("Missing required parameter `module_name`.") + } + + if (missing(`model_name`)) { + stop("Missing required parameter `model_name`.") + } + + if (missing(`id_or_uid`)) { + stop("Missing required parameter `id_or_uid`.") + } + + if (missing(`schema_id`)) { + stop("Missing required parameter `schema_id`.") + } + + + + + + + + + + + header_params["Authorization"] <- `authorization` + + query_params[["schema_id"]] <- `schema_id` + + query_params[["limit_to_many"]] <- `limit_to_many` + + query_params[["include_foreign_keys"]] <- `include_foreign_keys` + + if (!is.null(`get_record_request_body`)) { + local_var_body <- `get_record_request_body`$toJSONString() + } else { + body <- NULL + } + + local_var_url_path <- "/instances/{instance_id}/modules/{module_name}/{model_name}/{id_or_uid}" + if (!missing(`instance_id`)) { + local_var_url_path <- gsub("\\{instance_id\\}", URLencode(as.character(`instance_id`), reserved = TRUE), local_var_url_path) + } + + if (!missing(`module_name`)) { + local_var_url_path <- gsub("\\{module_name\\}", URLencode(as.character(`module_name`), reserved = TRUE), local_var_url_path) + } + + if (!missing(`model_name`)) { + local_var_url_path <- gsub("\\{model_name\\}", URLencode(as.character(`model_name`), reserved = TRUE), local_var_url_path) + } + + if (!missing(`id_or_uid`)) { + local_var_url_path <- gsub("\\{id_or_uid\\}", URLencode(as.character(`id_or_uid`), reserved = TRUE), local_var_url_path) + } + + + # The Accept request HTTP header + local_var_accepts <- list("application/json") + + # The Content-Type representation header + local_var_content_types <- list("application/json") + + local_var_resp <- self$api_client$CallApi(url = paste0(self$api_client$base_path, local_var_url_path), + method = "POST", + query_params = query_params, + header_params = header_params, + form_params = form_params, + file_params = file_params, + accepts = local_var_accepts, + content_types = local_var_content_types, + body = local_var_body, + is_oauth = is_oauth, + oauth_scopes = oauth_scopes, + ...) + + if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { + # save response in a file + if (!is.null(data_file)) { + write(local_var_resp$response, data_file) + } + + deserialized_resp_obj <- tryCatch( + self$api_client$deserialize(local_var_resp$response_as_text(), "AnyType", loadNamespace("openapi")), + error = function(e) { + stop("Failed to deserialize response") + } + ) + local_var_resp$content <- deserialized_resp_obj + local_var_resp + } else if (local_var_resp$status_code >= 300 && local_var_resp$status_code <= 399) { + ApiResponse$new(paste("Server returned ", local_var_resp$status_code, " response status code."), local_var_resp) + } else if (local_var_resp$status_code >= 400 && local_var_resp$status_code <= 499) { + ApiResponse$new("API client error", local_var_resp) + } else if (local_var_resp$status_code >= 500 && local_var_resp$status_code <= 599) { + if (is.null(local_var_resp$response) || local_var_resp$response == "") { + local_var_resp$response <- "API server error" + } + local_var_resp + } + }, + #' Get Records + #' + #' @description + #' Get Records + #' + #' @param instance_id + #' @param module_name + #' @param model_name + #' @param schema_id + #' @param limit (optional) No description (default value: 50) + #' @param offset (optional) No description (default value: 0) + #' @param limit_to_many (optional) No description (default value: 10) + #' @param include_foreign_keys (optional) No description (default value: FALSE) + #' @param authorization (optional) No description + #' @param get_records_request_body (optional) No description + #' @param data_file (optional) name of the data file to save the result + #' @param ... Other optional arguments + #' @return AnyType + #' @export + GetRecordsInstancesInstanceIdModulesModuleNameModelNamePost = function(instance_id, module_name, model_name, schema_id, limit = 50, offset = 0, limit_to_many = 10, include_foreign_keys = FALSE, authorization = NULL, get_records_request_body = NULL, data_file = NULL, ...) { + local_var_response <- self$GetRecordsInstancesInstanceIdModulesModuleNameModelNamePostWithHttpInfo(instance_id, module_name, model_name, schema_id, limit, offset, limit_to_many, include_foreign_keys, authorization, get_records_request_body, data_file = data_file, ...) + if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { + local_var_response$content + } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { + local_var_response + } else if (local_var_response$status_code >= 400 && local_var_response$status_code <= 499) { + local_var_response + } else if (local_var_response$status_code >= 500 && local_var_response$status_code <= 599) { + local_var_response + } + }, + #' Get Records + #' + #' @description + #' Get Records + #' + #' @param instance_id + #' @param module_name + #' @param model_name + #' @param schema_id + #' @param limit (optional) No description (default value: 50) + #' @param offset (optional) No description (default value: 0) + #' @param limit_to_many (optional) No description (default value: 10) + #' @param include_foreign_keys (optional) No description (default value: FALSE) + #' @param authorization (optional) No description + #' @param get_records_request_body (optional) No description + #' @param data_file (optional) name of the data file to save the result + #' @param ... Other optional arguments + #' @return API response (AnyType) with additional information such as HTTP status code, headers + #' @export + GetRecordsInstancesInstanceIdModulesModuleNameModelNamePostWithHttpInfo = function(instance_id, module_name, model_name, schema_id, limit = 50, offset = 0, limit_to_many = 10, include_foreign_keys = FALSE, authorization = NULL, get_records_request_body = NULL, data_file = NULL, ...) { + args <- list(...) + query_params <- list() + header_params <- c() + form_params <- list() + file_params <- list() + local_var_body <- NULL + oauth_scopes <- NULL + is_oauth <- FALSE + + if (missing(`instance_id`)) { + stop("Missing required parameter `instance_id`.") + } + + if (missing(`module_name`)) { + stop("Missing required parameter `module_name`.") + } + + if (missing(`model_name`)) { + stop("Missing required parameter `model_name`.") + } + + if (missing(`schema_id`)) { + stop("Missing required parameter `schema_id`.") + } + + + + + + + + + + + + header_params["Authorization"] <- `authorization` + + query_params[["schema_id"]] <- `schema_id` + + query_params[["limit"]] <- `limit` + + query_params[["offset"]] <- `offset` + + query_params[["limit_to_many"]] <- `limit_to_many` + + query_params[["include_foreign_keys"]] <- `include_foreign_keys` + + if (!is.null(`get_records_request_body`)) { + local_var_body <- `get_records_request_body`$toJSONString() + } else { + body <- NULL + } + + local_var_url_path <- "/instances/{instance_id}/modules/{module_name}/{model_name}" + if (!missing(`instance_id`)) { + local_var_url_path <- gsub("\\{instance_id\\}", URLencode(as.character(`instance_id`), reserved = TRUE), local_var_url_path) + } + + if (!missing(`module_name`)) { + local_var_url_path <- gsub("\\{module_name\\}", URLencode(as.character(`module_name`), reserved = TRUE), local_var_url_path) + } + + if (!missing(`model_name`)) { + local_var_url_path <- gsub("\\{model_name\\}", URLencode(as.character(`model_name`), reserved = TRUE), local_var_url_path) + } + + + # The Accept request HTTP header + local_var_accepts <- list("application/json") + + # The Content-Type representation header + local_var_content_types <- list("application/json") + + local_var_resp <- self$api_client$CallApi(url = paste0(self$api_client$base_path, local_var_url_path), + method = "POST", + query_params = query_params, + header_params = header_params, + form_params = form_params, + file_params = file_params, + accepts = local_var_accepts, + content_types = local_var_content_types, + body = local_var_body, + is_oauth = is_oauth, + oauth_scopes = oauth_scopes, + ...) + + if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { + # save response in a file + if (!is.null(data_file)) { + write(local_var_resp$response, data_file) + } + + deserialized_resp_obj <- tryCatch( + self$api_client$deserialize(local_var_resp$response_as_text(), "AnyType", loadNamespace("openapi")), + error = function(e) { + stop("Failed to deserialize response") + } + ) + local_var_resp$content <- deserialized_resp_obj + local_var_resp + } else if (local_var_resp$status_code >= 300 && local_var_resp$status_code <= 399) { + ApiResponse$new(paste("Server returned ", local_var_resp$status_code, " response status code."), local_var_resp) + } else if (local_var_resp$status_code >= 400 && local_var_resp$status_code <= 499) { + ApiResponse$new("API client error", local_var_resp) + } else if (local_var_resp$status_code >= 500 && local_var_resp$status_code <= 599) { + if (is.null(local_var_resp$response) || local_var_resp$response == "") { + local_var_resp$response <- "API server error" + } + local_var_resp + } + }, + #' Get Relations + #' + #' @description + #' Get Relations + #' + #' @param module_name + #' @param model_name + #' @param instance_id + #' @param authorization (optional) No description + #' @param data_file (optional) name of the data file to save the result + #' @param ... Other optional arguments + #' @return AnyType + #' @export + GetRelationsInstancesInstanceIdSchemaModuleNameModelNameGet = function(module_name, model_name, instance_id, authorization = NULL, data_file = NULL, ...) { + local_var_response <- self$GetRelationsInstancesInstanceIdSchemaModuleNameModelNameGetWithHttpInfo(module_name, model_name, instance_id, authorization, data_file = data_file, ...) + if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { + local_var_response$content + } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { + local_var_response + } else if (local_var_response$status_code >= 400 && local_var_response$status_code <= 499) { + local_var_response + } else if (local_var_response$status_code >= 500 && local_var_response$status_code <= 599) { + local_var_response + } + }, + #' Get Relations + #' + #' @description + #' Get Relations + #' + #' @param module_name + #' @param model_name + #' @param instance_id + #' @param authorization (optional) No description + #' @param data_file (optional) name of the data file to save the result + #' @param ... Other optional arguments + #' @return API response (AnyType) with additional information such as HTTP status code, headers + #' @export + GetRelationsInstancesInstanceIdSchemaModuleNameModelNameGetWithHttpInfo = function(module_name, model_name, instance_id, authorization = NULL, data_file = NULL, ...) { + args <- list(...) + query_params <- list() + header_params <- c() + form_params <- list() + file_params <- list() + local_var_body <- NULL + oauth_scopes <- NULL + is_oauth <- FALSE + + if (missing(`module_name`)) { + stop("Missing required parameter `module_name`.") + } + + if (missing(`model_name`)) { + stop("Missing required parameter `model_name`.") + } + + if (missing(`instance_id`)) { + stop("Missing required parameter `instance_id`.") + } + + + + + + header_params["Authorization"] <- `authorization` + + local_var_url_path <- "/instances/{instance_id}/schema/{module_name}/{model_name}" + if (!missing(`module_name`)) { + local_var_url_path <- gsub("\\{module_name\\}", URLencode(as.character(`module_name`), reserved = TRUE), local_var_url_path) + } + + if (!missing(`model_name`)) { + local_var_url_path <- gsub("\\{model_name\\}", URLencode(as.character(`model_name`), reserved = TRUE), local_var_url_path) + } + + if (!missing(`instance_id`)) { + local_var_url_path <- gsub("\\{instance_id\\}", URLencode(as.character(`instance_id`), reserved = TRUE), local_var_url_path) + } + + + # The Accept request HTTP header + local_var_accepts <- list("application/json") + + # The Content-Type representation header + local_var_content_types <- list() + + local_var_resp <- self$api_client$CallApi(url = paste0(self$api_client$base_path, local_var_url_path), + method = "GET", + query_params = query_params, + header_params = header_params, + form_params = form_params, + file_params = file_params, + accepts = local_var_accepts, + content_types = local_var_content_types, + body = local_var_body, + is_oauth = is_oauth, + oauth_scopes = oauth_scopes, + ...) + + if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { + # save response in a file + if (!is.null(data_file)) { + write(local_var_resp$response, data_file) + } + + deserialized_resp_obj <- tryCatch( + self$api_client$deserialize(local_var_resp$response_as_text(), "AnyType", loadNamespace("openapi")), + error = function(e) { + stop("Failed to deserialize response") + } + ) + local_var_resp$content <- deserialized_resp_obj + local_var_resp + } else if (local_var_resp$status_code >= 300 && local_var_resp$status_code <= 399) { + ApiResponse$new(paste("Server returned ", local_var_resp$status_code, " response status code."), local_var_resp) + } else if (local_var_resp$status_code >= 400 && local_var_resp$status_code <= 499) { + ApiResponse$new("API client error", local_var_resp) + } else if (local_var_resp$status_code >= 500 && local_var_resp$status_code <= 599) { + if (is.null(local_var_resp$response) || local_var_resp$response == "") { + local_var_resp$response <- "API server error" + } + local_var_resp + } + }, + #' Get Schema + #' + #' @description + #' Get Schema + #' + #' @param instance_id + #' @param authorization (optional) No description + #' @param data_file (optional) name of the data file to save the result + #' @param ... Other optional arguments + #' @return AnyType + #' @export + GetSchemaInstancesInstanceIdSchemaGet = function(instance_id, authorization = NULL, data_file = NULL, ...) { + local_var_response <- self$GetSchemaInstancesInstanceIdSchemaGetWithHttpInfo(instance_id, authorization, data_file = data_file, ...) + if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { + local_var_response$content + } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { + local_var_response + } else if (local_var_response$status_code >= 400 && local_var_response$status_code <= 499) { + local_var_response + } else if (local_var_response$status_code >= 500 && local_var_response$status_code <= 599) { + local_var_response + } + }, + #' Get Schema + #' + #' @description + #' Get Schema + #' + #' @param instance_id + #' @param authorization (optional) No description + #' @param data_file (optional) name of the data file to save the result + #' @param ... Other optional arguments + #' @return API response (AnyType) with additional information such as HTTP status code, headers + #' @export + GetSchemaInstancesInstanceIdSchemaGetWithHttpInfo = function(instance_id, authorization = NULL, data_file = NULL, ...) { + args <- list(...) + query_params <- list() + header_params <- c() + form_params <- list() + file_params <- list() + local_var_body <- NULL + oauth_scopes <- NULL + is_oauth <- FALSE + + if (missing(`instance_id`)) { + stop("Missing required parameter `instance_id`.") + } + + + + header_params["Authorization"] <- `authorization` + + local_var_url_path <- "/instances/{instance_id}/schema" + if (!missing(`instance_id`)) { + local_var_url_path <- gsub("\\{instance_id\\}", URLencode(as.character(`instance_id`), reserved = TRUE), local_var_url_path) + } + + + # The Accept request HTTP header + local_var_accepts <- list("application/json") + + # The Content-Type representation header + local_var_content_types <- list() + + local_var_resp <- self$api_client$CallApi(url = paste0(self$api_client$base_path, local_var_url_path), + method = "GET", + query_params = query_params, + header_params = header_params, + form_params = form_params, + file_params = file_params, + accepts = local_var_accepts, + content_types = local_var_content_types, + body = local_var_body, + is_oauth = is_oauth, + oauth_scopes = oauth_scopes, + ...) + + if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { + # save response in a file + if (!is.null(data_file)) { + write(local_var_resp$response, data_file) + } + + deserialized_resp_obj <- tryCatch( + self$api_client$deserialize(local_var_resp$response_as_text(), "AnyType", loadNamespace("openapi")), + error = function(e) { + stop("Failed to deserialize response") + } + ) + local_var_resp$content <- deserialized_resp_obj + local_var_resp + } else if (local_var_resp$status_code >= 300 && local_var_resp$status_code <= 399) { + ApiResponse$new(paste("Server returned ", local_var_resp$status_code, " response status code."), local_var_resp) + } else if (local_var_resp$status_code >= 400 && local_var_resp$status_code <= 499) { + ApiResponse$new("API client error", local_var_resp) + } else if (local_var_resp$status_code >= 500 && local_var_resp$status_code <= 599) { + if (is.null(local_var_resp$response) || local_var_resp$response == "") { + local_var_resp$response <- "API server error" + } + local_var_resp + } + }, + #' Get Values + #' + #' @description + #' Get Values + #' + #' @param instance_id + #' @param module_name + #' @param model_name + #' @param field_path + #' @param schema_id + #' @param limit (optional) No description (default value: 50) + #' @param offset (optional) No description (default value: 0) + #' @param authorization (optional) No description + #' @param get_values_request_body (optional) No description + #' @param data_file (optional) name of the data file to save the result + #' @param ... Other optional arguments + #' @return AnyType + #' @export + GetValuesInstancesInstanceIdModulesModuleNameModelNameFieldsFieldPathPost = function(instance_id, module_name, model_name, field_path, schema_id, limit = 50, offset = 0, authorization = NULL, get_values_request_body = NULL, data_file = NULL, ...) { + local_var_response <- self$GetValuesInstancesInstanceIdModulesModuleNameModelNameFieldsFieldPathPostWithHttpInfo(instance_id, module_name, model_name, field_path, schema_id, limit, offset, authorization, get_values_request_body, data_file = data_file, ...) + if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { + local_var_response$content + } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { + local_var_response + } else if (local_var_response$status_code >= 400 && local_var_response$status_code <= 499) { + local_var_response + } else if (local_var_response$status_code >= 500 && local_var_response$status_code <= 599) { + local_var_response + } + }, + #' Get Values + #' + #' @description + #' Get Values + #' + #' @param instance_id + #' @param module_name + #' @param model_name + #' @param field_path + #' @param schema_id + #' @param limit (optional) No description (default value: 50) + #' @param offset (optional) No description (default value: 0) + #' @param authorization (optional) No description + #' @param get_values_request_body (optional) No description + #' @param data_file (optional) name of the data file to save the result + #' @param ... Other optional arguments + #' @return API response (AnyType) with additional information such as HTTP status code, headers + #' @export + GetValuesInstancesInstanceIdModulesModuleNameModelNameFieldsFieldPathPostWithHttpInfo = function(instance_id, module_name, model_name, field_path, schema_id, limit = 50, offset = 0, authorization = NULL, get_values_request_body = NULL, data_file = NULL, ...) { + args <- list(...) + query_params <- list() + header_params <- c() + form_params <- list() + file_params <- list() + local_var_body <- NULL + oauth_scopes <- NULL + is_oauth <- FALSE + + if (missing(`instance_id`)) { + stop("Missing required parameter `instance_id`.") + } + + if (missing(`module_name`)) { + stop("Missing required parameter `module_name`.") + } + + if (missing(`model_name`)) { + stop("Missing required parameter `model_name`.") + } + + if (missing(`field_path`)) { + stop("Missing required parameter `field_path`.") + } + + if (missing(`schema_id`)) { + stop("Missing required parameter `schema_id`.") + } + + + + + + + + + + + header_params["Authorization"] <- `authorization` + + query_params[["schema_id"]] <- `schema_id` + + query_params[["limit"]] <- `limit` + + query_params[["offset"]] <- `offset` + + if (!is.null(`get_values_request_body`)) { + local_var_body <- `get_values_request_body`$toJSONString() + } else { + body <- NULL + } + + local_var_url_path <- "/instances/{instance_id}/modules/{module_name}/{model_name}/fields/{field_path}" + if (!missing(`instance_id`)) { + local_var_url_path <- gsub("\\{instance_id\\}", URLencode(as.character(`instance_id`), reserved = TRUE), local_var_url_path) + } + + if (!missing(`module_name`)) { + local_var_url_path <- gsub("\\{module_name\\}", URLencode(as.character(`module_name`), reserved = TRUE), local_var_url_path) + } + + if (!missing(`model_name`)) { + local_var_url_path <- gsub("\\{model_name\\}", URLencode(as.character(`model_name`), reserved = TRUE), local_var_url_path) + } + + if (!missing(`field_path`)) { + local_var_url_path <- gsub("\\{field_path\\}", URLencode(as.character(`field_path`), reserved = TRUE), local_var_url_path) + } + + + # The Accept request HTTP header + local_var_accepts <- list("application/json") + + # The Content-Type representation header + local_var_content_types <- list("application/json") + + local_var_resp <- self$api_client$CallApi(url = paste0(self$api_client$base_path, local_var_url_path), + method = "POST", + query_params = query_params, + header_params = header_params, + form_params = form_params, + file_params = file_params, + accepts = local_var_accepts, + content_types = local_var_content_types, + body = local_var_body, + is_oauth = is_oauth, + oauth_scopes = oauth_scopes, + ...) + + if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { + # save response in a file + if (!is.null(data_file)) { + write(local_var_resp$response, data_file) + } + + deserialized_resp_obj <- tryCatch( + self$api_client$deserialize(local_var_resp$response_as_text(), "AnyType", loadNamespace("openapi")), + error = function(e) { + stop("Failed to deserialize response") + } + ) + local_var_resp$content <- deserialized_resp_obj + local_var_resp + } else if (local_var_resp$status_code >= 300 && local_var_resp$status_code <= 399) { + ApiResponse$new(paste("Server returned ", local_var_resp$status_code, " response status code."), local_var_resp) + } else if (local_var_resp$status_code >= 400 && local_var_resp$status_code <= 499) { + ApiResponse$new("API client error", local_var_resp) + } else if (local_var_resp$status_code >= 500 && local_var_resp$status_code <= 599) { + if (is.null(local_var_resp$response) || local_var_resp$response == "") { + local_var_resp$response <- "API server error" + } + local_var_resp + } + }, + #' Grant S3 Permissions + #' + #' @description + #' Grant S3 Permissions + #' + #' @param bucket_name + #' @param s3_permissions_request + #' @param aws_account_id (optional) No description (default value: "767398070972") + #' @param aws_user_name (optional) No description (default value: "lamin-manager") + #' @param authorization (optional) No description + #' @param data_file (optional) name of the data file to save the result + #' @param ... Other optional arguments + #' @return AnyType + #' @export + GrantS3PermissionsStoragesS3BucketNamePermissionsPut = function(bucket_name, s3_permissions_request, aws_account_id = "767398070972", aws_user_name = "lamin-manager", authorization = NULL, data_file = NULL, ...) { + local_var_response <- self$GrantS3PermissionsStoragesS3BucketNamePermissionsPutWithHttpInfo(bucket_name, s3_permissions_request, aws_account_id, aws_user_name, authorization, data_file = data_file, ...) + if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { + local_var_response$content + } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { + local_var_response + } else if (local_var_response$status_code >= 400 && local_var_response$status_code <= 499) { + local_var_response + } else if (local_var_response$status_code >= 500 && local_var_response$status_code <= 599) { + local_var_response + } + }, + #' Grant S3 Permissions + #' + #' @description + #' Grant S3 Permissions + #' + #' @param bucket_name + #' @param s3_permissions_request + #' @param aws_account_id (optional) No description (default value: "767398070972") + #' @param aws_user_name (optional) No description (default value: "lamin-manager") + #' @param authorization (optional) No description + #' @param data_file (optional) name of the data file to save the result + #' @param ... Other optional arguments + #' @return API response (AnyType) with additional information such as HTTP status code, headers + #' @export + GrantS3PermissionsStoragesS3BucketNamePermissionsPutWithHttpInfo = function(bucket_name, s3_permissions_request, aws_account_id = "767398070972", aws_user_name = "lamin-manager", authorization = NULL, data_file = NULL, ...) { + args <- list(...) + query_params <- list() + header_params <- c() + form_params <- list() + file_params <- list() + local_var_body <- NULL + oauth_scopes <- NULL + is_oauth <- FALSE + + if (missing(`bucket_name`)) { + stop("Missing required parameter `bucket_name`.") + } + + if (missing(`s3_permissions_request`)) { + stop("Missing required parameter `s3_permissions_request`.") + } + + + + + + + header_params["Authorization"] <- `authorization` + + query_params[["aws_account_id"]] <- `aws_account_id` + + query_params[["aws_user_name"]] <- `aws_user_name` + + if (!is.null(`s3_permissions_request`)) { + local_var_body <- `s3_permissions_request`$toJSONString() + } else { + body <- NULL + } + + local_var_url_path <- "/storages/s3/{bucket_name}/permissions" + if (!missing(`bucket_name`)) { + local_var_url_path <- gsub("\\{bucket_name\\}", URLencode(as.character(`bucket_name`), reserved = TRUE), local_var_url_path) + } + + + # The Accept request HTTP header + local_var_accepts <- list("application/json") + + # The Content-Type representation header + local_var_content_types <- list("application/json") + + local_var_resp <- self$api_client$CallApi(url = paste0(self$api_client$base_path, local_var_url_path), + method = "PUT", + query_params = query_params, + header_params = header_params, + form_params = form_params, + file_params = file_params, + accepts = local_var_accepts, + content_types = local_var_content_types, + body = local_var_body, + is_oauth = is_oauth, + oauth_scopes = oauth_scopes, + ...) + + if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { + # save response in a file + if (!is.null(data_file)) { + write(local_var_resp$response, data_file) + } + + deserialized_resp_obj <- tryCatch( + self$api_client$deserialize(local_var_resp$response_as_text(), "AnyType", loadNamespace("openapi")), + error = function(e) { + stop("Failed to deserialize response") + } + ) + local_var_resp$content <- deserialized_resp_obj + local_var_resp + } else if (local_var_resp$status_code >= 300 && local_var_resp$status_code <= 399) { + ApiResponse$new(paste("Server returned ", local_var_resp$status_code, " response status code."), local_var_resp) + } else if (local_var_resp$status_code >= 400 && local_var_resp$status_code <= 499) { + ApiResponse$new("API client error", local_var_resp) + } else if (local_var_resp$status_code >= 500 && local_var_resp$status_code <= 599) { + if (is.null(local_var_resp$response) || local_var_resp$response == "") { + local_var_resp$response <- "API server error" + } + local_var_resp + } + }, + #' Group By + #' + #' @description + #' Group By + #' + #' @param instance_id + #' @param module_name + #' @param model_name + #' @param schema_id + #' @param group_by_request_body + #' @param authorization (optional) No description + #' @param data_file (optional) name of the data file to save the result + #' @param ... Other optional arguments + #' @return AnyType + #' @export + GroupByInstancesInstanceIdModulesModuleNameModelNameGroupByPost = function(instance_id, module_name, model_name, schema_id, group_by_request_body, authorization = NULL, data_file = NULL, ...) { + local_var_response <- self$GroupByInstancesInstanceIdModulesModuleNameModelNameGroupByPostWithHttpInfo(instance_id, module_name, model_name, schema_id, group_by_request_body, authorization, data_file = data_file, ...) + if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { + local_var_response$content + } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { + local_var_response + } else if (local_var_response$status_code >= 400 && local_var_response$status_code <= 499) { + local_var_response + } else if (local_var_response$status_code >= 500 && local_var_response$status_code <= 599) { + local_var_response + } + }, + #' Group By + #' + #' @description + #' Group By + #' + #' @param instance_id + #' @param module_name + #' @param model_name + #' @param schema_id + #' @param group_by_request_body + #' @param authorization (optional) No description + #' @param data_file (optional) name of the data file to save the result + #' @param ... Other optional arguments + #' @return API response (AnyType) with additional information such as HTTP status code, headers + #' @export + GroupByInstancesInstanceIdModulesModuleNameModelNameGroupByPostWithHttpInfo = function(instance_id, module_name, model_name, schema_id, group_by_request_body, authorization = NULL, data_file = NULL, ...) { + args <- list(...) + query_params <- list() + header_params <- c() + form_params <- list() + file_params <- list() + local_var_body <- NULL + oauth_scopes <- NULL + is_oauth <- FALSE + + if (missing(`instance_id`)) { + stop("Missing required parameter `instance_id`.") + } + + if (missing(`module_name`)) { + stop("Missing required parameter `module_name`.") + } + + if (missing(`model_name`)) { + stop("Missing required parameter `model_name`.") + } + + if (missing(`schema_id`)) { + stop("Missing required parameter `schema_id`.") + } + + if (missing(`group_by_request_body`)) { + stop("Missing required parameter `group_by_request_body`.") + } + + + + + + + + header_params["Authorization"] <- `authorization` + + query_params[["schema_id"]] <- `schema_id` + + if (!is.null(`group_by_request_body`)) { + local_var_body <- `group_by_request_body`$toJSONString() + } else { + body <- NULL + } + + local_var_url_path <- "/instances/{instance_id}/modules/{module_name}/{model_name}/group-by" + if (!missing(`instance_id`)) { + local_var_url_path <- gsub("\\{instance_id\\}", URLencode(as.character(`instance_id`), reserved = TRUE), local_var_url_path) + } + + if (!missing(`module_name`)) { + local_var_url_path <- gsub("\\{module_name\\}", URLencode(as.character(`module_name`), reserved = TRUE), local_var_url_path) + } + + if (!missing(`model_name`)) { + local_var_url_path <- gsub("\\{model_name\\}", URLencode(as.character(`model_name`), reserved = TRUE), local_var_url_path) + } + + + # The Accept request HTTP header + local_var_accepts <- list("application/json") + + # The Content-Type representation header + local_var_content_types <- list("application/json") + + local_var_resp <- self$api_client$CallApi(url = paste0(self$api_client$base_path, local_var_url_path), + method = "POST", + query_params = query_params, + header_params = header_params, + form_params = form_params, + file_params = file_params, + accepts = local_var_accepts, + content_types = local_var_content_types, + body = local_var_body, + is_oauth = is_oauth, + oauth_scopes = oauth_scopes, + ...) + + if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { + # save response in a file + if (!is.null(data_file)) { + write(local_var_resp$response, data_file) + } + + deserialized_resp_obj <- tryCatch( + self$api_client$deserialize(local_var_resp$response_as_text(), "AnyType", loadNamespace("openapi")), + error = function(e) { + stop("Failed to deserialize response") + } + ) + local_var_resp$content <- deserialized_resp_obj + local_var_resp + } else if (local_var_resp$status_code >= 300 && local_var_resp$status_code <= 399) { + ApiResponse$new(paste("Server returned ", local_var_resp$status_code, " response status code."), local_var_resp) + } else if (local_var_resp$status_code >= 400 && local_var_resp$status_code <= 499) { + ApiResponse$new("API client error", local_var_resp) + } else if (local_var_resp$status_code >= 500 && local_var_resp$status_code <= 599) { + if (is.null(local_var_resp$response) || local_var_resp$response == "") { + local_var_resp$response <- "API server error" + } + local_var_resp + } + }, + #' Transfer Ownership + #' + #' @description + #' Transfer Ownership + #' + #' @param instance_id + #' @param handle + #' @param schema_id + #' @param authorization (optional) No description + #' @param data_file (optional) name of the data file to save the result + #' @param ... Other optional arguments + #' @return AnyType + #' @export + TransferOwnershipInstancesInstanceIdOwnerHandlePatch = function(instance_id, handle, schema_id, authorization = NULL, data_file = NULL, ...) { + local_var_response <- self$TransferOwnershipInstancesInstanceIdOwnerHandlePatchWithHttpInfo(instance_id, handle, schema_id, authorization, data_file = data_file, ...) + if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { + local_var_response$content + } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { + local_var_response + } else if (local_var_response$status_code >= 400 && local_var_response$status_code <= 499) { + local_var_response + } else if (local_var_response$status_code >= 500 && local_var_response$status_code <= 599) { + local_var_response + } + }, + #' Transfer Ownership + #' + #' @description + #' Transfer Ownership + #' + #' @param instance_id + #' @param handle + #' @param schema_id + #' @param authorization (optional) No description + #' @param data_file (optional) name of the data file to save the result + #' @param ... Other optional arguments + #' @return API response (AnyType) with additional information such as HTTP status code, headers + #' @export + TransferOwnershipInstancesInstanceIdOwnerHandlePatchWithHttpInfo = function(instance_id, handle, schema_id, authorization = NULL, data_file = NULL, ...) { + args <- list(...) + query_params <- list() + header_params <- c() + form_params <- list() + file_params <- list() + local_var_body <- NULL + oauth_scopes <- NULL + is_oauth <- FALSE + + if (missing(`instance_id`)) { + stop("Missing required parameter `instance_id`.") + } + + if (missing(`handle`)) { + stop("Missing required parameter `handle`.") + } + + if (missing(`schema_id`)) { + stop("Missing required parameter `schema_id`.") + } + + + + + + header_params["Authorization"] <- `authorization` + + query_params[["schema_id"]] <- `schema_id` + + local_var_url_path <- "/instances/{instance_id}/owner/{handle}" + if (!missing(`instance_id`)) { + local_var_url_path <- gsub("\\{instance_id\\}", URLencode(as.character(`instance_id`), reserved = TRUE), local_var_url_path) + } + + if (!missing(`handle`)) { + local_var_url_path <- gsub("\\{handle\\}", URLencode(as.character(`handle`), reserved = TRUE), local_var_url_path) + } + + + # The Accept request HTTP header + local_var_accepts <- list("application/json") + + # The Content-Type representation header + local_var_content_types <- list() + + local_var_resp <- self$api_client$CallApi(url = paste0(self$api_client$base_path, local_var_url_path), + method = "PATCH", + query_params = query_params, + header_params = header_params, + form_params = form_params, + file_params = file_params, + accepts = local_var_accepts, + content_types = local_var_content_types, + body = local_var_body, + is_oauth = is_oauth, + oauth_scopes = oauth_scopes, + ...) + + if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { + # save response in a file + if (!is.null(data_file)) { + write(local_var_resp$response, data_file) + } + + deserialized_resp_obj <- tryCatch( + self$api_client$deserialize(local_var_resp$response_as_text(), "AnyType", loadNamespace("openapi")), + error = function(e) { + stop("Failed to deserialize response") + } + ) + local_var_resp$content <- deserialized_resp_obj + local_var_resp + } else if (local_var_resp$status_code >= 300 && local_var_resp$status_code <= 399) { + ApiResponse$new(paste("Server returned ", local_var_resp$status_code, " response status code."), local_var_resp) + } else if (local_var_resp$status_code >= 400 && local_var_resp$status_code <= 499) { + ApiResponse$new("API client error", local_var_resp) + } else if (local_var_resp$status_code >= 500 && local_var_resp$status_code <= 599) { + if (is.null(local_var_resp$response) || local_var_resp$response == "") { + local_var_resp$response <- "API server error" + } + local_var_resp + } + }, + #' Update Collaborator + #' + #' @description + #' Update Collaborator + #' + #' @param instance_id + #' @param account_id + #' @param role + #' @param authorization (optional) No description + #' @param data_file (optional) name of the data file to save the result + #' @param ... Other optional arguments + #' @return AnyType + #' @export + UpdateCollaboratorInstancesInstanceIdCollaboratorsAccountIdPatch = function(instance_id, account_id, role, authorization = NULL, data_file = NULL, ...) { + local_var_response <- self$UpdateCollaboratorInstancesInstanceIdCollaboratorsAccountIdPatchWithHttpInfo(instance_id, account_id, role, authorization, data_file = data_file, ...) + if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { + local_var_response$content + } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { + local_var_response + } else if (local_var_response$status_code >= 400 && local_var_response$status_code <= 499) { + local_var_response + } else if (local_var_response$status_code >= 500 && local_var_response$status_code <= 599) { + local_var_response + } + }, + #' Update Collaborator + #' + #' @description + #' Update Collaborator + #' + #' @param instance_id + #' @param account_id + #' @param role + #' @param authorization (optional) No description + #' @param data_file (optional) name of the data file to save the result + #' @param ... Other optional arguments + #' @return API response (AnyType) with additional information such as HTTP status code, headers + #' @export + UpdateCollaboratorInstancesInstanceIdCollaboratorsAccountIdPatchWithHttpInfo = function(instance_id, account_id, role, authorization = NULL, data_file = NULL, ...) { + args <- list(...) + query_params <- list() + header_params <- c() + form_params <- list() + file_params <- list() + local_var_body <- NULL + oauth_scopes <- NULL + is_oauth <- FALSE + + if (missing(`instance_id`)) { + stop("Missing required parameter `instance_id`.") + } + + if (missing(`account_id`)) { + stop("Missing required parameter `account_id`.") + } + + if (missing(`role`)) { + stop("Missing required parameter `role`.") + } + + + + + + header_params["Authorization"] <- `authorization` + + if (!(`role` %in% c("admin", "write", "read"))) { + stop("Invalid value for role when calling DefaultApi$UpdateCollaboratorInstancesInstanceIdCollaboratorsAccountIdPatch. Must be [admin, write, read].") + } + query_params[["role"]] <- `role` + + local_var_url_path <- "/instances/{instance_id}/collaborators/{account_id}" + if (!missing(`instance_id`)) { + local_var_url_path <- gsub("\\{instance_id\\}", URLencode(as.character(`instance_id`), reserved = TRUE), local_var_url_path) + } + + if (!missing(`account_id`)) { + local_var_url_path <- gsub("\\{account_id\\}", URLencode(as.character(`account_id`), reserved = TRUE), local_var_url_path) + } + + + # The Accept request HTTP header + local_var_accepts <- list("application/json") + + # The Content-Type representation header + local_var_content_types <- list() + + local_var_resp <- self$api_client$CallApi(url = paste0(self$api_client$base_path, local_var_url_path), + method = "PATCH", + query_params = query_params, + header_params = header_params, + form_params = form_params, + file_params = file_params, + accepts = local_var_accepts, + content_types = local_var_content_types, + body = local_var_body, + is_oauth = is_oauth, + oauth_scopes = oauth_scopes, + ...) + + if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { + # save response in a file + if (!is.null(data_file)) { + write(local_var_resp$response, data_file) + } + + deserialized_resp_obj <- tryCatch( + self$api_client$deserialize(local_var_resp$response_as_text(), "AnyType", loadNamespace("openapi")), + error = function(e) { + stop("Failed to deserialize response") + } + ) + local_var_resp$content <- deserialized_resp_obj + local_var_resp + } else if (local_var_resp$status_code >= 300 && local_var_resp$status_code <= 399) { + ApiResponse$new(paste("Server returned ", local_var_resp$status_code, " response status code."), local_var_resp) + } else if (local_var_resp$status_code >= 400 && local_var_resp$status_code <= 499) { + ApiResponse$new("API client error", local_var_resp) + } else if (local_var_resp$status_code >= 500 && local_var_resp$status_code <= 599) { + if (is.null(local_var_resp$response) || local_var_resp$response == "") { + local_var_resp$response <- "API server error" + } + local_var_resp + } + }, + #' Update Record + #' + #' @description + #' Update Record + #' + #' @param instance_id + #' @param module_name + #' @param model_name + #' @param uid + #' @param schema_id + #' @param body + #' @param authorization (optional) No description + #' @param data_file (optional) name of the data file to save the result + #' @param ... Other optional arguments + #' @return AnyType + #' @export + UpdateRecordInstancesInstanceIdModulesModuleNameModelNameUidPatch = function(instance_id, module_name, model_name, uid, schema_id, body, authorization = NULL, data_file = NULL, ...) { + local_var_response <- self$UpdateRecordInstancesInstanceIdModulesModuleNameModelNameUidPatchWithHttpInfo(instance_id, module_name, model_name, uid, schema_id, body, authorization, data_file = data_file, ...) + if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { + local_var_response$content + } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { + local_var_response + } else if (local_var_response$status_code >= 400 && local_var_response$status_code <= 499) { + local_var_response + } else if (local_var_response$status_code >= 500 && local_var_response$status_code <= 599) { + local_var_response + } + }, + #' Update Record + #' + #' @description + #' Update Record + #' + #' @param instance_id + #' @param module_name + #' @param model_name + #' @param uid + #' @param schema_id + #' @param body + #' @param authorization (optional) No description + #' @param data_file (optional) name of the data file to save the result + #' @param ... Other optional arguments + #' @return API response (AnyType) with additional information such as HTTP status code, headers + #' @export + UpdateRecordInstancesInstanceIdModulesModuleNameModelNameUidPatchWithHttpInfo = function(instance_id, module_name, model_name, uid, schema_id, body, authorization = NULL, data_file = NULL, ...) { + args <- list(...) + query_params <- list() + header_params <- c() + form_params <- list() + file_params <- list() + local_var_body <- NULL + oauth_scopes <- NULL + is_oauth <- FALSE + + if (missing(`instance_id`)) { + stop("Missing required parameter `instance_id`.") + } + + if (missing(`module_name`)) { + stop("Missing required parameter `module_name`.") + } + + if (missing(`model_name`)) { + stop("Missing required parameter `model_name`.") + } + + if (missing(`uid`)) { + stop("Missing required parameter `uid`.") + } + + if (missing(`schema_id`)) { + stop("Missing required parameter `schema_id`.") + } + + if (missing(`body`)) { + stop("Missing required parameter `body`.") + } + + + + + + + + + header_params["Authorization"] <- `authorization` + + query_params[["schema_id"]] <- `schema_id` + + if (!is.null(`body`)) { + local_var_body <- `body`$toJSONString() + } else { + body <- NULL + } + + local_var_url_path <- "/instances/{instance_id}/modules/{module_name}/{model_name}/{uid}" + if (!missing(`instance_id`)) { + local_var_url_path <- gsub("\\{instance_id\\}", URLencode(as.character(`instance_id`), reserved = TRUE), local_var_url_path) + } + + if (!missing(`module_name`)) { + local_var_url_path <- gsub("\\{module_name\\}", URLencode(as.character(`module_name`), reserved = TRUE), local_var_url_path) + } + + if (!missing(`model_name`)) { + local_var_url_path <- gsub("\\{model_name\\}", URLencode(as.character(`model_name`), reserved = TRUE), local_var_url_path) + } + + if (!missing(`uid`)) { + local_var_url_path <- gsub("\\{uid\\}", URLencode(as.character(`uid`), reserved = TRUE), local_var_url_path) + } + + + # The Accept request HTTP header + local_var_accepts <- list("application/json") + + # The Content-Type representation header + local_var_content_types <- list("application/json") + + local_var_resp <- self$api_client$CallApi(url = paste0(self$api_client$base_path, local_var_url_path), + method = "PATCH", + query_params = query_params, + header_params = header_params, + form_params = form_params, + file_params = file_params, + accepts = local_var_accepts, + content_types = local_var_content_types, + body = local_var_body, + is_oauth = is_oauth, + oauth_scopes = oauth_scopes, + ...) + + if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { + # save response in a file + if (!is.null(data_file)) { + write(local_var_resp$response, data_file) + } + + deserialized_resp_obj <- tryCatch( + self$api_client$deserialize(local_var_resp$response_as_text(), "AnyType", loadNamespace("openapi")), + error = function(e) { + stop("Failed to deserialize response") + } + ) + local_var_resp$content <- deserialized_resp_obj + local_var_resp + } else if (local_var_resp$status_code >= 300 && local_var_resp$status_code <= 399) { + ApiResponse$new(paste("Server returned ", local_var_resp$status_code, " response status code."), local_var_resp) + } else if (local_var_resp$status_code >= 400 && local_var_resp$status_code <= 499) { + ApiResponse$new("API client error", local_var_resp) + } else if (local_var_resp$status_code >= 500 && local_var_resp$status_code <= 599) { + if (is.null(local_var_resp$response) || local_var_resp$response == "") { + local_var_resp$response <- "API server error" + } + local_var_resp + } + } + ) +) diff --git a/R/dimension.R b/R/dimension.R new file mode 100644 index 0000000..7458b23 --- /dev/null +++ b/R/dimension.R @@ -0,0 +1,215 @@ +#' Create a new Dimension +#' +#' @description +#' Dimension Class +#' +#' @docType class +#' @title Dimension +#' @description Dimension Class +#' @format An \code{R6Class} generator object +#' @field field_name character +#' @field func character [optional] +#' @importFrom R6 R6Class +#' @importFrom jsonlite fromJSON toJSON +#' @export +Dimension <- R6::R6Class( + "Dimension", + public = list( + `field_name` = NULL, + `func` = NULL, + #' Initialize a new Dimension class. + #' + #' @description + #' Initialize a new Dimension class. + #' + #' @param field_name field_name + #' @param func func + #' @param ... Other optional arguments. + #' @export + initialize = function(`field_name`, `func` = NULL, ...) { + if (!missing(`field_name`)) { + if (!(is.character(`field_name`) && length(`field_name`) == 1)) { + stop(paste("Error! Invalid data for `field_name`. Must be a string:", `field_name`)) + } + self$`field_name` <- `field_name` + } + if (!is.null(`func`)) { + if (!(`func` %in% c("count", "sum", "min", "max", "mean"))) { + stop(paste("Error! \"", `func`, "\" cannot be assigned to `func`. Must be \"count\", \"sum\", \"min\", \"max\", \"mean\".", sep = "")) + } + if (!(is.character(`func`) && length(`func`) == 1)) { + stop(paste("Error! Invalid data for `func`. Must be a string:", `func`)) + } + self$`func` <- `func` + } + }, + #' To JSON string + #' + #' @description + #' To JSON String + #' + #' @return Dimension in JSON format + #' @export + toJSON = function() { + DimensionObject <- list() + if (!is.null(self$`field_name`)) { + DimensionObject[["field_name"]] <- + self$`field_name` + } + if (!is.null(self$`func`)) { + DimensionObject[["func"]] <- + self$`func` + } + DimensionObject + }, + #' Deserialize JSON string into an instance of Dimension + #' + #' @description + #' Deserialize JSON string into an instance of Dimension + #' + #' @param input_json the JSON input + #' @return the instance of Dimension + #' @export + fromJSON = function(input_json) { + this_object <- jsonlite::fromJSON(input_json) + if (!is.null(this_object$`field_name`)) { + self$`field_name` <- this_object$`field_name` + } + if (!is.null(this_object$`func`)) { + if (!is.null(this_object$`func`) && !(this_object$`func` %in% c("count", "sum", "min", "max", "mean"))) { + stop(paste("Error! \"", this_object$`func`, "\" cannot be assigned to `func`. Must be \"count\", \"sum\", \"min\", \"max\", \"mean\".", sep = "")) + } + self$`func` <- this_object$`func` + } + self + }, + #' To JSON string + #' + #' @description + #' To JSON String + #' + #' @return Dimension in JSON format + #' @export + toJSONString = function() { + jsoncontent <- c( + if (!is.null(self$`field_name`)) { + sprintf( + '"field_name": + "%s" + ', + self$`field_name` + ) + }, + if (!is.null(self$`func`)) { + sprintf( + '"func": + "%s" + ', + self$`func` + ) + } + ) + jsoncontent <- paste(jsoncontent, collapse = ",") + json_string <- as.character(jsonlite::minify(paste("{", jsoncontent, "}", sep = ""))) + }, + #' Deserialize JSON string into an instance of Dimension + #' + #' @description + #' Deserialize JSON string into an instance of Dimension + #' + #' @param input_json the JSON input + #' @return the instance of Dimension + #' @export + fromJSONString = function(input_json) { + this_object <- jsonlite::fromJSON(input_json) + self$`field_name` <- this_object$`field_name` + if (!is.null(this_object$`func`) && !(this_object$`func` %in% c("count", "sum", "min", "max", "mean"))) { + stop(paste("Error! \"", this_object$`func`, "\" cannot be assigned to `func`. Must be \"count\", \"sum\", \"min\", \"max\", \"mean\".", sep = "")) + } + self$`func` <- this_object$`func` + self + }, + #' Validate JSON input with respect to Dimension + #' + #' @description + #' Validate JSON input with respect to Dimension and throw an exception if invalid + #' + #' @param input the JSON input + #' @export + validateJSON = function(input) { + input_json <- jsonlite::fromJSON(input) + # check the required field `field_name` + if (!is.null(input_json$`field_name`)) { + if (!(is.character(input_json$`field_name`) && length(input_json$`field_name`) == 1)) { + stop(paste("Error! Invalid data for `field_name`. Must be a string:", input_json$`field_name`)) + } + } else { + stop(paste("The JSON input `", input, "` is invalid for Dimension: the required field `field_name` is missing.")) + } + }, + #' To string (JSON format) + #' + #' @description + #' To string (JSON format) + #' + #' @return String representation of Dimension + #' @export + toString = function() { + self$toJSONString() + }, + #' Return true if the values in all fields are valid. + #' + #' @description + #' Return true if the values in all fields are valid. + #' + #' @return true if the values in all fields are valid. + #' @export + isValid = function() { + # check if the required `field_name` is null + if (is.null(self$`field_name`)) { + return(FALSE) + } + + TRUE + }, + #' Return a list of invalid fields (if any). + #' + #' @description + #' Return a list of invalid fields (if any). + #' + #' @return A list of invalid fields (if any). + #' @export + getInvalidFields = function() { + invalid_fields <- list() + # check if the required `field_name` is null + if (is.null(self$`field_name`)) { + invalid_fields["field_name"] <- "Non-nullable required field `field_name` cannot be null." + } + + invalid_fields + }, + #' Print the object + #' + #' @description + #' Print the object + #' + #' @export + print = function() { + print(jsonlite::prettify(self$toJSONString())) + invisible(self) + } + ), + # Lock the class to prevent modifications to the method or field + lock_class = TRUE +) +## Uncomment below to unlock the class to allow modifications of the method or field +# Dimension$unlock() +# +## Below is an example to define the print function +# Dimension$set("public", "print", function(...) { +# print(jsonlite::prettify(self$toJSONString())) +# invisible(self) +# }) +## Uncomment below to lock the class to prevent modifications to the method or field +# Dimension$lock() + diff --git a/R/get_record_request_body.R b/R/get_record_request_body.R new file mode 100644 index 0000000..a3cbd4e --- /dev/null +++ b/R/get_record_request_body.R @@ -0,0 +1,162 @@ +#' Create a new GetRecordRequestBody +#' +#' @description +#' GetRecordRequestBody Class +#' +#' @docType class +#' @title GetRecordRequestBody +#' @description GetRecordRequestBody Class +#' @format An \code{R6Class} generator object +#' @field select list(character) [optional] +#' @importFrom R6 R6Class +#' @importFrom jsonlite fromJSON toJSON +#' @export +GetRecordRequestBody <- R6::R6Class( + "GetRecordRequestBody", + public = list( + `select` = NULL, + #' Initialize a new GetRecordRequestBody class. + #' + #' @description + #' Initialize a new GetRecordRequestBody class. + #' + #' @param select select + #' @param ... Other optional arguments. + #' @export + initialize = function(`select` = NULL, ...) { + if (!is.null(`select`)) { + stopifnot(is.vector(`select`), length(`select`) != 0) + sapply(`select`, function(x) stopifnot(is.character(x))) + self$`select` <- `select` + } + }, + #' To JSON string + #' + #' @description + #' To JSON String + #' + #' @return GetRecordRequestBody in JSON format + #' @export + toJSON = function() { + GetRecordRequestBodyObject <- list() + if (!is.null(self$`select`)) { + GetRecordRequestBodyObject[["select"]] <- + self$`select` + } + GetRecordRequestBodyObject + }, + #' Deserialize JSON string into an instance of GetRecordRequestBody + #' + #' @description + #' Deserialize JSON string into an instance of GetRecordRequestBody + #' + #' @param input_json the JSON input + #' @return the instance of GetRecordRequestBody + #' @export + fromJSON = function(input_json) { + this_object <- jsonlite::fromJSON(input_json) + if (!is.null(this_object$`select`)) { + self$`select` <- ApiClient$new()$deserializeObj(this_object$`select`, "array[character]", loadNamespace("openapi")) + } + self + }, + #' To JSON string + #' + #' @description + #' To JSON String + #' + #' @return GetRecordRequestBody in JSON format + #' @export + toJSONString = function() { + jsoncontent <- c( + if (!is.null(self$`select`)) { + sprintf( + '"select": + [%s] + ', + paste(unlist(lapply(self$`select`, function(x) paste0('"', x, '"'))), collapse = ",") + ) + } + ) + jsoncontent <- paste(jsoncontent, collapse = ",") + json_string <- as.character(jsonlite::minify(paste("{", jsoncontent, "}", sep = ""))) + }, + #' Deserialize JSON string into an instance of GetRecordRequestBody + #' + #' @description + #' Deserialize JSON string into an instance of GetRecordRequestBody + #' + #' @param input_json the JSON input + #' @return the instance of GetRecordRequestBody + #' @export + fromJSONString = function(input_json) { + this_object <- jsonlite::fromJSON(input_json) + self$`select` <- ApiClient$new()$deserializeObj(this_object$`select`, "array[character]", loadNamespace("openapi")) + self + }, + #' Validate JSON input with respect to GetRecordRequestBody + #' + #' @description + #' Validate JSON input with respect to GetRecordRequestBody and throw an exception if invalid + #' + #' @param input the JSON input + #' @export + validateJSON = function(input) { + input_json <- jsonlite::fromJSON(input) + }, + #' To string (JSON format) + #' + #' @description + #' To string (JSON format) + #' + #' @return String representation of GetRecordRequestBody + #' @export + toString = function() { + self$toJSONString() + }, + #' Return true if the values in all fields are valid. + #' + #' @description + #' Return true if the values in all fields are valid. + #' + #' @return true if the values in all fields are valid. + #' @export + isValid = function() { + TRUE + }, + #' Return a list of invalid fields (if any). + #' + #' @description + #' Return a list of invalid fields (if any). + #' + #' @return A list of invalid fields (if any). + #' @export + getInvalidFields = function() { + invalid_fields <- list() + invalid_fields + }, + #' Print the object + #' + #' @description + #' Print the object + #' + #' @export + print = function() { + print(jsonlite::prettify(self$toJSONString())) + invisible(self) + } + ), + # Lock the class to prevent modifications to the method or field + lock_class = TRUE +) +## Uncomment below to unlock the class to allow modifications of the method or field +# GetRecordRequestBody$unlock() +# +## Below is an example to define the print function +# GetRecordRequestBody$set("public", "print", function(...) { +# print(jsonlite::prettify(self$toJSONString())) +# invisible(self) +# }) +## Uncomment below to lock the class to prevent modifications to the method or field +# GetRecordRequestBody$lock() + diff --git a/R/get_records_request_body.R b/R/get_records_request_body.R new file mode 100644 index 0000000..6482af7 --- /dev/null +++ b/R/get_records_request_body.R @@ -0,0 +1,233 @@ +#' Create a new GetRecordsRequestBody +#' +#' @description +#' GetRecordsRequestBody Class +#' +#' @docType class +#' @title GetRecordsRequestBody +#' @description GetRecordsRequestBody Class +#' @format An \code{R6Class} generator object +#' @field select list(character) [optional] +#' @field filter object [optional] +#' @field order_by list(\link{OrderByColumn}) [optional] +#' @field search character [optional] +#' @importFrom R6 R6Class +#' @importFrom jsonlite fromJSON toJSON +#' @export +GetRecordsRequestBody <- R6::R6Class( + "GetRecordsRequestBody", + public = list( + `select` = NULL, + `filter` = NULL, + `order_by` = NULL, + `search` = NULL, + #' Initialize a new GetRecordsRequestBody class. + #' + #' @description + #' Initialize a new GetRecordsRequestBody class. + #' + #' @param select select + #' @param filter filter + #' @param order_by order_by + #' @param search search. Default to "". + #' @param ... Other optional arguments. + #' @export + initialize = function(`select` = NULL, `filter` = NULL, `order_by` = NULL, `search` = "", ...) { + if (!is.null(`select`)) { + stopifnot(is.vector(`select`), length(`select`) != 0) + sapply(`select`, function(x) stopifnot(is.character(x))) + self$`select` <- `select` + } + if (!is.null(`filter`)) { + self$`filter` <- `filter` + } + if (!is.null(`order_by`)) { + stopifnot(is.vector(`order_by`), length(`order_by`) != 0) + sapply(`order_by`, function(x) stopifnot(R6::is.R6(x))) + self$`order_by` <- `order_by` + } + if (!is.null(`search`)) { + if (!(is.character(`search`) && length(`search`) == 1)) { + stop(paste("Error! Invalid data for `search`. Must be a string:", `search`)) + } + self$`search` <- `search` + } + }, + #' To JSON string + #' + #' @description + #' To JSON String + #' + #' @return GetRecordsRequestBody in JSON format + #' @export + toJSON = function() { + GetRecordsRequestBodyObject <- list() + if (!is.null(self$`select`)) { + GetRecordsRequestBodyObject[["select"]] <- + self$`select` + } + if (!is.null(self$`filter`)) { + GetRecordsRequestBodyObject[["filter"]] <- + self$`filter` + } + if (!is.null(self$`order_by`)) { + GetRecordsRequestBodyObject[["order_by"]] <- + lapply(self$`order_by`, function(x) x$toJSON()) + } + if (!is.null(self$`search`)) { + GetRecordsRequestBodyObject[["search"]] <- + self$`search` + } + GetRecordsRequestBodyObject + }, + #' Deserialize JSON string into an instance of GetRecordsRequestBody + #' + #' @description + #' Deserialize JSON string into an instance of GetRecordsRequestBody + #' + #' @param input_json the JSON input + #' @return the instance of GetRecordsRequestBody + #' @export + fromJSON = function(input_json) { + this_object <- jsonlite::fromJSON(input_json) + if (!is.null(this_object$`select`)) { + self$`select` <- ApiClient$new()$deserializeObj(this_object$`select`, "array[character]", loadNamespace("openapi")) + } + if (!is.null(this_object$`filter`)) { + self$`filter` <- this_object$`filter` + } + if (!is.null(this_object$`order_by`)) { + self$`order_by` <- ApiClient$new()$deserializeObj(this_object$`order_by`, "array[OrderByColumn]", loadNamespace("openapi")) + } + if (!is.null(this_object$`search`)) { + self$`search` <- this_object$`search` + } + self + }, + #' To JSON string + #' + #' @description + #' To JSON String + #' + #' @return GetRecordsRequestBody in JSON format + #' @export + toJSONString = function() { + jsoncontent <- c( + if (!is.null(self$`select`)) { + sprintf( + '"select": + [%s] + ', + paste(unlist(lapply(self$`select`, function(x) paste0('"', x, '"'))), collapse = ",") + ) + }, + if (!is.null(self$`filter`)) { + sprintf( + '"filter": + "%s" + ', + self$`filter` + ) + }, + if (!is.null(self$`order_by`)) { + sprintf( + '"order_by": + [%s] +', + paste(sapply(self$`order_by`, function(x) jsonlite::toJSON(x$toJSON(), auto_unbox = TRUE, digits = NA)), collapse = ",") + ) + }, + if (!is.null(self$`search`)) { + sprintf( + '"search": + "%s" + ', + self$`search` + ) + } + ) + jsoncontent <- paste(jsoncontent, collapse = ",") + json_string <- as.character(jsonlite::minify(paste("{", jsoncontent, "}", sep = ""))) + }, + #' Deserialize JSON string into an instance of GetRecordsRequestBody + #' + #' @description + #' Deserialize JSON string into an instance of GetRecordsRequestBody + #' + #' @param input_json the JSON input + #' @return the instance of GetRecordsRequestBody + #' @export + fromJSONString = function(input_json) { + this_object <- jsonlite::fromJSON(input_json) + self$`select` <- ApiClient$new()$deserializeObj(this_object$`select`, "array[character]", loadNamespace("openapi")) + self$`filter` <- this_object$`filter` + self$`order_by` <- ApiClient$new()$deserializeObj(this_object$`order_by`, "array[OrderByColumn]", loadNamespace("openapi")) + self$`search` <- this_object$`search` + self + }, + #' Validate JSON input with respect to GetRecordsRequestBody + #' + #' @description + #' Validate JSON input with respect to GetRecordsRequestBody and throw an exception if invalid + #' + #' @param input the JSON input + #' @export + validateJSON = function(input) { + input_json <- jsonlite::fromJSON(input) + }, + #' To string (JSON format) + #' + #' @description + #' To string (JSON format) + #' + #' @return String representation of GetRecordsRequestBody + #' @export + toString = function() { + self$toJSONString() + }, + #' Return true if the values in all fields are valid. + #' + #' @description + #' Return true if the values in all fields are valid. + #' + #' @return true if the values in all fields are valid. + #' @export + isValid = function() { + TRUE + }, + #' Return a list of invalid fields (if any). + #' + #' @description + #' Return a list of invalid fields (if any). + #' + #' @return A list of invalid fields (if any). + #' @export + getInvalidFields = function() { + invalid_fields <- list() + invalid_fields + }, + #' Print the object + #' + #' @description + #' Print the object + #' + #' @export + print = function() { + print(jsonlite::prettify(self$toJSONString())) + invisible(self) + } + ), + # Lock the class to prevent modifications to the method or field + lock_class = TRUE +) +## Uncomment below to unlock the class to allow modifications of the method or field +# GetRecordsRequestBody$unlock() +# +## Below is an example to define the print function +# GetRecordsRequestBody$set("public", "print", function(...) { +# print(jsonlite::prettify(self$toJSONString())) +# invisible(self) +# }) +## Uncomment below to lock the class to prevent modifications to the method or field +# GetRecordsRequestBody$lock() + diff --git a/R/get_values_request_body.R b/R/get_values_request_body.R new file mode 100644 index 0000000..f3f5ccb --- /dev/null +++ b/R/get_values_request_body.R @@ -0,0 +1,209 @@ +#' Create a new GetValuesRequestBody +#' +#' @description +#' GetValuesRequestBody Class +#' +#' @docType class +#' @title GetValuesRequestBody +#' @description GetValuesRequestBody Class +#' @format An \code{R6Class} generator object +#' @field filter object [optional] +#' @field order_by list(\link{OrderByColumn}) [optional] +#' @field search character [optional] +#' @importFrom R6 R6Class +#' @importFrom jsonlite fromJSON toJSON +#' @export +GetValuesRequestBody <- R6::R6Class( + "GetValuesRequestBody", + public = list( + `filter` = NULL, + `order_by` = NULL, + `search` = NULL, + #' Initialize a new GetValuesRequestBody class. + #' + #' @description + #' Initialize a new GetValuesRequestBody class. + #' + #' @param filter filter + #' @param order_by order_by + #' @param search search. Default to "". + #' @param ... Other optional arguments. + #' @export + initialize = function(`filter` = NULL, `order_by` = NULL, `search` = "", ...) { + if (!is.null(`filter`)) { + self$`filter` <- `filter` + } + if (!is.null(`order_by`)) { + stopifnot(is.vector(`order_by`), length(`order_by`) != 0) + sapply(`order_by`, function(x) stopifnot(R6::is.R6(x))) + self$`order_by` <- `order_by` + } + if (!is.null(`search`)) { + if (!(is.character(`search`) && length(`search`) == 1)) { + stop(paste("Error! Invalid data for `search`. Must be a string:", `search`)) + } + self$`search` <- `search` + } + }, + #' To JSON string + #' + #' @description + #' To JSON String + #' + #' @return GetValuesRequestBody in JSON format + #' @export + toJSON = function() { + GetValuesRequestBodyObject <- list() + if (!is.null(self$`filter`)) { + GetValuesRequestBodyObject[["filter"]] <- + self$`filter` + } + if (!is.null(self$`order_by`)) { + GetValuesRequestBodyObject[["order_by"]] <- + lapply(self$`order_by`, function(x) x$toJSON()) + } + if (!is.null(self$`search`)) { + GetValuesRequestBodyObject[["search"]] <- + self$`search` + } + GetValuesRequestBodyObject + }, + #' Deserialize JSON string into an instance of GetValuesRequestBody + #' + #' @description + #' Deserialize JSON string into an instance of GetValuesRequestBody + #' + #' @param input_json the JSON input + #' @return the instance of GetValuesRequestBody + #' @export + fromJSON = function(input_json) { + this_object <- jsonlite::fromJSON(input_json) + if (!is.null(this_object$`filter`)) { + self$`filter` <- this_object$`filter` + } + if (!is.null(this_object$`order_by`)) { + self$`order_by` <- ApiClient$new()$deserializeObj(this_object$`order_by`, "array[OrderByColumn]", loadNamespace("openapi")) + } + if (!is.null(this_object$`search`)) { + self$`search` <- this_object$`search` + } + self + }, + #' To JSON string + #' + #' @description + #' To JSON String + #' + #' @return GetValuesRequestBody in JSON format + #' @export + toJSONString = function() { + jsoncontent <- c( + if (!is.null(self$`filter`)) { + sprintf( + '"filter": + "%s" + ', + self$`filter` + ) + }, + if (!is.null(self$`order_by`)) { + sprintf( + '"order_by": + [%s] +', + paste(sapply(self$`order_by`, function(x) jsonlite::toJSON(x$toJSON(), auto_unbox = TRUE, digits = NA)), collapse = ",") + ) + }, + if (!is.null(self$`search`)) { + sprintf( + '"search": + "%s" + ', + self$`search` + ) + } + ) + jsoncontent <- paste(jsoncontent, collapse = ",") + json_string <- as.character(jsonlite::minify(paste("{", jsoncontent, "}", sep = ""))) + }, + #' Deserialize JSON string into an instance of GetValuesRequestBody + #' + #' @description + #' Deserialize JSON string into an instance of GetValuesRequestBody + #' + #' @param input_json the JSON input + #' @return the instance of GetValuesRequestBody + #' @export + fromJSONString = function(input_json) { + this_object <- jsonlite::fromJSON(input_json) + self$`filter` <- this_object$`filter` + self$`order_by` <- ApiClient$new()$deserializeObj(this_object$`order_by`, "array[OrderByColumn]", loadNamespace("openapi")) + self$`search` <- this_object$`search` + self + }, + #' Validate JSON input with respect to GetValuesRequestBody + #' + #' @description + #' Validate JSON input with respect to GetValuesRequestBody and throw an exception if invalid + #' + #' @param input the JSON input + #' @export + validateJSON = function(input) { + input_json <- jsonlite::fromJSON(input) + }, + #' To string (JSON format) + #' + #' @description + #' To string (JSON format) + #' + #' @return String representation of GetValuesRequestBody + #' @export + toString = function() { + self$toJSONString() + }, + #' Return true if the values in all fields are valid. + #' + #' @description + #' Return true if the values in all fields are valid. + #' + #' @return true if the values in all fields are valid. + #' @export + isValid = function() { + TRUE + }, + #' Return a list of invalid fields (if any). + #' + #' @description + #' Return a list of invalid fields (if any). + #' + #' @return A list of invalid fields (if any). + #' @export + getInvalidFields = function() { + invalid_fields <- list() + invalid_fields + }, + #' Print the object + #' + #' @description + #' Print the object + #' + #' @export + print = function() { + print(jsonlite::prettify(self$toJSONString())) + invisible(self) + } + ), + # Lock the class to prevent modifications to the method or field + lock_class = TRUE +) +## Uncomment below to unlock the class to allow modifications of the method or field +# GetValuesRequestBody$unlock() +# +## Below is an example to define the print function +# GetValuesRequestBody$set("public", "print", function(...) { +# print(jsonlite::prettify(self$toJSONString())) +# invisible(self) +# }) +## Uncomment below to lock the class to prevent modifications to the method or field +# GetValuesRequestBody$lock() + diff --git a/R/group_by_request_body.R b/R/group_by_request_body.R new file mode 100644 index 0000000..74b7ba3 --- /dev/null +++ b/R/group_by_request_body.R @@ -0,0 +1,242 @@ +#' Create a new GroupByRequestBody +#' +#' @description +#' GroupByRequestBody Class +#' +#' @docType class +#' @title GroupByRequestBody +#' @description GroupByRequestBody Class +#' @format An \code{R6Class} generator object +#' @field dimensions list(\link{Dimension}) +#' @field measures list(\link{Measure}) +#' @field filter object [optional] +#' @importFrom R6 R6Class +#' @importFrom jsonlite fromJSON toJSON +#' @export +GroupByRequestBody <- R6::R6Class( + "GroupByRequestBody", + public = list( + `dimensions` = NULL, + `measures` = NULL, + `filter` = NULL, + #' Initialize a new GroupByRequestBody class. + #' + #' @description + #' Initialize a new GroupByRequestBody class. + #' + #' @param dimensions dimensions + #' @param measures measures + #' @param filter filter + #' @param ... Other optional arguments. + #' @export + initialize = function(`dimensions`, `measures`, `filter` = NULL, ...) { + if (!missing(`dimensions`)) { + stopifnot(is.vector(`dimensions`), length(`dimensions`) != 0) + sapply(`dimensions`, function(x) stopifnot(R6::is.R6(x))) + self$`dimensions` <- `dimensions` + } + if (!missing(`measures`)) { + stopifnot(is.vector(`measures`), length(`measures`) != 0) + sapply(`measures`, function(x) stopifnot(R6::is.R6(x))) + self$`measures` <- `measures` + } + if (!is.null(`filter`)) { + self$`filter` <- `filter` + } + }, + #' To JSON string + #' + #' @description + #' To JSON String + #' + #' @return GroupByRequestBody in JSON format + #' @export + toJSON = function() { + GroupByRequestBodyObject <- list() + if (!is.null(self$`dimensions`)) { + GroupByRequestBodyObject[["dimensions"]] <- + lapply(self$`dimensions`, function(x) x$toJSON()) + } + if (!is.null(self$`measures`)) { + GroupByRequestBodyObject[["measures"]] <- + lapply(self$`measures`, function(x) x$toJSON()) + } + if (!is.null(self$`filter`)) { + GroupByRequestBodyObject[["filter"]] <- + self$`filter` + } + GroupByRequestBodyObject + }, + #' Deserialize JSON string into an instance of GroupByRequestBody + #' + #' @description + #' Deserialize JSON string into an instance of GroupByRequestBody + #' + #' @param input_json the JSON input + #' @return the instance of GroupByRequestBody + #' @export + fromJSON = function(input_json) { + this_object <- jsonlite::fromJSON(input_json) + if (!is.null(this_object$`dimensions`)) { + self$`dimensions` <- ApiClient$new()$deserializeObj(this_object$`dimensions`, "array[Dimension]", loadNamespace("openapi")) + } + if (!is.null(this_object$`measures`)) { + self$`measures` <- ApiClient$new()$deserializeObj(this_object$`measures`, "array[Measure]", loadNamespace("openapi")) + } + if (!is.null(this_object$`filter`)) { + self$`filter` <- this_object$`filter` + } + self + }, + #' To JSON string + #' + #' @description + #' To JSON String + #' + #' @return GroupByRequestBody in JSON format + #' @export + toJSONString = function() { + jsoncontent <- c( + if (!is.null(self$`dimensions`)) { + sprintf( + '"dimensions": + [%s] +', + paste(sapply(self$`dimensions`, function(x) jsonlite::toJSON(x$toJSON(), auto_unbox = TRUE, digits = NA)), collapse = ",") + ) + }, + if (!is.null(self$`measures`)) { + sprintf( + '"measures": + [%s] +', + paste(sapply(self$`measures`, function(x) jsonlite::toJSON(x$toJSON(), auto_unbox = TRUE, digits = NA)), collapse = ",") + ) + }, + if (!is.null(self$`filter`)) { + sprintf( + '"filter": + "%s" + ', + self$`filter` + ) + } + ) + jsoncontent <- paste(jsoncontent, collapse = ",") + json_string <- as.character(jsonlite::minify(paste("{", jsoncontent, "}", sep = ""))) + }, + #' Deserialize JSON string into an instance of GroupByRequestBody + #' + #' @description + #' Deserialize JSON string into an instance of GroupByRequestBody + #' + #' @param input_json the JSON input + #' @return the instance of GroupByRequestBody + #' @export + fromJSONString = function(input_json) { + this_object <- jsonlite::fromJSON(input_json) + self$`dimensions` <- ApiClient$new()$deserializeObj(this_object$`dimensions`, "array[Dimension]", loadNamespace("openapi")) + self$`measures` <- ApiClient$new()$deserializeObj(this_object$`measures`, "array[Measure]", loadNamespace("openapi")) + self$`filter` <- this_object$`filter` + self + }, + #' Validate JSON input with respect to GroupByRequestBody + #' + #' @description + #' Validate JSON input with respect to GroupByRequestBody and throw an exception if invalid + #' + #' @param input the JSON input + #' @export + validateJSON = function(input) { + input_json <- jsonlite::fromJSON(input) + # check the required field `dimensions` + if (!is.null(input_json$`dimensions`)) { + stopifnot(is.vector(input_json$`dimensions`), length(input_json$`dimensions`) != 0) + tmp <- sapply(input_json$`dimensions`, function(x) stopifnot(R6::is.R6(x))) + } else { + stop(paste("The JSON input `", input, "` is invalid for GroupByRequestBody: the required field `dimensions` is missing.")) + } + # check the required field `measures` + if (!is.null(input_json$`measures`)) { + stopifnot(is.vector(input_json$`measures`), length(input_json$`measures`) != 0) + tmp <- sapply(input_json$`measures`, function(x) stopifnot(R6::is.R6(x))) + } else { + stop(paste("The JSON input `", input, "` is invalid for GroupByRequestBody: the required field `measures` is missing.")) + } + }, + #' To string (JSON format) + #' + #' @description + #' To string (JSON format) + #' + #' @return String representation of GroupByRequestBody + #' @export + toString = function() { + self$toJSONString() + }, + #' Return true if the values in all fields are valid. + #' + #' @description + #' Return true if the values in all fields are valid. + #' + #' @return true if the values in all fields are valid. + #' @export + isValid = function() { + # check if the required `dimensions` is null + if (is.null(self$`dimensions`)) { + return(FALSE) + } + + # check if the required `measures` is null + if (is.null(self$`measures`)) { + return(FALSE) + } + + TRUE + }, + #' Return a list of invalid fields (if any). + #' + #' @description + #' Return a list of invalid fields (if any). + #' + #' @return A list of invalid fields (if any). + #' @export + getInvalidFields = function() { + invalid_fields <- list() + # check if the required `dimensions` is null + if (is.null(self$`dimensions`)) { + invalid_fields["dimensions"] <- "Non-nullable required field `dimensions` cannot be null." + } + + # check if the required `measures` is null + if (is.null(self$`measures`)) { + invalid_fields["measures"] <- "Non-nullable required field `measures` cannot be null." + } + + invalid_fields + }, + #' Print the object + #' + #' @description + #' Print the object + #' + #' @export + print = function() { + print(jsonlite::prettify(self$toJSONString())) + invisible(self) + } + ), + # Lock the class to prevent modifications to the method or field + lock_class = TRUE +) +## Uncomment below to unlock the class to allow modifications of the method or field +# GroupByRequestBody$unlock() +# +## Below is an example to define the print function +# GroupByRequestBody$set("public", "print", function(...) { +# print(jsonlite::prettify(self$toJSONString())) +# invisible(self) +# }) +## Uncomment below to lock the class to prevent modifications to the method or field +# GroupByRequestBody$lock() + diff --git a/R/http_validation_error.R b/R/http_validation_error.R new file mode 100644 index 0000000..d058a6b --- /dev/null +++ b/R/http_validation_error.R @@ -0,0 +1,162 @@ +#' Create a new HTTPValidationError +#' +#' @description +#' HTTPValidationError Class +#' +#' @docType class +#' @title HTTPValidationError +#' @description HTTPValidationError Class +#' @format An \code{R6Class} generator object +#' @field detail list(\link{ValidationError}) [optional] +#' @importFrom R6 R6Class +#' @importFrom jsonlite fromJSON toJSON +#' @export +HTTPValidationError <- R6::R6Class( + "HTTPValidationError", + public = list( + `detail` = NULL, + #' Initialize a new HTTPValidationError class. + #' + #' @description + #' Initialize a new HTTPValidationError class. + #' + #' @param detail detail + #' @param ... Other optional arguments. + #' @export + initialize = function(`detail` = NULL, ...) { + if (!is.null(`detail`)) { + stopifnot(is.vector(`detail`), length(`detail`) != 0) + sapply(`detail`, function(x) stopifnot(R6::is.R6(x))) + self$`detail` <- `detail` + } + }, + #' To JSON string + #' + #' @description + #' To JSON String + #' + #' @return HTTPValidationError in JSON format + #' @export + toJSON = function() { + HTTPValidationErrorObject <- list() + if (!is.null(self$`detail`)) { + HTTPValidationErrorObject[["detail"]] <- + lapply(self$`detail`, function(x) x$toJSON()) + } + HTTPValidationErrorObject + }, + #' Deserialize JSON string into an instance of HTTPValidationError + #' + #' @description + #' Deserialize JSON string into an instance of HTTPValidationError + #' + #' @param input_json the JSON input + #' @return the instance of HTTPValidationError + #' @export + fromJSON = function(input_json) { + this_object <- jsonlite::fromJSON(input_json) + if (!is.null(this_object$`detail`)) { + self$`detail` <- ApiClient$new()$deserializeObj(this_object$`detail`, "array[ValidationError]", loadNamespace("openapi")) + } + self + }, + #' To JSON string + #' + #' @description + #' To JSON String + #' + #' @return HTTPValidationError in JSON format + #' @export + toJSONString = function() { + jsoncontent <- c( + if (!is.null(self$`detail`)) { + sprintf( + '"detail": + [%s] +', + paste(sapply(self$`detail`, function(x) jsonlite::toJSON(x$toJSON(), auto_unbox = TRUE, digits = NA)), collapse = ",") + ) + } + ) + jsoncontent <- paste(jsoncontent, collapse = ",") + json_string <- as.character(jsonlite::minify(paste("{", jsoncontent, "}", sep = ""))) + }, + #' Deserialize JSON string into an instance of HTTPValidationError + #' + #' @description + #' Deserialize JSON string into an instance of HTTPValidationError + #' + #' @param input_json the JSON input + #' @return the instance of HTTPValidationError + #' @export + fromJSONString = function(input_json) { + this_object <- jsonlite::fromJSON(input_json) + self$`detail` <- ApiClient$new()$deserializeObj(this_object$`detail`, "array[ValidationError]", loadNamespace("openapi")) + self + }, + #' Validate JSON input with respect to HTTPValidationError + #' + #' @description + #' Validate JSON input with respect to HTTPValidationError and throw an exception if invalid + #' + #' @param input the JSON input + #' @export + validateJSON = function(input) { + input_json <- jsonlite::fromJSON(input) + }, + #' To string (JSON format) + #' + #' @description + #' To string (JSON format) + #' + #' @return String representation of HTTPValidationError + #' @export + toString = function() { + self$toJSONString() + }, + #' Return true if the values in all fields are valid. + #' + #' @description + #' Return true if the values in all fields are valid. + #' + #' @return true if the values in all fields are valid. + #' @export + isValid = function() { + TRUE + }, + #' Return a list of invalid fields (if any). + #' + #' @description + #' Return a list of invalid fields (if any). + #' + #' @return A list of invalid fields (if any). + #' @export + getInvalidFields = function() { + invalid_fields <- list() + invalid_fields + }, + #' Print the object + #' + #' @description + #' Print the object + #' + #' @export + print = function() { + print(jsonlite::prettify(self$toJSONString())) + invisible(self) + } + ), + # Lock the class to prevent modifications to the method or field + lock_class = TRUE +) +## Uncomment below to unlock the class to allow modifications of the method or field +# HTTPValidationError$unlock() +# +## Below is an example to define the print function +# HTTPValidationError$set("public", "print", function(...) { +# print(jsonlite::prettify(self$toJSONString())) +# invisible(self) +# }) +## Uncomment below to lock the class to prevent modifications to the method or field +# HTTPValidationError$lock() + diff --git a/R/measure.R b/R/measure.R new file mode 100644 index 0000000..204c6af --- /dev/null +++ b/R/measure.R @@ -0,0 +1,258 @@ +#' Create a new Measure +#' +#' @description +#' Measure Class +#' +#' @docType class +#' @title Measure +#' @description Measure Class +#' @format An \code{R6Class} generator object +#' @field field_name character +#' @field agg_func character +#' @field alias character [optional] +#' @importFrom R6 R6Class +#' @importFrom jsonlite fromJSON toJSON +#' @export +Measure <- R6::R6Class( + "Measure", + public = list( + `field_name` = NULL, + `agg_func` = NULL, + `alias` = NULL, + #' Initialize a new Measure class. + #' + #' @description + #' Initialize a new Measure class. + #' + #' @param field_name field_name + #' @param agg_func agg_func + #' @param alias alias + #' @param ... Other optional arguments. + #' @export + initialize = function(`field_name`, `agg_func`, `alias` = NULL, ...) { + if (!missing(`field_name`)) { + if (!(is.character(`field_name`) && length(`field_name`) == 1)) { + stop(paste("Error! Invalid data for `field_name`. Must be a string:", `field_name`)) + } + self$`field_name` <- `field_name` + } + if (!missing(`agg_func`)) { + if (!(`agg_func` %in% c("count", "sum", "min", "max", "mean"))) { + stop(paste("Error! \"", `agg_func`, "\" cannot be assigned to `agg_func`. Must be \"count\", \"sum\", \"min\", \"max\", \"mean\".", sep = "")) + } + if (!(is.character(`agg_func`) && length(`agg_func`) == 1)) { + stop(paste("Error! Invalid data for `agg_func`. Must be a string:", `agg_func`)) + } + self$`agg_func` <- `agg_func` + } + if (!is.null(`alias`)) { + if (!(is.character(`alias`) && length(`alias`) == 1)) { + stop(paste("Error! Invalid data for `alias`. Must be a string:", `alias`)) + } + self$`alias` <- `alias` + } + }, + #' To JSON string + #' + #' @description + #' To JSON String + #' + #' @return Measure in JSON format + #' @export + toJSON = function() { + MeasureObject <- list() + if (!is.null(self$`field_name`)) { + MeasureObject[["field_name"]] <- + self$`field_name` + } + if (!is.null(self$`agg_func`)) { + MeasureObject[["agg_func"]] <- + self$`agg_func` + } + if (!is.null(self$`alias`)) { + MeasureObject[["alias"]] <- + self$`alias` + } + MeasureObject + }, + #' Deserialize JSON string into an instance of Measure + #' + #' @description + #' Deserialize JSON string into an instance of Measure + #' + #' @param input_json the JSON input + #' @return the instance of Measure + #' @export + fromJSON = function(input_json) { + this_object <- jsonlite::fromJSON(input_json) + if (!is.null(this_object$`field_name`)) { + self$`field_name` <- this_object$`field_name` + } + if (!is.null(this_object$`agg_func`)) { + if (!is.null(this_object$`agg_func`) && !(this_object$`agg_func` %in% c("count", "sum", "min", "max", "mean"))) { + stop(paste("Error! \"", this_object$`agg_func`, "\" cannot be assigned to `agg_func`. Must be \"count\", \"sum\", \"min\", \"max\", \"mean\".", sep = "")) + } + self$`agg_func` <- this_object$`agg_func` + } + if (!is.null(this_object$`alias`)) { + self$`alias` <- this_object$`alias` + } + self + }, + #' To JSON string + #' + #' @description + #' To JSON String + #' + #' @return Measure in JSON format + #' @export + toJSONString = function() { + jsoncontent <- c( + if (!is.null(self$`field_name`)) { + sprintf( + '"field_name": + "%s" + ', + self$`field_name` + ) + }, + if (!is.null(self$`agg_func`)) { + sprintf( + '"agg_func": + "%s" + ', + self$`agg_func` + ) + }, + if (!is.null(self$`alias`)) { + sprintf( + '"alias": + "%s" + ', + self$`alias` + ) + } + ) + jsoncontent <- paste(jsoncontent, collapse = ",") + json_string <- as.character(jsonlite::minify(paste("{", jsoncontent, "}", sep = ""))) + }, + #' Deserialize JSON string into an instance of Measure + #' + #' @description + #' Deserialize JSON string into an instance of Measure + #' + #' @param input_json the JSON input + #' @return the instance of Measure + #' @export + fromJSONString = function(input_json) { + this_object <- jsonlite::fromJSON(input_json) + self$`field_name` <- this_object$`field_name` + if (!is.null(this_object$`agg_func`) && !(this_object$`agg_func` %in% c("count", "sum", "min", "max", "mean"))) { + stop(paste("Error! \"", this_object$`agg_func`, "\" cannot be assigned to `agg_func`. Must be \"count\", \"sum\", \"min\", \"max\", \"mean\".", sep = "")) + } + self$`agg_func` <- this_object$`agg_func` + self$`alias` <- this_object$`alias` + self + }, + #' Validate JSON input with respect to Measure + #' + #' @description + #' Validate JSON input with respect to Measure and throw an exception if invalid + #' + #' @param input the JSON input + #' @export + validateJSON = function(input) { + input_json <- jsonlite::fromJSON(input) + # check the required field `field_name` + if (!is.null(input_json$`field_name`)) { + if (!(is.character(input_json$`field_name`) && length(input_json$`field_name`) == 1)) { + stop(paste("Error! Invalid data for `field_name`. Must be a string:", input_json$`field_name`)) + } + } else { + stop(paste("The JSON input `", input, "` is invalid for Measure: the required field `field_name` is missing.")) + } + # check the required field `agg_func` + if (!is.null(input_json$`agg_func`)) { + if (!(is.character(input_json$`agg_func`) && length(input_json$`agg_func`) == 1)) { + stop(paste("Error! Invalid data for `agg_func`. Must be a string:", input_json$`agg_func`)) + } + } else { + stop(paste("The JSON input `", input, "` is invalid for Measure: the required field `agg_func` is missing.")) + } + }, + #' To string (JSON format) + #' + #' @description + #' To string (JSON format) + #' + #' @return String representation of Measure + #' @export + toString = function() { + self$toJSONString() + }, + #' Return true if the values in all fields are valid. + #' + #' @description + #' Return true if the values in all fields are valid. + #' + #' @return true if the values in all fields are valid. + #' @export + isValid = function() { + # check if the required `field_name` is null + if (is.null(self$`field_name`)) { + return(FALSE) + } + + # check if the required `agg_func` is null + if (is.null(self$`agg_func`)) { + return(FALSE) + } + + TRUE + }, + #' Return a list of invalid fields (if any). + #' + #' @description + #' Return a list of invalid fields (if any). + #' + #' @return A list of invalid fields (if any). + #' @export + getInvalidFields = function() { + invalid_fields <- list() + # check if the required `field_name` is null + if (is.null(self$`field_name`)) { + invalid_fields["field_name"] <- "Non-nullable required field `field_name` cannot be null." + } + + # check if the required `agg_func` is null + if (is.null(self$`agg_func`)) { + invalid_fields["agg_func"] <- "Non-nullable required field `agg_func` cannot be null." + } + + invalid_fields + }, + #' Print the object + #' + #' @description + #' Print the object + #' + #' @export + print = function() { + print(jsonlite::prettify(self$toJSONString())) + invisible(self) + } + ), + # Lock the class to prevent modifications to the method or field + lock_class = TRUE +) +## Uncomment below to unlock the class to allow modifications of the method or field +# Measure$unlock() +# +## Below is an example to define the print function +# Measure$set("public", "print", function(...) { +# print(jsonlite::prettify(self$toJSONString())) +# invisible(self) +# }) +## Uncomment below to lock the class to prevent modifications to the method or field +# Measure$lock() + diff --git a/R/order_by_column.R b/R/order_by_column.R new file mode 100644 index 0000000..c9a3f34 --- /dev/null +++ b/R/order_by_column.R @@ -0,0 +1,206 @@ +#' Create a new OrderByColumn +#' +#' @description +#' OrderByColumn Class +#' +#' @docType class +#' @title OrderByColumn +#' @description OrderByColumn Class +#' @format An \code{R6Class} generator object +#' @field field character +#' @field descending character [optional] +#' @importFrom R6 R6Class +#' @importFrom jsonlite fromJSON toJSON +#' @export +OrderByColumn <- R6::R6Class( + "OrderByColumn", + public = list( + `field` = NULL, + `descending` = NULL, + #' Initialize a new OrderByColumn class. + #' + #' @description + #' Initialize a new OrderByColumn class. + #' + #' @param field field + #' @param descending descending. Default to FALSE. + #' @param ... Other optional arguments. + #' @export + initialize = function(`field`, `descending` = FALSE, ...) { + if (!missing(`field`)) { + if (!(is.character(`field`) && length(`field`) == 1)) { + stop(paste("Error! Invalid data for `field`. Must be a string:", `field`)) + } + self$`field` <- `field` + } + if (!is.null(`descending`)) { + if (!(is.logical(`descending`) && length(`descending`) == 1)) { + stop(paste("Error! Invalid data for `descending`. Must be a boolean:", `descending`)) + } + self$`descending` <- `descending` + } + }, + #' To JSON string + #' + #' @description + #' To JSON String + #' + #' @return OrderByColumn in JSON format + #' @export + toJSON = function() { + OrderByColumnObject <- list() + if (!is.null(self$`field`)) { + OrderByColumnObject[["field"]] <- + self$`field` + } + if (!is.null(self$`descending`)) { + OrderByColumnObject[["descending"]] <- + self$`descending` + } + OrderByColumnObject + }, + #' Deserialize JSON string into an instance of OrderByColumn + #' + #' @description + #' Deserialize JSON string into an instance of OrderByColumn + #' + #' @param input_json the JSON input + #' @return the instance of OrderByColumn + #' @export + fromJSON = function(input_json) { + this_object <- jsonlite::fromJSON(input_json) + if (!is.null(this_object$`field`)) { + self$`field` <- this_object$`field` + } + if (!is.null(this_object$`descending`)) { + self$`descending` <- this_object$`descending` + } + self + }, + #' To JSON string + #' + #' @description + #' To JSON String + #' + #' @return OrderByColumn in JSON format + #' @export + toJSONString = function() { + jsoncontent <- c( + if (!is.null(self$`field`)) { + sprintf( + '"field": + "%s" + ', + self$`field` + ) + }, + if (!is.null(self$`descending`)) { + sprintf( + '"descending": + %s + ', + tolower(self$`descending`) + ) + } + ) + jsoncontent <- paste(jsoncontent, collapse = ",") + json_string <- as.character(jsonlite::minify(paste("{", jsoncontent, "}", sep = ""))) + }, + #' Deserialize JSON string into an instance of OrderByColumn + #' + #' @description + #' Deserialize JSON string into an instance of OrderByColumn + #' + #' @param input_json the JSON input + #' @return the instance of OrderByColumn + #' @export + fromJSONString = function(input_json) { + this_object <- jsonlite::fromJSON(input_json) + self$`field` <- this_object$`field` + self$`descending` <- this_object$`descending` + self + }, + #' Validate JSON input with respect to OrderByColumn + #' + #' @description + #' Validate JSON input with respect to OrderByColumn and throw an exception if invalid + #' + #' @param input the JSON input + #' @export + validateJSON = function(input) { + input_json <- jsonlite::fromJSON(input) + # check the required field `field` + if (!is.null(input_json$`field`)) { + if (!(is.character(input_json$`field`) && length(input_json$`field`) == 1)) { + stop(paste("Error! Invalid data for `field`. Must be a string:", input_json$`field`)) + } + } else { + stop(paste("The JSON input `", input, "` is invalid for OrderByColumn: the required field `field` is missing.")) + } + }, + #' To string (JSON format) + #' + #' @description + #' To string (JSON format) + #' + #' @return String representation of OrderByColumn + #' @export + toString = function() { + self$toJSONString() + }, + #' Return true if the values in all fields are valid. + #' + #' @description + #' Return true if the values in all fields are valid. + #' + #' @return true if the values in all fields are valid. + #' @export + isValid = function() { + # check if the required `field` is null + if (is.null(self$`field`)) { + return(FALSE) + } + + TRUE + }, + #' Return a list of invalid fields (if any). + #' + #' @description + #' Return a list of invalid fields (if any). + #' + #' @return A list of invalid fields (if any). + #' @export + getInvalidFields = function() { + invalid_fields <- list() + # check if the required `field` is null + if (is.null(self$`field`)) { + invalid_fields["field"] <- "Non-nullable required field `field` cannot be null." + } + + invalid_fields + }, + #' Print the object + #' + #' @description + #' Print the object + #' + #' @export + print = function() { + print(jsonlite::prettify(self$toJSONString())) + invisible(self) + } + ), + # Lock the class to prevent modifications to the method or field + lock_class = TRUE +) +## Uncomment below to unlock the class to allow modifications of the method or field +# OrderByColumn$unlock() +# +## Below is an example to define the print function +# OrderByColumn$set("public", "print", function(...) { +# print(jsonlite::prettify(self$toJSONString())) +# invisible(self) +# }) +## Uncomment below to lock the class to prevent modifications to the method or field +# OrderByColumn$lock() + diff --git a/R/s3_permissions_request.R b/R/s3_permissions_request.R new file mode 100644 index 0000000..6dd8919 --- /dev/null +++ b/R/s3_permissions_request.R @@ -0,0 +1,267 @@ +#' Create a new S3PermissionsRequest +#' +#' @description +#' S3PermissionsRequest Class +#' +#' @docType class +#' @title S3PermissionsRequest +#' @description S3PermissionsRequest Class +#' @format An \code{R6Class} generator object +#' @field aws_access_key_id character +#' @field aws_secret_access_key character +#' @field region character +#' @importFrom R6 R6Class +#' @importFrom jsonlite fromJSON toJSON +#' @export +S3PermissionsRequest <- R6::R6Class( + "S3PermissionsRequest", + public = list( + `aws_access_key_id` = NULL, + `aws_secret_access_key` = NULL, + `region` = NULL, + #' Initialize a new S3PermissionsRequest class. + #' + #' @description + #' Initialize a new S3PermissionsRequest class. + #' + #' @param aws_access_key_id aws_access_key_id + #' @param aws_secret_access_key aws_secret_access_key + #' @param region region + #' @param ... Other optional arguments. + #' @export + initialize = function(`aws_access_key_id`, `aws_secret_access_key`, `region`, ...) { + if (!missing(`aws_access_key_id`)) { + if (!(is.character(`aws_access_key_id`) && length(`aws_access_key_id`) == 1)) { + stop(paste("Error! Invalid data for `aws_access_key_id`. Must be a string:", `aws_access_key_id`)) + } + self$`aws_access_key_id` <- `aws_access_key_id` + } + if (!missing(`aws_secret_access_key`)) { + if (!(is.character(`aws_secret_access_key`) && length(`aws_secret_access_key`) == 1)) { + stop(paste("Error! Invalid data for `aws_secret_access_key`. Must be a string:", `aws_secret_access_key`)) + } + self$`aws_secret_access_key` <- `aws_secret_access_key` + } + if (!missing(`region`)) { + if (!(is.character(`region`) && length(`region`) == 1)) { + stop(paste("Error! Invalid data for `region`. Must be a string:", `region`)) + } + self$`region` <- `region` + } + }, + #' To JSON string + #' + #' @description + #' To JSON String + #' + #' @return S3PermissionsRequest in JSON format + #' @export + toJSON = function() { + S3PermissionsRequestObject <- list() + if (!is.null(self$`aws_access_key_id`)) { + S3PermissionsRequestObject[["aws_access_key_id"]] <- + self$`aws_access_key_id` + } + if (!is.null(self$`aws_secret_access_key`)) { + S3PermissionsRequestObject[["aws_secret_access_key"]] <- + self$`aws_secret_access_key` + } + if (!is.null(self$`region`)) { + S3PermissionsRequestObject[["region"]] <- + self$`region` + } + S3PermissionsRequestObject + }, + #' Deserialize JSON string into an instance of S3PermissionsRequest + #' + #' @description + #' Deserialize JSON string into an instance of S3PermissionsRequest + #' + #' @param input_json the JSON input + #' @return the instance of S3PermissionsRequest + #' @export + fromJSON = function(input_json) { + this_object <- jsonlite::fromJSON(input_json) + if (!is.null(this_object$`aws_access_key_id`)) { + self$`aws_access_key_id` <- this_object$`aws_access_key_id` + } + if (!is.null(this_object$`aws_secret_access_key`)) { + self$`aws_secret_access_key` <- this_object$`aws_secret_access_key` + } + if (!is.null(this_object$`region`)) { + self$`region` <- this_object$`region` + } + self + }, + #' To JSON string + #' + #' @description + #' To JSON String + #' + #' @return S3PermissionsRequest in JSON format + #' @export + toJSONString = function() { + jsoncontent <- c( + if (!is.null(self$`aws_access_key_id`)) { + sprintf( + '"aws_access_key_id": + "%s" + ', + self$`aws_access_key_id` + ) + }, + if (!is.null(self$`aws_secret_access_key`)) { + sprintf( + '"aws_secret_access_key": + "%s" + ', + self$`aws_secret_access_key` + ) + }, + if (!is.null(self$`region`)) { + sprintf( + '"region": + "%s" + ', + self$`region` + ) + } + ) + jsoncontent <- paste(jsoncontent, collapse = ",") + json_string <- as.character(jsonlite::minify(paste("{", jsoncontent, "}", sep = ""))) + }, + #' Deserialize JSON string into an instance of S3PermissionsRequest + #' + #' @description + #' Deserialize JSON string into an instance of S3PermissionsRequest + #' + #' @param input_json the JSON input + #' @return the instance of S3PermissionsRequest + #' @export + fromJSONString = function(input_json) { + this_object <- jsonlite::fromJSON(input_json) + self$`aws_access_key_id` <- this_object$`aws_access_key_id` + self$`aws_secret_access_key` <- this_object$`aws_secret_access_key` + self$`region` <- this_object$`region` + self + }, + #' Validate JSON input with respect to S3PermissionsRequest + #' + #' @description + #' Validate JSON input with respect to S3PermissionsRequest and throw an exception if invalid + #' + #' @param input the JSON input + #' @export + validateJSON = function(input) { + input_json <- jsonlite::fromJSON(input) + # check the required field `aws_access_key_id` + if (!is.null(input_json$`aws_access_key_id`)) { + if (!(is.character(input_json$`aws_access_key_id`) && length(input_json$`aws_access_key_id`) == 1)) { + stop(paste("Error! Invalid data for `aws_access_key_id`. Must be a string:", input_json$`aws_access_key_id`)) + } + } else { + stop(paste("The JSON input `", input, "` is invalid for S3PermissionsRequest: the required field `aws_access_key_id` is missing.")) + } + # check the required field `aws_secret_access_key` + if (!is.null(input_json$`aws_secret_access_key`)) { + if (!(is.character(input_json$`aws_secret_access_key`) && length(input_json$`aws_secret_access_key`) == 1)) { + stop(paste("Error! Invalid data for `aws_secret_access_key`. Must be a string:", input_json$`aws_secret_access_key`)) + } + } else { + stop(paste("The JSON input `", input, "` is invalid for S3PermissionsRequest: the required field `aws_secret_access_key` is missing.")) + } + # check the required field `region` + if (!is.null(input_json$`region`)) { + if (!(is.character(input_json$`region`) && length(input_json$`region`) == 1)) { + stop(paste("Error! Invalid data for `region`. Must be a string:", input_json$`region`)) + } + } else { + stop(paste("The JSON input `", input, "` is invalid for S3PermissionsRequest: the required field `region` is missing.")) + } + }, + #' To string (JSON format) + #' + #' @description + #' To string (JSON format) + #' + #' @return String representation of S3PermissionsRequest + #' @export + toString = function() { + self$toJSONString() + }, + #' Return true if the values in all fields are valid. + #' + #' @description + #' Return true if the values in all fields are valid. + #' + #' @return true if the values in all fields are valid. + #' @export + isValid = function() { + # check if the required `aws_access_key_id` is null + if (is.null(self$`aws_access_key_id`)) { + return(FALSE) + } + + # check if the required `aws_secret_access_key` is null + if (is.null(self$`aws_secret_access_key`)) { + return(FALSE) + } + + # check if the required `region` is null + if (is.null(self$`region`)) { + return(FALSE) + } + + TRUE + }, + #' Return a list of invalid fields (if any). + #' + #' @description + #' Return a list of invalid fields (if any). + #' + #' @return A list of invalid fields (if any). + #' @export + getInvalidFields = function() { + invalid_fields <- list() + # check if the required `aws_access_key_id` is null + if (is.null(self$`aws_access_key_id`)) { + invalid_fields["aws_access_key_id"] <- "Non-nullable required field `aws_access_key_id` cannot be null." + } + + # check if the required `aws_secret_access_key` is null + if (is.null(self$`aws_secret_access_key`)) { + invalid_fields["aws_secret_access_key"] <- "Non-nullable required field `aws_secret_access_key` cannot be null." + } + + # check if the required `region` is null + if (is.null(self$`region`)) { + invalid_fields["region"] <- "Non-nullable required field `region` cannot be null." + } + + invalid_fields + }, + #' Print the object + #' + #' @description + #' Print the object + #' + #' @export + print = function() { + print(jsonlite::prettify(self$toJSONString())) + invisible(self) + } + ), + # Lock the class to prevent modifications to the method or field + lock_class = TRUE +) +## Uncomment below to unlock the class to allow modifications of the method or field +# S3PermissionsRequest$unlock() +# +## Below is an example to define the print function +# S3PermissionsRequest$set("public", "print", function(...) { +# print(jsonlite::prettify(self$toJSONString())) +# invisible(self) +# }) +## Uncomment below to lock the class to prevent modifications to the method or field +# S3PermissionsRequest$lock() + diff --git a/R/validation_error.R b/R/validation_error.R new file mode 100644 index 0000000..10aa195 --- /dev/null +++ b/R/validation_error.R @@ -0,0 +1,265 @@ +#' Create a new ValidationError +#' +#' @description +#' ValidationError Class +#' +#' @docType class +#' @title ValidationError +#' @description ValidationError Class +#' @format An \code{R6Class} generator object +#' @field loc list(\link{ValidationErrorLocInner}) +#' @field msg character +#' @field type character +#' @importFrom R6 R6Class +#' @importFrom jsonlite fromJSON toJSON +#' @export +ValidationError <- R6::R6Class( + "ValidationError", + public = list( + `loc` = NULL, + `msg` = NULL, + `type` = NULL, + #' Initialize a new ValidationError class. + #' + #' @description + #' Initialize a new ValidationError class. + #' + #' @param loc loc + #' @param msg msg + #' @param type type + #' @param ... Other optional arguments. + #' @export + initialize = function(`loc`, `msg`, `type`, ...) { + if (!missing(`loc`)) { + stopifnot(is.vector(`loc`), length(`loc`) != 0) + sapply(`loc`, function(x) stopifnot(R6::is.R6(x))) + self$`loc` <- `loc` + } + if (!missing(`msg`)) { + if (!(is.character(`msg`) && length(`msg`) == 1)) { + stop(paste("Error! Invalid data for `msg`. Must be a string:", `msg`)) + } + self$`msg` <- `msg` + } + if (!missing(`type`)) { + if (!(is.character(`type`) && length(`type`) == 1)) { + stop(paste("Error! Invalid data for `type`. Must be a string:", `type`)) + } + self$`type` <- `type` + } + }, + #' To JSON string + #' + #' @description + #' To JSON String + #' + #' @return ValidationError in JSON format + #' @export + toJSON = function() { + ValidationErrorObject <- list() + if (!is.null(self$`loc`)) { + ValidationErrorObject[["loc"]] <- + lapply(self$`loc`, function(x) x$toJSON()) + } + if (!is.null(self$`msg`)) { + ValidationErrorObject[["msg"]] <- + self$`msg` + } + if (!is.null(self$`type`)) { + ValidationErrorObject[["type"]] <- + self$`type` + } + ValidationErrorObject + }, + #' Deserialize JSON string into an instance of ValidationError + #' + #' @description + #' Deserialize JSON string into an instance of ValidationError + #' + #' @param input_json the JSON input + #' @return the instance of ValidationError + #' @export + fromJSON = function(input_json) { + this_object <- jsonlite::fromJSON(input_json) + if (!is.null(this_object$`loc`)) { + self$`loc` <- ApiClient$new()$deserializeObj(this_object$`loc`, "array[ValidationErrorLocInner]", loadNamespace("openapi")) + } + if (!is.null(this_object$`msg`)) { + self$`msg` <- this_object$`msg` + } + if (!is.null(this_object$`type`)) { + self$`type` <- this_object$`type` + } + self + }, + #' To JSON string + #' + #' @description + #' To JSON String + #' + #' @return ValidationError in JSON format + #' @export + toJSONString = function() { + jsoncontent <- c( + if (!is.null(self$`loc`)) { + sprintf( + '"loc": + [%s] +', + paste(sapply(self$`loc`, function(x) jsonlite::toJSON(x$toJSON(), auto_unbox = TRUE, digits = NA)), collapse = ",") + ) + }, + if (!is.null(self$`msg`)) { + sprintf( + '"msg": + "%s" + ', + self$`msg` + ) + }, + if (!is.null(self$`type`)) { + sprintf( + '"type": + "%s" + ', + self$`type` + ) + } + ) + jsoncontent <- paste(jsoncontent, collapse = ",") + json_string <- as.character(jsonlite::minify(paste("{", jsoncontent, "}", sep = ""))) + }, + #' Deserialize JSON string into an instance of ValidationError + #' + #' @description + #' Deserialize JSON string into an instance of ValidationError + #' + #' @param input_json the JSON input + #' @return the instance of ValidationError + #' @export + fromJSONString = function(input_json) { + this_object <- jsonlite::fromJSON(input_json) + self$`loc` <- ApiClient$new()$deserializeObj(this_object$`loc`, "array[ValidationErrorLocInner]", loadNamespace("openapi")) + self$`msg` <- this_object$`msg` + self$`type` <- this_object$`type` + self + }, + #' Validate JSON input with respect to ValidationError + #' + #' @description + #' Validate JSON input with respect to ValidationError and throw an exception if invalid + #' + #' @param input the JSON input + #' @export + validateJSON = function(input) { + input_json <- jsonlite::fromJSON(input) + # check the required field `loc` + if (!is.null(input_json$`loc`)) { + stopifnot(is.vector(input_json$`loc`), length(input_json$`loc`) != 0) + tmp <- sapply(input_json$`loc`, function(x) stopifnot(R6::is.R6(x))) + } else { + stop(paste("The JSON input `", input, "` is invalid for ValidationError: the required field `loc` is missing.")) + } + # check the required field `msg` + if (!is.null(input_json$`msg`)) { + if (!(is.character(input_json$`msg`) && length(input_json$`msg`) == 1)) { + stop(paste("Error! Invalid data for `msg`. Must be a string:", input_json$`msg`)) + } + } else { + stop(paste("The JSON input `", input, "` is invalid for ValidationError: the required field `msg` is missing.")) + } + # check the required field `type` + if (!is.null(input_json$`type`)) { + if (!(is.character(input_json$`type`) && length(input_json$`type`) == 1)) { + stop(paste("Error! Invalid data for `type`. Must be a string:", input_json$`type`)) + } + } else { + stop(paste("The JSON input `", input, "` is invalid for ValidationError: the required field `type` is missing.")) + } + }, + #' To string (JSON format) + #' + #' @description + #' To string (JSON format) + #' + #' @return String representation of ValidationError + #' @export + toString = function() { + self$toJSONString() + }, + #' Return true if the values in all fields are valid. + #' + #' @description + #' Return true if the values in all fields are valid. + #' + #' @return true if the values in all fields are valid. + #' @export + isValid = function() { + # check if the required `loc` is null + if (is.null(self$`loc`)) { + return(FALSE) + } + + # check if the required `msg` is null + if (is.null(self$`msg`)) { + return(FALSE) + } + + # check if the required `type` is null + if (is.null(self$`type`)) { + return(FALSE) + } + + TRUE + }, + #' Return a list of invalid fields (if any). + #' + #' @description + #' Return a list of invalid fields (if any). + #' + #' @return A list of invalid fields (if any). + #' @export + getInvalidFields = function() { + invalid_fields <- list() + # check if the required `loc` is null + if (is.null(self$`loc`)) { + invalid_fields["loc"] <- "Non-nullable required field `loc` cannot be null." + } + + # check if the required `msg` is null + if (is.null(self$`msg`)) { + invalid_fields["msg"] <- "Non-nullable required field `msg` cannot be null." + } + + # check if the required `type` is null + if (is.null(self$`type`)) { + invalid_fields["type"] <- "Non-nullable required field `type` cannot be null." + } + + invalid_fields + }, + #' Print the object + #' + #' @description + #' Print the object + #' + #' @export + print = function() { + print(jsonlite::prettify(self$toJSONString())) + invisible(self) + } + ), + # Lock the class to prevent modifications to the method or field + lock_class = TRUE +) +## Uncomment below to unlock the class to allow modifications of the method or field +# ValidationError$unlock() +# +## Below is an example to define the print function +# ValidationError$set("public", "print", function(...) { +# print(jsonlite::prettify(self$toJSONString())) +# invisible(self) +# }) +## Uncomment below to lock the class to prevent modifications to the method or field +# ValidationError$lock() + diff --git a/R/validation_error_loc_inner.R b/R/validation_error_loc_inner.R new file mode 100644 index 0000000..980b67d --- /dev/null +++ b/R/validation_error_loc_inner.R @@ -0,0 +1,188 @@ +#' @docType class +#' @title ValidationErrorLocInner +#' +#' @description ValidationErrorLocInner Class +#' +#' @format An \code{R6Class} generator object +#' +#' @importFrom R6 R6Class +#' @importFrom jsonlite fromJSON toJSON +#' @export +ValidationErrorLocInner <- R6::R6Class( + "ValidationErrorLocInner", + public = list( + #' @field actual_instance the object stored in this instance. + actual_instance = NULL, + #' @field actual_type the type of the object stored in this instance. + actual_type = NULL, + #' @field any_of a list of object types defined in the anyOf schema. + any_of = list("character", "integer"), + #' Initialize a new ValidationErrorLocInner. + #' + #' @description + #' Initialize a new ValidationErrorLocInner. + #' + #' @param instance an instance of the object defined in the anyOf schemas: "character", "integer" + #' @export + initialize = function(instance = NULL) { + if (is.null(instance)) { + # do nothing + } else if (get(class(instance)[[1]], pos = -1)$classname == "character") { + self$actual_instance <- instance + self$actual_type <- "character" + } else if (get(class(instance)[[1]], pos = -1)$classname == "integer") { + self$actual_instance <- instance + self$actual_type <- "integer" + } else { + stop(paste("Failed to initialize ValidationErrorLocInner with anyOf schemas character, integer. Provided class name: ", + get(class(instance)[[1]], pos = -1)$classname)) + } + }, + #' Deserialize JSON string into an instance of ValidationErrorLocInner. + #' + #' @description + #' Deserialize JSON string into an instance of ValidationErrorLocInner. + #' An alias to the method `fromJSON`. + #' + #' @param input The input JSON. + #' @return An instance of ValidationErrorLocInner. + #' @export + fromJSONString = function(input) { + self$fromJSON(input) + }, + #' Deserialize JSON string into an instance of ValidationErrorLocInner. + #' + #' @description + #' Deserialize JSON string into an instance of ValidationErrorLocInner. + #' + #' @param input The input JSON. + #' @return An instance of ValidationErrorLocInner. + #' @export + fromJSON = function(input) { + error_messages <- list() + + `character_result` <- tryCatch({ + instance <- jsonlite::fromJSON(input, simplifyVector = FALSE) + if (typeof(instance) != "character") { + stop(sprintf("Data type doesn't match. Expected: %s. Actual: %s.", "character", typeof(instance))) + } + self$actual_instance <- `character_instance`$fromJSON(input) + self$actual_type <- "character" + return(self) + }, + error = function(err) err + ) + + if (!is.null(`character_result`["error"])) { + error_messages <- append(error_messages, `character_result`["message"]) + } + + `integer_result` <- tryCatch({ + instance <- jsonlite::fromJSON(input, simplifyVector = FALSE) + if (typeof(instance) != "integer") { + stop(sprintf("Data type doesn't match. Expected: %s. Actual: %s.", "integer", typeof(instance))) + } + self$actual_instance <- `integer_instance`$fromJSON(input) + self$actual_type <- "integer" + return(self) + }, + error = function(err) err + ) + + if (!is.null(`integer_result`["error"])) { + error_messages <- append(error_messages, `integer_result`["message"]) + } + + # no match + stop(paste("No match found when deserializing the input into ValidationErrorLocInner with anyOf schemas character, integer. Details: >>", + paste(error_messages, collapse = " >> "))) + }, + #' Serialize ValidationErrorLocInner to JSON string. + #' + #' @description + #' Serialize ValidationErrorLocInner to JSON string. + #' + #' @return JSON string representation of the ValidationErrorLocInner. + #' @export + toJSONString = function() { + if (!is.null(self$actual_instance)) { + as.character(jsonlite::minify((self$actual_instance$toJSONString()))) + } else { + NULL + } + }, + #' Serialize ValidationErrorLocInner to JSON. + #' + #' @description + #' Serialize ValidationErrorLocInner to JSON. + #' + #' @return JSON representation of the ValidationErrorLocInner. + #' @export + toJSON = function() { + if (!is.null(self$actual_instance)) { + self$actual_instance$toJSON() + } else { + NULL + } + }, + #' Validate the input JSON with respect to ValidationErrorLocInner. + #' + #' @description + #' Validate the input JSON with respect to ValidationErrorLocInner and + #' throw exception if invalid. + #' + #' @param input The input JSON. + #' @export + validateJSON = function(input) { + # backup current values + actual_instance_bak <- self$actual_instance + actual_type_bak <- self$actual_type + + # if it's not valid, an error will be thrown + self$fromJSON(input) + + # no error thrown, restore old values + self$actual_instance <- actual_instance_bak + self$actual_type <- actual_type_bak + }, + #' Returns the string representation of the instance. + #' + #' @description + #' Returns the string representation of the instance. + #' + #' @return The string representation of the instance. + #' @export + toString = function() { + jsoncontent <- c( + sprintf('"actual_instance": %s', if (is.null(self$actual_instance)) NULL else self$actual_instance$toJSONString()), + sprintf('"actual_type": "%s"', self$actual_type), + sprintf('"any_of": "%s"', paste(unlist(self$any_of), collapse = ", ")) + ) + jsoncontent <- paste(jsoncontent, collapse = ",") + as.character(jsonlite::prettify(paste("{", jsoncontent, "}", sep = ""))) + }, + #' Print the object + #' + #' @description + #' Print the object + #' + #' @export + print = function() { + print(jsonlite::prettify(self$toJSONString())) + invisible(self) + } + ), + # Lock the class to prevent modifications to the method or field + lock_class = TRUE +) +## Uncomment below to unlock the class to allow modifications of the method or field +#ValidationErrorLocInner$unlock() +# +## Below is an example to define the print function +#ValidationErrorLocInner$set("public", "print", function(...) { +# print(jsonlite::prettify(self$toJSONString())) +# invisible(self) +#}) +## Uncomment below to lock the class to prevent modifications to the method or field +#ValidationErrorLocInner$lock() + diff --git a/README.md b/README.md new file mode 100644 index 0000000..64777d1 --- /dev/null +++ b/README.md @@ -0,0 +1,117 @@ +# R API client for openapi + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI spec](https://openapis.org) from a remote server, you can easily generate an API client. + +- API version: 0.1.0 +- Package version: 1.0.0 +- Generator version: 7.8.0 +- Build package: org.openapitools.codegen.languages.RClientCodegen + +## Installation + +### Prerequisites + +Install the dependencies + +```R +install.packages("jsonlite") +install.packages("httr") +install.packages("base64enc") +``` + +### Build the package + +```sh +git clone https://github.com/GIT_USER_ID/GIT_REPO_ID +cd GIT_REPO_ID +R CMD build . +R CMD check openapi_1.0.0.tar.gz --no-manual +R CMD INSTALL --preclean openapi_1.0.0.tar.gz +``` + +### Install the package + +```R +install.packages("openapi") +``` + +To install directly from Github, use `devtools`: +```R +install.packages("devtools") +library(devtools) +install_github("GIT_USER_ID/GIT_REPO_ID") +``` + +To install the package from a local file: +```R +install.packages("openapi_1.0.0.tar.gz", repos = NULL, type = "source") +``` + +### Usage + +```R +library(openapi) +``` + +### Reformat code + +To reformat code using [styler](https://styler.r-lib.org/index.html), please run the following in the R console: + +```R +install.packages("remotes") +remotes::install_github("r-lib/styler@v1.7.0.9003") +library("styler") +style_dir() +``` + +## Documentation for API Endpoints + +All URIs are relative to *http://localhost* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*DefaultApi* | [**AddCollaboratorInstancesInstanceIdCollaboratorsAccountIdPut**](docs/DefaultApi.md#AddCollaboratorInstancesInstanceIdCollaboratorsAccountIdPut) | **PUT** /instances/{instance_id}/collaborators/{account_id} | Add Collaborator +*DefaultApi* | [**CreateInstanceInstancesPut**](docs/DefaultApi.md#CreateInstanceInstancesPut) | **PUT** /instances | Create Instance +*DefaultApi* | [**CreateRecordInstancesInstanceIdModulesModuleNameModelNamePut**](docs/DefaultApi.md#CreateRecordInstancesInstanceIdModulesModuleNameModelNamePut) | **PUT** /instances/{instance_id}/modules/{module_name}/{model_name} | Create Record +*DefaultApi* | [**DeleteCollaboratorInstancesInstanceIdCollaboratorsAccountIdDelete**](docs/DefaultApi.md#DeleteCollaboratorInstancesInstanceIdCollaboratorsAccountIdDelete) | **DELETE** /instances/{instance_id}/collaborators/{account_id} | Delete Collaborator +*DefaultApi* | [**DeleteInstanceInstancesInstanceIdDelete**](docs/DefaultApi.md#DeleteInstanceInstancesInstanceIdDelete) | **DELETE** /instances/{instance_id} | Delete Instance +*DefaultApi* | [**DeleteRecordInstancesInstanceIdModulesModuleNameModelNameUidDelete**](docs/DefaultApi.md#DeleteRecordInstancesInstanceIdModulesModuleNameModelNameUidDelete) | **DELETE** /instances/{instance_id}/modules/{module_name}/{model_name}/{uid} | Delete Record +*DefaultApi* | [**GeneratePasswordInstancesInstanceIdDbPasswordGet**](docs/DefaultApi.md#GeneratePasswordInstancesInstanceIdDbPasswordGet) | **GET** /instances/{instance_id}/db/password | Generate Password +*DefaultApi* | [**GenerateUrlInstancesInstanceIdDbUrlGet**](docs/DefaultApi.md#GenerateUrlInstancesInstanceIdDbUrlGet) | **GET** /instances/{instance_id}/db/url | Generate Url +*DefaultApi* | [**GetInstanceStatisticsInstancesInstanceIdStatisticsGet**](docs/DefaultApi.md#GetInstanceStatisticsInstancesInstanceIdStatisticsGet) | **GET** /instances/{instance_id}/statistics | Get Instance Statistics +*DefaultApi* | [**GetNonEmptyTablesInstancesInstanceIdNonEmptyTablesGet**](docs/DefaultApi.md#GetNonEmptyTablesInstancesInstanceIdNonEmptyTablesGet) | **GET** /instances/{instance_id}/non_empty_tables | Get Non Empty Tables +*DefaultApi* | [**GetRecordInstancesInstanceIdModulesModuleNameModelNameIdOrUidPost**](docs/DefaultApi.md#GetRecordInstancesInstanceIdModulesModuleNameModelNameIdOrUidPost) | **POST** /instances/{instance_id}/modules/{module_name}/{model_name}/{id_or_uid} | Get Record +*DefaultApi* | [**GetRecordsInstancesInstanceIdModulesModuleNameModelNamePost**](docs/DefaultApi.md#GetRecordsInstancesInstanceIdModulesModuleNameModelNamePost) | **POST** /instances/{instance_id}/modules/{module_name}/{model_name} | Get Records +*DefaultApi* | [**GetRelationsInstancesInstanceIdSchemaModuleNameModelNameGet**](docs/DefaultApi.md#GetRelationsInstancesInstanceIdSchemaModuleNameModelNameGet) | **GET** /instances/{instance_id}/schema/{module_name}/{model_name} | Get Relations +*DefaultApi* | [**GetSchemaInstancesInstanceIdSchemaGet**](docs/DefaultApi.md#GetSchemaInstancesInstanceIdSchemaGet) | **GET** /instances/{instance_id}/schema | Get Schema +*DefaultApi* | [**GetValuesInstancesInstanceIdModulesModuleNameModelNameFieldsFieldPathPost**](docs/DefaultApi.md#GetValuesInstancesInstanceIdModulesModuleNameModelNameFieldsFieldPathPost) | **POST** /instances/{instance_id}/modules/{module_name}/{model_name}/fields/{field_path} | Get Values +*DefaultApi* | [**GrantS3PermissionsStoragesS3BucketNamePermissionsPut**](docs/DefaultApi.md#GrantS3PermissionsStoragesS3BucketNamePermissionsPut) | **PUT** /storages/s3/{bucket_name}/permissions | Grant S3 Permissions +*DefaultApi* | [**GroupByInstancesInstanceIdModulesModuleNameModelNameGroupByPost**](docs/DefaultApi.md#GroupByInstancesInstanceIdModulesModuleNameModelNameGroupByPost) | **POST** /instances/{instance_id}/modules/{module_name}/{model_name}/group-by | Group By +*DefaultApi* | [**TransferOwnershipInstancesInstanceIdOwnerHandlePatch**](docs/DefaultApi.md#TransferOwnershipInstancesInstanceIdOwnerHandlePatch) | **PATCH** /instances/{instance_id}/owner/{handle} | Transfer Ownership +*DefaultApi* | [**UpdateCollaboratorInstancesInstanceIdCollaboratorsAccountIdPatch**](docs/DefaultApi.md#UpdateCollaboratorInstancesInstanceIdCollaboratorsAccountIdPatch) | **PATCH** /instances/{instance_id}/collaborators/{account_id} | Update Collaborator +*DefaultApi* | [**UpdateRecordInstancesInstanceIdModulesModuleNameModelNameUidPatch**](docs/DefaultApi.md#UpdateRecordInstancesInstanceIdModulesModuleNameModelNameUidPatch) | **PATCH** /instances/{instance_id}/modules/{module_name}/{model_name}/{uid} | Update Record + + +## Documentation for Models + + - [Dimension](docs/Dimension.md) + - [GetRecordRequestBody](docs/GetRecordRequestBody.md) + - [GetRecordsRequestBody](docs/GetRecordsRequestBody.md) + - [GetValuesRequestBody](docs/GetValuesRequestBody.md) + - [GroupByRequestBody](docs/GroupByRequestBody.md) + - [HTTPValidationError](docs/HTTPValidationError.md) + - [Measure](docs/Measure.md) + - [OrderByColumn](docs/OrderByColumn.md) + - [S3PermissionsRequest](docs/S3PermissionsRequest.md) + - [ValidationError](docs/ValidationError.md) + - [ValidationErrorLocInner](docs/ValidationErrorLocInner.md) + + +## Documentation for Authorization + +Endpoints do not require authorization. + + diff --git a/docs/DefaultApi.md b/docs/DefaultApi.md new file mode 100644 index 0000000..eabf84a --- /dev/null +++ b/docs/DefaultApi.md @@ -0,0 +1,1108 @@ +# DefaultApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**AddCollaboratorInstancesInstanceIdCollaboratorsAccountIdPut**](DefaultApi.md#AddCollaboratorInstancesInstanceIdCollaboratorsAccountIdPut) | **PUT** /instances/{instance_id}/collaborators/{account_id} | Add Collaborator +[**CreateInstanceInstancesPut**](DefaultApi.md#CreateInstanceInstancesPut) | **PUT** /instances | Create Instance +[**CreateRecordInstancesInstanceIdModulesModuleNameModelNamePut**](DefaultApi.md#CreateRecordInstancesInstanceIdModulesModuleNameModelNamePut) | **PUT** /instances/{instance_id}/modules/{module_name}/{model_name} | Create Record +[**DeleteCollaboratorInstancesInstanceIdCollaboratorsAccountIdDelete**](DefaultApi.md#DeleteCollaboratorInstancesInstanceIdCollaboratorsAccountIdDelete) | **DELETE** /instances/{instance_id}/collaborators/{account_id} | Delete Collaborator +[**DeleteInstanceInstancesInstanceIdDelete**](DefaultApi.md#DeleteInstanceInstancesInstanceIdDelete) | **DELETE** /instances/{instance_id} | Delete Instance +[**DeleteRecordInstancesInstanceIdModulesModuleNameModelNameUidDelete**](DefaultApi.md#DeleteRecordInstancesInstanceIdModulesModuleNameModelNameUidDelete) | **DELETE** /instances/{instance_id}/modules/{module_name}/{model_name}/{uid} | Delete Record +[**GeneratePasswordInstancesInstanceIdDbPasswordGet**](DefaultApi.md#GeneratePasswordInstancesInstanceIdDbPasswordGet) | **GET** /instances/{instance_id}/db/password | Generate Password +[**GenerateUrlInstancesInstanceIdDbUrlGet**](DefaultApi.md#GenerateUrlInstancesInstanceIdDbUrlGet) | **GET** /instances/{instance_id}/db/url | Generate Url +[**GetInstanceStatisticsInstancesInstanceIdStatisticsGet**](DefaultApi.md#GetInstanceStatisticsInstancesInstanceIdStatisticsGet) | **GET** /instances/{instance_id}/statistics | Get Instance Statistics +[**GetNonEmptyTablesInstancesInstanceIdNonEmptyTablesGet**](DefaultApi.md#GetNonEmptyTablesInstancesInstanceIdNonEmptyTablesGet) | **GET** /instances/{instance_id}/non_empty_tables | Get Non Empty Tables +[**GetRecordInstancesInstanceIdModulesModuleNameModelNameIdOrUidPost**](DefaultApi.md#GetRecordInstancesInstanceIdModulesModuleNameModelNameIdOrUidPost) | **POST** /instances/{instance_id}/modules/{module_name}/{model_name}/{id_or_uid} | Get Record +[**GetRecordsInstancesInstanceIdModulesModuleNameModelNamePost**](DefaultApi.md#GetRecordsInstancesInstanceIdModulesModuleNameModelNamePost) | **POST** /instances/{instance_id}/modules/{module_name}/{model_name} | Get Records +[**GetRelationsInstancesInstanceIdSchemaModuleNameModelNameGet**](DefaultApi.md#GetRelationsInstancesInstanceIdSchemaModuleNameModelNameGet) | **GET** /instances/{instance_id}/schema/{module_name}/{model_name} | Get Relations +[**GetSchemaInstancesInstanceIdSchemaGet**](DefaultApi.md#GetSchemaInstancesInstanceIdSchemaGet) | **GET** /instances/{instance_id}/schema | Get Schema +[**GetValuesInstancesInstanceIdModulesModuleNameModelNameFieldsFieldPathPost**](DefaultApi.md#GetValuesInstancesInstanceIdModulesModuleNameModelNameFieldsFieldPathPost) | **POST** /instances/{instance_id}/modules/{module_name}/{model_name}/fields/{field_path} | Get Values +[**GrantS3PermissionsStoragesS3BucketNamePermissionsPut**](DefaultApi.md#GrantS3PermissionsStoragesS3BucketNamePermissionsPut) | **PUT** /storages/s3/{bucket_name}/permissions | Grant S3 Permissions +[**GroupByInstancesInstanceIdModulesModuleNameModelNameGroupByPost**](DefaultApi.md#GroupByInstancesInstanceIdModulesModuleNameModelNameGroupByPost) | **POST** /instances/{instance_id}/modules/{module_name}/{model_name}/group-by | Group By +[**TransferOwnershipInstancesInstanceIdOwnerHandlePatch**](DefaultApi.md#TransferOwnershipInstancesInstanceIdOwnerHandlePatch) | **PATCH** /instances/{instance_id}/owner/{handle} | Transfer Ownership +[**UpdateCollaboratorInstancesInstanceIdCollaboratorsAccountIdPatch**](DefaultApi.md#UpdateCollaboratorInstancesInstanceIdCollaboratorsAccountIdPatch) | **PATCH** /instances/{instance_id}/collaborators/{account_id} | Update Collaborator +[**UpdateRecordInstancesInstanceIdModulesModuleNameModelNameUidPatch**](DefaultApi.md#UpdateRecordInstancesInstanceIdModulesModuleNameModelNameUidPatch) | **PATCH** /instances/{instance_id}/modules/{module_name}/{model_name}/{uid} | Update Record + + +# **AddCollaboratorInstancesInstanceIdCollaboratorsAccountIdPut** +> AnyType AddCollaboratorInstancesInstanceIdCollaboratorsAccountIdPut(instance_id, account_id, schema_id, role = "read", authorization = var.authorization) + +Add Collaborator + +### Example +```R +library(openapi) + +# Add Collaborator +# +# prepare function argument(s) +var_instance_id <- "instance_id_example" # character | +var_account_id <- "account_id_example" # character | +var_schema_id <- "schema_id_example" # character | +var_role <- "read" # character | (Optional) +var_authorization <- "authorization_example" # character | (Optional) + +api_instance <- DefaultApi$new() +# to save the result into a file, simply add the optional `data_file` parameter, e.g. +# result <- api_instance$AddCollaboratorInstancesInstanceIdCollaboratorsAccountIdPut(var_instance_id, var_account_id, var_schema_id, role = var_role, authorization = var_authorizationdata_file = "result.txt") +result <- api_instance$AddCollaboratorInstancesInstanceIdCollaboratorsAccountIdPut(var_instance_id, var_account_id, var_schema_id, role = var_role, authorization = var_authorization) +dput(result) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **character**| | + **account_id** | **character**| | + **schema_id** | **character**| | + **role** | Enum [admin, write, read] | | [optional] [default to "read"] + **authorization** | **character**| | [optional] + +### Return type + +[**AnyType**](AnyType.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful Response | - | +| **422** | Validation Error | - | + +# **CreateInstanceInstancesPut** +> AnyType CreateInstanceInstancesPut(name, storage = "create-s3", schema_str = var.schema_str, db_server_key = var.db_server_key, db_server_url = var.db_server_url, authorization = var.authorization) + +Create Instance + +### Example +```R +library(openapi) + +# Create Instance +# +# prepare function argument(s) +var_name <- "name_example" # character | +var_storage <- "create-s3" # character | (Optional) +var_schema_str <- "schema_str_example" # character | (Optional) +var_db_server_key <- "db_server_key_example" # character | (Optional) +var_db_server_url <- "db_server_url_example" # character | (Optional) +var_authorization <- "authorization_example" # character | (Optional) + +api_instance <- DefaultApi$new() +# to save the result into a file, simply add the optional `data_file` parameter, e.g. +# result <- api_instance$CreateInstanceInstancesPut(var_name, storage = var_storage, schema_str = var_schema_str, db_server_key = var_db_server_key, db_server_url = var_db_server_url, authorization = var_authorizationdata_file = "result.txt") +result <- api_instance$CreateInstanceInstancesPut(var_name, storage = var_storage, schema_str = var_schema_str, db_server_key = var_db_server_key, db_server_url = var_db_server_url, authorization = var_authorization) +dput(result) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **character**| | + **storage** | **character**| | [optional] [default to "create-s3"] + **schema_str** | **character**| | [optional] + **db_server_key** | **character**| | [optional] + **db_server_url** | **character**| | [optional] + **authorization** | **character**| | [optional] + +### Return type + +[**AnyType**](AnyType.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful Response | - | +| **422** | Validation Error | - | + +# **CreateRecordInstancesInstanceIdModulesModuleNameModelNamePut** +> AnyType CreateRecordInstancesInstanceIdModulesModuleNameModelNamePut(instance_id, module_name, model_name, schema_id, body, authorization = var.authorization) + +Create Record + +### Example +```R +library(openapi) + +# Create Record +# +# prepare function argument(s) +var_instance_id <- "instance_id_example" # character | +var_module_name <- "module_name_example" # character | +var_model_name <- "model_name_example" # character | +var_schema_id <- "schema_id_example" # character | +var_body <- TODO # AnyType | +var_authorization <- "authorization_example" # character | (Optional) + +api_instance <- DefaultApi$new() +# to save the result into a file, simply add the optional `data_file` parameter, e.g. +# result <- api_instance$CreateRecordInstancesInstanceIdModulesModuleNameModelNamePut(var_instance_id, var_module_name, var_model_name, var_schema_id, var_body, authorization = var_authorizationdata_file = "result.txt") +result <- api_instance$CreateRecordInstancesInstanceIdModulesModuleNameModelNamePut(var_instance_id, var_module_name, var_model_name, var_schema_id, var_body, authorization = var_authorization) +dput(result) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **character**| | + **module_name** | **character**| | + **model_name** | **character**| | + **schema_id** | **character**| | + **body** | **AnyType**| | + **authorization** | **character**| | [optional] + +### Return type + +[**AnyType**](AnyType.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful Response | - | +| **422** | Validation Error | - | + +# **DeleteCollaboratorInstancesInstanceIdCollaboratorsAccountIdDelete** +> AnyType DeleteCollaboratorInstancesInstanceIdCollaboratorsAccountIdDelete(instance_id, account_id, authorization = var.authorization) + +Delete Collaborator + +### Example +```R +library(openapi) + +# Delete Collaborator +# +# prepare function argument(s) +var_instance_id <- "instance_id_example" # character | +var_account_id <- "account_id_example" # character | +var_authorization <- "authorization_example" # character | (Optional) + +api_instance <- DefaultApi$new() +# to save the result into a file, simply add the optional `data_file` parameter, e.g. +# result <- api_instance$DeleteCollaboratorInstancesInstanceIdCollaboratorsAccountIdDelete(var_instance_id, var_account_id, authorization = var_authorizationdata_file = "result.txt") +result <- api_instance$DeleteCollaboratorInstancesInstanceIdCollaboratorsAccountIdDelete(var_instance_id, var_account_id, authorization = var_authorization) +dput(result) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **character**| | + **account_id** | **character**| | + **authorization** | **character**| | [optional] + +### Return type + +[**AnyType**](AnyType.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful Response | - | +| **422** | Validation Error | - | + +# **DeleteInstanceInstancesInstanceIdDelete** +> AnyType DeleteInstanceInstancesInstanceIdDelete(instance_id, instance_name, authorization = var.authorization) + +Delete Instance + +### Example +```R +library(openapi) + +# Delete Instance +# +# prepare function argument(s) +var_instance_id <- "instance_id_example" # character | +var_instance_name <- "instance_name_example" # character | +var_authorization <- "authorization_example" # character | (Optional) + +api_instance <- DefaultApi$new() +# to save the result into a file, simply add the optional `data_file` parameter, e.g. +# result <- api_instance$DeleteInstanceInstancesInstanceIdDelete(var_instance_id, var_instance_name, authorization = var_authorizationdata_file = "result.txt") +result <- api_instance$DeleteInstanceInstancesInstanceIdDelete(var_instance_id, var_instance_name, authorization = var_authorization) +dput(result) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **character**| | + **instance_name** | **character**| | + **authorization** | **character**| | [optional] + +### Return type + +[**AnyType**](AnyType.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful Response | - | +| **422** | Validation Error | - | + +# **DeleteRecordInstancesInstanceIdModulesModuleNameModelNameUidDelete** +> AnyType DeleteRecordInstancesInstanceIdModulesModuleNameModelNameUidDelete(instance_id, module_name, model_name, uid, schema_id, authorization = var.authorization) + +Delete Record + +### Example +```R +library(openapi) + +# Delete Record +# +# prepare function argument(s) +var_instance_id <- "instance_id_example" # character | +var_module_name <- "module_name_example" # character | +var_model_name <- "model_name_example" # character | +var_uid <- "uid_example" # character | +var_schema_id <- "schema_id_example" # character | +var_authorization <- "authorization_example" # character | (Optional) + +api_instance <- DefaultApi$new() +# to save the result into a file, simply add the optional `data_file` parameter, e.g. +# result <- api_instance$DeleteRecordInstancesInstanceIdModulesModuleNameModelNameUidDelete(var_instance_id, var_module_name, var_model_name, var_uid, var_schema_id, authorization = var_authorizationdata_file = "result.txt") +result <- api_instance$DeleteRecordInstancesInstanceIdModulesModuleNameModelNameUidDelete(var_instance_id, var_module_name, var_model_name, var_uid, var_schema_id, authorization = var_authorization) +dput(result) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **character**| | + **module_name** | **character**| | + **model_name** | **character**| | + **uid** | **character**| | + **schema_id** | **character**| | + **authorization** | **character**| | [optional] + +### Return type + +[**AnyType**](AnyType.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful Response | - | +| **422** | Validation Error | - | + +# **GeneratePasswordInstancesInstanceIdDbPasswordGet** +> AnyType GeneratePasswordInstancesInstanceIdDbPasswordGet(instance_id, authorization = var.authorization) + +Generate Password + +### Example +```R +library(openapi) + +# Generate Password +# +# prepare function argument(s) +var_instance_id <- "instance_id_example" # character | +var_authorization <- "authorization_example" # character | (Optional) + +api_instance <- DefaultApi$new() +# to save the result into a file, simply add the optional `data_file` parameter, e.g. +# result <- api_instance$GeneratePasswordInstancesInstanceIdDbPasswordGet(var_instance_id, authorization = var_authorizationdata_file = "result.txt") +result <- api_instance$GeneratePasswordInstancesInstanceIdDbPasswordGet(var_instance_id, authorization = var_authorization) +dput(result) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **character**| | + **authorization** | **character**| | [optional] + +### Return type + +[**AnyType**](AnyType.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful Response | - | +| **422** | Validation Error | - | + +# **GenerateUrlInstancesInstanceIdDbUrlGet** +> AnyType GenerateUrlInstancesInstanceIdDbUrlGet(instance_id, authorization = var.authorization) + +Generate Url + +### Example +```R +library(openapi) + +# Generate Url +# +# prepare function argument(s) +var_instance_id <- "instance_id_example" # character | +var_authorization <- "authorization_example" # character | (Optional) + +api_instance <- DefaultApi$new() +# to save the result into a file, simply add the optional `data_file` parameter, e.g. +# result <- api_instance$GenerateUrlInstancesInstanceIdDbUrlGet(var_instance_id, authorization = var_authorizationdata_file = "result.txt") +result <- api_instance$GenerateUrlInstancesInstanceIdDbUrlGet(var_instance_id, authorization = var_authorization) +dput(result) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **character**| | + **authorization** | **character**| | [optional] + +### Return type + +[**AnyType**](AnyType.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful Response | - | +| **422** | Validation Error | - | + +# **GetInstanceStatisticsInstancesInstanceIdStatisticsGet** +> AnyType GetInstanceStatisticsInstancesInstanceIdStatisticsGet(instance_id, schema_id, q = var.q, authorization = var.authorization) + +Get Instance Statistics + +### Example +```R +library(openapi) + +# Get Instance Statistics +# +# prepare function argument(s) +var_instance_id <- "instance_id_example" # character | +var_schema_id <- "schema_id_example" # character | +var_q <- c("inner_example") # array[character] | In ${module}.${model} format (case-sensitive) (Optional) +var_authorization <- "authorization_example" # character | (Optional) + +api_instance <- DefaultApi$new() +# to save the result into a file, simply add the optional `data_file` parameter, e.g. +# result <- api_instance$GetInstanceStatisticsInstancesInstanceIdStatisticsGet(var_instance_id, var_schema_id, q = var_q, authorization = var_authorizationdata_file = "result.txt") +result <- api_instance$GetInstanceStatisticsInstancesInstanceIdStatisticsGet(var_instance_id, var_schema_id, q = var_q, authorization = var_authorization) +dput(result) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **character**| | + **schema_id** | **character**| | + **q** | list( **character** )| In ${module}.${model} format (case-sensitive) | [optional] + **authorization** | **character**| | [optional] + +### Return type + +[**AnyType**](AnyType.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful Response | - | +| **422** | Validation Error | - | + +# **GetNonEmptyTablesInstancesInstanceIdNonEmptyTablesGet** +> AnyType GetNonEmptyTablesInstancesInstanceIdNonEmptyTablesGet(instance_id, schema_id, authorization = var.authorization) + +Get Non Empty Tables + +### Example +```R +library(openapi) + +# Get Non Empty Tables +# +# prepare function argument(s) +var_instance_id <- "instance_id_example" # character | +var_schema_id <- "schema_id_example" # character | +var_authorization <- "authorization_example" # character | (Optional) + +api_instance <- DefaultApi$new() +# to save the result into a file, simply add the optional `data_file` parameter, e.g. +# result <- api_instance$GetNonEmptyTablesInstancesInstanceIdNonEmptyTablesGet(var_instance_id, var_schema_id, authorization = var_authorizationdata_file = "result.txt") +result <- api_instance$GetNonEmptyTablesInstancesInstanceIdNonEmptyTablesGet(var_instance_id, var_schema_id, authorization = var_authorization) +dput(result) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **character**| | + **schema_id** | **character**| | + **authorization** | **character**| | [optional] + +### Return type + +[**AnyType**](AnyType.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful Response | - | +| **422** | Validation Error | - | + +# **GetRecordInstancesInstanceIdModulesModuleNameModelNameIdOrUidPost** +> AnyType GetRecordInstancesInstanceIdModulesModuleNameModelNameIdOrUidPost(instance_id, module_name, model_name, id_or_uid, schema_id, limit_to_many = 10, include_foreign_keys = FALSE, authorization = var.authorization, get_record_request_body = var.get_record_request_body) + +Get Record + +### Example +```R +library(openapi) + +# Get Record +# +# prepare function argument(s) +var_instance_id <- "instance_id_example" # character | +var_module_name <- "module_name_example" # character | +var_model_name <- "model_name_example" # character | +var_id_or_uid <- "id_or_uid_example" # character | +var_schema_id <- "schema_id_example" # character | +var_limit_to_many <- 10 # integer | (Optional) +var_include_foreign_keys <- FALSE # character | (Optional) +var_authorization <- "authorization_example" # character | (Optional) +var_get_record_request_body <- GetRecordRequestBody$new(c("select_example")) # GetRecordRequestBody | (Optional) + +api_instance <- DefaultApi$new() +# to save the result into a file, simply add the optional `data_file` parameter, e.g. +# result <- api_instance$GetRecordInstancesInstanceIdModulesModuleNameModelNameIdOrUidPost(var_instance_id, var_module_name, var_model_name, var_id_or_uid, var_schema_id, limit_to_many = var_limit_to_many, include_foreign_keys = var_include_foreign_keys, authorization = var_authorization, get_record_request_body = var_get_record_request_bodydata_file = "result.txt") +result <- api_instance$GetRecordInstancesInstanceIdModulesModuleNameModelNameIdOrUidPost(var_instance_id, var_module_name, var_model_name, var_id_or_uid, var_schema_id, limit_to_many = var_limit_to_many, include_foreign_keys = var_include_foreign_keys, authorization = var_authorization, get_record_request_body = var_get_record_request_body) +dput(result) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **character**| | + **module_name** | **character**| | + **model_name** | **character**| | + **id_or_uid** | **character**| | + **schema_id** | **character**| | + **limit_to_many** | **integer**| | [optional] [default to 10] + **include_foreign_keys** | **character**| | [optional] [default to FALSE] + **authorization** | **character**| | [optional] + **get_record_request_body** | [**GetRecordRequestBody**](GetRecordRequestBody.md)| | [optional] + +### Return type + +[**AnyType**](AnyType.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful Response | - | +| **422** | Validation Error | - | + +# **GetRecordsInstancesInstanceIdModulesModuleNameModelNamePost** +> AnyType GetRecordsInstancesInstanceIdModulesModuleNameModelNamePost(instance_id, module_name, model_name, schema_id, limit = 50, offset = 0, limit_to_many = 10, include_foreign_keys = FALSE, authorization = var.authorization, get_records_request_body = var.get_records_request_body) + +Get Records + +### Example +```R +library(openapi) + +# Get Records +# +# prepare function argument(s) +var_instance_id <- "instance_id_example" # character | +var_module_name <- "module_name_example" # character | +var_model_name <- "model_name_example" # character | +var_schema_id <- "schema_id_example" # character | +var_limit <- 50 # integer | (Optional) +var_offset <- 0 # integer | (Optional) +var_limit_to_many <- 10 # integer | (Optional) +var_include_foreign_keys <- FALSE # character | (Optional) +var_authorization <- "authorization_example" # character | (Optional) +var_get_records_request_body <- GetRecordsRequestBody$new(c("select_example"), 123, c(OrderByColumn$new("field_example", "descending_example")), "search_example") # GetRecordsRequestBody | (Optional) + +api_instance <- DefaultApi$new() +# to save the result into a file, simply add the optional `data_file` parameter, e.g. +# result <- api_instance$GetRecordsInstancesInstanceIdModulesModuleNameModelNamePost(var_instance_id, var_module_name, var_model_name, var_schema_id, limit = var_limit, offset = var_offset, limit_to_many = var_limit_to_many, include_foreign_keys = var_include_foreign_keys, authorization = var_authorization, get_records_request_body = var_get_records_request_bodydata_file = "result.txt") +result <- api_instance$GetRecordsInstancesInstanceIdModulesModuleNameModelNamePost(var_instance_id, var_module_name, var_model_name, var_schema_id, limit = var_limit, offset = var_offset, limit_to_many = var_limit_to_many, include_foreign_keys = var_include_foreign_keys, authorization = var_authorization, get_records_request_body = var_get_records_request_body) +dput(result) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **character**| | + **module_name** | **character**| | + **model_name** | **character**| | + **schema_id** | **character**| | + **limit** | **integer**| | [optional] [default to 50] + **offset** | **integer**| | [optional] [default to 0] + **limit_to_many** | **integer**| | [optional] [default to 10] + **include_foreign_keys** | **character**| | [optional] [default to FALSE] + **authorization** | **character**| | [optional] + **get_records_request_body** | [**GetRecordsRequestBody**](GetRecordsRequestBody.md)| | [optional] + +### Return type + +[**AnyType**](AnyType.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful Response | - | +| **422** | Validation Error | - | + +# **GetRelationsInstancesInstanceIdSchemaModuleNameModelNameGet** +> AnyType GetRelationsInstancesInstanceIdSchemaModuleNameModelNameGet(module_name, model_name, instance_id, authorization = var.authorization) + +Get Relations + +### Example +```R +library(openapi) + +# Get Relations +# +# prepare function argument(s) +var_module_name <- "module_name_example" # character | +var_model_name <- "model_name_example" # character | +var_instance_id <- "instance_id_example" # character | +var_authorization <- "authorization_example" # character | (Optional) + +api_instance <- DefaultApi$new() +# to save the result into a file, simply add the optional `data_file` parameter, e.g. +# result <- api_instance$GetRelationsInstancesInstanceIdSchemaModuleNameModelNameGet(var_module_name, var_model_name, var_instance_id, authorization = var_authorizationdata_file = "result.txt") +result <- api_instance$GetRelationsInstancesInstanceIdSchemaModuleNameModelNameGet(var_module_name, var_model_name, var_instance_id, authorization = var_authorization) +dput(result) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **module_name** | **character**| | + **model_name** | **character**| | + **instance_id** | **character**| | + **authorization** | **character**| | [optional] + +### Return type + +[**AnyType**](AnyType.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful Response | - | +| **422** | Validation Error | - | + +# **GetSchemaInstancesInstanceIdSchemaGet** +> AnyType GetSchemaInstancesInstanceIdSchemaGet(instance_id, authorization = var.authorization) + +Get Schema + +### Example +```R +library(openapi) + +# Get Schema +# +# prepare function argument(s) +var_instance_id <- "instance_id_example" # character | +var_authorization <- "authorization_example" # character | (Optional) + +api_instance <- DefaultApi$new() +# to save the result into a file, simply add the optional `data_file` parameter, e.g. +# result <- api_instance$GetSchemaInstancesInstanceIdSchemaGet(var_instance_id, authorization = var_authorizationdata_file = "result.txt") +result <- api_instance$GetSchemaInstancesInstanceIdSchemaGet(var_instance_id, authorization = var_authorization) +dput(result) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **character**| | + **authorization** | **character**| | [optional] + +### Return type + +[**AnyType**](AnyType.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful Response | - | +| **422** | Validation Error | - | + +# **GetValuesInstancesInstanceIdModulesModuleNameModelNameFieldsFieldPathPost** +> AnyType GetValuesInstancesInstanceIdModulesModuleNameModelNameFieldsFieldPathPost(instance_id, module_name, model_name, field_path, schema_id, limit = 50, offset = 0, authorization = var.authorization, get_values_request_body = var.get_values_request_body) + +Get Values + +### Example +```R +library(openapi) + +# Get Values +# +# prepare function argument(s) +var_instance_id <- "instance_id_example" # character | +var_module_name <- "module_name_example" # character | +var_model_name <- "model_name_example" # character | +var_field_path <- "field_path_example" # character | +var_schema_id <- "schema_id_example" # character | +var_limit <- 50 # integer | (Optional) +var_offset <- 0 # integer | (Optional) +var_authorization <- "authorization_example" # character | (Optional) +var_get_values_request_body <- GetValuesRequestBody$new(123, c(OrderByColumn$new("field_example", "descending_example")), "search_example") # GetValuesRequestBody | (Optional) + +api_instance <- DefaultApi$new() +# to save the result into a file, simply add the optional `data_file` parameter, e.g. +# result <- api_instance$GetValuesInstancesInstanceIdModulesModuleNameModelNameFieldsFieldPathPost(var_instance_id, var_module_name, var_model_name, var_field_path, var_schema_id, limit = var_limit, offset = var_offset, authorization = var_authorization, get_values_request_body = var_get_values_request_bodydata_file = "result.txt") +result <- api_instance$GetValuesInstancesInstanceIdModulesModuleNameModelNameFieldsFieldPathPost(var_instance_id, var_module_name, var_model_name, var_field_path, var_schema_id, limit = var_limit, offset = var_offset, authorization = var_authorization, get_values_request_body = var_get_values_request_body) +dput(result) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **character**| | + **module_name** | **character**| | + **model_name** | **character**| | + **field_path** | **character**| | + **schema_id** | **character**| | + **limit** | **integer**| | [optional] [default to 50] + **offset** | **integer**| | [optional] [default to 0] + **authorization** | **character**| | [optional] + **get_values_request_body** | [**GetValuesRequestBody**](GetValuesRequestBody.md)| | [optional] + +### Return type + +[**AnyType**](AnyType.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful Response | - | +| **422** | Validation Error | - | + +# **GrantS3PermissionsStoragesS3BucketNamePermissionsPut** +> AnyType GrantS3PermissionsStoragesS3BucketNamePermissionsPut(bucket_name, s3_permissions_request, aws_account_id = "767398070972", aws_user_name = "lamin-manager", authorization = var.authorization) + +Grant S3 Permissions + +### Example +```R +library(openapi) + +# Grant S3 Permissions +# +# prepare function argument(s) +var_bucket_name <- "bucket_name_example" # character | +var_s3_permissions_request <- S3PermissionsRequest$new("aws_access_key_id_example", "aws_secret_access_key_example", "region_example") # S3PermissionsRequest | +var_aws_account_id <- "767398070972" # character | (Optional) +var_aws_user_name <- "lamin-manager" # character | (Optional) +var_authorization <- "authorization_example" # character | (Optional) + +api_instance <- DefaultApi$new() +# to save the result into a file, simply add the optional `data_file` parameter, e.g. +# result <- api_instance$GrantS3PermissionsStoragesS3BucketNamePermissionsPut(var_bucket_name, var_s3_permissions_request, aws_account_id = var_aws_account_id, aws_user_name = var_aws_user_name, authorization = var_authorizationdata_file = "result.txt") +result <- api_instance$GrantS3PermissionsStoragesS3BucketNamePermissionsPut(var_bucket_name, var_s3_permissions_request, aws_account_id = var_aws_account_id, aws_user_name = var_aws_user_name, authorization = var_authorization) +dput(result) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **bucket_name** | **character**| | + **s3_permissions_request** | [**S3PermissionsRequest**](S3PermissionsRequest.md)| | + **aws_account_id** | **character**| | [optional] [default to "767398070972"] + **aws_user_name** | **character**| | [optional] [default to "lamin-manager"] + **authorization** | **character**| | [optional] + +### Return type + +[**AnyType**](AnyType.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful Response | - | +| **422** | Validation Error | - | + +# **GroupByInstancesInstanceIdModulesModuleNameModelNameGroupByPost** +> AnyType GroupByInstancesInstanceIdModulesModuleNameModelNameGroupByPost(instance_id, module_name, model_name, schema_id, group_by_request_body, authorization = var.authorization) + +Group By + +### Example +```R +library(openapi) + +# Group By +# +# prepare function argument(s) +var_instance_id <- "instance_id_example" # character | +var_module_name <- "module_name_example" # character | +var_model_name <- "model_name_example" # character | +var_schema_id <- "schema_id_example" # character | +var_group_by_request_body <- GroupByRequestBody$new(c(Dimension$new("field_name_example", "count")), c(Measure$new("field_name_example", "count", "alias_example")), 123) # GroupByRequestBody | +var_authorization <- "authorization_example" # character | (Optional) + +api_instance <- DefaultApi$new() +# to save the result into a file, simply add the optional `data_file` parameter, e.g. +# result <- api_instance$GroupByInstancesInstanceIdModulesModuleNameModelNameGroupByPost(var_instance_id, var_module_name, var_model_name, var_schema_id, var_group_by_request_body, authorization = var_authorizationdata_file = "result.txt") +result <- api_instance$GroupByInstancesInstanceIdModulesModuleNameModelNameGroupByPost(var_instance_id, var_module_name, var_model_name, var_schema_id, var_group_by_request_body, authorization = var_authorization) +dput(result) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **character**| | + **module_name** | **character**| | + **model_name** | **character**| | + **schema_id** | **character**| | + **group_by_request_body** | [**GroupByRequestBody**](GroupByRequestBody.md)| | + **authorization** | **character**| | [optional] + +### Return type + +[**AnyType**](AnyType.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful Response | - | +| **422** | Validation Error | - | + +# **TransferOwnershipInstancesInstanceIdOwnerHandlePatch** +> AnyType TransferOwnershipInstancesInstanceIdOwnerHandlePatch(instance_id, handle, schema_id, authorization = var.authorization) + +Transfer Ownership + +### Example +```R +library(openapi) + +# Transfer Ownership +# +# prepare function argument(s) +var_instance_id <- "instance_id_example" # character | +var_handle <- "handle_example" # character | +var_schema_id <- "schema_id_example" # character | +var_authorization <- "authorization_example" # character | (Optional) + +api_instance <- DefaultApi$new() +# to save the result into a file, simply add the optional `data_file` parameter, e.g. +# result <- api_instance$TransferOwnershipInstancesInstanceIdOwnerHandlePatch(var_instance_id, var_handle, var_schema_id, authorization = var_authorizationdata_file = "result.txt") +result <- api_instance$TransferOwnershipInstancesInstanceIdOwnerHandlePatch(var_instance_id, var_handle, var_schema_id, authorization = var_authorization) +dput(result) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **character**| | + **handle** | **character**| | + **schema_id** | **character**| | + **authorization** | **character**| | [optional] + +### Return type + +[**AnyType**](AnyType.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful Response | - | +| **422** | Validation Error | - | + +# **UpdateCollaboratorInstancesInstanceIdCollaboratorsAccountIdPatch** +> AnyType UpdateCollaboratorInstancesInstanceIdCollaboratorsAccountIdPatch(instance_id, account_id, role, authorization = var.authorization) + +Update Collaborator + +### Example +```R +library(openapi) + +# Update Collaborator +# +# prepare function argument(s) +var_instance_id <- "instance_id_example" # character | +var_account_id <- "account_id_example" # character | +var_role <- "role_example" # character | +var_authorization <- "authorization_example" # character | (Optional) + +api_instance <- DefaultApi$new() +# to save the result into a file, simply add the optional `data_file` parameter, e.g. +# result <- api_instance$UpdateCollaboratorInstancesInstanceIdCollaboratorsAccountIdPatch(var_instance_id, var_account_id, var_role, authorization = var_authorizationdata_file = "result.txt") +result <- api_instance$UpdateCollaboratorInstancesInstanceIdCollaboratorsAccountIdPatch(var_instance_id, var_account_id, var_role, authorization = var_authorization) +dput(result) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **character**| | + **account_id** | **character**| | + **role** | Enum [admin, write, read] | | + **authorization** | **character**| | [optional] + +### Return type + +[**AnyType**](AnyType.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful Response | - | +| **422** | Validation Error | - | + +# **UpdateRecordInstancesInstanceIdModulesModuleNameModelNameUidPatch** +> AnyType UpdateRecordInstancesInstanceIdModulesModuleNameModelNameUidPatch(instance_id, module_name, model_name, uid, schema_id, body, authorization = var.authorization) + +Update Record + +### Example +```R +library(openapi) + +# Update Record +# +# prepare function argument(s) +var_instance_id <- "instance_id_example" # character | +var_module_name <- "module_name_example" # character | +var_model_name <- "model_name_example" # character | +var_uid <- "uid_example" # character | +var_schema_id <- "schema_id_example" # character | +var_body <- TODO # AnyType | +var_authorization <- "authorization_example" # character | (Optional) + +api_instance <- DefaultApi$new() +# to save the result into a file, simply add the optional `data_file` parameter, e.g. +# result <- api_instance$UpdateRecordInstancesInstanceIdModulesModuleNameModelNameUidPatch(var_instance_id, var_module_name, var_model_name, var_uid, var_schema_id, var_body, authorization = var_authorizationdata_file = "result.txt") +result <- api_instance$UpdateRecordInstancesInstanceIdModulesModuleNameModelNameUidPatch(var_instance_id, var_module_name, var_model_name, var_uid, var_schema_id, var_body, authorization = var_authorization) +dput(result) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **instance_id** | **character**| | + **module_name** | **character**| | + **model_name** | **character**| | + **uid** | **character**| | + **schema_id** | **character**| | + **body** | **AnyType**| | + **authorization** | **character**| | [optional] + +### Return type + +[**AnyType**](AnyType.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful Response | - | +| **422** | Validation Error | - | + diff --git a/docs/Dimension.md b/docs/Dimension.md new file mode 100644 index 0000000..0da6ed3 --- /dev/null +++ b/docs/Dimension.md @@ -0,0 +1,10 @@ +# openapi::Dimension + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**field_name** | **character** | | +**func** | **character** | | [optional] [Enum: [count, sum, min, max, mean]] + + diff --git a/docs/GetRecordRequestBody.md b/docs/GetRecordRequestBody.md new file mode 100644 index 0000000..ee22f96 --- /dev/null +++ b/docs/GetRecordRequestBody.md @@ -0,0 +1,9 @@ +# openapi::GetRecordRequestBody + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**select** | **array[character]** | | [optional] + + diff --git a/docs/GetRecordsRequestBody.md b/docs/GetRecordsRequestBody.md new file mode 100644 index 0000000..a0c419f --- /dev/null +++ b/docs/GetRecordsRequestBody.md @@ -0,0 +1,12 @@ +# openapi::GetRecordsRequestBody + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**select** | **array[character]** | | [optional] +**filter** | **object** | | [optional] +**order_by** | [**array[OrderByColumn]**](OrderByColumn.md) | | [optional] +**search** | **character** | | [optional] [default to ""] + + diff --git a/docs/GetValuesRequestBody.md b/docs/GetValuesRequestBody.md new file mode 100644 index 0000000..a117565 --- /dev/null +++ b/docs/GetValuesRequestBody.md @@ -0,0 +1,11 @@ +# openapi::GetValuesRequestBody + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**filter** | **object** | | [optional] +**order_by** | [**array[OrderByColumn]**](OrderByColumn.md) | | [optional] +**search** | **character** | | [optional] [default to ""] + + diff --git a/docs/GroupByRequestBody.md b/docs/GroupByRequestBody.md new file mode 100644 index 0000000..7c4b87a --- /dev/null +++ b/docs/GroupByRequestBody.md @@ -0,0 +1,11 @@ +# openapi::GroupByRequestBody + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**dimensions** | [**array[Dimension]**](Dimension.md) | | +**measures** | [**array[Measure]**](Measure.md) | | +**filter** | **object** | | [optional] + + diff --git a/docs/HTTPValidationError.md b/docs/HTTPValidationError.md new file mode 100644 index 0000000..80fbda7 --- /dev/null +++ b/docs/HTTPValidationError.md @@ -0,0 +1,9 @@ +# openapi::HTTPValidationError + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**detail** | [**array[ValidationError]**](ValidationError.md) | | [optional] + + diff --git a/docs/Measure.md b/docs/Measure.md new file mode 100644 index 0000000..5176bb2 --- /dev/null +++ b/docs/Measure.md @@ -0,0 +1,11 @@ +# openapi::Measure + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**field_name** | **character** | | +**agg_func** | **character** | | [Enum: [count, sum, min, max, mean]] +**alias** | **character** | | [optional] + + diff --git a/docs/OrderByColumn.md b/docs/OrderByColumn.md new file mode 100644 index 0000000..6495d42 --- /dev/null +++ b/docs/OrderByColumn.md @@ -0,0 +1,10 @@ +# openapi::OrderByColumn + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**field** | **character** | | +**descending** | **character** | | [optional] [default to FALSE] + + diff --git a/docs/S3PermissionsRequest.md b/docs/S3PermissionsRequest.md new file mode 100644 index 0000000..344c22f --- /dev/null +++ b/docs/S3PermissionsRequest.md @@ -0,0 +1,11 @@ +# openapi::S3PermissionsRequest + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**aws_access_key_id** | **character** | | +**aws_secret_access_key** | **character** | | +**region** | **character** | | + + diff --git a/docs/ValidationError.md b/docs/ValidationError.md new file mode 100644 index 0000000..44bfaef --- /dev/null +++ b/docs/ValidationError.md @@ -0,0 +1,11 @@ +# openapi::ValidationError + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**loc** | [**array[ValidationErrorLocInner]**](ValidationError_loc_inner.md) | | +**msg** | **character** | | +**type** | **character** | | + + diff --git a/docs/ValidationErrorLocInner.md b/docs/ValidationErrorLocInner.md new file mode 100644 index 0000000..917456c --- /dev/null +++ b/docs/ValidationErrorLocInner.md @@ -0,0 +1,8 @@ +# openapi::ValidationErrorLocInner + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + + diff --git a/git_push.sh b/git_push.sh new file mode 100644 index 0000000..f53a75d --- /dev/null +++ b/git_push.sh @@ -0,0 +1,57 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' diff --git a/tests/testthat.R b/tests/testthat.R new file mode 100644 index 0000000..b343a74 --- /dev/null +++ b/tests/testthat.R @@ -0,0 +1,4 @@ +library(testthat) +library(openapi) + +test_check("openapi") diff --git a/tests/testthat/test_default_api.R b/tests/testthat/test_default_api.R new file mode 100644 index 0000000..e579e53 --- /dev/null +++ b/tests/testthat/test_default_api.R @@ -0,0 +1,306 @@ +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate + +context("Test DefaultApi") + +api_instance <- DefaultApi$new() + +test_that("AddCollaboratorInstancesInstanceIdCollaboratorsAccountIdPut", { + # tests for AddCollaboratorInstancesInstanceIdCollaboratorsAccountIdPut + # base path: http://localhost + # Add Collaborator + # @param instance_id character + # @param account_id character + # @param schema_id character + # @param role character (optional) + # @param authorization character (optional) + # @return [AnyType] + + # uncomment below to test the operation + #expect_equal(result, "EXPECTED_RESULT") +}) + +test_that("CreateInstanceInstancesPut", { + # tests for CreateInstanceInstancesPut + # base path: http://localhost + # Create Instance + # @param name character + # @param storage character (optional) + # @param schema_str character (optional) + # @param db_server_key character (optional) + # @param db_server_url character (optional) + # @param authorization character (optional) + # @return [AnyType] + + # uncomment below to test the operation + #expect_equal(result, "EXPECTED_RESULT") +}) + +test_that("CreateRecordInstancesInstanceIdModulesModuleNameModelNamePut", { + # tests for CreateRecordInstancesInstanceIdModulesModuleNameModelNamePut + # base path: http://localhost + # Create Record + # @param instance_id character + # @param module_name character + # @param model_name character + # @param schema_id character + # @param body AnyType + # @param authorization character (optional) + # @return [AnyType] + + # uncomment below to test the operation + #expect_equal(result, "EXPECTED_RESULT") +}) + +test_that("DeleteCollaboratorInstancesInstanceIdCollaboratorsAccountIdDelete", { + # tests for DeleteCollaboratorInstancesInstanceIdCollaboratorsAccountIdDelete + # base path: http://localhost + # Delete Collaborator + # @param instance_id character + # @param account_id character + # @param authorization character (optional) + # @return [AnyType] + + # uncomment below to test the operation + #expect_equal(result, "EXPECTED_RESULT") +}) + +test_that("DeleteInstanceInstancesInstanceIdDelete", { + # tests for DeleteInstanceInstancesInstanceIdDelete + # base path: http://localhost + # Delete Instance + # @param instance_id character + # @param instance_name character + # @param authorization character (optional) + # @return [AnyType] + + # uncomment below to test the operation + #expect_equal(result, "EXPECTED_RESULT") +}) + +test_that("DeleteRecordInstancesInstanceIdModulesModuleNameModelNameUidDelete", { + # tests for DeleteRecordInstancesInstanceIdModulesModuleNameModelNameUidDelete + # base path: http://localhost + # Delete Record + # @param instance_id character + # @param module_name character + # @param model_name character + # @param uid character + # @param schema_id character + # @param authorization character (optional) + # @return [AnyType] + + # uncomment below to test the operation + #expect_equal(result, "EXPECTED_RESULT") +}) + +test_that("GeneratePasswordInstancesInstanceIdDbPasswordGet", { + # tests for GeneratePasswordInstancesInstanceIdDbPasswordGet + # base path: http://localhost + # Generate Password + # @param instance_id character + # @param authorization character (optional) + # @return [AnyType] + + # uncomment below to test the operation + #expect_equal(result, "EXPECTED_RESULT") +}) + +test_that("GenerateUrlInstancesInstanceIdDbUrlGet", { + # tests for GenerateUrlInstancesInstanceIdDbUrlGet + # base path: http://localhost + # Generate Url + # @param instance_id character + # @param authorization character (optional) + # @return [AnyType] + + # uncomment below to test the operation + #expect_equal(result, "EXPECTED_RESULT") +}) + +test_that("GetInstanceStatisticsInstancesInstanceIdStatisticsGet", { + # tests for GetInstanceStatisticsInstancesInstanceIdStatisticsGet + # base path: http://localhost + # Get Instance Statistics + # @param instance_id character + # @param schema_id character + # @param q array[character] In ${module}.${model} format (case-sensitive) (optional) + # @param authorization character (optional) + # @return [AnyType] + + # uncomment below to test the operation + #expect_equal(result, "EXPECTED_RESULT") +}) + +test_that("GetNonEmptyTablesInstancesInstanceIdNonEmptyTablesGet", { + # tests for GetNonEmptyTablesInstancesInstanceIdNonEmptyTablesGet + # base path: http://localhost + # Get Non Empty Tables + # @param instance_id character + # @param schema_id character + # @param authorization character (optional) + # @return [AnyType] + + # uncomment below to test the operation + #expect_equal(result, "EXPECTED_RESULT") +}) + +test_that("GetRecordInstancesInstanceIdModulesModuleNameModelNameIdOrUidPost", { + # tests for GetRecordInstancesInstanceIdModulesModuleNameModelNameIdOrUidPost + # base path: http://localhost + # Get Record + # @param instance_id character + # @param module_name character + # @param model_name character + # @param id_or_uid character + # @param schema_id character + # @param limit_to_many integer (optional) + # @param include_foreign_keys character (optional) + # @param authorization character (optional) + # @param get_record_request_body GetRecordRequestBody (optional) + # @return [AnyType] + + # uncomment below to test the operation + #expect_equal(result, "EXPECTED_RESULT") +}) + +test_that("GetRecordsInstancesInstanceIdModulesModuleNameModelNamePost", { + # tests for GetRecordsInstancesInstanceIdModulesModuleNameModelNamePost + # base path: http://localhost + # Get Records + # @param instance_id character + # @param module_name character + # @param model_name character + # @param schema_id character + # @param limit integer (optional) + # @param offset integer (optional) + # @param limit_to_many integer (optional) + # @param include_foreign_keys character (optional) + # @param authorization character (optional) + # @param get_records_request_body GetRecordsRequestBody (optional) + # @return [AnyType] + + # uncomment below to test the operation + #expect_equal(result, "EXPECTED_RESULT") +}) + +test_that("GetRelationsInstancesInstanceIdSchemaModuleNameModelNameGet", { + # tests for GetRelationsInstancesInstanceIdSchemaModuleNameModelNameGet + # base path: http://localhost + # Get Relations + # @param module_name character + # @param model_name character + # @param instance_id character + # @param authorization character (optional) + # @return [AnyType] + + # uncomment below to test the operation + #expect_equal(result, "EXPECTED_RESULT") +}) + +test_that("GetSchemaInstancesInstanceIdSchemaGet", { + # tests for GetSchemaInstancesInstanceIdSchemaGet + # base path: http://localhost + # Get Schema + # @param instance_id character + # @param authorization character (optional) + # @return [AnyType] + + # uncomment below to test the operation + #expect_equal(result, "EXPECTED_RESULT") +}) + +test_that("GetValuesInstancesInstanceIdModulesModuleNameModelNameFieldsFieldPathPost", { + # tests for GetValuesInstancesInstanceIdModulesModuleNameModelNameFieldsFieldPathPost + # base path: http://localhost + # Get Values + # @param instance_id character + # @param module_name character + # @param model_name character + # @param field_path character + # @param schema_id character + # @param limit integer (optional) + # @param offset integer (optional) + # @param authorization character (optional) + # @param get_values_request_body GetValuesRequestBody (optional) + # @return [AnyType] + + # uncomment below to test the operation + #expect_equal(result, "EXPECTED_RESULT") +}) + +test_that("GrantS3PermissionsStoragesS3BucketNamePermissionsPut", { + # tests for GrantS3PermissionsStoragesS3BucketNamePermissionsPut + # base path: http://localhost + # Grant S3 Permissions + # @param bucket_name character + # @param s3_permissions_request S3PermissionsRequest + # @param aws_account_id character (optional) + # @param aws_user_name character (optional) + # @param authorization character (optional) + # @return [AnyType] + + # uncomment below to test the operation + #expect_equal(result, "EXPECTED_RESULT") +}) + +test_that("GroupByInstancesInstanceIdModulesModuleNameModelNameGroupByPost", { + # tests for GroupByInstancesInstanceIdModulesModuleNameModelNameGroupByPost + # base path: http://localhost + # Group By + # @param instance_id character + # @param module_name character + # @param model_name character + # @param schema_id character + # @param group_by_request_body GroupByRequestBody + # @param authorization character (optional) + # @return [AnyType] + + # uncomment below to test the operation + #expect_equal(result, "EXPECTED_RESULT") +}) + +test_that("TransferOwnershipInstancesInstanceIdOwnerHandlePatch", { + # tests for TransferOwnershipInstancesInstanceIdOwnerHandlePatch + # base path: http://localhost + # Transfer Ownership + # @param instance_id character + # @param handle character + # @param schema_id character + # @param authorization character (optional) + # @return [AnyType] + + # uncomment below to test the operation + #expect_equal(result, "EXPECTED_RESULT") +}) + +test_that("UpdateCollaboratorInstancesInstanceIdCollaboratorsAccountIdPatch", { + # tests for UpdateCollaboratorInstancesInstanceIdCollaboratorsAccountIdPatch + # base path: http://localhost + # Update Collaborator + # @param instance_id character + # @param account_id character + # @param role character + # @param authorization character (optional) + # @return [AnyType] + + # uncomment below to test the operation + #expect_equal(result, "EXPECTED_RESULT") +}) + +test_that("UpdateRecordInstancesInstanceIdModulesModuleNameModelNameUidPatch", { + # tests for UpdateRecordInstancesInstanceIdModulesModuleNameModelNameUidPatch + # base path: http://localhost + # Update Record + # @param instance_id character + # @param module_name character + # @param model_name character + # @param uid character + # @param schema_id character + # @param body AnyType + # @param authorization character (optional) + # @return [AnyType] + + # uncomment below to test the operation + #expect_equal(result, "EXPECTED_RESULT") +}) diff --git a/tests/testthat/test_dimension.R b/tests/testthat/test_dimension.R new file mode 100644 index 0000000..d66ec18 --- /dev/null +++ b/tests/testthat/test_dimension.R @@ -0,0 +1,20 @@ +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate + +context("Test Dimension") + +model_instance <- Dimension$new() + +test_that("field_name", { + # tests for the property `field_name` (character) + + # uncomment below to test the property + #expect_equal(model.instance$`field_name`, "EXPECTED_RESULT") +}) + +test_that("func", { + # tests for the property `func` (character) + + # uncomment below to test the property + #expect_equal(model.instance$`func`, "EXPECTED_RESULT") +}) diff --git a/tests/testthat/test_get_record_request_body.R b/tests/testthat/test_get_record_request_body.R new file mode 100644 index 0000000..b9efd07 --- /dev/null +++ b/tests/testthat/test_get_record_request_body.R @@ -0,0 +1,13 @@ +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate + +context("Test GetRecordRequestBody") + +model_instance <- GetRecordRequestBody$new() + +test_that("select", { + # tests for the property `select` (array[character]) + + # uncomment below to test the property + #expect_equal(model.instance$`select`, "EXPECTED_RESULT") +}) diff --git a/tests/testthat/test_get_records_request_body.R b/tests/testthat/test_get_records_request_body.R new file mode 100644 index 0000000..a5af075 --- /dev/null +++ b/tests/testthat/test_get_records_request_body.R @@ -0,0 +1,34 @@ +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate + +context("Test GetRecordsRequestBody") + +model_instance <- GetRecordsRequestBody$new() + +test_that("select", { + # tests for the property `select` (array[character]) + + # uncomment below to test the property + #expect_equal(model.instance$`select`, "EXPECTED_RESULT") +}) + +test_that("filter", { + # tests for the property `filter` (object) + + # uncomment below to test the property + #expect_equal(model.instance$`filter`, "EXPECTED_RESULT") +}) + +test_that("order_by", { + # tests for the property `order_by` (array[OrderByColumn]) + + # uncomment below to test the property + #expect_equal(model.instance$`order_by`, "EXPECTED_RESULT") +}) + +test_that("search", { + # tests for the property `search` (character) + + # uncomment below to test the property + #expect_equal(model.instance$`search`, "EXPECTED_RESULT") +}) diff --git a/tests/testthat/test_get_values_request_body.R b/tests/testthat/test_get_values_request_body.R new file mode 100644 index 0000000..caaf459 --- /dev/null +++ b/tests/testthat/test_get_values_request_body.R @@ -0,0 +1,27 @@ +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate + +context("Test GetValuesRequestBody") + +model_instance <- GetValuesRequestBody$new() + +test_that("filter", { + # tests for the property `filter` (object) + + # uncomment below to test the property + #expect_equal(model.instance$`filter`, "EXPECTED_RESULT") +}) + +test_that("order_by", { + # tests for the property `order_by` (array[OrderByColumn]) + + # uncomment below to test the property + #expect_equal(model.instance$`order_by`, "EXPECTED_RESULT") +}) + +test_that("search", { + # tests for the property `search` (character) + + # uncomment below to test the property + #expect_equal(model.instance$`search`, "EXPECTED_RESULT") +}) diff --git a/tests/testthat/test_group_by_request_body.R b/tests/testthat/test_group_by_request_body.R new file mode 100644 index 0000000..61b7b7d --- /dev/null +++ b/tests/testthat/test_group_by_request_body.R @@ -0,0 +1,27 @@ +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate + +context("Test GroupByRequestBody") + +model_instance <- GroupByRequestBody$new() + +test_that("dimensions", { + # tests for the property `dimensions` (array[Dimension]) + + # uncomment below to test the property + #expect_equal(model.instance$`dimensions`, "EXPECTED_RESULT") +}) + +test_that("measures", { + # tests for the property `measures` (array[Measure]) + + # uncomment below to test the property + #expect_equal(model.instance$`measures`, "EXPECTED_RESULT") +}) + +test_that("filter", { + # tests for the property `filter` (object) + + # uncomment below to test the property + #expect_equal(model.instance$`filter`, "EXPECTED_RESULT") +}) diff --git a/tests/testthat/test_http_validation_error.R b/tests/testthat/test_http_validation_error.R new file mode 100644 index 0000000..1c7ebc4 --- /dev/null +++ b/tests/testthat/test_http_validation_error.R @@ -0,0 +1,13 @@ +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate + +context("Test HTTPValidationError") + +model_instance <- HTTPValidationError$new() + +test_that("detail", { + # tests for the property `detail` (array[ValidationError]) + + # uncomment below to test the property + #expect_equal(model.instance$`detail`, "EXPECTED_RESULT") +}) diff --git a/tests/testthat/test_measure.R b/tests/testthat/test_measure.R new file mode 100644 index 0000000..9e949cb --- /dev/null +++ b/tests/testthat/test_measure.R @@ -0,0 +1,27 @@ +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate + +context("Test Measure") + +model_instance <- Measure$new() + +test_that("field_name", { + # tests for the property `field_name` (character) + + # uncomment below to test the property + #expect_equal(model.instance$`field_name`, "EXPECTED_RESULT") +}) + +test_that("agg_func", { + # tests for the property `agg_func` (character) + + # uncomment below to test the property + #expect_equal(model.instance$`agg_func`, "EXPECTED_RESULT") +}) + +test_that("alias", { + # tests for the property `alias` (character) + + # uncomment below to test the property + #expect_equal(model.instance$`alias`, "EXPECTED_RESULT") +}) diff --git a/tests/testthat/test_order_by_column.R b/tests/testthat/test_order_by_column.R new file mode 100644 index 0000000..a8d95f6 --- /dev/null +++ b/tests/testthat/test_order_by_column.R @@ -0,0 +1,20 @@ +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate + +context("Test OrderByColumn") + +model_instance <- OrderByColumn$new() + +test_that("field", { + # tests for the property `field` (character) + + # uncomment below to test the property + #expect_equal(model.instance$`field`, "EXPECTED_RESULT") +}) + +test_that("descending", { + # tests for the property `descending` (character) + + # uncomment below to test the property + #expect_equal(model.instance$`descending`, "EXPECTED_RESULT") +}) diff --git a/tests/testthat/test_s3_permissions_request.R b/tests/testthat/test_s3_permissions_request.R new file mode 100644 index 0000000..9658fa2 --- /dev/null +++ b/tests/testthat/test_s3_permissions_request.R @@ -0,0 +1,27 @@ +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate + +context("Test S3PermissionsRequest") + +model_instance <- S3PermissionsRequest$new() + +test_that("aws_access_key_id", { + # tests for the property `aws_access_key_id` (character) + + # uncomment below to test the property + #expect_equal(model.instance$`aws_access_key_id`, "EXPECTED_RESULT") +}) + +test_that("aws_secret_access_key", { + # tests for the property `aws_secret_access_key` (character) + + # uncomment below to test the property + #expect_equal(model.instance$`aws_secret_access_key`, "EXPECTED_RESULT") +}) + +test_that("region", { + # tests for the property `region` (character) + + # uncomment below to test the property + #expect_equal(model.instance$`region`, "EXPECTED_RESULT") +}) diff --git a/tests/testthat/test_validation_error.R b/tests/testthat/test_validation_error.R new file mode 100644 index 0000000..d3ef0f3 --- /dev/null +++ b/tests/testthat/test_validation_error.R @@ -0,0 +1,27 @@ +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate + +context("Test ValidationError") + +model_instance <- ValidationError$new() + +test_that("loc", { + # tests for the property `loc` (array[ValidationErrorLocInner]) + + # uncomment below to test the property + #expect_equal(model.instance$`loc`, "EXPECTED_RESULT") +}) + +test_that("msg", { + # tests for the property `msg` (character) + + # uncomment below to test the property + #expect_equal(model.instance$`msg`, "EXPECTED_RESULT") +}) + +test_that("type", { + # tests for the property `type` (character) + + # uncomment below to test the property + #expect_equal(model.instance$`type`, "EXPECTED_RESULT") +}) diff --git a/tests/testthat/test_validation_error_loc_inner.R b/tests/testthat/test_validation_error_loc_inner.R new file mode 100644 index 0000000..fe88871 --- /dev/null +++ b/tests/testthat/test_validation_error_loc_inner.R @@ -0,0 +1,4 @@ +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate + +context("Test ValidationErrorLocInner")