blogger  v3
pageviews.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-15, 10:57:39 UTC
18 // C++ generator version: 0.1.4
19 
20 // ----------------------------------------------------------------------------
21 // NOTE: This file is generated from Google APIs Discovery Service.
22 // Service:
23 // Blogger API (blogger/v3)
24 // Generated from:
25 // Version: v3
26 // Revision: 69
27 // Generated by:
28 // Tool: google-apis-code-generator 1.5.1
29 // C++: 0.1.4
30 #ifndef GOOGLE_BLOGGER_API_PAGEVIEWS_H_
31 #define GOOGLE_BLOGGER_API_PAGEVIEWS_H_
32 
33 #include <string>
34 #include "googleapis/base/integral_types.h"
35 #include "googleapis/base/macros.h"
36 #include "googleapis/client/data/jsoncpp_data.h"
37 #include "googleapis/strings/stringpiece.h"
38 
39 namespace Json {
40 class Value;
41 } // namespace Json
42 
43 namespace google_blogger_api {
44 using namespace googleapis;
45 
51 class Pageviews : public client::JsonCppData {
52  public:
58  class PageviewsCounts : public client::JsonCppData {
59  public:
65  static PageviewsCounts* New();
66 
72  explicit PageviewsCounts(const Json::Value& storage);
73 
79  explicit PageviewsCounts(Json::Value* storage);
80 
84  virtual ~PageviewsCounts();
85 
91  const StringPiece GetTypeName() const {
92  return StringPiece("google_blogger_api::PageviewsCounts");
93  }
94 
100  bool has_count() const {
101  return Storage().isMember("count");
102  }
103 
107  void clear_count() {
108  MutableStorage()->removeMember("count");
109  }
110 
111 
115  int64 get_count() const {
116  const Json::Value& storage = Storage("count");
117  return client::JsonValueToCppValueHelper<int64 >(storage);
118  }
119 
127  void set_count(int64 value) {
128  client::SetJsonValueFromCppValueHelper<int64 >(
129  value, MutableStorage("count"));
130  }
131 
137  bool has_time_range() const {
138  return Storage().isMember("timeRange");
139  }
140 
145  MutableStorage()->removeMember("timeRange");
146  }
147 
148 
152  const StringPiece get_time_range() const {
153  const Json::Value& v = Storage("timeRange");
154  if (v == Json::Value::null) return StringPiece("");
155  return StringPiece(v.asCString());
156  }
157 
165  void set_time_range(const StringPiece& value) {
166  *MutableStorage("timeRange") = value.data();
167  }
168 
169  private:
170  void operator=(const PageviewsCounts&);
171  }; // PageviewsCounts
177  static Pageviews* New();
178 
184  explicit Pageviews(const Json::Value& storage);
185 
191  explicit Pageviews(Json::Value* storage);
192 
196  virtual ~Pageviews();
197 
203  const StringPiece GetTypeName() const {
204  return StringPiece("google_blogger_api::Pageviews");
205  }
206 
212  bool has_blog_id() const {
213  return Storage().isMember("blogId");
214  }
215 
219  void clear_blog_id() {
220  MutableStorage()->removeMember("blogId");
221  }
222 
223 
227  const StringPiece get_blog_id() const {
228  const Json::Value& v = Storage("blogId");
229  if (v == Json::Value::null) return StringPiece("");
230  return StringPiece(v.asCString());
231  }
232 
240  void set_blog_id(const StringPiece& value) {
241  *MutableStorage("blogId") = value.data();
242  }
243 
249  bool has_counts() const {
250  return Storage().isMember("counts");
251  }
252 
256  void clear_counts() {
257  MutableStorage()->removeMember("counts");
258  }
259 
260 
264  const client::JsonCppArray<PageviewsCounts > get_counts() const {
265  const Json::Value& storage = Storage("counts");
266  return client::JsonValueToCppValueHelper<client::JsonCppArray<PageviewsCounts > >(storage);
267  }
268 
276  client::JsonCppArray<PageviewsCounts > mutable_counts() {
277  Json::Value* storage = MutableStorage("counts");
278  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<PageviewsCounts > >(storage);
279  }
280 
286  bool has_kind() const {
287  return Storage().isMember("kind");
288  }
289 
293  void clear_kind() {
294  MutableStorage()->removeMember("kind");
295  }
296 
297 
301  const StringPiece get_kind() const {
302  const Json::Value& v = Storage("kind");
303  if (v == Json::Value::null) return StringPiece("");
304  return StringPiece(v.asCString());
305  }
306 
314  void set_kind(const StringPiece& value) {
315  *MutableStorage("kind") = value.data();
316  }
317 
318  private:
319  void operator=(const Pageviews&);
320 }; // Pageviews
321 } // namespace google_blogger_api
322 #endif // GOOGLE_BLOGGER_API_PAGEVIEWS_H_
const StringPiece GetTypeName() const
Definition: pageviews.h:91
void clear_counts()
Definition: pageviews.h:256
const StringPiece GetTypeName() const
Definition: pageviews.h:203
bool has_counts() const
Definition: pageviews.h:249
void clear_kind()
Definition: pageviews.h:293
void set_kind(const StringPiece &value)
Definition: pageviews.h:314
void set_count(int64 value)
Definition: pageviews.h:127
bool has_blog_id() const
Definition: pageviews.h:212
Definition: pageviews.h:51
Definition: blog.cc:44
void clear_time_range()
Definition: pageviews.h:144
Definition: blog.h:42
const StringPiece get_time_range() const
Definition: pageviews.h:152
const StringPiece get_kind() const
Definition: pageviews.h:301
void clear_blog_id()
Definition: pageviews.h:219
bool has_time_range() const
Definition: pageviews.h:137
void set_blog_id(const StringPiece &value)
Definition: pageviews.h:240
client::JsonCppArray< PageviewsCounts > mutable_counts()
Definition: pageviews.h:276
int64 get_count() const
Definition: pageviews.h:115
bool has_kind() const
Definition: pageviews.h:286
bool has_count() const
Definition: pageviews.h:100
const StringPiece get_blog_id() const
Definition: pageviews.h:227
void clear_count()
Definition: pageviews.h:107
const client::JsonCppArray< PageviewsCounts > get_counts() const
Definition: pageviews.h:264
void set_time_range(const StringPiece &value)
Definition: pageviews.h:165