#' Synapse REST API
#'
#' No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
#'
#' The version of the OpenAPI document: v1
#' Generated by: https://openapi-generator.tech
#'
#' @docType class
#' @title FormServices operations
#' @description FormServicesApi
#' @format An \code{R6Class} generator object
#' @field api_client Handles the client-server communication.
#'
#' @section Methods:
#' \describe{
#' \strong{ DeleteRepoV1FormDataId } \emph{ }
#'
#' \itemize{
#' \item \emph{ @param } id character
#'
#'
#' \item status code : 200 | Void
#'
#'
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ GetRepoV1FormGroupId } \emph{ }
#'
#' \itemize{
#' \item \emph{ @param } id character
#' \item \emph{ @returnType } \link{OrgSagebionetworksRepoModelFormFormGroup} \cr
#'
#'
#' \item status code : 200 | Auto-generated description
#'
#' \item return type : OrgSagebionetworksRepoModelFormFormGroup
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ GetRepoV1FormGroupIdAcl } \emph{ }
#'
#' \itemize{
#' \item \emph{ @param } id character
#' \item \emph{ @returnType } \link{OrgSagebionetworksRepoModelAccessControlList} \cr
#'
#'
#' \item status code : 200 | Auto-generated description
#'
#' \item return type : OrgSagebionetworksRepoModelAccessControlList
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ PostRepoV1FormData } \emph{ }
#'
#' \itemize{
#' \item \emph{ @param } group_id character
#' \item \emph{ @param } org_sagebionetworks_repo_model_form_form_change_request \link{OrgSagebionetworksRepoModelFormFormChangeRequest}
#' \item \emph{ @returnType } \link{OrgSagebionetworksRepoModelFormFormData} \cr
#'
#'
#' \item status code : 201 | Auto-generated description
#'
#' \item return type : OrgSagebionetworksRepoModelFormFormData
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ PostRepoV1FormDataIdSubmit } \emph{ }
#'
#' \itemize{
#' \item \emph{ @param } id character
#' \item \emph{ @returnType } \link{OrgSagebionetworksRepoModelFormFormData} \cr
#'
#'
#' \item status code : 200 | Auto-generated description
#'
#' \item return type : OrgSagebionetworksRepoModelFormFormData
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ PostRepoV1FormDataList } \emph{ }
#'
#' \itemize{
#' \item \emph{ @param } org_sagebionetworks_repo_model_form_list_request \link{OrgSagebionetworksRepoModelFormListRequest}
#' \item \emph{ @returnType } \link{OrgSagebionetworksRepoModelFormListResponse} \cr
#'
#'
#' \item status code : 200 | Auto-generated description
#'
#' \item return type : OrgSagebionetworksRepoModelFormListResponse
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ PostRepoV1FormDataListReviewer } \emph{ }
#'
#' \itemize{
#' \item \emph{ @param } org_sagebionetworks_repo_model_form_list_request \link{OrgSagebionetworksRepoModelFormListRequest}
#' \item \emph{ @returnType } \link{OrgSagebionetworksRepoModelFormListResponse} \cr
#'
#'
#' \item status code : 200 | Auto-generated description
#'
#' \item return type : OrgSagebionetworksRepoModelFormListResponse
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ PostRepoV1FormGroup } \emph{ }
#'
#' \itemize{
#' \item \emph{ @param } name character
#' \item \emph{ @returnType } \link{OrgSagebionetworksRepoModelFormFormGroup} \cr
#'
#'
#' \item status code : 201 | Auto-generated description
#'
#' \item return type : OrgSagebionetworksRepoModelFormFormGroup
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ PutRepoV1FormDataId } \emph{ }
#'
#' \itemize{
#' \item \emph{ @param } id character
#' \item \emph{ @param } org_sagebionetworks_repo_model_form_form_change_request \link{OrgSagebionetworksRepoModelFormFormChangeRequest}
#' \item \emph{ @returnType } \link{OrgSagebionetworksRepoModelFormFormData} \cr
#'
#'
#' \item status code : 200 | Auto-generated description
#'
#' \item return type : OrgSagebionetworksRepoModelFormFormData
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ PutRepoV1FormDataIdAccept } \emph{ }
#'
#' \itemize{
#' \item \emph{ @param } id character
#' \item \emph{ @returnType } \link{OrgSagebionetworksRepoModelFormFormData} \cr
#'
#'
#' \item status code : 200 | Auto-generated description
#'
#' \item return type : OrgSagebionetworksRepoModelFormFormData
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ PutRepoV1FormDataIdReject } \emph{ }
#'
#' \itemize{
#' \item \emph{ @param } id character
#' \item \emph{ @param } org_sagebionetworks_repo_model_form_form_rejection \link{OrgSagebionetworksRepoModelFormFormRejection}
#' \item \emph{ @returnType } \link{OrgSagebionetworksRepoModelFormFormData} \cr
#'
#'
#' \item status code : 200 | Auto-generated description
#'
#' \item return type : OrgSagebionetworksRepoModelFormFormData
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ PutRepoV1FormGroupIdAcl } \emph{ }
#'
#' \itemize{
#' \item \emph{ @param } id character
#' \item \emph{ @param } org_sagebionetworks_repo_model_access_control_list \link{OrgSagebionetworksRepoModelAccessControlList}
#' \item \emph{ @returnType } \link{OrgSagebionetworksRepoModelAccessControlList} \cr
#'
#'
#' \item status code : 200 | Auto-generated description
#'
#' \item return type : OrgSagebionetworksRepoModelAccessControlList
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' }
#'
#'
#' @examples
#' \dontrun{
#' #################### DeleteRepoV1FormDataId ####################
#'
#' library(synclient)
#' var_id <- "id_example" # character | Id of the FormData object to delete
#'
#' api_instance <- FormServicesApi$new()
#'
#' # Configure HTTP bearer authorization: bearerAuth
#' api_instance$api_client$bearer_token <- Sys.getenv("BEARER_TOKEN")
#'
#' api_instance$DeleteRepoV1FormDataId(var_id)
#'
#'
#' #################### GetRepoV1FormGroupId ####################
#'
#' library(synclient)
#' var_id <- "id_example" # character |
#'
#' api_instance <- FormServicesApi$new()
#'
#' # Configure HTTP bearer authorization: bearerAuth
#' api_instance$api_client$bearer_token <- Sys.getenv("BEARER_TOKEN")
#'
#' # to save the result into a file, simply add the optional `data_file` parameter, e.g.
#' # result <- api_instance$GetRepoV1FormGroupId(var_iddata_file = "result.txt")
#' result <- api_instance$GetRepoV1FormGroupId(var_id)
#' dput(result)
#'
#'
#' #################### GetRepoV1FormGroupIdAcl ####################
#'
#' library(synclient)
#' var_id <- "id_example" # character | The identifier of the FormGroup.
#'
#' api_instance <- FormServicesApi$new()
#'
#' # Configure HTTP bearer authorization: bearerAuth
#' api_instance$api_client$bearer_token <- Sys.getenv("BEARER_TOKEN")
#'
#' # to save the result into a file, simply add the optional `data_file` parameter, e.g.
#' # result <- api_instance$GetRepoV1FormGroupIdAcl(var_iddata_file = "result.txt")
#' result <- api_instance$GetRepoV1FormGroupIdAcl(var_id)
#' dput(result)
#'
#'
#' #################### PostRepoV1FormData ####################
#'
#' library(synclient)
#' var_group_id <- "group_id_example" # character | The identifier of the group that manages this data. Required.
#' var_org_sagebionetworks_repo_model_form_form_change_request <- org.sagebionetworks.repo.model.form.FormChangeRequest$new("name_example", "fileHandleId_example") # OrgSagebionetworksRepoModelFormFormChangeRequest |
#'
#' api_instance <- FormServicesApi$new()
#'
#' # Configure HTTP bearer authorization: bearerAuth
#' api_instance$api_client$bearer_token <- Sys.getenv("BEARER_TOKEN")
#'
#' # to save the result into a file, simply add the optional `data_file` parameter, e.g.
#' # result <- api_instance$PostRepoV1FormData(var_group_id, var_org_sagebionetworks_repo_model_form_form_change_requestdata_file = "result.txt")
#' result <- api_instance$PostRepoV1FormData(var_group_id, var_org_sagebionetworks_repo_model_form_form_change_request)
#' dput(result)
#'
#'
#' #################### PostRepoV1FormDataIdSubmit ####################
#'
#' library(synclient)
#' var_id <- "id_example" # character |
#'
#' api_instance <- FormServicesApi$new()
#'
#' # Configure HTTP bearer authorization: bearerAuth
#' api_instance$api_client$bearer_token <- Sys.getenv("BEARER_TOKEN")
#'
#' # to save the result into a file, simply add the optional `data_file` parameter, e.g.
#' # result <- api_instance$PostRepoV1FormDataIdSubmit(var_iddata_file = "result.txt")
#' result <- api_instance$PostRepoV1FormDataIdSubmit(var_id)
#' dput(result)
#'
#'
#' #################### PostRepoV1FormDataList ####################
#'
#' library(synclient)
#' var_org_sagebionetworks_repo_model_form_list_request <- org.sagebionetworks.repo.model.form.ListRequest$new(c("filterByState_example"), "groupId_example", "nextPageToken_example") # OrgSagebionetworksRepoModelFormListRequest |
#'
#' api_instance <- FormServicesApi$new()
#'
#' # Configure HTTP bearer authorization: bearerAuth
#' api_instance$api_client$bearer_token <- Sys.getenv("BEARER_TOKEN")
#'
#' # to save the result into a file, simply add the optional `data_file` parameter, e.g.
#' # result <- api_instance$PostRepoV1FormDataList(var_org_sagebionetworks_repo_model_form_list_requestdata_file = "result.txt")
#' result <- api_instance$PostRepoV1FormDataList(var_org_sagebionetworks_repo_model_form_list_request)
#' dput(result)
#'
#'
#' #################### PostRepoV1FormDataListReviewer ####################
#'
#' library(synclient)
#' var_org_sagebionetworks_repo_model_form_list_request <- org.sagebionetworks.repo.model.form.ListRequest$new(c("filterByState_example"), "groupId_example", "nextPageToken_example") # OrgSagebionetworksRepoModelFormListRequest |
#'
#' api_instance <- FormServicesApi$new()
#'
#' # Configure HTTP bearer authorization: bearerAuth
#' api_instance$api_client$bearer_token <- Sys.getenv("BEARER_TOKEN")
#'
#' # to save the result into a file, simply add the optional `data_file` parameter, e.g.
#' # result <- api_instance$PostRepoV1FormDataListReviewer(var_org_sagebionetworks_repo_model_form_list_requestdata_file = "result.txt")
#' result <- api_instance$PostRepoV1FormDataListReviewer(var_org_sagebionetworks_repo_model_form_list_request)
#' dput(result)
#'
#'
#' #################### PostRepoV1FormGroup ####################
#'
#' library(synclient)
#' var_name <- "name_example" # character | A globally unique name for the group. Required. Between 3 and 256 characters.
#'
#' api_instance <- FormServicesApi$new()
#'
#' # Configure HTTP bearer authorization: bearerAuth
#' api_instance$api_client$bearer_token <- Sys.getenv("BEARER_TOKEN")
#'
#' # to save the result into a file, simply add the optional `data_file` parameter, e.g.
#' # result <- api_instance$PostRepoV1FormGroup(var_namedata_file = "result.txt")
#' result <- api_instance$PostRepoV1FormGroup(var_name)
#' dput(result)
#'
#'
#' #################### PutRepoV1FormDataId ####################
#'
#' library(synclient)
#' var_id <- "id_example" # character | The identifier of the FormData to update.
#' var_org_sagebionetworks_repo_model_form_form_change_request <- org.sagebionetworks.repo.model.form.FormChangeRequest$new("name_example", "fileHandleId_example") # OrgSagebionetworksRepoModelFormFormChangeRequest |
#'
#' api_instance <- FormServicesApi$new()
#'
#' # Configure HTTP bearer authorization: bearerAuth
#' api_instance$api_client$bearer_token <- Sys.getenv("BEARER_TOKEN")
#'
#' # to save the result into a file, simply add the optional `data_file` parameter, e.g.
#' # result <- api_instance$PutRepoV1FormDataId(var_id, var_org_sagebionetworks_repo_model_form_form_change_requestdata_file = "result.txt")
#' result <- api_instance$PutRepoV1FormDataId(var_id, var_org_sagebionetworks_repo_model_form_form_change_request)
#' dput(result)
#'
#'
#' #################### PutRepoV1FormDataIdAccept ####################
#'
#' library(synclient)
#' var_id <- "id_example" # character | Identifier of the FormData to accept.
#'
#' api_instance <- FormServicesApi$new()
#'
#' # Configure HTTP bearer authorization: bearerAuth
#' api_instance$api_client$bearer_token <- Sys.getenv("BEARER_TOKEN")
#'
#' # to save the result into a file, simply add the optional `data_file` parameter, e.g.
#' # result <- api_instance$PutRepoV1FormDataIdAccept(var_iddata_file = "result.txt")
#' result <- api_instance$PutRepoV1FormDataIdAccept(var_id)
#' dput(result)
#'
#'
#' #################### PutRepoV1FormDataIdReject ####################
#'
#' library(synclient)
#' var_id <- "id_example" # character | Identifier of the FormData to accept.
#' var_org_sagebionetworks_repo_model_form_form_rejection <- org.sagebionetworks.repo.model.form.FormRejection$new("reason_example") # OrgSagebionetworksRepoModelFormFormRejection |
#'
#' api_instance <- FormServicesApi$new()
#'
#' # Configure HTTP bearer authorization: bearerAuth
#' api_instance$api_client$bearer_token <- Sys.getenv("BEARER_TOKEN")
#'
#' # to save the result into a file, simply add the optional `data_file` parameter, e.g.
#' # result <- api_instance$PutRepoV1FormDataIdReject(var_id, var_org_sagebionetworks_repo_model_form_form_rejectiondata_file = "result.txt")
#' result <- api_instance$PutRepoV1FormDataIdReject(var_id, var_org_sagebionetworks_repo_model_form_form_rejection)
#' dput(result)
#'
#'
#' #################### PutRepoV1FormGroupIdAcl ####################
#'
#' library(synclient)
#' var_id <- "id_example" # character | The identifier of the FormGroup.
#' var_org_sagebionetworks_repo_model_access_control_list <- org.sagebionetworks.repo.model.AccessControlList$new("id_example", "createdBy_example", "creationDate_example", "modifiedBy_example", "modifiedOn_example", "etag_example", c(org.sagebionetworks.repo.model.ResourceAccess$new(123, c("accessType_example")))) # OrgSagebionetworksRepoModelAccessControlList |
#'
#' api_instance <- FormServicesApi$new()
#'
#' # Configure HTTP bearer authorization: bearerAuth
#' api_instance$api_client$bearer_token <- Sys.getenv("BEARER_TOKEN")
#'
#' # to save the result into a file, simply add the optional `data_file` parameter, e.g.
#' # result <- api_instance$PutRepoV1FormGroupIdAcl(var_id, var_org_sagebionetworks_repo_model_access_control_listdata_file = "result.txt")
#' result <- api_instance$PutRepoV1FormGroupIdAcl(var_id, var_org_sagebionetworks_repo_model_access_control_list)
#' dput(result)
#'
#'
#' }
#' @importFrom R6 R6Class
#' @importFrom base64enc base64encode
#' @export
FormServicesApi <- R6::R6Class(
"FormServicesApi",
public = list(
api_client = NULL,
#' Initialize a new FormServicesApi.
#'
#' @description
#' Initialize a new FormServicesApi.
#'
#' @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()
}
},
#'
#'
#' @description
#'
#'
#' @param id Id of the FormData object to delete
#' @param ... Other optional arguments
#' @return void
#' @export
DeleteRepoV1FormDataId = function(id, ...) {
local_var_response <- self$DeleteRepoV1FormDataIdWithHttpInfo(id, ...)
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
}
},
#'
#'
#' @description
#'
#'
#' @param id Id of the FormData object to delete
#' @param ... Other optional arguments
#' @return API response (void) with additional information such as HTTP status code, headers
#' @export
DeleteRepoV1FormDataIdWithHttpInfo = function(id, ...) {
args <- list(...)
query_params <- list()
header_params <- c()
form_params <- list()
file_params <- list()
local_var_body <- NULL
oauth_scopes <- NULL
is_oauth <- FALSE
if (missing(`id`)) {
stop("Missing required parameter `id`.")
}
local_var_url_path <- "/repo/v1/form/data/{id}"
if (!missing(`id`)) {
local_var_url_path <- gsub("\\{id\\}", URLencode(as.character(`id`), reserved = TRUE), local_var_url_path)
}
# Bearer token
if (!is.null(self$api_client$bearer_token)) {
header_params["Authorization"] <- paste("Bearer", self$api_client$bearer_token, sep = " ")
}
# The Accept request HTTP header
local_var_accepts <- list()
# The Content-Type representation header
local_var_content_types <- list()
local_var_resp <- self$api_client$CallApi(url = paste0(self$api_client$base_path, local_var_url_path),
method = "DELETE",
query_params = query_params,
header_params = header_params,
form_params = form_params,
file_params = file_params,
accepts = local_var_accepts,
content_types = local_var_content_types,
body = local_var_body,
is_oauth = is_oauth,
oauth_scopes = oauth_scopes,
...)
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
local_var_resp$content <- NULL
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
}
},
#'
#'
#' @description
#'
#'
#' @param id
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return OrgSagebionetworksRepoModelFormFormGroup
#' @export
GetRepoV1FormGroupId = function(id, data_file = NULL, ...) {
local_var_response <- self$GetRepoV1FormGroupIdWithHttpInfo(id, 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
}
},
#'
#'
#' @description
#'
#'
#' @param id
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return API response (OrgSagebionetworksRepoModelFormFormGroup) with additional information such as HTTP status code, headers
#' @export
GetRepoV1FormGroupIdWithHttpInfo = function(id, data_file = NULL, ...) {
args <- list(...)
query_params <- list()
header_params <- c()
form_params <- list()
file_params <- list()
local_var_body <- NULL
oauth_scopes <- NULL
is_oauth <- FALSE
if (missing(`id`)) {
stop("Missing required parameter `id`.")
}
local_var_url_path <- "/repo/v1/form/group/{id}"
if (!missing(`id`)) {
local_var_url_path <- gsub("\\{id\\}", URLencode(as.character(`id`), reserved = TRUE), local_var_url_path)
}
# Bearer token
if (!is.null(self$api_client$bearer_token)) {
header_params["Authorization"] <- paste("Bearer", self$api_client$bearer_token, sep = " ")
}
# The Accept request HTTP header
local_var_accepts <- list("application/json")
# The Content-Type representation header
local_var_content_types <- list()
local_var_resp <- self$api_client$CallApi(url = paste0(self$api_client$base_path, local_var_url_path),
method = "GET",
query_params = query_params,
header_params = header_params,
form_params = form_params,
file_params = file_params,
accepts = local_var_accepts,
content_types = local_var_content_types,
body = local_var_body,
is_oauth = is_oauth,
oauth_scopes = oauth_scopes,
...)
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
# save response in a file
if (!is.null(data_file)) {
write(local_var_resp$response, data_file)
}
deserialized_resp_obj <- tryCatch(
self$api_client$deserialize(local_var_resp$response_as_text(), "OrgSagebionetworksRepoModelFormFormGroup", loadNamespace("synclient")),
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
}
},
#'
#'
#' @description
#'
#'
#' @param id The identifier of the FormGroup.
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return OrgSagebionetworksRepoModelAccessControlList
#' @export
GetRepoV1FormGroupIdAcl = function(id, data_file = NULL, ...) {
local_var_response <- self$GetRepoV1FormGroupIdAclWithHttpInfo(id, 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
}
},
#'
#'
#' @description
#'
#'
#' @param id The identifier of the FormGroup.
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return API response (OrgSagebionetworksRepoModelAccessControlList) with additional information such as HTTP status code, headers
#' @export
GetRepoV1FormGroupIdAclWithHttpInfo = function(id, data_file = NULL, ...) {
args <- list(...)
query_params <- list()
header_params <- c()
form_params <- list()
file_params <- list()
local_var_body <- NULL
oauth_scopes <- NULL
is_oauth <- FALSE
if (missing(`id`)) {
stop("Missing required parameter `id`.")
}
local_var_url_path <- "/repo/v1/form/group/{id}/acl"
if (!missing(`id`)) {
local_var_url_path <- gsub("\\{id\\}", URLencode(as.character(`id`), reserved = TRUE), local_var_url_path)
}
# Bearer token
if (!is.null(self$api_client$bearer_token)) {
header_params["Authorization"] <- paste("Bearer", self$api_client$bearer_token, sep = " ")
}
# The Accept request HTTP header
local_var_accepts <- list("application/json")
# The Content-Type representation header
local_var_content_types <- list()
local_var_resp <- self$api_client$CallApi(url = paste0(self$api_client$base_path, local_var_url_path),
method = "GET",
query_params = query_params,
header_params = header_params,
form_params = form_params,
file_params = file_params,
accepts = local_var_accepts,
content_types = local_var_content_types,
body = local_var_body,
is_oauth = is_oauth,
oauth_scopes = oauth_scopes,
...)
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
# save response in a file
if (!is.null(data_file)) {
write(local_var_resp$response, data_file)
}
deserialized_resp_obj <- tryCatch(
self$api_client$deserialize(local_var_resp$response_as_text(), "OrgSagebionetworksRepoModelAccessControlList", loadNamespace("synclient")),
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
}
},
#'
#'
#' @description
#'
#'
#' @param group_id The identifier of the group that manages this data. Required.
#' @param org_sagebionetworks_repo_model_form_form_change_request
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return OrgSagebionetworksRepoModelFormFormData
#' @export
PostRepoV1FormData = function(group_id, org_sagebionetworks_repo_model_form_form_change_request, data_file = NULL, ...) {
local_var_response <- self$PostRepoV1FormDataWithHttpInfo(group_id, org_sagebionetworks_repo_model_form_form_change_request, 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
}
},
#'
#'
#' @description
#'
#'
#' @param group_id The identifier of the group that manages this data. Required.
#' @param org_sagebionetworks_repo_model_form_form_change_request
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return API response (OrgSagebionetworksRepoModelFormFormData) with additional information such as HTTP status code, headers
#' @export
PostRepoV1FormDataWithHttpInfo = function(group_id, org_sagebionetworks_repo_model_form_form_change_request, data_file = NULL, ...) {
args <- list(...)
query_params <- list()
header_params <- c()
form_params <- list()
file_params <- list()
local_var_body <- NULL
oauth_scopes <- NULL
is_oauth <- FALSE
if (missing(`group_id`)) {
stop("Missing required parameter `group_id`.")
}
if (missing(`org_sagebionetworks_repo_model_form_form_change_request`)) {
stop("Missing required parameter `org_sagebionetworks_repo_model_form_form_change_request`.")
}
query_params[["groupId"]] <- `group_id`
if (!is.null(`org_sagebionetworks_repo_model_form_form_change_request`)) {
local_var_body <- `org_sagebionetworks_repo_model_form_form_change_request`$toJSONString()
} else {
body <- NULL
}
local_var_url_path <- "/repo/v1/form/data"
# Bearer token
if (!is.null(self$api_client$bearer_token)) {
header_params["Authorization"] <- paste("Bearer", self$api_client$bearer_token, sep = " ")
}
# The Accept request HTTP header
local_var_accepts <- list("application/json")
# The Content-Type representation header
local_var_content_types <- list("application/json")
local_var_resp <- self$api_client$CallApi(url = paste0(self$api_client$base_path, local_var_url_path),
method = "POST",
query_params = query_params,
header_params = header_params,
form_params = form_params,
file_params = file_params,
accepts = local_var_accepts,
content_types = local_var_content_types,
body = local_var_body,
is_oauth = is_oauth,
oauth_scopes = oauth_scopes,
...)
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
# save response in a file
if (!is.null(data_file)) {
write(local_var_resp$response, data_file)
}
deserialized_resp_obj <- tryCatch(
self$api_client$deserialize(local_var_resp$response_as_text(), "OrgSagebionetworksRepoModelFormFormData", loadNamespace("synclient")),
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
}
},
#'
#'
#' @description
#'
#'
#' @param id
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return OrgSagebionetworksRepoModelFormFormData
#' @export
PostRepoV1FormDataIdSubmit = function(id, data_file = NULL, ...) {
local_var_response <- self$PostRepoV1FormDataIdSubmitWithHttpInfo(id, 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
}
},
#'
#'
#' @description
#'
#'
#' @param id
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return API response (OrgSagebionetworksRepoModelFormFormData) with additional information such as HTTP status code, headers
#' @export
PostRepoV1FormDataIdSubmitWithHttpInfo = function(id, data_file = NULL, ...) {
args <- list(...)
query_params <- list()
header_params <- c()
form_params <- list()
file_params <- list()
local_var_body <- NULL
oauth_scopes <- NULL
is_oauth <- FALSE
if (missing(`id`)) {
stop("Missing required parameter `id`.")
}
local_var_url_path <- "/repo/v1/form/data/{id}/submit"
if (!missing(`id`)) {
local_var_url_path <- gsub("\\{id\\}", URLencode(as.character(`id`), reserved = TRUE), local_var_url_path)
}
# Bearer token
if (!is.null(self$api_client$bearer_token)) {
header_params["Authorization"] <- paste("Bearer", self$api_client$bearer_token, sep = " ")
}
# The Accept request HTTP header
local_var_accepts <- list("application/json")
# The Content-Type representation header
local_var_content_types <- list()
local_var_resp <- self$api_client$CallApi(url = paste0(self$api_client$base_path, local_var_url_path),
method = "POST",
query_params = query_params,
header_params = header_params,
form_params = form_params,
file_params = file_params,
accepts = local_var_accepts,
content_types = local_var_content_types,
body = local_var_body,
is_oauth = is_oauth,
oauth_scopes = oauth_scopes,
...)
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
# save response in a file
if (!is.null(data_file)) {
write(local_var_resp$response, data_file)
}
deserialized_resp_obj <- tryCatch(
self$api_client$deserialize(local_var_resp$response_as_text(), "OrgSagebionetworksRepoModelFormFormData", loadNamespace("synclient")),
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
}
},
#'
#'
#' @description
#'
#'
#' @param org_sagebionetworks_repo_model_form_list_request
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return OrgSagebionetworksRepoModelFormListResponse
#' @export
PostRepoV1FormDataList = function(org_sagebionetworks_repo_model_form_list_request, data_file = NULL, ...) {
local_var_response <- self$PostRepoV1FormDataListWithHttpInfo(org_sagebionetworks_repo_model_form_list_request, 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
}
},
#'
#'
#' @description
#'
#'
#' @param org_sagebionetworks_repo_model_form_list_request
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return API response (OrgSagebionetworksRepoModelFormListResponse) with additional information such as HTTP status code, headers
#' @export
PostRepoV1FormDataListWithHttpInfo = function(org_sagebionetworks_repo_model_form_list_request, data_file = NULL, ...) {
args <- list(...)
query_params <- list()
header_params <- c()
form_params <- list()
file_params <- list()
local_var_body <- NULL
oauth_scopes <- NULL
is_oauth <- FALSE
if (missing(`org_sagebionetworks_repo_model_form_list_request`)) {
stop("Missing required parameter `org_sagebionetworks_repo_model_form_list_request`.")
}
if (!is.null(`org_sagebionetworks_repo_model_form_list_request`)) {
local_var_body <- `org_sagebionetworks_repo_model_form_list_request`$toJSONString()
} else {
body <- NULL
}
local_var_url_path <- "/repo/v1/form/data/list"
# Bearer token
if (!is.null(self$api_client$bearer_token)) {
header_params["Authorization"] <- paste("Bearer", self$api_client$bearer_token, sep = " ")
}
# The Accept request HTTP header
local_var_accepts <- list("application/json")
# The Content-Type representation header
local_var_content_types <- list("application/json")
local_var_resp <- self$api_client$CallApi(url = paste0(self$api_client$base_path, local_var_url_path),
method = "POST",
query_params = query_params,
header_params = header_params,
form_params = form_params,
file_params = file_params,
accepts = local_var_accepts,
content_types = local_var_content_types,
body = local_var_body,
is_oauth = is_oauth,
oauth_scopes = oauth_scopes,
...)
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
# save response in a file
if (!is.null(data_file)) {
write(local_var_resp$response, data_file)
}
deserialized_resp_obj <- tryCatch(
self$api_client$deserialize(local_var_resp$response_as_text(), "OrgSagebionetworksRepoModelFormListResponse", loadNamespace("synclient")),
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
}
},
#'
#'
#' @description
#'
#'
#' @param org_sagebionetworks_repo_model_form_list_request
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return OrgSagebionetworksRepoModelFormListResponse
#' @export
PostRepoV1FormDataListReviewer = function(org_sagebionetworks_repo_model_form_list_request, data_file = NULL, ...) {
local_var_response <- self$PostRepoV1FormDataListReviewerWithHttpInfo(org_sagebionetworks_repo_model_form_list_request, 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
}
},
#'
#'
#' @description
#'
#'
#' @param org_sagebionetworks_repo_model_form_list_request
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return API response (OrgSagebionetworksRepoModelFormListResponse) with additional information such as HTTP status code, headers
#' @export
PostRepoV1FormDataListReviewerWithHttpInfo = function(org_sagebionetworks_repo_model_form_list_request, data_file = NULL, ...) {
args <- list(...)
query_params <- list()
header_params <- c()
form_params <- list()
file_params <- list()
local_var_body <- NULL
oauth_scopes <- NULL
is_oauth <- FALSE
if (missing(`org_sagebionetworks_repo_model_form_list_request`)) {
stop("Missing required parameter `org_sagebionetworks_repo_model_form_list_request`.")
}
if (!is.null(`org_sagebionetworks_repo_model_form_list_request`)) {
local_var_body <- `org_sagebionetworks_repo_model_form_list_request`$toJSONString()
} else {
body <- NULL
}
local_var_url_path <- "/repo/v1/form/data/list/reviewer"
# Bearer token
if (!is.null(self$api_client$bearer_token)) {
header_params["Authorization"] <- paste("Bearer", self$api_client$bearer_token, sep = " ")
}
# The Accept request HTTP header
local_var_accepts <- list("application/json")
# The Content-Type representation header
local_var_content_types <- list("application/json")
local_var_resp <- self$api_client$CallApi(url = paste0(self$api_client$base_path, local_var_url_path),
method = "POST",
query_params = query_params,
header_params = header_params,
form_params = form_params,
file_params = file_params,
accepts = local_var_accepts,
content_types = local_var_content_types,
body = local_var_body,
is_oauth = is_oauth,
oauth_scopes = oauth_scopes,
...)
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
# save response in a file
if (!is.null(data_file)) {
write(local_var_resp$response, data_file)
}
deserialized_resp_obj <- tryCatch(
self$api_client$deserialize(local_var_resp$response_as_text(), "OrgSagebionetworksRepoModelFormListResponse", loadNamespace("synclient")),
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
}
},
#'
#'
#' @description
#'
#'
#' @param name A globally unique name for the group. Required. Between 3 and 256 characters.
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return OrgSagebionetworksRepoModelFormFormGroup
#' @export
PostRepoV1FormGroup = function(name, data_file = NULL, ...) {
local_var_response <- self$PostRepoV1FormGroupWithHttpInfo(name, 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
}
},
#'
#'
#' @description
#'
#'
#' @param name A globally unique name for the group. Required. Between 3 and 256 characters.
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return API response (OrgSagebionetworksRepoModelFormFormGroup) with additional information such as HTTP status code, headers
#' @export
PostRepoV1FormGroupWithHttpInfo = function(name, data_file = NULL, ...) {
args <- list(...)
query_params <- list()
header_params <- c()
form_params <- list()
file_params <- list()
local_var_body <- NULL
oauth_scopes <- NULL
is_oauth <- FALSE
if (missing(`name`)) {
stop("Missing required parameter `name`.")
}
query_params[["name"]] <- `name`
local_var_url_path <- "/repo/v1/form/group"
# Bearer token
if (!is.null(self$api_client$bearer_token)) {
header_params["Authorization"] <- paste("Bearer", self$api_client$bearer_token, sep = " ")
}
# The Accept request HTTP header
local_var_accepts <- list("application/json")
# The Content-Type representation header
local_var_content_types <- list()
local_var_resp <- self$api_client$CallApi(url = paste0(self$api_client$base_path, local_var_url_path),
method = "POST",
query_params = query_params,
header_params = header_params,
form_params = form_params,
file_params = file_params,
accepts = local_var_accepts,
content_types = local_var_content_types,
body = local_var_body,
is_oauth = is_oauth,
oauth_scopes = oauth_scopes,
...)
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
# save response in a file
if (!is.null(data_file)) {
write(local_var_resp$response, data_file)
}
deserialized_resp_obj <- tryCatch(
self$api_client$deserialize(local_var_resp$response_as_text(), "OrgSagebionetworksRepoModelFormFormGroup", loadNamespace("synclient")),
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
}
},
#'
#'
#' @description
#'
#'
#' @param id The identifier of the FormData to update.
#' @param org_sagebionetworks_repo_model_form_form_change_request
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return OrgSagebionetworksRepoModelFormFormData
#' @export
PutRepoV1FormDataId = function(id, org_sagebionetworks_repo_model_form_form_change_request, data_file = NULL, ...) {
local_var_response <- self$PutRepoV1FormDataIdWithHttpInfo(id, org_sagebionetworks_repo_model_form_form_change_request, 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
}
},
#'
#'
#' @description
#'
#'
#' @param id The identifier of the FormData to update.
#' @param org_sagebionetworks_repo_model_form_form_change_request
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return API response (OrgSagebionetworksRepoModelFormFormData) with additional information such as HTTP status code, headers
#' @export
PutRepoV1FormDataIdWithHttpInfo = function(id, org_sagebionetworks_repo_model_form_form_change_request, data_file = NULL, ...) {
args <- list(...)
query_params <- list()
header_params <- c()
form_params <- list()
file_params <- list()
local_var_body <- NULL
oauth_scopes <- NULL
is_oauth <- FALSE
if (missing(`id`)) {
stop("Missing required parameter `id`.")
}
if (missing(`org_sagebionetworks_repo_model_form_form_change_request`)) {
stop("Missing required parameter `org_sagebionetworks_repo_model_form_form_change_request`.")
}
if (!is.null(`org_sagebionetworks_repo_model_form_form_change_request`)) {
local_var_body <- `org_sagebionetworks_repo_model_form_form_change_request`$toJSONString()
} else {
body <- NULL
}
local_var_url_path <- "/repo/v1/form/data/{id}"
if (!missing(`id`)) {
local_var_url_path <- gsub("\\{id\\}", URLencode(as.character(`id`), reserved = TRUE), local_var_url_path)
}
# Bearer token
if (!is.null(self$api_client$bearer_token)) {
header_params["Authorization"] <- paste("Bearer", self$api_client$bearer_token, sep = " ")
}
# The Accept request HTTP header
local_var_accepts <- list("application/json")
# The Content-Type representation header
local_var_content_types <- list("application/json")
local_var_resp <- self$api_client$CallApi(url = paste0(self$api_client$base_path, local_var_url_path),
method = "PUT",
query_params = query_params,
header_params = header_params,
form_params = form_params,
file_params = file_params,
accepts = local_var_accepts,
content_types = local_var_content_types,
body = local_var_body,
is_oauth = is_oauth,
oauth_scopes = oauth_scopes,
...)
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
# save response in a file
if (!is.null(data_file)) {
write(local_var_resp$response, data_file)
}
deserialized_resp_obj <- tryCatch(
self$api_client$deserialize(local_var_resp$response_as_text(), "OrgSagebionetworksRepoModelFormFormData", loadNamespace("synclient")),
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
}
},
#'
#'
#' @description
#'
#'
#' @param id Identifier of the FormData to accept.
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return OrgSagebionetworksRepoModelFormFormData
#' @export
PutRepoV1FormDataIdAccept = function(id, data_file = NULL, ...) {
local_var_response <- self$PutRepoV1FormDataIdAcceptWithHttpInfo(id, 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
}
},
#'
#'
#' @description
#'
#'
#' @param id Identifier of the FormData to accept.
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return API response (OrgSagebionetworksRepoModelFormFormData) with additional information such as HTTP status code, headers
#' @export
PutRepoV1FormDataIdAcceptWithHttpInfo = function(id, data_file = NULL, ...) {
args <- list(...)
query_params <- list()
header_params <- c()
form_params <- list()
file_params <- list()
local_var_body <- NULL
oauth_scopes <- NULL
is_oauth <- FALSE
if (missing(`id`)) {
stop("Missing required parameter `id`.")
}
local_var_url_path <- "/repo/v1/form/data/{id}/accept"
if (!missing(`id`)) {
local_var_url_path <- gsub("\\{id\\}", URLencode(as.character(`id`), reserved = TRUE), local_var_url_path)
}
# Bearer token
if (!is.null(self$api_client$bearer_token)) {
header_params["Authorization"] <- paste("Bearer", self$api_client$bearer_token, sep = " ")
}
# The Accept request HTTP header
local_var_accepts <- list("application/json")
# The Content-Type representation header
local_var_content_types <- list()
local_var_resp <- self$api_client$CallApi(url = paste0(self$api_client$base_path, local_var_url_path),
method = "PUT",
query_params = query_params,
header_params = header_params,
form_params = form_params,
file_params = file_params,
accepts = local_var_accepts,
content_types = local_var_content_types,
body = local_var_body,
is_oauth = is_oauth,
oauth_scopes = oauth_scopes,
...)
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
# save response in a file
if (!is.null(data_file)) {
write(local_var_resp$response, data_file)
}
deserialized_resp_obj <- tryCatch(
self$api_client$deserialize(local_var_resp$response_as_text(), "OrgSagebionetworksRepoModelFormFormData", loadNamespace("synclient")),
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
}
},
#'
#'
#' @description
#'
#'
#' @param id Identifier of the FormData to accept.
#' @param org_sagebionetworks_repo_model_form_form_rejection
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return OrgSagebionetworksRepoModelFormFormData
#' @export
PutRepoV1FormDataIdReject = function(id, org_sagebionetworks_repo_model_form_form_rejection, data_file = NULL, ...) {
local_var_response <- self$PutRepoV1FormDataIdRejectWithHttpInfo(id, org_sagebionetworks_repo_model_form_form_rejection, 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
}
},
#'
#'
#' @description
#'
#'
#' @param id Identifier of the FormData to accept.
#' @param org_sagebionetworks_repo_model_form_form_rejection
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return API response (OrgSagebionetworksRepoModelFormFormData) with additional information such as HTTP status code, headers
#' @export
PutRepoV1FormDataIdRejectWithHttpInfo = function(id, org_sagebionetworks_repo_model_form_form_rejection, data_file = NULL, ...) {
args <- list(...)
query_params <- list()
header_params <- c()
form_params <- list()
file_params <- list()
local_var_body <- NULL
oauth_scopes <- NULL
is_oauth <- FALSE
if (missing(`id`)) {
stop("Missing required parameter `id`.")
}
if (missing(`org_sagebionetworks_repo_model_form_form_rejection`)) {
stop("Missing required parameter `org_sagebionetworks_repo_model_form_form_rejection`.")
}
if (!is.null(`org_sagebionetworks_repo_model_form_form_rejection`)) {
local_var_body <- `org_sagebionetworks_repo_model_form_form_rejection`$toJSONString()
} else {
body <- NULL
}
local_var_url_path <- "/repo/v1/form/data/{id}/reject"
if (!missing(`id`)) {
local_var_url_path <- gsub("\\{id\\}", URLencode(as.character(`id`), reserved = TRUE), local_var_url_path)
}
# Bearer token
if (!is.null(self$api_client$bearer_token)) {
header_params["Authorization"] <- paste("Bearer", self$api_client$bearer_token, sep = " ")
}
# The Accept request HTTP header
local_var_accepts <- list("application/json")
# The Content-Type representation header
local_var_content_types <- list("application/json")
local_var_resp <- self$api_client$CallApi(url = paste0(self$api_client$base_path, local_var_url_path),
method = "PUT",
query_params = query_params,
header_params = header_params,
form_params = form_params,
file_params = file_params,
accepts = local_var_accepts,
content_types = local_var_content_types,
body = local_var_body,
is_oauth = is_oauth,
oauth_scopes = oauth_scopes,
...)
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
# save response in a file
if (!is.null(data_file)) {
write(local_var_resp$response, data_file)
}
deserialized_resp_obj <- tryCatch(
self$api_client$deserialize(local_var_resp$response_as_text(), "OrgSagebionetworksRepoModelFormFormData", loadNamespace("synclient")),
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
}
},
#'
#'
#' @description
#'
#'
#' @param id The identifier of the FormGroup.
#' @param org_sagebionetworks_repo_model_access_control_list
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return OrgSagebionetworksRepoModelAccessControlList
#' @export
PutRepoV1FormGroupIdAcl = function(id, org_sagebionetworks_repo_model_access_control_list, data_file = NULL, ...) {
local_var_response <- self$PutRepoV1FormGroupIdAclWithHttpInfo(id, org_sagebionetworks_repo_model_access_control_list, 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
}
},
#'
#'
#' @description
#'
#'
#' @param id The identifier of the FormGroup.
#' @param org_sagebionetworks_repo_model_access_control_list
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return API response (OrgSagebionetworksRepoModelAccessControlList) with additional information such as HTTP status code, headers
#' @export
PutRepoV1FormGroupIdAclWithHttpInfo = function(id, org_sagebionetworks_repo_model_access_control_list, data_file = NULL, ...) {
args <- list(...)
query_params <- list()
header_params <- c()
form_params <- list()
file_params <- list()
local_var_body <- NULL
oauth_scopes <- NULL
is_oauth <- FALSE
if (missing(`id`)) {
stop("Missing required parameter `id`.")
}
if (missing(`org_sagebionetworks_repo_model_access_control_list`)) {
stop("Missing required parameter `org_sagebionetworks_repo_model_access_control_list`.")
}
if (!is.null(`org_sagebionetworks_repo_model_access_control_list`)) {
local_var_body <- `org_sagebionetworks_repo_model_access_control_list`$toJSONString()
} else {
body <- NULL
}
local_var_url_path <- "/repo/v1/form/group/{id}/acl"
if (!missing(`id`)) {
local_var_url_path <- gsub("\\{id\\}", URLencode(as.character(`id`), reserved = TRUE), local_var_url_path)
}
# Bearer token
if (!is.null(self$api_client$bearer_token)) {
header_params["Authorization"] <- paste("Bearer", self$api_client$bearer_token, sep = " ")
}
# The Accept request HTTP header
local_var_accepts <- list("application/json")
# The Content-Type representation header
local_var_content_types <- list("application/json")
local_var_resp <- self$api_client$CallApi(url = paste0(self$api_client$base_path, local_var_url_path),
method = "PUT",
query_params = query_params,
header_params = header_params,
form_params = form_params,
file_params = file_params,
accepts = local_var_accepts,
content_types = local_var_content_types,
body = local_var_body,
is_oauth = is_oauth,
oauth_scopes = oauth_scopes,
...)
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
# save response in a file
if (!is.null(data_file)) {
write(local_var_resp$response, data_file)
}
deserialized_resp_obj <- tryCatch(
self$api_client$deserialize(local_var_resp$response_as_text(), "OrgSagebionetworksRepoModelAccessControlList", loadNamespace("synclient")),
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
}
}
)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.