sqladmin  v1beta4
ip_configuration.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_IP_CONFIGURATION_H_
31 #define GOOGLE_SQLADMIN_API_IP_CONFIGURATION_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 #include "google/sqladmin_api/acl_entry.h"
39 
40 namespace Json {
41 class Value;
42 } // namespace Json
43 
44 namespace google_sqladmin_api {
45 using namespace googleapis;
46 
52 class IpConfiguration : public client::JsonCppData {
53  public:
59  static IpConfiguration* New();
60 
66  explicit IpConfiguration(const Json::Value& storage);
67 
73  explicit IpConfiguration(Json::Value* storage);
74 
78  virtual ~IpConfiguration();
79 
85  const StringPiece GetTypeName() const {
86  return StringPiece("google_sqladmin_api::IpConfiguration");
87  }
88 
94  bool has_authorized_networks() const {
95  return Storage().isMember("authorizedNetworks");
96  }
97 
102  MutableStorage()->removeMember("authorizedNetworks");
103  }
104 
105 
110  const client::JsonCppArray<AclEntry > get_authorized_networks() const;
111 
122  client::JsonCppArray<AclEntry > mutable_authorizedNetworks();
123 
129  bool has_ipv4_enabled() const {
130  return Storage().isMember("ipv4Enabled");
131  }
132 
137  MutableStorage()->removeMember("ipv4Enabled");
138  }
139 
140 
144  bool get_ipv4_enabled() const {
145  const Json::Value& storage = Storage("ipv4Enabled");
146  return client::JsonValueToCppValueHelper<bool >(storage);
147  }
148 
156  void set_ipv4_enabled(bool value) {
157  client::SetJsonValueFromCppValueHelper<bool >(
158  value, MutableStorage("ipv4Enabled"));
159  }
160 
166  bool has_private_network() const {
167  return Storage().isMember("privateNetwork");
168  }
169 
174  MutableStorage()->removeMember("privateNetwork");
175  }
176 
177 
181  const StringPiece get_private_network() const {
182  const Json::Value& v = Storage("privateNetwork");
183  if (v == Json::Value::null) return StringPiece("");
184  return StringPiece(v.asCString());
185  }
186 
197  void set_private_network(const StringPiece& value) {
198  *MutableStorage("privateNetwork") = value.data();
199  }
200 
206  bool has_require_ssl() const {
207  return Storage().isMember("requireSsl");
208  }
209 
214  MutableStorage()->removeMember("requireSsl");
215  }
216 
217 
221  bool get_require_ssl() const {
222  const Json::Value& storage = Storage("requireSsl");
223  return client::JsonValueToCppValueHelper<bool >(storage);
224  }
225 
233  void set_require_ssl(bool value) {
234  client::SetJsonValueFromCppValueHelper<bool >(
235  value, MutableStorage("requireSsl"));
236  }
237 
238  private:
239  void operator=(const IpConfiguration&);
240 }; // IpConfiguration
241 } // namespace google_sqladmin_api
242 #endif // GOOGLE_SQLADMIN_API_IP_CONFIGURATION_H_
const StringPiece get_private_network() const
Definition: ip_configuration.h:181
Definition: ip_configuration.h:52
bool has_ipv4_enabled() const
Definition: ip_configuration.h:129
void clear_require_ssl()
Definition: ip_configuration.h:213
void set_ipv4_enabled(bool value)
Definition: ip_configuration.h:156
bool get_require_ssl() const
Definition: ip_configuration.h:221
void clear_private_network()
Definition: ip_configuration.h:173
void clear_authorized_networks()
Definition: ip_configuration.h:101
Definition: acl_entry.cc:41
bool has_private_network() const
Definition: ip_configuration.h:166
Definition: acl_entry.h:39
bool has_authorized_networks() const
Definition: ip_configuration.h:94
bool get_ipv4_enabled() const
Definition: ip_configuration.h:144
void clear_ipv4_enabled()
Definition: ip_configuration.h:136
bool has_require_ssl() const
Definition: ip_configuration.h:206
const StringPiece GetTypeName() const
Definition: ip_configuration.h:85
void set_require_ssl(bool value)
Definition: ip_configuration.h:233
void set_private_network(const StringPiece &value)
Definition: ip_configuration.h:197