30 #ifndef GOOGLE_COMPUTE_API_ACCELERATOR_CONFIG_H_ 31 #define GOOGLE_COMPUTE_API_ACCELERATOR_CONFIG_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" 86 return StringPiece(
"google_compute_api::AcceleratorConfig");
95 return Storage().isMember(
"acceleratorCount");
102 MutableStorage()->removeMember(
"acceleratorCount");
110 const Json::Value& storage = Storage(
"acceleratorCount");
111 return client::JsonValueToCppValueHelper<int32 >(storage);
122 client::SetJsonValueFromCppValueHelper<int32 >(
123 value, MutableStorage(
"acceleratorCount"));
132 return Storage().isMember(
"acceleratorType");
139 MutableStorage()->removeMember(
"acceleratorType");
147 const Json::Value& v = Storage(
"acceleratorType");
148 if (v == Json::Value::null)
return StringPiece(
"");
149 return StringPiece(v.asCString());
164 *MutableStorage(
"acceleratorType") = value.data();
171 #endif // GOOGLE_COMPUTE_API_ACCELERATOR_CONFIG_H_ Definition: accelerator_config.h:52
void set_accelerator_type(const StringPiece &value)
Definition: accelerator_config.h:163
const StringPiece GetTypeName() const
Definition: accelerator_config.h:85
void clear_accelerator_type()
Definition: accelerator_config.h:138
void set_accelerator_count(int32 value)
Definition: accelerator_config.h:121
bool has_accelerator_count() const
Definition: accelerator_config.h:94
int32 get_accelerator_count() const
Definition: accelerator_config.h:109
Definition: accelerator_config.h:39
Definition: accelerator_config.cc:41
const StringPiece get_accelerator_type() const
Definition: accelerator_config.h:146
bool has_accelerator_type() const
Definition: accelerator_config.h:131
void clear_accelerator_count()
Definition: accelerator_config.h:101