bigquery  v2
table_data_insert_all_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_TABLE_DATA_INSERT_ALL_RESPONSE_H_
31 #define GOOGLE_BIGQUERY_API_TABLE_DATA_INSERT_ALL_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 
41 namespace Json {
42 class Value;
43 } // namespace Json
44 
45 namespace google_bigquery_api {
46 using namespace googleapis;
47 
53 class TableDataInsertAllResponse : public client::JsonCppData {
54  public:
60  class TableDataInsertAllResponseInsertErrors : public client::JsonCppData {
61  public:
68 
74  explicit TableDataInsertAllResponseInsertErrors(const Json::Value& storage);
75 
81  explicit TableDataInsertAllResponseInsertErrors(Json::Value* storage);
82 
87 
94  const StringPiece GetTypeName() const {
95  return StringPiece("google_bigquery_api::TableDataInsertAllResponseInsertErrors");
96  }
97 
103  bool has_errors() const {
104  return Storage().isMember("errors");
105  }
106 
110  void clear_errors() {
111  MutableStorage()->removeMember("errors");
112  }
113 
114 
118  const client::JsonCppArray<ErrorProto > get_errors() const;
119 
128  client::JsonCppArray<ErrorProto > mutable_errors();
129 
135  bool has_index() const {
136  return Storage().isMember("index");
137  }
138 
142  void clear_index() {
143  MutableStorage()->removeMember("index");
144  }
145 
146 
150  uint32 get_index() const {
151  const Json::Value& storage = Storage("index");
152  return client::JsonValueToCppValueHelper<uint32 >(storage);
153  }
154 
162  void set_index(uint32 value) {
163  client::SetJsonValueFromCppValueHelper<uint32 >(
164  value, MutableStorage("index"));
165  }
166 
167  private:
168  void operator=(const TableDataInsertAllResponseInsertErrors&);
169  }; // TableDataInsertAllResponseInsertErrors
175  static TableDataInsertAllResponse* New();
176 
182  explicit TableDataInsertAllResponse(const Json::Value& storage);
183 
189  explicit TableDataInsertAllResponse(Json::Value* storage);
190 
194  virtual ~TableDataInsertAllResponse();
195 
201  const StringPiece GetTypeName() const {
202  return StringPiece("google_bigquery_api::TableDataInsertAllResponse");
203  }
204 
210  bool has_insert_errors() const {
211  return Storage().isMember("insertErrors");
212  }
213 
218  MutableStorage()->removeMember("insertErrors");
219  }
220 
221 
225  const client::JsonCppArray<TableDataInsertAllResponseInsertErrors > get_insert_errors() const {
226  const Json::Value& storage = Storage("insertErrors");
227  return client::JsonValueToCppValueHelper<client::JsonCppArray<TableDataInsertAllResponseInsertErrors > >(storage);
228  }
229 
238  client::JsonCppArray<TableDataInsertAllResponseInsertErrors > mutable_insertErrors() {
239  Json::Value* storage = MutableStorage("insertErrors");
240  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<TableDataInsertAllResponseInsertErrors > >(storage);
241  }
242 
248  bool has_kind() const {
249  return Storage().isMember("kind");
250  }
251 
255  void clear_kind() {
256  MutableStorage()->removeMember("kind");
257  }
258 
259 
263  const StringPiece get_kind() const {
264  const Json::Value& v = Storage("kind");
265  if (v == Json::Value::null) return StringPiece("");
266  return StringPiece(v.asCString());
267  }
268 
276  void set_kind(const StringPiece& value) {
277  *MutableStorage("kind") = value.data();
278  }
279 
280  private:
281  void operator=(const TableDataInsertAllResponse&);
282 }; // TableDataInsertAllResponse
283 } // namespace google_bigquery_api
284 #endif // GOOGLE_BIGQUERY_API_TABLE_DATA_INSERT_ALL_RESPONSE_H_
const StringPiece GetTypeName() const
Definition: table_data_insert_all_response.h:201
Definition: aggregate_classification_metrics.cc:39
void clear_insert_errors()
Definition: table_data_insert_all_response.h:217
bool has_insert_errors() const
Definition: table_data_insert_all_response.h:210
const client::JsonCppArray< TableDataInsertAllResponseInsertErrors > get_insert_errors() const
Definition: table_data_insert_all_response.h:225
const StringPiece get_kind() const
Definition: table_data_insert_all_response.h:263
Definition: aggregate_classification_metrics.h:37
bool has_index() const
Definition: table_data_insert_all_response.h:135
uint32 get_index() const
Definition: table_data_insert_all_response.h:150
bool has_errors() const
Definition: table_data_insert_all_response.h:103
bool has_kind() const
Definition: table_data_insert_all_response.h:248
void set_kind(const StringPiece &value)
Definition: table_data_insert_all_response.h:276
const StringPiece GetTypeName() const
Definition: table_data_insert_all_response.h:94
void set_index(uint32 value)
Definition: table_data_insert_all_response.h:162
void clear_kind()
Definition: table_data_insert_all_response.h:255
client::JsonCppArray< TableDataInsertAllResponseInsertErrors > mutable_insertErrors()
Definition: table_data_insert_all_response.h:238
Definition: table_data_insert_all_response.h:53