#' 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 FileServices operations
#' @description FileServicesApi
#' @format An \code{R6Class} generator object
#' @field api_client Handles the client-server communication.
#'
#' @section Methods:
#' \describe{
#' \strong{ DeleteFileV1DownloadList } \emph{ }
#'
#' \itemize{
#'
#'
#' \item status code : 200 | Void
#'
#'
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ DeleteFileV1FileHandleHandleId } \emph{ }
#'
#' \itemize{
#' \item \emph{ @param } handle_id character
#'
#'
#' \item status code : 200 | Void
#'
#'
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ DeleteFileV1FileHandleHandleIdFilepreview } \emph{ }
#'
#' \itemize{
#' \item \emph{ @param } handle_id character
#'
#'
#' \item status code : 200 | Void
#'
#'
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ GetFileV1DownloadList } \emph{ }
#'
#' \itemize{
#' \item \emph{ @returnType } \link{OrgSagebionetworksRepoModelFileDownloadList} \cr
#'
#'
#' \item status code : 200 | Auto-generated description
#'
#' \item return type : OrgSagebionetworksRepoModelFileDownloadList
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ GetFileV1DownloadListAddAsyncGetAsyncToken } \emph{ }
#'
#' \itemize{
#' \item \emph{ @param } async_token character
#' \item \emph{ @returnType } \link{OrgSagebionetworksRepoModelFileAddFileToDownloadListResponse} \cr
#'
#'
#' \item status code : 201 | Auto-generated description
#'
#' \item return type : OrgSagebionetworksRepoModelFileAddFileToDownloadListResponse
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ GetFileV1DownloadOrderOrderId } \emph{ }
#'
#' \itemize{
#' \item \emph{ @param } order_id character
#' \item \emph{ @returnType } \link{OrgSagebionetworksRepoModelFileDownloadOrder} \cr
#'
#'
#' \item status code : 200 | Auto-generated description
#'
#' \item return type : OrgSagebionetworksRepoModelFileDownloadOrder
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ GetFileV1EntityIdUploadDestination } \emph{ }
#'
#' \itemize{
#' \item \emph{ @param } id character
#' \item \emph{ @returnType } \link{OrgSagebionetworksRepoModelFileUploadDestination} \cr
#'
#'
#' \item status code : 200 | Auto-generated description
#'
#' \item return type : OrgSagebionetworksRepoModelFileUploadDestination
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ GetFileV1EntityIdUploadDestinationLocations } \emph{ }
#'
#' \itemize{
#' \item \emph{ @param } id character
#' \item \emph{ @returnType } \link{ListWrapperOfUploadDestinationLocation} \cr
#'
#'
#' \item status code : 200 | Auto-generated description
#'
#' \item return type : ListWrapperOfUploadDestinationLocation
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ GetFileV1EntityIdUploadDestinationStorageLocationId } \emph{ }
#'
#' \itemize{
#' \item \emph{ @param } id character
#' \item \emph{ @param } storage_location_id numeric
#' \item \emph{ @returnType } \link{OrgSagebionetworksRepoModelFileUploadDestination} \cr
#'
#'
#' \item status code : 200 | Auto-generated description
#'
#' \item return type : OrgSagebionetworksRepoModelFileUploadDestination
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ GetFileV1FileBulkAsyncGetAsyncToken } \emph{ }
#'
#' \itemize{
#' \item \emph{ @param } async_token character
#' \item \emph{ @returnType } \link{OrgSagebionetworksRepoModelFileBulkFileDownloadResponse} \cr
#'
#'
#' \item status code : 201 | Auto-generated description
#'
#' \item return type : OrgSagebionetworksRepoModelFileBulkFileDownloadResponse
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ GetFileV1FileHandleHandleId } \emph{ }
#'
#' \itemize{
#' \item \emph{ @param } handle_id character
#' \item \emph{ @returnType } \link{OrgSagebionetworksRepoModelFileFileHandle} \cr
#'
#'
#' \item status code : 200 | Auto-generated description
#'
#' \item return type : OrgSagebionetworksRepoModelFileFileHandle
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ GetFileV1FileHandleHandleIdUrl } \emph{ }
#'
#' \itemize{
#' \item \emph{ @param } handle_id character
#' \item \emph{ @param } redirect character
#' \item \emph{ @returnType } \link{AnyType} \cr
#'
#'
#' \item status code : 200 | Status 200 will be returned if the 'redirect' boolean param is false
#'
#' \item return type : AnyType
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' \item status code : 307 | Status 307 will be returned if the 'redirect' boolean param is true or null
#'
#'
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ GetFileV1FileHandleRestoreAsyncGetAsyncToken } \emph{ }
#'
#' \itemize{
#' \item \emph{ @param } async_token character
#' \item \emph{ @returnType } \link{OrgSagebionetworksRepoModelFileFileHandleRestoreResponse} \cr
#'
#'
#' \item status code : 201 | Auto-generated description
#'
#' \item return type : OrgSagebionetworksRepoModelFileFileHandleRestoreResponse
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ GetFileV1FileId } \emph{ }
#'
#' \itemize{
#' \item \emph{ @param } id character
#' \item \emph{ @param } file_associate_type \link{OrgSagebionetworksRepoModelFileFileHandleAssociateType}
#' \item \emph{ @param } file_associate_id character
#' \item \emph{ @param } redirect character
#' \item \emph{ @returnType } \link{AnyType} \cr
#'
#'
#' \item status code : 200 | Status 200 will be returned if the 'redirect' boolean param is false
#'
#' \item return type : AnyType
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' \item status code : 307 | Status 307 will be returned if the 'redirect' boolean param is true or null
#'
#'
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ PostFileV1DownloadListAdd } \emph{ }
#'
#' \itemize{
#' \item \emph{ @param } org_sagebionetworks_repo_model_file_file_handle_association_list \link{OrgSagebionetworksRepoModelFileFileHandleAssociationList}
#' \item \emph{ @returnType } \link{OrgSagebionetworksRepoModelFileDownloadList} \cr
#'
#'
#' \item status code : 201 | Auto-generated description
#'
#' \item return type : OrgSagebionetworksRepoModelFileDownloadList
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ PostFileV1DownloadListAddAsyncStart } \emph{ }
#'
#' \itemize{
#' \item \emph{ @param } org_sagebionetworks_repo_model_file_add_file_to_download_list_request \link{OrgSagebionetworksRepoModelFileAddFileToDownloadListRequest}
#' \item \emph{ @returnType } \link{OrgSagebionetworksRepoModelAsynchAsyncJobId} \cr
#'
#'
#' \item status code : 201 | Auto-generated description
#'
#' \item return type : OrgSagebionetworksRepoModelAsynchAsyncJobId
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ PostFileV1DownloadListRemove } \emph{ }
#'
#' \itemize{
#' \item \emph{ @param } org_sagebionetworks_repo_model_file_file_handle_association_list \link{OrgSagebionetworksRepoModelFileFileHandleAssociationList}
#' \item \emph{ @returnType } \link{OrgSagebionetworksRepoModelFileDownloadList} \cr
#'
#'
#' \item status code : 201 | Auto-generated description
#'
#' \item return type : OrgSagebionetworksRepoModelFileDownloadList
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ PostFileV1DownloadOrder } \emph{ }
#'
#' \itemize{
#' \item \emph{ @param } zip_file_name character
#' \item \emph{ @returnType } \link{OrgSagebionetworksRepoModelFileDownloadOrder} \cr
#'
#'
#' \item status code : 201 | Auto-generated description
#'
#' \item return type : OrgSagebionetworksRepoModelFileDownloadOrder
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ PostFileV1DownloadOrderHistory } \emph{ }
#'
#' \itemize{
#' \item \emph{ @param } org_sagebionetworks_repo_model_file_download_order_summary_request \link{OrgSagebionetworksRepoModelFileDownloadOrderSummaryRequest}
#' \item \emph{ @returnType } \link{OrgSagebionetworksRepoModelFileDownloadOrderSummaryResponse} \cr
#'
#'
#' \item status code : 201 | A single page of download order summaries.
#'
#' \item return type : OrgSagebionetworksRepoModelFileDownloadOrderSummaryResponse
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ PostFileV1ExternalFileHandle } \emph{ }
#'
#' \itemize{
#' \item \emph{ @param } org_sagebionetworks_repo_model_file_external_file_handle_interface \link{OrgSagebionetworksRepoModelFileExternalFileHandleInterface}
#' \item \emph{ @returnType } \link{OrgSagebionetworksRepoModelFileExternalFileHandleInterface} \cr
#'
#'
#' \item status code : 200 | Auto-generated description
#'
#' \item return type : OrgSagebionetworksRepoModelFileExternalFileHandleInterface
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ PostFileV1ExternalFileHandleGoogleCloud } \emph{ }
#'
#' \itemize{
#' \item \emph{ @param } org_sagebionetworks_repo_model_file_google_cloud_file_handle \link{OrgSagebionetworksRepoModelFileGoogleCloudFileHandle}
#' \item \emph{ @returnType } \link{OrgSagebionetworksRepoModelFileGoogleCloudFileHandle} \cr
#'
#'
#' \item status code : 200 | Auto-generated description
#'
#' \item return type : OrgSagebionetworksRepoModelFileGoogleCloudFileHandle
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ PostFileV1ExternalFileHandleS3 } \emph{ }
#'
#' \itemize{
#' \item \emph{ @param } org_sagebionetworks_repo_model_file_s3_file_handle \link{OrgSagebionetworksRepoModelFileS3FileHandle}
#' \item \emph{ @returnType } \link{OrgSagebionetworksRepoModelFileS3FileHandle} \cr
#'
#'
#' \item status code : 200 | Auto-generated description
#'
#' \item return type : OrgSagebionetworksRepoModelFileS3FileHandle
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ PostFileV1FileBulkAsyncStart } \emph{ }
#'
#' \itemize{
#' \item \emph{ @param } org_sagebionetworks_repo_model_file_bulk_file_download_request \link{OrgSagebionetworksRepoModelFileBulkFileDownloadRequest}
#' \item \emph{ @returnType } \link{OrgSagebionetworksRepoModelAsynchAsyncJobId} \cr
#'
#'
#' \item status code : 201 | Auto-generated description
#'
#' \item return type : OrgSagebionetworksRepoModelAsynchAsyncJobId
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ PostFileV1FileHandleBatch } \emph{ }
#'
#' \itemize{
#' \item \emph{ @param } org_sagebionetworks_repo_model_file_batch_file_request \link{OrgSagebionetworksRepoModelFileBatchFileRequest}
#' \item \emph{ @returnType } \link{OrgSagebionetworksRepoModelFileBatchFileResult} \cr
#'
#'
#' \item status code : 201 | Auto-generated description
#'
#' \item return type : OrgSagebionetworksRepoModelFileBatchFileResult
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ PostFileV1FileHandleHandleIdToCopyFromCopy } \emph{ }
#'
#' \itemize{
#' \item \emph{ @param } handle_id_to_copy_from character
#' \item \emph{ @param } org_sagebionetworks_repo_model_file_s3_file_handle \link{OrgSagebionetworksRepoModelFileS3FileHandle}
#' \item \emph{ @returnType } \link{OrgSagebionetworksRepoModelFileS3FileHandle} \cr
#'
#'
#' \item status code : 201 | Auto-generated description
#'
#' \item return type : OrgSagebionetworksRepoModelFileS3FileHandle
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ PostFileV1FileHandleRestoreAsyncStart } \emph{ }
#'
#' \itemize{
#' \item \emph{ @param } org_sagebionetworks_repo_model_file_file_handle_restore_request \link{OrgSagebionetworksRepoModelFileFileHandleRestoreRequest}
#' \item \emph{ @returnType } \link{OrgSagebionetworksRepoModelAsynchAsyncJobId} \cr
#'
#'
#' \item status code : 201 | Auto-generated description
#'
#' \item return type : OrgSagebionetworksRepoModelAsynchAsyncJobId
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ PostFileV1FileMultipart } \emph{ }
#'
#' \itemize{
#' \item \emph{ @param } org_sagebionetworks_repo_model_file_multipart_request \link{OrgSagebionetworksRepoModelFileMultipartRequest}
#' \item \emph{ @param } force_restart character
#' \item \emph{ @returnType } \link{OrgSagebionetworksRepoModelFileMultipartUploadStatus} \cr
#'
#'
#' \item status code : 201 | Auto-generated description
#'
#' \item return type : OrgSagebionetworksRepoModelFileMultipartUploadStatus
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ PostFileV1FileMultipartUploadIdPresignedUrlBatch } \emph{ }
#'
#' \itemize{
#' \item \emph{ @param } upload_id character
#' \item \emph{ @param } org_sagebionetworks_repo_model_file_batch_presigned_upload_url_request \link{OrgSagebionetworksRepoModelFileBatchPresignedUploadUrlRequest}
#' \item \emph{ @returnType } \link{OrgSagebionetworksRepoModelFileBatchPresignedUploadUrlResponse} \cr
#'
#'
#' \item status code : 201 | Auto-generated description
#'
#' \item return type : OrgSagebionetworksRepoModelFileBatchPresignedUploadUrlResponse
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ PostFileV1FilehandlesCopy } \emph{ }
#'
#' \itemize{
#' \item \emph{ @param } org_sagebionetworks_repo_model_file_batch_file_handle_copy_request \link{OrgSagebionetworksRepoModelFileBatchFileHandleCopyRequest}
#' \item \emph{ @returnType } \link{OrgSagebionetworksRepoModelFileBatchFileHandleCopyResult} \cr
#'
#'
#' \item status code : 200 | Auto-generated description
#'
#' \item return type : OrgSagebionetworksRepoModelFileBatchFileHandleCopyResult
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ PutFileV1FileMultipartUploadIdAddPartNumber } \emph{ }
#'
#' \itemize{
#' \item \emph{ @param } upload_id character
#' \item \emph{ @param } part_number integer
#' \item \emph{ @param } part_md5_hex character
#' \item \emph{ @returnType } \link{OrgSagebionetworksRepoModelFileAddPartResponse} \cr
#'
#'
#' \item status code : 201 | The response will indicate if add succeeded or failed. When an add fails, the response will include an error message.
#'
#' \item return type : OrgSagebionetworksRepoModelFileAddPartResponse
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ PutFileV1FileMultipartUploadIdComplete } \emph{ }
#'
#' \itemize{
#' \item \emph{ @param } upload_id character
#' \item \emph{ @returnType } \link{OrgSagebionetworksRepoModelFileMultipartUploadStatus} \cr
#'
#'
#' \item status code : 201 | If successful, the response will include the ID of the new file handle.
#'
#' \item return type : OrgSagebionetworksRepoModelFileMultipartUploadStatus
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' }
#'
#'
#' @examples
#' \dontrun{
#' #################### DeleteFileV1DownloadList ####################
#'
#' library(synclient)
#'
#' api_instance <- FileServicesApi$new()
#'
#' # Configure HTTP bearer authorization: bearerAuth
#' api_instance$api_client$bearer_token <- Sys.getenv("BEARER_TOKEN")
#'
#' api_instance$DeleteFileV1DownloadList()
#'
#'
#' #################### DeleteFileV1FileHandleHandleId ####################
#'
#' library(synclient)
#' var_handle_id <- "handle_id_example" # character |
#'
#' api_instance <- FileServicesApi$new()
#'
#' # Configure HTTP bearer authorization: bearerAuth
#' api_instance$api_client$bearer_token <- Sys.getenv("BEARER_TOKEN")
#'
#' api_instance$DeleteFileV1FileHandleHandleId(var_handle_id)
#'
#'
#' #################### DeleteFileV1FileHandleHandleIdFilepreview ####################
#'
#' library(synclient)
#' var_handle_id <- "handle_id_example" # character | The ID of the FileHandle whose preview should be cleared.
#'
#' api_instance <- FileServicesApi$new()
#'
#' # Configure HTTP bearer authorization: bearerAuth
#' api_instance$api_client$bearer_token <- Sys.getenv("BEARER_TOKEN")
#'
#' api_instance$DeleteFileV1FileHandleHandleIdFilepreview(var_handle_id)
#'
#'
#' #################### GetFileV1DownloadList ####################
#'
#' library(synclient)
#'
#' api_instance <- FileServicesApi$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$GetFileV1DownloadList(data_file = "result.txt")
#' result <- api_instance$GetFileV1DownloadList()
#' dput(result)
#'
#'
#' #################### GetFileV1DownloadListAddAsyncGetAsyncToken ####################
#'
#' library(synclient)
#' var_async_token <- "async_token_example" # character |
#'
#' api_instance <- FileServicesApi$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$GetFileV1DownloadListAddAsyncGetAsyncToken(var_async_tokendata_file = "result.txt")
#' result <- api_instance$GetFileV1DownloadListAddAsyncGetAsyncToken(var_async_token)
#' dput(result)
#'
#'
#' #################### GetFileV1DownloadOrderOrderId ####################
#'
#' library(synclient)
#' var_order_id <- "order_id_example" # character | The ID of the download order to fetch.
#'
#' api_instance <- FileServicesApi$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$GetFileV1DownloadOrderOrderId(var_order_iddata_file = "result.txt")
#' result <- api_instance$GetFileV1DownloadOrderOrderId(var_order_id)
#' dput(result)
#'
#'
#' #################### GetFileV1EntityIdUploadDestination ####################
#'
#' library(synclient)
#' var_id <- "id_example" # character |
#'
#' api_instance <- FileServicesApi$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$GetFileV1EntityIdUploadDestination(var_iddata_file = "result.txt")
#' result <- api_instance$GetFileV1EntityIdUploadDestination(var_id)
#' dput(result)
#'
#'
#' #################### GetFileV1EntityIdUploadDestinationLocations ####################
#'
#' library(synclient)
#' var_id <- "id_example" # character |
#'
#' api_instance <- FileServicesApi$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$GetFileV1EntityIdUploadDestinationLocations(var_iddata_file = "result.txt")
#' result <- api_instance$GetFileV1EntityIdUploadDestinationLocations(var_id)
#' dput(result)
#'
#'
#' #################### GetFileV1EntityIdUploadDestinationStorageLocationId ####################
#'
#' library(synclient)
#' var_id <- "id_example" # character |
#' var_storage_location_id <- 3.4 # numeric |
#'
#' api_instance <- FileServicesApi$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$GetFileV1EntityIdUploadDestinationStorageLocationId(var_id, var_storage_location_iddata_file = "result.txt")
#' result <- api_instance$GetFileV1EntityIdUploadDestinationStorageLocationId(var_id, var_storage_location_id)
#' dput(result)
#'
#'
#' #################### GetFileV1FileBulkAsyncGetAsyncToken ####################
#'
#' library(synclient)
#' var_async_token <- "async_token_example" # character |
#'
#' api_instance <- FileServicesApi$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$GetFileV1FileBulkAsyncGetAsyncToken(var_async_tokendata_file = "result.txt")
#' result <- api_instance$GetFileV1FileBulkAsyncGetAsyncToken(var_async_token)
#' dput(result)
#'
#'
#' #################### GetFileV1FileHandleHandleId ####################
#'
#' library(synclient)
#' var_handle_id <- "handle_id_example" # character | The ID of the FileHandle to fetch.
#'
#' api_instance <- FileServicesApi$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$GetFileV1FileHandleHandleId(var_handle_iddata_file = "result.txt")
#' result <- api_instance$GetFileV1FileHandleHandleId(var_handle_id)
#' dput(result)
#'
#'
#' #################### GetFileV1FileHandleHandleIdUrl ####################
#'
#' library(synclient)
#' var_handle_id <- "handle_id_example" # character |
#' var_redirect <- "redirect_example" # character | When set to false, the URL will be returned as text/plain instead of redirecting. (Optional)
#'
#' api_instance <- FileServicesApi$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$GetFileV1FileHandleHandleIdUrl(var_handle_id, redirect = var_redirectdata_file = "result.txt")
#' result <- api_instance$GetFileV1FileHandleHandleIdUrl(var_handle_id, redirect = var_redirect)
#' dput(result)
#'
#'
#' #################### GetFileV1FileHandleRestoreAsyncGetAsyncToken ####################
#'
#' library(synclient)
#' var_async_token <- "async_token_example" # character |
#'
#' api_instance <- FileServicesApi$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$GetFileV1FileHandleRestoreAsyncGetAsyncToken(var_async_tokendata_file = "result.txt")
#' result <- api_instance$GetFileV1FileHandleRestoreAsyncGetAsyncToken(var_async_token)
#' dput(result)
#'
#'
#' #################### GetFileV1FileId ####################
#'
#' library(synclient)
#' var_id <- "id_example" # character | the ID of the file handle to be downloaded
#' var_file_associate_type <- org.sagebionetworks.repo.model.file.FileHandleAssociateType$new() # OrgSagebionetworksRepoModelFileFileHandleAssociateType | the type of object with which the file is associated
#' var_file_associate_id <- "file_associate_id_example" # character | the ID fo the object with which the file is associated
#' var_redirect <- "redirect_example" # character | When set to false, the URL will be returned as text/plain instead of redirecting. (Optional)
#'
#' api_instance <- FileServicesApi$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$GetFileV1FileId(var_id, var_file_associate_type, var_file_associate_id, redirect = var_redirectdata_file = "result.txt")
#' result <- api_instance$GetFileV1FileId(var_id, var_file_associate_type, var_file_associate_id, redirect = var_redirect)
#' dput(result)
#'
#'
#' #################### PostFileV1DownloadListAdd ####################
#'
#' library(synclient)
#' var_org_sagebionetworks_repo_model_file_file_handle_association_list <- org.sagebionetworks.repo.model.file.FileHandleAssociationList$new(c(org.sagebionetworks.repo.model.file.FileHandleAssociation$new("fileHandleId_example", "associateObjectId_example", "associateObjectType_example"))) # OrgSagebionetworksRepoModelFileFileHandleAssociationList |
#'
#' api_instance <- FileServicesApi$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$PostFileV1DownloadListAdd(var_org_sagebionetworks_repo_model_file_file_handle_association_listdata_file = "result.txt")
#' result <- api_instance$PostFileV1DownloadListAdd(var_org_sagebionetworks_repo_model_file_file_handle_association_list)
#' dput(result)
#'
#'
#' #################### PostFileV1DownloadListAddAsyncStart ####################
#'
#' library(synclient)
#' var_org_sagebionetworks_repo_model_file_add_file_to_download_list_request <- org.sagebionetworks.repo.model.file.AddFileToDownloadListRequest$new("concreteType_example", "folderId_example", org.sagebionetworks.repo.model.table.Query$new("sql_example", c(org.sagebionetworks.repo.model.table.QueryFilter$new("concreteType_example", "isDefiningCondition_example", "columnName_example", "function_example", c("values_example"), "operator_example", "searchExpression_example")), c(org.sagebionetworks.repo.model.table.FacetColumnRequest$new("concreteType_example", "columnName_example", "jsonPath_example", c("facetValues_example"), "min_example", "max_example")), "includeEntityEtag_example", 123, 123, 123, c(org.sagebionetworks.repo.model.table.SortItem$new("column_example", "direction_example")))) # OrgSagebionetworksRepoModelFileAddFileToDownloadListRequest |
#'
#' api_instance <- FileServicesApi$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$PostFileV1DownloadListAddAsyncStart(var_org_sagebionetworks_repo_model_file_add_file_to_download_list_requestdata_file = "result.txt")
#' result <- api_instance$PostFileV1DownloadListAddAsyncStart(var_org_sagebionetworks_repo_model_file_add_file_to_download_list_request)
#' dput(result)
#'
#'
#' #################### PostFileV1DownloadListRemove ####################
#'
#' library(synclient)
#' var_org_sagebionetworks_repo_model_file_file_handle_association_list <- org.sagebionetworks.repo.model.file.FileHandleAssociationList$new(c(org.sagebionetworks.repo.model.file.FileHandleAssociation$new("fileHandleId_example", "associateObjectId_example", "associateObjectType_example"))) # OrgSagebionetworksRepoModelFileFileHandleAssociationList |
#'
#' api_instance <- FileServicesApi$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$PostFileV1DownloadListRemove(var_org_sagebionetworks_repo_model_file_file_handle_association_listdata_file = "result.txt")
#' result <- api_instance$PostFileV1DownloadListRemove(var_org_sagebionetworks_repo_model_file_file_handle_association_list)
#' dput(result)
#'
#'
#' #################### PostFileV1DownloadOrder ####################
#'
#' library(synclient)
#' var_zip_file_name <- "zip_file_name_example" # character | The name to given to the resulting zip file.
#'
#' api_instance <- FileServicesApi$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$PostFileV1DownloadOrder(var_zip_file_namedata_file = "result.txt")
#' result <- api_instance$PostFileV1DownloadOrder(var_zip_file_name)
#' dput(result)
#'
#'
#' #################### PostFileV1DownloadOrderHistory ####################
#'
#' library(synclient)
#' var_org_sagebionetworks_repo_model_file_download_order_summary_request <- org.sagebionetworks.repo.model.file.DownloadOrderSummaryRequest$new("nextPageToken_example") # OrgSagebionetworksRepoModelFileDownloadOrderSummaryRequest |
#'
#' api_instance <- FileServicesApi$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$PostFileV1DownloadOrderHistory(var_org_sagebionetworks_repo_model_file_download_order_summary_requestdata_file = "result.txt")
#' result <- api_instance$PostFileV1DownloadOrderHistory(var_org_sagebionetworks_repo_model_file_download_order_summary_request)
#' dput(result)
#'
#'
#' #################### PostFileV1ExternalFileHandle ####################
#'
#' library(synclient)
#' var_org_sagebionetworks_repo_model_file_external_file_handle_interface <- org.sagebionetworks.repo.model.file.ExternalFileHandleInterface$new("id_example", "etag_example", "createdBy_example", "createdOn_example", "modifiedOn_example", "concreteType_example", "contentType_example", "contentMd5_example", "fileName_example", 123, 123, "status_example", "endpointUrl_example", "bucket_example", "fileKey_example", "filePath_example", "externalURL_example") # OrgSagebionetworksRepoModelFileExternalFileHandleInterface |
#'
#' api_instance <- FileServicesApi$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$PostFileV1ExternalFileHandle(var_org_sagebionetworks_repo_model_file_external_file_handle_interfacedata_file = "result.txt")
#' result <- api_instance$PostFileV1ExternalFileHandle(var_org_sagebionetworks_repo_model_file_external_file_handle_interface)
#' dput(result)
#'
#'
#' #################### PostFileV1ExternalFileHandleGoogleCloud ####################
#'
#' library(synclient)
#' var_org_sagebionetworks_repo_model_file_google_cloud_file_handle <- org.sagebionetworks.repo.model.file.GoogleCloudFileHandle$new("id_example", "etag_example", "createdBy_example", "createdOn_example", "modifiedOn_example", "concreteType_example", "contentType_example", "contentMd5_example", "fileName_example", 123, 123, "status_example", "bucketName_example", "key_example", "previewId_example", "isPreview_example") # OrgSagebionetworksRepoModelFileGoogleCloudFileHandle |
#'
#' api_instance <- FileServicesApi$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$PostFileV1ExternalFileHandleGoogleCloud(var_org_sagebionetworks_repo_model_file_google_cloud_file_handledata_file = "result.txt")
#' result <- api_instance$PostFileV1ExternalFileHandleGoogleCloud(var_org_sagebionetworks_repo_model_file_google_cloud_file_handle)
#' dput(result)
#'
#'
#' #################### PostFileV1ExternalFileHandleS3 ####################
#'
#' library(synclient)
#' var_org_sagebionetworks_repo_model_file_s3_file_handle <- org.sagebionetworks.repo.model.file.S3FileHandle$new("id_example", "etag_example", "createdBy_example", "createdOn_example", "modifiedOn_example", "concreteType_example", "contentType_example", "contentMd5_example", "fileName_example", 123, 123, "status_example", "bucketName_example", "key_example", "previewId_example", "isPreview_example") # OrgSagebionetworksRepoModelFileS3FileHandle |
#'
#' api_instance <- FileServicesApi$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$PostFileV1ExternalFileHandleS3(var_org_sagebionetworks_repo_model_file_s3_file_handledata_file = "result.txt")
#' result <- api_instance$PostFileV1ExternalFileHandleS3(var_org_sagebionetworks_repo_model_file_s3_file_handle)
#' dput(result)
#'
#'
#' #################### PostFileV1FileBulkAsyncStart ####################
#'
#' library(synclient)
#' var_org_sagebionetworks_repo_model_file_bulk_file_download_request <- org.sagebionetworks.repo.model.file.BulkFileDownloadRequest$new("concreteType_example", c(org.sagebionetworks.repo.model.file.FileHandleAssociation$new("fileHandleId_example", "associateObjectId_example", "associateObjectType_example")), "zipFileName_example", "zipFileFormat_example") # OrgSagebionetworksRepoModelFileBulkFileDownloadRequest |
#'
#' api_instance <- FileServicesApi$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$PostFileV1FileBulkAsyncStart(var_org_sagebionetworks_repo_model_file_bulk_file_download_requestdata_file = "result.txt")
#' result <- api_instance$PostFileV1FileBulkAsyncStart(var_org_sagebionetworks_repo_model_file_bulk_file_download_request)
#' dput(result)
#'
#'
#' #################### PostFileV1FileHandleBatch ####################
#'
#' library(synclient)
#' var_org_sagebionetworks_repo_model_file_batch_file_request <- org.sagebionetworks.repo.model.file.BatchFileRequest$new(c(org.sagebionetworks.repo.model.file.FileHandleAssociation$new("fileHandleId_example", "associateObjectId_example", "associateObjectType_example")), "includePreSignedURLs_example", "includeFileHandles_example", "includePreviewPreSignedURLs_example") # OrgSagebionetworksRepoModelFileBatchFileRequest |
#'
#' api_instance <- FileServicesApi$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$PostFileV1FileHandleBatch(var_org_sagebionetworks_repo_model_file_batch_file_requestdata_file = "result.txt")
#' result <- api_instance$PostFileV1FileHandleBatch(var_org_sagebionetworks_repo_model_file_batch_file_request)
#' dput(result)
#'
#'
#' #################### PostFileV1FileHandleHandleIdToCopyFromCopy ####################
#'
#' library(synclient)
#' var_handle_id_to_copy_from <- "handle_id_to_copy_from_example" # character | the file handle it from which to duplicate the data
#' var_org_sagebionetworks_repo_model_file_s3_file_handle <- org.sagebionetworks.repo.model.file.S3FileHandle$new("id_example", "etag_example", "createdBy_example", "createdOn_example", "modifiedOn_example", "concreteType_example", "contentType_example", "contentMd5_example", "fileName_example", 123, 123, "status_example", "bucketName_example", "key_example", "previewId_example", "isPreview_example") # OrgSagebionetworksRepoModelFileS3FileHandle |
#'
#' api_instance <- FileServicesApi$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$PostFileV1FileHandleHandleIdToCopyFromCopy(var_handle_id_to_copy_from, var_org_sagebionetworks_repo_model_file_s3_file_handledata_file = "result.txt")
#' result <- api_instance$PostFileV1FileHandleHandleIdToCopyFromCopy(var_handle_id_to_copy_from, var_org_sagebionetworks_repo_model_file_s3_file_handle)
#' dput(result)
#'
#'
#' #################### PostFileV1FileHandleRestoreAsyncStart ####################
#'
#' library(synclient)
#' var_org_sagebionetworks_repo_model_file_file_handle_restore_request <- org.sagebionetworks.repo.model.file.FileHandleRestoreRequest$new("concreteType_example", c("fileHandleIds_example")) # OrgSagebionetworksRepoModelFileFileHandleRestoreRequest |
#'
#' api_instance <- FileServicesApi$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$PostFileV1FileHandleRestoreAsyncStart(var_org_sagebionetworks_repo_model_file_file_handle_restore_requestdata_file = "result.txt")
#' result <- api_instance$PostFileV1FileHandleRestoreAsyncStart(var_org_sagebionetworks_repo_model_file_file_handle_restore_request)
#' dput(result)
#'
#'
#' #################### PostFileV1FileMultipart ####################
#'
#' library(synclient)
#' var_org_sagebionetworks_repo_model_file_multipart_request <- org.sagebionetworks.repo.model.file.MultipartRequest$new("concreteType_example", 123, "fileName_example", 123, "generatePreview_example", org.sagebionetworks.repo.model.file.FileHandleAssociation$new("fileHandleId_example", "associateObjectId_example", "associateObjectType_example"), "contentMD5Hex_example", "contentType_example", 123) # OrgSagebionetworksRepoModelFileMultipartRequest |
#' var_force_restart <- "force_restart_example" # character | Optional parameter. When 'forceRestart=true' is included, any upload state for the given file will be cleared and a new upload will be started. (Optional)
#'
#' api_instance <- FileServicesApi$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$PostFileV1FileMultipart(var_org_sagebionetworks_repo_model_file_multipart_request, force_restart = var_force_restartdata_file = "result.txt")
#' result <- api_instance$PostFileV1FileMultipart(var_org_sagebionetworks_repo_model_file_multipart_request, force_restart = var_force_restart)
#' dput(result)
#'
#'
#' #################### PostFileV1FileMultipartUploadIdPresignedUrlBatch ####################
#'
#' library(synclient)
#' var_upload_id <- "upload_id_example" # character | The unique identifier of the file upload.
#' var_org_sagebionetworks_repo_model_file_batch_presigned_upload_url_request <- org.sagebionetworks.repo.model.file.BatchPresignedUploadUrlRequest$new("uploadId_example", c(123), "contentType_example") # OrgSagebionetworksRepoModelFileBatchPresignedUploadUrlRequest |
#'
#' api_instance <- FileServicesApi$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$PostFileV1FileMultipartUploadIdPresignedUrlBatch(var_upload_id, var_org_sagebionetworks_repo_model_file_batch_presigned_upload_url_requestdata_file = "result.txt")
#' result <- api_instance$PostFileV1FileMultipartUploadIdPresignedUrlBatch(var_upload_id, var_org_sagebionetworks_repo_model_file_batch_presigned_upload_url_request)
#' dput(result)
#'
#'
#' #################### PostFileV1FilehandlesCopy ####################
#'
#' library(synclient)
#' var_org_sagebionetworks_repo_model_file_batch_file_handle_copy_request <- org.sagebionetworks.repo.model.file.BatchFileHandleCopyRequest$new(c(org.sagebionetworks.repo.model.file.FileHandleCopyRequest$new(org.sagebionetworks.repo.model.file.FileHandleAssociation$new("fileHandleId_example", "associateObjectId_example", "associateObjectType_example"), "newFileName_example", "newContentType_example"))) # OrgSagebionetworksRepoModelFileBatchFileHandleCopyRequest |
#'
#' api_instance <- FileServicesApi$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$PostFileV1FilehandlesCopy(var_org_sagebionetworks_repo_model_file_batch_file_handle_copy_requestdata_file = "result.txt")
#' result <- api_instance$PostFileV1FilehandlesCopy(var_org_sagebionetworks_repo_model_file_batch_file_handle_copy_request)
#' dput(result)
#'
#'
#' #################### PutFileV1FileMultipartUploadIdAddPartNumber ####################
#'
#' library(synclient)
#' var_upload_id <- "upload_id_example" # character | The unique identifier of the file upload.
#' var_part_number <- 56 # integer | The part number to add. Must be a number between 1 and 10,000.
#' var_part_md5_hex <- "part_md5_hex_example" # character | The MD5 of the uploaded part represented as a hexadecimal string. If the provided MD5 does not match the MD5 of the uploaded part, the add will fail.
#'
#' api_instance <- FileServicesApi$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$PutFileV1FileMultipartUploadIdAddPartNumber(var_upload_id, var_part_number, var_part_md5_hexdata_file = "result.txt")
#' result <- api_instance$PutFileV1FileMultipartUploadIdAddPartNumber(var_upload_id, var_part_number, var_part_md5_hex)
#' dput(result)
#'
#'
#' #################### PutFileV1FileMultipartUploadIdComplete ####################
#'
#' library(synclient)
#' var_upload_id <- "upload_id_example" # character | The unique identifier of the file upload.
#'
#' api_instance <- FileServicesApi$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$PutFileV1FileMultipartUploadIdComplete(var_upload_iddata_file = "result.txt")
#' result <- api_instance$PutFileV1FileMultipartUploadIdComplete(var_upload_id)
#' dput(result)
#'
#'
#' }
#' @importFrom R6 R6Class
#' @importFrom base64enc base64encode
#' @export
FileServicesApi <- R6::R6Class(
"FileServicesApi",
public = list(
api_client = NULL,
#' Initialize a new FileServicesApi.
#'
#' @description
#' Initialize a new FileServicesApi.
#'
#' @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 ... Other optional arguments
#' @return void
#' @export
DeleteFileV1DownloadList = function(...) {
local_var_response <- self$DeleteFileV1DownloadListWithHttpInfo(...)
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 ... Other optional arguments
#' @return API response (void) with additional information such as HTTP status code, headers
#' @export
DeleteFileV1DownloadListWithHttpInfo = function(...) {
args <- list(...)
query_params <- list()
header_params <- c()
form_params <- list()
file_params <- list()
local_var_body <- NULL
oauth_scopes <- NULL
is_oauth <- FALSE
local_var_url_path <- "/file/v1/download/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()
# 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 handle_id
#' @param ... Other optional arguments
#' @return void
#' @export
DeleteFileV1FileHandleHandleId = function(handle_id, ...) {
local_var_response <- self$DeleteFileV1FileHandleHandleIdWithHttpInfo(handle_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 handle_id
#' @param ... Other optional arguments
#' @return API response (void) with additional information such as HTTP status code, headers
#' @export
DeleteFileV1FileHandleHandleIdWithHttpInfo = function(handle_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(`handle_id`)) {
stop("Missing required parameter `handle_id`.")
}
local_var_url_path <- "/file/v1/fileHandle/{handleId}"
if (!missing(`handle_id`)) {
local_var_url_path <- gsub("\\{handleId\\}", URLencode(as.character(`handle_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 handle_id The ID of the FileHandle whose preview should be cleared.
#' @param ... Other optional arguments
#' @return void
#' @export
DeleteFileV1FileHandleHandleIdFilepreview = function(handle_id, ...) {
local_var_response <- self$DeleteFileV1FileHandleHandleIdFilepreviewWithHttpInfo(handle_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 handle_id The ID of the FileHandle whose preview should be cleared.
#' @param ... Other optional arguments
#' @return API response (void) with additional information such as HTTP status code, headers
#' @export
DeleteFileV1FileHandleHandleIdFilepreviewWithHttpInfo = function(handle_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(`handle_id`)) {
stop("Missing required parameter `handle_id`.")
}
local_var_url_path <- "/file/v1/fileHandle/{handleId}/filepreview"
if (!missing(`handle_id`)) {
local_var_url_path <- gsub("\\{handleId\\}", URLencode(as.character(`handle_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 data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return OrgSagebionetworksRepoModelFileDownloadList
#' @export
GetFileV1DownloadList = function(data_file = NULL, ...) {
local_var_response <- self$GetFileV1DownloadListWithHttpInfo(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 data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return API response (OrgSagebionetworksRepoModelFileDownloadList) with additional information such as HTTP status code, headers
#' @export
GetFileV1DownloadListWithHttpInfo = function(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
local_var_url_path <- "/file/v1/download/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()
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(), "OrgSagebionetworksRepoModelFileDownloadList", 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 async_token
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return OrgSagebionetworksRepoModelFileAddFileToDownloadListResponse
#' @export
GetFileV1DownloadListAddAsyncGetAsyncToken = function(async_token, data_file = NULL, ...) {
local_var_response <- self$GetFileV1DownloadListAddAsyncGetAsyncTokenWithHttpInfo(async_token, 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 async_token
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return API response (OrgSagebionetworksRepoModelFileAddFileToDownloadListResponse) with additional information such as HTTP status code, headers
#' @export
GetFileV1DownloadListAddAsyncGetAsyncTokenWithHttpInfo = function(async_token, 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(`async_token`)) {
stop("Missing required parameter `async_token`.")
}
local_var_url_path <- "/file/v1/download/list/add/async/get/{asyncToken}"
if (!missing(`async_token`)) {
local_var_url_path <- gsub("\\{asyncToken\\}", URLencode(as.character(`async_token`), 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(), "OrgSagebionetworksRepoModelFileAddFileToDownloadListResponse", 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 order_id The ID of the download order to fetch.
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return OrgSagebionetworksRepoModelFileDownloadOrder
#' @export
GetFileV1DownloadOrderOrderId = function(order_id, data_file = NULL, ...) {
local_var_response <- self$GetFileV1DownloadOrderOrderIdWithHttpInfo(order_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 order_id The ID of the download order to fetch.
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return API response (OrgSagebionetworksRepoModelFileDownloadOrder) with additional information such as HTTP status code, headers
#' @export
GetFileV1DownloadOrderOrderIdWithHttpInfo = function(order_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(`order_id`)) {
stop("Missing required parameter `order_id`.")
}
local_var_url_path <- "/file/v1/download/order/{orderId}"
if (!missing(`order_id`)) {
local_var_url_path <- gsub("\\{orderId\\}", URLencode(as.character(`order_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(), "OrgSagebionetworksRepoModelFileDownloadOrder", 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 OrgSagebionetworksRepoModelFileUploadDestination
#' @export
GetFileV1EntityIdUploadDestination = function(id, data_file = NULL, ...) {
local_var_response <- self$GetFileV1EntityIdUploadDestinationWithHttpInfo(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 (OrgSagebionetworksRepoModelFileUploadDestination) with additional information such as HTTP status code, headers
#' @export
GetFileV1EntityIdUploadDestinationWithHttpInfo = 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 <- "/file/v1/entity/{id}/uploadDestination"
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(), "OrgSagebionetworksRepoModelFileUploadDestination", 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 ListWrapperOfUploadDestinationLocation
#' @export
GetFileV1EntityIdUploadDestinationLocations = function(id, data_file = NULL, ...) {
local_var_response <- self$GetFileV1EntityIdUploadDestinationLocationsWithHttpInfo(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 (ListWrapperOfUploadDestinationLocation) with additional information such as HTTP status code, headers
#' @export
GetFileV1EntityIdUploadDestinationLocationsWithHttpInfo = 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 <- "/file/v1/entity/{id}/uploadDestinationLocations"
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(), "ListWrapperOfUploadDestinationLocation", 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 storage_location_id
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return OrgSagebionetworksRepoModelFileUploadDestination
#' @export
GetFileV1EntityIdUploadDestinationStorageLocationId = function(id, storage_location_id, data_file = NULL, ...) {
local_var_response <- self$GetFileV1EntityIdUploadDestinationStorageLocationIdWithHttpInfo(id, storage_location_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 storage_location_id
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return API response (OrgSagebionetworksRepoModelFileUploadDestination) with additional information such as HTTP status code, headers
#' @export
GetFileV1EntityIdUploadDestinationStorageLocationIdWithHttpInfo = function(id, storage_location_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`.")
}
if (missing(`storage_location_id`)) {
stop("Missing required parameter `storage_location_id`.")
}
local_var_url_path <- "/file/v1/entity/{id}/uploadDestination/{storageLocationId}"
if (!missing(`id`)) {
local_var_url_path <- gsub("\\{id\\}", URLencode(as.character(`id`), reserved = TRUE), local_var_url_path)
}
if (!missing(`storage_location_id`)) {
local_var_url_path <- gsub("\\{storageLocationId\\}", URLencode(as.character(`storage_location_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(), "OrgSagebionetworksRepoModelFileUploadDestination", 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 async_token
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return OrgSagebionetworksRepoModelFileBulkFileDownloadResponse
#' @export
GetFileV1FileBulkAsyncGetAsyncToken = function(async_token, data_file = NULL, ...) {
local_var_response <- self$GetFileV1FileBulkAsyncGetAsyncTokenWithHttpInfo(async_token, 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 async_token
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return API response (OrgSagebionetworksRepoModelFileBulkFileDownloadResponse) with additional information such as HTTP status code, headers
#' @export
GetFileV1FileBulkAsyncGetAsyncTokenWithHttpInfo = function(async_token, 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(`async_token`)) {
stop("Missing required parameter `async_token`.")
}
local_var_url_path <- "/file/v1/file/bulk/async/get/{asyncToken}"
if (!missing(`async_token`)) {
local_var_url_path <- gsub("\\{asyncToken\\}", URLencode(as.character(`async_token`), 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(), "OrgSagebionetworksRepoModelFileBulkFileDownloadResponse", 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 handle_id The ID of the FileHandle to fetch.
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return OrgSagebionetworksRepoModelFileFileHandle
#' @export
GetFileV1FileHandleHandleId = function(handle_id, data_file = NULL, ...) {
local_var_response <- self$GetFileV1FileHandleHandleIdWithHttpInfo(handle_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 handle_id The ID of the FileHandle to fetch.
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return API response (OrgSagebionetworksRepoModelFileFileHandle) with additional information such as HTTP status code, headers
#' @export
GetFileV1FileHandleHandleIdWithHttpInfo = function(handle_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(`handle_id`)) {
stop("Missing required parameter `handle_id`.")
}
local_var_url_path <- "/file/v1/fileHandle/{handleId}"
if (!missing(`handle_id`)) {
local_var_url_path <- gsub("\\{handleId\\}", URLencode(as.character(`handle_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(), "OrgSagebionetworksRepoModelFileFileHandle", 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 handle_id
#' @param redirect (optional) When set to false, the URL will be returned as text/plain instead of redirecting.
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return AnyType
#' @export
GetFileV1FileHandleHandleIdUrl = function(handle_id, redirect = NULL, data_file = NULL, ...) {
local_var_response <- self$GetFileV1FileHandleHandleIdUrlWithHttpInfo(handle_id, redirect, 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 handle_id
#' @param redirect (optional) When set to false, the URL will be returned as text/plain instead of redirecting.
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return API response (AnyType) with additional information such as HTTP status code, headers
#' @export
GetFileV1FileHandleHandleIdUrlWithHttpInfo = function(handle_id, redirect = NULL, data_file = NULL, ...) {
args <- list(...)
query_params <- list()
header_params <- c()
form_params <- list()
file_params <- list()
local_var_body <- NULL
oauth_scopes <- NULL
is_oauth <- FALSE
if (missing(`handle_id`)) {
stop("Missing required parameter `handle_id`.")
}
query_params[["redirect"]] <- `redirect`
local_var_url_path <- "/file/v1/fileHandle/{handleId}/url"
if (!missing(`handle_id`)) {
local_var_url_path <- gsub("\\{handleId\\}", URLencode(as.character(`handle_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("text/plain")
# The Content-Type representation header
local_var_content_types <- list()
local_var_resp <- self$api_client$CallApi(url = paste0(self$api_client$base_path, local_var_url_path),
method = "GET",
query_params = query_params,
header_params = header_params,
form_params = form_params,
file_params = file_params,
accepts = local_var_accepts,
content_types = local_var_content_types,
body = local_var_body,
is_oauth = is_oauth,
oauth_scopes = oauth_scopes,
...)
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
# save response in a file
if (!is.null(data_file)) {
write(local_var_resp$response, data_file)
}
deserialized_resp_obj <- tryCatch(
self$api_client$deserialize(local_var_resp$response_as_text(), "AnyType", 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 async_token
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return OrgSagebionetworksRepoModelFileFileHandleRestoreResponse
#' @export
GetFileV1FileHandleRestoreAsyncGetAsyncToken = function(async_token, data_file = NULL, ...) {
local_var_response <- self$GetFileV1FileHandleRestoreAsyncGetAsyncTokenWithHttpInfo(async_token, 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 async_token
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return API response (OrgSagebionetworksRepoModelFileFileHandleRestoreResponse) with additional information such as HTTP status code, headers
#' @export
GetFileV1FileHandleRestoreAsyncGetAsyncTokenWithHttpInfo = function(async_token, 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(`async_token`)) {
stop("Missing required parameter `async_token`.")
}
local_var_url_path <- "/file/v1/fileHandle/restore/async/get/{asyncToken}"
if (!missing(`async_token`)) {
local_var_url_path <- gsub("\\{asyncToken\\}", URLencode(as.character(`async_token`), 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(), "OrgSagebionetworksRepoModelFileFileHandleRestoreResponse", 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 ID of the file handle to be downloaded
#' @param file_associate_type the type of object with which the file is associated
#' @param file_associate_id the ID fo the object with which the file is associated
#' @param redirect (optional) When set to false, the URL will be returned as text/plain instead of redirecting.
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return AnyType
#' @export
GetFileV1FileId = function(id, file_associate_type, file_associate_id, redirect = NULL, data_file = NULL, ...) {
local_var_response <- self$GetFileV1FileIdWithHttpInfo(id, file_associate_type, file_associate_id, redirect, 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 ID of the file handle to be downloaded
#' @param file_associate_type the type of object with which the file is associated
#' @param file_associate_id the ID fo the object with which the file is associated
#' @param redirect (optional) When set to false, the URL will be returned as text/plain instead of redirecting.
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return API response (AnyType) with additional information such as HTTP status code, headers
#' @export
GetFileV1FileIdWithHttpInfo = function(id, file_associate_type, file_associate_id, redirect = NULL, data_file = NULL, ...) {
args <- list(...)
query_params <- list()
header_params <- c()
form_params <- list()
file_params <- list()
local_var_body <- NULL
oauth_scopes <- NULL
is_oauth <- FALSE
if (missing(`id`)) {
stop("Missing required parameter `id`.")
}
if (missing(`file_associate_type`)) {
stop("Missing required parameter `file_associate_type`.")
}
if (missing(`file_associate_id`)) {
stop("Missing required parameter `file_associate_id`.")
}
query_params[["redirect"]] <- `redirect`
query_params[["fileAssociateType"]] <- `file_associate_type`
query_params[["fileAssociateId"]] <- `file_associate_id`
local_var_url_path <- "/file/v1/file/{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("text/plain")
# The Content-Type representation header
local_var_content_types <- list()
local_var_resp <- self$api_client$CallApi(url = paste0(self$api_client$base_path, local_var_url_path),
method = "GET",
query_params = query_params,
header_params = header_params,
form_params = form_params,
file_params = file_params,
accepts = local_var_accepts,
content_types = local_var_content_types,
body = local_var_body,
is_oauth = is_oauth,
oauth_scopes = oauth_scopes,
...)
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
# save response in a file
if (!is.null(data_file)) {
write(local_var_resp$response, data_file)
}
deserialized_resp_obj <- tryCatch(
self$api_client$deserialize(local_var_resp$response_as_text(), "AnyType", 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_file_file_handle_association_list
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return OrgSagebionetworksRepoModelFileDownloadList
#' @export
PostFileV1DownloadListAdd = function(org_sagebionetworks_repo_model_file_file_handle_association_list, data_file = NULL, ...) {
local_var_response <- self$PostFileV1DownloadListAddWithHttpInfo(org_sagebionetworks_repo_model_file_file_handle_association_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 org_sagebionetworks_repo_model_file_file_handle_association_list
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return API response (OrgSagebionetworksRepoModelFileDownloadList) with additional information such as HTTP status code, headers
#' @export
PostFileV1DownloadListAddWithHttpInfo = function(org_sagebionetworks_repo_model_file_file_handle_association_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(`org_sagebionetworks_repo_model_file_file_handle_association_list`)) {
stop("Missing required parameter `org_sagebionetworks_repo_model_file_file_handle_association_list`.")
}
if (!is.null(`org_sagebionetworks_repo_model_file_file_handle_association_list`)) {
local_var_body <- `org_sagebionetworks_repo_model_file_file_handle_association_list`$toJSONString()
} else {
body <- NULL
}
local_var_url_path <- "/file/v1/download/list/add"
# 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(), "OrgSagebionetworksRepoModelFileDownloadList", 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_file_add_file_to_download_list_request
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return OrgSagebionetworksRepoModelAsynchAsyncJobId
#' @export
PostFileV1DownloadListAddAsyncStart = function(org_sagebionetworks_repo_model_file_add_file_to_download_list_request, data_file = NULL, ...) {
local_var_response <- self$PostFileV1DownloadListAddAsyncStartWithHttpInfo(org_sagebionetworks_repo_model_file_add_file_to_download_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_file_add_file_to_download_list_request
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return API response (OrgSagebionetworksRepoModelAsynchAsyncJobId) with additional information such as HTTP status code, headers
#' @export
PostFileV1DownloadListAddAsyncStartWithHttpInfo = function(org_sagebionetworks_repo_model_file_add_file_to_download_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_file_add_file_to_download_list_request`)) {
stop("Missing required parameter `org_sagebionetworks_repo_model_file_add_file_to_download_list_request`.")
}
if (!is.null(`org_sagebionetworks_repo_model_file_add_file_to_download_list_request`)) {
local_var_body <- `org_sagebionetworks_repo_model_file_add_file_to_download_list_request`$toJSONString()
} else {
body <- NULL
}
local_var_url_path <- "/file/v1/download/list/add/async/start"
# 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(), "OrgSagebionetworksRepoModelAsynchAsyncJobId", 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_file_file_handle_association_list
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return OrgSagebionetworksRepoModelFileDownloadList
#' @export
PostFileV1DownloadListRemove = function(org_sagebionetworks_repo_model_file_file_handle_association_list, data_file = NULL, ...) {
local_var_response <- self$PostFileV1DownloadListRemoveWithHttpInfo(org_sagebionetworks_repo_model_file_file_handle_association_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 org_sagebionetworks_repo_model_file_file_handle_association_list
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return API response (OrgSagebionetworksRepoModelFileDownloadList) with additional information such as HTTP status code, headers
#' @export
PostFileV1DownloadListRemoveWithHttpInfo = function(org_sagebionetworks_repo_model_file_file_handle_association_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(`org_sagebionetworks_repo_model_file_file_handle_association_list`)) {
stop("Missing required parameter `org_sagebionetworks_repo_model_file_file_handle_association_list`.")
}
if (!is.null(`org_sagebionetworks_repo_model_file_file_handle_association_list`)) {
local_var_body <- `org_sagebionetworks_repo_model_file_file_handle_association_list`$toJSONString()
} else {
body <- NULL
}
local_var_url_path <- "/file/v1/download/list/remove"
# 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(), "OrgSagebionetworksRepoModelFileDownloadList", 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 zip_file_name The name to given to the resulting zip file.
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return OrgSagebionetworksRepoModelFileDownloadOrder
#' @export
PostFileV1DownloadOrder = function(zip_file_name, data_file = NULL, ...) {
local_var_response <- self$PostFileV1DownloadOrderWithHttpInfo(zip_file_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 zip_file_name The name to given to the resulting zip file.
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return API response (OrgSagebionetworksRepoModelFileDownloadOrder) with additional information such as HTTP status code, headers
#' @export
PostFileV1DownloadOrderWithHttpInfo = function(zip_file_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(`zip_file_name`)) {
stop("Missing required parameter `zip_file_name`.")
}
query_params[["zipFileName"]] <- `zip_file_name`
local_var_url_path <- "/file/v1/download/order"
# 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(), "OrgSagebionetworksRepoModelFileDownloadOrder", 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_file_download_order_summary_request
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return OrgSagebionetworksRepoModelFileDownloadOrderSummaryResponse
#' @export
PostFileV1DownloadOrderHistory = function(org_sagebionetworks_repo_model_file_download_order_summary_request, data_file = NULL, ...) {
local_var_response <- self$PostFileV1DownloadOrderHistoryWithHttpInfo(org_sagebionetworks_repo_model_file_download_order_summary_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_file_download_order_summary_request
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return API response (OrgSagebionetworksRepoModelFileDownloadOrderSummaryResponse) with additional information such as HTTP status code, headers
#' @export
PostFileV1DownloadOrderHistoryWithHttpInfo = function(org_sagebionetworks_repo_model_file_download_order_summary_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_file_download_order_summary_request`)) {
stop("Missing required parameter `org_sagebionetworks_repo_model_file_download_order_summary_request`.")
}
if (!is.null(`org_sagebionetworks_repo_model_file_download_order_summary_request`)) {
local_var_body <- `org_sagebionetworks_repo_model_file_download_order_summary_request`$toJSONString()
} else {
body <- NULL
}
local_var_url_path <- "/file/v1/download/order/history"
# 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(), "OrgSagebionetworksRepoModelFileDownloadOrderSummaryResponse", 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_file_external_file_handle_interface
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return OrgSagebionetworksRepoModelFileExternalFileHandleInterface
#' @export
PostFileV1ExternalFileHandle = function(org_sagebionetworks_repo_model_file_external_file_handle_interface, data_file = NULL, ...) {
local_var_response <- self$PostFileV1ExternalFileHandleWithHttpInfo(org_sagebionetworks_repo_model_file_external_file_handle_interface, 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_file_external_file_handle_interface
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return API response (OrgSagebionetworksRepoModelFileExternalFileHandleInterface) with additional information such as HTTP status code, headers
#' @export
PostFileV1ExternalFileHandleWithHttpInfo = function(org_sagebionetworks_repo_model_file_external_file_handle_interface, 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_file_external_file_handle_interface`)) {
stop("Missing required parameter `org_sagebionetworks_repo_model_file_external_file_handle_interface`.")
}
if (!is.null(`org_sagebionetworks_repo_model_file_external_file_handle_interface`)) {
local_var_body <- `org_sagebionetworks_repo_model_file_external_file_handle_interface`$toJSONString()
} else {
body <- NULL
}
local_var_url_path <- "/file/v1/externalFileHandle"
# 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(), "OrgSagebionetworksRepoModelFileExternalFileHandleInterface", 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_file_google_cloud_file_handle
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return OrgSagebionetworksRepoModelFileGoogleCloudFileHandle
#' @export
PostFileV1ExternalFileHandleGoogleCloud = function(org_sagebionetworks_repo_model_file_google_cloud_file_handle, data_file = NULL, ...) {
local_var_response <- self$PostFileV1ExternalFileHandleGoogleCloudWithHttpInfo(org_sagebionetworks_repo_model_file_google_cloud_file_handle, 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_file_google_cloud_file_handle
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return API response (OrgSagebionetworksRepoModelFileGoogleCloudFileHandle) with additional information such as HTTP status code, headers
#' @export
PostFileV1ExternalFileHandleGoogleCloudWithHttpInfo = function(org_sagebionetworks_repo_model_file_google_cloud_file_handle, 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_file_google_cloud_file_handle`)) {
stop("Missing required parameter `org_sagebionetworks_repo_model_file_google_cloud_file_handle`.")
}
if (!is.null(`org_sagebionetworks_repo_model_file_google_cloud_file_handle`)) {
local_var_body <- `org_sagebionetworks_repo_model_file_google_cloud_file_handle`$toJSONString()
} else {
body <- NULL
}
local_var_url_path <- "/file/v1/externalFileHandle/googleCloud"
# 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(), "OrgSagebionetworksRepoModelFileGoogleCloudFileHandle", 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_file_s3_file_handle
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return OrgSagebionetworksRepoModelFileS3FileHandle
#' @export
PostFileV1ExternalFileHandleS3 = function(org_sagebionetworks_repo_model_file_s3_file_handle, data_file = NULL, ...) {
local_var_response <- self$PostFileV1ExternalFileHandleS3WithHttpInfo(org_sagebionetworks_repo_model_file_s3_file_handle, 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_file_s3_file_handle
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return API response (OrgSagebionetworksRepoModelFileS3FileHandle) with additional information such as HTTP status code, headers
#' @export
PostFileV1ExternalFileHandleS3WithHttpInfo = function(org_sagebionetworks_repo_model_file_s3_file_handle, 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_file_s3_file_handle`)) {
stop("Missing required parameter `org_sagebionetworks_repo_model_file_s3_file_handle`.")
}
if (!is.null(`org_sagebionetworks_repo_model_file_s3_file_handle`)) {
local_var_body <- `org_sagebionetworks_repo_model_file_s3_file_handle`$toJSONString()
} else {
body <- NULL
}
local_var_url_path <- "/file/v1/externalFileHandle/s3"
# 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(), "OrgSagebionetworksRepoModelFileS3FileHandle", 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_file_bulk_file_download_request
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return OrgSagebionetworksRepoModelAsynchAsyncJobId
#' @export
PostFileV1FileBulkAsyncStart = function(org_sagebionetworks_repo_model_file_bulk_file_download_request, data_file = NULL, ...) {
local_var_response <- self$PostFileV1FileBulkAsyncStartWithHttpInfo(org_sagebionetworks_repo_model_file_bulk_file_download_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_file_bulk_file_download_request
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return API response (OrgSagebionetworksRepoModelAsynchAsyncJobId) with additional information such as HTTP status code, headers
#' @export
PostFileV1FileBulkAsyncStartWithHttpInfo = function(org_sagebionetworks_repo_model_file_bulk_file_download_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_file_bulk_file_download_request`)) {
stop("Missing required parameter `org_sagebionetworks_repo_model_file_bulk_file_download_request`.")
}
if (!is.null(`org_sagebionetworks_repo_model_file_bulk_file_download_request`)) {
local_var_body <- `org_sagebionetworks_repo_model_file_bulk_file_download_request`$toJSONString()
} else {
body <- NULL
}
local_var_url_path <- "/file/v1/file/bulk/async/start"
# 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(), "OrgSagebionetworksRepoModelAsynchAsyncJobId", 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_file_batch_file_request
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return OrgSagebionetworksRepoModelFileBatchFileResult
#' @export
PostFileV1FileHandleBatch = function(org_sagebionetworks_repo_model_file_batch_file_request, data_file = NULL, ...) {
local_var_response <- self$PostFileV1FileHandleBatchWithHttpInfo(org_sagebionetworks_repo_model_file_batch_file_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_file_batch_file_request
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return API response (OrgSagebionetworksRepoModelFileBatchFileResult) with additional information such as HTTP status code, headers
#' @export
PostFileV1FileHandleBatchWithHttpInfo = function(org_sagebionetworks_repo_model_file_batch_file_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_file_batch_file_request`)) {
stop("Missing required parameter `org_sagebionetworks_repo_model_file_batch_file_request`.")
}
if (!is.null(`org_sagebionetworks_repo_model_file_batch_file_request`)) {
local_var_body <- `org_sagebionetworks_repo_model_file_batch_file_request`$toJSONString()
} else {
body <- NULL
}
local_var_url_path <- "/file/v1/fileHandle/batch"
# 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(), "OrgSagebionetworksRepoModelFileBatchFileResult", 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 handle_id_to_copy_from the file handle it from which to duplicate the data
#' @param org_sagebionetworks_repo_model_file_s3_file_handle
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return OrgSagebionetworksRepoModelFileS3FileHandle
#' @export
PostFileV1FileHandleHandleIdToCopyFromCopy = function(handle_id_to_copy_from, org_sagebionetworks_repo_model_file_s3_file_handle, data_file = NULL, ...) {
local_var_response <- self$PostFileV1FileHandleHandleIdToCopyFromCopyWithHttpInfo(handle_id_to_copy_from, org_sagebionetworks_repo_model_file_s3_file_handle, 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 handle_id_to_copy_from the file handle it from which to duplicate the data
#' @param org_sagebionetworks_repo_model_file_s3_file_handle
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return API response (OrgSagebionetworksRepoModelFileS3FileHandle) with additional information such as HTTP status code, headers
#' @export
PostFileV1FileHandleHandleIdToCopyFromCopyWithHttpInfo = function(handle_id_to_copy_from, org_sagebionetworks_repo_model_file_s3_file_handle, 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(`handle_id_to_copy_from`)) {
stop("Missing required parameter `handle_id_to_copy_from`.")
}
if (missing(`org_sagebionetworks_repo_model_file_s3_file_handle`)) {
stop("Missing required parameter `org_sagebionetworks_repo_model_file_s3_file_handle`.")
}
if (!is.null(`org_sagebionetworks_repo_model_file_s3_file_handle`)) {
local_var_body <- `org_sagebionetworks_repo_model_file_s3_file_handle`$toJSONString()
} else {
body <- NULL
}
local_var_url_path <- "/file/v1/fileHandle/{handleIdToCopyFrom}/copy"
if (!missing(`handle_id_to_copy_from`)) {
local_var_url_path <- gsub("\\{handleIdToCopyFrom\\}", URLencode(as.character(`handle_id_to_copy_from`), 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 = "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(), "OrgSagebionetworksRepoModelFileS3FileHandle", 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_file_file_handle_restore_request
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return OrgSagebionetworksRepoModelAsynchAsyncJobId
#' @export
PostFileV1FileHandleRestoreAsyncStart = function(org_sagebionetworks_repo_model_file_file_handle_restore_request, data_file = NULL, ...) {
local_var_response <- self$PostFileV1FileHandleRestoreAsyncStartWithHttpInfo(org_sagebionetworks_repo_model_file_file_handle_restore_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_file_file_handle_restore_request
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return API response (OrgSagebionetworksRepoModelAsynchAsyncJobId) with additional information such as HTTP status code, headers
#' @export
PostFileV1FileHandleRestoreAsyncStartWithHttpInfo = function(org_sagebionetworks_repo_model_file_file_handle_restore_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_file_file_handle_restore_request`)) {
stop("Missing required parameter `org_sagebionetworks_repo_model_file_file_handle_restore_request`.")
}
if (!is.null(`org_sagebionetworks_repo_model_file_file_handle_restore_request`)) {
local_var_body <- `org_sagebionetworks_repo_model_file_file_handle_restore_request`$toJSONString()
} else {
body <- NULL
}
local_var_url_path <- "/file/v1/fileHandle/restore/async/start"
# 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(), "OrgSagebionetworksRepoModelAsynchAsyncJobId", 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_file_multipart_request
#' @param force_restart (optional) Optional parameter. When 'forceRestart=true' is included, any upload state for the given file will be cleared and a new upload will be started.
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return OrgSagebionetworksRepoModelFileMultipartUploadStatus
#' @export
PostFileV1FileMultipart = function(org_sagebionetworks_repo_model_file_multipart_request, force_restart = NULL, data_file = NULL, ...) {
local_var_response <- self$PostFileV1FileMultipartWithHttpInfo(org_sagebionetworks_repo_model_file_multipart_request, force_restart, 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_file_multipart_request
#' @param force_restart (optional) Optional parameter. When 'forceRestart=true' is included, any upload state for the given file will be cleared and a new upload will be started.
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return API response (OrgSagebionetworksRepoModelFileMultipartUploadStatus) with additional information such as HTTP status code, headers
#' @export
PostFileV1FileMultipartWithHttpInfo = function(org_sagebionetworks_repo_model_file_multipart_request, force_restart = NULL, data_file = NULL, ...) {
args <- list(...)
query_params <- list()
header_params <- c()
form_params <- list()
file_params <- list()
local_var_body <- NULL
oauth_scopes <- NULL
is_oauth <- FALSE
if (missing(`org_sagebionetworks_repo_model_file_multipart_request`)) {
stop("Missing required parameter `org_sagebionetworks_repo_model_file_multipart_request`.")
}
query_params[["forceRestart"]] <- `force_restart`
if (!is.null(`org_sagebionetworks_repo_model_file_multipart_request`)) {
local_var_body <- `org_sagebionetworks_repo_model_file_multipart_request`$toJSONString()
} else {
body <- NULL
}
local_var_url_path <- "/file/v1/file/multipart"
# 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(), "OrgSagebionetworksRepoModelFileMultipartUploadStatus", 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 upload_id The unique identifier of the file upload.
#' @param org_sagebionetworks_repo_model_file_batch_presigned_upload_url_request
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return OrgSagebionetworksRepoModelFileBatchPresignedUploadUrlResponse
#' @export
PostFileV1FileMultipartUploadIdPresignedUrlBatch = function(upload_id, org_sagebionetworks_repo_model_file_batch_presigned_upload_url_request, data_file = NULL, ...) {
local_var_response <- self$PostFileV1FileMultipartUploadIdPresignedUrlBatchWithHttpInfo(upload_id, org_sagebionetworks_repo_model_file_batch_presigned_upload_url_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 upload_id The unique identifier of the file upload.
#' @param org_sagebionetworks_repo_model_file_batch_presigned_upload_url_request
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return API response (OrgSagebionetworksRepoModelFileBatchPresignedUploadUrlResponse) with additional information such as HTTP status code, headers
#' @export
PostFileV1FileMultipartUploadIdPresignedUrlBatchWithHttpInfo = function(upload_id, org_sagebionetworks_repo_model_file_batch_presigned_upload_url_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(`upload_id`)) {
stop("Missing required parameter `upload_id`.")
}
if (missing(`org_sagebionetworks_repo_model_file_batch_presigned_upload_url_request`)) {
stop("Missing required parameter `org_sagebionetworks_repo_model_file_batch_presigned_upload_url_request`.")
}
if (!is.null(`org_sagebionetworks_repo_model_file_batch_presigned_upload_url_request`)) {
local_var_body <- `org_sagebionetworks_repo_model_file_batch_presigned_upload_url_request`$toJSONString()
} else {
body <- NULL
}
local_var_url_path <- "/file/v1/file/multipart/{uploadId}/presigned/url/batch"
if (!missing(`upload_id`)) {
local_var_url_path <- gsub("\\{uploadId\\}", URLencode(as.character(`upload_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 = "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(), "OrgSagebionetworksRepoModelFileBatchPresignedUploadUrlResponse", 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_file_batch_file_handle_copy_request
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return OrgSagebionetworksRepoModelFileBatchFileHandleCopyResult
#' @export
PostFileV1FilehandlesCopy = function(org_sagebionetworks_repo_model_file_batch_file_handle_copy_request, data_file = NULL, ...) {
local_var_response <- self$PostFileV1FilehandlesCopyWithHttpInfo(org_sagebionetworks_repo_model_file_batch_file_handle_copy_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_file_batch_file_handle_copy_request
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return API response (OrgSagebionetworksRepoModelFileBatchFileHandleCopyResult) with additional information such as HTTP status code, headers
#' @export
PostFileV1FilehandlesCopyWithHttpInfo = function(org_sagebionetworks_repo_model_file_batch_file_handle_copy_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_file_batch_file_handle_copy_request`)) {
stop("Missing required parameter `org_sagebionetworks_repo_model_file_batch_file_handle_copy_request`.")
}
if (!is.null(`org_sagebionetworks_repo_model_file_batch_file_handle_copy_request`)) {
local_var_body <- `org_sagebionetworks_repo_model_file_batch_file_handle_copy_request`$toJSONString()
} else {
body <- NULL
}
local_var_url_path <- "/file/v1/filehandles/copy"
# 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(), "OrgSagebionetworksRepoModelFileBatchFileHandleCopyResult", 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 upload_id The unique identifier of the file upload.
#' @param part_number The part number to add. Must be a number between 1 and 10,000.
#' @param part_md5_hex The MD5 of the uploaded part represented as a hexadecimal string. If the provided MD5 does not match the MD5 of the uploaded part, the add will fail.
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return OrgSagebionetworksRepoModelFileAddPartResponse
#' @export
PutFileV1FileMultipartUploadIdAddPartNumber = function(upload_id, part_number, part_md5_hex, data_file = NULL, ...) {
local_var_response <- self$PutFileV1FileMultipartUploadIdAddPartNumberWithHttpInfo(upload_id, part_number, part_md5_hex, 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 upload_id The unique identifier of the file upload.
#' @param part_number The part number to add. Must be a number between 1 and 10,000.
#' @param part_md5_hex The MD5 of the uploaded part represented as a hexadecimal string. If the provided MD5 does not match the MD5 of the uploaded part, the add will fail.
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return API response (OrgSagebionetworksRepoModelFileAddPartResponse) with additional information such as HTTP status code, headers
#' @export
PutFileV1FileMultipartUploadIdAddPartNumberWithHttpInfo = function(upload_id, part_number, part_md5_hex, 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(`upload_id`)) {
stop("Missing required parameter `upload_id`.")
}
if (missing(`part_number`)) {
stop("Missing required parameter `part_number`.")
}
if (missing(`part_md5_hex`)) {
stop("Missing required parameter `part_md5_hex`.")
}
query_params[["partMD5Hex"]] <- `part_md5_hex`
local_var_url_path <- "/file/v1/file/multipart/{uploadId}/add/{partNumber}"
if (!missing(`upload_id`)) {
local_var_url_path <- gsub("\\{uploadId\\}", URLencode(as.character(`upload_id`), reserved = TRUE), local_var_url_path)
}
if (!missing(`part_number`)) {
local_var_url_path <- gsub("\\{partNumber\\}", URLencode(as.character(`part_number`), 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(), "OrgSagebionetworksRepoModelFileAddPartResponse", 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 upload_id The unique identifier of the file upload.
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return OrgSagebionetworksRepoModelFileMultipartUploadStatus
#' @export
PutFileV1FileMultipartUploadIdComplete = function(upload_id, data_file = NULL, ...) {
local_var_response <- self$PutFileV1FileMultipartUploadIdCompleteWithHttpInfo(upload_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 upload_id The unique identifier of the file upload.
#' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments
#' @return API response (OrgSagebionetworksRepoModelFileMultipartUploadStatus) with additional information such as HTTP status code, headers
#' @export
PutFileV1FileMultipartUploadIdCompleteWithHttpInfo = function(upload_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(`upload_id`)) {
stop("Missing required parameter `upload_id`.")
}
local_var_url_path <- "/file/v1/file/multipart/{uploadId}/complete"
if (!missing(`upload_id`)) {
local_var_url_path <- gsub("\\{uploadId\\}", URLencode(as.character(`upload_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(), "OrgSagebionetworksRepoModelFileMultipartUploadStatus", 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.