dns  v1
dns_key_spec.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_DNS_KEY_SPEC_H_
31 #define GOOGLE_DNS_API_DNS_KEY_SPEC_H_
32 
33 #include <string>
34 #include "googleapis/base/integral_types.h"
35 #include "googleapis/base/macros.h"
36 #include "googleapis/client/data/jsoncpp_data.h"
37 #include "googleapis/strings/stringpiece.h"
38 
39 namespace Json {
40 class Value;
41 } // namespace Json
42 
43 namespace google_dns_api {
44 using namespace googleapis;
45 
52 class DnsKeySpec : public client::JsonCppData {
53  public:
59  static DnsKeySpec* New();
60 
66  explicit DnsKeySpec(const Json::Value& storage);
67 
73  explicit DnsKeySpec(Json::Value* storage);
74 
78  virtual ~DnsKeySpec();
79 
85  const StringPiece GetTypeName() const {
86  return StringPiece("google_dns_api::DnsKeySpec");
87  }
88 
94  bool has_algorithm() const {
95  return Storage().isMember("algorithm");
96  }
97 
102  MutableStorage()->removeMember("algorithm");
103  }
104 
105 
109  const StringPiece get_algorithm() const {
110  const Json::Value& v = Storage("algorithm");
111  if (v == Json::Value::null) return StringPiece("");
112  return StringPiece(v.asCString());
113  }
114 
122  void set_algorithm(const StringPiece& value) {
123  *MutableStorage("algorithm") = value.data();
124  }
125 
131  bool has_key_length() const {
132  return Storage().isMember("keyLength");
133  }
134 
139  MutableStorage()->removeMember("keyLength");
140  }
141 
142 
146  uint32 get_key_length() const {
147  const Json::Value& storage = Storage("keyLength");
148  return client::JsonValueToCppValueHelper<uint32 >(storage);
149  }
150 
158  void set_key_length(uint32 value) {
159  client::SetJsonValueFromCppValueHelper<uint32 >(
160  value, MutableStorage("keyLength"));
161  }
162 
168  bool has_key_type() const {
169  return Storage().isMember("keyType");
170  }
171 
175  void clear_key_type() {
176  MutableStorage()->removeMember("keyType");
177  }
178 
179 
183  const StringPiece get_key_type() const {
184  const Json::Value& v = Storage("keyType");
185  if (v == Json::Value::null) return StringPiece("");
186  return StringPiece(v.asCString());
187  }
188 
200  void set_key_type(const StringPiece& value) {
201  *MutableStorage("keyType") = value.data();
202  }
203 
209  bool has_kind() const {
210  return Storage().isMember("kind");
211  }
212 
216  void clear_kind() {
217  MutableStorage()->removeMember("kind");
218  }
219 
220 
224  const StringPiece get_kind() const {
225  const Json::Value& v = Storage("kind");
226  if (v == Json::Value::null) return StringPiece("");
227  return StringPiece(v.asCString());
228  }
229 
238  void set_kind(const StringPiece& value) {
239  *MutableStorage("kind") = value.data();
240  }
241 
242  private:
243  void operator=(const DnsKeySpec&);
244 }; // DnsKeySpec
245 } // namespace google_dns_api
246 #endif // GOOGLE_DNS_API_DNS_KEY_SPEC_H_
const StringPiece GetTypeName() const
Definition: dns_key_spec.h:85
const StringPiece get_kind() const
Definition: dns_key_spec.h:224
void clear_key_type()
Definition: dns_key_spec.h:175
bool has_algorithm() const
Definition: dns_key_spec.h:94
Definition: dns_key_spec.h:52
void set_key_type(const StringPiece &value)
Definition: dns_key_spec.h:200
void set_kind(const StringPiece &value)
Definition: dns_key_spec.h:238
uint32 get_key_length() const
Definition: dns_key_spec.h:146
void set_key_length(uint32 value)
Definition: dns_key_spec.h:158
const StringPiece get_key_type() const
Definition: dns_key_spec.h:183
bool has_key_length() const
Definition: dns_key_spec.h:131
Definition: change.h:40
const StringPiece get_algorithm() const
Definition: dns_key_spec.h:109
void clear_kind()
Definition: dns_key_spec.h:216
bool has_key_type() const
Definition: dns_key_spec.h:168
void clear_key_length()
Definition: dns_key_spec.h:138
void clear_algorithm()
Definition: dns_key_spec.h:101
void set_algorithm(const StringPiece &value)
Definition: dns_key_spec.h:122
Definition: change.cc:42
bool has_kind() const
Definition: dns_key_spec.h:209