30 #ifndef GOOGLE_COMPUTE_API_RESOURCE_COMMITMENT_H_ 31 #define GOOGLE_COMPUTE_API_RESOURCE_COMMITMENT_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::ResourceCommitment");
95 return Storage().isMember(
"amount");
102 MutableStorage()->removeMember(
"amount");
110 const Json::Value& storage = Storage(
"amount");
111 return client::JsonValueToCppValueHelper<int64 >(storage);
125 client::SetJsonValueFromCppValueHelper<int64 >(
126 value, MutableStorage(
"amount"));
135 return Storage().isMember(
"type");
142 MutableStorage()->removeMember(
"type");
150 const Json::Value& v = Storage(
"type");
151 if (v == Json::Value::null)
return StringPiece(
"");
152 return StringPiece(v.asCString());
164 *MutableStorage(
"type") = value.data();
171 #endif // GOOGLE_COMPUTE_API_RESOURCE_COMMITMENT_H_ int64 get_amount() const
Definition: resource_commitment.h:109
bool has_type() const
Definition: resource_commitment.h:134
void set_type(const StringPiece &value)
Definition: resource_commitment.h:163
bool has_amount() const
Definition: resource_commitment.h:94
Definition: resource_commitment.h:52
Definition: accelerator_config.h:39
void clear_type()
Definition: resource_commitment.h:141
Definition: accelerator_config.cc:41
void clear_amount()
Definition: resource_commitment.h:101
const StringPiece get_type() const
Definition: resource_commitment.h:149
const StringPiece GetTypeName() const
Definition: resource_commitment.h:85
void set_amount(int64 value)
Definition: resource_commitment.h:124