storage  v1
notification.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-03-14, 18:33:41 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 Storage JSON API (storage/v1)
24 // Generated from:
25 // Version: v1
26 // Revision: 171
27 // Generated by:
28 // Tool: google-apis-code-generator 1.5.1
29 // C++: 0.1.4
30 #ifndef GOOGLE_STORAGE_API_NOTIFICATION_H_
31 #define GOOGLE_STORAGE_API_NOTIFICATION_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 namespace Json {
39 class Value;
40 } // namespace Json
41 
42 namespace google_storage_api {
43 using namespace googleapis;
44 
50 class Notification : public client::JsonCppData {
51  public:
57  static Notification* New();
58 
64  explicit Notification(const Json::Value& storage);
65 
71  explicit Notification(Json::Value* storage);
72 
76  virtual ~Notification();
77 
83  const StringPiece GetTypeName() const {
84  return StringPiece("google_storage_api::Notification");
85  }
86 
92  bool has_custom_attributes() const {
93  return Storage().isMember("custom_attributes");
94  }
95 
100  MutableStorage()->removeMember("custom_attributes");
101  }
102 
103 
108  const client::JsonCppAssociativeArray<string > get_custom_attributes() const {
109  const Json::Value& storage = Storage("custom_attributes");
110  return client::JsonValueToCppValueHelper<client::JsonCppAssociativeArray<string > >(storage);
111  }
112 
122  client::JsonCppAssociativeArray<string > mutable_custom_attributes() {
123  Json::Value* storage = MutableStorage("custom_attributes");
124  return client::JsonValueToMutableCppValueHelper<client::JsonCppAssociativeArray<string > >(storage);
125  }
126 
132  bool has_etag() const {
133  return Storage().isMember("etag");
134  }
135 
139  void clear_etag() {
140  MutableStorage()->removeMember("etag");
141  }
142 
143 
147  const StringPiece get_etag() const {
148  const Json::Value& v = Storage("etag");
149  if (v == Json::Value::null) return StringPiece("");
150  return StringPiece(v.asCString());
151  }
152 
160  void set_etag(const StringPiece& value) {
161  *MutableStorage("etag") = value.data();
162  }
163 
169  bool has_event_types() const {
170  return Storage().isMember("event_types");
171  }
172 
177  MutableStorage()->removeMember("event_types");
178  }
179 
180 
184  const client::JsonCppArray<string > get_event_types() const {
185  const Json::Value& storage = Storage("event_types");
186  return client::JsonValueToCppValueHelper<client::JsonCppArray<string > >(storage);
187  }
188 
198  client::JsonCppArray<string > mutable_event_types() {
199  Json::Value* storage = MutableStorage("event_types");
200  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<string > >(storage);
201  }
202 
208  bool has_id() const {
209  return Storage().isMember("id");
210  }
211 
215  void clear_id() {
216  MutableStorage()->removeMember("id");
217  }
218 
219 
223  const StringPiece get_id() const {
224  const Json::Value& v = Storage("id");
225  if (v == Json::Value::null) return StringPiece("");
226  return StringPiece(v.asCString());
227  }
228 
236  void set_id(const StringPiece& value) {
237  *MutableStorage("id") = value.data();
238  }
239 
245  bool has_kind() const {
246  return Storage().isMember("kind");
247  }
248 
252  void clear_kind() {
253  MutableStorage()->removeMember("kind");
254  }
255 
256 
260  const StringPiece get_kind() const {
261  const Json::Value& v = Storage("kind");
262  if (v == Json::Value::null) return StringPiece("");
263  return StringPiece(v.asCString());
264  }
265 
274  void set_kind(const StringPiece& value) {
275  *MutableStorage("kind") = value.data();
276  }
277 
283  bool has_object_name_prefix() const {
284  return Storage().isMember("object_name_prefix");
285  }
286 
291  MutableStorage()->removeMember("object_name_prefix");
292  }
293 
294 
298  const StringPiece get_object_name_prefix() const {
299  const Json::Value& v = Storage("object_name_prefix");
300  if (v == Json::Value::null) return StringPiece("");
301  return StringPiece(v.asCString());
302  }
303 
312  void set_object_name_prefix(const StringPiece& value) {
313  *MutableStorage("object_name_prefix") = value.data();
314  }
315 
321  bool has_payload_format() const {
322  return Storage().isMember("payload_format");
323  }
324 
329  MutableStorage()->removeMember("payload_format");
330  }
331 
332 
336  const StringPiece get_payload_format() const {
337  const Json::Value& v = Storage("payload_format");
338  if (v == Json::Value::null) return StringPiece("");
339  return StringPiece(v.asCString());
340  }
341 
349  void set_payload_format(const StringPiece& value) {
350  *MutableStorage("payload_format") = value.data();
351  }
352 
358  bool has_self_link() const {
359  return Storage().isMember("selfLink");
360  }
361 
366  MutableStorage()->removeMember("selfLink");
367  }
368 
369 
373  const StringPiece get_self_link() const {
374  const Json::Value& v = Storage("selfLink");
375  if (v == Json::Value::null) return StringPiece("");
376  return StringPiece(v.asCString());
377  }
378 
386  void set_self_link(const StringPiece& value) {
387  *MutableStorage("selfLink") = value.data();
388  }
389 
395  bool has_topic() const {
396  return Storage().isMember("topic");
397  }
398 
402  void clear_topic() {
403  MutableStorage()->removeMember("topic");
404  }
405 
406 
410  const StringPiece get_topic() const {
411  const Json::Value& v = Storage("topic");
412  if (v == Json::Value::null) return StringPiece("");
413  return StringPiece(v.asCString());
414  }
415 
424  void set_topic(const StringPiece& value) {
425  *MutableStorage("topic") = value.data();
426  }
427 
428  private:
429  void operator=(const Notification&);
430 }; // Notification
431 } // namespace google_storage_api
432 #endif // GOOGLE_STORAGE_API_NOTIFICATION_H_
const StringPiece GetTypeName() const
Definition: notification.h:83
const client::JsonCppAssociativeArray< string > get_custom_attributes() const
Definition: notification.h:108
void clear_object_name_prefix()
Definition: notification.h:290
bool has_custom_attributes() const
Definition: notification.h:92
bool has_kind() const
Definition: notification.h:245
void set_self_link(const StringPiece &value)
Definition: notification.h:386
void clear_payload_format()
Definition: notification.h:328
void set_payload_format(const StringPiece &value)
Definition: notification.h:349
void set_etag(const StringPiece &value)
Definition: notification.h:160
void clear_custom_attributes()
Definition: notification.h:99
bool has_id() const
Definition: notification.h:208
const StringPiece get_id() const
Definition: notification.h:223
const client::JsonCppArray< string > get_event_types() const
Definition: notification.h:184
const StringPiece get_kind() const
Definition: notification.h:260
const StringPiece get_object_name_prefix() const
Definition: notification.h:298
void set_id(const StringPiece &value)
Definition: notification.h:236
void set_kind(const StringPiece &value)
Definition: notification.h:274
client::JsonCppArray< string > mutable_event_types()
Definition: notification.h:198
void clear_event_types()
Definition: notification.h:176
const StringPiece get_self_link() const
Definition: notification.h:373
bool has_payload_format() const
Definition: notification.h:321
void clear_topic()
Definition: notification.h:402
Definition: bucket.h:43
Definition: notification.h:50
bool has_event_types() const
Definition: notification.h:169
void set_object_name_prefix(const StringPiece &value)
Definition: notification.h:312
const StringPiece get_payload_format() const
Definition: notification.h:336
bool has_etag() const
Definition: notification.h:132
bool has_object_name_prefix() const
Definition: notification.h:283
void clear_etag()
Definition: notification.h:139
void clear_self_link()
Definition: notification.h:365
const StringPiece get_etag() const
Definition: notification.h:147
Definition: bucket.cc:45
client::JsonCppAssociativeArray< string > mutable_custom_attributes()
Definition: notification.h:122
bool has_topic() const
Definition: notification.h:395
const StringPiece get_topic() const
Definition: notification.h:410
bool has_self_link() const
Definition: notification.h:358
void clear_kind()
Definition: notification.h:252
void set_topic(const StringPiece &value)
Definition: notification.h:424
void clear_id()
Definition: notification.h:215