analytics  v3
custom_metric.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_CUSTOM_METRIC_H_
31 #define GOOGLE_ANALYTICS_API_CUSTOM_METRIC_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/client/util/date_time.h"
38 #include "googleapis/strings/stringpiece.h"
39 
40 namespace Json {
41 class Value;
42 } // namespace Json
43 
44 namespace google_analytics_api {
45 using namespace googleapis;
46 
52 class CustomMetric : public client::JsonCppData {
53  public:
60  class CustomMetricParentLink : public client::JsonCppData {
61  public:
67  static CustomMetricParentLink* New();
68 
74  explicit CustomMetricParentLink(const Json::Value& storage);
75 
81  explicit CustomMetricParentLink(Json::Value* storage);
82 
86  virtual ~CustomMetricParentLink();
87 
93  const StringPiece GetTypeName() const {
94  return StringPiece("google_analytics_api::CustomMetricParentLink");
95  }
96 
102  bool has_href() const {
103  return Storage().isMember("href");
104  }
105 
109  void clear_href() {
110  MutableStorage()->removeMember("href");
111  }
112 
113 
117  const StringPiece get_href() const {
118  const Json::Value& v = Storage("href");
119  if (v == Json::Value::null) return StringPiece("");
120  return StringPiece(v.asCString());
121  }
122 
130  void set_href(const StringPiece& value) {
131  *MutableStorage("href") = value.data();
132  }
133 
139  bool has_type() const {
140  return Storage().isMember("type");
141  }
142 
146  void clear_type() {
147  MutableStorage()->removeMember("type");
148  }
149 
150 
154  const StringPiece get_type() const {
155  const Json::Value& v = Storage("type");
156  if (v == Json::Value::null) return StringPiece("");
157  return StringPiece(v.asCString());
158  }
159 
167  void set_type(const StringPiece& value) {
168  *MutableStorage("type") = value.data();
169  }
170 
171  private:
172  void operator=(const CustomMetricParentLink&);
173  }; // CustomMetricParentLink
179  static CustomMetric* New();
180 
186  explicit CustomMetric(const Json::Value& storage);
187 
193  explicit CustomMetric(Json::Value* storage);
194 
198  virtual ~CustomMetric();
199 
205  const StringPiece GetTypeName() const {
206  return StringPiece("google_analytics_api::CustomMetric");
207  }
208 
214  bool has_account_id() const {
215  return Storage().isMember("accountId");
216  }
217 
222  MutableStorage()->removeMember("accountId");
223  }
224 
225 
229  const StringPiece get_account_id() const {
230  const Json::Value& v = Storage("accountId");
231  if (v == Json::Value::null) return StringPiece("");
232  return StringPiece(v.asCString());
233  }
234 
242  void set_account_id(const StringPiece& value) {
243  *MutableStorage("accountId") = value.data();
244  }
245 
251  bool has_active() const {
252  return Storage().isMember("active");
253  }
254 
258  void clear_active() {
259  MutableStorage()->removeMember("active");
260  }
261 
262 
266  bool get_active() const {
267  const Json::Value& storage = Storage("active");
268  return client::JsonValueToCppValueHelper<bool >(storage);
269  }
270 
278  void set_active(bool value) {
279  client::SetJsonValueFromCppValueHelper<bool >(
280  value, MutableStorage("active"));
281  }
282 
288  bool has_created() const {
289  return Storage().isMember("created");
290  }
291 
295  void clear_created() {
296  MutableStorage()->removeMember("created");
297  }
298 
299 
303  client::DateTime get_created() const {
304  const Json::Value& storage = Storage("created");
305  return client::JsonValueToCppValueHelper<client::DateTime >(storage);
306  }
307 
315  void set_created(client::DateTime value) {
316  client::SetJsonValueFromCppValueHelper<client::DateTime >(
317  value, MutableStorage("created"));
318  }
319 
325  bool has_id() const {
326  return Storage().isMember("id");
327  }
328 
332  void clear_id() {
333  MutableStorage()->removeMember("id");
334  }
335 
336 
340  const StringPiece get_id() const {
341  const Json::Value& v = Storage("id");
342  if (v == Json::Value::null) return StringPiece("");
343  return StringPiece(v.asCString());
344  }
345 
353  void set_id(const StringPiece& value) {
354  *MutableStorage("id") = value.data();
355  }
356 
362  bool has_index() const {
363  return Storage().isMember("index");
364  }
365 
369  void clear_index() {
370  MutableStorage()->removeMember("index");
371  }
372 
373 
377  int32 get_index() const {
378  const Json::Value& storage = Storage("index");
379  return client::JsonValueToCppValueHelper<int32 >(storage);
380  }
381 
389  void set_index(int32 value) {
390  client::SetJsonValueFromCppValueHelper<int32 >(
391  value, MutableStorage("index"));
392  }
393 
399  bool has_kind() const {
400  return Storage().isMember("kind");
401  }
402 
406  void clear_kind() {
407  MutableStorage()->removeMember("kind");
408  }
409 
410 
414  const StringPiece get_kind() const {
415  const Json::Value& v = Storage("kind");
416  if (v == Json::Value::null) return StringPiece("");
417  return StringPiece(v.asCString());
418  }
419 
428  void set_kind(const StringPiece& value) {
429  *MutableStorage("kind") = value.data();
430  }
431 
437  bool has_max_value() const {
438  return Storage().isMember("max_value");
439  }
440 
445  MutableStorage()->removeMember("max_value");
446  }
447 
448 
452  const StringPiece get_max_value() const {
453  const Json::Value& v = Storage("max_value");
454  if (v == Json::Value::null) return StringPiece("");
455  return StringPiece(v.asCString());
456  }
457 
465  void set_max_value(const StringPiece& value) {
466  *MutableStorage("max_value") = value.data();
467  }
468 
474  bool has_min_value() const {
475  return Storage().isMember("min_value");
476  }
477 
482  MutableStorage()->removeMember("min_value");
483  }
484 
485 
489  const StringPiece get_min_value() const {
490  const Json::Value& v = Storage("min_value");
491  if (v == Json::Value::null) return StringPiece("");
492  return StringPiece(v.asCString());
493  }
494 
502  void set_min_value(const StringPiece& value) {
503  *MutableStorage("min_value") = value.data();
504  }
505 
511  bool has_name() const {
512  return Storage().isMember("name");
513  }
514 
518  void clear_name() {
519  MutableStorage()->removeMember("name");
520  }
521 
522 
526  const StringPiece get_name() const {
527  const Json::Value& v = Storage("name");
528  if (v == Json::Value::null) return StringPiece("");
529  return StringPiece(v.asCString());
530  }
531 
539  void set_name(const StringPiece& value) {
540  *MutableStorage("name") = value.data();
541  }
542 
548  bool has_parent_link() const {
549  return Storage().isMember("parentLink");
550  }
551 
556  MutableStorage()->removeMember("parentLink");
557  }
558 
559 
564  const Json::Value& storage = Storage("parentLink");
565  return client::JsonValueToCppValueHelper<CustomMetricParentLink >(storage);
566  }
567 
578  Json::Value* storage = MutableStorage("parentLink");
579  return client::JsonValueToMutableCppValueHelper<CustomMetricParentLink >(storage);
580  }
581 
587  bool has_scope() const {
588  return Storage().isMember("scope");
589  }
590 
594  void clear_scope() {
595  MutableStorage()->removeMember("scope");
596  }
597 
598 
602  const StringPiece get_scope() const {
603  const Json::Value& v = Storage("scope");
604  if (v == Json::Value::null) return StringPiece("");
605  return StringPiece(v.asCString());
606  }
607 
615  void set_scope(const StringPiece& value) {
616  *MutableStorage("scope") = value.data();
617  }
618 
624  bool has_self_link() const {
625  return Storage().isMember("selfLink");
626  }
627 
632  MutableStorage()->removeMember("selfLink");
633  }
634 
635 
639  const StringPiece get_self_link() const {
640  const Json::Value& v = Storage("selfLink");
641  if (v == Json::Value::null) return StringPiece("");
642  return StringPiece(v.asCString());
643  }
644 
652  void set_self_link(const StringPiece& value) {
653  *MutableStorage("selfLink") = value.data();
654  }
655 
661  bool has_type() const {
662  return Storage().isMember("type");
663  }
664 
668  void clear_type() {
669  MutableStorage()->removeMember("type");
670  }
671 
672 
676  const StringPiece get_type() const {
677  const Json::Value& v = Storage("type");
678  if (v == Json::Value::null) return StringPiece("");
679  return StringPiece(v.asCString());
680  }
681 
689  void set_type(const StringPiece& value) {
690  *MutableStorage("type") = value.data();
691  }
692 
698  bool has_updated() const {
699  return Storage().isMember("updated");
700  }
701 
705  void clear_updated() {
706  MutableStorage()->removeMember("updated");
707  }
708 
709 
713  client::DateTime get_updated() const {
714  const Json::Value& storage = Storage("updated");
715  return client::JsonValueToCppValueHelper<client::DateTime >(storage);
716  }
717 
725  void set_updated(client::DateTime value) {
726  client::SetJsonValueFromCppValueHelper<client::DateTime >(
727  value, MutableStorage("updated"));
728  }
729 
735  bool has_web_property_id() const {
736  return Storage().isMember("webPropertyId");
737  }
738 
743  MutableStorage()->removeMember("webPropertyId");
744  }
745 
746 
750  const StringPiece get_web_property_id() const {
751  const Json::Value& v = Storage("webPropertyId");
752  if (v == Json::Value::null) return StringPiece("");
753  return StringPiece(v.asCString());
754  }
755 
763  void set_web_property_id(const StringPiece& value) {
764  *MutableStorage("webPropertyId") = value.data();
765  }
766 
767  private:
768  void operator=(const CustomMetric&);
769 }; // CustomMetric
770 } // namespace google_analytics_api
771 #endif // GOOGLE_ANALYTICS_API_CUSTOM_METRIC_H_
bool has_scope() const
Definition: custom_metric.h:587
bool has_name() const
Definition: custom_metric.h:511
bool has_active() const
Definition: custom_metric.h:251
void set_self_link(const StringPiece &value)
Definition: custom_metric.h:652
const StringPiece get_kind() const
Definition: custom_metric.h:414
void clear_web_property_id()
Definition: custom_metric.h:742
void clear_max_value()
Definition: custom_metric.h:444
bool has_self_link() const
Definition: custom_metric.h:624
bool has_parent_link() const
Definition: custom_metric.h:548
const StringPiece get_min_value() const
Definition: custom_metric.h:489
void set_kind(const StringPiece &value)
Definition: custom_metric.h:428
const StringPiece get_account_id() const
Definition: custom_metric.h:229
void set_type(const StringPiece &value)
Definition: custom_metric.h:689
void clear_account_id()
Definition: custom_metric.h:221
void clear_parent_link()
Definition: custom_metric.h:555
const StringPiece GetTypeName() const
Definition: custom_metric.h:205
void set_max_value(const StringPiece &value)
Definition: custom_metric.h:465
void set_scope(const StringPiece &value)
Definition: custom_metric.h:615
bool has_account_id() const
Definition: custom_metric.h:214
client::DateTime get_created() const
Definition: custom_metric.h:303
void set_web_property_id(const StringPiece &value)
Definition: custom_metric.h:763
bool has_id() const
Definition: custom_metric.h:325
const StringPiece get_max_value() const
Definition: custom_metric.h:452
void set_min_value(const StringPiece &value)
Definition: custom_metric.h:502
void set_updated(client::DateTime value)
Definition: custom_metric.h:725
void set_index(int32 value)
Definition: custom_metric.h:389
const StringPiece get_type() const
Definition: custom_metric.h:676
bool has_created() const
Definition: custom_metric.h:288
void clear_kind()
Definition: custom_metric.h:406
bool get_active() const
Definition: custom_metric.h:266
const StringPiece get_web_property_id() const
Definition: custom_metric.h:750
const CustomMetricParentLink get_parent_link() const
Definition: custom_metric.h:563
client::DateTime get_updated() const
Definition: custom_metric.h:713
bool has_min_value() const
Definition: custom_metric.h:474
void set_id(const StringPiece &value)
Definition: custom_metric.h:353
const StringPiece get_self_link() const
Definition: custom_metric.h:639
int32 get_index() const
Definition: custom_metric.h:377
CustomMetricParentLink mutable_parentLink()
Definition: custom_metric.h:577
void set_name(const StringPiece &value)
Definition: custom_metric.h:539
bool has_index() const
Definition: custom_metric.h:362
const StringPiece get_scope() const
Definition: custom_metric.h:602
Definition: account.h:39
void clear_id()
Definition: custom_metric.h:332
Definition: custom_metric.h:52
Definition: account.cc:41
void set_created(client::DateTime value)
Definition: custom_metric.h:315
void clear_type()
Definition: custom_metric.h:668
void clear_self_link()
Definition: custom_metric.h:631
bool has_kind() const
Definition: custom_metric.h:399
void clear_updated()
Definition: custom_metric.h:705
void clear_active()
Definition: custom_metric.h:258
bool has_type() const
Definition: custom_metric.h:661
void clear_name()
Definition: custom_metric.h:518
const StringPiece get_id() const
Definition: custom_metric.h:340
void set_active(bool value)
Definition: custom_metric.h:278
void clear_min_value()
Definition: custom_metric.h:481
void clear_index()
Definition: custom_metric.h:369
void set_account_id(const StringPiece &value)
Definition: custom_metric.h:242
void clear_scope()
Definition: custom_metric.h:594
bool has_web_property_id() const
Definition: custom_metric.h:735
bool has_updated() const
Definition: custom_metric.h:698
void clear_created()
Definition: custom_metric.h:295
const StringPiece get_name() const
Definition: custom_metric.h:526
bool has_max_value() const
Definition: custom_metric.h:437