Import: R6 Class representing an Import job

ImportR Documentation

R6 Class representing an Import job

Description

R6 Class representing a resource for managing volume import jobs.

Super class

sevenbridges2::Item -> Import

Public fields

URL

List of URL endpoints for this resource.

id

Import job string identifier.

state

The state of the import job. Possible values are:

  • PENDING: the import is queued;

  • RUNNING: the import is running;

  • COMPLETED: the import has completed successfully;

  • FAILED: the import has failed.

overwrite

Indicates whether the imported file or folder name was overwritten if another with the same name already existed.

autorename

Indicates whether the imported file or folder name was automatically renamed (by prefixing its name with an underscore and number) if another with the same name already existed.

preserve_folder_structure

Whether the imported folder structure was preserved or not.

source

List containing source volume id and source location of the file/folder is being imported to the platform.

destination

List containing the source volume ID and the source location of the file or folder being imported to the platform.

started_on

Time when the import job started.

finished_on

Time when the import job ended.

error

In case of error in the import job, standard API error is returned here.

result

File object that was imported.

Methods

Public methods


Method new()

Create a new Import object.

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

Response containing Import object information.

...

Other response arguments.


Method print()

Print method for Import class.

Usage
Import$print()
Examples
\dontrun{
 # x is API response when import is requested
 import_object <- Import$new(
                    res = x,
                    href = x$href,
                    auth = auth,
                    response = attr(x, "response")
                   )

 # Print import object
 import_object$print()
}


Method reload()

Reload Import object information.

Usage
Import$reload(...)
Arguments
...

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

Returns

Import object.

Examples
\dontrun{
 # x is API response when import is requested
 import_object <- Import$new(
                    res = x,
                    href = x$href,
                    auth = auth,
                    response = attr(x, "response")
                   )

 # Reload import object
 import_object$reload()
}


Method clone()

The objects of this class are cloneable with this method.

Usage
Import$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Examples


## ------------------------------------------------
## Method `Import$print`
## ------------------------------------------------

## Not run: 
 # x is API response when import is requested
 import_object <- Import$new(
                    res = x,
                    href = x$href,
                    auth = auth,
                    response = attr(x, "response")
                   )

 # Print import object
 import_object$print()

## End(Not run)


## ------------------------------------------------
## Method `Import$reload`
## ------------------------------------------------

## Not run: 
 # x is API response when import is requested
 import_object <- Import$new(
                    res = x,
                    href = x$href,
                    auth = auth,
                    response = attr(x, "response")
                   )

 # Reload import object
 import_object$reload()

## End(Not run)


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