analytics  v3
web_property_summary.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_WEB_PROPERTY_SUMMARY_H_
31 #define GOOGLE_ANALYTICS_API_WEB_PROPERTY_SUMMARY_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/profile_summary.h"
39 
40 namespace Json {
41 class Value;
42 } // namespace Json
43 
44 namespace google_analytics_api {
45 using namespace googleapis;
46 
53 class WebPropertySummary : public client::JsonCppData {
54  public:
60  static WebPropertySummary* New();
61 
67  explicit WebPropertySummary(const Json::Value& storage);
68 
74  explicit WebPropertySummary(Json::Value* storage);
75 
79  virtual ~WebPropertySummary();
80 
86  const StringPiece GetTypeName() const {
87  return StringPiece("google_analytics_api::WebPropertySummary");
88  }
89 
95  bool has_id() const {
96  return Storage().isMember("id");
97  }
98 
102  void clear_id() {
103  MutableStorage()->removeMember("id");
104  }
105 
106 
110  const StringPiece get_id() const {
111  const Json::Value& v = Storage("id");
112  if (v == Json::Value::null) return StringPiece("");
113  return StringPiece(v.asCString());
114  }
115 
123  void set_id(const StringPiece& value) {
124  *MutableStorage("id") = value.data();
125  }
126 
133  return Storage().isMember("internalWebPropertyId");
134  }
135 
140  MutableStorage()->removeMember("internalWebPropertyId");
141  }
142 
143 
147  const StringPiece get_internal_web_property_id() const {
148  const Json::Value& v = Storage("internalWebPropertyId");
149  if (v == Json::Value::null) return StringPiece("");
150  return StringPiece(v.asCString());
151  }
152 
160  void set_internal_web_property_id(const StringPiece& value) {
161  *MutableStorage("internalWebPropertyId") = value.data();
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_level() const {
207  return Storage().isMember("level");
208  }
209 
213  void clear_level() {
214  MutableStorage()->removeMember("level");
215  }
216 
217 
221  const StringPiece get_level() const {
222  const Json::Value& v = Storage("level");
223  if (v == Json::Value::null) return StringPiece("");
224  return StringPiece(v.asCString());
225  }
226 
234  void set_level(const StringPiece& value) {
235  *MutableStorage("level") = value.data();
236  }
237 
243  bool has_name() const {
244  return Storage().isMember("name");
245  }
246 
250  void clear_name() {
251  MutableStorage()->removeMember("name");
252  }
253 
254 
258  const StringPiece get_name() const {
259  const Json::Value& v = Storage("name");
260  if (v == Json::Value::null) return StringPiece("");
261  return StringPiece(v.asCString());
262  }
263 
271  void set_name(const StringPiece& value) {
272  *MutableStorage("name") = value.data();
273  }
274 
280  bool has_profiles() const {
281  return Storage().isMember("profiles");
282  }
283 
287  void clear_profiles() {
288  MutableStorage()->removeMember("profiles");
289  }
290 
291 
295  const client::JsonCppArray<ProfileSummary > get_profiles() const;
296 
305  client::JsonCppArray<ProfileSummary > mutable_profiles();
306 
312  bool has_starred() const {
313  return Storage().isMember("starred");
314  }
315 
319  void clear_starred() {
320  MutableStorage()->removeMember("starred");
321  }
322 
323 
327  bool get_starred() const {
328  const Json::Value& storage = Storage("starred");
329  return client::JsonValueToCppValueHelper<bool >(storage);
330  }
331 
339  void set_starred(bool value) {
340  client::SetJsonValueFromCppValueHelper<bool >(
341  value, MutableStorage("starred"));
342  }
343 
349  bool has_website_url() const {
350  return Storage().isMember("websiteUrl");
351  }
352 
357  MutableStorage()->removeMember("websiteUrl");
358  }
359 
360 
364  const StringPiece get_website_url() const {
365  const Json::Value& v = Storage("websiteUrl");
366  if (v == Json::Value::null) return StringPiece("");
367  return StringPiece(v.asCString());
368  }
369 
377  void set_website_url(const StringPiece& value) {
378  *MutableStorage("websiteUrl") = value.data();
379  }
380 
381  private:
382  void operator=(const WebPropertySummary&);
383 }; // WebPropertySummary
384 } // namespace google_analytics_api
385 #endif // GOOGLE_ANALYTICS_API_WEB_PROPERTY_SUMMARY_H_
bool has_name() const
Definition: web_property_summary.h:243
const StringPiece get_internal_web_property_id() const
Definition: web_property_summary.h:147
const StringPiece get_name() const
Definition: web_property_summary.h:258
const StringPiece get_id() const
Definition: web_property_summary.h:110
void clear_kind()
Definition: web_property_summary.h:176
void clear_profiles()
Definition: web_property_summary.h:287
Definition: web_property_summary.h:53
bool get_starred() const
Definition: web_property_summary.h:327
void clear_internal_web_property_id()
Definition: web_property_summary.h:139
const StringPiece GetTypeName() const
Definition: web_property_summary.h:86
void set_kind(const StringPiece &value)
Definition: web_property_summary.h:197
bool has_profiles() const
Definition: web_property_summary.h:280
void set_internal_web_property_id(const StringPiece &value)
Definition: web_property_summary.h:160
bool has_level() const
Definition: web_property_summary.h:206
bool has_internal_web_property_id() const
Definition: web_property_summary.h:132
bool has_kind() const
Definition: web_property_summary.h:169
const StringPiece get_level() const
Definition: web_property_summary.h:221
Definition: account.h:39
void set_level(const StringPiece &value)
Definition: web_property_summary.h:234
Definition: account.cc:41
void set_name(const StringPiece &value)
Definition: web_property_summary.h:271
bool has_website_url() const
Definition: web_property_summary.h:349
const StringPiece get_website_url() const
Definition: web_property_summary.h:364
bool has_id() const
Definition: web_property_summary.h:95
const StringPiece get_kind() const
Definition: web_property_summary.h:184
void clear_starred()
Definition: web_property_summary.h:319
void set_website_url(const StringPiece &value)
Definition: web_property_summary.h:377
void set_starred(bool value)
Definition: web_property_summary.h:339
void clear_level()
Definition: web_property_summary.h:213
bool has_starred() const
Definition: web_property_summary.h:312
void clear_id()
Definition: web_property_summary.h:102
void set_id(const StringPiece &value)
Definition: web_property_summary.h:123
void clear_name()
Definition: web_property_summary.h:250
void clear_website_url()
Definition: web_property_summary.h:356