analytics  v3
custom_dimension.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_DIMENSION_H_
31 #define GOOGLE_ANALYTICS_API_CUSTOM_DIMENSION_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 CustomDimension : public client::JsonCppData {
53  public:
60  class CustomDimensionParentLink : public client::JsonCppData {
61  public:
67  static CustomDimensionParentLink* New();
68 
74  explicit CustomDimensionParentLink(const Json::Value& storage);
75 
81  explicit CustomDimensionParentLink(Json::Value* storage);
82 
86  virtual ~CustomDimensionParentLink();
87 
93  const StringPiece GetTypeName() const {
94  return StringPiece("google_analytics_api::CustomDimensionParentLink");
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 CustomDimensionParentLink&);
173  }; // CustomDimensionParentLink
179  static CustomDimension* New();
180 
186  explicit CustomDimension(const Json::Value& storage);
187 
193  explicit CustomDimension(Json::Value* storage);
194 
198  virtual ~CustomDimension();
199 
205  const StringPiece GetTypeName() const {
206  return StringPiece("google_analytics_api::CustomDimension");
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_name() const {
438  return Storage().isMember("name");
439  }
440 
444  void clear_name() {
445  MutableStorage()->removeMember("name");
446  }
447 
448 
452  const StringPiece get_name() const {
453  const Json::Value& v = Storage("name");
454  if (v == Json::Value::null) return StringPiece("");
455  return StringPiece(v.asCString());
456  }
457 
465  void set_name(const StringPiece& value) {
466  *MutableStorage("name") = value.data();
467  }
468 
474  bool has_parent_link() const {
475  return Storage().isMember("parentLink");
476  }
477 
482  MutableStorage()->removeMember("parentLink");
483  }
484 
485 
490  const Json::Value& storage = Storage("parentLink");
491  return client::JsonValueToCppValueHelper<CustomDimensionParentLink >(storage);
492  }
493 
504  Json::Value* storage = MutableStorage("parentLink");
505  return client::JsonValueToMutableCppValueHelper<CustomDimensionParentLink >(storage);
506  }
507 
513  bool has_scope() const {
514  return Storage().isMember("scope");
515  }
516 
520  void clear_scope() {
521  MutableStorage()->removeMember("scope");
522  }
523 
524 
528  const StringPiece get_scope() const {
529  const Json::Value& v = Storage("scope");
530  if (v == Json::Value::null) return StringPiece("");
531  return StringPiece(v.asCString());
532  }
533 
541  void set_scope(const StringPiece& value) {
542  *MutableStorage("scope") = value.data();
543  }
544 
550  bool has_self_link() const {
551  return Storage().isMember("selfLink");
552  }
553 
558  MutableStorage()->removeMember("selfLink");
559  }
560 
561 
565  const StringPiece get_self_link() const {
566  const Json::Value& v = Storage("selfLink");
567  if (v == Json::Value::null) return StringPiece("");
568  return StringPiece(v.asCString());
569  }
570 
578  void set_self_link(const StringPiece& value) {
579  *MutableStorage("selfLink") = value.data();
580  }
581 
587  bool has_updated() const {
588  return Storage().isMember("updated");
589  }
590 
594  void clear_updated() {
595  MutableStorage()->removeMember("updated");
596  }
597 
598 
602  client::DateTime get_updated() const {
603  const Json::Value& storage = Storage("updated");
604  return client::JsonValueToCppValueHelper<client::DateTime >(storage);
605  }
606 
614  void set_updated(client::DateTime value) {
615  client::SetJsonValueFromCppValueHelper<client::DateTime >(
616  value, MutableStorage("updated"));
617  }
618 
624  bool has_web_property_id() const {
625  return Storage().isMember("webPropertyId");
626  }
627 
632  MutableStorage()->removeMember("webPropertyId");
633  }
634 
635 
639  const StringPiece get_web_property_id() const {
640  const Json::Value& v = Storage("webPropertyId");
641  if (v == Json::Value::null) return StringPiece("");
642  return StringPiece(v.asCString());
643  }
644 
652  void set_web_property_id(const StringPiece& value) {
653  *MutableStorage("webPropertyId") = value.data();
654  }
655 
656  private:
657  void operator=(const CustomDimension&);
658 }; // CustomDimension
659 } // namespace google_analytics_api
660 #endif // GOOGLE_ANALYTICS_API_CUSTOM_DIMENSION_H_
void set_updated(client::DateTime value)
Definition: custom_dimension.h:614
bool get_active() const
Definition: custom_dimension.h:266
bool has_active() const
Definition: custom_dimension.h:251
bool has_web_property_id() const
Definition: custom_dimension.h:624
bool has_parent_link() const
Definition: custom_dimension.h:474
void clear_web_property_id()
Definition: custom_dimension.h:631
void clear_name()
Definition: custom_dimension.h:444
void set_id(const StringPiece &value)
Definition: custom_dimension.h:353
bool has_id() const
Definition: custom_dimension.h:325
bool has_account_id() const
Definition: custom_dimension.h:214
void clear_kind()
Definition: custom_dimension.h:406
void clear_active()
Definition: custom_dimension.h:258
void clear_scope()
Definition: custom_dimension.h:520
bool has_updated() const
Definition: custom_dimension.h:587
bool has_created() const
Definition: custom_dimension.h:288
void set_active(bool value)
Definition: custom_dimension.h:278
void clear_updated()
Definition: custom_dimension.h:594
void clear_id()
Definition: custom_dimension.h:332
client::DateTime get_updated() const
Definition: custom_dimension.h:602
void clear_index()
Definition: custom_dimension.h:369
int32 get_index() const
Definition: custom_dimension.h:377
const StringPiece get_kind() const
Definition: custom_dimension.h:414
void set_account_id(const StringPiece &value)
Definition: custom_dimension.h:242
bool has_index() const
Definition: custom_dimension.h:362
void set_web_property_id(const StringPiece &value)
Definition: custom_dimension.h:652
const StringPiece get_id() const
Definition: custom_dimension.h:340
void set_kind(const StringPiece &value)
Definition: custom_dimension.h:428
bool has_kind() const
Definition: custom_dimension.h:399
const StringPiece get_self_link() const
Definition: custom_dimension.h:565
void set_created(client::DateTime value)
Definition: custom_dimension.h:315
Definition: account.h:39
void set_self_link(const StringPiece &value)
Definition: custom_dimension.h:578
void set_name(const StringPiece &value)
Definition: custom_dimension.h:465
void clear_self_link()
Definition: custom_dimension.h:557
Definition: account.cc:41
void set_index(int32 value)
Definition: custom_dimension.h:389
const StringPiece get_web_property_id() const
Definition: custom_dimension.h:639
client::DateTime get_created() const
Definition: custom_dimension.h:303
bool has_self_link() const
Definition: custom_dimension.h:550
Definition: custom_dimension.h:52
CustomDimensionParentLink mutable_parentLink()
Definition: custom_dimension.h:503
bool has_scope() const
Definition: custom_dimension.h:513
void clear_parent_link()
Definition: custom_dimension.h:481
const StringPiece get_account_id() const
Definition: custom_dimension.h:229
bool has_name() const
Definition: custom_dimension.h:437
const CustomDimensionParentLink get_parent_link() const
Definition: custom_dimension.h:489
const StringPiece GetTypeName() const
Definition: custom_dimension.h:205
void clear_created()
Definition: custom_dimension.h:295
const StringPiece get_scope() const
Definition: custom_dimension.h:528
void clear_account_id()
Definition: custom_dimension.h:221
void set_scope(const StringPiece &value)
Definition: custom_dimension.h:541
const StringPiece get_name() const
Definition: custom_dimension.h:452