analytics  v3
columns.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_COLUMNS_H_
31 #define GOOGLE_ANALYTICS_API_COLUMNS_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/column.h"
40 
41 namespace Json {
42 class Value;
43 } // namespace Json
44 
45 namespace google_analytics_api {
46 using namespace googleapis;
47 
53 class Columns : public client::JsonCppData {
54  public:
60  static Columns* New();
61 
67  explicit Columns(const Json::Value& storage);
68 
74  explicit Columns(Json::Value* storage);
75 
79  virtual ~Columns();
80 
86  const StringPiece GetTypeName() const {
87  return StringPiece("google_analytics_api::Columns");
88  }
89 
95  bool has_attribute_names() const {
96  return Storage().isMember("attributeNames");
97  }
98 
103  MutableStorage()->removeMember("attributeNames");
104  }
105 
106 
111  const client::JsonCppArray<string > get_attribute_names() const {
112  const Json::Value& storage = Storage("attributeNames");
113  return client::JsonValueToCppValueHelper<client::JsonCppArray<string > >(storage);
114  }
115 
124  client::JsonCppArray<string > mutable_attributeNames() {
125  Json::Value* storage = MutableStorage("attributeNames");
126  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<string > >(storage);
127  }
128 
134  bool has_etag() const {
135  return Storage().isMember("etag");
136  }
137 
141  void clear_etag() {
142  MutableStorage()->removeMember("etag");
143  }
144 
145 
149  const StringPiece get_etag() const {
150  const Json::Value& v = Storage("etag");
151  if (v == Json::Value::null) return StringPiece("");
152  return StringPiece(v.asCString());
153  }
154 
163  void set_etag(const StringPiece& value) {
164  *MutableStorage("etag") = value.data();
165  }
166 
172  bool has_items() const {
173  return Storage().isMember("items");
174  }
175 
179  void clear_items() {
180  MutableStorage()->removeMember("items");
181  }
182 
183 
187  const client::JsonCppArray<Column > get_items() const;
188 
196  client::JsonCppArray<Column > mutable_items();
197 
203  bool has_kind() const {
204  return Storage().isMember("kind");
205  }
206 
210  void clear_kind() {
211  MutableStorage()->removeMember("kind");
212  }
213 
214 
218  const StringPiece get_kind() const {
219  const Json::Value& v = Storage("kind");
220  if (v == Json::Value::null) return StringPiece("");
221  return StringPiece(v.asCString());
222  }
223 
231  void set_kind(const StringPiece& value) {
232  *MutableStorage("kind") = value.data();
233  }
234 
240  bool has_total_results() const {
241  return Storage().isMember("totalResults");
242  }
243 
248  MutableStorage()->removeMember("totalResults");
249  }
250 
251 
255  int32 get_total_results() const {
256  const Json::Value& storage = Storage("totalResults");
257  return client::JsonValueToCppValueHelper<int32 >(storage);
258  }
259 
267  void set_total_results(int32 value) {
268  client::SetJsonValueFromCppValueHelper<int32 >(
269  value, MutableStorage("totalResults"));
270  }
271 
272  private:
273  void operator=(const Columns&);
274 }; // Columns
275 } // namespace google_analytics_api
276 #endif // GOOGLE_ANALYTICS_API_COLUMNS_H_
const StringPiece get_kind() const
Definition: columns.h:218
const client::JsonCppArray< string > get_attribute_names() const
Definition: columns.h:111
void clear_attribute_names()
Definition: columns.h:102
bool has_total_results() const
Definition: columns.h:240
void set_total_results(int32 value)
Definition: columns.h:267
bool has_etag() const
Definition: columns.h:134
bool has_attribute_names() const
Definition: columns.h:95
void set_etag(const StringPiece &value)
Definition: columns.h:163
Definition: columns.h:53
bool has_kind() const
Definition: columns.h:203
int32 get_total_results() const
Definition: columns.h:255
Definition: account.h:39
Definition: account.cc:41
void clear_kind()
Definition: columns.h:210
void clear_etag()
Definition: columns.h:141
client::JsonCppArray< string > mutable_attributeNames()
Definition: columns.h:124
const StringPiece get_etag() const
Definition: columns.h:149
void set_kind(const StringPiece &value)
Definition: columns.h:231
const StringPiece GetTypeName() const
Definition: columns.h:86
bool has_items() const
Definition: columns.h:172
void clear_total_results()
Definition: columns.h:247
void clear_items()
Definition: columns.h:179