diff --git a/.Rbuildignore b/.Rbuildignore index 75126be..b8e0e02 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -1,4 +1,5 @@ ^.*\.Rproj$ # Designates the directory as an RStudio Project +^laminr\.api\.Rproj$ ^\.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 @@ -16,5 +17,8 @@ ^\.openapi-generator$ ^docs$ ^git_push\.sh$ -^openapi\.Rcheck$ +^update_package\.sh$ +^laminr.api\.Rcheck$ ^\.\.Rcheck$ +^README\.qmd$ +^LICENSE\.md$ diff --git a/.github/workflows/r-client.yaml b/.github/workflows/r-client.yaml index 90f293b..4e5e99c 100644 --- a/.github/workflows/r-client.yaml +++ b/.github/workflows/r-client.yaml @@ -26,8 +26,8 @@ jobs: - name: Lint run: lintr::lint_package() shell: Rscript {0} - - name: Roxygenize - run: | - roxygen2::roxygenize('.', roclets = c('rd', 'collate', 'namespace')) - 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 index 5d21150..d8d51aa 100644 --- a/.gitignore +++ b/.gitignore @@ -18,6 +18,7 @@ # RStudio files .Rproj.user/ +*.Rproj # produced vignettes vignettes/*.html diff --git a/.openapi-generator-ignore b/.openapi-generator-ignore index 7484ee5..1d52596 100644 --- a/.openapi-generator-ignore +++ b/.openapi-generator-ignore @@ -21,3 +21,14 @@ #docs/*.md # Then explicitly reverse the ignore rule for a single file: #!docs/README.md + +# Generate these with`devtools::document()` +DESCRIPTION + +# Don't generate these so they can be customized +.gitignore +.Rbuildignore +.github/workflows/r-client.yaml + +# Don't need Travis CI +.travis.yml diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index e073125..73534ef 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -1,12 +1,7 @@ -.Rbuildignore -.github/workflows/r-client.yaml -.gitignore .lintr -.openapi-generator-ignore -.travis.yml -DESCRIPTION NAMESPACE R/api_client.R +R/api_exception.R R/api_response.R R/default_api.R R/dimension.R @@ -35,15 +30,3 @@ 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/.travis.yml b/.travis.yml deleted file mode 100644 index b96a0ef..0000000 --- a/.travis.yml +++ /dev/null @@ -1,18 +0,0 @@ -# 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 index 7ad1f5d..a0bc519 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,15 +1,28 @@ 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) +Title: R Package Client for the Lamin API +Version: 0.1.0 +Authors@R: c( + person("Robrecht", "Cannoodt", , "rcannood@gmail.com", role = c("aut", "cre"), + comment = c(ORCID = "0000-0003-3641-729X", github = "rcannood")), + person("Luke", "Zappia", , "luke@data-intuitive.com", role = "aut", + comment = c(ORCID = "0000-0001-7744-8565", github = "lazappi")) + ) +Description: Client package for accessing the Lamin API. Most content is + generated by the Openapi Generator + https://github.com/openapitools/openapi-generator. +License: Apache License (>= 2) URL: https://github.com/data-intuitive/laminr.api BugReports: https://github.com/data-intuitive/laminr.api/issues -Depends: R (>= 3.3) +Depends: + R (>= 3.3) +Imports: + base64enc, + httr, + jsonlite, + R6, + stringr +Suggests: + testthat Encoding: UTF-8 -License: Unlicense LazyData: true -Suggests: testthat -Imports: jsonlite, httr, R6, base64enc, stringr RoxygenNote: 7.3.2 diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..b62a9b5 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,194 @@ +Apache License +============== + +_Version 2.0, January 2004_ +_<>_ + +### Terms and Conditions for use, reproduction, and distribution + +#### 1. Definitions + +“License” shall mean the terms and conditions for use, reproduction, and +distribution as defined by Sections 1 through 9 of this document. + +“Licensor” shall mean the copyright owner or entity authorized by the copyright +owner that is granting the License. + +“Legal Entity” shall mean the union of the acting entity and all other entities +that control, are controlled by, or are under common control with that entity. +For the purposes of this definition, “control” means **(i)** the power, direct or +indirect, to cause the direction or management of such entity, whether by +contract or otherwise, or **(ii)** ownership of fifty percent (50%) or more of the +outstanding shares, or **(iii)** beneficial ownership of such entity. + +“You” (or “Your”) shall mean an individual or Legal Entity exercising +permissions granted by this License. + +“Source” form shall mean the preferred form for making modifications, including +but not limited to software source code, documentation source, and configuration +files. + +“Object” form shall mean any form resulting from mechanical transformation or +translation of a Source form, including but not limited to compiled object code, +generated documentation, and conversions to other media types. + +“Work” shall mean the work of authorship, whether in Source or Object form, made +available under the License, as indicated by a copyright notice that is included +in or attached to the work (an example is provided in the Appendix below). + +“Derivative Works” shall mean any work, whether in Source or Object form, that +is based on (or derived from) the Work and for which the editorial revisions, +annotations, elaborations, or other modifications represent, as a whole, an +original work of authorship. For the purposes of this License, Derivative Works +shall not include works that remain separable from, or merely link (or bind by +name) to the interfaces of, the Work and Derivative Works thereof. + +“Contribution” shall mean any work of authorship, including the original version +of the Work and any modifications or additions to that Work or Derivative Works +thereof, that is intentionally submitted to Licensor for inclusion in the Work +by the copyright owner or by an individual or Legal Entity authorized to submit +on behalf of the copyright owner. For the purposes of this definition, +“submitted” means any form of electronic, verbal, or written communication sent +to the Licensor or its representatives, including but not limited to +communication on electronic mailing lists, source code control systems, and +issue tracking systems that are managed by, or on behalf of, the Licensor for +the purpose of discussing and improving the Work, but excluding communication +that is conspicuously marked or otherwise designated in writing by the copyright +owner as “Not a Contribution.” + +“Contributor” shall mean Licensor and any individual or Legal Entity on behalf +of whom a Contribution has been received by Licensor and subsequently +incorporated within the Work. + +#### 2. Grant of Copyright License + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable copyright license to reproduce, prepare Derivative Works of, +publicly display, publicly perform, sublicense, and distribute the Work and such +Derivative Works in Source or Object form. + +#### 3. Grant of Patent License + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable (except as stated in this section) patent license to make, have +made, use, offer to sell, sell, import, and otherwise transfer the Work, where +such license applies only to those patent claims licensable by such Contributor +that are necessarily infringed by their Contribution(s) alone or by combination +of their Contribution(s) with the Work to which such Contribution(s) was +submitted. If You institute patent litigation against any entity (including a +cross-claim or counterclaim in a lawsuit) alleging that the Work or a +Contribution incorporated within the Work constitutes direct or contributory +patent infringement, then any patent licenses granted to You under this License +for that Work shall terminate as of the date such litigation is filed. + +#### 4. Redistribution + +You may reproduce and distribute copies of the Work or Derivative Works thereof +in any medium, with or without modifications, and in Source or Object form, +provided that You meet the following conditions: + +* **(a)** You must give any other recipients of the Work or Derivative Works a copy of +this License; and +* **(b)** You must cause any modified files to carry prominent notices stating that You +changed the files; and +* **(c)** You must retain, in the Source form of any Derivative Works that You distribute, +all copyright, patent, trademark, and attribution notices from the Source form +of the Work, excluding those notices that do not pertain to any part of the +Derivative Works; and +* **(d)** If the Work includes a “NOTICE” text file as part of its distribution, then any +Derivative Works that You distribute must include a readable copy of the +attribution notices contained within such NOTICE file, excluding those notices +that do not pertain to any part of the Derivative Works, in at least one of the +following places: within a NOTICE text file distributed as part of the +Derivative Works; within the Source form or documentation, if provided along +with the Derivative Works; or, within a display generated by the Derivative +Works, if and wherever such third-party notices normally appear. The contents of +the NOTICE file are for informational purposes only and do not modify the +License. You may add Your own attribution notices within Derivative Works that +You distribute, alongside or as an addendum to the NOTICE text from the Work, +provided that such additional attribution notices cannot be construed as +modifying the License. + +You may add Your own copyright statement to Your modifications and may provide +additional or different license terms and conditions for use, reproduction, or +distribution of Your modifications, or for any such Derivative Works as a whole, +provided Your use, reproduction, and distribution of the Work otherwise complies +with the conditions stated in this License. + +#### 5. Submission of Contributions + +Unless You explicitly state otherwise, any Contribution intentionally submitted +for inclusion in the Work by You to the Licensor shall be under the terms and +conditions of this License, without any additional terms or conditions. +Notwithstanding the above, nothing herein shall supersede or modify the terms of +any separate license agreement you may have executed with Licensor regarding +such Contributions. + +#### 6. Trademarks + +This License does not grant permission to use the trade names, trademarks, +service marks, or product names of the Licensor, except as required for +reasonable and customary use in describing the origin of the Work and +reproducing the content of the NOTICE file. + +#### 7. Disclaimer of Warranty + +Unless required by applicable law or agreed to in writing, Licensor provides the +Work (and each Contributor provides its Contributions) on an “AS IS” BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, +including, without limitation, any warranties or conditions of TITLE, +NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are +solely responsible for determining the appropriateness of using or +redistributing the Work and assume any risks associated with Your exercise of +permissions under this License. + +#### 8. Limitation of Liability + +In no event and under no legal theory, whether in tort (including negligence), +contract, or otherwise, unless required by applicable law (such as deliberate +and grossly negligent acts) or agreed to in writing, shall any Contributor be +liable to You for damages, including any direct, indirect, special, incidental, +or consequential damages of any character arising as a result of this License or +out of the use or inability to use the Work (including but not limited to +damages for loss of goodwill, work stoppage, computer failure or malfunction, or +any and all other commercial damages or losses), even if such Contributor has +been advised of the possibility of such damages. + +#### 9. Accepting Warranty or Additional Liability + +While redistributing the Work or Derivative Works thereof, You may choose to +offer, and charge a fee for, acceptance of support, warranty, indemnity, or +other liability obligations and/or rights consistent with this License. However, +in accepting such obligations, You may act only on Your own behalf and on Your +sole responsibility, not on behalf of any other Contributor, and only if You +agree to indemnify, defend, and hold each Contributor harmless for any liability +incurred by, or claims asserted against, such Contributor by reason of your +accepting any such warranty or additional liability. + +_END OF TERMS AND CONDITIONS_ + +### APPENDIX: How to apply the Apache License to your work + +To apply the Apache License to your work, attach the following boilerplate +notice, with the fields enclosed by brackets `[]` replaced with your own +identifying information. (Don't include the brackets!) The text should be +enclosed in the appropriate comment syntax for the file format. We also +recommend that a file or class name and description of purpose be included on +the same “printed page” as the copyright notice for easier identification within +third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/NAMESPACE b/NAMESPACE index ba0d259..b3213b7 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -11,6 +11,7 @@ import(stringr) # Core export(ApiClient) export(ApiResponse) +export(ApiException) # Models export(Dimension) diff --git a/R/api_client.R b/R/api_client.R index e03bf4c..753af7f 100644 --- a/R/api_client.R +++ b/R/api_client.R @@ -32,6 +32,7 @@ #' @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 +#' @importFrom rlang abort #' @export ApiClient <- R6::R6Class( "ApiClient", @@ -39,7 +40,7 @@ ApiClient <- R6::R6Class( # base path of all requests base_path = "http://localhost", # user agent in the HTTP request - user_agent = "OpenAPI-Generator/1.0.0/r", + user_agent = "OpenAPI-Generator/0.1.0/r", # default headers in the HTTP request default_headers = NULL, # username (HTTP basic authentication) @@ -236,7 +237,9 @@ ApiClient <- R6::R6Class( 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) + rlang::abort(message = err_msg, + .subclass = "ApiException", + ApiException = ApiException$new(status = 0, reason = err_msg)) } } else { # no streaming if (method == "GET") { @@ -262,7 +265,9 @@ ApiClient <- R6::R6Class( 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) + rlang::abort(message = err_msg, + .subclass = "ApiException", + ApiException = ApiException$new(status = 0, reason = err_msg)) } # return ApiResponse diff --git a/R/api_exception.R b/R/api_exception.R new file mode 100644 index 0000000..c3b093f --- /dev/null +++ b/R/api_exception.R @@ -0,0 +1,74 @@ +#' 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 ApiException +#' @description ApiException Class +#' @format An \code{R6Class} generator object +#' @field status Status of the ApiException +#' @field reason Reason of the ApiException +#' @field body Body of the http response +#' @field headers Headers of the http response +#' @export +ApiException <- R6::R6Class( + "ApiException", + public = list( + status = NULL, + reason = NULL, + body = NULL, + headers = NULL, + #' Initialize a new ApiException class. + #' + #' @description + #' Initialize a new ApiExceptino class. + #' + #' @param status HTTP status. + #' @param reason Reason of the ApiException. + #' @param http_response HTTP response object. + #' @export + initialize = function(status = NULL, reason = NULL, http_response = NULL) { + if (!is.null(http_response)) { + self$status <- http_response$status_code + errorMsg <- http_response$response + if (is.null(errorMsg) || errorMsg == "") { + errorMsg <- "Api exception encountered. No details given." + } + self$body <- errorMsg + self$headers <- http_response$headers + self$reason <- http_response$http_status_desc + } else { + self$status <- status + self$reason <- reason + self$body <- NULL + self$headers <- NULL + } + }, + #' Returns the string format of ApiException. + #' + #' @description + #' Returns the string format of ApiException. + #' + #' @return the string format of ApiException. + #' @export + toString = function() { + errorMsg <- "" + errorMsg <- paste("status : ", self$status, "\n", sep = "") + errorMsg <- paste(errorMsg, "Reason : ", self$reason, "\n", sep = "") + if (!is.null(self$headers)) { + errorMsg <- paste(errorMsg, "Headers : ", "\n", sep = "") + for (name in names(self$headers)) { + errorMsg <- paste(errorMsg, name, " : ", self$headers[[name]], "\n", sep = " ") + } + } + if (!is.null(self$body)) { + errorMsg <- paste(errorMsg, "Body : ", "\n", sep = "") + errorMsg <- paste(errorMsg, self$body, "\n") + } + errorMsg + } + ) +) diff --git a/R/default_api.R b/R/default_api.R index 3983bb6..12765ea 100644 --- a/R/default_api.R +++ b/R/default_api.R @@ -21,8 +21,9 @@ #' \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 \emph{ @returnType } AnyType \cr #' +#' \item On encountering errors, an error of subclass ApiException will be thrown. #' #' \item status code : 200 | Successful Response #' @@ -49,8 +50,9 @@ #' \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 \emph{ @returnType } AnyType \cr #' +#' \item On encountering errors, an error of subclass ApiException will be thrown. #' #' \item status code : 200 | Successful Response #' @@ -77,8 +79,9 @@ #' \item \emph{ @param } schema_id character #' \item \emph{ @param } body AnyType #' \item \emph{ @param } authorization character -#' \item \emph{ @returnType } \link{AnyType} \cr +#' \item \emph{ @returnType } AnyType \cr #' +#' \item On encountering errors, an error of subclass ApiException will be thrown. #' #' \item status code : 200 | Successful Response #' @@ -102,8 +105,9 @@ #' \item \emph{ @param } instance_id character #' \item \emph{ @param } account_id character #' \item \emph{ @param } authorization character -#' \item \emph{ @returnType } \link{AnyType} \cr +#' \item \emph{ @returnType } AnyType \cr #' +#' \item On encountering errors, an error of subclass ApiException will be thrown. #' #' \item status code : 200 | Successful Response #' @@ -127,8 +131,9 @@ #' \item \emph{ @param } instance_id character #' \item \emph{ @param } instance_name character #' \item \emph{ @param } authorization character -#' \item \emph{ @returnType } \link{AnyType} \cr +#' \item \emph{ @returnType } AnyType \cr #' +#' \item On encountering errors, an error of subclass ApiException will be thrown. #' #' \item status code : 200 | Successful Response #' @@ -155,8 +160,9 @@ #' \item \emph{ @param } uid character #' \item \emph{ @param } schema_id character #' \item \emph{ @param } authorization character -#' \item \emph{ @returnType } \link{AnyType} \cr +#' \item \emph{ @returnType } AnyType \cr #' +#' \item On encountering errors, an error of subclass ApiException will be thrown. #' #' \item status code : 200 | Successful Response #' @@ -179,8 +185,9 @@ #' \itemize{ #' \item \emph{ @param } instance_id character #' \item \emph{ @param } authorization character -#' \item \emph{ @returnType } \link{AnyType} \cr +#' \item \emph{ @returnType } AnyType \cr #' +#' \item On encountering errors, an error of subclass ApiException will be thrown. #' #' \item status code : 200 | Successful Response #' @@ -203,8 +210,9 @@ #' \itemize{ #' \item \emph{ @param } instance_id character #' \item \emph{ @param } authorization character -#' \item \emph{ @returnType } \link{AnyType} \cr +#' \item \emph{ @returnType } AnyType \cr #' +#' \item On encountering errors, an error of subclass ApiException will be thrown. #' #' \item status code : 200 | Successful Response #' @@ -229,8 +237,9 @@ #' \item \emph{ @param } schema_id character #' \item \emph{ @param } q list( character ) #' \item \emph{ @param } authorization character -#' \item \emph{ @returnType } \link{AnyType} \cr +#' \item \emph{ @returnType } AnyType \cr #' +#' \item On encountering errors, an error of subclass ApiException will be thrown. #' #' \item status code : 200 | Successful Response #' @@ -254,8 +263,9 @@ #' \item \emph{ @param } instance_id character #' \item \emph{ @param } schema_id character #' \item \emph{ @param } authorization character -#' \item \emph{ @returnType } \link{AnyType} \cr +#' \item \emph{ @returnType } AnyType \cr #' +#' \item On encountering errors, an error of subclass ApiException will be thrown. #' #' \item status code : 200 | Successful Response #' @@ -285,8 +295,9 @@ #' \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 \emph{ @returnType } AnyType \cr #' +#' \item On encountering errors, an error of subclass ApiException will be thrown. #' #' \item status code : 200 | Successful Response #' @@ -317,8 +328,9 @@ #' \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 \emph{ @returnType } AnyType \cr #' +#' \item On encountering errors, an error of subclass ApiException will be thrown. #' #' \item status code : 200 | Successful Response #' @@ -343,8 +355,9 @@ #' \item \emph{ @param } model_name character #' \item \emph{ @param } instance_id character #' \item \emph{ @param } authorization character -#' \item \emph{ @returnType } \link{AnyType} \cr +#' \item \emph{ @returnType } AnyType \cr #' +#' \item On encountering errors, an error of subclass ApiException will be thrown. #' #' \item status code : 200 | Successful Response #' @@ -367,8 +380,9 @@ #' \itemize{ #' \item \emph{ @param } instance_id character #' \item \emph{ @param } authorization character -#' \item \emph{ @returnType } \link{AnyType} \cr +#' \item \emph{ @returnType } AnyType \cr #' +#' \item On encountering errors, an error of subclass ApiException will be thrown. #' #' \item status code : 200 | Successful Response #' @@ -398,8 +412,9 @@ #' \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 \emph{ @returnType } AnyType \cr #' +#' \item On encountering errors, an error of subclass ApiException will be thrown. #' #' \item status code : 200 | Successful Response #' @@ -425,8 +440,9 @@ #' \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 \emph{ @returnType } AnyType \cr #' +#' \item On encountering errors, an error of subclass ApiException will be thrown. #' #' \item status code : 200 | Successful Response #' @@ -453,8 +469,9 @@ #' \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 \emph{ @returnType } AnyType \cr #' +#' \item On encountering errors, an error of subclass ApiException will be thrown. #' #' \item status code : 200 | Successful Response #' @@ -479,8 +496,9 @@ #' \item \emph{ @param } handle character #' \item \emph{ @param } schema_id character #' \item \emph{ @param } authorization character -#' \item \emph{ @returnType } \link{AnyType} \cr +#' \item \emph{ @returnType } AnyType \cr #' +#' \item On encountering errors, an error of subclass ApiException will be thrown. #' #' \item status code : 200 | Successful Response #' @@ -505,8 +523,9 @@ #' \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 \emph{ @returnType } AnyType \cr #' +#' \item On encountering errors, an error of subclass ApiException will be thrown. #' #' \item status code : 200 | Successful Response #' @@ -534,8 +553,9 @@ #' \item \emph{ @param } schema_id character #' \item \emph{ @param } body AnyType #' \item \emph{ @param } authorization character -#' \item \emph{ @returnType } \link{AnyType} \cr +#' \item \emph{ @returnType } AnyType \cr #' +#' \item On encountering errors, an error of subclass ApiException will be thrown. #' #' \item status code : 200 | Successful Response #' @@ -560,7 +580,7 @@ #' \dontrun{ #' #################### AddCollaboratorInstancesInstanceIdCollaboratorsAccountIdPut #################### #' -#' library(openapi) +#' library(laminr.api) #' var_instance_id <- "instance_id_example" # character | #' var_account_id <- "account_id_example" # character | #' var_schema_id <- "schema_id_example" # character | @@ -570,15 +590,11 @@ #' #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) +#' library(laminr.api) #' var_name <- "name_example" # character | #' var_storage <- "create-s3" # character | (Optional) #' var_schema_str <- "schema_str_example" # character | (Optional) @@ -589,15 +605,11 @@ #' #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) +#' library(laminr.api) #' var_instance_id <- "instance_id_example" # character | #' var_module_name <- "module_name_example" # character | #' var_model_name <- "model_name_example" # character | @@ -608,15 +620,11 @@ #' #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) +#' library(laminr.api) #' var_instance_id <- "instance_id_example" # character | #' var_account_id <- "account_id_example" # character | #' var_authorization <- "authorization_example" # character | (Optional) @@ -624,15 +632,11 @@ #' #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) +#' library(laminr.api) #' var_instance_id <- "instance_id_example" # character | #' var_instance_name <- "instance_name_example" # character | #' var_authorization <- "authorization_example" # character | (Optional) @@ -640,15 +644,11 @@ #' #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) +#' library(laminr.api) #' var_instance_id <- "instance_id_example" # character | #' var_module_name <- "module_name_example" # character | #' var_model_name <- "model_name_example" # character | @@ -659,45 +659,33 @@ #' #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) +#' library(laminr.api) #' 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) +#' library(laminr.api) #' 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) +#' library(laminr.api) #' 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) @@ -706,15 +694,11 @@ #' #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) +#' library(laminr.api) #' var_instance_id <- "instance_id_example" # character | #' var_schema_id <- "schema_id_example" # character | #' var_authorization <- "authorization_example" # character | (Optional) @@ -722,15 +706,11 @@ #' #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) +#' library(laminr.api) #' var_instance_id <- "instance_id_example" # character | #' var_module_name <- "module_name_example" # character | #' var_model_name <- "model_name_example" # character | @@ -744,15 +724,11 @@ #' #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) +#' library(laminr.api) #' var_instance_id <- "instance_id_example" # character | #' var_module_name <- "module_name_example" # character | #' var_model_name <- "model_name_example" # character | @@ -767,15 +743,11 @@ #' #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) +#' library(laminr.api) #' var_module_name <- "module_name_example" # character | #' var_model_name <- "model_name_example" # character | #' var_instance_id <- "instance_id_example" # character | @@ -784,30 +756,22 @@ #' #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) +#' library(laminr.api) #' 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) +#' library(laminr.api) #' var_instance_id <- "instance_id_example" # character | #' var_module_name <- "module_name_example" # character | #' var_model_name <- "model_name_example" # character | @@ -821,15 +785,11 @@ #' #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) +#' library(laminr.api) #' 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) @@ -839,15 +799,11 @@ #' #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) +#' library(laminr.api) #' var_instance_id <- "instance_id_example" # character | #' var_module_name <- "module_name_example" # character | #' var_model_name <- "model_name_example" # character | @@ -858,15 +814,11 @@ #' #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) +#' library(laminr.api) #' var_instance_id <- "instance_id_example" # character | #' var_handle <- "handle_example" # character | #' var_schema_id <- "schema_id_example" # character | @@ -875,15 +827,11 @@ #' #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) +#' library(laminr.api) #' var_instance_id <- "instance_id_example" # character | #' var_account_id <- "account_id_example" # character | #' var_role <- "role_example" # character | @@ -892,15 +840,11 @@ #' #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) +#' library(laminr.api) #' var_instance_id <- "instance_id_example" # character | #' var_module_name <- "module_name_example" # character | #' var_model_name <- "model_name_example" # character | @@ -912,15 +856,12 @@ #' #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 +#' @importFrom rlang abort #' @export DefaultApi <- R6::R6Class( "DefaultApi", @@ -991,15 +932,24 @@ DefaultApi <- R6::R6Class( is_oauth <- FALSE if (missing(`instance_id`)) { - stop("Missing required parameter `instance_id`.") + rlang::abort(message = "Missing required parameter `instance_id`.", + .subclass = "ApiException", + ApiException = ApiException$new(status = 0, + reason = "Missing required parameter `instance_id`.")) } if (missing(`account_id`)) { - stop("Missing required parameter `account_id`.") + rlang::abort(message = "Missing required parameter `account_id`.", + .subclass = "ApiException", + ApiException = ApiException$new(status = 0, + reason = "Missing required parameter `account_id`.")) } if (missing(`schema_id`)) { - stop("Missing required parameter `schema_id`.") + rlang::abort(message = "Missing required parameter `schema_id`.", + .subclass = "ApiException", + ApiException = ApiException$new(status = 0, + reason = "Missing required parameter `schema_id`.")) } @@ -1012,7 +962,10 @@ DefaultApi <- R6::R6Class( 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].") + rlang::abort(message = "Invalid value for `role` when calling DefaultApi$AddCollaboratorInstancesInstanceIdCollaboratorsAccountIdPut. Must be [admin, write, read].", + .subclass = "ApiException", + ApiException = ApiException$new(status = 0, + reason = "Invalid value for `role` when calling DefaultApi$AddCollaboratorInstancesInstanceIdCollaboratorsAccountIdPut. Must be [admin, write, read].")) } query_params[["role"]] <- `role` @@ -1052,9 +1005,11 @@ DefaultApi <- R6::R6Class( } deserialized_resp_obj <- tryCatch( - self$api_client$deserialize(local_var_resp$response_as_text(), "AnyType", loadNamespace("openapi")), + self$api_client$deserialize(local_var_resp$response_as_text(), "AnyType", loadNamespace("laminr.api")), error = function(e) { - stop("Failed to deserialize response") + rlang::abort(message = "Failed to deserialize response", + .subclass = "ApiException", + ApiException = ApiException$new(http_response = local_var_resp)) } ) local_var_resp$content <- deserialized_resp_obj @@ -1123,7 +1078,10 @@ DefaultApi <- R6::R6Class( is_oauth <- FALSE if (missing(`name`)) { - stop("Missing required parameter `name`.") + rlang::abort(message = "Missing required parameter `name`.", + .subclass = "ApiException", + ApiException = ApiException$new(status = 0, + reason = "Missing required parameter `name`.")) } @@ -1172,9 +1130,11 @@ DefaultApi <- R6::R6Class( } deserialized_resp_obj <- tryCatch( - self$api_client$deserialize(local_var_resp$response_as_text(), "AnyType", loadNamespace("openapi")), + self$api_client$deserialize(local_var_resp$response_as_text(), "AnyType", loadNamespace("laminr.api")), error = function(e) { - stop("Failed to deserialize response") + rlang::abort(message = "Failed to deserialize response", + .subclass = "ApiException", + ApiException = ApiException$new(http_response = local_var_resp)) } ) local_var_resp$content <- deserialized_resp_obj @@ -1243,23 +1203,38 @@ DefaultApi <- R6::R6Class( is_oauth <- FALSE if (missing(`instance_id`)) { - stop("Missing required parameter `instance_id`.") + rlang::abort(message = "Missing required parameter `instance_id`.", + .subclass = "ApiException", + ApiException = ApiException$new(status = 0, + reason = "Missing required parameter `instance_id`.")) } if (missing(`module_name`)) { - stop("Missing required parameter `module_name`.") + rlang::abort(message = "Missing required parameter `module_name`.", + .subclass = "ApiException", + ApiException = ApiException$new(status = 0, + reason = "Missing required parameter `module_name`.")) } if (missing(`model_name`)) { - stop("Missing required parameter `model_name`.") + rlang::abort(message = "Missing required parameter `model_name`.", + .subclass = "ApiException", + ApiException = ApiException$new(status = 0, + reason = "Missing required parameter `model_name`.")) } if (missing(`schema_id`)) { - stop("Missing required parameter `schema_id`.") + rlang::abort(message = "Missing required parameter `schema_id`.", + .subclass = "ApiException", + ApiException = ApiException$new(status = 0, + reason = "Missing required parameter `schema_id`.")) } if (missing(`body`)) { - stop("Missing required parameter `body`.") + rlang::abort(message = "Missing required parameter `body`.", + .subclass = "ApiException", + ApiException = ApiException$new(status = 0, + reason = "Missing required parameter `body`.")) } @@ -1318,9 +1293,11 @@ DefaultApi <- R6::R6Class( } deserialized_resp_obj <- tryCatch( - self$api_client$deserialize(local_var_resp$response_as_text(), "AnyType", loadNamespace("openapi")), + self$api_client$deserialize(local_var_resp$response_as_text(), "AnyType", loadNamespace("laminr.api")), error = function(e) { - stop("Failed to deserialize response") + rlang::abort(message = "Failed to deserialize response", + .subclass = "ApiException", + ApiException = ApiException$new(http_response = local_var_resp)) } ) local_var_resp$content <- deserialized_resp_obj @@ -1383,11 +1360,17 @@ DefaultApi <- R6::R6Class( is_oauth <- FALSE if (missing(`instance_id`)) { - stop("Missing required parameter `instance_id`.") + rlang::abort(message = "Missing required parameter `instance_id`.", + .subclass = "ApiException", + ApiException = ApiException$new(status = 0, + reason = "Missing required parameter `instance_id`.")) } if (missing(`account_id`)) { - stop("Missing required parameter `account_id`.") + rlang::abort(message = "Missing required parameter `account_id`.", + .subclass = "ApiException", + ApiException = ApiException$new(status = 0, + reason = "Missing required parameter `account_id`.")) } @@ -1431,9 +1414,11 @@ DefaultApi <- R6::R6Class( } deserialized_resp_obj <- tryCatch( - self$api_client$deserialize(local_var_resp$response_as_text(), "AnyType", loadNamespace("openapi")), + self$api_client$deserialize(local_var_resp$response_as_text(), "AnyType", loadNamespace("laminr.api")), error = function(e) { - stop("Failed to deserialize response") + rlang::abort(message = "Failed to deserialize response", + .subclass = "ApiException", + ApiException = ApiException$new(http_response = local_var_resp)) } ) local_var_resp$content <- deserialized_resp_obj @@ -1496,11 +1481,17 @@ DefaultApi <- R6::R6Class( is_oauth <- FALSE if (missing(`instance_id`)) { - stop("Missing required parameter `instance_id`.") + rlang::abort(message = "Missing required parameter `instance_id`.", + .subclass = "ApiException", + ApiException = ApiException$new(status = 0, + reason = "Missing required parameter `instance_id`.")) } if (missing(`instance_name`)) { - stop("Missing required parameter `instance_name`.") + rlang::abort(message = "Missing required parameter `instance_name`.", + .subclass = "ApiException", + ApiException = ApiException$new(status = 0, + reason = "Missing required parameter `instance_name`.")) } @@ -1542,9 +1533,11 @@ DefaultApi <- R6::R6Class( } deserialized_resp_obj <- tryCatch( - self$api_client$deserialize(local_var_resp$response_as_text(), "AnyType", loadNamespace("openapi")), + self$api_client$deserialize(local_var_resp$response_as_text(), "AnyType", loadNamespace("laminr.api")), error = function(e) { - stop("Failed to deserialize response") + rlang::abort(message = "Failed to deserialize response", + .subclass = "ApiException", + ApiException = ApiException$new(http_response = local_var_resp)) } ) local_var_resp$content <- deserialized_resp_obj @@ -1613,23 +1606,38 @@ DefaultApi <- R6::R6Class( is_oauth <- FALSE if (missing(`instance_id`)) { - stop("Missing required parameter `instance_id`.") + rlang::abort(message = "Missing required parameter `instance_id`.", + .subclass = "ApiException", + ApiException = ApiException$new(status = 0, + reason = "Missing required parameter `instance_id`.")) } if (missing(`module_name`)) { - stop("Missing required parameter `module_name`.") + rlang::abort(message = "Missing required parameter `module_name`.", + .subclass = "ApiException", + ApiException = ApiException$new(status = 0, + reason = "Missing required parameter `module_name`.")) } if (missing(`model_name`)) { - stop("Missing required parameter `model_name`.") + rlang::abort(message = "Missing required parameter `model_name`.", + .subclass = "ApiException", + ApiException = ApiException$new(status = 0, + reason = "Missing required parameter `model_name`.")) } if (missing(`uid`)) { - stop("Missing required parameter `uid`.") + rlang::abort(message = "Missing required parameter `uid`.", + .subclass = "ApiException", + ApiException = ApiException$new(status = 0, + reason = "Missing required parameter `uid`.")) } if (missing(`schema_id`)) { - stop("Missing required parameter `schema_id`.") + rlang::abort(message = "Missing required parameter `schema_id`.", + .subclass = "ApiException", + ApiException = ApiException$new(status = 0, + reason = "Missing required parameter `schema_id`.")) } @@ -1686,9 +1694,11 @@ DefaultApi <- R6::R6Class( } deserialized_resp_obj <- tryCatch( - self$api_client$deserialize(local_var_resp$response_as_text(), "AnyType", loadNamespace("openapi")), + self$api_client$deserialize(local_var_resp$response_as_text(), "AnyType", loadNamespace("laminr.api")), error = function(e) { - stop("Failed to deserialize response") + rlang::abort(message = "Failed to deserialize response", + .subclass = "ApiException", + ApiException = ApiException$new(http_response = local_var_resp)) } ) local_var_resp$content <- deserialized_resp_obj @@ -1749,7 +1759,10 @@ DefaultApi <- R6::R6Class( is_oauth <- FALSE if (missing(`instance_id`)) { - stop("Missing required parameter `instance_id`.") + rlang::abort(message = "Missing required parameter `instance_id`.", + .subclass = "ApiException", + ApiException = ApiException$new(status = 0, + reason = "Missing required parameter `instance_id`.")) } @@ -1788,9 +1801,11 @@ DefaultApi <- R6::R6Class( } deserialized_resp_obj <- tryCatch( - self$api_client$deserialize(local_var_resp$response_as_text(), "AnyType", loadNamespace("openapi")), + self$api_client$deserialize(local_var_resp$response_as_text(), "AnyType", loadNamespace("laminr.api")), error = function(e) { - stop("Failed to deserialize response") + rlang::abort(message = "Failed to deserialize response", + .subclass = "ApiException", + ApiException = ApiException$new(http_response = local_var_resp)) } ) local_var_resp$content <- deserialized_resp_obj @@ -1851,7 +1866,10 @@ DefaultApi <- R6::R6Class( is_oauth <- FALSE if (missing(`instance_id`)) { - stop("Missing required parameter `instance_id`.") + rlang::abort(message = "Missing required parameter `instance_id`.", + .subclass = "ApiException", + ApiException = ApiException$new(status = 0, + reason = "Missing required parameter `instance_id`.")) } @@ -1890,9 +1908,11 @@ DefaultApi <- R6::R6Class( } deserialized_resp_obj <- tryCatch( - self$api_client$deserialize(local_var_resp$response_as_text(), "AnyType", loadNamespace("openapi")), + self$api_client$deserialize(local_var_resp$response_as_text(), "AnyType", loadNamespace("laminr.api")), error = function(e) { - stop("Failed to deserialize response") + rlang::abort(message = "Failed to deserialize response", + .subclass = "ApiException", + ApiException = ApiException$new(http_response = local_var_resp)) } ) local_var_resp$content <- deserialized_resp_obj @@ -1957,11 +1977,17 @@ DefaultApi <- R6::R6Class( is_oauth <- FALSE if (missing(`instance_id`)) { - stop("Missing required parameter `instance_id`.") + rlang::abort(message = "Missing required parameter `instance_id`.", + .subclass = "ApiException", + ApiException = ApiException$new(status = 0, + reason = "Missing required parameter `instance_id`.")) } if (missing(`schema_id`)) { - stop("Missing required parameter `schema_id`.") + rlang::abort(message = "Missing required parameter `schema_id`.", + .subclass = "ApiException", + ApiException = ApiException$new(status = 0, + reason = "Missing required parameter `schema_id`.")) } @@ -2009,9 +2035,11 @@ DefaultApi <- R6::R6Class( } deserialized_resp_obj <- tryCatch( - self$api_client$deserialize(local_var_resp$response_as_text(), "AnyType", loadNamespace("openapi")), + self$api_client$deserialize(local_var_resp$response_as_text(), "AnyType", loadNamespace("laminr.api")), error = function(e) { - stop("Failed to deserialize response") + rlang::abort(message = "Failed to deserialize response", + .subclass = "ApiException", + ApiException = ApiException$new(http_response = local_var_resp)) } ) local_var_resp$content <- deserialized_resp_obj @@ -2074,11 +2102,17 @@ DefaultApi <- R6::R6Class( is_oauth <- FALSE if (missing(`instance_id`)) { - stop("Missing required parameter `instance_id`.") + rlang::abort(message = "Missing required parameter `instance_id`.", + .subclass = "ApiException", + ApiException = ApiException$new(status = 0, + reason = "Missing required parameter `instance_id`.")) } if (missing(`schema_id`)) { - stop("Missing required parameter `schema_id`.") + rlang::abort(message = "Missing required parameter `schema_id`.", + .subclass = "ApiException", + ApiException = ApiException$new(status = 0, + reason = "Missing required parameter `schema_id`.")) } @@ -2120,9 +2154,11 @@ DefaultApi <- R6::R6Class( } deserialized_resp_obj <- tryCatch( - self$api_client$deserialize(local_var_resp$response_as_text(), "AnyType", loadNamespace("openapi")), + self$api_client$deserialize(local_var_resp$response_as_text(), "AnyType", loadNamespace("laminr.api")), error = function(e) { - stop("Failed to deserialize response") + rlang::abort(message = "Failed to deserialize response", + .subclass = "ApiException", + ApiException = ApiException$new(http_response = local_var_resp)) } ) local_var_resp$content <- deserialized_resp_obj @@ -2197,23 +2233,38 @@ DefaultApi <- R6::R6Class( is_oauth <- FALSE if (missing(`instance_id`)) { - stop("Missing required parameter `instance_id`.") + rlang::abort(message = "Missing required parameter `instance_id`.", + .subclass = "ApiException", + ApiException = ApiException$new(status = 0, + reason = "Missing required parameter `instance_id`.")) } if (missing(`module_name`)) { - stop("Missing required parameter `module_name`.") + rlang::abort(message = "Missing required parameter `module_name`.", + .subclass = "ApiException", + ApiException = ApiException$new(status = 0, + reason = "Missing required parameter `module_name`.")) } if (missing(`model_name`)) { - stop("Missing required parameter `model_name`.") + rlang::abort(message = "Missing required parameter `model_name`.", + .subclass = "ApiException", + ApiException = ApiException$new(status = 0, + reason = "Missing required parameter `model_name`.")) } if (missing(`id_or_uid`)) { - stop("Missing required parameter `id_or_uid`.") + rlang::abort(message = "Missing required parameter `id_or_uid`.", + .subclass = "ApiException", + ApiException = ApiException$new(status = 0, + reason = "Missing required parameter `id_or_uid`.")) } if (missing(`schema_id`)) { - stop("Missing required parameter `schema_id`.") + rlang::abort(message = "Missing required parameter `schema_id`.", + .subclass = "ApiException", + ApiException = ApiException$new(status = 0, + reason = "Missing required parameter `schema_id`.")) } @@ -2283,9 +2334,11 @@ DefaultApi <- R6::R6Class( } deserialized_resp_obj <- tryCatch( - self$api_client$deserialize(local_var_resp$response_as_text(), "AnyType", loadNamespace("openapi")), + self$api_client$deserialize(local_var_resp$response_as_text(), "AnyType", loadNamespace("laminr.api")), error = function(e) { - stop("Failed to deserialize response") + rlang::abort(message = "Failed to deserialize response", + .subclass = "ApiException", + ApiException = ApiException$new(http_response = local_var_resp)) } ) local_var_resp$content <- deserialized_resp_obj @@ -2362,19 +2415,31 @@ DefaultApi <- R6::R6Class( is_oauth <- FALSE if (missing(`instance_id`)) { - stop("Missing required parameter `instance_id`.") + rlang::abort(message = "Missing required parameter `instance_id`.", + .subclass = "ApiException", + ApiException = ApiException$new(status = 0, + reason = "Missing required parameter `instance_id`.")) } if (missing(`module_name`)) { - stop("Missing required parameter `module_name`.") + rlang::abort(message = "Missing required parameter `module_name`.", + .subclass = "ApiException", + ApiException = ApiException$new(status = 0, + reason = "Missing required parameter `module_name`.")) } if (missing(`model_name`)) { - stop("Missing required parameter `model_name`.") + rlang::abort(message = "Missing required parameter `model_name`.", + .subclass = "ApiException", + ApiException = ApiException$new(status = 0, + reason = "Missing required parameter `model_name`.")) } if (missing(`schema_id`)) { - stop("Missing required parameter `schema_id`.") + rlang::abort(message = "Missing required parameter `schema_id`.", + .subclass = "ApiException", + ApiException = ApiException$new(status = 0, + reason = "Missing required parameter `schema_id`.")) } @@ -2445,9 +2510,11 @@ DefaultApi <- R6::R6Class( } deserialized_resp_obj <- tryCatch( - self$api_client$deserialize(local_var_resp$response_as_text(), "AnyType", loadNamespace("openapi")), + self$api_client$deserialize(local_var_resp$response_as_text(), "AnyType", loadNamespace("laminr.api")), error = function(e) { - stop("Failed to deserialize response") + rlang::abort(message = "Failed to deserialize response", + .subclass = "ApiException", + ApiException = ApiException$new(http_response = local_var_resp)) } ) local_var_resp$content <- deserialized_resp_obj @@ -2512,15 +2579,24 @@ DefaultApi <- R6::R6Class( is_oauth <- FALSE if (missing(`module_name`)) { - stop("Missing required parameter `module_name`.") + rlang::abort(message = "Missing required parameter `module_name`.", + .subclass = "ApiException", + ApiException = ApiException$new(status = 0, + reason = "Missing required parameter `module_name`.")) } if (missing(`model_name`)) { - stop("Missing required parameter `model_name`.") + rlang::abort(message = "Missing required parameter `model_name`.", + .subclass = "ApiException", + ApiException = ApiException$new(status = 0, + reason = "Missing required parameter `model_name`.")) } if (missing(`instance_id`)) { - stop("Missing required parameter `instance_id`.") + rlang::abort(message = "Missing required parameter `instance_id`.", + .subclass = "ApiException", + ApiException = ApiException$new(status = 0, + reason = "Missing required parameter `instance_id`.")) } @@ -2569,9 +2645,11 @@ DefaultApi <- R6::R6Class( } deserialized_resp_obj <- tryCatch( - self$api_client$deserialize(local_var_resp$response_as_text(), "AnyType", loadNamespace("openapi")), + self$api_client$deserialize(local_var_resp$response_as_text(), "AnyType", loadNamespace("laminr.api")), error = function(e) { - stop("Failed to deserialize response") + rlang::abort(message = "Failed to deserialize response", + .subclass = "ApiException", + ApiException = ApiException$new(http_response = local_var_resp)) } ) local_var_resp$content <- deserialized_resp_obj @@ -2632,7 +2710,10 @@ DefaultApi <- R6::R6Class( is_oauth <- FALSE if (missing(`instance_id`)) { - stop("Missing required parameter `instance_id`.") + rlang::abort(message = "Missing required parameter `instance_id`.", + .subclass = "ApiException", + ApiException = ApiException$new(status = 0, + reason = "Missing required parameter `instance_id`.")) } @@ -2671,9 +2752,11 @@ DefaultApi <- R6::R6Class( } deserialized_resp_obj <- tryCatch( - self$api_client$deserialize(local_var_resp$response_as_text(), "AnyType", loadNamespace("openapi")), + self$api_client$deserialize(local_var_resp$response_as_text(), "AnyType", loadNamespace("laminr.api")), error = function(e) { - stop("Failed to deserialize response") + rlang::abort(message = "Failed to deserialize response", + .subclass = "ApiException", + ApiException = ApiException$new(http_response = local_var_resp)) } ) local_var_resp$content <- deserialized_resp_obj @@ -2748,23 +2831,38 @@ DefaultApi <- R6::R6Class( is_oauth <- FALSE if (missing(`instance_id`)) { - stop("Missing required parameter `instance_id`.") + rlang::abort(message = "Missing required parameter `instance_id`.", + .subclass = "ApiException", + ApiException = ApiException$new(status = 0, + reason = "Missing required parameter `instance_id`.")) } if (missing(`module_name`)) { - stop("Missing required parameter `module_name`.") + rlang::abort(message = "Missing required parameter `module_name`.", + .subclass = "ApiException", + ApiException = ApiException$new(status = 0, + reason = "Missing required parameter `module_name`.")) } if (missing(`model_name`)) { - stop("Missing required parameter `model_name`.") + rlang::abort(message = "Missing required parameter `model_name`.", + .subclass = "ApiException", + ApiException = ApiException$new(status = 0, + reason = "Missing required parameter `model_name`.")) } if (missing(`field_path`)) { - stop("Missing required parameter `field_path`.") + rlang::abort(message = "Missing required parameter `field_path`.", + .subclass = "ApiException", + ApiException = ApiException$new(status = 0, + reason = "Missing required parameter `field_path`.")) } if (missing(`schema_id`)) { - stop("Missing required parameter `schema_id`.") + rlang::abort(message = "Missing required parameter `schema_id`.", + .subclass = "ApiException", + ApiException = ApiException$new(status = 0, + reason = "Missing required parameter `schema_id`.")) } @@ -2834,9 +2932,11 @@ DefaultApi <- R6::R6Class( } deserialized_resp_obj <- tryCatch( - self$api_client$deserialize(local_var_resp$response_as_text(), "AnyType", loadNamespace("openapi")), + self$api_client$deserialize(local_var_resp$response_as_text(), "AnyType", loadNamespace("laminr.api")), error = function(e) { - stop("Failed to deserialize response") + rlang::abort(message = "Failed to deserialize response", + .subclass = "ApiException", + ApiException = ApiException$new(http_response = local_var_resp)) } ) local_var_resp$content <- deserialized_resp_obj @@ -2903,11 +3003,17 @@ DefaultApi <- R6::R6Class( is_oauth <- FALSE if (missing(`bucket_name`)) { - stop("Missing required parameter `bucket_name`.") + rlang::abort(message = "Missing required parameter `bucket_name`.", + .subclass = "ApiException", + ApiException = ApiException$new(status = 0, + reason = "Missing required parameter `bucket_name`.")) } if (missing(`s3_permissions_request`)) { - stop("Missing required parameter `s3_permissions_request`.") + rlang::abort(message = "Missing required parameter `s3_permissions_request`.", + .subclass = "ApiException", + ApiException = ApiException$new(status = 0, + reason = "Missing required parameter `s3_permissions_request`.")) } @@ -2959,9 +3065,11 @@ DefaultApi <- R6::R6Class( } deserialized_resp_obj <- tryCatch( - self$api_client$deserialize(local_var_resp$response_as_text(), "AnyType", loadNamespace("openapi")), + self$api_client$deserialize(local_var_resp$response_as_text(), "AnyType", loadNamespace("laminr.api")), error = function(e) { - stop("Failed to deserialize response") + rlang::abort(message = "Failed to deserialize response", + .subclass = "ApiException", + ApiException = ApiException$new(http_response = local_var_resp)) } ) local_var_resp$content <- deserialized_resp_obj @@ -3030,23 +3138,38 @@ DefaultApi <- R6::R6Class( is_oauth <- FALSE if (missing(`instance_id`)) { - stop("Missing required parameter `instance_id`.") + rlang::abort(message = "Missing required parameter `instance_id`.", + .subclass = "ApiException", + ApiException = ApiException$new(status = 0, + reason = "Missing required parameter `instance_id`.")) } if (missing(`module_name`)) { - stop("Missing required parameter `module_name`.") + rlang::abort(message = "Missing required parameter `module_name`.", + .subclass = "ApiException", + ApiException = ApiException$new(status = 0, + reason = "Missing required parameter `module_name`.")) } if (missing(`model_name`)) { - stop("Missing required parameter `model_name`.") + rlang::abort(message = "Missing required parameter `model_name`.", + .subclass = "ApiException", + ApiException = ApiException$new(status = 0, + reason = "Missing required parameter `model_name`.")) } if (missing(`schema_id`)) { - stop("Missing required parameter `schema_id`.") + rlang::abort(message = "Missing required parameter `schema_id`.", + .subclass = "ApiException", + ApiException = ApiException$new(status = 0, + reason = "Missing required parameter `schema_id`.")) } if (missing(`group_by_request_body`)) { - stop("Missing required parameter `group_by_request_body`.") + rlang::abort(message = "Missing required parameter `group_by_request_body`.", + .subclass = "ApiException", + ApiException = ApiException$new(status = 0, + reason = "Missing required parameter `group_by_request_body`.")) } @@ -3105,9 +3228,11 @@ DefaultApi <- R6::R6Class( } deserialized_resp_obj <- tryCatch( - self$api_client$deserialize(local_var_resp$response_as_text(), "AnyType", loadNamespace("openapi")), + self$api_client$deserialize(local_var_resp$response_as_text(), "AnyType", loadNamespace("laminr.api")), error = function(e) { - stop("Failed to deserialize response") + rlang::abort(message = "Failed to deserialize response", + .subclass = "ApiException", + ApiException = ApiException$new(http_response = local_var_resp)) } ) local_var_resp$content <- deserialized_resp_obj @@ -3172,15 +3297,24 @@ DefaultApi <- R6::R6Class( is_oauth <- FALSE if (missing(`instance_id`)) { - stop("Missing required parameter `instance_id`.") + rlang::abort(message = "Missing required parameter `instance_id`.", + .subclass = "ApiException", + ApiException = ApiException$new(status = 0, + reason = "Missing required parameter `instance_id`.")) } if (missing(`handle`)) { - stop("Missing required parameter `handle`.") + rlang::abort(message = "Missing required parameter `handle`.", + .subclass = "ApiException", + ApiException = ApiException$new(status = 0, + reason = "Missing required parameter `handle`.")) } if (missing(`schema_id`)) { - stop("Missing required parameter `schema_id`.") + rlang::abort(message = "Missing required parameter `schema_id`.", + .subclass = "ApiException", + ApiException = ApiException$new(status = 0, + reason = "Missing required parameter `schema_id`.")) } @@ -3227,9 +3361,11 @@ DefaultApi <- R6::R6Class( } deserialized_resp_obj <- tryCatch( - self$api_client$deserialize(local_var_resp$response_as_text(), "AnyType", loadNamespace("openapi")), + self$api_client$deserialize(local_var_resp$response_as_text(), "AnyType", loadNamespace("laminr.api")), error = function(e) { - stop("Failed to deserialize response") + rlang::abort(message = "Failed to deserialize response", + .subclass = "ApiException", + ApiException = ApiException$new(http_response = local_var_resp)) } ) local_var_resp$content <- deserialized_resp_obj @@ -3294,15 +3430,24 @@ DefaultApi <- R6::R6Class( is_oauth <- FALSE if (missing(`instance_id`)) { - stop("Missing required parameter `instance_id`.") + rlang::abort(message = "Missing required parameter `instance_id`.", + .subclass = "ApiException", + ApiException = ApiException$new(status = 0, + reason = "Missing required parameter `instance_id`.")) } if (missing(`account_id`)) { - stop("Missing required parameter `account_id`.") + rlang::abort(message = "Missing required parameter `account_id`.", + .subclass = "ApiException", + ApiException = ApiException$new(status = 0, + reason = "Missing required parameter `account_id`.")) } if (missing(`role`)) { - stop("Missing required parameter `role`.") + rlang::abort(message = "Missing required parameter `role`.", + .subclass = "ApiException", + ApiException = ApiException$new(status = 0, + reason = "Missing required parameter `role`.")) } @@ -3312,7 +3457,10 @@ DefaultApi <- R6::R6Class( 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].") + rlang::abort(message = "Invalid value for `role` when calling DefaultApi$UpdateCollaboratorInstancesInstanceIdCollaboratorsAccountIdPatch. Must be [admin, write, read].", + .subclass = "ApiException", + ApiException = ApiException$new(status = 0, + reason = "Invalid value for `role` when calling DefaultApi$UpdateCollaboratorInstancesInstanceIdCollaboratorsAccountIdPatch. Must be [admin, write, read].")) } query_params[["role"]] <- `role` @@ -3352,9 +3500,11 @@ DefaultApi <- R6::R6Class( } deserialized_resp_obj <- tryCatch( - self$api_client$deserialize(local_var_resp$response_as_text(), "AnyType", loadNamespace("openapi")), + self$api_client$deserialize(local_var_resp$response_as_text(), "AnyType", loadNamespace("laminr.api")), error = function(e) { - stop("Failed to deserialize response") + rlang::abort(message = "Failed to deserialize response", + .subclass = "ApiException", + ApiException = ApiException$new(http_response = local_var_resp)) } ) local_var_resp$content <- deserialized_resp_obj @@ -3425,27 +3575,45 @@ DefaultApi <- R6::R6Class( is_oauth <- FALSE if (missing(`instance_id`)) { - stop("Missing required parameter `instance_id`.") + rlang::abort(message = "Missing required parameter `instance_id`.", + .subclass = "ApiException", + ApiException = ApiException$new(status = 0, + reason = "Missing required parameter `instance_id`.")) } if (missing(`module_name`)) { - stop("Missing required parameter `module_name`.") + rlang::abort(message = "Missing required parameter `module_name`.", + .subclass = "ApiException", + ApiException = ApiException$new(status = 0, + reason = "Missing required parameter `module_name`.")) } if (missing(`model_name`)) { - stop("Missing required parameter `model_name`.") + rlang::abort(message = "Missing required parameter `model_name`.", + .subclass = "ApiException", + ApiException = ApiException$new(status = 0, + reason = "Missing required parameter `model_name`.")) } if (missing(`uid`)) { - stop("Missing required parameter `uid`.") + rlang::abort(message = "Missing required parameter `uid`.", + .subclass = "ApiException", + ApiException = ApiException$new(status = 0, + reason = "Missing required parameter `uid`.")) } if (missing(`schema_id`)) { - stop("Missing required parameter `schema_id`.") + rlang::abort(message = "Missing required parameter `schema_id`.", + .subclass = "ApiException", + ApiException = ApiException$new(status = 0, + reason = "Missing required parameter `schema_id`.")) } if (missing(`body`)) { - stop("Missing required parameter `body`.") + rlang::abort(message = "Missing required parameter `body`.", + .subclass = "ApiException", + ApiException = ApiException$new(status = 0, + reason = "Missing required parameter `body`.")) } @@ -3509,9 +3677,11 @@ DefaultApi <- R6::R6Class( } deserialized_resp_obj <- tryCatch( - self$api_client$deserialize(local_var_resp$response_as_text(), "AnyType", loadNamespace("openapi")), + self$api_client$deserialize(local_var_resp$response_as_text(), "AnyType", loadNamespace("laminr.api")), error = function(e) { - stop("Failed to deserialize response") + rlang::abort(message = "Failed to deserialize response", + .subclass = "ApiException", + ApiException = ApiException$new(http_response = local_var_resp)) } ) local_var_resp$content <- deserialized_resp_obj diff --git a/R/get_record_request_body.R b/R/get_record_request_body.R index a3cbd4e..1aa0e7a 100644 --- a/R/get_record_request_body.R +++ b/R/get_record_request_body.R @@ -56,7 +56,7 @@ GetRecordRequestBody <- R6::R6Class( 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$`select` <- ApiClient$new()$deserializeObj(this_object$`select`, "array[character]", loadNamespace("laminr.api")) } self }, @@ -91,7 +91,7 @@ GetRecordRequestBody <- R6::R6Class( #' @export fromJSONString = function(input_json) { this_object <- jsonlite::fromJSON(input_json) - self$`select` <- ApiClient$new()$deserializeObj(this_object$`select`, "array[character]", loadNamespace("openapi")) + self$`select` <- ApiClient$new()$deserializeObj(this_object$`select`, "array[character]", loadNamespace("laminr.api")) self }, #' Validate JSON input with respect to GetRecordRequestBody diff --git a/R/get_records_request_body.R b/R/get_records_request_body.R index 6482af7..0b93c68 100644 --- a/R/get_records_request_body.R +++ b/R/get_records_request_body.R @@ -91,13 +91,13 @@ GetRecordsRequestBody <- R6::R6Class( 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$`select` <- ApiClient$new()$deserializeObj(this_object$`select`, "array[character]", loadNamespace("laminr.api")) } 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")) + self$`order_by` <- ApiClient$new()$deserializeObj(this_object$`order_by`, "array[OrderByColumn]", loadNamespace("laminr.api")) } if (!is.null(this_object$`search`)) { self$`search` <- this_object$`search` @@ -159,9 +159,9 @@ GetRecordsRequestBody <- R6::R6Class( #' @export fromJSONString = function(input_json) { this_object <- jsonlite::fromJSON(input_json) - self$`select` <- ApiClient$new()$deserializeObj(this_object$`select`, "array[character]", loadNamespace("openapi")) + self$`select` <- ApiClient$new()$deserializeObj(this_object$`select`, "array[character]", loadNamespace("laminr.api")) self$`filter` <- this_object$`filter` - self$`order_by` <- ApiClient$new()$deserializeObj(this_object$`order_by`, "array[OrderByColumn]", loadNamespace("openapi")) + self$`order_by` <- ApiClient$new()$deserializeObj(this_object$`order_by`, "array[OrderByColumn]", loadNamespace("laminr.api")) self$`search` <- this_object$`search` self }, diff --git a/R/get_values_request_body.R b/R/get_values_request_body.R index f3f5ccb..a882594 100644 --- a/R/get_values_request_body.R +++ b/R/get_values_request_body.R @@ -82,7 +82,7 @@ GetValuesRequestBody <- R6::R6Class( 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")) + self$`order_by` <- ApiClient$new()$deserializeObj(this_object$`order_by`, "array[OrderByColumn]", loadNamespace("laminr.api")) } if (!is.null(this_object$`search`)) { self$`search` <- this_object$`search` @@ -137,7 +137,7 @@ GetValuesRequestBody <- R6::R6Class( 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$`order_by` <- ApiClient$new()$deserializeObj(this_object$`order_by`, "array[OrderByColumn]", loadNamespace("laminr.api")) self$`search` <- this_object$`search` self }, diff --git a/R/group_by_request_body.R b/R/group_by_request_body.R index 74b7ba3..9a28ea4 100644 --- a/R/group_by_request_body.R +++ b/R/group_by_request_body.R @@ -78,10 +78,10 @@ GroupByRequestBody <- R6::R6Class( 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")) + self$`dimensions` <- ApiClient$new()$deserializeObj(this_object$`dimensions`, "array[Dimension]", loadNamespace("laminr.api")) } if (!is.null(this_object$`measures`)) { - self$`measures` <- ApiClient$new()$deserializeObj(this_object$`measures`, "array[Measure]", loadNamespace("openapi")) + self$`measures` <- ApiClient$new()$deserializeObj(this_object$`measures`, "array[Measure]", loadNamespace("laminr.api")) } if (!is.null(this_object$`filter`)) { self$`filter` <- this_object$`filter` @@ -135,8 +135,8 @@ GroupByRequestBody <- R6::R6Class( #' @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$`dimensions` <- ApiClient$new()$deserializeObj(this_object$`dimensions`, "array[Dimension]", loadNamespace("laminr.api")) + self$`measures` <- ApiClient$new()$deserializeObj(this_object$`measures`, "array[Measure]", loadNamespace("laminr.api")) self$`filter` <- this_object$`filter` self }, diff --git a/R/http_validation_error.R b/R/http_validation_error.R index d058a6b..6a8c5f0 100644 --- a/R/http_validation_error.R +++ b/R/http_validation_error.R @@ -56,7 +56,7 @@ HTTPValidationError <- R6::R6Class( 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$`detail` <- ApiClient$new()$deserializeObj(this_object$`detail`, "array[ValidationError]", loadNamespace("laminr.api")) } self }, @@ -91,7 +91,7 @@ HTTPValidationError <- R6::R6Class( #' @export fromJSONString = function(input_json) { this_object <- jsonlite::fromJSON(input_json) - self$`detail` <- ApiClient$new()$deserializeObj(this_object$`detail`, "array[ValidationError]", loadNamespace("openapi")) + self$`detail` <- ApiClient$new()$deserializeObj(this_object$`detail`, "array[ValidationError]", loadNamespace("laminr.api")) self }, #' Validate JSON input with respect to HTTPValidationError diff --git a/R/laminr.api-package.R b/R/laminr.api-package.R new file mode 100644 index 0000000..7400243 --- /dev/null +++ b/R/laminr.api-package.R @@ -0,0 +1,7 @@ +#' @keywords internal +"_PACKAGE" + +## usethis namespace: start +## usethis namespace: end +NULL + diff --git a/R/validation_error.R b/R/validation_error.R index 10aa195..0367087 100644 --- a/R/validation_error.R +++ b/R/validation_error.R @@ -82,7 +82,7 @@ ValidationError <- R6::R6Class( 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")) + self$`loc` <- ApiClient$new()$deserializeObj(this_object$`loc`, "array[ValidationErrorLocInner]", loadNamespace("laminr.api")) } if (!is.null(this_object$`msg`)) { self$`msg` <- this_object$`msg` @@ -139,7 +139,7 @@ ValidationError <- R6::R6Class( #' @export fromJSONString = function(input_json) { this_object <- jsonlite::fromJSON(input_json) - self$`loc` <- ApiClient$new()$deserializeObj(this_object$`loc`, "array[ValidationErrorLocInner]", loadNamespace("openapi")) + self$`loc` <- ApiClient$new()$deserializeObj(this_object$`loc`, "array[ValidationErrorLocInner]", loadNamespace("laminr.api")) self$`msg` <- this_object$`msg` self$`type` <- this_object$`type` self diff --git a/README.md b/README.md index b2b045b..215af05 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,15 @@ -# R API client for laminr.api +# R API client for the Lamin API ## Installation -``` r -install.packages("devtools") -``` - -To install directly from Github, use `devtools`: +To install directly from Github, use `remotes`: ``` r -install.packages("devtools") -library(devtools) -install_github("data-intuitive/laminr.api") +if (!requireNamespace("remotes", quietly=TRUE)) { + install.packages("remotes") +} +remotes::install_github("data-intuitive/laminr.api") ``` ### Usage diff --git a/README.qmd b/README.qmd index 16db731..138c382 100644 --- a/README.qmd +++ b/README.qmd @@ -1,19 +1,16 @@ --- -title: R API client for laminr.api +title: R API client for the Lamin API format: gfm --- ## Installation +To install directly from Github, use `remotes`: ```R -install.packages("devtools") -``` - -To install directly from Github, use `devtools`: -```R -install.packages("devtools") -library(devtools) -install_github("data-intuitive/laminr.api") +if (!requireNamespace("remotes", quietly=TRUE)) { + install.packages("remotes") +} +remotes::install_github("data-intuitive/laminr.api") ``` ### Usage @@ -31,7 +28,6 @@ client <- ApiClient$new(api_url) # client$CallApi #? ``` - ## Documentation for API Endpoints All URIs are relative to *http://localhost* @@ -78,5 +74,3 @@ Class | Method | HTTP request | Description ## Documentation for Authorization Endpoints do not require authorization. - - diff --git a/docs/DefaultApi.md b/docs/DefaultApi.md index eabf84a..45f0e9b 100644 --- a/docs/DefaultApi.md +++ b/docs/DefaultApi.md @@ -33,7 +33,7 @@ Add Collaborator ### Example ```R -library(openapi) +library(laminr.api) # Add Collaborator # @@ -45,10 +45,6 @@ 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 @@ -63,7 +59,7 @@ Name | Type | Description | Notes ### Return type -[**AnyType**](AnyType.md) +AnyType ### Authorization @@ -87,7 +83,7 @@ Create Instance ### Example ```R -library(openapi) +library(laminr.api) # Create Instance # @@ -100,10 +96,6 @@ 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 @@ -119,7 +111,7 @@ Name | Type | Description | Notes ### Return type -[**AnyType**](AnyType.md) +AnyType ### Authorization @@ -143,7 +135,7 @@ Create Record ### Example ```R -library(openapi) +library(laminr.api) # Create Record # @@ -156,10 +148,6 @@ 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 @@ -175,7 +163,7 @@ Name | Type | Description | Notes ### Return type -[**AnyType**](AnyType.md) +AnyType ### Authorization @@ -199,7 +187,7 @@ Delete Collaborator ### Example ```R -library(openapi) +library(laminr.api) # Delete Collaborator # @@ -209,10 +197,6 @@ 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 @@ -225,7 +209,7 @@ Name | Type | Description | Notes ### Return type -[**AnyType**](AnyType.md) +AnyType ### Authorization @@ -249,7 +233,7 @@ Delete Instance ### Example ```R -library(openapi) +library(laminr.api) # Delete Instance # @@ -259,10 +243,6 @@ 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 @@ -275,7 +255,7 @@ Name | Type | Description | Notes ### Return type -[**AnyType**](AnyType.md) +AnyType ### Authorization @@ -299,7 +279,7 @@ Delete Record ### Example ```R -library(openapi) +library(laminr.api) # Delete Record # @@ -312,10 +292,6 @@ 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 @@ -331,7 +307,7 @@ Name | Type | Description | Notes ### Return type -[**AnyType**](AnyType.md) +AnyType ### Authorization @@ -355,7 +331,7 @@ Generate Password ### Example ```R -library(openapi) +library(laminr.api) # Generate Password # @@ -364,10 +340,6 @@ 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 @@ -379,7 +351,7 @@ Name | Type | Description | Notes ### Return type -[**AnyType**](AnyType.md) +AnyType ### Authorization @@ -403,7 +375,7 @@ Generate Url ### Example ```R -library(openapi) +library(laminr.api) # Generate Url # @@ -412,10 +384,6 @@ 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 @@ -427,7 +395,7 @@ Name | Type | Description | Notes ### Return type -[**AnyType**](AnyType.md) +AnyType ### Authorization @@ -451,7 +419,7 @@ Get Instance Statistics ### Example ```R -library(openapi) +library(laminr.api) # Get Instance Statistics # @@ -462,10 +430,6 @@ var_q <- c("inner_example") # array[character] | In ${module}.${model} format (c 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 @@ -479,7 +443,7 @@ Name | Type | Description | Notes ### Return type -[**AnyType**](AnyType.md) +AnyType ### Authorization @@ -503,7 +467,7 @@ Get Non Empty Tables ### Example ```R -library(openapi) +library(laminr.api) # Get Non Empty Tables # @@ -513,10 +477,6 @@ 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 @@ -529,7 +489,7 @@ Name | Type | Description | Notes ### Return type -[**AnyType**](AnyType.md) +AnyType ### Authorization @@ -553,7 +513,7 @@ Get Record ### Example ```R -library(openapi) +library(laminr.api) # Get Record # @@ -569,10 +529,6 @@ 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 @@ -591,7 +547,7 @@ Name | Type | Description | Notes ### Return type -[**AnyType**](AnyType.md) +AnyType ### Authorization @@ -615,7 +571,7 @@ Get Records ### Example ```R -library(openapi) +library(laminr.api) # Get Records # @@ -632,10 +588,6 @@ 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 @@ -655,7 +607,7 @@ Name | Type | Description | Notes ### Return type -[**AnyType**](AnyType.md) +AnyType ### Authorization @@ -679,7 +631,7 @@ Get Relations ### Example ```R -library(openapi) +library(laminr.api) # Get Relations # @@ -690,10 +642,6 @@ 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 @@ -707,7 +655,7 @@ Name | Type | Description | Notes ### Return type -[**AnyType**](AnyType.md) +AnyType ### Authorization @@ -731,7 +679,7 @@ Get Schema ### Example ```R -library(openapi) +library(laminr.api) # Get Schema # @@ -740,10 +688,6 @@ 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 @@ -755,7 +699,7 @@ Name | Type | Description | Notes ### Return type -[**AnyType**](AnyType.md) +AnyType ### Authorization @@ -779,7 +723,7 @@ Get Values ### Example ```R -library(openapi) +library(laminr.api) # Get Values # @@ -795,10 +739,6 @@ 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 @@ -817,7 +757,7 @@ Name | Type | Description | Notes ### Return type -[**AnyType**](AnyType.md) +AnyType ### Authorization @@ -841,7 +781,7 @@ Grant S3 Permissions ### Example ```R -library(openapi) +library(laminr.api) # Grant S3 Permissions # @@ -853,10 +793,6 @@ 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 @@ -871,7 +807,7 @@ Name | Type | Description | Notes ### Return type -[**AnyType**](AnyType.md) +AnyType ### Authorization @@ -895,7 +831,7 @@ Group By ### Example ```R -library(openapi) +library(laminr.api) # Group By # @@ -908,10 +844,6 @@ var_group_by_request_body <- GroupByRequestBody$new(c(Dimension$new("field_name_ 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 @@ -927,7 +859,7 @@ Name | Type | Description | Notes ### Return type -[**AnyType**](AnyType.md) +AnyType ### Authorization @@ -951,7 +883,7 @@ Transfer Ownership ### Example ```R -library(openapi) +library(laminr.api) # Transfer Ownership # @@ -962,10 +894,6 @@ 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 @@ -979,7 +907,7 @@ Name | Type | Description | Notes ### Return type -[**AnyType**](AnyType.md) +AnyType ### Authorization @@ -1003,7 +931,7 @@ Update Collaborator ### Example ```R -library(openapi) +library(laminr.api) # Update Collaborator # @@ -1014,10 +942,6 @@ 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 @@ -1031,7 +955,7 @@ Name | Type | Description | Notes ### Return type -[**AnyType**](AnyType.md) +AnyType ### Authorization @@ -1055,7 +979,7 @@ Update Record ### Example ```R -library(openapi) +library(laminr.api) # Update Record # @@ -1069,10 +993,6 @@ 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 @@ -1089,7 +1009,7 @@ Name | Type | Description | Notes ### Return type -[**AnyType**](AnyType.md) +AnyType ### Authorization diff --git a/docs/Dimension.md b/docs/Dimension.md index 0da6ed3..0f5efb1 100644 --- a/docs/Dimension.md +++ b/docs/Dimension.md @@ -1,4 +1,4 @@ -# openapi::Dimension +# laminr.api::Dimension ## Properties diff --git a/docs/GetRecordRequestBody.md b/docs/GetRecordRequestBody.md index ee22f96..d667a82 100644 --- a/docs/GetRecordRequestBody.md +++ b/docs/GetRecordRequestBody.md @@ -1,4 +1,4 @@ -# openapi::GetRecordRequestBody +# laminr.api::GetRecordRequestBody ## Properties diff --git a/docs/GetRecordsRequestBody.md b/docs/GetRecordsRequestBody.md index a0c419f..6f56ae0 100644 --- a/docs/GetRecordsRequestBody.md +++ b/docs/GetRecordsRequestBody.md @@ -1,4 +1,4 @@ -# openapi::GetRecordsRequestBody +# laminr.api::GetRecordsRequestBody ## Properties diff --git a/docs/GetValuesRequestBody.md b/docs/GetValuesRequestBody.md index a117565..538a999 100644 --- a/docs/GetValuesRequestBody.md +++ b/docs/GetValuesRequestBody.md @@ -1,4 +1,4 @@ -# openapi::GetValuesRequestBody +# laminr.api::GetValuesRequestBody ## Properties diff --git a/docs/GroupByRequestBody.md b/docs/GroupByRequestBody.md index 7c4b87a..460e24e 100644 --- a/docs/GroupByRequestBody.md +++ b/docs/GroupByRequestBody.md @@ -1,4 +1,4 @@ -# openapi::GroupByRequestBody +# laminr.api::GroupByRequestBody ## Properties diff --git a/docs/HTTPValidationError.md b/docs/HTTPValidationError.md index 80fbda7..fba0f7c 100644 --- a/docs/HTTPValidationError.md +++ b/docs/HTTPValidationError.md @@ -1,4 +1,4 @@ -# openapi::HTTPValidationError +# laminr.api::HTTPValidationError ## Properties diff --git a/docs/Measure.md b/docs/Measure.md index 5176bb2..4a2f404 100644 --- a/docs/Measure.md +++ b/docs/Measure.md @@ -1,4 +1,4 @@ -# openapi::Measure +# laminr.api::Measure ## Properties diff --git a/docs/OrderByColumn.md b/docs/OrderByColumn.md index 6495d42..b36088c 100644 --- a/docs/OrderByColumn.md +++ b/docs/OrderByColumn.md @@ -1,4 +1,4 @@ -# openapi::OrderByColumn +# laminr.api::OrderByColumn ## Properties diff --git a/docs/S3PermissionsRequest.md b/docs/S3PermissionsRequest.md index 344c22f..c680e6f 100644 --- a/docs/S3PermissionsRequest.md +++ b/docs/S3PermissionsRequest.md @@ -1,4 +1,4 @@ -# openapi::S3PermissionsRequest +# laminr.api::S3PermissionsRequest ## Properties diff --git a/docs/ValidationError.md b/docs/ValidationError.md index 44bfaef..3e3eb43 100644 --- a/docs/ValidationError.md +++ b/docs/ValidationError.md @@ -1,4 +1,4 @@ -# openapi::ValidationError +# laminr.api::ValidationError ## Properties diff --git a/docs/ValidationErrorLocInner.md b/docs/ValidationErrorLocInner.md index 917456c..032e505 100644 --- a/docs/ValidationErrorLocInner.md +++ b/docs/ValidationErrorLocInner.md @@ -1,4 +1,4 @@ -# openapi::ValidationErrorLocInner +# laminr.api::ValidationErrorLocInner ## Properties 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/man/ApiException.Rd b/man/ApiException.Rd new file mode 100644 index 0000000..dceb0eb --- /dev/null +++ b/man/ApiException.Rd @@ -0,0 +1,93 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/api_exception.R +\docType{class} +\name{ApiException} +\alias{ApiException} +\title{ApiException} +\format{ +An \code{R6Class} generator object +} +\description{ +ApiException Class +} +\details{ +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 +} +\section{Public fields}{ +\if{html}{\out{
}} +\describe{ +\item{\code{status}}{Status of the ApiException} + +\item{\code{reason}}{Reason of the ApiException} + +\item{\code{body}}{Body of the http response} + +\item{\code{headers}}{Headers of the http response} +} +\if{html}{\out{
}} +} +\section{Methods}{ +\subsection{Public methods}{ +\itemize{ +\item \href{#method-ApiException-new}{\code{ApiException$new()}} +\item \href{#method-ApiException-toString}{\code{ApiException$toString()}} +\item \href{#method-ApiException-clone}{\code{ApiException$clone()}} +} +} +\if{html}{\out{
}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-ApiException-new}{}}} +\subsection{Method \code{new()}}{ +Initialize a new ApiExceptino class. +\subsection{Usage}{ +\if{html}{\out{
}}\preformatted{ApiException$new(status = NULL, reason = NULL, http_response = NULL)}\if{html}{\out{
}} +} + +\subsection{Arguments}{ +\if{html}{\out{
}} +\describe{ +\item{\code{status}}{HTTP status.} + +\item{\code{reason}}{Reason of the ApiException.} + +\item{\code{http_response}}{HTTP response object.} +} +\if{html}{\out{
}} +} +} +\if{html}{\out{
}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-ApiException-toString}{}}} +\subsection{Method \code{toString()}}{ +Returns the string format of ApiException. +\subsection{Usage}{ +\if{html}{\out{
}}\preformatted{ApiException$toString()}\if{html}{\out{
}} +} + +\subsection{Returns}{ +the string format of ApiException. +} +} +\if{html}{\out{
}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-ApiException-clone}{}}} +\subsection{Method \code{clone()}}{ +The objects of this class are cloneable with this method. +\subsection{Usage}{ +\if{html}{\out{
}}\preformatted{ApiException$clone(deep = FALSE)}\if{html}{\out{
}} +} + +\subsection{Arguments}{ +\if{html}{\out{
}} +\describe{ +\item{\code{deep}}{Whether to make a deep clone.} +} +\if{html}{\out{
}} +} +} +} diff --git a/man/DefaultApi.Rd b/man/DefaultApi.Rd index 3d8cae4..71469a5 100644 --- a/man/DefaultApi.Rd +++ b/man/DefaultApi.Rd @@ -29,8 +29,9 @@ Generated by: https://openapi-generator.tech \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 \emph{ @returnType } AnyType \cr +\item On encountering errors, an error of subclass ApiException will be thrown. \item status code : 200 | Successful Response @@ -57,8 +58,9 @@ Generated by: https://openapi-generator.tech \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 \emph{ @returnType } AnyType \cr +\item On encountering errors, an error of subclass ApiException will be thrown. \item status code : 200 | Successful Response @@ -85,8 +87,9 @@ Generated by: https://openapi-generator.tech \item \emph{ @param } schema_id character \item \emph{ @param } body AnyType \item \emph{ @param } authorization character -\item \emph{ @returnType } \link{AnyType} \cr +\item \emph{ @returnType } AnyType \cr +\item On encountering errors, an error of subclass ApiException will be thrown. \item status code : 200 | Successful Response @@ -110,8 +113,9 @@ Generated by: https://openapi-generator.tech \item \emph{ @param } instance_id character \item \emph{ @param } account_id character \item \emph{ @param } authorization character -\item \emph{ @returnType } \link{AnyType} \cr +\item \emph{ @returnType } AnyType \cr +\item On encountering errors, an error of subclass ApiException will be thrown. \item status code : 200 | Successful Response @@ -135,8 +139,9 @@ Generated by: https://openapi-generator.tech \item \emph{ @param } instance_id character \item \emph{ @param } instance_name character \item \emph{ @param } authorization character -\item \emph{ @returnType } \link{AnyType} \cr +\item \emph{ @returnType } AnyType \cr +\item On encountering errors, an error of subclass ApiException will be thrown. \item status code : 200 | Successful Response @@ -163,8 +168,9 @@ Generated by: https://openapi-generator.tech \item \emph{ @param } uid character \item \emph{ @param } schema_id character \item \emph{ @param } authorization character -\item \emph{ @returnType } \link{AnyType} \cr +\item \emph{ @returnType } AnyType \cr +\item On encountering errors, an error of subclass ApiException will be thrown. \item status code : 200 | Successful Response @@ -187,8 +193,9 @@ Generated by: https://openapi-generator.tech \itemize{ \item \emph{ @param } instance_id character \item \emph{ @param } authorization character -\item \emph{ @returnType } \link{AnyType} \cr +\item \emph{ @returnType } AnyType \cr +\item On encountering errors, an error of subclass ApiException will be thrown. \item status code : 200 | Successful Response @@ -211,8 +218,9 @@ Generated by: https://openapi-generator.tech \itemize{ \item \emph{ @param } instance_id character \item \emph{ @param } authorization character -\item \emph{ @returnType } \link{AnyType} \cr +\item \emph{ @returnType } AnyType \cr +\item On encountering errors, an error of subclass ApiException will be thrown. \item status code : 200 | Successful Response @@ -237,8 +245,9 @@ Generated by: https://openapi-generator.tech \item \emph{ @param } schema_id character \item \emph{ @param } q list( character ) \item \emph{ @param } authorization character -\item \emph{ @returnType } \link{AnyType} \cr +\item \emph{ @returnType } AnyType \cr +\item On encountering errors, an error of subclass ApiException will be thrown. \item status code : 200 | Successful Response @@ -262,8 +271,9 @@ Generated by: https://openapi-generator.tech \item \emph{ @param } instance_id character \item \emph{ @param } schema_id character \item \emph{ @param } authorization character -\item \emph{ @returnType } \link{AnyType} \cr +\item \emph{ @returnType } AnyType \cr +\item On encountering errors, an error of subclass ApiException will be thrown. \item status code : 200 | Successful Response @@ -293,8 +303,9 @@ Generated by: https://openapi-generator.tech \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 \emph{ @returnType } AnyType \cr +\item On encountering errors, an error of subclass ApiException will be thrown. \item status code : 200 | Successful Response @@ -325,8 +336,9 @@ Generated by: https://openapi-generator.tech \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 \emph{ @returnType } AnyType \cr +\item On encountering errors, an error of subclass ApiException will be thrown. \item status code : 200 | Successful Response @@ -351,8 +363,9 @@ Generated by: https://openapi-generator.tech \item \emph{ @param } model_name character \item \emph{ @param } instance_id character \item \emph{ @param } authorization character -\item \emph{ @returnType } \link{AnyType} \cr +\item \emph{ @returnType } AnyType \cr +\item On encountering errors, an error of subclass ApiException will be thrown. \item status code : 200 | Successful Response @@ -375,8 +388,9 @@ Generated by: https://openapi-generator.tech \itemize{ \item \emph{ @param } instance_id character \item \emph{ @param } authorization character -\item \emph{ @returnType } \link{AnyType} \cr +\item \emph{ @returnType } AnyType \cr +\item On encountering errors, an error of subclass ApiException will be thrown. \item status code : 200 | Successful Response @@ -406,8 +420,9 @@ Generated by: https://openapi-generator.tech \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 \emph{ @returnType } AnyType \cr +\item On encountering errors, an error of subclass ApiException will be thrown. \item status code : 200 | Successful Response @@ -433,8 +448,9 @@ Generated by: https://openapi-generator.tech \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 \emph{ @returnType } AnyType \cr +\item On encountering errors, an error of subclass ApiException will be thrown. \item status code : 200 | Successful Response @@ -461,8 +477,9 @@ Generated by: https://openapi-generator.tech \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 \emph{ @returnType } AnyType \cr +\item On encountering errors, an error of subclass ApiException will be thrown. \item status code : 200 | Successful Response @@ -487,8 +504,9 @@ Generated by: https://openapi-generator.tech \item \emph{ @param } handle character \item \emph{ @param } schema_id character \item \emph{ @param } authorization character -\item \emph{ @returnType } \link{AnyType} \cr +\item \emph{ @returnType } AnyType \cr +\item On encountering errors, an error of subclass ApiException will be thrown. \item status code : 200 | Successful Response @@ -513,8 +531,9 @@ Generated by: https://openapi-generator.tech \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 \emph{ @returnType } AnyType \cr +\item On encountering errors, an error of subclass ApiException will be thrown. \item status code : 200 | Successful Response @@ -542,8 +561,9 @@ Generated by: https://openapi-generator.tech \item \emph{ @param } schema_id character \item \emph{ @param } body AnyType \item \emph{ @param } authorization character -\item \emph{ @returnType } \link{AnyType} \cr +\item \emph{ @returnType } AnyType \cr +\item On encountering errors, an error of subclass ApiException will be thrown. \item status code : 200 | Successful Response @@ -568,7 +588,7 @@ Generated by: https://openapi-generator.tech \dontrun{ #################### AddCollaboratorInstancesInstanceIdCollaboratorsAccountIdPut #################### -library(openapi) +library(laminr.api) var_instance_id <- "instance_id_example" # character | var_account_id <- "account_id_example" # character | var_schema_id <- "schema_id_example" # character | @@ -578,15 +598,11 @@ 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) +library(laminr.api) var_name <- "name_example" # character | var_storage <- "create-s3" # character | (Optional) var_schema_str <- "schema_str_example" # character | (Optional) @@ -597,15 +613,11 @@ 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) +library(laminr.api) var_instance_id <- "instance_id_example" # character | var_module_name <- "module_name_example" # character | var_model_name <- "model_name_example" # character | @@ -616,15 +628,11 @@ 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) +library(laminr.api) var_instance_id <- "instance_id_example" # character | var_account_id <- "account_id_example" # character | var_authorization <- "authorization_example" # character | (Optional) @@ -632,15 +640,11 @@ 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) +library(laminr.api) var_instance_id <- "instance_id_example" # character | var_instance_name <- "instance_name_example" # character | var_authorization <- "authorization_example" # character | (Optional) @@ -648,15 +652,11 @@ 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) +library(laminr.api) var_instance_id <- "instance_id_example" # character | var_module_name <- "module_name_example" # character | var_model_name <- "model_name_example" # character | @@ -667,45 +667,33 @@ 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) +library(laminr.api) 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) +library(laminr.api) 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) +library(laminr.api) 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) @@ -714,15 +702,11 @@ 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) +library(laminr.api) var_instance_id <- "instance_id_example" # character | var_schema_id <- "schema_id_example" # character | var_authorization <- "authorization_example" # character | (Optional) @@ -730,15 +714,11 @@ 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) +library(laminr.api) var_instance_id <- "instance_id_example" # character | var_module_name <- "module_name_example" # character | var_model_name <- "model_name_example" # character | @@ -752,15 +732,11 @@ var_get_record_request_body <- GetRecordRequestBody$new(c("select_example")) # G #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) +library(laminr.api) var_instance_id <- "instance_id_example" # character | var_module_name <- "module_name_example" # character | var_model_name <- "model_name_example" # character | @@ -775,15 +751,11 @@ var_get_records_request_body <- GetRecordsRequestBody$new(c("select_example"), 1 #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) +library(laminr.api) var_module_name <- "module_name_example" # character | var_model_name <- "model_name_example" # character | var_instance_id <- "instance_id_example" # character | @@ -792,30 +764,22 @@ 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) +library(laminr.api) 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) +library(laminr.api) var_instance_id <- "instance_id_example" # character | var_module_name <- "module_name_example" # character | var_model_name <- "model_name_example" # character | @@ -829,15 +793,11 @@ var_get_values_request_body <- GetValuesRequestBody$new(123, c(OrderByColumn$new #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) +library(laminr.api) 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) @@ -847,15 +807,11 @@ 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) +library(laminr.api) var_instance_id <- "instance_id_example" # character | var_module_name <- "module_name_example" # character | var_model_name <- "model_name_example" # character | @@ -866,15 +822,11 @@ 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) +library(laminr.api) var_instance_id <- "instance_id_example" # character | var_handle <- "handle_example" # character | var_schema_id <- "schema_id_example" # character | @@ -883,15 +835,11 @@ 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) +library(laminr.api) var_instance_id <- "instance_id_example" # character | var_account_id <- "account_id_example" # character | var_role <- "role_example" # character | @@ -900,15 +848,11 @@ 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) +library(laminr.api) var_instance_id <- "instance_id_example" # character | var_module_name <- "module_name_example" # character | var_model_name <- "model_name_example" # character | @@ -920,10 +864,6 @@ 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) } diff --git a/man/laminr.api-package.Rd b/man/laminr.api-package.Rd new file mode 100644 index 0000000..f7452b2 --- /dev/null +++ b/man/laminr.api-package.Rd @@ -0,0 +1,28 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/laminr.api-package.R +\docType{package} +\name{laminr.api-package} +\alias{laminr.api} +\alias{laminr.api-package} +\title{laminr.api: R Package Client for the Lamin API} +\description{ +Client package for accessing the Lamin API. Most content is generated by the Openapi Generator https://github.com/openapitools/openapi-generator. +} +\seealso{ +Useful links: +\itemize{ + \item \url{https://github.com/data-intuitive/laminr.api} + \item Report bugs at \url{https://github.com/data-intuitive/laminr.api/issues} +} + +} +\author{ +\strong{Maintainer}: Robrecht Cannoodt \email{rcannood@gmail.com} (\href{https://orcid.org/0000-0003-3641-729X}{ORCID}) (rcannood) + +Authors: +\itemize{ + \item Luke Zappia \email{luke@data-intuitive.com} (\href{https://orcid.org/0000-0001-7744-8565}{ORCID}) (lazappi) +} + +} +\keyword{internal} diff --git a/tests/testthat.R b/tests/testthat.R index b343a74..90d6236 100644 --- a/tests/testthat.R +++ b/tests/testthat.R @@ -1,4 +1,4 @@ library(testthat) -library(openapi) +library(laminr.api) -test_check("openapi") +test_check("laminr.api") diff --git a/update_package.sh b/update_package.sh new file mode 100755 index 0000000..4e0141b --- /dev/null +++ b/update_package.sh @@ -0,0 +1,41 @@ +#!/bin/sh + +generator_jar=${OPENAI_GENERATOR_PATH:-} + +# check whether 'openapi-generator-cli' is available +if command -v openapi-generator-cli &> /dev/null; then + CMD=openapi-generator-cli +elif [ ! -z "${generator_jar}" ]; then + CMD="java -Dcolor -jar $generator_jar" +else + echo "openapi-generator-cli is not available!" + echo "Please install it or set OPENAI_GENERATOR_PATH to the path of the openapi-generator-cli.jar file." + exit 1 +fi + +api_spec=https://us-west-2.api.lamin.ai/openapi.json +pkg_name=laminr.api +pkg_ver=$(curl $api_spec | jq -r '.info.version') + +echo "Generating R client package using OpenAI Generator..." +echo "Generator JAR: $generator_jar" +echo "API Spec: $api_spec" +echo "Package Name: $pkg_name" +echo "Package Version: $pkg_ver" +eval $CMD generate \ + -g r \ + --input-spec $api_spec \ + --output . \ + --package-name $pkg_name \ + --additional-properties=packageName=$pkg_name,packageVersion=$pkg_ver,exceptionPackage=rlang + +# Hack to fix the auto-generated documentation so that checks pass +sed -i 's/\[\*\*AnyType\*\*\](AnyType\.md)/AnyType/g' docs/DefaultApi.md +sed -i 's/\\link{AnyType}/AnyType/g' R/default_api.R + +echo "Documenting package..." +Rscript -e "devtools::document()" + +echo +echo "NEXT STEPS:" +echo "Copy updated documentation to 'README.qmd' and run 'quarto render README.qmd'"