RStudio Launcher Plugin SDK  1.1.3
A software development kit for creating plugins that work the the RStudio Launcher.
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
rstudio::launcher_plugins::api::MountSource Struct Reference

Struct which represents the source path of an NFS Mount. More...

#include <Job.hpp>

Inheritance diagram for rstudio::launcher_plugins::api::MountSource:
rstudio::launcher_plugins::api::AzureFileMountSource rstudio::launcher_plugins::api::CephFsMountSource rstudio::launcher_plugins::api::GlusterFsMountSource rstudio::launcher_plugins::api::HostMountSource rstudio::launcher_plugins::api::NfsMountSource

Public Types

enum  Type {
  Type::AZURE_FILE, Type::CEPH_FS, Type::GLUSTER_FS, Type::HOST,
  Type::NFS, Type::PASSTHROUGH
}
 Constants representing the support types of MountSource. More...
 

Public Member Functions

virtual ~MountSource ()=default
 Virtual destructor for inheritance.
 
AzureFileMountSourceasAzureFileMountSource ()
 Gets this MountSource as an AzureFileMountSource. More...
 
const AzureFileMountSourceasAzureFileMountSource () const
 Gets this MountSource as an AzureFileMountSource. More...
 
CephFsMountSourceasCephFsMountSource ()
 Gets this MountSource as an CephFsMountSource. More...
 
const CephFsMountSourceasCephFsMountSource () const
 Gets this MountSource as an CephFsMountSource. More...
 
GlusterFsMountSourceasGlusterFsMountSource ()
 Gets this MountSource as an GlusterFsMountSource. More...
 
const GlusterFsMountSourceasGlusterFsMountSource () const
 Gets this MountSource as an GlusterFsMountSource. More...
 
HostMountSourceasHostMountSource ()
 Gets this MountSource as an HostMountSource. More...
 
const HostMountSourceasHostMountSource () const
 Gets this MountSource as an HostMountSource. More...
 
NfsMountSourceasNfsMountSource ()
 Gets this MountSource as an NfsMountSource. More...
 
const NfsMountSourceasNfsMountSource () const
 Gets this MountSource as an NfsMountSource. More...
 
bool isAzureFileMountSource () const
 Checks whether this MountSource is an AzureFileMountSource. More...
 
bool isCephFsMountSource () const
 Checks whether this MountSource is an CephFsMountSource. More...
 
bool isGlusterFsMountSource () const
 Checks whether this MountSource is an GlusterFsMountSource. More...
 
bool isHostMountSource () const
 Checks whether this MountSource is an HostMountSource. More...
 
bool isNfsMountSource () const
 Checks whether this MountSource is an NfsMountSource. More...
 
bool isPassthroughMountSource () const
 Checks whether this MountSource is an PassthroughMountSource. More...
 
json::Object toJson () const
 Converts this NfsMountSource to a JSON object which represents it. More...
 

Static Public Member Functions

static Error fromJson (const json::Object &in_json, MountSource &out_mountSource)
 Constructs a MountSource from a JSON object which represents the mount source. More...
 

Public Attributes

std::string CustomType
 
json::Object SourceObject
 
Type SourceType
 

Detailed Description

Struct which represents the source path of an NFS Mount.

Member Enumeration Documentation

◆ Type

Constants representing the support types of MountSource.

Enumerator
AZURE_FILE 

Represents an Azure File Mount Source.

CEPH_FS 

Represents a Ceph File System Mount Source.

GLUSTER_FS 

Represents a Gluster File System Mount Source.

HOST 

Represents a Host Mount Source.

NFS 

Represents an NFS Mount Source.

PASSTHROUGH 

Represents a Mount Source that will be passed through to the Plugin to handle.

Member Function Documentation

◆ asAzureFileMountSource() [1/2]

AzureFileMountSource& rstudio::launcher_plugins::api::MountSource::asAzureFileMountSource ( )

Gets this MountSource as an AzureFileMountSource.

Exceptions
std::logic_errorif isAzureFileMountSource() would return false.
Returns
This MountSource as an AzureFileMountSource.

◆ asAzureFileMountSource() [2/2]

const AzureFileMountSource& rstudio::launcher_plugins::api::MountSource::asAzureFileMountSource ( ) const

Gets this MountSource as an AzureFileMountSource.

Exceptions
std::logic_errorif isAzureFileMountSource() would return false.
Returns
This MountSource as an AzureFileMountSource.

◆ asCephFsMountSource() [1/2]

CephFsMountSource& rstudio::launcher_plugins::api::MountSource::asCephFsMountSource ( )

Gets this MountSource as an CephFsMountSource.

Exceptions
std::logic_errorif isCephFsMountSource() would return false.
Returns
This MountSource as an CephFsMountSource.

◆ asCephFsMountSource() [2/2]

const CephFsMountSource& rstudio::launcher_plugins::api::MountSource::asCephFsMountSource ( ) const

Gets this MountSource as an CephFsMountSource.

Exceptions
std::logic_errorif isCephFsMountSource() would return false.
Returns
This MountSource as an CephFsMountSource.

◆ asGlusterFsMountSource() [1/2]

GlusterFsMountSource& rstudio::launcher_plugins::api::MountSource::asGlusterFsMountSource ( )

Gets this MountSource as an GlusterFsMountSource.

Exceptions
std::logic_errorif isGlusterFsMountSource() would return false.
Returns
This MountSource as an GlusterFsMountSource.

◆ asGlusterFsMountSource() [2/2]

const GlusterFsMountSource& rstudio::launcher_plugins::api::MountSource::asGlusterFsMountSource ( ) const

Gets this MountSource as an GlusterFsMountSource.

Exceptions
std::logic_errorif isGlusterFsMountSource() would return false.
Returns
This MountSource as an GlusterFsMountSource.

◆ asHostMountSource() [1/2]

HostMountSource& rstudio::launcher_plugins::api::MountSource::asHostMountSource ( )

Gets this MountSource as an HostMountSource.

Exceptions
std::logic_errorif isHostMountSource() would return false.
Returns
This MountSource as an HostMountSource.

◆ asHostMountSource() [2/2]

const HostMountSource& rstudio::launcher_plugins::api::MountSource::asHostMountSource ( ) const

Gets this MountSource as an HostMountSource.

Exceptions
std::logic_errorif isHostMountSource() would return false.
Returns
This MountSource as an HostMountSource.

◆ asNfsMountSource() [1/2]

NfsMountSource& rstudio::launcher_plugins::api::MountSource::asNfsMountSource ( )

Gets this MountSource as an NfsMountSource.

Exceptions
std::logic_errorif isNfsMountSource() would return false.
Returns
This MountSource as an NfsMountSource.

◆ asNfsMountSource() [2/2]

const NfsMountSource& rstudio::launcher_plugins::api::MountSource::asNfsMountSource ( ) const

Gets this MountSource as an NfsMountSource.

Exceptions
std::logic_errorif isNfsMountSource() would return false.
Returns
This MountSource as an NfsMountSource.

◆ fromJson()

static Error rstudio::launcher_plugins::api::MountSource::fromJson ( const json::Object in_json,
MountSource out_mountSource 
)
static

Constructs a MountSource from a JSON object which represents the mount source.

Parameters
in_jsonThe JSON object which represents the mount source.
out_mountSourceThe populated mount source value. Not valid if an error is returned.
Returns
Success if in_json could be parsed as a MountSource; Error otherwise.

◆ isAzureFileMountSource()

bool rstudio::launcher_plugins::api::MountSource::isAzureFileMountSource ( ) const

Checks whether this MountSource is an AzureFileMountSource.

Returns
True if this MountSource is an AzureFileMountSource; false otherwise.

◆ isCephFsMountSource()

bool rstudio::launcher_plugins::api::MountSource::isCephFsMountSource ( ) const

Checks whether this MountSource is an CephFsMountSource.

Returns
True if this MountSource is an CephFsMountSource; false otherwise.

◆ isGlusterFsMountSource()

bool rstudio::launcher_plugins::api::MountSource::isGlusterFsMountSource ( ) const

Checks whether this MountSource is an GlusterFsMountSource.

Returns
True if this MountSource is an GlusterFsMountSource; false otherwise.

◆ isHostMountSource()

bool rstudio::launcher_plugins::api::MountSource::isHostMountSource ( ) const

Checks whether this MountSource is an HostMountSource.

Returns
True if this MountSource is an HostMountSource; false otherwise.

◆ isNfsMountSource()

bool rstudio::launcher_plugins::api::MountSource::isNfsMountSource ( ) const

Checks whether this MountSource is an NfsMountSource.

Returns
True if this MountSource is an NfsMountSource; false otherwise.

◆ isPassthroughMountSource()

bool rstudio::launcher_plugins::api::MountSource::isPassthroughMountSource ( ) const

Checks whether this MountSource is an PassthroughMountSource.

Returns
True if this MountSource is an PassthroughMountSource; false otherwise.

◆ toJson()

json::Object rstudio::launcher_plugins::api::MountSource::toJson ( ) const

Converts this NfsMountSource to a JSON object which represents it.

Returns
The JSON object which represents this NfsMountSource.

Member Data Documentation

◆ CustomType

std::string rstudio::launcher_plugins::api::MountSource::CustomType

An optional field, to represent a custom mount source type. If the type field is not recongized SourceType will be set to MountSource::Type::PASSTHROUGH and CustomType will hold the original value of the field.

◆ SourceObject

json::Object rstudio::launcher_plugins::api::MountSource::SourceObject

The JSON object that describes the Mount Source for this Mount.

◆ SourceType

Type rstudio::launcher_plugins::api::MountSource::SourceType

The type of the Mount Source for this Mount.


The documentation for this struct was generated from the following file: