13 #ifndef __COMMON_PARSE_HPP__ 14 #define __COMMON_PARSE_HPP__ 45 return protobuf::parse<mesos::ACLs>(json.
get());
59 return protobuf::parse<mesos::RateLimits>(json.
get());
73 return protobuf::parse<mesos::Modules>(json.
get());
87 return protobuf::parse<mesos::ContainerInfo>(json.
get());
101 return protobuf::parse<mesos::DeviceWhitelist>(json.
get());
123 "The value of key '" + key +
"' in '" +
stringify(json.
get()) +
"'" 141 return protobuf::parse<mesos::CapabilityInfo>(json.
get());
153 return protobuf::parse<mesos::Environment>(json.
get());
165 return protobuf::parse<mesos::RLimitInfo>(json.
get());
177 return protobuf::parse<mesos::DomainInfo>(json.
get());
184 mesos::FrameworkID frameworkId;
185 frameworkId.set_value(value);
194 mesos::ExecutorID executorId;
195 executorId.set_value(value);
204 mesos::SlaveID slaveId;
205 slaveId.set_value(value);
212 #endif // __COMMON_PARSE_HPP__ Definition: errorbase.hpp:36
T & get()&
Definition: try.hpp:80
std::map< std::string, Value > values
Definition: json.hpp:194
bool is() const
Definition: json.hpp:338
void json(JSON::ObjectWriter *writer, const asV1Protobuf &protobuf)
Try< mesos::ACLs > parse(const std::string &value)
Returns the OCI v1 descriptor, image index, image manifest and image configuration from the given str...
Definition: parse.hpp:36
const T & as() const &
Definition: json.hpp:353
#define foreachpair(KEY, VALUE, ELEMS)
Definition: foreach.hpp:51
static Try error(const E &e)
Definition: try.hpp:43
Iterable< V > map(F &&f, const Iterable< U, Us... > &input)
Definition: lambda.hpp:46
bool isError() const
Definition: try.hpp:78
std::string stringify(int flags)