1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // source: google/protobuf/struct.proto
3
4 #ifndef PROTOBUF_google_2fprotobuf_2fstruct_2eproto__INCLUDED
5 #define PROTOBUF_google_2fprotobuf_2fstruct_2eproto__INCLUDED
6
7 #include <string>
8
9 #include <google/protobuf/stubs/common.h>
10
11 #if GOOGLE_PROTOBUF_VERSION < 3000000
12 #error This file was generated by a newer version of protoc which is
13 #error incompatible with your Protocol Buffer headers. Please update
14 #error your headers.
15 #endif
16 #if 3000000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
17 #error This file was generated by an older version of protoc which is
18 #error incompatible with your Protocol Buffer headers. Please
19 #error regenerate this file with a newer version of protoc.
20 #endif
21
22 #include <google/protobuf/arena.h>
23 #include <google/protobuf/arenastring.h>
24 #include <google/protobuf/generated_message_util.h>
25 #include <google/protobuf/metadata.h>
26 #include <google/protobuf/message.h>
27 #include <google/protobuf/repeated_field.h>
28 #include <google/protobuf/extension_set.h>
29 #include <google/protobuf/map.h>
30 #include <google/protobuf/map_field_inl.h>
31 #include <google/protobuf/generated_enum_reflection.h>
32 #include <google/protobuf/unknown_field_set.h>
33 // @@protoc_insertion_point(includes)
34
35 namespace google {
36 namespace protobuf {
37
38 // Internal implementation detail -- do not call these.
39 void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fstruct_2eproto();
40 void protobuf_AssignDesc_google_2fprotobuf_2fstruct_2eproto();
41 void protobuf_ShutdownFile_google_2fprotobuf_2fstruct_2eproto();
42
43 class ListValue;
44 class Struct;
45 class Value;
46
47 enum NullValue {
48 NULL_VALUE = 0,
49 NullValue_INT_MIN_SENTINEL_DO_NOT_USE_ = ::google::protobuf::kint32min,
50 NullValue_INT_MAX_SENTINEL_DO_NOT_USE_ = ::google::protobuf::kint32max
51 };
52 LIBPROTOBUF_EXPORT bool NullValue_IsValid(int value);
53 const NullValue NullValue_MIN = NULL_VALUE;
54 const NullValue NullValue_MAX = NULL_VALUE;
55 const int NullValue_ARRAYSIZE = NullValue_MAX + 1;
56
57 LIBPROTOBUF_EXPORT const ::google::protobuf::EnumDescriptor* NullValue_descriptor();
NullValue_Name(NullValue value)58 inline const ::std::string& NullValue_Name(NullValue value) {
59 return ::google::protobuf::internal::NameOfEnum(
60 NullValue_descriptor(), value);
61 }
NullValue_Parse(const::std::string & name,NullValue * value)62 inline bool NullValue_Parse(
63 const ::std::string& name, NullValue* value) {
64 return ::google::protobuf::internal::ParseNamedEnum<NullValue>(
65 NullValue_descriptor(), name, value);
66 }
67 // ===================================================================
68
69 class LIBPROTOBUF_EXPORT Struct : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Struct) */ {
70 public:
71 Struct();
72 virtual ~Struct();
73
74 Struct(const Struct& from);
75
76 inline Struct& operator=(const Struct& from) {
77 CopyFrom(from);
78 return *this;
79 }
80
81 static const ::google::protobuf::Descriptor* descriptor();
82 static const Struct& default_instance();
83
84 void Swap(Struct* other);
85
86 // implements Message ----------------------------------------------
87
New()88 inline Struct* New() const { return New(NULL); }
89
90 Struct* New(::google::protobuf::Arena* arena) const;
91 void CopyFrom(const ::google::protobuf::Message& from);
92 void MergeFrom(const ::google::protobuf::Message& from);
93 void CopyFrom(const Struct& from);
94 void MergeFrom(const Struct& from);
95 void Clear();
96 bool IsInitialized() const;
97
98 int ByteSize() const;
99 bool MergePartialFromCodedStream(
100 ::google::protobuf::io::CodedInputStream* input);
101 void SerializeWithCachedSizes(
102 ::google::protobuf::io::CodedOutputStream* output) const;
103 ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
104 bool deterministic, ::google::protobuf::uint8* output) const;
SerializeWithCachedSizesToArray(::google::protobuf::uint8 * output)105 ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const {
106 return InternalSerializeWithCachedSizesToArray(false, output);
107 }
GetCachedSize()108 int GetCachedSize() const { return _cached_size_; }
109 private:
110 void SharedCtor();
111 void SharedDtor();
112 void SetCachedSize(int size) const;
113 void InternalSwap(Struct* other);
114 private:
GetArenaNoVirtual()115 inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
116 return _internal_metadata_.arena();
117 }
MaybeArenaPtr()118 inline void* MaybeArenaPtr() const {
119 return _internal_metadata_.raw_arena_ptr();
120 }
121 public:
122
123 ::google::protobuf::Metadata GetMetadata() const;
124
125 // nested types ----------------------------------------------------
126
127
128 // accessors -------------------------------------------------------
129
130 // map<string, .google.protobuf.Value> fields = 1;
131 int fields_size() const;
132 void clear_fields();
133 static const int kFieldsFieldNumber = 1;
134 const ::google::protobuf::Map< ::std::string, ::google::protobuf::Value >&
135 fields() const;
136 ::google::protobuf::Map< ::std::string, ::google::protobuf::Value >*
137 mutable_fields();
138
139 // @@protoc_insertion_point(class_scope:google.protobuf.Struct)
140 private:
141
142 ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
143 bool _is_default_instance_;
144 typedef ::google::protobuf::internal::MapEntryLite<
145 ::std::string, ::google::protobuf::Value,
146 ::google::protobuf::internal::WireFormatLite::TYPE_STRING,
147 ::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE,
148 0 >
149 Struct_FieldsEntry;
150 ::google::protobuf::internal::MapField<
151 ::std::string, ::google::protobuf::Value,
152 ::google::protobuf::internal::WireFormatLite::TYPE_STRING,
153 ::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE,
154 0 > fields_;
155 mutable int _cached_size_;
156 friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fstruct_2eproto();
157 friend void protobuf_AssignDesc_google_2fprotobuf_2fstruct_2eproto();
158 friend void protobuf_ShutdownFile_google_2fprotobuf_2fstruct_2eproto();
159
160 void InitAsDefaultInstance();
161 static Struct* default_instance_;
162 };
163 // -------------------------------------------------------------------
164
165 class LIBPROTOBUF_EXPORT Value : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Value) */ {
166 public:
167 Value();
168 virtual ~Value();
169
170 Value(const Value& from);
171
172 inline Value& operator=(const Value& from) {
173 CopyFrom(from);
174 return *this;
175 }
176
177 static const ::google::protobuf::Descriptor* descriptor();
178 static const Value& default_instance();
179
180 enum KindCase {
181 kNullValue = 1,
182 kNumberValue = 2,
183 kStringValue = 3,
184 kBoolValue = 4,
185 kStructValue = 5,
186 kListValue = 6,
187 KIND_NOT_SET = 0,
188 };
189
190 void Swap(Value* other);
191
192 // implements Message ----------------------------------------------
193
New()194 inline Value* New() const { return New(NULL); }
195
196 Value* New(::google::protobuf::Arena* arena) const;
197 void CopyFrom(const ::google::protobuf::Message& from);
198 void MergeFrom(const ::google::protobuf::Message& from);
199 void CopyFrom(const Value& from);
200 void MergeFrom(const Value& from);
201 void Clear();
202 bool IsInitialized() const;
203
204 int ByteSize() const;
205 bool MergePartialFromCodedStream(
206 ::google::protobuf::io::CodedInputStream* input);
207 void SerializeWithCachedSizes(
208 ::google::protobuf::io::CodedOutputStream* output) const;
209 ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
210 bool deterministic, ::google::protobuf::uint8* output) const;
SerializeWithCachedSizesToArray(::google::protobuf::uint8 * output)211 ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const {
212 return InternalSerializeWithCachedSizesToArray(false, output);
213 }
GetCachedSize()214 int GetCachedSize() const { return _cached_size_; }
215 private:
216 void SharedCtor();
217 void SharedDtor();
218 void SetCachedSize(int size) const;
219 void InternalSwap(Value* other);
220 private:
GetArenaNoVirtual()221 inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
222 return _internal_metadata_.arena();
223 }
MaybeArenaPtr()224 inline void* MaybeArenaPtr() const {
225 return _internal_metadata_.raw_arena_ptr();
226 }
227 public:
228
229 ::google::protobuf::Metadata GetMetadata() const;
230
231 // nested types ----------------------------------------------------
232
233 // accessors -------------------------------------------------------
234
235 // optional .google.protobuf.NullValue null_value = 1;
236 private:
237 bool has_null_value() const;
238 public:
239 void clear_null_value();
240 static const int kNullValueFieldNumber = 1;
241 ::google::protobuf::NullValue null_value() const;
242 void set_null_value(::google::protobuf::NullValue value);
243
244 // optional double number_value = 2;
245 private:
246 bool has_number_value() const;
247 public:
248 void clear_number_value();
249 static const int kNumberValueFieldNumber = 2;
250 double number_value() const;
251 void set_number_value(double value);
252
253 // optional string string_value = 3;
254 private:
255 bool has_string_value() const;
256 public:
257 void clear_string_value();
258 static const int kStringValueFieldNumber = 3;
259 const ::std::string& string_value() const;
260 void set_string_value(const ::std::string& value);
261 void set_string_value(const char* value);
262 void set_string_value(const char* value, size_t size);
263 ::std::string* mutable_string_value();
264 ::std::string* release_string_value();
265 void set_allocated_string_value(::std::string* string_value);
266
267 // optional bool bool_value = 4;
268 private:
269 bool has_bool_value() const;
270 public:
271 void clear_bool_value();
272 static const int kBoolValueFieldNumber = 4;
273 bool bool_value() const;
274 void set_bool_value(bool value);
275
276 // optional .google.protobuf.Struct struct_value = 5;
277 bool has_struct_value() const;
278 void clear_struct_value();
279 static const int kStructValueFieldNumber = 5;
280 const ::google::protobuf::Struct& struct_value() const;
281 ::google::protobuf::Struct* mutable_struct_value();
282 ::google::protobuf::Struct* release_struct_value();
283 void set_allocated_struct_value(::google::protobuf::Struct* struct_value);
284
285 // optional .google.protobuf.ListValue list_value = 6;
286 bool has_list_value() const;
287 void clear_list_value();
288 static const int kListValueFieldNumber = 6;
289 const ::google::protobuf::ListValue& list_value() const;
290 ::google::protobuf::ListValue* mutable_list_value();
291 ::google::protobuf::ListValue* release_list_value();
292 void set_allocated_list_value(::google::protobuf::ListValue* list_value);
293
294 KindCase kind_case() const;
295 // @@protoc_insertion_point(class_scope:google.protobuf.Value)
296 private:
297 inline void set_has_null_value();
298 inline void set_has_number_value();
299 inline void set_has_string_value();
300 inline void set_has_bool_value();
301 inline void set_has_struct_value();
302 inline void set_has_list_value();
303
304 inline bool has_kind() const;
305 void clear_kind();
306 inline void clear_has_kind();
307
308 ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
309 bool _is_default_instance_;
310 union KindUnion {
KindUnion()311 KindUnion() {}
312 int null_value_;
313 double number_value_;
314 ::google::protobuf::internal::ArenaStringPtr string_value_;
315 bool bool_value_;
316 ::google::protobuf::Struct* struct_value_;
317 ::google::protobuf::ListValue* list_value_;
318 } kind_;
319 mutable int _cached_size_;
320 ::google::protobuf::uint32 _oneof_case_[1];
321
322 friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fstruct_2eproto();
323 friend void protobuf_AssignDesc_google_2fprotobuf_2fstruct_2eproto();
324 friend void protobuf_ShutdownFile_google_2fprotobuf_2fstruct_2eproto();
325
326 void InitAsDefaultInstance();
327 static Value* default_instance_;
328 };
329 // -------------------------------------------------------------------
330
331 class LIBPROTOBUF_EXPORT ListValue : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.ListValue) */ {
332 public:
333 ListValue();
334 virtual ~ListValue();
335
336 ListValue(const ListValue& from);
337
338 inline ListValue& operator=(const ListValue& from) {
339 CopyFrom(from);
340 return *this;
341 }
342
343 static const ::google::protobuf::Descriptor* descriptor();
344 static const ListValue& default_instance();
345
346 void Swap(ListValue* other);
347
348 // implements Message ----------------------------------------------
349
New()350 inline ListValue* New() const { return New(NULL); }
351
352 ListValue* New(::google::protobuf::Arena* arena) const;
353 void CopyFrom(const ::google::protobuf::Message& from);
354 void MergeFrom(const ::google::protobuf::Message& from);
355 void CopyFrom(const ListValue& from);
356 void MergeFrom(const ListValue& from);
357 void Clear();
358 bool IsInitialized() const;
359
360 int ByteSize() const;
361 bool MergePartialFromCodedStream(
362 ::google::protobuf::io::CodedInputStream* input);
363 void SerializeWithCachedSizes(
364 ::google::protobuf::io::CodedOutputStream* output) const;
365 ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
366 bool deterministic, ::google::protobuf::uint8* output) const;
SerializeWithCachedSizesToArray(::google::protobuf::uint8 * output)367 ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const {
368 return InternalSerializeWithCachedSizesToArray(false, output);
369 }
GetCachedSize()370 int GetCachedSize() const { return _cached_size_; }
371 private:
372 void SharedCtor();
373 void SharedDtor();
374 void SetCachedSize(int size) const;
375 void InternalSwap(ListValue* other);
376 private:
GetArenaNoVirtual()377 inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
378 return _internal_metadata_.arena();
379 }
MaybeArenaPtr()380 inline void* MaybeArenaPtr() const {
381 return _internal_metadata_.raw_arena_ptr();
382 }
383 public:
384
385 ::google::protobuf::Metadata GetMetadata() const;
386
387 // nested types ----------------------------------------------------
388
389 // accessors -------------------------------------------------------
390
391 // repeated .google.protobuf.Value values = 1;
392 int values_size() const;
393 void clear_values();
394 static const int kValuesFieldNumber = 1;
395 const ::google::protobuf::Value& values(int index) const;
396 ::google::protobuf::Value* mutable_values(int index);
397 ::google::protobuf::Value* add_values();
398 ::google::protobuf::RepeatedPtrField< ::google::protobuf::Value >*
399 mutable_values();
400 const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Value >&
401 values() const;
402
403 // @@protoc_insertion_point(class_scope:google.protobuf.ListValue)
404 private:
405
406 ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
407 bool _is_default_instance_;
408 ::google::protobuf::RepeatedPtrField< ::google::protobuf::Value > values_;
409 mutable int _cached_size_;
410 friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fstruct_2eproto();
411 friend void protobuf_AssignDesc_google_2fprotobuf_2fstruct_2eproto();
412 friend void protobuf_ShutdownFile_google_2fprotobuf_2fstruct_2eproto();
413
414 void InitAsDefaultInstance();
415 static ListValue* default_instance_;
416 };
417 // ===================================================================
418
419
420 // ===================================================================
421
422 #if !PROTOBUF_INLINE_NOT_IN_HEADERS
423 // Struct
424
425 // map<string, .google.protobuf.Value> fields = 1;
fields_size()426 inline int Struct::fields_size() const {
427 return fields_.size();
428 }
clear_fields()429 inline void Struct::clear_fields() {
430 fields_.Clear();
431 }
432 inline const ::google::protobuf::Map< ::std::string, ::google::protobuf::Value >&
fields()433 Struct::fields() const {
434 // @@protoc_insertion_point(field_map:google.protobuf.Struct.fields)
435 return fields_.GetMap();
436 }
437 inline ::google::protobuf::Map< ::std::string, ::google::protobuf::Value >*
mutable_fields()438 Struct::mutable_fields() {
439 // @@protoc_insertion_point(field_mutable_map:google.protobuf.Struct.fields)
440 return fields_.MutableMap();
441 }
442
443 // -------------------------------------------------------------------
444
445 // Value
446
447 // optional .google.protobuf.NullValue null_value = 1;
has_null_value()448 inline bool Value::has_null_value() const {
449 return kind_case() == kNullValue;
450 }
set_has_null_value()451 inline void Value::set_has_null_value() {
452 _oneof_case_[0] = kNullValue;
453 }
clear_null_value()454 inline void Value::clear_null_value() {
455 if (has_null_value()) {
456 kind_.null_value_ = 0;
457 clear_has_kind();
458 }
459 }
null_value()460 inline ::google::protobuf::NullValue Value::null_value() const {
461 // @@protoc_insertion_point(field_get:google.protobuf.Value.null_value)
462 if (has_null_value()) {
463 return static_cast< ::google::protobuf::NullValue >(kind_.null_value_);
464 }
465 return static_cast< ::google::protobuf::NullValue >(0);
466 }
set_null_value(::google::protobuf::NullValue value)467 inline void Value::set_null_value(::google::protobuf::NullValue value) {
468 if (!has_null_value()) {
469 clear_kind();
470 set_has_null_value();
471 }
472 kind_.null_value_ = value;
473 // @@protoc_insertion_point(field_set:google.protobuf.Value.null_value)
474 }
475
476 // optional double number_value = 2;
has_number_value()477 inline bool Value::has_number_value() const {
478 return kind_case() == kNumberValue;
479 }
set_has_number_value()480 inline void Value::set_has_number_value() {
481 _oneof_case_[0] = kNumberValue;
482 }
clear_number_value()483 inline void Value::clear_number_value() {
484 if (has_number_value()) {
485 kind_.number_value_ = 0;
486 clear_has_kind();
487 }
488 }
number_value()489 inline double Value::number_value() const {
490 // @@protoc_insertion_point(field_get:google.protobuf.Value.number_value)
491 if (has_number_value()) {
492 return kind_.number_value_;
493 }
494 return 0;
495 }
set_number_value(double value)496 inline void Value::set_number_value(double value) {
497 if (!has_number_value()) {
498 clear_kind();
499 set_has_number_value();
500 }
501 kind_.number_value_ = value;
502 // @@protoc_insertion_point(field_set:google.protobuf.Value.number_value)
503 }
504
505 // optional string string_value = 3;
has_string_value()506 inline bool Value::has_string_value() const {
507 return kind_case() == kStringValue;
508 }
set_has_string_value()509 inline void Value::set_has_string_value() {
510 _oneof_case_[0] = kStringValue;
511 }
clear_string_value()512 inline void Value::clear_string_value() {
513 if (has_string_value()) {
514 kind_.string_value_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
515 clear_has_kind();
516 }
517 }
string_value()518 inline const ::std::string& Value::string_value() const {
519 // @@protoc_insertion_point(field_get:google.protobuf.Value.string_value)
520 if (has_string_value()) {
521 return kind_.string_value_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
522 }
523 return *&::google::protobuf::internal::GetEmptyStringAlreadyInited();
524 }
set_string_value(const::std::string & value)525 inline void Value::set_string_value(const ::std::string& value) {
526 // @@protoc_insertion_point(field_set:google.protobuf.Value.string_value)
527 if (!has_string_value()) {
528 clear_kind();
529 set_has_string_value();
530 kind_.string_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
531 }
532 kind_.string_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
533 // @@protoc_insertion_point(field_set:google.protobuf.Value.string_value)
534 }
set_string_value(const char * value)535 inline void Value::set_string_value(const char* value) {
536 if (!has_string_value()) {
537 clear_kind();
538 set_has_string_value();
539 kind_.string_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
540 }
541 kind_.string_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
542 ::std::string(value));
543 // @@protoc_insertion_point(field_set_char:google.protobuf.Value.string_value)
544 }
set_string_value(const char * value,size_t size)545 inline void Value::set_string_value(const char* value, size_t size) {
546 if (!has_string_value()) {
547 clear_kind();
548 set_has_string_value();
549 kind_.string_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
550 }
551 kind_.string_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(
552 reinterpret_cast<const char*>(value), size));
553 // @@protoc_insertion_point(field_set_pointer:google.protobuf.Value.string_value)
554 }
mutable_string_value()555 inline ::std::string* Value::mutable_string_value() {
556 if (!has_string_value()) {
557 clear_kind();
558 set_has_string_value();
559 kind_.string_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
560 }
561 // @@protoc_insertion_point(field_mutable:google.protobuf.Value.string_value)
562 return kind_.string_value_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
563 }
release_string_value()564 inline ::std::string* Value::release_string_value() {
565 // @@protoc_insertion_point(field_release:google.protobuf.Value.string_value)
566 if (has_string_value()) {
567 clear_has_kind();
568 return kind_.string_value_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
569 } else {
570 return NULL;
571 }
572 }
set_allocated_string_value(::std::string * string_value)573 inline void Value::set_allocated_string_value(::std::string* string_value) {
574 if (!has_string_value()) {
575 kind_.string_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
576 }
577 clear_kind();
578 if (string_value != NULL) {
579 set_has_string_value();
580 kind_.string_value_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
581 string_value);
582 }
583 // @@protoc_insertion_point(field_set_allocated:google.protobuf.Value.string_value)
584 }
585
586 // optional bool bool_value = 4;
has_bool_value()587 inline bool Value::has_bool_value() const {
588 return kind_case() == kBoolValue;
589 }
set_has_bool_value()590 inline void Value::set_has_bool_value() {
591 _oneof_case_[0] = kBoolValue;
592 }
clear_bool_value()593 inline void Value::clear_bool_value() {
594 if (has_bool_value()) {
595 kind_.bool_value_ = false;
596 clear_has_kind();
597 }
598 }
bool_value()599 inline bool Value::bool_value() const {
600 // @@protoc_insertion_point(field_get:google.protobuf.Value.bool_value)
601 if (has_bool_value()) {
602 return kind_.bool_value_;
603 }
604 return false;
605 }
set_bool_value(bool value)606 inline void Value::set_bool_value(bool value) {
607 if (!has_bool_value()) {
608 clear_kind();
609 set_has_bool_value();
610 }
611 kind_.bool_value_ = value;
612 // @@protoc_insertion_point(field_set:google.protobuf.Value.bool_value)
613 }
614
615 // optional .google.protobuf.Struct struct_value = 5;
has_struct_value()616 inline bool Value::has_struct_value() const {
617 return kind_case() == kStructValue;
618 }
set_has_struct_value()619 inline void Value::set_has_struct_value() {
620 _oneof_case_[0] = kStructValue;
621 }
clear_struct_value()622 inline void Value::clear_struct_value() {
623 if (has_struct_value()) {
624 delete kind_.struct_value_;
625 clear_has_kind();
626 }
627 }
struct_value()628 inline const ::google::protobuf::Struct& Value::struct_value() const {
629 // @@protoc_insertion_point(field_get:google.protobuf.Value.struct_value)
630 return has_struct_value()
631 ? *kind_.struct_value_
632 : ::google::protobuf::Struct::default_instance();
633 }
mutable_struct_value()634 inline ::google::protobuf::Struct* Value::mutable_struct_value() {
635 if (!has_struct_value()) {
636 clear_kind();
637 set_has_struct_value();
638 kind_.struct_value_ = new ::google::protobuf::Struct;
639 }
640 // @@protoc_insertion_point(field_mutable:google.protobuf.Value.struct_value)
641 return kind_.struct_value_;
642 }
release_struct_value()643 inline ::google::protobuf::Struct* Value::release_struct_value() {
644 // @@protoc_insertion_point(field_release:google.protobuf.Value.struct_value)
645 if (has_struct_value()) {
646 clear_has_kind();
647 ::google::protobuf::Struct* temp = kind_.struct_value_;
648 kind_.struct_value_ = NULL;
649 return temp;
650 } else {
651 return NULL;
652 }
653 }
set_allocated_struct_value(::google::protobuf::Struct * struct_value)654 inline void Value::set_allocated_struct_value(::google::protobuf::Struct* struct_value) {
655 clear_kind();
656 if (struct_value) {
657 set_has_struct_value();
658 kind_.struct_value_ = struct_value;
659 }
660 // @@protoc_insertion_point(field_set_allocated:google.protobuf.Value.struct_value)
661 }
662
663 // optional .google.protobuf.ListValue list_value = 6;
has_list_value()664 inline bool Value::has_list_value() const {
665 return kind_case() == kListValue;
666 }
set_has_list_value()667 inline void Value::set_has_list_value() {
668 _oneof_case_[0] = kListValue;
669 }
clear_list_value()670 inline void Value::clear_list_value() {
671 if (has_list_value()) {
672 delete kind_.list_value_;
673 clear_has_kind();
674 }
675 }
list_value()676 inline const ::google::protobuf::ListValue& Value::list_value() const {
677 // @@protoc_insertion_point(field_get:google.protobuf.Value.list_value)
678 return has_list_value()
679 ? *kind_.list_value_
680 : ::google::protobuf::ListValue::default_instance();
681 }
mutable_list_value()682 inline ::google::protobuf::ListValue* Value::mutable_list_value() {
683 if (!has_list_value()) {
684 clear_kind();
685 set_has_list_value();
686 kind_.list_value_ = new ::google::protobuf::ListValue;
687 }
688 // @@protoc_insertion_point(field_mutable:google.protobuf.Value.list_value)
689 return kind_.list_value_;
690 }
release_list_value()691 inline ::google::protobuf::ListValue* Value::release_list_value() {
692 // @@protoc_insertion_point(field_release:google.protobuf.Value.list_value)
693 if (has_list_value()) {
694 clear_has_kind();
695 ::google::protobuf::ListValue* temp = kind_.list_value_;
696 kind_.list_value_ = NULL;
697 return temp;
698 } else {
699 return NULL;
700 }
701 }
set_allocated_list_value(::google::protobuf::ListValue * list_value)702 inline void Value::set_allocated_list_value(::google::protobuf::ListValue* list_value) {
703 clear_kind();
704 if (list_value) {
705 set_has_list_value();
706 kind_.list_value_ = list_value;
707 }
708 // @@protoc_insertion_point(field_set_allocated:google.protobuf.Value.list_value)
709 }
710
has_kind()711 inline bool Value::has_kind() const {
712 return kind_case() != KIND_NOT_SET;
713 }
clear_has_kind()714 inline void Value::clear_has_kind() {
715 _oneof_case_[0] = KIND_NOT_SET;
716 }
kind_case()717 inline Value::KindCase Value::kind_case() const {
718 return Value::KindCase(_oneof_case_[0]);
719 }
720 // -------------------------------------------------------------------
721
722 // ListValue
723
724 // repeated .google.protobuf.Value values = 1;
values_size()725 inline int ListValue::values_size() const {
726 return values_.size();
727 }
clear_values()728 inline void ListValue::clear_values() {
729 values_.Clear();
730 }
values(int index)731 inline const ::google::protobuf::Value& ListValue::values(int index) const {
732 // @@protoc_insertion_point(field_get:google.protobuf.ListValue.values)
733 return values_.Get(index);
734 }
mutable_values(int index)735 inline ::google::protobuf::Value* ListValue::mutable_values(int index) {
736 // @@protoc_insertion_point(field_mutable:google.protobuf.ListValue.values)
737 return values_.Mutable(index);
738 }
add_values()739 inline ::google::protobuf::Value* ListValue::add_values() {
740 // @@protoc_insertion_point(field_add:google.protobuf.ListValue.values)
741 return values_.Add();
742 }
743 inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::Value >*
mutable_values()744 ListValue::mutable_values() {
745 // @@protoc_insertion_point(field_mutable_list:google.protobuf.ListValue.values)
746 return &values_;
747 }
748 inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Value >&
values()749 ListValue::values() const {
750 // @@protoc_insertion_point(field_list:google.protobuf.ListValue.values)
751 return values_;
752 }
753
754 #endif // !PROTOBUF_INLINE_NOT_IN_HEADERS
755 // -------------------------------------------------------------------
756
757 // -------------------------------------------------------------------
758
759
760 // @@protoc_insertion_point(namespace_scope)
761
762 } // namespace protobuf
763 } // namespace google
764
765 #ifndef SWIG
766 namespace google {
767 namespace protobuf {
768
769 template <> struct is_proto_enum< ::google::protobuf::NullValue> : ::google::protobuf::internal::true_type {};
770 template <>
771 inline const EnumDescriptor* GetEnumDescriptor< ::google::protobuf::NullValue>() {
772 return ::google::protobuf::NullValue_descriptor();
773 }
774
775 } // namespace protobuf
776 } // namespace google
777 #endif // SWIG
778
779 // @@protoc_insertion_point(global_scope)
780
781 #endif // PROTOBUF_google_2fprotobuf_2fstruct_2eproto__INCLUDED
782