sqladmin  v1beta4
database.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_DATABASE_H_
31 #define GOOGLE_SQLADMIN_API_DATABASE_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 Database : public client::JsonCppData {
51  public:
57  static Database* New();
58 
64  explicit Database(const Json::Value& storage);
65 
71  explicit Database(Json::Value* storage);
72 
76  virtual ~Database();
77 
83  const StringPiece GetTypeName() const {
84  return StringPiece("google_sqladmin_api::Database");
85  }
86 
92  bool has_charset() const {
93  return Storage().isMember("charset");
94  }
95 
99  void clear_charset() {
100  MutableStorage()->removeMember("charset");
101  }
102 
103 
107  const StringPiece get_charset() const {
108  const Json::Value& v = Storage("charset");
109  if (v == Json::Value::null) return StringPiece("");
110  return StringPiece(v.asCString());
111  }
112 
120  void set_charset(const StringPiece& value) {
121  *MutableStorage("charset") = value.data();
122  }
123 
129  bool has_collation() const {
130  return Storage().isMember("collation");
131  }
132 
137  MutableStorage()->removeMember("collation");
138  }
139 
140 
144  const StringPiece get_collation() const {
145  const Json::Value& v = Storage("collation");
146  if (v == Json::Value::null) return StringPiece("");
147  return StringPiece(v.asCString());
148  }
149 
157  void set_collation(const StringPiece& value) {
158  *MutableStorage("collation") = value.data();
159  }
160 
166  bool has_etag() const {
167  return Storage().isMember("etag");
168  }
169 
173  void clear_etag() {
174  MutableStorage()->removeMember("etag");
175  }
176 
177 
181  const StringPiece get_etag() const {
182  const Json::Value& v = Storage("etag");
183  if (v == Json::Value::null) return StringPiece("");
184  return StringPiece(v.asCString());
185  }
186 
195  void set_etag(const StringPiece& value) {
196  *MutableStorage("etag") = value.data();
197  }
198 
204  bool has_instance() const {
205  return Storage().isMember("instance");
206  }
207 
211  void clear_instance() {
212  MutableStorage()->removeMember("instance");
213  }
214 
215 
219  const StringPiece get_instance() const {
220  const Json::Value& v = Storage("instance");
221  if (v == Json::Value::null) return StringPiece("");
222  return StringPiece(v.asCString());
223  }
224 
232  void set_instance(const StringPiece& value) {
233  *MutableStorage("instance") = value.data();
234  }
235 
241  bool has_kind() const {
242  return Storage().isMember("kind");
243  }
244 
248  void clear_kind() {
249  MutableStorage()->removeMember("kind");
250  }
251 
252 
256  const StringPiece get_kind() const {
257  const Json::Value& v = Storage("kind");
258  if (v == Json::Value::null) return StringPiece("");
259  return StringPiece(v.asCString());
260  }
261 
269  void set_kind(const StringPiece& value) {
270  *MutableStorage("kind") = value.data();
271  }
272 
278  bool has_name() const {
279  return Storage().isMember("name");
280  }
281 
285  void clear_name() {
286  MutableStorage()->removeMember("name");
287  }
288 
289 
293  const StringPiece get_name() const {
294  const Json::Value& v = Storage("name");
295  if (v == Json::Value::null) return StringPiece("");
296  return StringPiece(v.asCString());
297  }
298 
307  void set_name(const StringPiece& value) {
308  *MutableStorage("name") = value.data();
309  }
310 
316  bool has_project() const {
317  return Storage().isMember("project");
318  }
319 
323  void clear_project() {
324  MutableStorage()->removeMember("project");
325  }
326 
327 
331  const StringPiece get_project() const {
332  const Json::Value& v = Storage("project");
333  if (v == Json::Value::null) return StringPiece("");
334  return StringPiece(v.asCString());
335  }
336 
345  void set_project(const StringPiece& value) {
346  *MutableStorage("project") = value.data();
347  }
348 
354  bool has_self_link() const {
355  return Storage().isMember("selfLink");
356  }
357 
362  MutableStorage()->removeMember("selfLink");
363  }
364 
365 
369  const StringPiece get_self_link() const {
370  const Json::Value& v = Storage("selfLink");
371  if (v == Json::Value::null) return StringPiece("");
372  return StringPiece(v.asCString());
373  }
374 
382  void set_self_link(const StringPiece& value) {
383  *MutableStorage("selfLink") = value.data();
384  }
385 
386  private:
387  void operator=(const Database&);
388 }; // Database
389 } // namespace google_sqladmin_api
390 #endif // GOOGLE_SQLADMIN_API_DATABASE_H_
bool has_kind() const
Definition: database.h:241
void clear_charset()
Definition: database.h:99
bool has_collation() const
Definition: database.h:129
bool has_self_link() const
Definition: database.h:354
const StringPiece GetTypeName() const
Definition: database.h:83
void set_name(const StringPiece &value)
Definition: database.h:307
const StringPiece get_charset() const
Definition: database.h:107
const StringPiece get_collation() const
Definition: database.h:144
void clear_kind()
Definition: database.h:248
void clear_project()
Definition: database.h:323
void set_project(const StringPiece &value)
Definition: database.h:345
bool has_charset() const
Definition: database.h:92
void clear_etag()
Definition: database.h:173
const StringPiece get_name() const
Definition: database.h:293
const StringPiece get_etag() const
Definition: database.h:181
Definition: database.h:50
bool has_project() const
Definition: database.h:316
void clear_instance()
Definition: database.h:211
const StringPiece get_instance() const
Definition: database.h:219
void set_etag(const StringPiece &value)
Definition: database.h:195
Definition: acl_entry.cc:41
void set_kind(const StringPiece &value)
Definition: database.h:269
Definition: acl_entry.h:39
void set_self_link(const StringPiece &value)
Definition: database.h:382
bool has_name() const
Definition: database.h:278
const StringPiece get_kind() const
Definition: database.h:256
void set_charset(const StringPiece &value)
Definition: database.h:120
bool has_etag() const
Definition: database.h:166
bool has_instance() const
Definition: database.h:204
void set_collation(const StringPiece &value)
Definition: database.h:157
const StringPiece get_project() const
Definition: database.h:331
void clear_collation()
Definition: database.h:136
void clear_name()
Definition: database.h:285
void set_instance(const StringPiece &value)
Definition: database.h:232
const StringPiece get_self_link() const
Definition: database.h:369
void clear_self_link()
Definition: database.h:361