sqladmin  v1beta4
acl_entry.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_ACL_ENTRY_H_
31 #define GOOGLE_SQLADMIN_API_ACL_ENTRY_H_
32 
33 #include <string>
34 #include "googleapis/base/macros.h"
35 #include "googleapis/client/data/jsoncpp_data.h"
36 #include "googleapis/client/util/date_time.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 AclEntry : public client::JsonCppData {
52  public:
58  static AclEntry* New();
59 
65  explicit AclEntry(const Json::Value& storage);
66 
72  explicit AclEntry(Json::Value* storage);
73 
77  virtual ~AclEntry();
78 
84  const StringPiece GetTypeName() const {
85  return StringPiece("google_sqladmin_api::AclEntry");
86  }
87 
93  bool has_expiration_time() const {
94  return Storage().isMember("expirationTime");
95  }
96 
101  MutableStorage()->removeMember("expirationTime");
102  }
103 
104 
108  client::DateTime get_expiration_time() const {
109  const Json::Value& storage = Storage("expirationTime");
110  return client::JsonValueToCppValueHelper<client::DateTime >(storage);
111  }
112 
121  void set_expiration_time(client::DateTime value) {
122  client::SetJsonValueFromCppValueHelper<client::DateTime >(
123  value, MutableStorage("expirationTime"));
124  }
125 
131  bool has_kind() const {
132  return Storage().isMember("kind");
133  }
134 
138  void clear_kind() {
139  MutableStorage()->removeMember("kind");
140  }
141 
142 
146  const StringPiece get_kind() const {
147  const Json::Value& v = Storage("kind");
148  if (v == Json::Value::null) return StringPiece("");
149  return StringPiece(v.asCString());
150  }
151 
159  void set_kind(const StringPiece& value) {
160  *MutableStorage("kind") = value.data();
161  }
162 
168  bool has_name() const {
169  return Storage().isMember("name");
170  }
171 
175  void clear_name() {
176  MutableStorage()->removeMember("name");
177  }
178 
179 
183  const StringPiece get_name() const {
184  const Json::Value& v = Storage("name");
185  if (v == Json::Value::null) return StringPiece("");
186  return StringPiece(v.asCString());
187  }
188 
196  void set_name(const StringPiece& value) {
197  *MutableStorage("name") = value.data();
198  }
199 
205  bool has_value() const {
206  return Storage().isMember("value");
207  }
208 
212  void clear_value() {
213  MutableStorage()->removeMember("value");
214  }
215 
216 
220  const StringPiece get_value() const {
221  const Json::Value& v = Storage("value");
222  if (v == Json::Value::null) return StringPiece("");
223  return StringPiece(v.asCString());
224  }
225 
233  void set_value(const StringPiece& value) {
234  *MutableStorage("value") = value.data();
235  }
236 
237  private:
238  void operator=(const AclEntry&);
239 }; // AclEntry
240 } // namespace google_sqladmin_api
241 #endif // GOOGLE_SQLADMIN_API_ACL_ENTRY_H_
void clear_kind()
Definition: acl_entry.h:138
void set_name(const StringPiece &value)
Definition: acl_entry.h:196
const StringPiece GetTypeName() const
Definition: acl_entry.h:84
bool has_name() const
Definition: acl_entry.h:168
void set_expiration_time(client::DateTime value)
Definition: acl_entry.h:121
void set_value(const StringPiece &value)
Definition: acl_entry.h:233
client::DateTime get_expiration_time() const
Definition: acl_entry.h:108
void clear_expiration_time()
Definition: acl_entry.h:100
void clear_name()
Definition: acl_entry.h:175
void clear_value()
Definition: acl_entry.h:212
Definition: acl_entry.cc:41
Definition: acl_entry.h:39
const StringPiece get_value() const
Definition: acl_entry.h:220
const StringPiece get_name() const
Definition: acl_entry.h:183
bool has_expiration_time() const
Definition: acl_entry.h:93
const StringPiece get_kind() const
Definition: acl_entry.h:146
void set_kind(const StringPiece &value)
Definition: acl_entry.h:159
bool has_value() const
Definition: acl_entry.h:205
bool has_kind() const
Definition: acl_entry.h:131
Definition: acl_entry.h:51