analytics  v3
unsampled_reports.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-01-30, 05:27:32 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 Analytics API (analytics/v3)
24 // Generated from:
25 // Version: v3
26 // Revision: 169
27 // Generated by:
28 // Tool: google-apis-code-generator 1.5.1
29 // C++: 0.1.4
30 #ifndef GOOGLE_ANALYTICS_API_UNSAMPLED_REPORTS_H_
31 #define GOOGLE_ANALYTICS_API_UNSAMPLED_REPORTS_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 #include "google/analytics_api/unsampled_report.h"
40 
41 namespace Json {
42 class Value;
43 } // namespace Json
44 
45 namespace google_analytics_api {
46 using namespace googleapis;
47 
56 class UnsampledReports : public client::JsonCppData {
57  public:
63  static UnsampledReports* New();
64 
70  explicit UnsampledReports(const Json::Value& storage);
71 
77  explicit UnsampledReports(Json::Value* storage);
78 
82  virtual ~UnsampledReports();
83 
89  const StringPiece GetTypeName() const {
90  return StringPiece("google_analytics_api::UnsampledReports");
91  }
92 
98  bool has_items() const {
99  return Storage().isMember("items");
100  }
101 
105  void clear_items() {
106  MutableStorage()->removeMember("items");
107  }
108 
109 
113  const client::JsonCppArray<UnsampledReport > get_items() const;
114 
122  client::JsonCppArray<UnsampledReport > mutable_items();
123 
129  bool has_items_per_page() const {
130  return Storage().isMember("itemsPerPage");
131  }
132 
137  MutableStorage()->removeMember("itemsPerPage");
138  }
139 
140 
144  int32 get_items_per_page() const {
145  const Json::Value& storage = Storage("itemsPerPage");
146  return client::JsonValueToCppValueHelper<int32 >(storage);
147  }
148 
159  void set_items_per_page(int32 value) {
160  client::SetJsonValueFromCppValueHelper<int32 >(
161  value, MutableStorage("itemsPerPage"));
162  }
163 
169  bool has_kind() const {
170  return Storage().isMember("kind");
171  }
172 
176  void clear_kind() {
177  MutableStorage()->removeMember("kind");
178  }
179 
180 
184  const StringPiece get_kind() const {
185  const Json::Value& v = Storage("kind");
186  if (v == Json::Value::null) return StringPiece("");
187  return StringPiece(v.asCString());
188  }
189 
197  void set_kind(const StringPiece& value) {
198  *MutableStorage("kind") = value.data();
199  }
200 
206  bool has_next_link() const {
207  return Storage().isMember("nextLink");
208  }
209 
214  MutableStorage()->removeMember("nextLink");
215  }
216 
217 
221  const StringPiece get_next_link() const {
222  const Json::Value& v = Storage("nextLink");
223  if (v == Json::Value::null) return StringPiece("");
224  return StringPiece(v.asCString());
225  }
226 
234  void set_next_link(const StringPiece& value) {
235  *MutableStorage("nextLink") = value.data();
236  }
237 
243  bool has_previous_link() const {
244  return Storage().isMember("previousLink");
245  }
246 
251  MutableStorage()->removeMember("previousLink");
252  }
253 
254 
258  const StringPiece get_previous_link() const {
259  const Json::Value& v = Storage("previousLink");
260  if (v == Json::Value::null) return StringPiece("");
261  return StringPiece(v.asCString());
262  }
263 
271  void set_previous_link(const StringPiece& value) {
272  *MutableStorage("previousLink") = value.data();
273  }
274 
280  bool has_start_index() const {
281  return Storage().isMember("startIndex");
282  }
283 
288  MutableStorage()->removeMember("startIndex");
289  }
290 
291 
295  int32 get_start_index() const {
296  const Json::Value& storage = Storage("startIndex");
297  return client::JsonValueToCppValueHelper<int32 >(storage);
298  }
299 
308  void set_start_index(int32 value) {
309  client::SetJsonValueFromCppValueHelper<int32 >(
310  value, MutableStorage("startIndex"));
311  }
312 
318  bool has_total_results() const {
319  return Storage().isMember("totalResults");
320  }
321 
326  MutableStorage()->removeMember("totalResults");
327  }
328 
329 
333  int32 get_total_results() const {
334  const Json::Value& storage = Storage("totalResults");
335  return client::JsonValueToCppValueHelper<int32 >(storage);
336  }
337 
346  void set_total_results(int32 value) {
347  client::SetJsonValueFromCppValueHelper<int32 >(
348  value, MutableStorage("totalResults"));
349  }
350 
356  bool has_username() const {
357  return Storage().isMember("username");
358  }
359 
363  void clear_username() {
364  MutableStorage()->removeMember("username");
365  }
366 
367 
371  const StringPiece get_username() const {
372  const Json::Value& v = Storage("username");
373  if (v == Json::Value::null) return StringPiece("");
374  return StringPiece(v.asCString());
375  }
376 
384  void set_username(const StringPiece& value) {
385  *MutableStorage("username") = value.data();
386  }
387 
388  private:
389  void operator=(const UnsampledReports&);
390 }; // UnsampledReports
391 } // namespace google_analytics_api
392 #endif // GOOGLE_ANALYTICS_API_UNSAMPLED_REPORTS_H_
void clear_next_link()
Definition: unsampled_reports.h:213
void set_total_results(int32 value)
Definition: unsampled_reports.h:346
void clear_kind()
Definition: unsampled_reports.h:176
void clear_items_per_page()
Definition: unsampled_reports.h:136
const StringPiece GetTypeName() const
Definition: unsampled_reports.h:89
void set_kind(const StringPiece &value)
Definition: unsampled_reports.h:197
int32 get_total_results() const
Definition: unsampled_reports.h:333
bool has_items_per_page() const
Definition: unsampled_reports.h:129
bool has_items() const
Definition: unsampled_reports.h:98
bool has_username() const
Definition: unsampled_reports.h:356
const StringPiece get_kind() const
Definition: unsampled_reports.h:184
void clear_previous_link()
Definition: unsampled_reports.h:250
bool has_kind() const
Definition: unsampled_reports.h:169
void clear_total_results()
Definition: unsampled_reports.h:325
int32 get_items_per_page() const
Definition: unsampled_reports.h:144
void set_start_index(int32 value)
Definition: unsampled_reports.h:308
void set_next_link(const StringPiece &value)
Definition: unsampled_reports.h:234
Definition: unsampled_reports.h:56
void set_username(const StringPiece &value)
Definition: unsampled_reports.h:384
bool has_previous_link() const
Definition: unsampled_reports.h:243
const StringPiece get_previous_link() const
Definition: unsampled_reports.h:258
bool has_start_index() const
Definition: unsampled_reports.h:280
Definition: account.h:39
Definition: account.cc:41
bool has_next_link() const
Definition: unsampled_reports.h:206
void set_previous_link(const StringPiece &value)
Definition: unsampled_reports.h:271
const StringPiece get_next_link() const
Definition: unsampled_reports.h:221
int32 get_start_index() const
Definition: unsampled_reports.h:295
void set_items_per_page(int32 value)
Definition: unsampled_reports.h:159
void clear_start_index()
Definition: unsampled_reports.h:287
const StringPiece get_username() const
Definition: unsampled_reports.h:371
void clear_items()
Definition: unsampled_reports.h:105
void clear_username()
Definition: unsampled_reports.h:363
bool has_total_results() const
Definition: unsampled_reports.h:318