30 #ifndef GOOGLE_DNS_API_DNS_KEY_SPEC_H_ 31 #define GOOGLE_DNS_API_DNS_KEY_SPEC_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" 66 explicit DnsKeySpec(
const Json::Value& storage);
86 return StringPiece(
"google_dns_api::DnsKeySpec");
95 return Storage().isMember(
"algorithm");
102 MutableStorage()->removeMember(
"algorithm");
110 const Json::Value& v = Storage(
"algorithm");
111 if (v == Json::Value::null)
return StringPiece(
"");
112 return StringPiece(v.asCString());
123 *MutableStorage(
"algorithm") = value.data();
132 return Storage().isMember(
"keyLength");
139 MutableStorage()->removeMember(
"keyLength");
147 const Json::Value& storage = Storage(
"keyLength");
148 return client::JsonValueToCppValueHelper<uint32 >(storage);
159 client::SetJsonValueFromCppValueHelper<uint32 >(
160 value, MutableStorage(
"keyLength"));
169 return Storage().isMember(
"keyType");
176 MutableStorage()->removeMember(
"keyType");
184 const Json::Value& v = Storage(
"keyType");
185 if (v == Json::Value::null)
return StringPiece(
"");
186 return StringPiece(v.asCString());
201 *MutableStorage(
"keyType") = value.data();
210 return Storage().isMember(
"kind");
217 MutableStorage()->removeMember(
"kind");
225 const Json::Value& v = Storage(
"kind");
226 if (v == Json::Value::null)
return StringPiece(
"");
227 return StringPiece(v.asCString());
239 *MutableStorage(
"kind") = value.data();
246 #endif // GOOGLE_DNS_API_DNS_KEY_SPEC_H_ const StringPiece GetTypeName() const
Definition: dns_key_spec.h:85
const StringPiece get_kind() const
Definition: dns_key_spec.h:224
void clear_key_type()
Definition: dns_key_spec.h:175
bool has_algorithm() const
Definition: dns_key_spec.h:94
Definition: dns_key_spec.h:52
void set_key_type(const StringPiece &value)
Definition: dns_key_spec.h:200
void set_kind(const StringPiece &value)
Definition: dns_key_spec.h:238
uint32 get_key_length() const
Definition: dns_key_spec.h:146
void set_key_length(uint32 value)
Definition: dns_key_spec.h:158
const StringPiece get_key_type() const
Definition: dns_key_spec.h:183
bool has_key_length() const
Definition: dns_key_spec.h:131
const StringPiece get_algorithm() const
Definition: dns_key_spec.h:109
void clear_kind()
Definition: dns_key_spec.h:216
bool has_key_type() const
Definition: dns_key_spec.h:168
void clear_key_length()
Definition: dns_key_spec.h:138
void clear_algorithm()
Definition: dns_key_spec.h:101
void set_algorithm(const StringPiece &value)
Definition: dns_key_spec.h:122
bool has_kind() const
Definition: dns_key_spec.h:209