bigquery  v2
table_data_insert_all_request.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_TABLE_DATA_INSERT_ALL_REQUEST_H_
31 #define GOOGLE_BIGQUERY_API_TABLE_DATA_INSERT_ALL_REQUEST_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 namespace Json {
39 class Value;
40 } // namespace Json
41 
42 namespace google_bigquery_api {
43 using namespace googleapis;
44 
50 class TableDataInsertAllRequest : public client::JsonCppData {
51  public:
57  class TableDataInsertAllRequestRows : public client::JsonCppData {
58  public:
64  static TableDataInsertAllRequestRows* New();
65 
71  explicit TableDataInsertAllRequestRows(const Json::Value& storage);
72 
78  explicit TableDataInsertAllRequestRows(Json::Value* storage);
79 
84 
90  const StringPiece GetTypeName() const {
91  return StringPiece("google_bigquery_api::TableDataInsertAllRequestRows");
92  }
93 
99  bool has_insert_id() const {
100  return Storage().isMember("insertId");
101  }
102 
107  MutableStorage()->removeMember("insertId");
108  }
109 
110 
114  const StringPiece get_insert_id() const {
115  const Json::Value& v = Storage("insertId");
116  if (v == Json::Value::null) return StringPiece("");
117  return StringPiece(v.asCString());
118  }
119 
128  void set_insert_id(const StringPiece& value) {
129  *MutableStorage("insertId") = value.data();
130  }
131 
137  bool has_json() const {
138  return Storage().isMember("json");
139  }
140 
144  void clear_json() {
145  MutableStorage()->removeMember("json");
146  }
147 
148 
152  const client::JsonCppAssociativeArray<client::JsonCppData > get_json() const;
153 
162  client::JsonCppAssociativeArray<client::JsonCppData > mutable_json();
163 
164  private:
165  void operator=(const TableDataInsertAllRequestRows&);
166  }; // TableDataInsertAllRequestRows
172  static TableDataInsertAllRequest* New();
173 
179  explicit TableDataInsertAllRequest(const Json::Value& storage);
180 
186  explicit TableDataInsertAllRequest(Json::Value* storage);
187 
191  virtual ~TableDataInsertAllRequest();
192 
198  const StringPiece GetTypeName() const {
199  return StringPiece("google_bigquery_api::TableDataInsertAllRequest");
200  }
201 
208  return Storage().isMember("ignoreUnknownValues");
209  }
210 
215  MutableStorage()->removeMember("ignoreUnknownValues");
216  }
217 
218 
223  const Json::Value& storage = Storage("ignoreUnknownValues");
224  return client::JsonValueToCppValueHelper<bool >(storage);
225  }
226 
236  void set_ignore_unknown_values(bool value) {
237  client::SetJsonValueFromCppValueHelper<bool >(
238  value, MutableStorage("ignoreUnknownValues"));
239  }
240 
246  bool has_kind() const {
247  return Storage().isMember("kind");
248  }
249 
253  void clear_kind() {
254  MutableStorage()->removeMember("kind");
255  }
256 
257 
261  const StringPiece get_kind() const {
262  const Json::Value& v = Storage("kind");
263  if (v == Json::Value::null) return StringPiece("");
264  return StringPiece(v.asCString());
265  }
266 
274  void set_kind(const StringPiece& value) {
275  *MutableStorage("kind") = value.data();
276  }
277 
283  bool has_rows() const {
284  return Storage().isMember("rows");
285  }
286 
290  void clear_rows() {
291  MutableStorage()->removeMember("rows");
292  }
293 
294 
298  const client::JsonCppArray<TableDataInsertAllRequestRows > get_rows() const {
299  const Json::Value& storage = Storage("rows");
300  return client::JsonValueToCppValueHelper<client::JsonCppArray<TableDataInsertAllRequestRows > >(storage);
301  }
302 
310  client::JsonCppArray<TableDataInsertAllRequestRows > mutable_rows() {
311  Json::Value* storage = MutableStorage("rows");
312  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<TableDataInsertAllRequestRows > >(storage);
313  }
314 
320  bool has_skip_invalid_rows() const {
321  return Storage().isMember("skipInvalidRows");
322  }
323 
328  MutableStorage()->removeMember("skipInvalidRows");
329  }
330 
331 
335  bool get_skip_invalid_rows() const {
336  const Json::Value& storage = Storage("skipInvalidRows");
337  return client::JsonValueToCppValueHelper<bool >(storage);
338  }
339 
349  void set_skip_invalid_rows(bool value) {
350  client::SetJsonValueFromCppValueHelper<bool >(
351  value, MutableStorage("skipInvalidRows"));
352  }
353 
359  bool has_template_suffix() const {
360  return Storage().isMember("templateSuffix");
361  }
362 
367  MutableStorage()->removeMember("templateSuffix");
368  }
369 
370 
374  const StringPiece get_template_suffix() const {
375  const Json::Value& v = Storage("templateSuffix");
376  if (v == Json::Value::null) return StringPiece("");
377  return StringPiece(v.asCString());
378  }
379 
392  void set_template_suffix(const StringPiece& value) {
393  *MutableStorage("templateSuffix") = value.data();
394  }
395 
396  private:
397  void operator=(const TableDataInsertAllRequest&);
398 }; // TableDataInsertAllRequest
399 } // namespace google_bigquery_api
400 #endif // GOOGLE_BIGQUERY_API_TABLE_DATA_INSERT_ALL_REQUEST_H_
void set_template_suffix(const StringPiece &value)
Definition: table_data_insert_all_request.h:392
bool has_ignore_unknown_values() const
Definition: table_data_insert_all_request.h:207
const client::JsonCppArray< TableDataInsertAllRequestRows > get_rows() const
Definition: table_data_insert_all_request.h:298
void set_insert_id(const StringPiece &value)
Definition: table_data_insert_all_request.h:128
void clear_template_suffix()
Definition: table_data_insert_all_request.h:366
bool get_skip_invalid_rows() const
Definition: table_data_insert_all_request.h:335
client::JsonCppArray< TableDataInsertAllRequestRows > mutable_rows()
Definition: table_data_insert_all_request.h:310
bool has_json() const
Definition: table_data_insert_all_request.h:137
bool has_kind() const
Definition: table_data_insert_all_request.h:246
const StringPiece GetTypeName() const
Definition: table_data_insert_all_request.h:198
void set_skip_invalid_rows(bool value)
Definition: table_data_insert_all_request.h:349
Definition: aggregate_classification_metrics.cc:39
bool has_skip_invalid_rows() const
Definition: table_data_insert_all_request.h:320
void set_kind(const StringPiece &value)
Definition: table_data_insert_all_request.h:274
const StringPiece GetTypeName() const
Definition: table_data_insert_all_request.h:90
const StringPiece get_kind() const
Definition: table_data_insert_all_request.h:261
void clear_ignore_unknown_values()
Definition: table_data_insert_all_request.h:214
bool has_insert_id() const
Definition: table_data_insert_all_request.h:99
const StringPiece get_template_suffix() const
Definition: table_data_insert_all_request.h:374
Definition: aggregate_classification_metrics.h:37
void clear_insert_id()
Definition: table_data_insert_all_request.h:106
void clear_json()
Definition: table_data_insert_all_request.h:144
void set_ignore_unknown_values(bool value)
Definition: table_data_insert_all_request.h:236
const StringPiece get_insert_id() const
Definition: table_data_insert_all_request.h:114
bool get_ignore_unknown_values() const
Definition: table_data_insert_all_request.h:222
bool has_template_suffix() const
Definition: table_data_insert_all_request.h:359
Definition: table_data_insert_all_request.h:50
bool has_rows() const
Definition: table_data_insert_all_request.h:283
void clear_skip_invalid_rows()
Definition: table_data_insert_all_request.h:327
void clear_rows()
Definition: table_data_insert_all_request.h:290
void clear_kind()
Definition: table_data_insert_all_request.h:253