RStudio Launcher Plugin SDK  1.1.3
A software development kit for creating plugins that work the the RStudio Launcher.
Public Member Functions | Friends | List of all members
rstudio::launcher_plugins::api::JobStateRequest Class Referencefinal

Represents a job state request received from the Launcher. More...

#include <Request.hpp>

Inheritance diagram for rstudio::launcher_plugins::api::JobStateRequest:
rstudio::launcher_plugins::api::JobIdRequest rstudio::launcher_plugins::api::UserRequest rstudio::launcher_plugins::api::Request rstudio::launcher_plugins::Noncopyable

Public Member Functions

Error getEndTime (Optional< system::DateTime > &out_endTime) const
 Gets the end of the date range for this request. More...
 
const Optional< std::set< std::string > > & getFieldSet () const
 Gets the set of Job fields which should be included in the response. More...
 
Error getStartTime (Optional< system::DateTime > &out_endTime) const
 Gets the start of the date range for this request. More...
 
Error getStatusSet (Optional< std::set< Job::State > > &out_statuses) const
 Gets the set of Job statuses by which to filter the returned list of jobs. More...
 
const Optional< std::set< std::string > > & getTagSet () const
 Gets the set of Job tags by which to filter the returned list of jobs. More...
 
- Public Member Functions inherited from rstudio::launcher_plugins::api::JobIdRequest
const std::string & getJobId () const
 Gets the ID of the job for which this request was made. More...
 
const std::string & getEncodedJobId () const
 Gets the ID of the job for which this request was made. More...
 
- Public Member Functions inherited from rstudio::launcher_plugins::api::UserRequest
const system::UsergetUser () const
 Gets the user who initiated this request. More...
 
const std::string & getRequestUsername () const
 Gets the actual username that was used when the request was submitted. More...
 
- Public Member Functions inherited from rstudio::launcher_plugins::api::Request
virtual ~Request ()=default
 Virtual destructor for inheritance.
 
uint64_t getId () const
 Gets the ID of this request. More...
 
Type getType () const
 Gets the request type. More...
 
- Public Member Functions inherited from rstudio::launcher_plugins::Noncopyable
 Noncopyable ()=default
 Default constructor.
 
 Noncopyable (const Noncopyable &)=delete
 Deleted copy constructor.
 
Noncopyableoperator= (const Noncopyable &)=delete
 Deleted assignment operator.
 

Friends

class Request
 

Additional Inherited Members

- Public Types inherited from rstudio::launcher_plugins::api::Request
enum  Type {
  Type::HEARTBEAT = 0, Type::BOOTSTRAP = 1, Type::SUBMIT_JOB = 2, Type::GET_JOB = 3,
  Type::GET_JOB_STATUS = 4, Type::CONTROL_JOB = 5, Type::GET_JOB_OUTPUT = 6, Type::GET_JOB_RESOURCE_UTIL = 7,
  Type::GET_JOB_NETWORK = 8, Type::GET_CLUSTER_INFO = 9, Type::INVALID
}
 
- Static Public Member Functions inherited from rstudio::launcher_plugins::api::Request
static Error fromJson (const json::Object &in_requestJson, std::shared_ptr< Request > &out_request)
 Converts a Json::Object into the appropriate Request object. More...
 
- Protected Member Functions inherited from rstudio::launcher_plugins::api::JobIdRequest
 JobIdRequest (Request::Type in_type, const json::Object &in_requestJson)
 Constructor. More...
 
- Protected Member Functions inherited from rstudio::launcher_plugins::api::UserRequest
 UserRequest (Request::Type in_type, const json::Object &in_requestJson)
 Constructor. More...
 
- Protected Member Functions inherited from rstudio::launcher_plugins::api::Request
 Request (Type in_requestType, const json::Object &in_requestJson)
 Constructor. More...
 
 PRIVATE_IMPL (m_baseImpl)
 

Detailed Description

Represents a job state request received from the Launcher.

Member Function Documentation

◆ getEndTime()

Error rstudio::launcher_plugins::api::JobStateRequest::getEndTime ( Optional< system::DateTime > &  out_endTime) const

Gets the end of the date range for this request.

If this value is set, only jobs which were submitted before this DateTime should be returned in the response.

Parameters
out_endTimeThe end time, if it was set and the string value could be parsed as a DateTime correctly.
Returns
Success if the value was set and could be parsed correctly, or if the value was not set; Error otherwise.

◆ getFieldSet()

const Optional<std::set<std::string> >& rstudio::launcher_plugins::api::JobStateRequest::getFieldSet ( ) const

Gets the set of Job fields which should be included in the response.

If this value is set, only the fields which are included in this set should be returned in the response. ID will always be returned, as it is required.

Returns
The optional set of Job fields to include in the response.

◆ getStartTime()

Error rstudio::launcher_plugins::api::JobStateRequest::getStartTime ( Optional< system::DateTime > &  out_endTime) const

Gets the start of the date range for this request.

If this value is set, only jobs which were submitted after this DateTime should be returned in the response.

Parameters
out_startTimeThe start time, if it was set and the string value could be parsed as a DateTime correctly.
Returns
Success if the value was set and could be parsed correctly, or if the value was not set; Error otherwise.

◆ getStatusSet()

Error rstudio::launcher_plugins::api::JobStateRequest::getStatusSet ( Optional< std::set< Job::State > > &  out_statuses) const

Gets the set of Job statuses by which to filter the returned list of jobs.

If this value is set, only the jobs which have one of the specified states should be returned in the response.

Parameters
out_statusesThe set of statuses to filter by, if any were set and they could all be parsed as Job::State values correctly.
Returns
Success if the value was set and could be parsed correctly, or if the value was not set; Error otherwise.

◆ getTagSet()

const Optional<std::set<std::string> >& rstudio::launcher_plugins::api::JobStateRequest::getTagSet ( ) const

Gets the set of Job tags by which to filter the returned list of jobs.

If this value is set, only the jobs which have one of the specified states should be returned in the response.

Returns
The optional set of Job statuses by which to filter the returned list of jobs.

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