youtube  v3
activity.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-02-27, 01:46:08 UTC
18 // C++ generator version: 0.1.4
19 
20 // ----------------------------------------------------------------------------
21 // NOTE: This file is generated from Google APIs Discovery Service.
22 // Service:
23 // YouTube Data API (youtube/v3)
24 // Generated from:
25 // Version: v3
26 // Revision: 222
27 // Generated by:
28 // Tool: google-apis-code-generator 1.5.1
29 // C++: 0.1.4
30 #ifndef GOOGLE_YOUTUBE_API_ACTIVITY_H_
31 #define GOOGLE_YOUTUBE_API_ACTIVITY_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/youtube_api/activity_content_details.h"
39 #include "google/youtube_api/activity_snippet.h"
40 
41 namespace Json {
42 class Value;
43 } // namespace Json
44 
45 namespace google_youtube_api {
46 using namespace googleapis;
47 
59 class Activity : public client::JsonCppData {
60  public:
66  static Activity* New();
67 
73  explicit Activity(const Json::Value& storage);
74 
80  explicit Activity(Json::Value* storage);
81 
85  virtual ~Activity();
86 
92  const StringPiece GetTypeName() const {
93  return StringPiece("google_youtube_api::Activity");
94  }
95 
101  bool has_content_details() const {
102  return Storage().isMember("contentDetails");
103  }
104 
109  MutableStorage()->removeMember("contentDetails");
110  }
111 
112 
117  const ActivityContentDetails get_content_details() const;
118 
129  ActivityContentDetails mutable_contentDetails();
130 
136  bool has_etag() const {
137  return Storage().isMember("etag");
138  }
139 
143  void clear_etag() {
144  MutableStorage()->removeMember("etag");
145  }
146 
147 
151  const StringPiece get_etag() const {
152  const Json::Value& v = Storage("etag");
153  if (v == Json::Value::null) return StringPiece("");
154  return StringPiece(v.asCString());
155  }
156 
164  void set_etag(const StringPiece& value) {
165  *MutableStorage("etag") = value.data();
166  }
167 
173  bool has_id() const {
174  return Storage().isMember("id");
175  }
176 
180  void clear_id() {
181  MutableStorage()->removeMember("id");
182  }
183 
184 
188  const StringPiece get_id() const {
189  const Json::Value& v = Storage("id");
190  if (v == Json::Value::null) return StringPiece("");
191  return StringPiece(v.asCString());
192  }
193 
201  void set_id(const StringPiece& value) {
202  *MutableStorage("id") = value.data();
203  }
204 
210  bool has_kind() const {
211  return Storage().isMember("kind");
212  }
213 
217  void clear_kind() {
218  MutableStorage()->removeMember("kind");
219  }
220 
221 
225  const StringPiece get_kind() const {
226  const Json::Value& v = Storage("kind");
227  if (v == Json::Value::null) return StringPiece("");
228  return StringPiece(v.asCString());
229  }
230 
239  void set_kind(const StringPiece& value) {
240  *MutableStorage("kind") = value.data();
241  }
242 
248  bool has_snippet() const {
249  return Storage().isMember("snippet");
250  }
251 
255  void clear_snippet() {
256  MutableStorage()->removeMember("snippet");
257  }
258 
259 
263  const ActivitySnippet get_snippet() const;
264 
273  ActivitySnippet mutable_snippet();
274 
275  private:
276  void operator=(const Activity&);
277 }; // Activity
278 } // namespace google_youtube_api
279 #endif // GOOGLE_YOUTUBE_API_ACTIVITY_H_
Definition: access_policy.cc:40
Definition: activity_content_details.h:62
const StringPiece get_kind() const
Definition: activity.h:225
const StringPiece GetTypeName() const
Definition: activity.h:92
bool has_etag() const
Definition: activity.h:136
const StringPiece get_etag() const
Definition: activity.h:151
Definition: activity.h:59
void set_etag(const StringPiece &value)
Definition: activity.h:164
Definition: activity_snippet.h:54
void clear_etag()
Definition: activity.h:143
Definition: access_policy.h:38
bool has_snippet() const
Definition: activity.h:248
void set_kind(const StringPiece &value)
Definition: activity.h:239
void clear_snippet()
Definition: activity.h:255
void clear_kind()
Definition: activity.h:217
bool has_content_details() const
Definition: activity.h:101
bool has_kind() const
Definition: activity.h:210
const StringPiece get_id() const
Definition: activity.h:188
void set_id(const StringPiece &value)
Definition: activity.h:201
bool has_id() const
Definition: activity.h:173
void clear_id()
Definition: activity.h:180
void clear_content_details()
Definition: activity.h:108