30 #ifndef GOOGLE_CLASSROOM_API_DATE_H_ 31 #define GOOGLE_CLASSROOM_API_DATE_H_ 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" 59 class Date :
public client::JsonCppData {
73 explicit Date(
const Json::Value& storage);
80 explicit Date(Json::Value* storage);
93 return StringPiece(
"google_classroom_api::Date");
102 return Storage().isMember(
"day");
109 MutableStorage()->removeMember(
"day");
117 const Json::Value& storage = Storage(
"day");
118 return client::JsonValueToCppValueHelper<int32 >(storage);
131 client::SetJsonValueFromCppValueHelper<int32 >(
132 value, MutableStorage(
"day"));
141 return Storage().isMember(
"month");
148 MutableStorage()->removeMember(
"month");
156 const Json::Value& storage = Storage(
"month");
157 return client::JsonValueToCppValueHelper<int32 >(storage);
169 client::SetJsonValueFromCppValueHelper<int32 >(
170 value, MutableStorage(
"month"));
179 return Storage().isMember(
"year");
186 MutableStorage()->removeMember(
"year");
194 const Json::Value& storage = Storage(
"year");
195 return client::JsonValueToCppValueHelper<int32 >(storage);
207 client::SetJsonValueFromCppValueHelper<int32 >(
208 value, MutableStorage(
"year"));
212 void operator=(
const Date&);
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
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