30 #ifndef GOOGLE_CONTAINER_API_NODE_TAINT_H_ 31 #define GOOGLE_CONTAINER_API_NODE_TAINT_H_ 34 #include "googleapis/base/macros.h" 35 #include "googleapis/client/data/jsoncpp_data.h" 36 #include "googleapis/strings/stringpiece.h" 71 explicit NodeTaint(
const Json::Value& storage);
91 return StringPiece(
"google_container_api::NodeTaint");
100 return Storage().isMember(
"effect");
107 MutableStorage()->removeMember(
"effect");
115 const Json::Value& v = Storage(
"effect");
116 if (v == Json::Value::null)
return StringPiece(
"");
117 return StringPiece(v.asCString());
128 *MutableStorage(
"effect") = value.data();
137 return Storage().isMember(
"key");
144 MutableStorage()->removeMember(
"key");
152 const Json::Value& v = Storage(
"key");
153 if (v == Json::Value::null)
return StringPiece(
"");
154 return StringPiece(v.asCString());
165 *MutableStorage(
"key") = value.data();
174 return Storage().isMember(
"value");
181 MutableStorage()->removeMember(
"value");
189 const Json::Value& v = Storage(
"value");
190 if (v == Json::Value::null)
return StringPiece(
"");
191 return StringPiece(v.asCString());
202 *MutableStorage(
"value") = value.data();
209 #endif // GOOGLE_CONTAINER_API_NODE_TAINT_H_ const StringPiece get_value() const
Definition: node_taint.h:188
void clear_effect()
Definition: node_taint.h:106
void clear_key()
Definition: node_taint.h:143
void clear_value()
Definition: node_taint.h:180
bool has_key() const
Definition: node_taint.h:136
Definition: node_taint.h:57
bool has_value() const
Definition: node_taint.h:173
const StringPiece get_key() const
Definition: node_taint.h:151
Definition: accelerator_config.h:39
void set_key(const StringPiece &value)
Definition: node_taint.h:164
Definition: accelerator_config.cc:41
bool has_effect() const
Definition: node_taint.h:99
const StringPiece GetTypeName() const
Definition: node_taint.h:90
const StringPiece get_effect() const
Definition: node_taint.h:114
void set_value(const StringPiece &value)
Definition: node_taint.h:201
void set_effect(const StringPiece &value)
Definition: node_taint.h:127