classroom  v1
date.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_DATE_H_
31 #define GOOGLE_CLASSROOM_API_DATE_H_
32 
33 #include "googleapis/base/integral_types.h"
34 #include "googleapis/base/macros.h"
35 #include "googleapis/client/data/jsoncpp_data.h"
36 #include "googleapis/strings/stringpiece.h"
37 
38 namespace Json {
39 class Value;
40 } // namespace Json
41 
42 namespace google_classroom_api {
43 using namespace googleapis;
44 
59 class Date : public client::JsonCppData {
60  public:
66  static Date* New();
67 
73  explicit Date(const Json::Value& storage);
74 
80  explicit Date(Json::Value* storage);
81 
85  virtual ~Date();
86 
92  const StringPiece GetTypeName() const {
93  return StringPiece("google_classroom_api::Date");
94  }
95 
101  bool has_day() const {
102  return Storage().isMember("day");
103  }
104 
108  void clear_day() {
109  MutableStorage()->removeMember("day");
110  }
111 
112 
116  int32 get_day() const {
117  const Json::Value& storage = Storage("day");
118  return client::JsonValueToCppValueHelper<int32 >(storage);
119  }
120 
130  void set_day(int32 value) {
131  client::SetJsonValueFromCppValueHelper<int32 >(
132  value, MutableStorage("day"));
133  }
134 
140  bool has_month() const {
141  return Storage().isMember("month");
142  }
143 
147  void clear_month() {
148  MutableStorage()->removeMember("month");
149  }
150 
151 
155  int32 get_month() const {
156  const Json::Value& storage = Storage("month");
157  return client::JsonValueToCppValueHelper<int32 >(storage);
158  }
159 
168  void set_month(int32 value) {
169  client::SetJsonValueFromCppValueHelper<int32 >(
170  value, MutableStorage("month"));
171  }
172 
178  bool has_year() const {
179  return Storage().isMember("year");
180  }
181 
185  void clear_year() {
186  MutableStorage()->removeMember("year");
187  }
188 
189 
193  int32 get_year() const {
194  const Json::Value& storage = Storage("year");
195  return client::JsonValueToCppValueHelper<int32 >(storage);
196  }
197 
206  void set_year(int32 value) {
207  client::SetJsonValueFromCppValueHelper<int32 >(
208  value, MutableStorage("year"));
209  }
210 
211  private:
212  void operator=(const Date&);
213 }; // Date
214 } // namespace google_classroom_api
215 #endif // GOOGLE_CLASSROOM_API_DATE_H_
bool has_month() const
Definition: date.h:140
bool has_day() const
Definition: date.h:101
int32 get_month() const
Definition: date.h:155
void clear_day()
Definition: date.h:108
void clear_month()
Definition: date.h:147
void set_year(int32 value)
Definition: date.h:206
Definition: date.h:59
void set_day(int32 value)
Definition: date.h:130
int32 get_year() const
Definition: date.h:193
Definition: announcement.h:41
bool has_year() const
Definition: date.h:178
int32 get_day() const
Definition: date.h:116
const StringPiece GetTypeName() const
Definition: date.h:92
void set_month(int32 value)
Definition: date.h:168
Definition: announcement.cc:43
void clear_year()
Definition: date.h:185