30 #ifndef GOOGLE_CLASSROOM_API_TEACHER_H_ 31 #define GOOGLE_CLASSROOM_API_TEACHER_H_ 34 #include "googleapis/base/macros.h" 35 #include "googleapis/client/data/jsoncpp_data.h" 36 #include "googleapis/strings/stringpiece.h" 38 #include "google/classroom_api/user_profile.h" 52 class Teacher :
public client::JsonCppData {
66 explicit Teacher(
const Json::Value& storage);
73 explicit Teacher(Json::Value* storage);
86 return StringPiece(
"google_classroom_api::Teacher");
95 return Storage().isMember(
"courseId");
102 MutableStorage()->removeMember(
"courseId");
110 const Json::Value& v = Storage(
"courseId");
111 if (v == Json::Value::null)
return StringPiece(
"");
112 return StringPiece(v.asCString());
125 *MutableStorage(
"courseId") = value.data();
134 return Storage().isMember(
"profile");
141 MutableStorage()->removeMember(
"profile");
167 return Storage().isMember(
"userId");
174 MutableStorage()->removeMember(
"userId");
182 const Json::Value& v = Storage(
"userId");
183 if (v == Json::Value::null)
return StringPiece(
"");
184 return StringPiece(v.asCString());
202 *MutableStorage(
"userId") = value.data();
206 void operator=(
const Teacher&);
209 #endif // GOOGLE_CLASSROOM_API_TEACHER_H_ const StringPiece GetTypeName() const
Definition: teacher.h:85
void clear_user_id()
Definition: teacher.h:173
void clear_profile()
Definition: teacher.h:140
void set_user_id(const StringPiece &value)
Definition: teacher.h:201
bool has_profile() const
Definition: teacher.h:133
void clear_course_id()
Definition: teacher.h:101
Definition: announcement.h:41
void set_course_id(const StringPiece &value)
Definition: teacher.h:124
Definition: announcement.cc:43
const StringPiece get_user_id() const
Definition: teacher.h:181
Definition: user_profile.h:53
bool has_course_id() const
Definition: teacher.h:94
const StringPiece get_course_id() const
Definition: teacher.h:109
bool has_user_id() const
Definition: teacher.h:166