sqladmin  v1beta4
ip_mapping.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_MAPPING_H_
31 #define GOOGLE_SQLADMIN_API_IP_MAPPING_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 IpMapping : public client::JsonCppData {
52  public:
58  static IpMapping* New();
59 
65  explicit IpMapping(const Json::Value& storage);
66 
72  explicit IpMapping(Json::Value* storage);
73 
77  virtual ~IpMapping();
78 
84  const StringPiece GetTypeName() const {
85  return StringPiece("google_sqladmin_api::IpMapping");
86  }
87 
93  bool has_ip_address() const {
94  return Storage().isMember("ipAddress");
95  }
96 
101  MutableStorage()->removeMember("ipAddress");
102  }
103 
104 
108  const StringPiece get_ip_address() const {
109  const Json::Value& v = Storage("ipAddress");
110  if (v == Json::Value::null) return StringPiece("");
111  return StringPiece(v.asCString());
112  }
113 
121  void set_ip_address(const StringPiece& value) {
122  *MutableStorage("ipAddress") = value.data();
123  }
124 
130  bool has_time_to_retire() const {
131  return Storage().isMember("timeToRetire");
132  }
133 
138  MutableStorage()->removeMember("timeToRetire");
139  }
140 
141 
145  client::DateTime get_time_to_retire() const {
146  const Json::Value& storage = Storage("timeToRetire");
147  return client::JsonValueToCppValueHelper<client::DateTime >(storage);
148  }
149 
159  void set_time_to_retire(client::DateTime value) {
160  client::SetJsonValueFromCppValueHelper<client::DateTime >(
161  value, MutableStorage("timeToRetire"));
162  }
163 
169  bool has_type() const {
170  return Storage().isMember("type");
171  }
172 
176  void clear_type() {
177  MutableStorage()->removeMember("type");
178  }
179 
180 
184  const StringPiece get_type() const {
185  const Json::Value& v = Storage("type");
186  if (v == Json::Value::null) return StringPiece("");
187  return StringPiece(v.asCString());
188  }
189 
200  void set_type(const StringPiece& value) {
201  *MutableStorage("type") = value.data();
202  }
203 
204  private:
205  void operator=(const IpMapping&);
206 }; // IpMapping
207 } // namespace google_sqladmin_api
208 #endif // GOOGLE_SQLADMIN_API_IP_MAPPING_H_
void clear_type()
Definition: ip_mapping.h:176
bool has_ip_address() const
Definition: ip_mapping.h:93
void clear_time_to_retire()
Definition: ip_mapping.h:137
void clear_ip_address()
Definition: ip_mapping.h:100
void set_ip_address(const StringPiece &value)
Definition: ip_mapping.h:121
bool has_type() const
Definition: ip_mapping.h:169
client::DateTime get_time_to_retire() const
Definition: ip_mapping.h:145
void set_time_to_retire(client::DateTime value)
Definition: ip_mapping.h:159
const StringPiece get_ip_address() const
Definition: ip_mapping.h:108
bool has_time_to_retire() const
Definition: ip_mapping.h:130
Definition: acl_entry.cc:41
const StringPiece get_type() const
Definition: ip_mapping.h:184
Definition: acl_entry.h:39
void set_type(const StringPiece &value)
Definition: ip_mapping.h:200
const StringPiece GetTypeName() const
Definition: ip_mapping.h:84
Definition: ip_mapping.h:51