dns  v1
change.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: 2020-01-29, 22:13:38 UTC
18 // C++ generator version: 0.1.4
19 
20 // ----------------------------------------------------------------------------
21 // NOTE: This file is generated from Google APIs Discovery Service.
22 // Service:
23 // Google Cloud DNS API (dns/v1)
24 // Generated from:
25 // Version: v1
26 // Revision: 112
27 // Generated by:
28 // Tool: google-apis-code-generator 1.5.1
29 // C++: 0.1.4
30 #ifndef GOOGLE_DNS_API_CHANGE_H_
31 #define GOOGLE_DNS_API_CHANGE_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/dns_api/resource_record_set.h"
39 
40 namespace Json {
41 class Value;
42 } // namespace Json
43 
44 namespace google_dns_api {
45 using namespace googleapis;
46 
58 class Change : public client::JsonCppData {
59  public:
65  static Change* New();
66 
72  explicit Change(const Json::Value& storage);
73 
79  explicit Change(Json::Value* storage);
80 
84  virtual ~Change();
85 
91  const StringPiece GetTypeName() const {
92  return StringPiece("google_dns_api::Change");
93  }
94 
100  bool has_additions() const {
101  return Storage().isMember("additions");
102  }
103 
108  MutableStorage()->removeMember("additions");
109  }
110 
111 
115  const client::JsonCppArray<ResourceRecordSet > get_additions() const;
116 
125  client::JsonCppArray<ResourceRecordSet > mutable_additions();
126 
132  bool has_deletions() const {
133  return Storage().isMember("deletions");
134  }
135 
140  MutableStorage()->removeMember("deletions");
141  }
142 
143 
147  const client::JsonCppArray<ResourceRecordSet > get_deletions() const;
148 
157  client::JsonCppArray<ResourceRecordSet > mutable_deletions();
158 
164  bool has_id() const {
165  return Storage().isMember("id");
166  }
167 
171  void clear_id() {
172  MutableStorage()->removeMember("id");
173  }
174 
175 
179  const StringPiece get_id() const {
180  const Json::Value& v = Storage("id");
181  if (v == Json::Value::null) return StringPiece("");
182  return StringPiece(v.asCString());
183  }
184 
192  void set_id(const StringPiece& value) {
193  *MutableStorage("id") = value.data();
194  }
195 
201  bool has_is_serving() const {
202  return Storage().isMember("isServing");
203  }
204 
209  MutableStorage()->removeMember("isServing");
210  }
211 
212 
216  bool get_is_serving() const {
217  const Json::Value& storage = Storage("isServing");
218  return client::JsonValueToCppValueHelper<bool >(storage);
219  }
220 
228  void set_is_serving(bool value) {
229  client::SetJsonValueFromCppValueHelper<bool >(
230  value, MutableStorage("isServing"));
231  }
232 
238  bool has_kind() const {
239  return Storage().isMember("kind");
240  }
241 
245  void clear_kind() {
246  MutableStorage()->removeMember("kind");
247  }
248 
249 
253  const StringPiece get_kind() const {
254  const Json::Value& v = Storage("kind");
255  if (v == Json::Value::null) return StringPiece("");
256  return StringPiece(v.asCString());
257  }
258 
267  void set_kind(const StringPiece& value) {
268  *MutableStorage("kind") = value.data();
269  }
270 
276  bool has_start_time() const {
277  return Storage().isMember("startTime");
278  }
279 
284  MutableStorage()->removeMember("startTime");
285  }
286 
287 
291  const StringPiece get_start_time() const {
292  const Json::Value& v = Storage("startTime");
293  if (v == Json::Value::null) return StringPiece("");
294  return StringPiece(v.asCString());
295  }
296 
305  void set_start_time(const StringPiece& value) {
306  *MutableStorage("startTime") = value.data();
307  }
308 
314  bool has_status() const {
315  return Storage().isMember("status");
316  }
317 
321  void clear_status() {
322  MutableStorage()->removeMember("status");
323  }
324 
325 
329  const StringPiece get_status() const {
330  const Json::Value& v = Storage("status");
331  if (v == Json::Value::null) return StringPiece("");
332  return StringPiece(v.asCString());
333  }
334 
344  void set_status(const StringPiece& value) {
345  *MutableStorage("status") = value.data();
346  }
347 
348  private:
349  void operator=(const Change&);
350 }; // Change
351 } // namespace google_dns_api
352 #endif // GOOGLE_DNS_API_CHANGE_H_
bool has_status() const
Definition: change.h:314
const StringPiece GetTypeName() const
Definition: change.h:91
Definition: change.h:58
void set_start_time(const StringPiece &value)
Definition: change.h:305
const StringPiece get_start_time() const
Definition: change.h:291
void set_status(const StringPiece &value)
Definition: change.h:344
void clear_id()
Definition: change.h:171
const StringPiece get_status() const
Definition: change.h:329
void clear_is_serving()
Definition: change.h:208
void clear_kind()
Definition: change.h:245
bool has_additions() const
Definition: change.h:100
Definition: change.h:40
void clear_status()
Definition: change.h:321
const StringPiece get_id() const
Definition: change.h:179
bool has_start_time() const
Definition: change.h:276
void clear_start_time()
Definition: change.h:283
void set_id(const StringPiece &value)
Definition: change.h:192
bool get_is_serving() const
Definition: change.h:216
void clear_deletions()
Definition: change.h:139
bool has_id() const
Definition: change.h:164
void set_is_serving(bool value)
Definition: change.h:228
void set_kind(const StringPiece &value)
Definition: change.h:267
void clear_additions()
Definition: change.h:107
bool has_is_serving() const
Definition: change.h:201
Definition: change.cc:42
const StringPiece get_kind() const
Definition: change.h:253
bool has_kind() const
Definition: change.h:238
bool has_deletions() const
Definition: change.h:132