youtube  v3
subscription.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_SUBSCRIPTION_H_
31 #define GOOGLE_YOUTUBE_API_SUBSCRIPTION_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/subscription_content_details.h"
39 #include "google/youtube_api/subscription_snippet.h"
40 #include "google/youtube_api/subscription_subscriber_snippet.h"
41 
42 namespace Json {
43 class Value;
44 } // namespace Json
45 
46 namespace google_youtube_api {
47 using namespace googleapis;
48 
57 class Subscription : public client::JsonCppData {
58  public:
64  static Subscription* New();
65 
71  explicit Subscription(const Json::Value& storage);
72 
78  explicit Subscription(Json::Value* storage);
79 
83  virtual ~Subscription();
84 
90  const StringPiece GetTypeName() const {
91  return StringPiece("google_youtube_api::Subscription");
92  }
93 
99  bool has_content_details() const {
100  return Storage().isMember("contentDetails");
101  }
102 
107  MutableStorage()->removeMember("contentDetails");
108  }
109 
110 
115  const SubscriptionContentDetails get_content_details() const;
116 
125  SubscriptionContentDetails mutable_contentDetails();
126 
132  bool has_etag() const {
133  return Storage().isMember("etag");
134  }
135 
139  void clear_etag() {
140  MutableStorage()->removeMember("etag");
141  }
142 
143 
147  const StringPiece get_etag() const {
148  const Json::Value& v = Storage("etag");
149  if (v == Json::Value::null) return StringPiece("");
150  return StringPiece(v.asCString());
151  }
152 
160  void set_etag(const StringPiece& value) {
161  *MutableStorage("etag") = value.data();
162  }
163 
169  bool has_id() const {
170  return Storage().isMember("id");
171  }
172 
176  void clear_id() {
177  MutableStorage()->removeMember("id");
178  }
179 
180 
184  const StringPiece get_id() const {
185  const Json::Value& v = Storage("id");
186  if (v == Json::Value::null) return StringPiece("");
187  return StringPiece(v.asCString());
188  }
189 
197  void set_id(const StringPiece& value) {
198  *MutableStorage("id") = value.data();
199  }
200 
206  bool has_kind() const {
207  return Storage().isMember("kind");
208  }
209 
213  void clear_kind() {
214  MutableStorage()->removeMember("kind");
215  }
216 
217 
221  const StringPiece get_kind() const {
222  const Json::Value& v = Storage("kind");
223  if (v == Json::Value::null) return StringPiece("");
224  return StringPiece(v.asCString());
225  }
226 
235  void set_kind(const StringPiece& value) {
236  *MutableStorage("kind") = value.data();
237  }
238 
244  bool has_snippet() const {
245  return Storage().isMember("snippet");
246  }
247 
251  void clear_snippet() {
252  MutableStorage()->removeMember("snippet");
253  }
254 
255 
259  const SubscriptionSnippet get_snippet() const;
260 
269  SubscriptionSnippet mutable_snippet();
270 
276  bool has_subscriber_snippet() const {
277  return Storage().isMember("subscriberSnippet");
278  }
279 
284  MutableStorage()->removeMember("subscriberSnippet");
285  }
286 
287 
292  const SubscriptionSubscriberSnippet get_subscriber_snippet() const;
293 
302  SubscriptionSubscriberSnippet mutable_subscriberSnippet();
303 
304  private:
305  void operator=(const Subscription&);
306 }; // Subscription
307 } // namespace google_youtube_api
308 #endif // GOOGLE_YOUTUBE_API_SUBSCRIPTION_H_
Definition: access_policy.cc:40
void clear_etag()
Definition: subscription.h:139
void set_etag(const StringPiece &value)
Definition: subscription.h:160
void clear_snippet()
Definition: subscription.h:251
Definition: subscription_content_details.h:51
const StringPiece get_kind() const
Definition: subscription.h:221
void clear_subscriber_snippet()
Definition: subscription.h:283
bool has_etag() const
Definition: subscription.h:132
void clear_kind()
Definition: subscription.h:213
Definition: access_policy.h:38
void set_id(const StringPiece &value)
Definition: subscription.h:197
const StringPiece GetTypeName() const
Definition: subscription.h:90
Definition: subscription.h:57
const StringPiece get_etag() const
Definition: subscription.h:147
bool has_snippet() const
Definition: subscription.h:244
bool has_content_details() const
Definition: subscription.h:99
Definition: subscription_snippet.h:55
Definition: subscription_subscriber_snippet.h:53
const StringPiece get_id() const
Definition: subscription.h:184
bool has_kind() const
Definition: subscription.h:206
void clear_content_details()
Definition: subscription.h:106
bool has_subscriber_snippet() const
Definition: subscription.h:276
bool has_id() const
Definition: subscription.h:169
void clear_id()
Definition: subscription.h:176
void set_kind(const StringPiece &value)
Definition: subscription.h:235