30 #ifndef GOOGLE_CLASSROOM_API_ATTACHMENT_H_ 31 #define GOOGLE_CLASSROOM_API_ATTACHMENT_H_ 33 #include "googleapis/base/macros.h" 34 #include "googleapis/client/data/jsoncpp_data.h" 35 #include "googleapis/strings/stringpiece.h" 37 #include "google/classroom_api/drive_file.h" 38 #include "google/classroom_api/form.h" 39 #include "google/classroom_api/link.h" 40 #include "google/classroom_api/you_tube_video.h" 70 explicit Attachment(
const Json::Value& storage);
90 return StringPiece(
"google_classroom_api::Attachment");
99 return Storage().isMember(
"driveFile");
106 MutableStorage()->removeMember(
"driveFile");
131 return Storage().isMember(
"form");
138 MutableStorage()->removeMember(
"form");
145 const Form get_form()
const;
162 return Storage().isMember(
"link");
169 MutableStorage()->removeMember(
"link");
176 const Link get_link()
const;
193 return Storage().isMember(
"youTubeVideo");
200 MutableStorage()->removeMember(
"youTubeVideo");
223 #endif // GOOGLE_CLASSROOM_API_ATTACHMENT_H_ Definition: drive_file.h:50
const StringPiece GetTypeName() const
Definition: attachment.h:89
void clear_drive_file()
Definition: attachment.h:105
void clear_you_tube_video()
Definition: attachment.h:199
Definition: attachment.h:56
bool has_drive_file() const
Definition: attachment.h:98
void clear_form()
Definition: attachment.h:137
bool has_form() const
Definition: attachment.h:130
void clear_link()
Definition: attachment.h:168
bool has_link() const
Definition: attachment.h:161
Definition: announcement.h:41
bool has_you_tube_video() const
Definition: attachment.h:192
Definition: announcement.cc:43
Definition: you_tube_video.h:50