bigquery  v2
get_query_results_response.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_GET_QUERY_RESULTS_RESPONSE_H_
31 #define GOOGLE_BIGQUERY_API_GET_QUERY_RESULTS_RESPONSE_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/bigquery_api/error_proto.h"
40 #include "google/bigquery_api/job_reference.h"
41 #include "google/bigquery_api/table_row.h"
42 #include "google/bigquery_api/table_schema.h"
43 
44 namespace Json {
45 class Value;
46 } // namespace Json
47 
48 namespace google_bigquery_api {
49 using namespace googleapis;
50 
56 class GetQueryResultsResponse : public client::JsonCppData {
57  public:
63  static GetQueryResultsResponse* New();
64 
70  explicit GetQueryResultsResponse(const Json::Value& storage);
71 
77  explicit GetQueryResultsResponse(Json::Value* storage);
78 
82  virtual ~GetQueryResultsResponse();
83 
89  const StringPiece GetTypeName() const {
90  return StringPiece("google_bigquery_api::GetQueryResultsResponse");
91  }
92 
98  bool has_cache_hit() const {
99  return Storage().isMember("cacheHit");
100  }
101 
106  MutableStorage()->removeMember("cacheHit");
107  }
108 
109 
113  bool get_cache_hit() const {
114  const Json::Value& storage = Storage("cacheHit");
115  return client::JsonValueToCppValueHelper<bool >(storage);
116  }
117 
125  void set_cache_hit(bool value) {
126  client::SetJsonValueFromCppValueHelper<bool >(
127  value, MutableStorage("cacheHit"));
128  }
129 
135  bool has_errors() const {
136  return Storage().isMember("errors");
137  }
138 
142  void clear_errors() {
143  MutableStorage()->removeMember("errors");
144  }
145 
146 
150  const client::JsonCppArray<ErrorProto > get_errors() const;
151 
162  client::JsonCppArray<ErrorProto > mutable_errors();
163 
169  bool has_etag() const {
170  return Storage().isMember("etag");
171  }
172 
176  void clear_etag() {
177  MutableStorage()->removeMember("etag");
178  }
179 
180 
184  const StringPiece get_etag() const {
185  const Json::Value& v = Storage("etag");
186  if (v == Json::Value::null) return StringPiece("");
187  return StringPiece(v.asCString());
188  }
189 
197  void set_etag(const StringPiece& value) {
198  *MutableStorage("etag") = value.data();
199  }
200 
206  bool has_job_complete() const {
207  return Storage().isMember("jobComplete");
208  }
209 
214  MutableStorage()->removeMember("jobComplete");
215  }
216 
217 
221  bool get_job_complete() const {
222  const Json::Value& storage = Storage("jobComplete");
223  return client::JsonValueToCppValueHelper<bool >(storage);
224  }
225 
235  void set_job_complete(bool value) {
236  client::SetJsonValueFromCppValueHelper<bool >(
237  value, MutableStorage("jobComplete"));
238  }
239 
245  bool has_job_reference() const {
246  return Storage().isMember("jobReference");
247  }
248 
253  MutableStorage()->removeMember("jobReference");
254  }
255 
256 
260  const JobReference get_job_reference() const;
261 
274  JobReference mutable_jobReference();
275 
281  bool has_kind() const {
282  return Storage().isMember("kind");
283  }
284 
288  void clear_kind() {
289  MutableStorage()->removeMember("kind");
290  }
291 
292 
296  const StringPiece get_kind() const {
297  const Json::Value& v = Storage("kind");
298  if (v == Json::Value::null) return StringPiece("");
299  return StringPiece(v.asCString());
300  }
301 
309  void set_kind(const StringPiece& value) {
310  *MutableStorage("kind") = value.data();
311  }
312 
319  return Storage().isMember("numDmlAffectedRows");
320  }
321 
326  MutableStorage()->removeMember("numDmlAffectedRows");
327  }
328 
329 
334  const Json::Value& storage = Storage("numDmlAffectedRows");
335  return client::JsonValueToCppValueHelper<int64 >(storage);
336  }
337 
346  void set_num_dml_affected_rows(int64 value) {
347  client::SetJsonValueFromCppValueHelper<int64 >(
348  value, MutableStorage("numDmlAffectedRows"));
349  }
350 
356  bool has_page_token() const {
357  return Storage().isMember("pageToken");
358  }
359 
364  MutableStorage()->removeMember("pageToken");
365  }
366 
367 
371  const StringPiece get_page_token() const {
372  const Json::Value& v = Storage("pageToken");
373  if (v == Json::Value::null) return StringPiece("");
374  return StringPiece(v.asCString());
375  }
376 
384  void set_page_token(const StringPiece& value) {
385  *MutableStorage("pageToken") = value.data();
386  }
387 
393  bool has_rows() const {
394  return Storage().isMember("rows");
395  }
396 
400  void clear_rows() {
401  MutableStorage()->removeMember("rows");
402  }
403 
404 
408  const client::JsonCppArray<TableRow > get_rows() const;
409 
420  client::JsonCppArray<TableRow > mutable_rows();
421 
427  bool has_schema() const {
428  return Storage().isMember("schema");
429  }
430 
434  void clear_schema() {
435  MutableStorage()->removeMember("schema");
436  }
437 
438 
442  const TableSchema get_schema() const;
443 
452  TableSchema mutable_schema();
453 
460  return Storage().isMember("totalBytesProcessed");
461  }
462 
467  MutableStorage()->removeMember("totalBytesProcessed");
468  }
469 
470 
475  const Json::Value& storage = Storage("totalBytesProcessed");
476  return client::JsonValueToCppValueHelper<int64 >(storage);
477  }
478 
486  void set_total_bytes_processed(int64 value) {
487  client::SetJsonValueFromCppValueHelper<int64 >(
488  value, MutableStorage("totalBytesProcessed"));
489  }
490 
496  bool has_total_rows() const {
497  return Storage().isMember("totalRows");
498  }
499 
504  MutableStorage()->removeMember("totalRows");
505  }
506 
507 
511  uint64 get_total_rows() const {
512  const Json::Value& storage = Storage("totalRows");
513  return client::JsonValueToCppValueHelper<uint64 >(storage);
514  }
515 
525  void set_total_rows(uint64 value) {
526  client::SetJsonValueFromCppValueHelper<uint64 >(
527  value, MutableStorage("totalRows"));
528  }
529 
530  private:
531  void operator=(const GetQueryResultsResponse&);
532 }; // GetQueryResultsResponse
533 } // namespace google_bigquery_api
534 #endif // GOOGLE_BIGQUERY_API_GET_QUERY_RESULTS_RESPONSE_H_
bool get_job_complete() const
Definition: get_query_results_response.h:221
void clear_errors()
Definition: get_query_results_response.h:142
void clear_etag()
Definition: get_query_results_response.h:176
void set_cache_hit(bool value)
Definition: get_query_results_response.h:125
void clear_schema()
Definition: get_query_results_response.h:434
void clear_total_bytes_processed()
Definition: get_query_results_response.h:466
void set_num_dml_affected_rows(int64 value)
Definition: get_query_results_response.h:346
bool has_etag() const
Definition: get_query_results_response.h:169
uint64 get_total_rows() const
Definition: get_query_results_response.h:511
const StringPiece get_kind() const
Definition: get_query_results_response.h:296
bool get_cache_hit() const
Definition: get_query_results_response.h:113
bool has_kind() const
Definition: get_query_results_response.h:281
void clear_rows()
Definition: get_query_results_response.h:400
int64 get_num_dml_affected_rows() const
Definition: get_query_results_response.h:333
void clear_kind()
Definition: get_query_results_response.h:288
bool has_rows() const
Definition: get_query_results_response.h:393
void set_kind(const StringPiece &value)
Definition: get_query_results_response.h:309
Definition: table_schema.h:51
void set_total_bytes_processed(int64 value)
Definition: get_query_results_response.h:486
Definition: aggregate_classification_metrics.cc:39
bool has_total_bytes_processed() const
Definition: get_query_results_response.h:459
void clear_page_token()
Definition: get_query_results_response.h:363
bool has_total_rows() const
Definition: get_query_results_response.h:496
bool has_job_complete() const
Definition: get_query_results_response.h:206
void set_page_token(const StringPiece &value)
Definition: get_query_results_response.h:384
void clear_job_reference()
Definition: get_query_results_response.h:252
void clear_cache_hit()
Definition: get_query_results_response.h:105
const StringPiece GetTypeName() const
Definition: get_query_results_response.h:89
Definition: aggregate_classification_metrics.h:37
bool has_cache_hit() const
Definition: get_query_results_response.h:98
bool has_num_dml_affected_rows() const
Definition: get_query_results_response.h:318
bool has_job_reference() const
Definition: get_query_results_response.h:245
void clear_total_rows()
Definition: get_query_results_response.h:503
bool has_errors() const
Definition: get_query_results_response.h:135
bool has_page_token() const
Definition: get_query_results_response.h:356
const StringPiece get_page_token() const
Definition: get_query_results_response.h:371
void clear_num_dml_affected_rows()
Definition: get_query_results_response.h:325
Definition: job_reference.h:50
Definition: get_query_results_response.h:56
void set_job_complete(bool value)
Definition: get_query_results_response.h:235
void clear_job_complete()
Definition: get_query_results_response.h:213
const StringPiece get_etag() const
Definition: get_query_results_response.h:184
bool has_schema() const
Definition: get_query_results_response.h:427
void set_total_rows(uint64 value)
Definition: get_query_results_response.h:525
int64 get_total_bytes_processed() const
Definition: get_query_results_response.h:474
void set_etag(const StringPiece &value)
Definition: get_query_results_response.h:197