bigquery  v2
job.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-03-07, 23:51:40 UTC
18 // C++ generator version: 0.1.4
19 
20 // ----------------------------------------------------------------------------
21 // NOTE: This file is generated from Google APIs Discovery Service.
22 // Service:
23 // BigQuery API (bigquery/v2)
24 // Generated from:
25 // Version: v2
26 // Revision: 459
27 // Generated by:
28 // Tool: google-apis-code-generator 1.5.1
29 // C++: 0.1.4
30 #ifndef GOOGLE_BIGQUERY_API_JOB_H_
31 #define GOOGLE_BIGQUERY_API_JOB_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/bigquery_api/job_configuration.h"
39 #include "google/bigquery_api/job_reference.h"
40 #include "google/bigquery_api/job_statistics.h"
41 #include "google/bigquery_api/job_status.h"
42 
43 namespace Json {
44 class Value;
45 } // namespace Json
46 
47 namespace google_bigquery_api {
48 using namespace googleapis;
49 
55 class Job : public client::JsonCppData {
56  public:
62  static Job* New();
63 
69  explicit Job(const Json::Value& storage);
70 
76  explicit Job(Json::Value* storage);
77 
81  virtual ~Job();
82 
88  const StringPiece GetTypeName() const {
89  return StringPiece("google_bigquery_api::Job");
90  }
91 
97  bool has_configuration() const {
98  return Storage().isMember("configuration");
99  }
100 
105  MutableStorage()->removeMember("configuration");
106  }
107 
108 
112  const JobConfiguration get_configuration() const;
113 
122  JobConfiguration mutable_configuration();
123 
129  bool has_etag() const {
130  return Storage().isMember("etag");
131  }
132 
136  void clear_etag() {
137  MutableStorage()->removeMember("etag");
138  }
139 
140 
144  const StringPiece get_etag() const {
145  const Json::Value& v = Storage("etag");
146  if (v == Json::Value::null) return StringPiece("");
147  return StringPiece(v.asCString());
148  }
149 
157  void set_etag(const StringPiece& value) {
158  *MutableStorage("etag") = value.data();
159  }
160 
166  bool has_id() const {
167  return Storage().isMember("id");
168  }
169 
173  void clear_id() {
174  MutableStorage()->removeMember("id");
175  }
176 
177 
181  const StringPiece get_id() const {
182  const Json::Value& v = Storage("id");
183  if (v == Json::Value::null) return StringPiece("");
184  return StringPiece(v.asCString());
185  }
186 
194  void set_id(const StringPiece& value) {
195  *MutableStorage("id") = value.data();
196  }
197 
203  bool has_job_reference() const {
204  return Storage().isMember("jobReference");
205  }
206 
211  MutableStorage()->removeMember("jobReference");
212  }
213 
214 
218  const JobReference get_job_reference() const;
219 
228  JobReference mutable_jobReference();
229 
235  bool has_kind() const {
236  return Storage().isMember("kind");
237  }
238 
242  void clear_kind() {
243  MutableStorage()->removeMember("kind");
244  }
245 
246 
250  const StringPiece get_kind() const {
251  const Json::Value& v = Storage("kind");
252  if (v == Json::Value::null) return StringPiece("");
253  return StringPiece(v.asCString());
254  }
255 
263  void set_kind(const StringPiece& value) {
264  *MutableStorage("kind") = value.data();
265  }
266 
272  bool has_self_link() const {
273  return Storage().isMember("selfLink");
274  }
275 
280  MutableStorage()->removeMember("selfLink");
281  }
282 
283 
287  const StringPiece get_self_link() const {
288  const Json::Value& v = Storage("selfLink");
289  if (v == Json::Value::null) return StringPiece("");
290  return StringPiece(v.asCString());
291  }
292 
300  void set_self_link(const StringPiece& value) {
301  *MutableStorage("selfLink") = value.data();
302  }
303 
309  bool has_statistics() const {
310  return Storage().isMember("statistics");
311  }
312 
317  MutableStorage()->removeMember("statistics");
318  }
319 
320 
324  const JobStatistics get_statistics() const;
325 
335  JobStatistics mutable_statistics();
336 
342  bool has_status() const {
343  return Storage().isMember("status");
344  }
345 
349  void clear_status() {
350  MutableStorage()->removeMember("status");
351  }
352 
353 
357  const JobStatus get_status() const;
358 
367  JobStatus mutable_status();
368 
374  bool has_user_email() const {
375  return Storage().isMember("user_email");
376  }
377 
382  MutableStorage()->removeMember("user_email");
383  }
384 
385 
389  const StringPiece get_user_email() const {
390  const Json::Value& v = Storage("user_email");
391  if (v == Json::Value::null) return StringPiece("");
392  return StringPiece(v.asCString());
393  }
394 
402  void set_user_email(const StringPiece& value) {
403  *MutableStorage("user_email") = value.data();
404  }
405 
406  private:
407  void operator=(const Job&);
408 }; // Job
409 } // namespace google_bigquery_api
410 #endif // GOOGLE_BIGQUERY_API_JOB_H_
bool has_configuration() const
Definition: job.h:97
const StringPiece get_user_email() const
Definition: job.h:389
void set_self_link(const StringPiece &value)
Definition: job.h:300
bool has_job_reference() const
Definition: job.h:203
void clear_self_link()
Definition: job.h:279
void clear_etag()
Definition: job.h:136
void set_etag(const StringPiece &value)
Definition: job.h:157
void clear_job_reference()
Definition: job.h:210
Definition: job_configuration.h:56
void clear_configuration()
Definition: job.h:104
bool has_self_link() const
Definition: job.h:272
Definition: job_statistics.h:56
Definition: aggregate_classification_metrics.cc:39
void clear_status()
Definition: job.h:349
bool has_etag() const
Definition: job.h:129
const StringPiece get_self_link() const
Definition: job.h:287
const StringPiece get_kind() const
Definition: job.h:250
void clear_id()
Definition: job.h:173
void set_kind(const StringPiece &value)
Definition: job.h:263
Definition: aggregate_classification_metrics.h:37
const StringPiece GetTypeName() const
Definition: job.h:88
void set_user_email(const StringPiece &value)
Definition: job.h:402
void clear_user_email()
Definition: job.h:381
bool has_id() const
Definition: job.h:166
bool has_user_email() const
Definition: job.h:374
Definition: job_status.h:52
const StringPiece get_etag() const
Definition: job.h:144
bool has_statistics() const
Definition: job.h:309
Definition: job_reference.h:50
void clear_kind()
Definition: job.h:242
const StringPiece get_id() const
Definition: job.h:181
void clear_statistics()
Definition: job.h:316
bool has_kind() const
Definition: job.h:235
void set_id(const StringPiece &value)
Definition: job.h:194
bool has_status() const
Definition: job.h:342
Definition: job.h:55