dns  v1
operation.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_OPERATION_H_
31 #define GOOGLE_DNS_API_OPERATION_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/operation_dns_key_context.h"
39 #include "google/dns_api/operation_managed_zone_context.h"
40 
41 namespace Json {
42 class Value;
43 } // namespace Json
44 
45 namespace google_dns_api {
46 using namespace googleapis;
47 
56 class Operation : public client::JsonCppData {
57  public:
63  static Operation* New();
64 
70  explicit Operation(const Json::Value& storage);
71 
77  explicit Operation(Json::Value* storage);
78 
82  virtual ~Operation();
83 
89  const StringPiece GetTypeName() const {
90  return StringPiece("google_dns_api::Operation");
91  }
92 
98  bool has_dns_key_context() const {
99  return Storage().isMember("dnsKeyContext");
100  }
101 
106  MutableStorage()->removeMember("dnsKeyContext");
107  }
108 
109 
113  const OperationDnsKeyContext get_dns_key_context() const;
114 
123  OperationDnsKeyContext mutable_dnsKeyContext();
124 
130  bool has_id() const {
131  return Storage().isMember("id");
132  }
133 
137  void clear_id() {
138  MutableStorage()->removeMember("id");
139  }
140 
141 
145  const StringPiece get_id() const {
146  const Json::Value& v = Storage("id");
147  if (v == Json::Value::null) return StringPiece("");
148  return StringPiece(v.asCString());
149  }
150 
161  void set_id(const StringPiece& value) {
162  *MutableStorage("id") = value.data();
163  }
164 
170  bool has_kind() const {
171  return Storage().isMember("kind");
172  }
173 
177  void clear_kind() {
178  MutableStorage()->removeMember("kind");
179  }
180 
181 
185  const StringPiece get_kind() const {
186  const Json::Value& v = Storage("kind");
187  if (v == Json::Value::null) return StringPiece("");
188  return StringPiece(v.asCString());
189  }
190 
199  void set_kind(const StringPiece& value) {
200  *MutableStorage("kind") = value.data();
201  }
202 
208  bool has_start_time() const {
209  return Storage().isMember("startTime");
210  }
211 
216  MutableStorage()->removeMember("startTime");
217  }
218 
219 
223  const StringPiece get_start_time() const {
224  const Json::Value& v = Storage("startTime");
225  if (v == Json::Value::null) return StringPiece("");
226  return StringPiece(v.asCString());
227  }
228 
237  void set_start_time(const StringPiece& value) {
238  *MutableStorage("startTime") = value.data();
239  }
240 
246  bool has_status() const {
247  return Storage().isMember("status");
248  }
249 
253  void clear_status() {
254  MutableStorage()->removeMember("status");
255  }
256 
257 
261  const StringPiece get_status() const {
262  const Json::Value& v = Storage("status");
263  if (v == Json::Value::null) return StringPiece("");
264  return StringPiece(v.asCString());
265  }
266 
277  void set_status(const StringPiece& value) {
278  *MutableStorage("status") = value.data();
279  }
280 
286  bool has_type() const {
287  return Storage().isMember("type");
288  }
289 
293  void clear_type() {
294  MutableStorage()->removeMember("type");
295  }
296 
297 
301  const StringPiece get_type() const {
302  const Json::Value& v = Storage("type");
303  if (v == Json::Value::null) return StringPiece("");
304  return StringPiece(v.asCString());
305  }
306 
315  void set_type(const StringPiece& value) {
316  *MutableStorage("type") = value.data();
317  }
318 
324  bool has_user() const {
325  return Storage().isMember("user");
326  }
327 
331  void clear_user() {
332  MutableStorage()->removeMember("user");
333  }
334 
335 
339  const StringPiece get_user() const {
340  const Json::Value& v = Storage("user");
341  if (v == Json::Value::null) return StringPiece("");
342  return StringPiece(v.asCString());
343  }
344 
353  void set_user(const StringPiece& value) {
354  *MutableStorage("user") = value.data();
355  }
356 
362  bool has_zone_context() const {
363  return Storage().isMember("zoneContext");
364  }
365 
370  MutableStorage()->removeMember("zoneContext");
371  }
372 
373 
377  const OperationManagedZoneContext get_zone_context() const;
378 
387  OperationManagedZoneContext mutable_zoneContext();
388 
389  private:
390  void operator=(const Operation&);
391 }; // Operation
392 } // namespace google_dns_api
393 #endif // GOOGLE_DNS_API_OPERATION_H_
Definition: operation_managed_zone_context.h:51
bool has_user() const
Definition: operation.h:324
void set_user(const StringPiece &value)
Definition: operation.h:353
void set_type(const StringPiece &value)
Definition: operation.h:315
void set_start_time(const StringPiece &value)
Definition: operation.h:237
const StringPiece get_kind() const
Definition: operation.h:185
bool has_status() const
Definition: operation.h:246
bool has_zone_context() const
Definition: operation.h:362
const StringPiece get_user() const
Definition: operation.h:339
void clear_kind()
Definition: operation.h:177
bool has_dns_key_context() const
Definition: operation.h:98
void clear_id()
Definition: operation.h:137
void set_id(const StringPiece &value)
Definition: operation.h:161
void clear_dns_key_context()
Definition: operation.h:105
bool has_type() const
Definition: operation.h:286
void clear_user()
Definition: operation.h:331
void set_kind(const StringPiece &value)
Definition: operation.h:199
const StringPiece get_type() const
Definition: operation.h:301
bool has_start_time() const
Definition: operation.h:208
const StringPiece get_start_time() const
Definition: operation.h:223
Definition: change.h:40
void clear_type()
Definition: operation.h:293
const StringPiece GetTypeName() const
Definition: operation.h:89
const StringPiece get_id() const
Definition: operation.h:145
Definition: operation_dns_key_context.h:51
bool has_id() const
Definition: operation.h:130
bool has_kind() const
Definition: operation.h:170
void clear_zone_context()
Definition: operation.h:369
void set_status(const StringPiece &value)
Definition: operation.h:277
const StringPiece get_status() const
Definition: operation.h:261
void clear_status()
Definition: operation.h:253
Definition: change.cc:42
void clear_start_time()
Definition: operation.h:215
Definition: operation.h:56