30 #ifndef GOOGLE_CLASSROOM_API_NAME_H_ 31 #define GOOGLE_CLASSROOM_API_NAME_H_ 34 #include "googleapis/base/macros.h" 35 #include "googleapis/client/data/jsoncpp_data.h" 36 #include "googleapis/strings/stringpiece.h" 50 class Name :
public client::JsonCppData {
64 explicit Name(
const Json::Value& storage);
71 explicit Name(Json::Value* storage);
84 return StringPiece(
"google_classroom_api::Name");
93 return Storage().isMember(
"familyName");
100 MutableStorage()->removeMember(
"familyName");
108 const Json::Value& v = Storage(
"familyName");
109 if (v == Json::Value::null)
return StringPiece(
"");
110 return StringPiece(v.asCString());
123 *MutableStorage(
"familyName") = value.data();
132 return Storage().isMember(
"fullName");
139 MutableStorage()->removeMember(
"fullName");
147 const Json::Value& v = Storage(
"fullName");
148 if (v == Json::Value::null)
return StringPiece(
"");
149 return StringPiece(v.asCString());
163 *MutableStorage(
"fullName") = value.data();
172 return Storage().isMember(
"givenName");
179 MutableStorage()->removeMember(
"givenName");
187 const Json::Value& v = Storage(
"givenName");
188 if (v == Json::Value::null)
return StringPiece(
"");
189 return StringPiece(v.asCString());
202 *MutableStorage(
"givenName") = value.data();
206 void operator=(
const Name&);
209 #endif // GOOGLE_CLASSROOM_API_NAME_H_ void clear_family_name()
Definition: name.h:99
const StringPiece get_full_name() const
Definition: name.h:146
void clear_full_name()
Definition: name.h:138
const StringPiece GetTypeName() const
Definition: name.h:83
bool has_family_name() const
Definition: name.h:92
void clear_given_name()
Definition: name.h:178
const StringPiece get_given_name() const
Definition: name.h:186
void set_full_name(const StringPiece &value)
Definition: name.h:162
void set_given_name(const StringPiece &value)
Definition: name.h:201
Definition: announcement.h:41
bool has_given_name() const
Definition: name.h:171
Definition: announcement.cc:43
const StringPiece get_family_name() const
Definition: name.h:107
bool has_full_name() const
Definition: name.h:131
void set_family_name(const StringPiece &value)
Definition: name.h:122