AsyncJob: R6 Class representing an AsyncJob

AsyncJobR Documentation

R6 Class representing an AsyncJob

Description

R6 Class representing a resource for managing asynchronous jobs.

Super class

sevenbridges2::Item -> AsyncJob

Public fields

id

Asynchronous job ID.

type

The type of job. Can be one of: COPY, DELETE, MOVE.

state

The following states are available: SUBMITTED, RESOLVING, RUNNING and FINISHED.

result

The result of the job.

total_files

The total number of files that were processed for the job.

completed_files

The number of files that were successfully completed.

failed_files

The number of files that failed.

started_on

The time and date the job started.

finished_on

The time and date the job finished.

Methods

Public methods


Method new()

Create a new AsyncJob object.

Usage
AsyncJob$new(res = NA, ...)
Arguments
res

Response containing AsyncJob object information.

...

Other response arguments.

Returns

A new AsyncJob object.


Method print()

Print method for AsyncJob class.

Usage
AsyncJob$print()
Examples
\dontrun{
 # x is API response when app is requested
 asyncjob_object <- AsyncJob$new(
   res = x,
   href = x$href,
   auth = auth,
   response = attr(x, "response")
 )
 asyncjob_object$print()
}

Method reload()

Reloads AsyncJob object information.

Usage
AsyncJob$reload(...)
Arguments
...

Other arguments that can be passed to core api() function like 'fields', etc.

Returns

AsyncJob object.

Examples
\dontrun{
 # x is API response when AsyncJob is requested
 asyncjob_object <- AsyncJob$new(
   res = x,
   href = x$href,
   auth = auth,
   response = attr(x, "response")
 )
 asyncjob_object$reload()
}

Method clone()

The objects of this class are cloneable with this method.

Usage
AsyncJob$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Examples


## ------------------------------------------------
## Method `AsyncJob$print`
## ------------------------------------------------

## Not run: 
 # x is API response when app is requested
 asyncjob_object <- AsyncJob$new(
   res = x,
   href = x$href,
   auth = auth,
   response = attr(x, "response")
 )
 asyncjob_object$print()

## End(Not run)

## ------------------------------------------------
## Method `AsyncJob$reload`
## ------------------------------------------------

## Not run: 
 # x is API response when AsyncJob is requested
 asyncjob_object <- AsyncJob$new(
   res = x,
   href = x$href,
   auth = auth,
   response = attr(x, "response")
 )
 asyncjob_object$reload()

## End(Not run)

sevenbridges2 documentation built on April 11, 2025, 6 p.m.