compute  v1
backend_bucket.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_BACKEND_BUCKET_H_
31 #define GOOGLE_COMPUTE_API_BACKEND_BUCKET_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 #include "google/compute_api/backend_bucket_cdn_policy.h"
40 
41 namespace Json {
42 class Value;
43 } // namespace Json
44 
45 namespace google_compute_api {
46 using namespace googleapis;
47 
53 class BackendBucket : public client::JsonCppData {
54  public:
60  static BackendBucket* New();
61 
67  explicit BackendBucket(const Json::Value& storage);
68 
74  explicit BackendBucket(Json::Value* storage);
75 
79  virtual ~BackendBucket();
80 
86  const StringPiece GetTypeName() const {
87  return StringPiece("google_compute_api::BackendBucket");
88  }
89 
95  bool has_bucket_name() const {
96  return Storage().isMember("bucketName");
97  }
98 
103  MutableStorage()->removeMember("bucketName");
104  }
105 
106 
110  const StringPiece get_bucket_name() const {
111  const Json::Value& v = Storage("bucketName");
112  if (v == Json::Value::null) return StringPiece("");
113  return StringPiece(v.asCString());
114  }
115 
123  void set_bucket_name(const StringPiece& value) {
124  *MutableStorage("bucketName") = value.data();
125  }
126 
132  bool has_cdn_policy() const {
133  return Storage().isMember("cdnPolicy");
134  }
135 
140  MutableStorage()->removeMember("cdnPolicy");
141  }
142 
143 
147  const BackendBucketCdnPolicy get_cdn_policy() const;
148 
157  BackendBucketCdnPolicy mutable_cdnPolicy();
158 
164  bool has_creation_timestamp() const {
165  return Storage().isMember("creationTimestamp");
166  }
167 
172  MutableStorage()->removeMember("creationTimestamp");
173  }
174 
175 
179  const StringPiece get_creation_timestamp() const {
180  const Json::Value& v = Storage("creationTimestamp");
181  if (v == Json::Value::null) return StringPiece("");
182  return StringPiece(v.asCString());
183  }
184 
192  void set_creation_timestamp(const StringPiece& value) {
193  *MutableStorage("creationTimestamp") = value.data();
194  }
195 
201  bool has_description() const {
202  return Storage().isMember("description");
203  }
204 
209  MutableStorage()->removeMember("description");
210  }
211 
212 
216  const StringPiece get_description() const {
217  const Json::Value& v = Storage("description");
218  if (v == Json::Value::null) return StringPiece("");
219  return StringPiece(v.asCString());
220  }
221 
230  void set_description(const StringPiece& value) {
231  *MutableStorage("description") = value.data();
232  }
233 
239  bool has_enable_cdn() const {
240  return Storage().isMember("enableCdn");
241  }
242 
247  MutableStorage()->removeMember("enableCdn");
248  }
249 
250 
254  bool get_enable_cdn() const {
255  const Json::Value& storage = Storage("enableCdn");
256  return client::JsonValueToCppValueHelper<bool >(storage);
257  }
258 
266  void set_enable_cdn(bool value) {
267  client::SetJsonValueFromCppValueHelper<bool >(
268  value, MutableStorage("enableCdn"));
269  }
270 
276  bool has_id() const {
277  return Storage().isMember("id");
278  }
279 
283  void clear_id() {
284  MutableStorage()->removeMember("id");
285  }
286 
287 
291  uint64 get_id() const {
292  const Json::Value& storage = Storage("id");
293  return client::JsonValueToCppValueHelper<uint64 >(storage);
294  }
295 
303  void set_id(uint64 value) {
304  client::SetJsonValueFromCppValueHelper<uint64 >(
305  value, MutableStorage("id"));
306  }
307 
313  bool has_kind() const {
314  return Storage().isMember("kind");
315  }
316 
320  void clear_kind() {
321  MutableStorage()->removeMember("kind");
322  }
323 
324 
328  const StringPiece get_kind() const {
329  const Json::Value& v = Storage("kind");
330  if (v == Json::Value::null) return StringPiece("");
331  return StringPiece(v.asCString());
332  }
333 
341  void set_kind(const StringPiece& value) {
342  *MutableStorage("kind") = value.data();
343  }
344 
350  bool has_name() const {
351  return Storage().isMember("name");
352  }
353 
357  void clear_name() {
358  MutableStorage()->removeMember("name");
359  }
360 
361 
365  const StringPiece get_name() const {
366  const Json::Value& v = Storage("name");
367  if (v == Json::Value::null) return StringPiece("");
368  return StringPiece(v.asCString());
369  }
370 
384  void set_name(const StringPiece& value) {
385  *MutableStorage("name") = value.data();
386  }
387 
393  bool has_self_link() const {
394  return Storage().isMember("selfLink");
395  }
396 
401  MutableStorage()->removeMember("selfLink");
402  }
403 
404 
408  const StringPiece get_self_link() const {
409  const Json::Value& v = Storage("selfLink");
410  if (v == Json::Value::null) return StringPiece("");
411  return StringPiece(v.asCString());
412  }
413 
421  void set_self_link(const StringPiece& value) {
422  *MutableStorage("selfLink") = value.data();
423  }
424 
425  private:
426  void operator=(const BackendBucket&);
427 }; // BackendBucket
428 } // namespace google_compute_api
429 #endif // GOOGLE_COMPUTE_API_BACKEND_BUCKET_H_
void clear_kind()
Definition: backend_bucket.h:320
uint64 get_id() const
Definition: backend_bucket.h:291
bool has_description() const
Definition: backend_bucket.h:201
void clear_self_link()
Definition: backend_bucket.h:400
bool get_enable_cdn() const
Definition: backend_bucket.h:254
const StringPiece GetTypeName() const
Definition: backend_bucket.h:86
void clear_creation_timestamp()
Definition: backend_bucket.h:171
bool has_bucket_name() const
Definition: backend_bucket.h:95
void clear_bucket_name()
Definition: backend_bucket.h:102
const StringPiece get_name() const
Definition: backend_bucket.h:365
Definition: backend_bucket_cdn_policy.h:51
const StringPiece get_self_link() const
Definition: backend_bucket.h:408
bool has_id() const
Definition: backend_bucket.h:276
void set_name(const StringPiece &value)
Definition: backend_bucket.h:384
const StringPiece get_creation_timestamp() const
Definition: backend_bucket.h:179
bool has_name() const
Definition: backend_bucket.h:350
const StringPiece get_kind() const
Definition: backend_bucket.h:328
Definition: backend_bucket.h:53
bool has_creation_timestamp() const
Definition: backend_bucket.h:164
const StringPiece get_bucket_name() const
Definition: backend_bucket.h:110
void clear_enable_cdn()
Definition: backend_bucket.h:246
bool has_enable_cdn() const
Definition: backend_bucket.h:239
void set_description(const StringPiece &value)
Definition: backend_bucket.h:230
Definition: accelerator_config.h:39
void set_enable_cdn(bool value)
Definition: backend_bucket.h:266
const StringPiece get_description() const
Definition: backend_bucket.h:216
bool has_cdn_policy() const
Definition: backend_bucket.h:132
Definition: accelerator_config.cc:41
void set_kind(const StringPiece &value)
Definition: backend_bucket.h:341
void clear_id()
Definition: backend_bucket.h:283
void clear_cdn_policy()
Definition: backend_bucket.h:139
void set_creation_timestamp(const StringPiece &value)
Definition: backend_bucket.h:192
void clear_name()
Definition: backend_bucket.h:357
void set_bucket_name(const StringPiece &value)
Definition: backend_bucket.h:123
bool has_kind() const
Definition: backend_bucket.h:313
bool has_self_link() const
Definition: backend_bucket.h:393
void set_self_link(const StringPiece &value)
Definition: backend_bucket.h:421
void clear_description()
Definition: backend_bucket.h:208
void set_id(uint64 value)
Definition: backend_bucket.h:303