sqladmin  v1beta4
flag.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_FLAG_H_
31 #define GOOGLE_SQLADMIN_API_FLAG_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_sqladmin_api {
44 using namespace googleapis;
45 
51 class Flag : public client::JsonCppData {
52  public:
58  static Flag* New();
59 
65  explicit Flag(const Json::Value& storage);
66 
72  explicit Flag(Json::Value* storage);
73 
77  virtual ~Flag();
78 
84  const StringPiece GetTypeName() const {
85  return StringPiece("google_sqladmin_api::Flag");
86  }
87 
94  return Storage().isMember("allowedStringValues");
95  }
96 
101  MutableStorage()->removeMember("allowedStringValues");
102  }
103 
104 
109  const client::JsonCppArray<string > get_allowed_string_values() const {
110  const Json::Value& storage = Storage("allowedStringValues");
111  return client::JsonValueToCppValueHelper<client::JsonCppArray<string > >(storage);
112  }
113 
122  client::JsonCppArray<string > mutable_allowedStringValues() {
123  Json::Value* storage = MutableStorage("allowedStringValues");
124  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<string > >(storage);
125  }
126 
132  bool has_applies_to() const {
133  return Storage().isMember("appliesTo");
134  }
135 
140  MutableStorage()->removeMember("appliesTo");
141  }
142 
143 
147  const client::JsonCppArray<string > get_applies_to() const {
148  const Json::Value& storage = Storage("appliesTo");
149  return client::JsonValueToCppValueHelper<client::JsonCppArray<string > >(storage);
150  }
151 
161  client::JsonCppArray<string > mutable_appliesTo() {
162  Json::Value* storage = MutableStorage("appliesTo");
163  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<string > >(storage);
164  }
165 
171  bool has_in_beta() const {
172  return Storage().isMember("inBeta");
173  }
174 
178  void clear_in_beta() {
179  MutableStorage()->removeMember("inBeta");
180  }
181 
182 
186  bool get_in_beta() const {
187  const Json::Value& storage = Storage("inBeta");
188  return client::JsonValueToCppValueHelper<bool >(storage);
189  }
190 
198  void set_in_beta(bool value) {
199  client::SetJsonValueFromCppValueHelper<bool >(
200  value, MutableStorage("inBeta"));
201  }
202 
208  bool has_kind() const {
209  return Storage().isMember("kind");
210  }
211 
215  void clear_kind() {
216  MutableStorage()->removeMember("kind");
217  }
218 
219 
223  const StringPiece get_kind() const {
224  const Json::Value& v = Storage("kind");
225  if (v == Json::Value::null) return StringPiece("");
226  return StringPiece(v.asCString());
227  }
228 
236  void set_kind(const StringPiece& value) {
237  *MutableStorage("kind") = value.data();
238  }
239 
245  bool has_max_value() const {
246  return Storage().isMember("maxValue");
247  }
248 
253  MutableStorage()->removeMember("maxValue");
254  }
255 
256 
260  int64 get_max_value() const {
261  const Json::Value& storage = Storage("maxValue");
262  return client::JsonValueToCppValueHelper<int64 >(storage);
263  }
264 
272  void set_max_value(int64 value) {
273  client::SetJsonValueFromCppValueHelper<int64 >(
274  value, MutableStorage("maxValue"));
275  }
276 
282  bool has_min_value() const {
283  return Storage().isMember("minValue");
284  }
285 
290  MutableStorage()->removeMember("minValue");
291  }
292 
293 
297  int64 get_min_value() const {
298  const Json::Value& storage = Storage("minValue");
299  return client::JsonValueToCppValueHelper<int64 >(storage);
300  }
301 
309  void set_min_value(int64 value) {
310  client::SetJsonValueFromCppValueHelper<int64 >(
311  value, MutableStorage("minValue"));
312  }
313 
319  bool has_name() const {
320  return Storage().isMember("name");
321  }
322 
326  void clear_name() {
327  MutableStorage()->removeMember("name");
328  }
329 
330 
334  const StringPiece get_name() const {
335  const Json::Value& v = Storage("name");
336  if (v == Json::Value::null) return StringPiece("");
337  return StringPiece(v.asCString());
338  }
339 
348  void set_name(const StringPiece& value) {
349  *MutableStorage("name") = value.data();
350  }
351 
357  bool has_requires_restart() const {
358  return Storage().isMember("requiresRestart");
359  }
360 
365  MutableStorage()->removeMember("requiresRestart");
366  }
367 
368 
372  bool get_requires_restart() const {
373  const Json::Value& storage = Storage("requiresRestart");
374  return client::JsonValueToCppValueHelper<bool >(storage);
375  }
376 
385  void set_requires_restart(bool value) {
386  client::SetJsonValueFromCppValueHelper<bool >(
387  value, MutableStorage("requiresRestart"));
388  }
389 
395  bool has_type() const {
396  return Storage().isMember("type");
397  }
398 
402  void clear_type() {
403  MutableStorage()->removeMember("type");
404  }
405 
406 
410  const StringPiece get_type() const {
411  const Json::Value& v = Storage("type");
412  if (v == Json::Value::null) return StringPiece("");
413  return StringPiece(v.asCString());
414  }
415 
425  void set_type(const StringPiece& value) {
426  *MutableStorage("type") = value.data();
427  }
428 
429  private:
430  void operator=(const Flag&);
431 }; // Flag
432 } // namespace google_sqladmin_api
433 #endif // GOOGLE_SQLADMIN_API_FLAG_H_
Definition: flag.h:51
bool get_requires_restart() const
Definition: flag.h:372
int64 get_min_value() const
Definition: flag.h:297
void clear_requires_restart()
Definition: flag.h:364
bool has_requires_restart() const
Definition: flag.h:357
const StringPiece get_name() const
Definition: flag.h:334
void set_kind(const StringPiece &value)
Definition: flag.h:236
client::JsonCppArray< string > mutable_allowedStringValues()
Definition: flag.h:122
bool has_applies_to() const
Definition: flag.h:132
const client::JsonCppArray< string > get_applies_to() const
Definition: flag.h:147
void clear_name()
Definition: flag.h:326
void set_min_value(int64 value)
Definition: flag.h:309
void set_requires_restart(bool value)
Definition: flag.h:385
void set_max_value(int64 value)
Definition: flag.h:272
void clear_type()
Definition: flag.h:402
bool has_type() const
Definition: flag.h:395
bool has_name() const
Definition: flag.h:319
Definition: acl_entry.cc:41
void clear_applies_to()
Definition: flag.h:139
bool has_allowed_string_values() const
Definition: flag.h:93
client::JsonCppArray< string > mutable_appliesTo()
Definition: flag.h:161
void clear_min_value()
Definition: flag.h:289
Definition: acl_entry.h:39
const StringPiece get_type() const
Definition: flag.h:410
const StringPiece get_kind() const
Definition: flag.h:223
bool has_max_value() const
Definition: flag.h:245
void set_name(const StringPiece &value)
Definition: flag.h:348
int64 get_max_value() const
Definition: flag.h:260
void clear_max_value()
Definition: flag.h:252
void set_in_beta(bool value)
Definition: flag.h:198
void clear_in_beta()
Definition: flag.h:178
void set_type(const StringPiece &value)
Definition: flag.h:425
const StringPiece GetTypeName() const
Definition: flag.h:84
void clear_kind()
Definition: flag.h:215
void clear_allowed_string_values()
Definition: flag.h:100
bool has_kind() const
Definition: flag.h:208
bool get_in_beta() const
Definition: flag.h:186
bool has_in_beta() const
Definition: flag.h:171
const client::JsonCppArray< string > get_allowed_string_values() const
Definition: flag.h:109
bool has_min_value() const
Definition: flag.h:282