30 #ifndef GOOGLE_DATAFLOW_API_SHELL_TASK_H_ 31 #define GOOGLE_DATAFLOW_API_SHELL_TASK_H_ 34 #include "googleapis/base/integral_types.h" 35 #include "googleapis/base/macros.h" 36 #include "googleapis/client/data/jsoncpp_data.h" 37 #include "googleapis/strings/stringpiece.h" 65 explicit ShellTask(
const Json::Value& storage);
85 return StringPiece(
"google_dataflow_api::ShellTask");
94 return Storage().isMember(
"command");
101 MutableStorage()->removeMember(
"command");
109 const Json::Value& v = Storage(
"command");
110 if (v == Json::Value::null)
return StringPiece(
"");
111 return StringPiece(v.asCString());
122 *MutableStorage(
"command") = value.data();
131 return Storage().isMember(
"exitCode");
138 MutableStorage()->removeMember(
"exitCode");
146 const Json::Value& storage = Storage(
"exitCode");
147 return client::JsonValueToCppValueHelper<int32 >(storage);
158 client::SetJsonValueFromCppValueHelper<int32 >(
159 value, MutableStorage(
"exitCode"));
166 #endif // GOOGLE_DATAFLOW_API_SHELL_TASK_H_ bool has_command() const
Definition: shell_task.h:93
Definition: shell_task.h:51
void clear_exit_code()
Definition: shell_task.h:137
const StringPiece get_command() const
Definition: shell_task.h:108
int32 get_exit_code() const
Definition: shell_task.h:145
void clear_command()
Definition: shell_task.h:100
Definition: approximate_progress.h:40
bool has_exit_code() const
Definition: shell_task.h:130
void set_exit_code(int32 value)
Definition: shell_task.h:157
const StringPiece GetTypeName() const
Definition: shell_task.h:84
Definition: approximate_progress.cc:42
void set_command(const StringPiece &value)
Definition: shell_task.h:121