#' 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 AccessApprovalServices operations
#' @description AccessApprovalServicesApi
#' @format An \code{R6Class} generator object
#' @field api_client Handles the client-server communication.
#'
#' @section Methods:
#' \describe{
#' \strong{ DeleteRepoV1AccessApproval } \emph{ }
#'
#' \itemize{
#' \item \emph{ @param } requirement_id character
#' \item \emph{ @param } accessor_id character
#'
#'
#' \item status code : 200 | Void
#'
#'
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ GetRepoV1AccessApprovalApprovalId } \emph{ }
#'
#' \itemize{
#' \item \emph{ @param } approval_id character
#' \item \emph{ @returnType } \link{OrgSagebionetworksRepoModelAccessApproval} \cr
#'
#'
#' \item status code : 200 | Auto-generated description
#'
#' \item return type : OrgSagebionetworksRepoModelAccessApproval
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ PostRepoV1AccessApproval } \emph{ }
#'
#' \itemize{
#' \item \emph{ @param } org_sagebionetworks_repo_model_access_approval \link{OrgSagebionetworksRepoModelAccessApproval}
#' \item \emph{ @returnType } \link{OrgSagebionetworksRepoModelAccessApproval} \cr
#'
#'
#' \item status code : 201 | Auto-generated description
#'
#' \item return type : OrgSagebionetworksRepoModelAccessApproval
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ PostRepoV1AccessApprovalGroup } \emph{ }
#'
#' \itemize{
#' \item \emph{ @param } org_sagebionetworks_repo_model_dataaccess_accessor_group_request \link{OrgSagebionetworksRepoModelDataaccessAccessorGroupRequest}
#' \item \emph{ @returnType } \link{OrgSagebionetworksRepoModelDataaccessAccessorGroupResponse} \cr
#'
#'
#' \item status code : 200 | Auto-generated description
#'
#' \item return type : OrgSagebionetworksRepoModelDataaccessAccessorGroupResponse
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ PostRepoV1AccessApprovalInformation } \emph{ }
#'
#' \itemize{
#' \item \emph{ @param } org_sagebionetworks_repo_model_batch_access_approval_info_request \link{OrgSagebionetworksRepoModelBatchAccessApprovalInfoRequest}
#' \item \emph{ @returnType } \link{OrgSagebionetworksRepoModelBatchAccessApprovalInfoResponse} \cr
#'
#'
#' \item status code : 200 | Auto-generated description
#'
#' \item return type : OrgSagebionetworksRepoModelBatchAccessApprovalInfoResponse
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ PostRepoV1AccessApprovalNotifications } \emph{ }
#'
#' \itemize{
#' \item \emph{ @param } org_sagebionetworks_repo_model_dataaccess_access_approval_notification_request \link{OrgSagebionetworksRepoModelDataaccessAccessApprovalNotificationRequest}
#' \item \emph{ @returnType } \link{OrgSagebionetworksRepoModelDataaccessAccessApprovalNotificationResponse} \cr
#'
#'
#' \item status code : 200 | Auto-generated description
#'
#' \item return type : OrgSagebionetworksRepoModelDataaccessAccessApprovalNotificationResponse
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ PostRepoV1AccessApprovalSearch } \emph{ }
#'
#' \itemize{
#' \item \emph{ @param } org_sagebionetworks_repo_model_dataaccess_access_approval_search_request \link{OrgSagebionetworksRepoModelDataaccessAccessApprovalSearchRequest}
#' \item \emph{ @returnType } \link{OrgSagebionetworksRepoModelDataaccessAccessApprovalSearchResponse} \cr
#'
#'
#' \item status code : 200 | Auto-generated description
#'
#' \item return type : OrgSagebionetworksRepoModelDataaccessAccessApprovalSearchResponse
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ PutRepoV1AccessApprovalGroupRevoke } \emph{ }
#'
#' \itemize{
#' \item \emph{ @param } org_sagebionetworks_repo_model_dataaccess_accessor_group_revoke_request \link{OrgSagebionetworksRepoModelDataaccessAccessorGroupRevokeRequest}
#'
#'
#' \item status code : 204 | Void
#'
#'
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' }
#'
#'
#' @examples
#' \dontrun{
#' #################### DeleteRepoV1AccessApproval ####################
#'
#' library(synclient)
#' var_requirement_id <- "requirement_id_example" # character |
#' var_accessor_id <- "accessor_id_example" # character | - The user whose access is being revoked
#'
#' api_instance <- AccessApprovalServicesApi$new()
#'
#' # Configure HTTP bearer authorization: bearerAuth
#' api_instance$api_client$bearer_token <- Sys.getenv("BEARER_TOKEN")
#'
#' api_instance$DeleteRepoV1AccessApproval(var_requirement_id, var_accessor_id)
#'
#'
#' #################### GetRepoV1AccessApprovalApprovalId ####################
#'
#' library(synclient)
#' var_approval_id <- "approval_id_example" # character |
#'
#' api_instance <- AccessApprovalServicesApi$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$GetRepoV1AccessApprovalApprovalId(var_approval_iddata_file = "result.txt")
#' result <- api_instance$GetRepoV1AccessApprovalApprovalId(var_approval_id)
#' dput(result)
#'
#'
#' #################### PostRepoV1AccessApproval ####################
#'
#' library(synclient)
#' var_org_sagebionetworks_repo_model_access_approval <- org.sagebionetworks.repo.model.AccessApproval$new(123, "etag_example", "createdOn_example", "modifiedOn_example", "createdBy_example", "modifiedBy_example", 123, 123, "submitterId_example", "accessorId_example", "expiredOn_example", "state_example") # OrgSagebionetworksRepoModelAccessApproval |
#'
#' api_instance <- AccessApprovalServicesApi$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$PostRepoV1AccessApproval(var_org_sagebionetworks_repo_model_access_approvaldata_file = "result.txt")
#' result <- api_instance$PostRepoV1AccessApproval(var_org_sagebionetworks_repo_model_access_approval)
#' dput(result)
#'
#'
#' #################### PostRepoV1AccessApprovalGroup ####################
#'
#' library(synclient)
#' var_org_sagebionetworks_repo_model_dataaccess_accessor_group_request <- org.sagebionetworks.repo.model.dataaccess.AccessorGroupRequest$new("accessRequirementId_example", "submitterId_example", "accessorId_example", "expireBefore_example", "nextPageToken_example") # OrgSagebionetworksRepoModelDataaccessAccessorGroupRequest |
#'
#' api_instance <- AccessApprovalServicesApi$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$PostRepoV1AccessApprovalGroup(var_org_sagebionetworks_repo_model_dataaccess_accessor_group_requestdata_file = "result.txt")
#' result <- api_instance$PostRepoV1AccessApprovalGroup(var_org_sagebionetworks_repo_model_dataaccess_accessor_group_request)
#' dput(result)
#'
#'
#' #################### PostRepoV1AccessApprovalInformation ####################
#'
#' library(synclient)
#' var_org_sagebionetworks_repo_model_batch_access_approval_info_request <- org.sagebionetworks.repo.model.BatchAccessApprovalInfoRequest$new("userId_example", c("accessRequirementIds_example")) # OrgSagebionetworksRepoModelBatchAccessApprovalInfoRequest |
#'
#' api_instance <- AccessApprovalServicesApi$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$PostRepoV1AccessApprovalInformation(var_org_sagebionetworks_repo_model_batch_access_approval_info_requestdata_file = "result.txt")
#' result <- api_instance$PostRepoV1AccessApprovalInformation(var_org_sagebionetworks_repo_model_batch_access_approval_info_request)
#' dput(result)
#'
#'
#' #################### PostRepoV1AccessApprovalNotifications ####################
#'
#' library(synclient)
#' var_org_sagebionetworks_repo_model_dataaccess_access_approval_notification_request <- org.sagebionetworks.repo.model.dataaccess.AccessApprovalNotificationRequest$new(123, c(123)) # OrgSagebionetworksRepoModelDataaccessAccessApprovalNotificationRequest |
#'
#' api_instance <- AccessApprovalServicesApi$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$PostRepoV1AccessApprovalNotifications(var_org_sagebionetworks_repo_model_dataaccess_access_approval_notification_requestdata_file = "result.txt")
#' result <- api_instance$PostRepoV1AccessApprovalNotifications(var_org_sagebionetworks_repo_model_dataaccess_access_approval_notification_request)
#' dput(result)
#'
#'
#' #################### PostRepoV1AccessApprovalSearch ####################
#'
#' library(synclient)
#' var_org_sagebionetworks_repo_model_dataaccess_access_approval_search_request <- org.sagebionetworks.repo.model.dataaccess.AccessApprovalSearchRequest$new("accessorId_example", "accessRequirementId_example", c(org.sagebionetworks.repo.model.dataaccess.AccessApprovalSearchSort$new("field_example", "direction_example")), "nextPageToken_example") # OrgSagebionetworksRepoModelDataaccessAccessApprovalSearchRequest |
#'
#' api_instance <- AccessApprovalServicesApi$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$PostRepoV1AccessApprovalSearch(var_org_sagebionetworks_repo_model_dataaccess_access_approval_search_requestdata_file = "result.txt")
#' result <- api_instance$PostRepoV1AccessApprovalSearch(var_org_sagebionetworks_repo_model_dataaccess_access_approval_search_request)
#' dput(result)
#'
#'
#' #################### PutRepoV1AccessApprovalGroupRevoke ####################
#'
#' library(synclient)
#' var_org_sagebionetworks_repo_model_dataaccess_accessor_group_revoke_request <- org.sagebionetworks.repo.model.dataaccess.AccessorGroupRevokeRequest$new("accessRequirementId_example", "submitterId_example") # OrgSagebionetworksRepoModelDataaccessAccessorGroupRevokeRequest |
#'
#' api_instance <- AccessApprovalServicesApi$new()
#'
#' # Configure HTTP bearer authorization: bearerAuth
#' api_instance$api_client$bearer_token <- Sys.getenv("BEARER_TOKEN")
#'
#' api_instance$PutRepoV1AccessApprovalGroupRevoke(var_org_sagebionetworks_repo_model_dataaccess_accessor_group_revoke_request)
#'
#'
#' }
#' @importFrom R6 R6Class
#' @importFrom base64enc base64encode
#' @export
AccessApprovalServicesApi <- R6::R6Class(
"AccessApprovalServicesApi",
public = list(
api_client = NULL,
#' Initialize a new AccessApprovalServicesApi.
#'
#' @description
#' Initialize a new AccessApprovalServicesApi.
#'
#' @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 requirement_id
#' @param accessor_id - The user whose access is being revoked
#' @param ... Other optional arguments
#' @return void
#' @export
DeleteRepoV1AccessApproval = function(requirement_id, accessor_id, ...) {
local_var_response <- self$DeleteRepoV1AccessApprovalWithHttpInfo(requirement_id, accessor_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 requirement_id
#' @param accessor_id - The user whose access is being revoked
#' @param ... Other optional arguments
#' @return API response (void) with additional information such as HTTP status code, headers
#' @export
DeleteRepoV1AccessApprovalWithHttpInfo = function(requirement_id, accessor_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(`requirement_id`)) {
stop("Missing required parameter `requirement_id`.")
}
if (missing(`accessor_id`)) {
stop("Missing required parameter `accessor_id`.")
}
query_params[["requirementId"]] <- `requirement_id`
query_params[["accessorId"]] <- `accessor_id`
local_var_url_path <- "/repo/v1/accessApproval"
# 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 approval_id
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return OrgSagebionetworksRepoModelAccessApproval
#' @export
GetRepoV1AccessApprovalApprovalId = function(approval_id, data_file = NULL, ...) {
local_var_response <- self$GetRepoV1AccessApprovalApprovalIdWithHttpInfo(approval_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 approval_id
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return API response (OrgSagebionetworksRepoModelAccessApproval) with additional information such as HTTP status code, headers
#' @export
GetRepoV1AccessApprovalApprovalIdWithHttpInfo = function(approval_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(`approval_id`)) {
stop("Missing required parameter `approval_id`.")
}
local_var_url_path <- "/repo/v1/accessApproval/{approvalId}"
if (!missing(`approval_id`)) {
local_var_url_path <- gsub("\\{approvalId\\}", URLencode(as.character(`approval_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(), "OrgSagebionetworksRepoModelAccessApproval", 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_access_approval
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return OrgSagebionetworksRepoModelAccessApproval
#' @export
PostRepoV1AccessApproval = function(org_sagebionetworks_repo_model_access_approval, data_file = NULL, ...) {
local_var_response <- self$PostRepoV1AccessApprovalWithHttpInfo(org_sagebionetworks_repo_model_access_approval, 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_access_approval
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return API response (OrgSagebionetworksRepoModelAccessApproval) with additional information such as HTTP status code, headers
#' @export
PostRepoV1AccessApprovalWithHttpInfo = function(org_sagebionetworks_repo_model_access_approval, 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_access_approval`)) {
stop("Missing required parameter `org_sagebionetworks_repo_model_access_approval`.")
}
if (!is.null(`org_sagebionetworks_repo_model_access_approval`)) {
local_var_body <- `org_sagebionetworks_repo_model_access_approval`$toJSONString()
} else {
body <- NULL
}
local_var_url_path <- "/repo/v1/accessApproval"
# 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(), "OrgSagebionetworksRepoModelAccessApproval", 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_dataaccess_accessor_group_request
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return OrgSagebionetworksRepoModelDataaccessAccessorGroupResponse
#' @export
PostRepoV1AccessApprovalGroup = function(org_sagebionetworks_repo_model_dataaccess_accessor_group_request, data_file = NULL, ...) {
local_var_response <- self$PostRepoV1AccessApprovalGroupWithHttpInfo(org_sagebionetworks_repo_model_dataaccess_accessor_group_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_dataaccess_accessor_group_request
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return API response (OrgSagebionetworksRepoModelDataaccessAccessorGroupResponse) with additional information such as HTTP status code, headers
#' @export
PostRepoV1AccessApprovalGroupWithHttpInfo = function(org_sagebionetworks_repo_model_dataaccess_accessor_group_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_dataaccess_accessor_group_request`)) {
stop("Missing required parameter `org_sagebionetworks_repo_model_dataaccess_accessor_group_request`.")
}
if (!is.null(`org_sagebionetworks_repo_model_dataaccess_accessor_group_request`)) {
local_var_body <- `org_sagebionetworks_repo_model_dataaccess_accessor_group_request`$toJSONString()
} else {
body <- NULL
}
local_var_url_path <- "/repo/v1/accessApproval/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("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(), "OrgSagebionetworksRepoModelDataaccessAccessorGroupResponse", 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_batch_access_approval_info_request
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return OrgSagebionetworksRepoModelBatchAccessApprovalInfoResponse
#' @export
PostRepoV1AccessApprovalInformation = function(org_sagebionetworks_repo_model_batch_access_approval_info_request, data_file = NULL, ...) {
local_var_response <- self$PostRepoV1AccessApprovalInformationWithHttpInfo(org_sagebionetworks_repo_model_batch_access_approval_info_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_batch_access_approval_info_request
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return API response (OrgSagebionetworksRepoModelBatchAccessApprovalInfoResponse) with additional information such as HTTP status code, headers
#' @export
PostRepoV1AccessApprovalInformationWithHttpInfo = function(org_sagebionetworks_repo_model_batch_access_approval_info_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_batch_access_approval_info_request`)) {
stop("Missing required parameter `org_sagebionetworks_repo_model_batch_access_approval_info_request`.")
}
if (!is.null(`org_sagebionetworks_repo_model_batch_access_approval_info_request`)) {
local_var_body <- `org_sagebionetworks_repo_model_batch_access_approval_info_request`$toJSONString()
} else {
body <- NULL
}
local_var_url_path <- "/repo/v1/accessApproval/information"
# 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(), "OrgSagebionetworksRepoModelBatchAccessApprovalInfoResponse", 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_dataaccess_access_approval_notification_request
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return OrgSagebionetworksRepoModelDataaccessAccessApprovalNotificationResponse
#' @export
PostRepoV1AccessApprovalNotifications = function(org_sagebionetworks_repo_model_dataaccess_access_approval_notification_request, data_file = NULL, ...) {
local_var_response <- self$PostRepoV1AccessApprovalNotificationsWithHttpInfo(org_sagebionetworks_repo_model_dataaccess_access_approval_notification_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_dataaccess_access_approval_notification_request
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return API response (OrgSagebionetworksRepoModelDataaccessAccessApprovalNotificationResponse) with additional information such as HTTP status code, headers
#' @export
PostRepoV1AccessApprovalNotificationsWithHttpInfo = function(org_sagebionetworks_repo_model_dataaccess_access_approval_notification_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_dataaccess_access_approval_notification_request`)) {
stop("Missing required parameter `org_sagebionetworks_repo_model_dataaccess_access_approval_notification_request`.")
}
if (!is.null(`org_sagebionetworks_repo_model_dataaccess_access_approval_notification_request`)) {
local_var_body <- `org_sagebionetworks_repo_model_dataaccess_access_approval_notification_request`$toJSONString()
} else {
body <- NULL
}
local_var_url_path <- "/repo/v1/accessApproval/notifications"
# 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(), "OrgSagebionetworksRepoModelDataaccessAccessApprovalNotificationResponse", 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_dataaccess_access_approval_search_request
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return OrgSagebionetworksRepoModelDataaccessAccessApprovalSearchResponse
#' @export
PostRepoV1AccessApprovalSearch = function(org_sagebionetworks_repo_model_dataaccess_access_approval_search_request, data_file = NULL, ...) {
local_var_response <- self$PostRepoV1AccessApprovalSearchWithHttpInfo(org_sagebionetworks_repo_model_dataaccess_access_approval_search_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_dataaccess_access_approval_search_request
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return API response (OrgSagebionetworksRepoModelDataaccessAccessApprovalSearchResponse) with additional information such as HTTP status code, headers
#' @export
PostRepoV1AccessApprovalSearchWithHttpInfo = function(org_sagebionetworks_repo_model_dataaccess_access_approval_search_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_dataaccess_access_approval_search_request`)) {
stop("Missing required parameter `org_sagebionetworks_repo_model_dataaccess_access_approval_search_request`.")
}
if (!is.null(`org_sagebionetworks_repo_model_dataaccess_access_approval_search_request`)) {
local_var_body <- `org_sagebionetworks_repo_model_dataaccess_access_approval_search_request`$toJSONString()
} else {
body <- NULL
}
local_var_url_path <- "/repo/v1/accessApproval/search"
# 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(), "OrgSagebionetworksRepoModelDataaccessAccessApprovalSearchResponse", 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_dataaccess_accessor_group_revoke_request
#' @param ... Other optional arguments
#' @return void
#' @export
PutRepoV1AccessApprovalGroupRevoke = function(org_sagebionetworks_repo_model_dataaccess_accessor_group_revoke_request, ...) {
local_var_response <- self$PutRepoV1AccessApprovalGroupRevokeWithHttpInfo(org_sagebionetworks_repo_model_dataaccess_accessor_group_revoke_request, ...)
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_dataaccess_accessor_group_revoke_request
#' @param ... Other optional arguments
#' @return API response (void) with additional information such as HTTP status code, headers
#' @export
PutRepoV1AccessApprovalGroupRevokeWithHttpInfo = function(org_sagebionetworks_repo_model_dataaccess_accessor_group_revoke_request, ...) {
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_dataaccess_accessor_group_revoke_request`)) {
stop("Missing required parameter `org_sagebionetworks_repo_model_dataaccess_accessor_group_revoke_request`.")
}
if (!is.null(`org_sagebionetworks_repo_model_dataaccess_accessor_group_revoke_request`)) {
local_var_body <- `org_sagebionetworks_repo_model_dataaccess_accessor_group_revoke_request`$toJSONString()
} else {
body <- NULL
}
local_var_url_path <- "/repo/v1/accessApproval/group/revoke"
# 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("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) {
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
}
}
)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.