| Part {sevenbridges2} | R Documentation |
R6 Class representing a part of the uploading file
Description
R6 Class representing a resource for managing parts of the files' uploads.
Public fields
URLList of URL endpoints for this resource.
part_numberPart number.
part_sizePart size.
urlThe URL to which to make the HTTP part upload request.
expiresISO 8601 combined date and time representation in Coordinated Universal Time (UTC) by when the HTTP part upload request should be made.
headersA map of headers and values that should be set when making the HTTP part upload request.
success_codesA list of status codes returned by the HTTP part upload request that should be recognized as success. A successful part upload request should be reported back to the API in a call to report an uploaded file part by passing the information collected from the report object.
reportReport object.
etagETag received after starting a part upload.
authAuthentication object.
responseResponse object.
Methods
Public methods
Method new()
Create a new Part object.
Usage
Part$new( part_number = NA, part_size = NA, url = NA, expires = NA, headers = NA, success_codes = NA, report = NA, etag = NA, auth = NA )
Arguments
part_numberPart number.
part_sizePart size.
urlThe URL to which to make the HTTP part upload request.
expiresCombined date and time representation in UTC by when the HTTP part upload request should be made.
headersA map of headers and values that should be set when making the HTTP part upload request.
success_codesA list of status codes returned by the HTTP part upload request that should be recognized as success.
reportReport object.
etagETag received after starting a part upload.
authSeven Bridges Authentication object.
Method print()
Print method for Part class.
Usage
Part$print()
Examples
\dontrun{
upload_part_object <- Part$new(
part_number = part_number,
part_size = part_size,
auth = auth
)
# Print upload part information
upload_part_object$print()
}
Method upload_info_part()
Get upload part info.
Usage
Part$upload_info_part(upload_id)
Arguments
upload_idUpload object or ID of the upload process that part. belongs to.
Examples
\dontrun{
upload_part_object <- Part$new(
part_number = part_number,
part_size = part_size,
auth = auth
)
# Get upload part status information
upload_part_object$upload_info_part(upload_id = upload_id)
}
Method upload_complete_part()
Report an uploaded part.
Usage
Part$upload_complete_part(upload_id)
Arguments
upload_idUpload object or ID of the upload process that part belongs to.
Examples
\dontrun{
upload_part_object <- Part$new(
part_number = part_number,
part_size = part_size,
auth = auth
)
# Report an uploaded part
upload_part_object$upload_complete_part(upload_id = upload_id)
}
Method clone()
The objects of this class are cloneable with this method.
Usage
Part$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.
Examples
## ------------------------------------------------
## Method `Part$print`
## ------------------------------------------------
## Not run:
upload_part_object <- Part$new(
part_number = part_number,
part_size = part_size,
auth = auth
)
# Print upload part information
upload_part_object$print()
## End(Not run)
## ------------------------------------------------
## Method `Part$upload_info_part`
## ------------------------------------------------
## Not run:
upload_part_object <- Part$new(
part_number = part_number,
part_size = part_size,
auth = auth
)
# Get upload part status information
upload_part_object$upload_info_part(upload_id = upload_id)
## End(Not run)
## ------------------------------------------------
## Method `Part$upload_complete_part`
## ------------------------------------------------
## Not run:
upload_part_object <- Part$new(
part_number = part_number,
part_size = part_size,
auth = auth
)
# Report an uploaded part
upload_part_object$upload_complete_part(upload_id = upload_id)
## End(Not run)