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

Struct which represents a resource limit for a job. More...

#include <Job.hpp>

Classes

struct  Type
 

Public Member Functions

 ResourceLimit ()=default
 Default constructor.
 
 ResourceLimit (std::string in_limitType, std::string in_maxValue="", std::string in_defaultValue="")
 Constructor. More...
 
json::Object toJson () const
 Converts this ResourceLimit to a JSON object which represents it. More...
 

Static Public Member Functions

static Error fromJson (const json::Object &in_json, ResourceLimit &out_resourceLimit)
 Constructs a ResourceLimit from a JSON object which represents the resource limit. More...
 

Public Attributes

std::string ResourceType
 
std::string Value
 
std::string MaxValue
 
std::string DefaultValue
 

Detailed Description

Struct which represents a resource limit for a job.

Constructor & Destructor Documentation

◆ ResourceLimit()

rstudio::launcher_plugins::api::ResourceLimit::ResourceLimit ( std::string  in_limitType,
std::string  in_maxValue = "",
std::string  in_defaultValue = "" 
)
explicit

Constructor.

Parameters
in_limitTypeThe type of the resource limit.
in_maxValueThe maximum value of the resource limit. Default: no maximum.
in_defaultValueThe default value of the resource limit. Default: no default.

Member Function Documentation

◆ fromJson()

static Error rstudio::launcher_plugins::api::ResourceLimit::fromJson ( const json::Object in_json,
ResourceLimit out_resourceLimit 
)
static

Constructs a ResourceLimit from a JSON object which represents the resource limit.

Parameters
in_jsonThe JSON object which represents the resource limit.
out_resourceLimitThe populated resource limit value. Not valid if an error is returned.
Returns
Success if in_json could be parsed as a ResourceLimit; Error otherwise.

◆ toJson()

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

Converts this ResourceLimit to a JSON object which represents it.

Returns
The JSON object which represents this ResourceLimit.

Member Data Documentation

◆ DefaultValue

std::string rstudio::launcher_plugins::api::ResourceLimit::DefaultValue

The default value that will be set for this type of resource.

◆ MaxValue

std::string rstudio::launcher_plugins::api::ResourceLimit::MaxValue

The maximum value that can be set for this type of resource.

◆ ResourceType

std::string rstudio::launcher_plugins::api::ResourceLimit::ResourceType

The type of resource to limit.

◆ Value

std::string rstudio::launcher_plugins::api::ResourceLimit::Value

The value of the resource limit.


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