classroom  v1
registration.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_REGISTRATION_H_
31 #define GOOGLE_CLASSROOM_API_REGISTRATION_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/cloud_pubsub_topic.h"
39 #include "google/classroom_api/feed.h"
40 
41 namespace Json {
42 class Value;
43 } // namespace Json
44 
45 namespace google_classroom_api {
46 using namespace googleapis;
47 
54 class Registration : public client::JsonCppData {
55  public:
61  static Registration* New();
62 
68  explicit Registration(const Json::Value& storage);
69 
75  explicit Registration(Json::Value* storage);
76 
80  virtual ~Registration();
81 
87  const StringPiece GetTypeName() const {
88  return StringPiece("google_classroom_api::Registration");
89  }
90 
96  bool has_cloud_pubsub_topic() const {
97  return Storage().isMember("cloudPubsubTopic");
98  }
99 
104  MutableStorage()->removeMember("cloudPubsubTopic");
105  }
106 
107 
112  const CloudPubsubTopic get_cloud_pubsub_topic() const;
113 
122  CloudPubsubTopic mutable_cloudPubsubTopic();
123 
129  bool has_expiry_time() const {
130  return Storage().isMember("expiryTime");
131  }
132 
137  MutableStorage()->removeMember("expiryTime");
138  }
139 
140 
144  const StringPiece get_expiry_time() const {
145  const Json::Value& v = Storage("expiryTime");
146  if (v == Json::Value::null) return StringPiece("");
147  return StringPiece(v.asCString());
148  }
149 
159  void set_expiry_time(const StringPiece& value) {
160  *MutableStorage("expiryTime") = value.data();
161  }
162 
168  bool has_feed() const {
169  return Storage().isMember("feed");
170  }
171 
175  void clear_feed() {
176  MutableStorage()->removeMember("feed");
177  }
178 
179 
183  const Feed get_feed() const;
184 
193  Feed mutable_feed();
194 
200  bool has_registration_id() const {
201  return Storage().isMember("registrationId");
202  }
203 
208  MutableStorage()->removeMember("registrationId");
209  }
210 
211 
215  const StringPiece get_registration_id() const {
216  const Json::Value& v = Storage("registrationId");
217  if (v == Json::Value::null) return StringPiece("");
218  return StringPiece(v.asCString());
219  }
220 
230  void set_registration_id(const StringPiece& value) {
231  *MutableStorage("registrationId") = value.data();
232  }
233 
234  private:
235  void operator=(const Registration&);
236 }; // Registration
237 } // namespace google_classroom_api
238 #endif // GOOGLE_CLASSROOM_API_REGISTRATION_H_
void clear_feed()
Definition: registration.h:175
bool has_expiry_time() const
Definition: registration.h:129
Definition: feed.h:54
const StringPiece get_registration_id() const
Definition: registration.h:215
Definition: registration.h:54
Definition: cloud_pubsub_topic.h:54
void set_registration_id(const StringPiece &value)
Definition: registration.h:230
void clear_cloud_pubsub_topic()
Definition: registration.h:103
const StringPiece GetTypeName() const
Definition: registration.h:87
Definition: announcement.h:41
bool has_feed() const
Definition: registration.h:168
bool has_registration_id() const
Definition: registration.h:200
void clear_registration_id()
Definition: registration.h:207
bool has_cloud_pubsub_topic() const
Definition: registration.h:96
void set_expiry_time(const StringPiece &value)
Definition: registration.h:159
Definition: announcement.cc:43
void clear_expiry_time()
Definition: registration.h:136
const StringPiece get_expiry_time() const
Definition: registration.h:144