classroom  v1
announcement.h
1 // Copyright 2010 Google Inc.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License"); you may not
4 // use this file except in compliance with the License. You may obtain a copy of
5 // the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11 // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12 // License for the specific language governing permissions and limitations under
13 // the License.
14 
15 // This code was generated by google-apis-code-generator 1.5.1
16 // Build date: 2018-10-08 17:45:39 UTC
17 // on: 2020-03-13, 00:00:47 UTC
18 // C++ generator version: 0.1.4
19 
20 // ----------------------------------------------------------------------------
21 // NOTE: This file is generated from Google APIs Discovery Service.
22 // Service:
23 // Google Classroom API (classroom/v1)
24 // Generated from:
25 // Version: v1
26 // Revision: 386
27 // Generated by:
28 // Tool: google-apis-code-generator 1.5.1
29 // C++: 0.1.4
30 #ifndef GOOGLE_CLASSROOM_API_ANNOUNCEMENT_H_
31 #define GOOGLE_CLASSROOM_API_ANNOUNCEMENT_H_
32 
33 #include <string>
34 #include "googleapis/base/macros.h"
35 #include "googleapis/client/data/jsoncpp_data.h"
36 #include "googleapis/strings/stringpiece.h"
37 
38 #include "google/classroom_api/individual_students_options.h"
39 #include "google/classroom_api/material.h"
40 
41 namespace Json {
42 class Value;
43 } // namespace Json
44 
45 namespace google_classroom_api {
46 using namespace googleapis;
47 
53 class Announcement : public client::JsonCppData {
54  public:
60  static Announcement* New();
61 
67  explicit Announcement(const Json::Value& storage);
68 
74  explicit Announcement(Json::Value* storage);
75 
79  virtual ~Announcement();
80 
86  const StringPiece GetTypeName() const {
87  return StringPiece("google_classroom_api::Announcement");
88  }
89 
95  bool has_alternate_link() const {
96  return Storage().isMember("alternateLink");
97  }
98 
103  MutableStorage()->removeMember("alternateLink");
104  }
105 
106 
110  const StringPiece get_alternate_link() const {
111  const Json::Value& v = Storage("alternateLink");
112  if (v == Json::Value::null) return StringPiece("");
113  return StringPiece(v.asCString());
114  }
115 
126  void set_alternate_link(const StringPiece& value) {
127  *MutableStorage("alternateLink") = value.data();
128  }
129 
135  bool has_assignee_mode() const {
136  return Storage().isMember("assigneeMode");
137  }
138 
143  MutableStorage()->removeMember("assigneeMode");
144  }
145 
146 
150  const StringPiece get_assignee_mode() const {
151  const Json::Value& v = Storage("assigneeMode");
152  if (v == Json::Value::null) return StringPiece("");
153  return StringPiece(v.asCString());
154  }
155 
164  void set_assignee_mode(const StringPiece& value) {
165  *MutableStorage("assigneeMode") = value.data();
166  }
167 
173  bool has_course_id() const {
174  return Storage().isMember("courseId");
175  }
176 
181  MutableStorage()->removeMember("courseId");
182  }
183 
184 
188  const StringPiece get_course_id() const {
189  const Json::Value& v = Storage("courseId");
190  if (v == Json::Value::null) return StringPiece("");
191  return StringPiece(v.asCString());
192  }
193 
203  void set_course_id(const StringPiece& value) {
204  *MutableStorage("courseId") = value.data();
205  }
206 
212  bool has_creation_time() const {
213  return Storage().isMember("creationTime");
214  }
215 
220  MutableStorage()->removeMember("creationTime");
221  }
222 
223 
227  const StringPiece get_creation_time() const {
228  const Json::Value& v = Storage("creationTime");
229  if (v == Json::Value::null) return StringPiece("");
230  return StringPiece(v.asCString());
231  }
232 
242  void set_creation_time(const StringPiece& value) {
243  *MutableStorage("creationTime") = value.data();
244  }
245 
251  bool has_creator_user_id() const {
252  return Storage().isMember("creatorUserId");
253  }
254 
259  MutableStorage()->removeMember("creatorUserId");
260  }
261 
262 
266  const StringPiece get_creator_user_id() const {
267  const Json::Value& v = Storage("creatorUserId");
268  if (v == Json::Value::null) return StringPiece("");
269  return StringPiece(v.asCString());
270  }
271 
281  void set_creator_user_id(const StringPiece& value) {
282  *MutableStorage("creatorUserId") = value.data();
283  }
284 
290  bool has_id() const {
291  return Storage().isMember("id");
292  }
293 
297  void clear_id() {
298  MutableStorage()->removeMember("id");
299  }
300 
301 
305  const StringPiece get_id() const {
306  const Json::Value& v = Storage("id");
307  if (v == Json::Value::null) return StringPiece("");
308  return StringPiece(v.asCString());
309  }
310 
324  void set_id(const StringPiece& value) {
325  *MutableStorage("id") = value.data();
326  }
327 
336  return Storage().isMember("individualStudentsOptions");
337  }
338 
343  MutableStorage()->removeMember("individualStudentsOptions");
344  }
345 
346 
351  const IndividualStudentsOptions get_individual_students_options() const;
352 
364  IndividualStudentsOptions mutable_individualStudentsOptions();
365 
371  bool has_materials() const {
372  return Storage().isMember("materials");
373  }
374 
379  MutableStorage()->removeMember("materials");
380  }
381 
382 
386  const client::JsonCppArray<Material > get_materials() const;
387 
398  client::JsonCppArray<Material > mutable_materials();
399 
405  bool has_scheduled_time() const {
406  return Storage().isMember("scheduledTime");
407  }
408 
413  MutableStorage()->removeMember("scheduledTime");
414  }
415 
416 
420  const StringPiece get_scheduled_time() const {
421  const Json::Value& v = Storage("scheduledTime");
422  if (v == Json::Value::null) return StringPiece("");
423  return StringPiece(v.asCString());
424  }
425 
433  void set_scheduled_time(const StringPiece& value) {
434  *MutableStorage("scheduledTime") = value.data();
435  }
436 
442  bool has_state() const {
443  return Storage().isMember("state");
444  }
445 
449  void clear_state() {
450  MutableStorage()->removeMember("state");
451  }
452 
453 
457  const StringPiece get_state() const {
458  const Json::Value& v = Storage("state");
459  if (v == Json::Value::null) return StringPiece("");
460  return StringPiece(v.asCString());
461  }
462 
471  void set_state(const StringPiece& value) {
472  *MutableStorage("state") = value.data();
473  }
474 
480  bool has_text() const {
481  return Storage().isMember("text");
482  }
483 
487  void clear_text() {
488  MutableStorage()->removeMember("text");
489  }
490 
491 
495  const StringPiece get_text() const {
496  const Json::Value& v = Storage("text");
497  if (v == Json::Value::null) return StringPiece("");
498  return StringPiece(v.asCString());
499  }
500 
510  void set_text(const StringPiece& value) {
511  *MutableStorage("text") = value.data();
512  }
513 
519  bool has_update_time() const {
520  return Storage().isMember("updateTime");
521  }
522 
527  MutableStorage()->removeMember("updateTime");
528  }
529 
530 
534  const StringPiece get_update_time() const {
535  const Json::Value& v = Storage("updateTime");
536  if (v == Json::Value::null) return StringPiece("");
537  return StringPiece(v.asCString());
538  }
539 
549  void set_update_time(const StringPiece& value) {
550  *MutableStorage("updateTime") = value.data();
551  }
552 
553  private:
554  void operator=(const Announcement&);
555 }; // Announcement
556 } // namespace google_classroom_api
557 #endif // GOOGLE_CLASSROOM_API_ANNOUNCEMENT_H_
bool has_creation_time() const
Definition: announcement.h:212
const StringPiece get_update_time() const
Definition: announcement.h:534
void set_id(const StringPiece &value)
Definition: announcement.h:324
bool has_materials() const
Definition: announcement.h:371
bool has_text() const
Definition: announcement.h:480
void clear_text()
Definition: announcement.h:487
const StringPiece get_alternate_link() const
Definition: announcement.h:110
void set_update_time(const StringPiece &value)
Definition: announcement.h:549
void clear_alternate_link()
Definition: announcement.h:102
bool has_state() const
Definition: announcement.h:442
bool has_scheduled_time() const
Definition: announcement.h:405
void clear_assignee_mode()
Definition: announcement.h:142
Definition: individual_students_options.h:51
void set_alternate_link(const StringPiece &value)
Definition: announcement.h:126
const StringPiece get_creator_user_id() const
Definition: announcement.h:266
bool has_alternate_link() const
Definition: announcement.h:95
void set_course_id(const StringPiece &value)
Definition: announcement.h:203
void clear_course_id()
Definition: announcement.h:180
bool has_individual_students_options() const
Definition: announcement.h:335
const StringPiece get_scheduled_time() const
Definition: announcement.h:420
void clear_scheduled_time()
Definition: announcement.h:412
const StringPiece GetTypeName() const
Definition: announcement.h:86
void set_creation_time(const StringPiece &value)
Definition: announcement.h:242
void set_state(const StringPiece &value)
Definition: announcement.h:471
Definition: announcement.h:41
void clear_creator_user_id()
Definition: announcement.h:258
const StringPiece get_text() const
Definition: announcement.h:495
void set_text(const StringPiece &value)
Definition: announcement.h:510
bool has_update_time() const
Definition: announcement.h:519
const StringPiece get_id() const
Definition: announcement.h:305
const StringPiece get_creation_time() const
Definition: announcement.h:227
void clear_materials()
Definition: announcement.h:378
void set_assignee_mode(const StringPiece &value)
Definition: announcement.h:164
void clear_state()
Definition: announcement.h:449
bool has_creator_user_id() const
Definition: announcement.h:251
Definition: announcement.h:53
Definition: announcement.cc:43
bool has_course_id() const
Definition: announcement.h:173
void clear_creation_time()
Definition: announcement.h:219
bool has_assignee_mode() const
Definition: announcement.h:135
const StringPiece get_course_id() const
Definition: announcement.h:188
const StringPiece get_assignee_mode() const
Definition: announcement.h:150
void set_scheduled_time(const StringPiece &value)
Definition: announcement.h:433
void clear_id()
Definition: announcement.h:297
void clear_update_time()
Definition: announcement.h:526
const StringPiece get_state() const
Definition: announcement.h:457
void set_creator_user_id(const StringPiece &value)
Definition: announcement.h:281
void clear_individual_students_options()
Definition: announcement.h:342
bool has_id() const
Definition: announcement.h:290