compute  v1
commitments_scoped_list.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-04-20, 05:56:52 UTC
18 // C++ generator version: 0.1.4
19 
20 // ----------------------------------------------------------------------------
21 // NOTE: This file is generated from Google APIs Discovery Service.
22 // Service:
23 // Compute Engine API (compute/v1)
24 // Generated from:
25 // Version: v1
26 // Revision: 213
27 // Generated by:
28 // Tool: google-apis-code-generator 1.5.1
29 // C++: 0.1.4
30 #ifndef GOOGLE_COMPUTE_API_COMMITMENTS_SCOPED_LIST_H_
31 #define GOOGLE_COMPUTE_API_COMMITMENTS_SCOPED_LIST_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/compute_api/commitment.h"
39 
40 namespace Json {
41 class Value;
42 } // namespace Json
43 
44 namespace google_compute_api {
45 using namespace googleapis;
46 
52 class CommitmentsScopedList : public client::JsonCppData {
53  public:
60  class CommitmentsScopedListWarning : public client::JsonCppData {
61  public:
67  class CommitmentsScopedListWarningData : public client::JsonCppData {
68  public:
75 
81  explicit CommitmentsScopedListWarningData(const Json::Value& storage);
82 
88  explicit CommitmentsScopedListWarningData(Json::Value* storage);
89 
94 
101  const StringPiece GetTypeName() const {
102  return StringPiece("google_compute_api::CommitmentsScopedListWarningData");
103  }
104 
110  bool has_key() const {
111  return Storage().isMember("key");
112  }
113 
117  void clear_key() {
118  MutableStorage()->removeMember("key");
119  }
120 
121 
125  const StringPiece get_key() const {
126  const Json::Value& v = Storage("key");
127  if (v == Json::Value::null) return StringPiece("");
128  return StringPiece(v.asCString());
129  }
130 
144  void set_key(const StringPiece& value) {
145  *MutableStorage("key") = value.data();
146  }
147 
153  bool has_value() const {
154  return Storage().isMember("value");
155  }
156 
160  void clear_value() {
161  MutableStorage()->removeMember("value");
162  }
163 
164 
168  const StringPiece get_value() const {
169  const Json::Value& v = Storage("value");
170  if (v == Json::Value::null) return StringPiece("");
171  return StringPiece(v.asCString());
172  }
173 
181  void set_value(const StringPiece& value) {
182  *MutableStorage("value") = value.data();
183  }
184 
185  private:
186  void operator=(const CommitmentsScopedListWarningData&);
187  }; // CommitmentsScopedListWarningData
193  static CommitmentsScopedListWarning* New();
194 
200  explicit CommitmentsScopedListWarning(const Json::Value& storage);
201 
207  explicit CommitmentsScopedListWarning(Json::Value* storage);
208 
212  virtual ~CommitmentsScopedListWarning();
213 
219  const StringPiece GetTypeName() const {
220  return StringPiece("google_compute_api::CommitmentsScopedListWarning");
221  }
222 
228  bool has_code() const {
229  return Storage().isMember("code");
230  }
231 
235  void clear_code() {
236  MutableStorage()->removeMember("code");
237  }
238 
239 
243  const StringPiece get_code() const {
244  const Json::Value& v = Storage("code");
245  if (v == Json::Value::null) return StringPiece("");
246  return StringPiece(v.asCString());
247  }
248 
257  void set_code(const StringPiece& value) {
258  *MutableStorage("code") = value.data();
259  }
260 
266  bool has_data() const {
267  return Storage().isMember("data");
268  }
269 
273  void clear_data() {
274  MutableStorage()->removeMember("data");
275  }
276 
277 
281  const client::JsonCppArray<CommitmentsScopedListWarningData > get_data() const {
282  const Json::Value& storage = Storage("data");
283  return client::JsonValueToCppValueHelper<client::JsonCppArray<CommitmentsScopedListWarningData > >(storage);
284  }
285 
295  client::JsonCppArray<CommitmentsScopedListWarningData > mutable_data() {
296  Json::Value* storage = MutableStorage("data");
297  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<CommitmentsScopedListWarningData > >(storage);
298  }
299 
305  bool has_message() const {
306  return Storage().isMember("message");
307  }
308 
312  void clear_message() {
313  MutableStorage()->removeMember("message");
314  }
315 
316 
320  const StringPiece get_message() const {
321  const Json::Value& v = Storage("message");
322  if (v == Json::Value::null) return StringPiece("");
323  return StringPiece(v.asCString());
324  }
325 
333  void set_message(const StringPiece& value) {
334  *MutableStorage("message") = value.data();
335  }
336 
337  private:
338  void operator=(const CommitmentsScopedListWarning&);
339  }; // CommitmentsScopedListWarning
345  static CommitmentsScopedList* New();
346 
352  explicit CommitmentsScopedList(const Json::Value& storage);
353 
359  explicit CommitmentsScopedList(Json::Value* storage);
360 
364  virtual ~CommitmentsScopedList();
365 
371  const StringPiece GetTypeName() const {
372  return StringPiece("google_compute_api::CommitmentsScopedList");
373  }
374 
380  bool has_commitments() const {
381  return Storage().isMember("commitments");
382  }
383 
388  MutableStorage()->removeMember("commitments");
389  }
390 
391 
395  const client::JsonCppArray<Commitment > get_commitments() const;
396 
405  client::JsonCppArray<Commitment > mutable_commitments();
406 
412  bool has_warning() const {
413  return Storage().isMember("warning");
414  }
415 
419  void clear_warning() {
420  MutableStorage()->removeMember("warning");
421  }
422 
423 
428  const Json::Value& storage = Storage("warning");
429  return client::JsonValueToCppValueHelper<CommitmentsScopedListWarning >(storage);
430  }
431 
441  Json::Value* storage = MutableStorage("warning");
442  return client::JsonValueToMutableCppValueHelper<CommitmentsScopedListWarning >(storage);
443  }
444 
445  private:
446  void operator=(const CommitmentsScopedList&);
447 }; // CommitmentsScopedList
448 } // namespace google_compute_api
449 #endif // GOOGLE_COMPUTE_API_COMMITMENTS_SCOPED_LIST_H_
Definition: commitments_scoped_list.h:52
const CommitmentsScopedListWarning get_warning() const
Definition: commitments_scoped_list.h:427
const StringPiece GetTypeName() const
Definition: commitments_scoped_list.h:219
bool has_data() const
Definition: commitments_scoped_list.h:266
void set_message(const StringPiece &value)
Definition: commitments_scoped_list.h:333
bool has_code() const
Definition: commitments_scoped_list.h:228
const StringPiece get_message() const
Definition: commitments_scoped_list.h:320
void set_key(const StringPiece &value)
Definition: commitments_scoped_list.h:144
bool has_message() const
Definition: commitments_scoped_list.h:305
client::JsonCppArray< CommitmentsScopedListWarningData > mutable_data()
Definition: commitments_scoped_list.h:295
void clear_warning()
Definition: commitments_scoped_list.h:419
void clear_data()
Definition: commitments_scoped_list.h:273
const StringPiece GetTypeName() const
Definition: commitments_scoped_list.h:371
bool has_warning() const
Definition: commitments_scoped_list.h:412
void clear_commitments()
Definition: commitments_scoped_list.h:387
Definition: accelerator_config.h:39
bool has_commitments() const
Definition: commitments_scoped_list.h:380
const client::JsonCppArray< CommitmentsScopedListWarningData > get_data() const
Definition: commitments_scoped_list.h:281
Definition: accelerator_config.cc:41
void clear_code()
Definition: commitments_scoped_list.h:235
CommitmentsScopedListWarning mutable_warning()
Definition: commitments_scoped_list.h:440
void clear_message()
Definition: commitments_scoped_list.h:312
void set_value(const StringPiece &value)
Definition: commitments_scoped_list.h:181
void set_code(const StringPiece &value)
Definition: commitments_scoped_list.h:257
const StringPiece get_code() const
Definition: commitments_scoped_list.h:243