sqladmin  v1beta4
export_context.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: 2019-06-11, 00:07:27 UTC
18 // C++ generator version: 0.1.4
19 
20 // ----------------------------------------------------------------------------
21 // NOTE: This file is generated from Google APIs Discovery Service.
22 // Service:
23 // Cloud SQL Admin API (sqladmin/v1beta4)
24 // Generated from:
25 // Version: v1beta4
26 // Revision: 76
27 // Generated by:
28 // Tool: google-apis-code-generator 1.5.1
29 // C++: 0.1.4
30 #ifndef GOOGLE_SQLADMIN_API_EXPORT_CONTEXT_H_
31 #define GOOGLE_SQLADMIN_API_EXPORT_CONTEXT_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 namespace Json {
40 class Value;
41 } // namespace Json
42 
43 namespace google_sqladmin_api {
44 using namespace googleapis;
45 
51 class ExportContext : public client::JsonCppData {
52  public:
58  class ExportContextCsvExportOptions : public client::JsonCppData {
59  public:
65  static ExportContextCsvExportOptions* New();
66 
72  explicit ExportContextCsvExportOptions(const Json::Value& storage);
73 
79  explicit ExportContextCsvExportOptions(Json::Value* storage);
80 
85 
91  const StringPiece GetTypeName() const {
92  return StringPiece("google_sqladmin_api::ExportContextCsvExportOptions");
93  }
94 
100  bool has_select_query() const {
101  return Storage().isMember("selectQuery");
102  }
103 
108  MutableStorage()->removeMember("selectQuery");
109  }
110 
111 
115  const StringPiece get_select_query() const {
116  const Json::Value& v = Storage("selectQuery");
117  if (v == Json::Value::null) return StringPiece("");
118  return StringPiece(v.asCString());
119  }
120 
128  void set_select_query(const StringPiece& value) {
129  *MutableStorage("selectQuery") = value.data();
130  }
131 
132  private:
133  void operator=(const ExportContextCsvExportOptions&);
134  }; // ExportContextCsvExportOptions
140  class ExportContextSqlExportOptions : public client::JsonCppData {
141  public:
147  class ExportContextSqlExportOptionsMysqlExportOptions : public client::JsonCppData {
148  public:
155 
161  explicit ExportContextSqlExportOptionsMysqlExportOptions(const Json::Value& storage);
162 
168  explicit ExportContextSqlExportOptionsMysqlExportOptions(Json::Value* storage);
169 
174 
181  const StringPiece GetTypeName() const {
182  return StringPiece("google_sqladmin_api::ExportContextSqlExportOptionsMysqlExportOptions");
183  }
184 
190  bool has_master_data() const {
191  return Storage().isMember("masterData");
192  }
193 
198  MutableStorage()->removeMember("masterData");
199  }
200 
201 
205  int32 get_master_data() const {
206  const Json::Value& storage = Storage("masterData");
207  return client::JsonValueToCppValueHelper<int32 >(storage);
208  }
209 
221  void set_master_data(int32 value) {
222  client::SetJsonValueFromCppValueHelper<int32 >(
223  value, MutableStorage("masterData"));
224  }
225 
226  private:
228  }; // ExportContextSqlExportOptionsMysqlExportOptions
234  static ExportContextSqlExportOptions* New();
235 
241  explicit ExportContextSqlExportOptions(const Json::Value& storage);
242 
248  explicit ExportContextSqlExportOptions(Json::Value* storage);
249 
254 
260  const StringPiece GetTypeName() const {
261  return StringPiece("google_sqladmin_api::ExportContextSqlExportOptions");
262  }
263 
270  return Storage().isMember("mysqlExportOptions");
271  }
272 
277  MutableStorage()->removeMember("mysqlExportOptions");
278  }
279 
280 
286  const Json::Value& storage = Storage("mysqlExportOptions");
287  return client::JsonValueToCppValueHelper<ExportContextSqlExportOptionsMysqlExportOptions >(storage);
288  }
289 
299  Json::Value* storage = MutableStorage("mysqlExportOptions");
300  return client::JsonValueToMutableCppValueHelper<ExportContextSqlExportOptionsMysqlExportOptions >(storage);
301  }
302 
308  bool has_schema_only() const {
309  return Storage().isMember("schemaOnly");
310  }
311 
316  MutableStorage()->removeMember("schemaOnly");
317  }
318 
319 
323  bool get_schema_only() const {
324  const Json::Value& storage = Storage("schemaOnly");
325  return client::JsonValueToCppValueHelper<bool >(storage);
326  }
327 
335  void set_schema_only(bool value) {
336  client::SetJsonValueFromCppValueHelper<bool >(
337  value, MutableStorage("schemaOnly"));
338  }
339 
345  bool has_tables() const {
346  return Storage().isMember("tables");
347  }
348 
352  void clear_tables() {
353  MutableStorage()->removeMember("tables");
354  }
355 
356 
360  const client::JsonCppArray<string > get_tables() const {
361  const Json::Value& storage = Storage("tables");
362  return client::JsonValueToCppValueHelper<client::JsonCppArray<string > >(storage);
363  }
364 
375  client::JsonCppArray<string > mutable_tables() {
376  Json::Value* storage = MutableStorage("tables");
377  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<string > >(storage);
378  }
379 
380  private:
381  void operator=(const ExportContextSqlExportOptions&);
382  }; // ExportContextSqlExportOptions
388  static ExportContext* New();
389 
395  explicit ExportContext(const Json::Value& storage);
396 
402  explicit ExportContext(Json::Value* storage);
403 
407  virtual ~ExportContext();
408 
414  const StringPiece GetTypeName() const {
415  return StringPiece("google_sqladmin_api::ExportContext");
416  }
417 
423  bool has_csv_export_options() const {
424  return Storage().isMember("csvExportOptions");
425  }
426 
431  MutableStorage()->removeMember("csvExportOptions");
432  }
433 
434 
440  const Json::Value& storage = Storage("csvExportOptions");
441  return client::JsonValueToCppValueHelper<ExportContextCsvExportOptions >(storage);
442  }
443 
453  Json::Value* storage = MutableStorage("csvExportOptions");
454  return client::JsonValueToMutableCppValueHelper<ExportContextCsvExportOptions >(storage);
455  }
456 
462  bool has_databases() const {
463  return Storage().isMember("databases");
464  }
465 
470  MutableStorage()->removeMember("databases");
471  }
472 
473 
477  const client::JsonCppArray<string > get_databases() const {
478  const Json::Value& storage = Storage("databases");
479  return client::JsonValueToCppValueHelper<client::JsonCppArray<string > >(storage);
480  }
481 
498  client::JsonCppArray<string > mutable_databases() {
499  Json::Value* storage = MutableStorage("databases");
500  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<string > >(storage);
501  }
502 
508  bool has_file_type() const {
509  return Storage().isMember("fileType");
510  }
511 
516  MutableStorage()->removeMember("fileType");
517  }
518 
519 
523  const StringPiece get_file_type() const {
524  const Json::Value& v = Storage("fileType");
525  if (v == Json::Value::null) return StringPiece("");
526  return StringPiece(v.asCString());
527  }
528 
543  void set_file_type(const StringPiece& value) {
544  *MutableStorage("fileType") = value.data();
545  }
546 
552  bool has_kind() const {
553  return Storage().isMember("kind");
554  }
555 
559  void clear_kind() {
560  MutableStorage()->removeMember("kind");
561  }
562 
563 
567  const StringPiece get_kind() const {
568  const Json::Value& v = Storage("kind");
569  if (v == Json::Value::null) return StringPiece("");
570  return StringPiece(v.asCString());
571  }
572 
580  void set_kind(const StringPiece& value) {
581  *MutableStorage("kind") = value.data();
582  }
583 
589  bool has_sql_export_options() const {
590  return Storage().isMember("sqlExportOptions");
591  }
592 
597  MutableStorage()->removeMember("sqlExportOptions");
598  }
599 
600 
606  const Json::Value& storage = Storage("sqlExportOptions");
607  return client::JsonValueToCppValueHelper<ExportContextSqlExportOptions >(storage);
608  }
609 
619  Json::Value* storage = MutableStorage("sqlExportOptions");
620  return client::JsonValueToMutableCppValueHelper<ExportContextSqlExportOptions >(storage);
621  }
622 
628  bool has_uri() const {
629  return Storage().isMember("uri");
630  }
631 
635  void clear_uri() {
636  MutableStorage()->removeMember("uri");
637  }
638 
639 
643  const StringPiece get_uri() const {
644  const Json::Value& v = Storage("uri");
645  if (v == Json::Value::null) return StringPiece("");
646  return StringPiece(v.asCString());
647  }
648 
659  void set_uri(const StringPiece& value) {
660  *MutableStorage("uri") = value.data();
661  }
662 
663  private:
664  void operator=(const ExportContext&);
665 }; // ExportContext
666 } // namespace google_sqladmin_api
667 #endif // GOOGLE_SQLADMIN_API_EXPORT_CONTEXT_H_
bool has_tables() const
Definition: export_context.h:345
void clear_mysql_export_options()
Definition: export_context.h:276
const StringPiece get_select_query() const
Definition: export_context.h:115
void set_schema_only(bool value)
Definition: export_context.h:335
void set_uri(const StringPiece &value)
Definition: export_context.h:659
const StringPiece get_file_type() const
Definition: export_context.h:523
ExportContextCsvExportOptions mutable_csvExportOptions()
Definition: export_context.h:452
bool has_databases() const
Definition: export_context.h:462
client::JsonCppArray< string > mutable_databases()
Definition: export_context.h:498
bool has_mysql_export_options() const
Definition: export_context.h:269
void clear_csv_export_options()
Definition: export_context.h:430
const ExportContextCsvExportOptions get_csv_export_options() const
Definition: export_context.h:439
void clear_uri()
Definition: export_context.h:635
bool has_csv_export_options() const
Definition: export_context.h:423
ExportContextSqlExportOptions mutable_sqlExportOptions()
Definition: export_context.h:618
ExportContextSqlExportOptionsMysqlExportOptions mutable_mysqlExportOptions()
Definition: export_context.h:298
bool has_sql_export_options() const
Definition: export_context.h:589
const StringPiece GetTypeName() const
Definition: export_context.h:414
void clear_databases()
Definition: export_context.h:469
void clear_sql_export_options()
Definition: export_context.h:596
const StringPiece get_uri() const
Definition: export_context.h:643
Definition: export_context.h:51
bool get_schema_only() const
Definition: export_context.h:323
const StringPiece GetTypeName() const
Definition: export_context.h:260
const ExportContextSqlExportOptions get_sql_export_options() const
Definition: export_context.h:605
Definition: acl_entry.cc:41
bool has_kind() const
Definition: export_context.h:552
Definition: acl_entry.h:39
void set_file_type(const StringPiece &value)
Definition: export_context.h:543
bool has_uri() const
Definition: export_context.h:628
void clear_schema_only()
Definition: export_context.h:315
const StringPiece GetTypeName() const
Definition: export_context.h:91
void set_select_query(const StringPiece &value)
Definition: export_context.h:128
const ExportContextSqlExportOptionsMysqlExportOptions get_mysql_export_options() const
Definition: export_context.h:285
void clear_file_type()
Definition: export_context.h:515
void set_kind(const StringPiece &value)
Definition: export_context.h:580
client::JsonCppArray< string > mutable_tables()
Definition: export_context.h:375
bool has_file_type() const
Definition: export_context.h:508
const client::JsonCppArray< string > get_tables() const
Definition: export_context.h:360
void clear_kind()
Definition: export_context.h:559
const client::JsonCppArray< string > get_databases() const
Definition: export_context.h:477
const StringPiece get_kind() const
Definition: export_context.h:567
bool has_schema_only() const
Definition: export_context.h:308
void clear_select_query()
Definition: export_context.h:107
bool has_select_query() const
Definition: export_context.h:100