sqladmin  v1beta4
import_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_IMPORT_CONTEXT_H_
31 #define GOOGLE_SQLADMIN_API_IMPORT_CONTEXT_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_sqladmin_api {
43 using namespace googleapis;
44 
50 class ImportContext : public client::JsonCppData {
51  public:
57  class ImportContextCsvImportOptions : public client::JsonCppData {
58  public:
64  static ImportContextCsvImportOptions* New();
65 
71  explicit ImportContextCsvImportOptions(const Json::Value& storage);
72 
78  explicit ImportContextCsvImportOptions(Json::Value* storage);
79 
84 
90  const StringPiece GetTypeName() const {
91  return StringPiece("google_sqladmin_api::ImportContextCsvImportOptions");
92  }
93 
99  bool has_columns() const {
100  return Storage().isMember("columns");
101  }
102 
106  void clear_columns() {
107  MutableStorage()->removeMember("columns");
108  }
109 
110 
114  const client::JsonCppArray<string > get_columns() const {
115  const Json::Value& storage = Storage("columns");
116  return client::JsonValueToCppValueHelper<client::JsonCppArray<string > >(storage);
117  }
118 
128  client::JsonCppArray<string > mutable_columns() {
129  Json::Value* storage = MutableStorage("columns");
130  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<string > >(storage);
131  }
132 
138  bool has_table() const {
139  return Storage().isMember("table");
140  }
141 
145  void clear_table() {
146  MutableStorage()->removeMember("table");
147  }
148 
149 
153  const StringPiece get_table() const {
154  const Json::Value& v = Storage("table");
155  if (v == Json::Value::null) return StringPiece("");
156  return StringPiece(v.asCString());
157  }
158 
166  void set_table(const StringPiece& value) {
167  *MutableStorage("table") = value.data();
168  }
169 
170  private:
171  void operator=(const ImportContextCsvImportOptions&);
172  }; // ImportContextCsvImportOptions
178  static ImportContext* New();
179 
185  explicit ImportContext(const Json::Value& storage);
186 
192  explicit ImportContext(Json::Value* storage);
193 
197  virtual ~ImportContext();
198 
204  const StringPiece GetTypeName() const {
205  return StringPiece("google_sqladmin_api::ImportContext");
206  }
207 
213  bool has_csv_import_options() const {
214  return Storage().isMember("csvImportOptions");
215  }
216 
221  MutableStorage()->removeMember("csvImportOptions");
222  }
223 
224 
230  const Json::Value& storage = Storage("csvImportOptions");
231  return client::JsonValueToCppValueHelper<ImportContextCsvImportOptions >(storage);
232  }
233 
243  Json::Value* storage = MutableStorage("csvImportOptions");
244  return client::JsonValueToMutableCppValueHelper<ImportContextCsvImportOptions >(storage);
245  }
246 
252  bool has_database() const {
253  return Storage().isMember("database");
254  }
255 
259  void clear_database() {
260  MutableStorage()->removeMember("database");
261  }
262 
263 
267  const StringPiece get_database() const {
268  const Json::Value& v = Storage("database");
269  if (v == Json::Value::null) return StringPiece("");
270  return StringPiece(v.asCString());
271  }
272 
283  void set_database(const StringPiece& value) {
284  *MutableStorage("database") = value.data();
285  }
286 
292  bool has_file_type() const {
293  return Storage().isMember("fileType");
294  }
295 
300  MutableStorage()->removeMember("fileType");
301  }
302 
303 
307  const StringPiece get_file_type() const {
308  const Json::Value& v = Storage("fileType");
309  if (v == Json::Value::null) return StringPiece("");
310  return StringPiece(v.asCString());
311  }
312 
327  void set_file_type(const StringPiece& value) {
328  *MutableStorage("fileType") = value.data();
329  }
330 
336  bool has_import_user() const {
337  return Storage().isMember("importUser");
338  }
339 
344  MutableStorage()->removeMember("importUser");
345  }
346 
347 
351  const StringPiece get_import_user() const {
352  const Json::Value& v = Storage("importUser");
353  if (v == Json::Value::null) return StringPiece("");
354  return StringPiece(v.asCString());
355  }
356 
364  void set_import_user(const StringPiece& value) {
365  *MutableStorage("importUser") = value.data();
366  }
367 
373  bool has_kind() const {
374  return Storage().isMember("kind");
375  }
376 
380  void clear_kind() {
381  MutableStorage()->removeMember("kind");
382  }
383 
384 
388  const StringPiece get_kind() const {
389  const Json::Value& v = Storage("kind");
390  if (v == Json::Value::null) return StringPiece("");
391  return StringPiece(v.asCString());
392  }
393 
401  void set_kind(const StringPiece& value) {
402  *MutableStorage("kind") = value.data();
403  }
404 
410  bool has_uri() const {
411  return Storage().isMember("uri");
412  }
413 
417  void clear_uri() {
418  MutableStorage()->removeMember("uri");
419  }
420 
421 
425  const StringPiece get_uri() const {
426  const Json::Value& v = Storage("uri");
427  if (v == Json::Value::null) return StringPiece("");
428  return StringPiece(v.asCString());
429  }
430 
441  void set_uri(const StringPiece& value) {
442  *MutableStorage("uri") = value.data();
443  }
444 
445  private:
446  void operator=(const ImportContext&);
447 }; // ImportContext
448 } // namespace google_sqladmin_api
449 #endif // GOOGLE_SQLADMIN_API_IMPORT_CONTEXT_H_
ImportContextCsvImportOptions mutable_csvImportOptions()
Definition: import_context.h:242
void clear_database()
Definition: import_context.h:259
const StringPiece get_table() const
Definition: import_context.h:153
const StringPiece GetTypeName() const
Definition: import_context.h:204
const StringPiece get_file_type() const
Definition: import_context.h:307
const StringPiece get_import_user() const
Definition: import_context.h:351
const client::JsonCppArray< string > get_columns() const
Definition: import_context.h:114
bool has_file_type() const
Definition: import_context.h:292
bool has_database() const
Definition: import_context.h:252
const StringPiece get_uri() const
Definition: import_context.h:425
void clear_uri()
Definition: import_context.h:417
bool has_uri() const
Definition: import_context.h:410
bool has_import_user() const
Definition: import_context.h:336
const StringPiece GetTypeName() const
Definition: import_context.h:90
Definition: acl_entry.cc:41
const StringPiece get_database() const
Definition: import_context.h:267
void set_import_user(const StringPiece &value)
Definition: import_context.h:364
Definition: acl_entry.h:39
void clear_import_user()
Definition: import_context.h:343
const StringPiece get_kind() const
Definition: import_context.h:388
void set_kind(const StringPiece &value)
Definition: import_context.h:401
void clear_file_type()
Definition: import_context.h:299
const ImportContextCsvImportOptions get_csv_import_options() const
Definition: import_context.h:229
void clear_csv_import_options()
Definition: import_context.h:220
client::JsonCppArray< string > mutable_columns()
Definition: import_context.h:128
bool has_kind() const
Definition: import_context.h:373
void set_uri(const StringPiece &value)
Definition: import_context.h:441
bool has_csv_import_options() const
Definition: import_context.h:213
void set_database(const StringPiece &value)
Definition: import_context.h:283
void clear_kind()
Definition: import_context.h:380
bool has_columns() const
Definition: import_context.h:99
void set_file_type(const StringPiece &value)
Definition: import_context.h:327
void set_table(const StringPiece &value)
Definition: import_context.h:166
Definition: import_context.h:50
bool has_table() const
Definition: import_context.h:138