sqladmin  v1beta4
user.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_USER_H_
31 #define GOOGLE_SQLADMIN_API_USER_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 User : public client::JsonCppData {
51  public:
57  static User* New();
58 
64  explicit User(const Json::Value& storage);
65 
71  explicit User(Json::Value* storage);
72 
76  virtual ~User();
77 
83  const StringPiece GetTypeName() const {
84  return StringPiece("google_sqladmin_api::User");
85  }
86 
92  bool has_etag() const {
93  return Storage().isMember("etag");
94  }
95 
99  void clear_etag() {
100  MutableStorage()->removeMember("etag");
101  }
102 
103 
107  const StringPiece get_etag() const {
108  const Json::Value& v = Storage("etag");
109  if (v == Json::Value::null) return StringPiece("");
110  return StringPiece(v.asCString());
111  }
112 
121  void set_etag(const StringPiece& value) {
122  *MutableStorage("etag") = value.data();
123  }
124 
130  bool has_host() const {
131  return Storage().isMember("host");
132  }
133 
137  void clear_host() {
138  MutableStorage()->removeMember("host");
139  }
140 
141 
145  const StringPiece get_host() const {
146  const Json::Value& v = Storage("host");
147  if (v == Json::Value::null) return StringPiece("");
148  return StringPiece(v.asCString());
149  }
150 
160  void set_host(const StringPiece& value) {
161  *MutableStorage("host") = value.data();
162  }
163 
169  bool has_instance() const {
170  return Storage().isMember("instance");
171  }
172 
176  void clear_instance() {
177  MutableStorage()->removeMember("instance");
178  }
179 
180 
184  const StringPiece get_instance() const {
185  const Json::Value& v = Storage("instance");
186  if (v == Json::Value::null) return StringPiece("");
187  return StringPiece(v.asCString());
188  }
189 
198  void set_instance(const StringPiece& value) {
199  *MutableStorage("instance") = value.data();
200  }
201 
207  bool has_kind() const {
208  return Storage().isMember("kind");
209  }
210 
214  void clear_kind() {
215  MutableStorage()->removeMember("kind");
216  }
217 
218 
222  const StringPiece get_kind() const {
223  const Json::Value& v = Storage("kind");
224  if (v == Json::Value::null) return StringPiece("");
225  return StringPiece(v.asCString());
226  }
227 
235  void set_kind(const StringPiece& value) {
236  *MutableStorage("kind") = value.data();
237  }
238 
244  bool has_name() const {
245  return Storage().isMember("name");
246  }
247 
251  void clear_name() {
252  MutableStorage()->removeMember("name");
253  }
254 
255 
259  const StringPiece get_name() const {
260  const Json::Value& v = Storage("name");
261  if (v == Json::Value::null) return StringPiece("");
262  return StringPiece(v.asCString());
263  }
264 
273  void set_name(const StringPiece& value) {
274  *MutableStorage("name") = value.data();
275  }
276 
282  bool has_password() const {
283  return Storage().isMember("password");
284  }
285 
289  void clear_password() {
290  MutableStorage()->removeMember("password");
291  }
292 
293 
297  const StringPiece get_password() const {
298  const Json::Value& v = Storage("password");
299  if (v == Json::Value::null) return StringPiece("");
300  return StringPiece(v.asCString());
301  }
302 
310  void set_password(const StringPiece& value) {
311  *MutableStorage("password") = value.data();
312  }
313 
319  bool has_project() const {
320  return Storage().isMember("project");
321  }
322 
326  void clear_project() {
327  MutableStorage()->removeMember("project");
328  }
329 
330 
334  const StringPiece get_project() const {
335  const Json::Value& v = Storage("project");
336  if (v == Json::Value::null) return StringPiece("");
337  return StringPiece(v.asCString());
338  }
339 
349  void set_project(const StringPiece& value) {
350  *MutableStorage("project") = value.data();
351  }
352 
353  private:
354  void operator=(const User&);
355 }; // User
356 } // namespace google_sqladmin_api
357 #endif // GOOGLE_SQLADMIN_API_USER_H_
void clear_etag()
Definition: user.h:99
void set_kind(const StringPiece &value)
Definition: user.h:235
void set_password(const StringPiece &value)
Definition: user.h:310
void clear_instance()
Definition: user.h:176
const StringPiece get_project() const
Definition: user.h:334
void clear_password()
Definition: user.h:289
void clear_kind()
Definition: user.h:214
void set_etag(const StringPiece &value)
Definition: user.h:121
const StringPiece GetTypeName() const
Definition: user.h:83
void clear_name()
Definition: user.h:251
bool has_kind() const
Definition: user.h:207
bool has_host() const
Definition: user.h:130
void set_project(const StringPiece &value)
Definition: user.h:349
void clear_project()
Definition: user.h:326
Definition: user.h:50
const StringPiece get_kind() const
Definition: user.h:222
const StringPiece get_name() const
Definition: user.h:259
const StringPiece get_password() const
Definition: user.h:297
void set_name(const StringPiece &value)
Definition: user.h:273
void clear_host()
Definition: user.h:137
bool has_etag() const
Definition: user.h:92
Definition: acl_entry.cc:41
void set_host(const StringPiece &value)
Definition: user.h:160
bool has_name() const
Definition: user.h:244
Definition: acl_entry.h:39
void set_instance(const StringPiece &value)
Definition: user.h:198
bool has_project() const
Definition: user.h:319
const StringPiece get_etag() const
Definition: user.h:107
bool has_instance() const
Definition: user.h:169
bool has_password() const
Definition: user.h:282
const StringPiece get_host() const
Definition: user.h:145
const StringPiece get_instance() const
Definition: user.h:184