bigquery  v2
table_field_schema.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_FIELD_SCHEMA_H_
31 #define GOOGLE_BIGQUERY_API_TABLE_FIELD_SCHEMA_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/table_field_schema.h"
39 
40 namespace Json {
41 class Value;
42 } // namespace Json
43 
44 namespace google_bigquery_api {
45 using namespace googleapis;
46 
52 class TableFieldSchema : public client::JsonCppData {
53  public:
60  class TableFieldSchemaCategories : public client::JsonCppData {
61  public:
67  static TableFieldSchemaCategories* New();
68 
74  explicit TableFieldSchemaCategories(const Json::Value& storage);
75 
81  explicit TableFieldSchemaCategories(Json::Value* storage);
82 
86  virtual ~TableFieldSchemaCategories();
87 
93  const StringPiece GetTypeName() const {
94  return StringPiece("google_bigquery_api::TableFieldSchemaCategories");
95  }
96 
102  bool has_names() const {
103  return Storage().isMember("names");
104  }
105 
109  void clear_names() {
110  MutableStorage()->removeMember("names");
111  }
112 
113 
117  const client::JsonCppArray<string > get_names() const {
118  const Json::Value& storage = Storage("names");
119  return client::JsonValueToCppValueHelper<client::JsonCppArray<string > >(storage);
120  }
121 
130  client::JsonCppArray<string > mutable_names() {
131  Json::Value* storage = MutableStorage("names");
132  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<string > >(storage);
133  }
134 
135  private:
136  void operator=(const TableFieldSchemaCategories&);
137  }; // TableFieldSchemaCategories
143  class TableFieldSchemaPolicyTags : public client::JsonCppData {
144  public:
150  static TableFieldSchemaPolicyTags* New();
151 
157  explicit TableFieldSchemaPolicyTags(const Json::Value& storage);
158 
164  explicit TableFieldSchemaPolicyTags(Json::Value* storage);
165 
169  virtual ~TableFieldSchemaPolicyTags();
170 
176  const StringPiece GetTypeName() const {
177  return StringPiece("google_bigquery_api::TableFieldSchemaPolicyTags");
178  }
179 
185  bool has_names() const {
186  return Storage().isMember("names");
187  }
188 
192  void clear_names() {
193  MutableStorage()->removeMember("names");
194  }
195 
196 
200  const client::JsonCppArray<string > get_names() const {
201  const Json::Value& storage = Storage("names");
202  return client::JsonValueToCppValueHelper<client::JsonCppArray<string > >(storage);
203  }
204 
214  client::JsonCppArray<string > mutable_names() {
215  Json::Value* storage = MutableStorage("names");
216  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<string > >(storage);
217  }
218 
219  private:
220  void operator=(const TableFieldSchemaPolicyTags&);
221  }; // TableFieldSchemaPolicyTags
227  static TableFieldSchema* New();
228 
234  explicit TableFieldSchema(const Json::Value& storage);
235 
241  explicit TableFieldSchema(Json::Value* storage);
242 
246  virtual ~TableFieldSchema();
247 
253  const StringPiece GetTypeName() const {
254  return StringPiece("google_bigquery_api::TableFieldSchema");
255  }
256 
262  bool has_categories() const {
263  return Storage().isMember("categories");
264  }
265 
270  MutableStorage()->removeMember("categories");
271  }
272 
273 
278  const Json::Value& storage = Storage("categories");
279  return client::JsonValueToCppValueHelper<TableFieldSchemaCategories >(storage);
280  }
281 
292  Json::Value* storage = MutableStorage("categories");
293  return client::JsonValueToMutableCppValueHelper<TableFieldSchemaCategories >(storage);
294  }
295 
301  bool has_description() const {
302  return Storage().isMember("description");
303  }
304 
309  MutableStorage()->removeMember("description");
310  }
311 
312 
316  const StringPiece get_description() const {
317  const Json::Value& v = Storage("description");
318  if (v == Json::Value::null) return StringPiece("");
319  return StringPiece(v.asCString());
320  }
321 
329  void set_description(const StringPiece& value) {
330  *MutableStorage("description") = value.data();
331  }
332 
338  bool has_fields() const {
339  return Storage().isMember("fields");
340  }
341 
345  void clear_fields() {
346  MutableStorage()->removeMember("fields");
347  }
348 
349 
353  const client::JsonCppArray<TableFieldSchema > get_fields() const;
354 
363  client::JsonCppArray<TableFieldSchema > mutable_fields();
364 
370  bool has_mode() const {
371  return Storage().isMember("mode");
372  }
373 
377  void clear_mode() {
378  MutableStorage()->removeMember("mode");
379  }
380 
381 
385  const StringPiece get_mode() const {
386  const Json::Value& v = Storage("mode");
387  if (v == Json::Value::null) return StringPiece("");
388  return StringPiece(v.asCString());
389  }
390 
399  void set_mode(const StringPiece& value) {
400  *MutableStorage("mode") = value.data();
401  }
402 
408  bool has_name() const {
409  return Storage().isMember("name");
410  }
411 
415  void clear_name() {
416  MutableStorage()->removeMember("name");
417  }
418 
419 
423  const StringPiece get_name() const {
424  const Json::Value& v = Storage("name");
425  if (v == Json::Value::null) return StringPiece("");
426  return StringPiece(v.asCString());
427  }
428 
438  void set_name(const StringPiece& value) {
439  *MutableStorage("name") = value.data();
440  }
441 
447  bool has_policy_tags() const {
448  return Storage().isMember("policyTags");
449  }
450 
455  MutableStorage()->removeMember("policyTags");
456  }
457 
458 
463  const Json::Value& storage = Storage("policyTags");
464  return client::JsonValueToCppValueHelper<TableFieldSchemaPolicyTags >(storage);
465  }
466 
473  Json::Value* storage = MutableStorage("policyTags");
474  return client::JsonValueToMutableCppValueHelper<TableFieldSchemaPolicyTags >(storage);
475  }
476 
482  bool has_type() const {
483  return Storage().isMember("type");
484  }
485 
489  void clear_type() {
490  MutableStorage()->removeMember("type");
491  }
492 
493 
497  const StringPiece get_type() const {
498  const Json::Value& v = Storage("type");
499  if (v == Json::Value::null) return StringPiece("");
500  return StringPiece(v.asCString());
501  }
502 
514  void set_type(const StringPiece& value) {
515  *MutableStorage("type") = value.data();
516  }
517 
518  private:
519  void operator=(const TableFieldSchema&);
520 }; // TableFieldSchema
521 } // namespace google_bigquery_api
522 #endif // GOOGLE_BIGQUERY_API_TABLE_FIELD_SCHEMA_H_
const TableFieldSchemaPolicyTags get_policy_tags() const
Definition: table_field_schema.h:462
TableFieldSchemaCategories mutable_categories()
Definition: table_field_schema.h:291
bool has_names() const
Definition: table_field_schema.h:185
const StringPiece get_mode() const
Definition: table_field_schema.h:385
bool has_fields() const
Definition: table_field_schema.h:338
client::JsonCppArray< string > mutable_names()
Definition: table_field_schema.h:214
const StringPiece GetTypeName() const
Definition: table_field_schema.h:176
bool has_mode() const
Definition: table_field_schema.h:370
void set_name(const StringPiece &value)
Definition: table_field_schema.h:438
void clear_name()
Definition: table_field_schema.h:415
void clear_names()
Definition: table_field_schema.h:192
void set_description(const StringPiece &value)
Definition: table_field_schema.h:329
void set_mode(const StringPiece &value)
Definition: table_field_schema.h:399
Definition: aggregate_classification_metrics.cc:39
TableFieldSchemaPolicyTags mutable_policyTags()
Definition: table_field_schema.h:472
void clear_mode()
Definition: table_field_schema.h:377
void clear_fields()
Definition: table_field_schema.h:345
void clear_type()
Definition: table_field_schema.h:489
const client::JsonCppArray< string > get_names() const
Definition: table_field_schema.h:200
bool has_type() const
Definition: table_field_schema.h:482
void clear_description()
Definition: table_field_schema.h:308
const client::JsonCppArray< string > get_names() const
Definition: table_field_schema.h:117
Definition: aggregate_classification_metrics.h:37
const StringPiece GetTypeName() const
Definition: table_field_schema.h:93
bool has_name() const
Definition: table_field_schema.h:408
bool has_categories() const
Definition: table_field_schema.h:262
const StringPiece GetTypeName() const
Definition: table_field_schema.h:253
Definition: table_field_schema.h:52
void set_type(const StringPiece &value)
Definition: table_field_schema.h:514
const StringPiece get_name() const
Definition: table_field_schema.h:423
const StringPiece get_description() const
Definition: table_field_schema.h:316
const TableFieldSchemaCategories get_categories() const
Definition: table_field_schema.h:277
bool has_policy_tags() const
Definition: table_field_schema.h:447
void clear_names()
Definition: table_field_schema.h:109
bool has_description() const
Definition: table_field_schema.h:301
void clear_categories()
Definition: table_field_schema.h:269
client::JsonCppArray< string > mutable_names()
Definition: table_field_schema.h:130
const StringPiece get_type() const
Definition: table_field_schema.h:497
void clear_policy_tags()
Definition: table_field_schema.h:454
bool has_names() const
Definition: table_field_schema.h:102