William Cheng d810d7c534
R echo client tests (#17629)
* add r echo api client sample

* add r workflow

* fix

* add env

* set r version

* install curl

* install dep

* fix

* comment out installation
2024-01-18 09:05:35 +08:00

1052 lines
42 KiB
R

#' Echo Server API
#'
#' Echo Server API
#'
#' The version of the OpenAPI document: 0.1.0
#' Contact: team@openapitools.org
#' Generated by: https://openapi-generator.tech
#'
#' @docType class
#' @title Query operations
#' @description QueryApi
#' @format An \code{R6Class} generator object
#' @field api_client Handles the client-server communication.
#'
#' @section Methods:
#' \describe{
#' \strong{ TestEnumRefString } \emph{ Test query parameter(s) }
#' Test query parameter(s)
#'
#' \itemize{
#' \item \emph{ @param } enum_nonref_string_query Enum < [success, failure, unclassified] >
#' \item \emph{ @param } enum_ref_string_query \link{StringEnumRef}
#'
#'
#' \item status code : 200 | Successful operation
#'
#' \item return type : character
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ TestQueryDatetimeDateString } \emph{ Test query parameter(s) }
#' Test query parameter(s)
#'
#' \itemize{
#' \item \emph{ @param } datetime_query character
#' \item \emph{ @param } date_query character
#' \item \emph{ @param } string_query character
#'
#'
#' \item status code : 200 | Successful operation
#'
#' \item return type : character
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ TestQueryIntegerBooleanString } \emph{ Test query parameter(s) }
#' Test query parameter(s)
#'
#' \itemize{
#' \item \emph{ @param } integer_query integer
#' \item \emph{ @param } boolean_query character
#' \item \emph{ @param } string_query character
#'
#'
#' \item status code : 200 | Successful operation
#'
#' \item return type : character
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ TestQueryStyleDeepObjectExplodeTrueObject } \emph{ Test query parameter(s) }
#' Test query parameter(s)
#'
#' \itemize{
#' \item \emph{ @param } query_object \link{Pet}
#'
#'
#' \item status code : 200 | Successful operation
#'
#' \item return type : character
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ TestQueryStyleDeepObjectExplodeTrueObjectAllOf } \emph{ Test query parameter(s) }
#' Test query parameter(s)
#'
#' \itemize{
#' \item \emph{ @param } query_object \link{TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter}
#'
#'
#' \item status code : 200 | Successful operation
#'
#' \item return type : character
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ TestQueryStyleFormExplodeTrueArrayString } \emph{ Test query parameter(s) }
#' Test query parameter(s)
#'
#' \itemize{
#' \item \emph{ @param } query_object \link{TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter}
#'
#'
#' \item status code : 200 | Successful operation
#'
#' \item return type : character
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ TestQueryStyleFormExplodeTrueObject } \emph{ Test query parameter(s) }
#' Test query parameter(s)
#'
#' \itemize{
#' \item \emph{ @param } query_object \link{Pet}
#'
#'
#' \item status code : 200 | Successful operation
#'
#' \item return type : character
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ TestQueryStyleFormExplodeTrueObjectAllOf } \emph{ Test query parameter(s) }
#' Test query parameter(s)
#'
#' \itemize{
#' \item \emph{ @param } query_object \link{DataQuery}
#'
#'
#' \item status code : 200 | Successful operation
#'
#' \item return type : character
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' }
#'
#'
#' @examples
#' \dontrun{
#' #################### TestEnumRefString ####################
#'
#' library(openapi)
#' var_enum_nonref_string_query <- "enum_nonref_string_query_example" # character | (Optional)
#' var_enum_ref_string_query <- StringEnumRef$new() # StringEnumRef | (Optional)
#'
#' #Test query parameter(s)
#' api_instance <- QueryApi$new()
#'
#' # to save the result into a file, simply add the optional `data_file` parameter, e.g.
#' # result <- api_instance$TestEnumRefString(enum_nonref_string_query = var_enum_nonref_string_query, enum_ref_string_query = var_enum_ref_string_querydata_file = "result.txt")
#' result <- api_instance$TestEnumRefString(enum_nonref_string_query = var_enum_nonref_string_query, enum_ref_string_query = var_enum_ref_string_query)
#' dput(result)
#'
#'
#' #################### TestQueryDatetimeDateString ####################
#'
#' library(openapi)
#' var_datetime_query <- "datetime_query_example" # character | (Optional)
#' var_date_query <- "date_query_example" # character | (Optional)
#' var_string_query <- "string_query_example" # character | (Optional)
#'
#' #Test query parameter(s)
#' api_instance <- QueryApi$new()
#'
#' # to save the result into a file, simply add the optional `data_file` parameter, e.g.
#' # result <- api_instance$TestQueryDatetimeDateString(datetime_query = var_datetime_query, date_query = var_date_query, string_query = var_string_querydata_file = "result.txt")
#' result <- api_instance$TestQueryDatetimeDateString(datetime_query = var_datetime_query, date_query = var_date_query, string_query = var_string_query)
#' dput(result)
#'
#'
#' #################### TestQueryIntegerBooleanString ####################
#'
#' library(openapi)
#' var_integer_query <- 56 # integer | (Optional)
#' var_boolean_query <- "boolean_query_example" # character | (Optional)
#' var_string_query <- "string_query_example" # character | (Optional)
#'
#' #Test query parameter(s)
#' api_instance <- QueryApi$new()
#'
#' # to save the result into a file, simply add the optional `data_file` parameter, e.g.
#' # result <- api_instance$TestQueryIntegerBooleanString(integer_query = var_integer_query, boolean_query = var_boolean_query, string_query = var_string_querydata_file = "result.txt")
#' result <- api_instance$TestQueryIntegerBooleanString(integer_query = var_integer_query, boolean_query = var_boolean_query, string_query = var_string_query)
#' dput(result)
#'
#'
#' #################### TestQueryStyleDeepObjectExplodeTrueObject ####################
#'
#' library(openapi)
#' var_query_object <- Pet$new("name_example", c("photoUrls_example"), 123, Category$new(123, "name_example"), c(Tag$new(123, "name_example")), "available") # Pet | (Optional)
#'
#' #Test query parameter(s)
#' api_instance <- QueryApi$new()
#'
#' # to save the result into a file, simply add the optional `data_file` parameter, e.g.
#' # result <- api_instance$TestQueryStyleDeepObjectExplodeTrueObject(query_object = var_query_objectdata_file = "result.txt")
#' result <- api_instance$TestQueryStyleDeepObjectExplodeTrueObject(query_object = var_query_object)
#' dput(result)
#'
#'
#' #################### TestQueryStyleDeepObjectExplodeTrueObjectAllOf ####################
#'
#' library(openapi)
#' var_query_object <- test_query_style_deepObject_explode_true_object_allOf_query_object_parameter$new("size_example", "color_example", 123, "name_example") # TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter | (Optional)
#'
#' #Test query parameter(s)
#' api_instance <- QueryApi$new()
#'
#' # to save the result into a file, simply add the optional `data_file` parameter, e.g.
#' # result <- api_instance$TestQueryStyleDeepObjectExplodeTrueObjectAllOf(query_object = var_query_objectdata_file = "result.txt")
#' result <- api_instance$TestQueryStyleDeepObjectExplodeTrueObjectAllOf(query_object = var_query_object)
#' dput(result)
#'
#'
#' #################### TestQueryStyleFormExplodeTrueArrayString ####################
#'
#' library(openapi)
#' var_query_object <- test_query_style_form_explode_true_array_string_query_object_parameter$new(c("values_example")) # TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter | (Optional)
#'
#' #Test query parameter(s)
#' api_instance <- QueryApi$new()
#'
#' # to save the result into a file, simply add the optional `data_file` parameter, e.g.
#' # result <- api_instance$TestQueryStyleFormExplodeTrueArrayString(query_object = var_query_objectdata_file = "result.txt")
#' result <- api_instance$TestQueryStyleFormExplodeTrueArrayString(query_object = var_query_object)
#' dput(result)
#'
#'
#' #################### TestQueryStyleFormExplodeTrueObject ####################
#'
#' library(openapi)
#' var_query_object <- Pet$new("name_example", c("photoUrls_example"), 123, Category$new(123, "name_example"), c(Tag$new(123, "name_example")), "available") # Pet | (Optional)
#'
#' #Test query parameter(s)
#' api_instance <- QueryApi$new()
#'
#' # to save the result into a file, simply add the optional `data_file` parameter, e.g.
#' # result <- api_instance$TestQueryStyleFormExplodeTrueObject(query_object = var_query_objectdata_file = "result.txt")
#' result <- api_instance$TestQueryStyleFormExplodeTrueObject(query_object = var_query_object)
#' dput(result)
#'
#'
#' #################### TestQueryStyleFormExplodeTrueObjectAllOf ####################
#'
#' library(openapi)
#' var_query_object <- DataQuery$new(123, c("SUCCESS"), "suffix_example", "text_example", "date_example") # DataQuery | (Optional)
#'
#' #Test query parameter(s)
#' api_instance <- QueryApi$new()
#'
#' # to save the result into a file, simply add the optional `data_file` parameter, e.g.
#' # result <- api_instance$TestQueryStyleFormExplodeTrueObjectAllOf(query_object = var_query_objectdata_file = "result.txt")
#' result <- api_instance$TestQueryStyleFormExplodeTrueObjectAllOf(query_object = var_query_object)
#' dput(result)
#'
#'
#' }
#' @importFrom R6 R6Class
#' @importFrom base64enc base64encode
#' @export
QueryApi <- R6::R6Class(
"QueryApi",
public = list(
api_client = NULL,
#' Initialize a new QueryApi.
#'
#' @description
#' Initialize a new QueryApi.
#'
#' @param api_client An instance of API client.
#' @export
initialize = function(api_client) {
if (!missing(api_client)) {
self$api_client <- api_client
} else {
self$api_client <- ApiClient$new()
}
},
#' Test query parameter(s)
#'
#' @description
#' Test query parameter(s)
#'
#' @param enum_nonref_string_query (optional) No description
#' @param enum_ref_string_query (optional) No description
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return character
#' @export
TestEnumRefString = function(enum_nonref_string_query = NULL, enum_ref_string_query = NULL, data_file = NULL, ...) {
local_var_response <- self$TestEnumRefStringWithHttpInfo(enum_nonref_string_query, enum_ref_string_query, data_file = data_file, ...)
if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) {
local_var_response$content
} else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) {
local_var_response
} else if (local_var_response$status_code >= 400 && local_var_response$status_code <= 499) {
local_var_response
} else if (local_var_response$status_code >= 500 && local_var_response$status_code <= 599) {
local_var_response
}
},
#' Test query parameter(s)
#'
#' @description
#' Test query parameter(s)
#'
#' @param enum_nonref_string_query (optional) No description
#' @param enum_ref_string_query (optional) No description
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return API response (character) with additional information such as HTTP status code, headers
#' @export
TestEnumRefStringWithHttpInfo = function(enum_nonref_string_query = NULL, enum_ref_string_query = NULL, data_file = NULL, ...) {
args <- list(...)
query_params <- list()
header_params <- c()
form_params <- list()
file_params <- list()
local_var_body <- NULL
oauth_scopes <- NULL
is_oauth <- FALSE
if (!(`enum_nonref_string_query` %in% c("success", "failure", "unclassified"))) {
stop("Invalid value for enum_nonref_string_query when calling QueryApi$TestEnumRefString. Must be [success, failure, unclassified].")
}
query_params[["enum_nonref_string_query"]] <- `enum_nonref_string_query`
query_params[["enum_ref_string_query"]] <- `enum_ref_string_query`
local_var_url_path <- "/query/enum_ref_string"
# The Accept request HTTP header
local_var_accepts <- list("text/plain")
# The Content-Type representation header
local_var_content_types <- list()
local_var_resp <- self$api_client$CallApi(url = paste0(self$api_client$base_path, local_var_url_path),
method = "GET",
query_params = query_params,
header_params = header_params,
form_params = form_params,
file_params = file_params,
accepts = local_var_accepts,
content_types = local_var_content_types,
body = local_var_body,
is_oauth = is_oauth,
oauth_scopes = oauth_scopes,
...)
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
# save response in a file
if (!is.null(data_file)) {
write(local_var_resp$response, data_file)
}
deserialized_resp_obj <- tryCatch(
self$api_client$deserialize(local_var_resp$response, "character", loadNamespace("openapi")),
error = function(e) {
stop("Failed to deserialize response")
}
)
local_var_resp$content <- deserialized_resp_obj
local_var_resp
} else if (local_var_resp$status_code >= 300 && local_var_resp$status_code <= 399) {
ApiResponse$new(paste("Server returned ", local_var_resp$status_code, " response status code."), local_var_resp)
} else if (local_var_resp$status_code >= 400 && local_var_resp$status_code <= 499) {
ApiResponse$new("API client error", local_var_resp)
} else if (local_var_resp$status_code >= 500 && local_var_resp$status_code <= 599) {
if (is.null(local_var_resp$response) || local_var_resp$response == "") {
local_var_resp$response <- "API server error"
}
local_var_resp
}
},
#' Test query parameter(s)
#'
#' @description
#' Test query parameter(s)
#'
#' @param datetime_query (optional) No description
#' @param date_query (optional) No description
#' @param string_query (optional) No description
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return character
#' @export
TestQueryDatetimeDateString = function(datetime_query = NULL, date_query = NULL, string_query = NULL, data_file = NULL, ...) {
local_var_response <- self$TestQueryDatetimeDateStringWithHttpInfo(datetime_query, date_query, string_query, data_file = data_file, ...)
if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) {
local_var_response$content
} else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) {
local_var_response
} else if (local_var_response$status_code >= 400 && local_var_response$status_code <= 499) {
local_var_response
} else if (local_var_response$status_code >= 500 && local_var_response$status_code <= 599) {
local_var_response
}
},
#' Test query parameter(s)
#'
#' @description
#' Test query parameter(s)
#'
#' @param datetime_query (optional) No description
#' @param date_query (optional) No description
#' @param string_query (optional) No description
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return API response (character) with additional information such as HTTP status code, headers
#' @export
TestQueryDatetimeDateStringWithHttpInfo = function(datetime_query = NULL, date_query = NULL, string_query = NULL, data_file = NULL, ...) {
args <- list(...)
query_params <- list()
header_params <- c()
form_params <- list()
file_params <- list()
local_var_body <- NULL
oauth_scopes <- NULL
is_oauth <- FALSE
query_params[["datetime_query"]] <- `datetime_query`
query_params[["date_query"]] <- `date_query`
query_params[["string_query"]] <- `string_query`
local_var_url_path <- "/query/datetime/date/string"
# The Accept request HTTP header
local_var_accepts <- list("text/plain")
# The Content-Type representation header
local_var_content_types <- list()
local_var_resp <- self$api_client$CallApi(url = paste0(self$api_client$base_path, local_var_url_path),
method = "GET",
query_params = query_params,
header_params = header_params,
form_params = form_params,
file_params = file_params,
accepts = local_var_accepts,
content_types = local_var_content_types,
body = local_var_body,
is_oauth = is_oauth,
oauth_scopes = oauth_scopes,
...)
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
# save response in a file
if (!is.null(data_file)) {
write(local_var_resp$response, data_file)
}
deserialized_resp_obj <- tryCatch(
self$api_client$deserialize(local_var_resp$response, "character", loadNamespace("openapi")),
error = function(e) {
stop("Failed to deserialize response")
}
)
local_var_resp$content <- deserialized_resp_obj
local_var_resp
} else if (local_var_resp$status_code >= 300 && local_var_resp$status_code <= 399) {
ApiResponse$new(paste("Server returned ", local_var_resp$status_code, " response status code."), local_var_resp)
} else if (local_var_resp$status_code >= 400 && local_var_resp$status_code <= 499) {
ApiResponse$new("API client error", local_var_resp)
} else if (local_var_resp$status_code >= 500 && local_var_resp$status_code <= 599) {
if (is.null(local_var_resp$response) || local_var_resp$response == "") {
local_var_resp$response <- "API server error"
}
local_var_resp
}
},
#' Test query parameter(s)
#'
#' @description
#' Test query parameter(s)
#'
#' @param integer_query (optional) No description
#' @param boolean_query (optional) No description
#' @param string_query (optional) No description
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return character
#' @export
TestQueryIntegerBooleanString = function(integer_query = NULL, boolean_query = NULL, string_query = NULL, data_file = NULL, ...) {
local_var_response <- self$TestQueryIntegerBooleanStringWithHttpInfo(integer_query, boolean_query, string_query, data_file = data_file, ...)
if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) {
local_var_response$content
} else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) {
local_var_response
} else if (local_var_response$status_code >= 400 && local_var_response$status_code <= 499) {
local_var_response
} else if (local_var_response$status_code >= 500 && local_var_response$status_code <= 599) {
local_var_response
}
},
#' Test query parameter(s)
#'
#' @description
#' Test query parameter(s)
#'
#' @param integer_query (optional) No description
#' @param boolean_query (optional) No description
#' @param string_query (optional) No description
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return API response (character) with additional information such as HTTP status code, headers
#' @export
TestQueryIntegerBooleanStringWithHttpInfo = function(integer_query = NULL, boolean_query = NULL, string_query = NULL, data_file = NULL, ...) {
args <- list(...)
query_params <- list()
header_params <- c()
form_params <- list()
file_params <- list()
local_var_body <- NULL
oauth_scopes <- NULL
is_oauth <- FALSE
query_params[["integer_query"]] <- `integer_query`
query_params[["boolean_query"]] <- `boolean_query`
query_params[["string_query"]] <- `string_query`
local_var_url_path <- "/query/integer/boolean/string"
# The Accept request HTTP header
local_var_accepts <- list("text/plain")
# The Content-Type representation header
local_var_content_types <- list()
local_var_resp <- self$api_client$CallApi(url = paste0(self$api_client$base_path, local_var_url_path),
method = "GET",
query_params = query_params,
header_params = header_params,
form_params = form_params,
file_params = file_params,
accepts = local_var_accepts,
content_types = local_var_content_types,
body = local_var_body,
is_oauth = is_oauth,
oauth_scopes = oauth_scopes,
...)
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
# save response in a file
if (!is.null(data_file)) {
write(local_var_resp$response, data_file)
}
deserialized_resp_obj <- tryCatch(
self$api_client$deserialize(local_var_resp$response, "character", loadNamespace("openapi")),
error = function(e) {
stop("Failed to deserialize response")
}
)
local_var_resp$content <- deserialized_resp_obj
local_var_resp
} else if (local_var_resp$status_code >= 300 && local_var_resp$status_code <= 399) {
ApiResponse$new(paste("Server returned ", local_var_resp$status_code, " response status code."), local_var_resp)
} else if (local_var_resp$status_code >= 400 && local_var_resp$status_code <= 499) {
ApiResponse$new("API client error", local_var_resp)
} else if (local_var_resp$status_code >= 500 && local_var_resp$status_code <= 599) {
if (is.null(local_var_resp$response) || local_var_resp$response == "") {
local_var_resp$response <- "API server error"
}
local_var_resp
}
},
#' Test query parameter(s)
#'
#' @description
#' Test query parameter(s)
#'
#' @param query_object (optional) No description
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return character
#' @export
TestQueryStyleDeepObjectExplodeTrueObject = function(query_object = NULL, data_file = NULL, ...) {
local_var_response <- self$TestQueryStyleDeepObjectExplodeTrueObjectWithHttpInfo(query_object, data_file = data_file, ...)
if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) {
local_var_response$content
} else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) {
local_var_response
} else if (local_var_response$status_code >= 400 && local_var_response$status_code <= 499) {
local_var_response
} else if (local_var_response$status_code >= 500 && local_var_response$status_code <= 599) {
local_var_response
}
},
#' Test query parameter(s)
#'
#' @description
#' Test query parameter(s)
#'
#' @param query_object (optional) No description
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return API response (character) with additional information such as HTTP status code, headers
#' @export
TestQueryStyleDeepObjectExplodeTrueObjectWithHttpInfo = function(query_object = NULL, data_file = NULL, ...) {
args <- list(...)
query_params <- list()
header_params <- c()
form_params <- list()
file_params <- list()
local_var_body <- NULL
oauth_scopes <- NULL
is_oauth <- FALSE
query_params[["query_object"]] <- `query_object`
local_var_url_path <- "/query/style_deepObject/explode_true/object"
# The Accept request HTTP header
local_var_accepts <- list("text/plain")
# The Content-Type representation header
local_var_content_types <- list()
local_var_resp <- self$api_client$CallApi(url = paste0(self$api_client$base_path, local_var_url_path),
method = "GET",
query_params = query_params,
header_params = header_params,
form_params = form_params,
file_params = file_params,
accepts = local_var_accepts,
content_types = local_var_content_types,
body = local_var_body,
is_oauth = is_oauth,
oauth_scopes = oauth_scopes,
...)
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
# save response in a file
if (!is.null(data_file)) {
write(local_var_resp$response, data_file)
}
deserialized_resp_obj <- tryCatch(
self$api_client$deserialize(local_var_resp$response, "character", loadNamespace("openapi")),
error = function(e) {
stop("Failed to deserialize response")
}
)
local_var_resp$content <- deserialized_resp_obj
local_var_resp
} else if (local_var_resp$status_code >= 300 && local_var_resp$status_code <= 399) {
ApiResponse$new(paste("Server returned ", local_var_resp$status_code, " response status code."), local_var_resp)
} else if (local_var_resp$status_code >= 400 && local_var_resp$status_code <= 499) {
ApiResponse$new("API client error", local_var_resp)
} else if (local_var_resp$status_code >= 500 && local_var_resp$status_code <= 599) {
if (is.null(local_var_resp$response) || local_var_resp$response == "") {
local_var_resp$response <- "API server error"
}
local_var_resp
}
},
#' Test query parameter(s)
#'
#' @description
#' Test query parameter(s)
#'
#' @param query_object (optional) No description
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return character
#' @export
TestQueryStyleDeepObjectExplodeTrueObjectAllOf = function(query_object = NULL, data_file = NULL, ...) {
local_var_response <- self$TestQueryStyleDeepObjectExplodeTrueObjectAllOfWithHttpInfo(query_object, data_file = data_file, ...)
if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) {
local_var_response$content
} else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) {
local_var_response
} else if (local_var_response$status_code >= 400 && local_var_response$status_code <= 499) {
local_var_response
} else if (local_var_response$status_code >= 500 && local_var_response$status_code <= 599) {
local_var_response
}
},
#' Test query parameter(s)
#'
#' @description
#' Test query parameter(s)
#'
#' @param query_object (optional) No description
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return API response (character) with additional information such as HTTP status code, headers
#' @export
TestQueryStyleDeepObjectExplodeTrueObjectAllOfWithHttpInfo = function(query_object = NULL, data_file = NULL, ...) {
args <- list(...)
query_params <- list()
header_params <- c()
form_params <- list()
file_params <- list()
local_var_body <- NULL
oauth_scopes <- NULL
is_oauth <- FALSE
query_params[["query_object"]] <- `query_object`
local_var_url_path <- "/query/style_deepObject/explode_true/object/allOf"
# The Accept request HTTP header
local_var_accepts <- list("text/plain")
# The Content-Type representation header
local_var_content_types <- list()
local_var_resp <- self$api_client$CallApi(url = paste0(self$api_client$base_path, local_var_url_path),
method = "GET",
query_params = query_params,
header_params = header_params,
form_params = form_params,
file_params = file_params,
accepts = local_var_accepts,
content_types = local_var_content_types,
body = local_var_body,
is_oauth = is_oauth,
oauth_scopes = oauth_scopes,
...)
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
# save response in a file
if (!is.null(data_file)) {
write(local_var_resp$response, data_file)
}
deserialized_resp_obj <- tryCatch(
self$api_client$deserialize(local_var_resp$response, "character", loadNamespace("openapi")),
error = function(e) {
stop("Failed to deserialize response")
}
)
local_var_resp$content <- deserialized_resp_obj
local_var_resp
} else if (local_var_resp$status_code >= 300 && local_var_resp$status_code <= 399) {
ApiResponse$new(paste("Server returned ", local_var_resp$status_code, " response status code."), local_var_resp)
} else if (local_var_resp$status_code >= 400 && local_var_resp$status_code <= 499) {
ApiResponse$new("API client error", local_var_resp)
} else if (local_var_resp$status_code >= 500 && local_var_resp$status_code <= 599) {
if (is.null(local_var_resp$response) || local_var_resp$response == "") {
local_var_resp$response <- "API server error"
}
local_var_resp
}
},
#' Test query parameter(s)
#'
#' @description
#' Test query parameter(s)
#'
#' @param query_object (optional) No description
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return character
#' @export
TestQueryStyleFormExplodeTrueArrayString = function(query_object = NULL, data_file = NULL, ...) {
local_var_response <- self$TestQueryStyleFormExplodeTrueArrayStringWithHttpInfo(query_object, data_file = data_file, ...)
if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) {
local_var_response$content
} else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) {
local_var_response
} else if (local_var_response$status_code >= 400 && local_var_response$status_code <= 499) {
local_var_response
} else if (local_var_response$status_code >= 500 && local_var_response$status_code <= 599) {
local_var_response
}
},
#' Test query parameter(s)
#'
#' @description
#' Test query parameter(s)
#'
#' @param query_object (optional) No description
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return API response (character) with additional information such as HTTP status code, headers
#' @export
TestQueryStyleFormExplodeTrueArrayStringWithHttpInfo = function(query_object = NULL, data_file = NULL, ...) {
args <- list(...)
query_params <- list()
header_params <- c()
form_params <- list()
file_params <- list()
local_var_body <- NULL
oauth_scopes <- NULL
is_oauth <- FALSE
query_params[["query_object"]] <- `query_object`
local_var_url_path <- "/query/style_form/explode_true/array_string"
# The Accept request HTTP header
local_var_accepts <- list("text/plain")
# The Content-Type representation header
local_var_content_types <- list()
local_var_resp <- self$api_client$CallApi(url = paste0(self$api_client$base_path, local_var_url_path),
method = "GET",
query_params = query_params,
header_params = header_params,
form_params = form_params,
file_params = file_params,
accepts = local_var_accepts,
content_types = local_var_content_types,
body = local_var_body,
is_oauth = is_oauth,
oauth_scopes = oauth_scopes,
...)
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
# save response in a file
if (!is.null(data_file)) {
write(local_var_resp$response, data_file)
}
deserialized_resp_obj <- tryCatch(
self$api_client$deserialize(local_var_resp$response, "character", loadNamespace("openapi")),
error = function(e) {
stop("Failed to deserialize response")
}
)
local_var_resp$content <- deserialized_resp_obj
local_var_resp
} else if (local_var_resp$status_code >= 300 && local_var_resp$status_code <= 399) {
ApiResponse$new(paste("Server returned ", local_var_resp$status_code, " response status code."), local_var_resp)
} else if (local_var_resp$status_code >= 400 && local_var_resp$status_code <= 499) {
ApiResponse$new("API client error", local_var_resp)
} else if (local_var_resp$status_code >= 500 && local_var_resp$status_code <= 599) {
if (is.null(local_var_resp$response) || local_var_resp$response == "") {
local_var_resp$response <- "API server error"
}
local_var_resp
}
},
#' Test query parameter(s)
#'
#' @description
#' Test query parameter(s)
#'
#' @param query_object (optional) No description
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return character
#' @export
TestQueryStyleFormExplodeTrueObject = function(query_object = NULL, data_file = NULL, ...) {
local_var_response <- self$TestQueryStyleFormExplodeTrueObjectWithHttpInfo(query_object, data_file = data_file, ...)
if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) {
local_var_response$content
} else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) {
local_var_response
} else if (local_var_response$status_code >= 400 && local_var_response$status_code <= 499) {
local_var_response
} else if (local_var_response$status_code >= 500 && local_var_response$status_code <= 599) {
local_var_response
}
},
#' Test query parameter(s)
#'
#' @description
#' Test query parameter(s)
#'
#' @param query_object (optional) No description
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return API response (character) with additional information such as HTTP status code, headers
#' @export
TestQueryStyleFormExplodeTrueObjectWithHttpInfo = function(query_object = NULL, data_file = NULL, ...) {
args <- list(...)
query_params <- list()
header_params <- c()
form_params <- list()
file_params <- list()
local_var_body <- NULL
oauth_scopes <- NULL
is_oauth <- FALSE
query_params[["query_object"]] <- `query_object`
local_var_url_path <- "/query/style_form/explode_true/object"
# The Accept request HTTP header
local_var_accepts <- list("text/plain")
# The Content-Type representation header
local_var_content_types <- list()
local_var_resp <- self$api_client$CallApi(url = paste0(self$api_client$base_path, local_var_url_path),
method = "GET",
query_params = query_params,
header_params = header_params,
form_params = form_params,
file_params = file_params,
accepts = local_var_accepts,
content_types = local_var_content_types,
body = local_var_body,
is_oauth = is_oauth,
oauth_scopes = oauth_scopes,
...)
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
# save response in a file
if (!is.null(data_file)) {
write(local_var_resp$response, data_file)
}
deserialized_resp_obj <- tryCatch(
self$api_client$deserialize(local_var_resp$response, "character", loadNamespace("openapi")),
error = function(e) {
stop("Failed to deserialize response")
}
)
local_var_resp$content <- deserialized_resp_obj
local_var_resp
} else if (local_var_resp$status_code >= 300 && local_var_resp$status_code <= 399) {
ApiResponse$new(paste("Server returned ", local_var_resp$status_code, " response status code."), local_var_resp)
} else if (local_var_resp$status_code >= 400 && local_var_resp$status_code <= 499) {
ApiResponse$new("API client error", local_var_resp)
} else if (local_var_resp$status_code >= 500 && local_var_resp$status_code <= 599) {
if (is.null(local_var_resp$response) || local_var_resp$response == "") {
local_var_resp$response <- "API server error"
}
local_var_resp
}
},
#' Test query parameter(s)
#'
#' @description
#' Test query parameter(s)
#'
#' @param query_object (optional) No description
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return character
#' @export
TestQueryStyleFormExplodeTrueObjectAllOf = function(query_object = NULL, data_file = NULL, ...) {
local_var_response <- self$TestQueryStyleFormExplodeTrueObjectAllOfWithHttpInfo(query_object, data_file = data_file, ...)
if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) {
local_var_response$content
} else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) {
local_var_response
} else if (local_var_response$status_code >= 400 && local_var_response$status_code <= 499) {
local_var_response
} else if (local_var_response$status_code >= 500 && local_var_response$status_code <= 599) {
local_var_response
}
},
#' Test query parameter(s)
#'
#' @description
#' Test query parameter(s)
#'
#' @param query_object (optional) No description
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return API response (character) with additional information such as HTTP status code, headers
#' @export
TestQueryStyleFormExplodeTrueObjectAllOfWithHttpInfo = function(query_object = NULL, data_file = NULL, ...) {
args <- list(...)
query_params <- list()
header_params <- c()
form_params <- list()
file_params <- list()
local_var_body <- NULL
oauth_scopes <- NULL
is_oauth <- FALSE
query_params[["query_object"]] <- `query_object`
local_var_url_path <- "/query/style_form/explode_true/object/allOf"
# The Accept request HTTP header
local_var_accepts <- list("text/plain")
# The Content-Type representation header
local_var_content_types <- list()
local_var_resp <- self$api_client$CallApi(url = paste0(self$api_client$base_path, local_var_url_path),
method = "GET",
query_params = query_params,
header_params = header_params,
form_params = form_params,
file_params = file_params,
accepts = local_var_accepts,
content_types = local_var_content_types,
body = local_var_body,
is_oauth = is_oauth,
oauth_scopes = oauth_scopes,
...)
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
# save response in a file
if (!is.null(data_file)) {
write(local_var_resp$response, data_file)
}
deserialized_resp_obj <- tryCatch(
self$api_client$deserialize(local_var_resp$response, "character", loadNamespace("openapi")),
error = function(e) {
stop("Failed to deserialize response")
}
)
local_var_resp$content <- deserialized_resp_obj
local_var_resp
} else if (local_var_resp$status_code >= 300 && local_var_resp$status_code <= 399) {
ApiResponse$new(paste("Server returned ", local_var_resp$status_code, " response status code."), local_var_resp)
} else if (local_var_resp$status_code >= 400 && local_var_resp$status_code <= 499) {
ApiResponse$new("API client error", local_var_resp)
} else if (local_var_resp$status_code >= 500 && local_var_resp$status_code <= 599) {
if (is.null(local_var_resp$response) || local_var_resp$response == "") {
local_var_resp$response <- "API server error"
}
local_var_resp
}
}
)
)