analytics  v3
entity_user_link.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_ENTITY_USER_LINK_H_
31 #define GOOGLE_ANALYTICS_API_ENTITY_USER_LINK_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/analytics_api/account_ref.h"
39 #include "google/analytics_api/profile_ref.h"
40 #include "google/analytics_api/user_ref.h"
41 #include "google/analytics_api/web_property_ref.h"
42 
43 namespace Json {
44 class Value;
45 } // namespace Json
46 
47 namespace google_analytics_api {
48 using namespace googleapis;
49 
56 class EntityUserLink : public client::JsonCppData {
57  public:
64  class EntityUserLinkEntity : public client::JsonCppData {
65  public:
71  static EntityUserLinkEntity* New();
72 
78  explicit EntityUserLinkEntity(const Json::Value& storage);
79 
85  explicit EntityUserLinkEntity(Json::Value* storage);
86 
90  virtual ~EntityUserLinkEntity();
91 
97  const StringPiece GetTypeName() const {
98  return StringPiece("google_analytics_api::EntityUserLinkEntity");
99  }
100 
106  bool has_account_ref() const {
107  return Storage().isMember("accountRef");
108  }
109 
114  MutableStorage()->removeMember("accountRef");
115  }
116 
117 
121  const AccountRef get_account_ref() const;
122 
131  AccountRef mutable_accountRef();
132 
138  bool has_profile_ref() const {
139  return Storage().isMember("profileRef");
140  }
141 
146  MutableStorage()->removeMember("profileRef");
147  }
148 
149 
153  const ProfileRef get_profile_ref() const;
154 
163  ProfileRef mutable_profileRef();
164 
170  bool has_web_property_ref() const {
171  return Storage().isMember("webPropertyRef");
172  }
173 
178  MutableStorage()->removeMember("webPropertyRef");
179  }
180 
181 
186  const WebPropertyRef get_web_property_ref() const;
187 
196  WebPropertyRef mutable_webPropertyRef();
197 
198  private:
199  void operator=(const EntityUserLinkEntity&);
200  }; // EntityUserLinkEntity
206  class EntityUserLinkPermissions : public client::JsonCppData {
207  public:
213  static EntityUserLinkPermissions* New();
214 
220  explicit EntityUserLinkPermissions(const Json::Value& storage);
221 
227  explicit EntityUserLinkPermissions(Json::Value* storage);
228 
232  virtual ~EntityUserLinkPermissions();
233 
239  const StringPiece GetTypeName() const {
240  return StringPiece("google_analytics_api::EntityUserLinkPermissions");
241  }
242 
248  bool has_effective() const {
249  return Storage().isMember("effective");
250  }
251 
256  MutableStorage()->removeMember("effective");
257  }
258 
259 
263  const client::JsonCppArray<string > get_effective() const {
264  const Json::Value& storage = Storage("effective");
265  return client::JsonValueToCppValueHelper<client::JsonCppArray<string > >(storage);
266  }
267 
279  client::JsonCppArray<string > mutable_effective() {
280  Json::Value* storage = MutableStorage("effective");
281  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<string > >(storage);
282  }
283 
289  bool has_local() const {
290  return Storage().isMember("local");
291  }
292 
296  void clear_local() {
297  MutableStorage()->removeMember("local");
298  }
299 
300 
304  const client::JsonCppArray<string > get_local() const {
305  const Json::Value& storage = Storage("local");
306  return client::JsonValueToCppValueHelper<client::JsonCppArray<string > >(storage);
307  }
308 
318  client::JsonCppArray<string > mutable_local() {
319  Json::Value* storage = MutableStorage("local");
320  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<string > >(storage);
321  }
322 
323  private:
324  void operator=(const EntityUserLinkPermissions&);
325  }; // EntityUserLinkPermissions
331  static EntityUserLink* New();
332 
338  explicit EntityUserLink(const Json::Value& storage);
339 
345  explicit EntityUserLink(Json::Value* storage);
346 
350  virtual ~EntityUserLink();
351 
357  const StringPiece GetTypeName() const {
358  return StringPiece("google_analytics_api::EntityUserLink");
359  }
360 
366  bool has_entity() const {
367  return Storage().isMember("entity");
368  }
369 
373  void clear_entity() {
374  MutableStorage()->removeMember("entity");
375  }
376 
377 
382  const Json::Value& storage = Storage("entity");
383  return client::JsonValueToCppValueHelper<EntityUserLinkEntity >(storage);
384  }
385 
395  Json::Value* storage = MutableStorage("entity");
396  return client::JsonValueToMutableCppValueHelper<EntityUserLinkEntity >(storage);
397  }
398 
404  bool has_id() const {
405  return Storage().isMember("id");
406  }
407 
411  void clear_id() {
412  MutableStorage()->removeMember("id");
413  }
414 
415 
419  const StringPiece get_id() const {
420  const Json::Value& v = Storage("id");
421  if (v == Json::Value::null) return StringPiece("");
422  return StringPiece(v.asCString());
423  }
424 
432  void set_id(const StringPiece& value) {
433  *MutableStorage("id") = value.data();
434  }
435 
441  bool has_kind() const {
442  return Storage().isMember("kind");
443  }
444 
448  void clear_kind() {
449  MutableStorage()->removeMember("kind");
450  }
451 
452 
456  const StringPiece get_kind() const {
457  const Json::Value& v = Storage("kind");
458  if (v == Json::Value::null) return StringPiece("");
459  return StringPiece(v.asCString());
460  }
461 
469  void set_kind(const StringPiece& value) {
470  *MutableStorage("kind") = value.data();
471  }
472 
478  bool has_permissions() const {
479  return Storage().isMember("permissions");
480  }
481 
486  MutableStorage()->removeMember("permissions");
487  }
488 
489 
494  const Json::Value& storage = Storage("permissions");
495  return client::JsonValueToCppValueHelper<EntityUserLinkPermissions >(storage);
496  }
497 
507  Json::Value* storage = MutableStorage("permissions");
508  return client::JsonValueToMutableCppValueHelper<EntityUserLinkPermissions >(storage);
509  }
510 
516  bool has_self_link() const {
517  return Storage().isMember("selfLink");
518  }
519 
524  MutableStorage()->removeMember("selfLink");
525  }
526 
527 
531  const StringPiece get_self_link() const {
532  const Json::Value& v = Storage("selfLink");
533  if (v == Json::Value::null) return StringPiece("");
534  return StringPiece(v.asCString());
535  }
536 
544  void set_self_link(const StringPiece& value) {
545  *MutableStorage("selfLink") = value.data();
546  }
547 
553  bool has_user_ref() const {
554  return Storage().isMember("userRef");
555  }
556 
560  void clear_user_ref() {
561  MutableStorage()->removeMember("userRef");
562  }
563 
564 
568  const UserRef get_user_ref() const;
569 
577  UserRef mutable_userRef();
578 
579  private:
580  void operator=(const EntityUserLink&);
581 }; // EntityUserLink
582 } // namespace google_analytics_api
583 #endif // GOOGLE_ANALYTICS_API_ENTITY_USER_LINK_H_
Definition: web_property_ref.h:50
Definition: user_ref.h:50
Definition: account.h:39
Definition: account.cc:41
Definition: account_ref.h:50
Definition: profile_ref.h:50