analytics  v3
upload.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_UPLOAD_H_
31 #define GOOGLE_ANALYTICS_API_UPLOAD_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 Upload : public client::JsonCppData {
53  public:
59  static Upload* New();
60 
66  explicit Upload(const Json::Value& storage);
67 
73  explicit Upload(Json::Value* storage);
74 
78  virtual ~Upload();
79 
85  const StringPiece GetTypeName() const {
86  return StringPiece("google_analytics_api::Upload");
87  }
88 
94  bool has_account_id() const {
95  return Storage().isMember("accountId");
96  }
97 
102  MutableStorage()->removeMember("accountId");
103  }
104 
105 
109  int64 get_account_id() const {
110  const Json::Value& storage = Storage("accountId");
111  return client::JsonValueToCppValueHelper<int64 >(storage);
112  }
113 
121  void set_account_id(int64 value) {
122  client::SetJsonValueFromCppValueHelper<int64 >(
123  value, MutableStorage("accountId"));
124  }
125 
132  return Storage().isMember("customDataSourceId");
133  }
134 
139  MutableStorage()->removeMember("customDataSourceId");
140  }
141 
142 
146  const StringPiece get_custom_data_source_id() const {
147  const Json::Value& v = Storage("customDataSourceId");
148  if (v == Json::Value::null) return StringPiece("");
149  return StringPiece(v.asCString());
150  }
151 
159  void set_custom_data_source_id(const StringPiece& value) {
160  *MutableStorage("customDataSourceId") = value.data();
161  }
162 
168  bool has_errors() const {
169  return Storage().isMember("errors");
170  }
171 
175  void clear_errors() {
176  MutableStorage()->removeMember("errors");
177  }
178 
179 
183  const client::JsonCppArray<string > get_errors() const {
184  const Json::Value& storage = Storage("errors");
185  return client::JsonValueToCppValueHelper<client::JsonCppArray<string > >(storage);
186  }
187 
195  client::JsonCppArray<string > mutable_errors() {
196  Json::Value* storage = MutableStorage("errors");
197  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<string > >(storage);
198  }
199 
205  bool has_id() const {
206  return Storage().isMember("id");
207  }
208 
212  void clear_id() {
213  MutableStorage()->removeMember("id");
214  }
215 
216 
220  const StringPiece get_id() const {
221  const Json::Value& v = Storage("id");
222  if (v == Json::Value::null) return StringPiece("");
223  return StringPiece(v.asCString());
224  }
225 
233  void set_id(const StringPiece& value) {
234  *MutableStorage("id") = value.data();
235  }
236 
242  bool has_kind() const {
243  return Storage().isMember("kind");
244  }
245 
249  void clear_kind() {
250  MutableStorage()->removeMember("kind");
251  }
252 
253 
257  const StringPiece get_kind() const {
258  const Json::Value& v = Storage("kind");
259  if (v == Json::Value::null) return StringPiece("");
260  return StringPiece(v.asCString());
261  }
262 
270  void set_kind(const StringPiece& value) {
271  *MutableStorage("kind") = value.data();
272  }
273 
279  bool has_status() const {
280  return Storage().isMember("status");
281  }
282 
286  void clear_status() {
287  MutableStorage()->removeMember("status");
288  }
289 
290 
294  const StringPiece get_status() const {
295  const Json::Value& v = Storage("status");
296  if (v == Json::Value::null) return StringPiece("");
297  return StringPiece(v.asCString());
298  }
299 
308  void set_status(const StringPiece& value) {
309  *MutableStorage("status") = value.data();
310  }
311 
317  bool has_upload_time() const {
318  return Storage().isMember("uploadTime");
319  }
320 
325  MutableStorage()->removeMember("uploadTime");
326  }
327 
328 
332  client::DateTime get_upload_time() const {
333  const Json::Value& storage = Storage("uploadTime");
334  return client::JsonValueToCppValueHelper<client::DateTime >(storage);
335  }
336 
344  void set_upload_time(client::DateTime value) {
345  client::SetJsonValueFromCppValueHelper<client::DateTime >(
346  value, MutableStorage("uploadTime"));
347  }
348 
349  private:
350  void operator=(const Upload&);
351 }; // Upload
352 } // namespace google_analytics_api
353 #endif // GOOGLE_ANALYTICS_API_UPLOAD_H_
int64 get_account_id() const
Definition: upload.h:109
bool has_account_id() const
Definition: upload.h:94
const client::JsonCppArray< string > get_errors() const
Definition: upload.h:183
void set_custom_data_source_id(const StringPiece &value)
Definition: upload.h:159
bool has_status() const
Definition: upload.h:279
Definition: upload.h:52
void set_account_id(int64 value)
Definition: upload.h:121
bool has_kind() const
Definition: upload.h:242
void clear_id()
Definition: upload.h:212
const StringPiece get_status() const
Definition: upload.h:294
void clear_errors()
Definition: upload.h:175
void clear_status()
Definition: upload.h:286
const StringPiece get_kind() const
Definition: upload.h:257
const StringPiece GetTypeName() const
Definition: upload.h:85
void clear_custom_data_source_id()
Definition: upload.h:138
void clear_upload_time()
Definition: upload.h:324
Definition: account.h:39
void clear_account_id()
Definition: upload.h:101
Definition: account.cc:41
const StringPiece get_id() const
Definition: upload.h:220
bool has_custom_data_source_id() const
Definition: upload.h:131
client::JsonCppArray< string > mutable_errors()
Definition: upload.h:195
const StringPiece get_custom_data_source_id() const
Definition: upload.h:146
void set_status(const StringPiece &value)
Definition: upload.h:308
client::DateTime get_upload_time() const
Definition: upload.h:332
void clear_kind()
Definition: upload.h:249
bool has_upload_time() const
Definition: upload.h:317
bool has_errors() const
Definition: upload.h:168
void set_id(const StringPiece &value)
Definition: upload.h:233
void set_upload_time(client::DateTime value)
Definition: upload.h:344
void set_kind(const StringPiece &value)
Definition: upload.h:270
bool has_id() const
Definition: upload.h:205