classroom  v1
student.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_STUDENT_H_
31 #define GOOGLE_CLASSROOM_API_STUDENT_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/drive_folder.h"
39 #include "google/classroom_api/user_profile.h"
40 
41 namespace Json {
42 class Value;
43 } // namespace Json
44 
45 namespace google_classroom_api {
46 using namespace googleapis;
47 
53 class Student : public client::JsonCppData {
54  public:
60  static Student* New();
61 
67  explicit Student(const Json::Value& storage);
68 
74  explicit Student(Json::Value* storage);
75 
79  virtual ~Student();
80 
86  const StringPiece GetTypeName() const {
87  return StringPiece("google_classroom_api::Student");
88  }
89 
95  bool has_course_id() const {
96  return Storage().isMember("courseId");
97  }
98 
103  MutableStorage()->removeMember("courseId");
104  }
105 
106 
110  const StringPiece get_course_id() const {
111  const Json::Value& v = Storage("courseId");
112  if (v == Json::Value::null) return StringPiece("");
113  return StringPiece(v.asCString());
114  }
115 
125  void set_course_id(const StringPiece& value) {
126  *MutableStorage("courseId") = value.data();
127  }
128 
134  bool has_profile() const {
135  return Storage().isMember("profile");
136  }
137 
141  void clear_profile() {
142  MutableStorage()->removeMember("profile");
143  }
144 
145 
149  const UserProfile get_profile() const;
150 
160  UserProfile mutable_profile();
161 
167  bool has_student_work_folder() const {
168  return Storage().isMember("studentWorkFolder");
169  }
170 
175  MutableStorage()->removeMember("studentWorkFolder");
176  }
177 
178 
183  const DriveFolder get_student_work_folder() const;
184 
196  DriveFolder mutable_studentWorkFolder();
197 
203  bool has_user_id() const {
204  return Storage().isMember("userId");
205  }
206 
210  void clear_user_id() {
211  MutableStorage()->removeMember("userId");
212  }
213 
214 
218  const StringPiece get_user_id() const {
219  const Json::Value& v = Storage("userId");
220  if (v == Json::Value::null) return StringPiece("");
221  return StringPiece(v.asCString());
222  }
223 
238  void set_user_id(const StringPiece& value) {
239  *MutableStorage("userId") = value.data();
240  }
241 
242  private:
243  void operator=(const Student&);
244 }; // Student
245 } // namespace google_classroom_api
246 #endif // GOOGLE_CLASSROOM_API_STUDENT_H_
const StringPiece get_user_id() const
Definition: student.h:218
bool has_profile() const
Definition: student.h:134
void clear_student_work_folder()
Definition: student.h:174
Definition: drive_folder.h:50
const StringPiece get_course_id() const
Definition: student.h:110
void set_course_id(const StringPiece &value)
Definition: student.h:125
void clear_profile()
Definition: student.h:141
bool has_course_id() const
Definition: student.h:95
void clear_user_id()
Definition: student.h:210
Definition: announcement.h:41
Definition: student.h:53
bool has_user_id() const
Definition: student.h:203
void clear_course_id()
Definition: student.h:102
const StringPiece GetTypeName() const
Definition: student.h:86
Definition: announcement.cc:43
Definition: user_profile.h:53
bool has_student_work_folder() const
Definition: student.h:167
void set_user_id(const StringPiece &value)
Definition: student.h:238