diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 305771b..6ffad04 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -1,7 +1,7 @@ ### Description -Version: `1.0.0-beta4` +Version: `1.0.3` diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index a8b0ce8..7d81687 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,7 +1,7 @@ ### Description -- Version: `1.0.0-beta4` +- Version: `1.0.3` - Filed By: @sgammon - Linked Issue: `Bloombox/OpenCannabis#1` diff --git a/README.md b/README.md index 09d5f65..5eed09f 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # OpenCannabis -## Release __1.0.0-beta4__ +## Release __1.0.3__ _An Open Model for the Legal Cannabis Industry_ diff --git a/languages/cpp/Product.pb.cc b/languages/cpp/Product.pb.cc index 8891087..0e32116 100644 --- a/languages/cpp/Product.pb.cc +++ b/languages/cpp/Product.pb.cc @@ -16,7 +16,10 @@ #include #include // @@protoc_insertion_point(includes) -class ProductDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed { +class ProductDefaultTypeInternal { +public: + ::google::protobuf::internal::ExplicitlyConstructed + _instance; } _Product_default_instance_; namespace protobuf_Product_2eproto { @@ -29,20 +32,20 @@ ::google::protobuf::Metadata file_level_metadata[1]; } // namespace PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::ParseTableField - const TableStruct::entries[] = { + const TableStruct::entries[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { {0, 0, 0, ::google::protobuf::internal::kInvalidMask, 0, 0}, }; PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::AuxillaryParseTableField - const TableStruct::aux[] = { + const TableStruct::aux[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { ::google::protobuf::internal::AuxillaryParseTableField(), }; PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::ParseTable const - TableStruct::schema[] = { - { NULL, NULL, 0, -1, -1, false }, + TableStruct::schema[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + { NULL, NULL, 0, -1, -1, -1, -1, NULL, false }, }; -const ::google::protobuf::uint32 TableStruct::offsets[] = { +const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Product, _internal_metadata_), ~0u, // no _extensions_ @@ -52,8 +55,7 @@ const ::google::protobuf::uint32 TableStruct::offsets[] = { GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Product, type_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Product, data_), }; - -static const ::google::protobuf::internal::MigrationSchema schemas[] = { +static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { { 0, -1, sizeof(Product)}, }; @@ -83,12 +85,6 @@ void protobuf_RegisterTypes(const ::std::string&) { } } // namespace - -void TableStruct::Shutdown() { - _Product_default_instance_.Shutdown(); - delete file_level_metadata[0].reflection; -} - void TableStruct::InitDefaultsImpl() { GOOGLE_PROTOBUF_VERIFY_VERSION; @@ -96,12 +92,13 @@ void TableStruct::InitDefaultsImpl() { ::protobuf_base_2fProductKey_2eproto::InitDefaults(); ::protobuf_base_2fProductType_2eproto::InitDefaults(); ::google::protobuf::protobuf_google_2fprotobuf_2fany_2eproto::InitDefaults(); - _Product_default_instance_.DefaultConstruct(); - _Product_default_instance_.get_mutable()->key_ = const_cast< ::ProductKey*>( + _Product_default_instance_._instance.DefaultConstruct(); + ::google::protobuf::internal::OnShutdownDestroyMessage( + &_Product_default_instance_);_Product_default_instance_._instance.get_mutable()->key_ = const_cast< ::ProductKey*>( ::ProductKey::internal_default_instance()); - _Product_default_instance_.get_mutable()->type_ = const_cast< ::ProductType*>( + _Product_default_instance_._instance.get_mutable()->type_ = const_cast< ::ProductType*>( ::ProductType::internal_default_instance()); - _Product_default_instance_.get_mutable()->data_ = const_cast< ::google::protobuf::Any*>( + _Product_default_instance_._instance.get_mutable()->data_ = const_cast< ::google::protobuf::Any*>( ::google::protobuf::Any::internal_default_instance()); } @@ -109,9 +106,10 @@ void InitDefaults() { static GOOGLE_PROTOBUF_DECLARE_ONCE(once); ::google::protobuf::GoogleOnceInit(&once, &TableStruct::InitDefaultsImpl); } +namespace { void AddDescriptorsImpl() { InitDefaults(); - static const char descriptor[] = { + static const char descriptor[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { "\n\rProduct.proto\032\025base/ProductKey.proto\032\026" "base/ProductType.proto\032\031google/protobuf/" "any.proto\"c\n\007Product\022\030\n\003key\030\001 \001(\0132\013.Prod" @@ -127,14 +125,14 @@ void AddDescriptorsImpl() { ::protobuf_base_2fProductKey_2eproto::AddDescriptors(); ::protobuf_base_2fProductType_2eproto::AddDescriptors(); ::google::protobuf::protobuf_google_2fprotobuf_2fany_2eproto::AddDescriptors(); - ::google::protobuf::internal::OnShutdown(&TableStruct::Shutdown); } +} // anonymous namespace void AddDescriptors() { static GOOGLE_PROTOBUF_DECLARE_ONCE(once); ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl); } -// Force AddDescriptors() to be called at static initialization time. +// Force AddDescriptors() to be called at dynamic initialization time. struct StaticDescriptorInitializer { StaticDescriptorInitializer() { AddDescriptors(); @@ -290,9 +288,7 @@ Product::Product() Product::Product(::google::protobuf::Arena* arena) : ::google::protobuf::Message(), _internal_metadata_(arena) { -#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER protobuf_Product_2eproto::InitDefaults(); -#endif // GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:Product) @@ -321,8 +317,9 @@ Product::Product(const Product& from) } void Product::SharedCtor() { - ::memset(&key_, 0, reinterpret_cast(&data_) - - reinterpret_cast(&key_) + sizeof(data_)); + ::memset(&key_, 0, static_cast( + reinterpret_cast(&data_) - + reinterpret_cast(&key_)) + sizeof(data_)); _cached_size_ = 0; } @@ -333,19 +330,14 @@ Product::~Product() { void Product::SharedDtor() { ::google::protobuf::Arena* arena = GetArenaNoVirtual(); + GOOGLE_DCHECK(arena == NULL); if (arena != NULL) { return; } - if (this != internal_default_instance()) { - delete key_; - } - if (this != internal_default_instance()) { - delete type_; - } - if (this != internal_default_instance()) { - delete data_; - } + if (this != internal_default_instance()) delete key_; + if (this != internal_default_instance()) delete type_; + if (this != internal_default_instance()) delete data_; } void Product::ArenaDtor(void* object) { @@ -375,6 +367,10 @@ Product* Product::New(::google::protobuf::Arena* arena) const { void Product::Clear() { // @@protoc_insertion_point(message_clear_start:Product) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + if (GetArenaNoVirtual() == NULL && key_ != NULL) { delete key_; } @@ -387,6 +383,7 @@ void Product::Clear() { delete data_; } data_ = NULL; + _internal_metadata_.Clear(); } bool Product::MergePartialFromCodedStream( @@ -402,7 +399,7 @@ bool Product::MergePartialFromCodedStream( // .ProductKey key = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(10u)) { + static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, mutable_key())); } else { @@ -414,7 +411,7 @@ bool Product::MergePartialFromCodedStream( // .ProductType type = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(18u)) { + static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, mutable_type())); } else { @@ -426,7 +423,7 @@ bool Product::MergePartialFromCodedStream( // .google.protobuf.Any data = 3; case 3: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(26u)) { + static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, mutable_data())); } else { @@ -437,12 +434,11 @@ bool Product::MergePartialFromCodedStream( default: { handle_unusual: - if (tag == 0 || - ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + if (tag == 0) { goto success; } - DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } @@ -480,6 +476,10 @@ void Product::SerializeWithCachedSizes( 3, *this->data_, output); } + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); + } // @@protoc_insertion_point(serialize_end:Product) } @@ -511,6 +511,10 @@ ::google::protobuf::uint8* Product::InternalSerializeWithCachedSizesToArray( 3, *this->data_, deterministic, target); } + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); + } // @@protoc_insertion_point(serialize_to_array_end:Product) return target; } @@ -519,6 +523,11 @@ size_t Product::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:Product) size_t total_size = 0; + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); + } // .ProductKey key = 1; if (this->has_key()) { total_size += 1 + @@ -618,10 +627,12 @@ void Product::UnsafeArenaSwap(Product* other) { InternalSwap(other); } void Product::InternalSwap(Product* other) { - std::swap(key_, other->key_); - std::swap(type_, other->type_); - std::swap(data_, other->data_); - std::swap(_cached_size_, other->_cached_size_); + using std::swap; + swap(key_, other->key_); + swap(type_, other->type_); + swap(data_, other->data_); + _internal_metadata_.Swap(&other->_internal_metadata_); + swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata Product::GetMetadata() const { @@ -641,9 +652,10 @@ void Product::clear_key() { key_ = NULL; } const ::ProductKey& Product::key() const { + const ::ProductKey* p = key_; // @@protoc_insertion_point(field_get:Product.key) - return key_ != NULL ? *key_ - : *::ProductKey::internal_default_instance(); + return p != NULL ? *p : *reinterpret_cast( + &::_ProductKey_default_instance_); } ::ProductKey* Product::mutable_key() { @@ -690,9 +702,10 @@ void Product::clear_type() { type_ = NULL; } const ::ProductType& Product::type() const { + const ::ProductType* p = type_; // @@protoc_insertion_point(field_get:Product.type) - return type_ != NULL ? *type_ - : *::ProductType::internal_default_instance(); + return p != NULL ? *p : *reinterpret_cast( + &::_ProductType_default_instance_); } ::ProductType* Product::mutable_type() { @@ -739,9 +752,10 @@ void Product::clear_data() { data_ = NULL; } const ::google::protobuf::Any& Product::data() const { + const ::google::protobuf::Any* p = data_; // @@protoc_insertion_point(field_get:Product.data) - return data_ != NULL ? *data_ - : *::google::protobuf::Any::internal_default_instance(); + return p != NULL ? *p : *reinterpret_cast( + &::google::protobuf::_Any_default_instance_); } ::google::protobuf::Any* Product::mutable_data() { diff --git a/languages/cpp/Product.pb.h b/languages/cpp/Product.pb.h index f848139..c55d246 100644 --- a/languages/cpp/Product.pb.h +++ b/languages/cpp/Product.pb.h @@ -8,12 +8,12 @@ #include -#if GOOGLE_PROTOBUF_VERSION < 3003000 +#if GOOGLE_PROTOBUF_VERSION < 3004000 #error This file was generated by a newer version of protoc which is #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 3003002 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#if 3004000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION #error This file was generated by an older version of protoc which is #error incompatible with your Protocol Buffer headers. Please #error regenerate this file with a newer version of protoc. @@ -36,19 +36,6 @@ class Product; class ProductDefaultTypeInternal; extern ProductDefaultTypeInternal _Product_default_instance_; -class ProductKey; -class ProductKeyDefaultTypeInternal; -extern ProductKeyDefaultTypeInternal _ProductKey_default_instance_; -class ProductType; -class ProductTypeDefaultTypeInternal; -extern ProductTypeDefaultTypeInternal _ProductType_default_instance_; -namespace google { -namespace protobuf { -class Any; -class AnyDefaultTypeInternal; -extern AnyDefaultTypeInternal _Any_default_instance_; -} // namespace protobuf -} // namespace google namespace protobuf_Product_2eproto { // Internal implementation detail -- do not call these. @@ -57,8 +44,9 @@ struct TableStruct { static const ::google::protobuf::internal::AuxillaryParseTableField aux[]; static const ::google::protobuf::internal::ParseTable schema[]; static const ::google::protobuf::uint32 offsets[]; + static const ::google::protobuf::internal::FieldMetadata field_metadata[]; + static const ::google::protobuf::internal::SerializationTable serialization_table[]; static void InitDefaultsImpl(); - static void Shutdown(); }; void AddDescriptors(); void InitDefaults(); @@ -77,7 +65,21 @@ class Product : public ::google::protobuf::Message /* @@protoc_insertion_point(c CopyFrom(from); return *this; } + #if LANG_CXX11 + Product(Product&& from) noexcept + : Product() { + *this = ::std::move(from); + } + inline Product& operator=(Product&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif inline ::google::protobuf::Arena* GetArena() const PROTOBUF_FINAL { return GetArenaNoVirtual(); } @@ -96,6 +98,9 @@ class Product : public ::google::protobuf::Message /* @@protoc_insertion_point(c void UnsafeArenaSwap(Product* other); void Swap(Product* other); + friend void swap(Product& a, Product& b) { + a.Swap(&b); + } // implements Message ---------------------------------------------- @@ -198,7 +203,7 @@ class Product : public ::google::protobuf::Message /* @@protoc_insertion_point(c private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - friend class ::google::protobuf::Arena; + template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; ::ProductKey* key_; @@ -213,6 +218,10 @@ class Product : public ::google::protobuf::Message /* @@protoc_insertion_point(c // =================================================================== #if !PROTOBUF_INLINE_NOT_IN_HEADERS +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ // Product // .ProductKey key = 1; @@ -224,9 +233,10 @@ inline void Product::clear_key() { key_ = NULL; } inline const ::ProductKey& Product::key() const { + const ::ProductKey* p = key_; // @@protoc_insertion_point(field_get:Product.key) - return key_ != NULL ? *key_ - : *::ProductKey::internal_default_instance(); + return p != NULL ? *p : *reinterpret_cast( + &::_ProductKey_default_instance_); } inline ::ProductKey* Product::mutable_key() { @@ -273,9 +283,10 @@ inline void Product::clear_type() { type_ = NULL; } inline const ::ProductType& Product::type() const { + const ::ProductType* p = type_; // @@protoc_insertion_point(field_get:Product.type) - return type_ != NULL ? *type_ - : *::ProductType::internal_default_instance(); + return p != NULL ? *p : *reinterpret_cast( + &::_ProductType_default_instance_); } inline ::ProductType* Product::mutable_type() { @@ -322,9 +333,10 @@ inline void Product::clear_data() { data_ = NULL; } inline const ::google::protobuf::Any& Product::data() const { + const ::google::protobuf::Any* p = data_; // @@protoc_insertion_point(field_get:Product.data) - return data_ != NULL ? *data_ - : *::google::protobuf::Any::internal_default_instance(); + return p != NULL ? *p : *reinterpret_cast( + &::google::protobuf::_Any_default_instance_); } inline ::google::protobuf::Any* Product::mutable_data() { @@ -364,6 +376,9 @@ inline void Product::set_allocated_data(::google::protobuf::Any* data) { // @@protoc_insertion_point(field_set_allocated:Product.data) } +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ #endif // !PROTOBUF_INLINE_NOT_IN_HEADERS // @@protoc_insertion_point(namespace_scope) diff --git a/languages/cpp/base/Compression.pb.cc b/languages/cpp/base/Compression.pb.cc index 47df9cc..f7235d6 100644 --- a/languages/cpp/base/Compression.pb.cc +++ b/languages/cpp/base/Compression.pb.cc @@ -16,7 +16,10 @@ #include #include // @@protoc_insertion_point(includes) -class CompressionDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed { +class CompressionDefaultTypeInternal { +public: + ::google::protobuf::internal::ExplicitlyConstructed + _instance; } _Compression_default_instance_; namespace protobuf_base_2fCompression_2eproto { @@ -30,20 +33,20 @@ const ::google::protobuf::EnumDescriptor* file_level_enum_descriptors[1]; } // namespace PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::ParseTableField - const TableStruct::entries[] = { + const TableStruct::entries[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { {0, 0, 0, ::google::protobuf::internal::kInvalidMask, 0, 0}, }; PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::AuxillaryParseTableField - const TableStruct::aux[] = { + const TableStruct::aux[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { ::google::protobuf::internal::AuxillaryParseTableField(), }; PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::ParseTable const - TableStruct::schema[] = { - { NULL, NULL, 0, -1, -1, false }, + TableStruct::schema[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + { NULL, NULL, 0, -1, -1, -1, -1, NULL, false }, }; -const ::google::protobuf::uint32 TableStruct::offsets[] = { +const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Compression, _internal_metadata_), ~0u, // no _extensions_ @@ -52,8 +55,7 @@ const ::google::protobuf::uint32 TableStruct::offsets[] = { GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Compression, enabled_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Compression, type_), }; - -static const ::google::protobuf::internal::MigrationSchema schemas[] = { +static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { { 0, -1, sizeof(Compression)}, }; @@ -83,26 +85,22 @@ void protobuf_RegisterTypes(const ::std::string&) { } } // namespace - -void TableStruct::Shutdown() { - _Compression_default_instance_.Shutdown(); - delete file_level_metadata[0].reflection; -} - void TableStruct::InitDefaultsImpl() { GOOGLE_PROTOBUF_VERIFY_VERSION; ::google::protobuf::internal::InitProtobufDefaults(); - _Compression_default_instance_.DefaultConstruct(); -} + _Compression_default_instance_._instance.DefaultConstruct(); + ::google::protobuf::internal::OnShutdownDestroyMessage( + &_Compression_default_instance_);} void InitDefaults() { static GOOGLE_PROTOBUF_DECLARE_ONCE(once); ::google::protobuf::GoogleOnceInit(&once, &TableStruct::InitDefaultsImpl); } +namespace { void AddDescriptorsImpl() { InitDefaults(); - static const char descriptor[] = { + static const char descriptor[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { "\n\026base/Compression.proto\"Q\n\013Compression\022" "\017\n\007enabled\030\001 \001(\010\022\037\n\004type\030\002 \001(\0162\021.Compres" "sion.Type\"\020\n\004Type\022\010\n\004GZIP\020\000B1\n\027io.bloomb" @@ -113,14 +111,14 @@ void AddDescriptorsImpl() { descriptor, 166); ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( "base/Compression.proto", &protobuf_RegisterTypes); - ::google::protobuf::internal::OnShutdown(&TableStruct::Shutdown); } +} // anonymous namespace void AddDescriptors() { static GOOGLE_PROTOBUF_DECLARE_ONCE(once); ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl); } -// Force AddDescriptors() to be called at static initialization time. +// Force AddDescriptors() to be called at dynamic initialization time. struct StaticDescriptorInitializer { StaticDescriptorInitializer() { AddDescriptors(); @@ -167,9 +165,7 @@ Compression::Compression() Compression::Compression(::google::protobuf::Arena* arena) : ::google::protobuf::Message(), _internal_metadata_(arena) { -#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER protobuf_base_2fCompression_2eproto::InitDefaults(); -#endif // GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:Compression) @@ -180,14 +176,15 @@ Compression::Compression(const Compression& from) _cached_size_(0) { _internal_metadata_.MergeFrom(from._internal_metadata_); ::memcpy(&enabled_, &from.enabled_, - reinterpret_cast(&type_) - - reinterpret_cast(&enabled_) + sizeof(type_)); + static_cast(reinterpret_cast(&type_) - + reinterpret_cast(&enabled_)) + sizeof(type_)); // @@protoc_insertion_point(copy_constructor:Compression) } void Compression::SharedCtor() { - ::memset(&enabled_, 0, reinterpret_cast(&type_) - - reinterpret_cast(&enabled_) + sizeof(type_)); + ::memset(&enabled_, 0, static_cast( + reinterpret_cast(&type_) - + reinterpret_cast(&enabled_)) + sizeof(type_)); _cached_size_ = 0; } @@ -198,6 +195,7 @@ Compression::~Compression() { void Compression::SharedDtor() { ::google::protobuf::Arena* arena = GetArenaNoVirtual(); + GOOGLE_DCHECK(arena == NULL); if (arena != NULL) { return; } @@ -231,8 +229,14 @@ Compression* Compression::New(::google::protobuf::Arena* arena) const { void Compression::Clear() { // @@protoc_insertion_point(message_clear_start:Compression) - ::memset(&enabled_, 0, reinterpret_cast(&type_) - - reinterpret_cast(&enabled_) + sizeof(type_)); + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + ::memset(&enabled_, 0, static_cast( + reinterpret_cast(&type_) - + reinterpret_cast(&enabled_)) + sizeof(type_)); + _internal_metadata_.Clear(); } bool Compression::MergePartialFromCodedStream( @@ -248,7 +252,7 @@ bool Compression::MergePartialFromCodedStream( // bool enabled = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(8u)) { + static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) { DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( @@ -262,7 +266,7 @@ bool Compression::MergePartialFromCodedStream( // .Compression.Type type = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(16u)) { + static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) { int value; DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( @@ -276,12 +280,11 @@ bool Compression::MergePartialFromCodedStream( default: { handle_unusual: - if (tag == 0 || - ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + if (tag == 0) { goto success; } - DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } @@ -312,6 +315,10 @@ void Compression::SerializeWithCachedSizes( 2, this->type(), output); } + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); + } // @@protoc_insertion_point(serialize_end:Compression) } @@ -333,6 +340,10 @@ ::google::protobuf::uint8* Compression::InternalSerializeWithCachedSizesToArray( 2, this->type(), target); } + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); + } // @@protoc_insertion_point(serialize_to_array_end:Compression) return target; } @@ -341,6 +352,11 @@ size_t Compression::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:Compression) size_t total_size = 0; + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); + } // bool enabled = 1; if (this->enabled() != 0) { total_size += 1 + 1; @@ -427,9 +443,11 @@ void Compression::UnsafeArenaSwap(Compression* other) { InternalSwap(other); } void Compression::InternalSwap(Compression* other) { - std::swap(enabled_, other->enabled_); - std::swap(type_, other->type_); - std::swap(_cached_size_, other->_cached_size_); + using std::swap; + swap(enabled_, other->enabled_); + swap(type_, other->type_); + _internal_metadata_.Swap(&other->_internal_metadata_); + swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata Compression::GetMetadata() const { diff --git a/languages/cpp/base/Compression.pb.h b/languages/cpp/base/Compression.pb.h index 3b14f18..5bcbbf5 100644 --- a/languages/cpp/base/Compression.pb.h +++ b/languages/cpp/base/Compression.pb.h @@ -8,12 +8,12 @@ #include -#if GOOGLE_PROTOBUF_VERSION < 3003000 +#if GOOGLE_PROTOBUF_VERSION < 3004000 #error This file was generated by a newer version of protoc which is #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 3003002 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#if 3004000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION #error This file was generated by an older version of protoc which is #error incompatible with your Protocol Buffer headers. Please #error regenerate this file with a newer version of protoc. @@ -42,8 +42,9 @@ struct TableStruct { static const ::google::protobuf::internal::AuxillaryParseTableField aux[]; static const ::google::protobuf::internal::ParseTable schema[]; static const ::google::protobuf::uint32 offsets[]; + static const ::google::protobuf::internal::FieldMetadata field_metadata[]; + static const ::google::protobuf::internal::SerializationTable serialization_table[]; static void InitDefaultsImpl(); - static void Shutdown(); }; void AddDescriptors(); void InitDefaults(); @@ -82,7 +83,21 @@ class Compression : public ::google::protobuf::Message /* @@protoc_insertion_poi CopyFrom(from); return *this; } + #if LANG_CXX11 + Compression(Compression&& from) noexcept + : Compression() { + *this = ::std::move(from); + } + inline Compression& operator=(Compression&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif inline ::google::protobuf::Arena* GetArena() const PROTOBUF_FINAL { return GetArenaNoVirtual(); } @@ -101,6 +116,9 @@ class Compression : public ::google::protobuf::Message /* @@protoc_insertion_poi void UnsafeArenaSwap(Compression* other); void Swap(Compression* other); + friend void swap(Compression& a, Compression& b) { + a.Swap(&b); + } // implements Message ---------------------------------------------- @@ -187,7 +205,7 @@ class Compression : public ::google::protobuf::Message /* @@protoc_insertion_poi private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - friend class ::google::protobuf::Arena; + template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; bool enabled_; @@ -201,6 +219,10 @@ class Compression : public ::google::protobuf::Message /* @@protoc_insertion_poi // =================================================================== #if !PROTOBUF_INLINE_NOT_IN_HEADERS +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ // Compression // bool enabled = 1; @@ -231,12 +253,14 @@ inline void Compression::set_type(::Compression_Type value) { // @@protoc_insertion_point(field_set:Compression.type) } +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ #endif // !PROTOBUF_INLINE_NOT_IN_HEADERS // @@protoc_insertion_point(namespace_scope) -#ifndef SWIG namespace google { namespace protobuf { @@ -248,7 +272,6 @@ inline const EnumDescriptor* GetEnumDescriptor< ::Compression_Type>() { } // namespace protobuf } // namespace google -#endif // SWIG // @@protoc_insertion_point(global_scope) diff --git a/languages/cpp/base/Language.pb.cc b/languages/cpp/base/Language.pb.cc index 4a994a8..999bcb2 100644 --- a/languages/cpp/base/Language.pb.cc +++ b/languages/cpp/base/Language.pb.cc @@ -27,20 +27,20 @@ const ::google::protobuf::EnumDescriptor* file_level_enum_descriptors[1]; } // namespace PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::ParseTableField - const TableStruct::entries[] = { + const TableStruct::entries[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { {0, 0, 0, ::google::protobuf::internal::kInvalidMask, 0, 0}, }; PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::AuxillaryParseTableField - const TableStruct::aux[] = { + const TableStruct::aux[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { ::google::protobuf::internal::AuxillaryParseTableField(), }; PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::ParseTable const - TableStruct::schema[] = { - { NULL, NULL, 0, -1, -1, false }, + TableStruct::schema[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + { NULL, NULL, 0, -1, -1, -1, -1, NULL, false }, }; -const ::google::protobuf::uint32 TableStruct::offsets[] = { ~0u }; +const ::google::protobuf::uint32 TableStruct::offsets[1] = {}; static const ::google::protobuf::internal::MigrationSchema* schemas = NULL; static const ::google::protobuf::Message* const* file_default_instances = NULL; namespace { @@ -64,10 +64,6 @@ void protobuf_RegisterTypes(const ::std::string&) { } } // namespace - -void TableStruct::Shutdown() { -} - void TableStruct::InitDefaultsImpl() { GOOGLE_PROTOBUF_VERIFY_VERSION; @@ -78,9 +74,10 @@ void InitDefaults() { static GOOGLE_PROTOBUF_DECLARE_ONCE(once); ::google::protobuf::GoogleOnceInit(&once, &TableStruct::InitDefaultsImpl); } +namespace { void AddDescriptorsImpl() { InitDefaults(); - static const char descriptor[] = { + static const char descriptor[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { "\n\023base/Language.proto*0\n\010Language\022\013\n\007ENG" "LISH\020\000\022\013\n\007SPANISH\020\001\022\n\n\006FRENCH\020\002B.\n\027io.bl" "oombox.schema.baseB\014BaseLanguageH\001P\001\370\001\001b" @@ -90,14 +87,14 @@ void AddDescriptorsImpl() { descriptor, 127); ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( "base/Language.proto", &protobuf_RegisterTypes); - ::google::protobuf::internal::OnShutdown(&TableStruct::Shutdown); } +} // anonymous namespace void AddDescriptors() { static GOOGLE_PROTOBUF_DECLARE_ONCE(once); ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl); } -// Force AddDescriptors() to be called at static initialization time. +// Force AddDescriptors() to be called at dynamic initialization time. struct StaticDescriptorInitializer { StaticDescriptorInitializer() { AddDescriptors(); diff --git a/languages/cpp/base/Language.pb.h b/languages/cpp/base/Language.pb.h index efe5008..2b94b4f 100644 --- a/languages/cpp/base/Language.pb.h +++ b/languages/cpp/base/Language.pb.h @@ -8,12 +8,12 @@ #include -#if GOOGLE_PROTOBUF_VERSION < 3003000 +#if GOOGLE_PROTOBUF_VERSION < 3004000 #error This file was generated by a newer version of protoc which is #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 3003002 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#if 3004000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION #error This file was generated by an older version of protoc which is #error incompatible with your Protocol Buffer headers. Please #error regenerate this file with a newer version of protoc. @@ -37,8 +37,9 @@ struct TableStruct { static const ::google::protobuf::internal::AuxillaryParseTableField aux[]; static const ::google::protobuf::internal::ParseTable schema[]; static const ::google::protobuf::uint32 offsets[]; + static const ::google::protobuf::internal::FieldMetadata field_metadata[]; + static const ::google::protobuf::internal::SerializationTable serialization_table[]; static void InitDefaultsImpl(); - static void Shutdown(); }; void AddDescriptors(); void InitDefaults(); @@ -75,12 +76,18 @@ inline bool Language_Parse( // =================================================================== #if !PROTOBUF_INLINE_NOT_IN_HEADERS +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ #endif // !PROTOBUF_INLINE_NOT_IN_HEADERS // @@protoc_insertion_point(namespace_scope) -#ifndef SWIG namespace google { namespace protobuf { @@ -92,7 +99,6 @@ inline const EnumDescriptor* GetEnumDescriptor< ::Language>() { } // namespace protobuf } // namespace google -#endif // SWIG // @@protoc_insertion_point(global_scope) diff --git a/languages/cpp/base/ProductKey.pb.cc b/languages/cpp/base/ProductKey.pb.cc index 577a7dc..76252f9 100644 --- a/languages/cpp/base/ProductKey.pb.cc +++ b/languages/cpp/base/ProductKey.pb.cc @@ -16,7 +16,10 @@ #include #include // @@protoc_insertion_point(includes) -class ProductKeyDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed { +class ProductKeyDefaultTypeInternal { +public: + ::google::protobuf::internal::ExplicitlyConstructed + _instance; } _ProductKey_default_instance_; namespace protobuf_base_2fProductKey_2eproto { @@ -29,20 +32,20 @@ ::google::protobuf::Metadata file_level_metadata[1]; } // namespace PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::ParseTableField - const TableStruct::entries[] = { + const TableStruct::entries[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { {0, 0, 0, ::google::protobuf::internal::kInvalidMask, 0, 0}, }; PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::AuxillaryParseTableField - const TableStruct::aux[] = { + const TableStruct::aux[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { ::google::protobuf::internal::AuxillaryParseTableField(), }; PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::ParseTable const - TableStruct::schema[] = { - { NULL, NULL, 0, -1, -1, false }, + TableStruct::schema[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + { NULL, NULL, 0, -1, -1, -1, -1, NULL, false }, }; -const ::google::protobuf::uint32 TableStruct::offsets[] = { +const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ProductKey, _internal_metadata_), ~0u, // no _extensions_ @@ -50,8 +53,7 @@ const ::google::protobuf::uint32 TableStruct::offsets[] = { ~0u, // no _weak_field_map_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ProductKey, id_), }; - -static const ::google::protobuf::internal::MigrationSchema schemas[] = { +static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { { 0, -1, sizeof(ProductKey)}, }; @@ -81,26 +83,22 @@ void protobuf_RegisterTypes(const ::std::string&) { } } // namespace - -void TableStruct::Shutdown() { - _ProductKey_default_instance_.Shutdown(); - delete file_level_metadata[0].reflection; -} - void TableStruct::InitDefaultsImpl() { GOOGLE_PROTOBUF_VERIFY_VERSION; ::google::protobuf::internal::InitProtobufDefaults(); - _ProductKey_default_instance_.DefaultConstruct(); -} + _ProductKey_default_instance_._instance.DefaultConstruct(); + ::google::protobuf::internal::OnShutdownDestroyMessage( + &_ProductKey_default_instance_);} void InitDefaults() { static GOOGLE_PROTOBUF_DECLARE_ONCE(once); ::google::protobuf::GoogleOnceInit(&once, &TableStruct::InitDefaultsImpl); } +namespace { void AddDescriptorsImpl() { InitDefaults(); - static const char descriptor[] = { + static const char descriptor[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { "\n\025base/ProductKey.proto\"\030\n\nProductKey\022\n\n" "\002id\030\001 \001(\tB0\n\027io.bloombox.schema.baseB\016Ba" "seProductKeyH\001P\001\370\001\001b\006proto3" @@ -109,14 +107,14 @@ void AddDescriptorsImpl() { descriptor, 107); ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( "base/ProductKey.proto", &protobuf_RegisterTypes); - ::google::protobuf::internal::OnShutdown(&TableStruct::Shutdown); } +} // anonymous namespace void AddDescriptors() { static GOOGLE_PROTOBUF_DECLARE_ONCE(once); ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl); } -// Force AddDescriptors() to be called at static initialization time. +// Force AddDescriptors() to be called at dynamic initialization time. struct StaticDescriptorInitializer { StaticDescriptorInitializer() { AddDescriptors(); @@ -143,9 +141,7 @@ ProductKey::ProductKey() ProductKey::ProductKey(::google::protobuf::Arena* arena) : ::google::protobuf::Message(), _internal_metadata_(arena) { -#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER protobuf_base_2fProductKey_2eproto::InitDefaults(); -#endif // GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:ProductKey) @@ -175,6 +171,7 @@ ProductKey::~ProductKey() { void ProductKey::SharedDtor() { ::google::protobuf::Arena* arena = GetArenaNoVirtual(); + GOOGLE_DCHECK(arena == NULL); if (arena != NULL) { return; } @@ -209,7 +206,12 @@ ProductKey* ProductKey::New(::google::protobuf::Arena* arena) const { void ProductKey::Clear() { // @@protoc_insertion_point(message_clear_start:ProductKey) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + id_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + _internal_metadata_.Clear(); } bool ProductKey::MergePartialFromCodedStream( @@ -225,11 +227,11 @@ bool ProductKey::MergePartialFromCodedStream( // string id = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(10u)) { + static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_id())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->id().data(), this->id().length(), + this->id().data(), static_cast(this->id().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "ProductKey.id")); } else { @@ -240,12 +242,11 @@ bool ProductKey::MergePartialFromCodedStream( default: { handle_unusual: - if (tag == 0 || - ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + if (tag == 0) { goto success; } - DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } @@ -268,13 +269,17 @@ void ProductKey::SerializeWithCachedSizes( // string id = 1; if (this->id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->id().data(), this->id().length(), + this->id().data(), static_cast(this->id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "ProductKey.id"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->id(), output); } + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); + } // @@protoc_insertion_point(serialize_end:ProductKey) } @@ -288,7 +293,7 @@ ::google::protobuf::uint8* ProductKey::InternalSerializeWithCachedSizesToArray( // string id = 1; if (this->id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->id().data(), this->id().length(), + this->id().data(), static_cast(this->id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "ProductKey.id"); target = @@ -296,6 +301,10 @@ ::google::protobuf::uint8* ProductKey::InternalSerializeWithCachedSizesToArray( 1, this->id(), target); } + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); + } // @@protoc_insertion_point(serialize_to_array_end:ProductKey) return target; } @@ -304,6 +313,11 @@ size_t ProductKey::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:ProductKey) size_t total_size = 0; + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); + } // string id = 1; if (this->id().size() > 0) { total_size += 1 + @@ -383,8 +397,10 @@ void ProductKey::UnsafeArenaSwap(ProductKey* other) { InternalSwap(other); } void ProductKey::InternalSwap(ProductKey* other) { + using std::swap; id_.Swap(&other->id_); - std::swap(_cached_size_, other->_cached_size_); + _internal_metadata_.Swap(&other->_internal_metadata_); + swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata ProductKey::GetMetadata() const { @@ -408,6 +424,14 @@ void ProductKey::set_id(const ::std::string& value) { id_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set:ProductKey.id) } +#if LANG_CXX11 +void ProductKey::set_id(::std::string&& value) { + + id_.Set( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_rvalue:ProductKey.id) +} +#endif void ProductKey::set_id(const char* value) { GOOGLE_DCHECK(value != NULL); diff --git a/languages/cpp/base/ProductKey.pb.h b/languages/cpp/base/ProductKey.pb.h index 03d45fa..df81810 100644 --- a/languages/cpp/base/ProductKey.pb.h +++ b/languages/cpp/base/ProductKey.pb.h @@ -8,12 +8,12 @@ #include -#if GOOGLE_PROTOBUF_VERSION < 3003000 +#if GOOGLE_PROTOBUF_VERSION < 3004000 #error This file was generated by a newer version of protoc which is #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 3003002 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#if 3004000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION #error This file was generated by an older version of protoc which is #error incompatible with your Protocol Buffer headers. Please #error regenerate this file with a newer version of protoc. @@ -41,8 +41,9 @@ struct TableStruct { static const ::google::protobuf::internal::AuxillaryParseTableField aux[]; static const ::google::protobuf::internal::ParseTable schema[]; static const ::google::protobuf::uint32 offsets[]; + static const ::google::protobuf::internal::FieldMetadata field_metadata[]; + static const ::google::protobuf::internal::SerializationTable serialization_table[]; static void InitDefaultsImpl(); - static void Shutdown(); }; void AddDescriptors(); void InitDefaults(); @@ -61,7 +62,21 @@ class ProductKey : public ::google::protobuf::Message /* @@protoc_insertion_poin CopyFrom(from); return *this; } + #if LANG_CXX11 + ProductKey(ProductKey&& from) noexcept + : ProductKey() { + *this = ::std::move(from); + } + inline ProductKey& operator=(ProductKey&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif inline ::google::protobuf::Arena* GetArena() const PROTOBUF_FINAL { return GetArenaNoVirtual(); } @@ -80,6 +95,9 @@ class ProductKey : public ::google::protobuf::Message /* @@protoc_insertion_poin void UnsafeArenaSwap(ProductKey* other); void Swap(ProductKey* other); + friend void swap(ProductKey& a, ProductKey& b) { + a.Swap(&b); + } // implements Message ---------------------------------------------- @@ -131,6 +149,9 @@ class ProductKey : public ::google::protobuf::Message /* @@protoc_insertion_poin static const int kIdFieldNumber = 1; const ::std::string& id() const; void set_id(const ::std::string& value); + #if LANG_CXX11 + void set_id(::std::string&& value); + #endif void set_id(const char* value); void set_id(const char* value, size_t size); ::std::string* mutable_id(); @@ -144,7 +165,7 @@ class ProductKey : public ::google::protobuf::Message /* @@protoc_insertion_poin private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - friend class ::google::protobuf::Arena; + template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; ::google::protobuf::internal::ArenaStringPtr id_; @@ -157,6 +178,10 @@ class ProductKey : public ::google::protobuf::Message /* @@protoc_insertion_poin // =================================================================== #if !PROTOBUF_INLINE_NOT_IN_HEADERS +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ // ProductKey // string id = 1; @@ -172,6 +197,14 @@ inline void ProductKey::set_id(const ::std::string& value) { id_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set:ProductKey.id) } +#if LANG_CXX11 +inline void ProductKey::set_id(::std::string&& value) { + + id_.Set( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_rvalue:ProductKey.id) +} +#endif inline void ProductKey::set_id(const char* value) { GOOGLE_DCHECK(value != NULL); @@ -226,6 +259,9 @@ inline void ProductKey::unsafe_arena_set_allocated_id( // @@protoc_insertion_point(field_unsafe_arena_set_allocated:ProductKey.id) } +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ #endif // !PROTOBUF_INLINE_NOT_IN_HEADERS // @@protoc_insertion_point(namespace_scope) diff --git a/languages/cpp/base/ProductKind.pb.cc b/languages/cpp/base/ProductKind.pb.cc index 7bbe06f..e84fc5d 100644 --- a/languages/cpp/base/ProductKind.pb.cc +++ b/languages/cpp/base/ProductKind.pb.cc @@ -27,20 +27,20 @@ const ::google::protobuf::EnumDescriptor* file_level_enum_descriptors[1]; } // namespace PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::ParseTableField - const TableStruct::entries[] = { + const TableStruct::entries[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { {0, 0, 0, ::google::protobuf::internal::kInvalidMask, 0, 0}, }; PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::AuxillaryParseTableField - const TableStruct::aux[] = { + const TableStruct::aux[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { ::google::protobuf::internal::AuxillaryParseTableField(), }; PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::ParseTable const - TableStruct::schema[] = { - { NULL, NULL, 0, -1, -1, false }, + TableStruct::schema[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + { NULL, NULL, 0, -1, -1, -1, -1, NULL, false }, }; -const ::google::protobuf::uint32 TableStruct::offsets[] = { ~0u }; +const ::google::protobuf::uint32 TableStruct::offsets[1] = {}; static const ::google::protobuf::internal::MigrationSchema* schemas = NULL; static const ::google::protobuf::Message* const* file_default_instances = NULL; namespace { @@ -64,10 +64,6 @@ void protobuf_RegisterTypes(const ::std::string&) { } } // namespace - -void TableStruct::Shutdown() { -} - void TableStruct::InitDefaultsImpl() { GOOGLE_PROTOBUF_VERIFY_VERSION; @@ -78,9 +74,10 @@ void InitDefaults() { static GOOGLE_PROTOBUF_DECLARE_ONCE(once); ::google::protobuf::GoogleOnceInit(&once, &TableStruct::InitDefaultsImpl); } +namespace { void AddDescriptorsImpl() { InitDefaults(); - static const char descriptor[] = { + static const char descriptor[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { "\n\026base/ProductKind.proto*\200\001\n\013ProductKind" "\022\013\n\007FLOWERS\020\000\022\013\n\007EDIBLES\020\001\022\014\n\010EXTRACTS\020\002" "\022\014\n\010PREROLLS\020\003\022\016\n\nAPOTHECARY\020\004\022\016\n\nCARTRI" @@ -92,14 +89,14 @@ void AddDescriptorsImpl() { descriptor, 214); ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( "base/ProductKind.proto", &protobuf_RegisterTypes); - ::google::protobuf::internal::OnShutdown(&TableStruct::Shutdown); } +} // anonymous namespace void AddDescriptors() { static GOOGLE_PROTOBUF_DECLARE_ONCE(once); ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl); } -// Force AddDescriptors() to be called at static initialization time. +// Force AddDescriptors() to be called at dynamic initialization time. struct StaticDescriptorInitializer { StaticDescriptorInitializer() { AddDescriptors(); diff --git a/languages/cpp/base/ProductKind.pb.h b/languages/cpp/base/ProductKind.pb.h index 1f5f173..1d63375 100644 --- a/languages/cpp/base/ProductKind.pb.h +++ b/languages/cpp/base/ProductKind.pb.h @@ -8,12 +8,12 @@ #include -#if GOOGLE_PROTOBUF_VERSION < 3003000 +#if GOOGLE_PROTOBUF_VERSION < 3004000 #error This file was generated by a newer version of protoc which is #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 3003002 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#if 3004000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION #error This file was generated by an older version of protoc which is #error incompatible with your Protocol Buffer headers. Please #error regenerate this file with a newer version of protoc. @@ -37,8 +37,9 @@ struct TableStruct { static const ::google::protobuf::internal::AuxillaryParseTableField aux[]; static const ::google::protobuf::internal::ParseTable schema[]; static const ::google::protobuf::uint32 offsets[]; + static const ::google::protobuf::internal::FieldMetadata field_metadata[]; + static const ::google::protobuf::internal::SerializationTable serialization_table[]; static void InitDefaultsImpl(); - static void Shutdown(); }; void AddDescriptors(); void InitDefaults(); @@ -80,12 +81,18 @@ inline bool ProductKind_Parse( // =================================================================== #if !PROTOBUF_INLINE_NOT_IN_HEADERS +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ #endif // !PROTOBUF_INLINE_NOT_IN_HEADERS // @@protoc_insertion_point(namespace_scope) -#ifndef SWIG namespace google { namespace protobuf { @@ -97,7 +104,6 @@ inline const EnumDescriptor* GetEnumDescriptor< ::ProductKind>() { } // namespace protobuf } // namespace google -#endif // SWIG // @@protoc_insertion_point(global_scope) diff --git a/languages/cpp/base/ProductType.pb.cc b/languages/cpp/base/ProductType.pb.cc index ad77f1e..364ced1 100644 --- a/languages/cpp/base/ProductType.pb.cc +++ b/languages/cpp/base/ProductType.pb.cc @@ -16,7 +16,10 @@ #include #include // @@protoc_insertion_point(includes) -class ProductTypeDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed { +class ProductTypeDefaultTypeInternal { +public: + ::google::protobuf::internal::ExplicitlyConstructed + _instance; } _ProductType_default_instance_; namespace protobuf_base_2fProductType_2eproto { @@ -29,20 +32,20 @@ ::google::protobuf::Metadata file_level_metadata[1]; } // namespace PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::ParseTableField - const TableStruct::entries[] = { + const TableStruct::entries[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { {0, 0, 0, ::google::protobuf::internal::kInvalidMask, 0, 0}, }; PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::AuxillaryParseTableField - const TableStruct::aux[] = { + const TableStruct::aux[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { ::google::protobuf::internal::AuxillaryParseTableField(), }; PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::ParseTable const - TableStruct::schema[] = { - { NULL, NULL, 0, -1, -1, false }, + TableStruct::schema[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + { NULL, NULL, 0, -1, -1, -1, -1, NULL, false }, }; -const ::google::protobuf::uint32 TableStruct::offsets[] = { +const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ProductType, _internal_metadata_), ~0u, // no _extensions_ @@ -50,8 +53,7 @@ const ::google::protobuf::uint32 TableStruct::offsets[] = { ~0u, // no _weak_field_map_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ProductType, kind_), }; - -static const ::google::protobuf::internal::MigrationSchema schemas[] = { +static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { { 0, -1, sizeof(ProductType)}, }; @@ -81,27 +83,23 @@ void protobuf_RegisterTypes(const ::std::string&) { } } // namespace - -void TableStruct::Shutdown() { - _ProductType_default_instance_.Shutdown(); - delete file_level_metadata[0].reflection; -} - void TableStruct::InitDefaultsImpl() { GOOGLE_PROTOBUF_VERIFY_VERSION; ::google::protobuf::internal::InitProtobufDefaults(); ::protobuf_base_2fProductKind_2eproto::InitDefaults(); - _ProductType_default_instance_.DefaultConstruct(); -} + _ProductType_default_instance_._instance.DefaultConstruct(); + ::google::protobuf::internal::OnShutdownDestroyMessage( + &_ProductType_default_instance_);} void InitDefaults() { static GOOGLE_PROTOBUF_DECLARE_ONCE(once); ::google::protobuf::GoogleOnceInit(&once, &TableStruct::InitDefaultsImpl); } +namespace { void AddDescriptorsImpl() { InitDefaults(); - static const char descriptor[] = { + static const char descriptor[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { "\n\026base/ProductType.proto\032\026base/ProductKi" "nd.proto\")\n\013ProductType\022\032\n\004kind\030\001 \001(\0162\014." "ProductKindB1\n\027io.bloombox.schema.baseB\017" @@ -112,14 +110,14 @@ void AddDescriptorsImpl() { ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( "base/ProductType.proto", &protobuf_RegisterTypes); ::protobuf_base_2fProductKind_2eproto::AddDescriptors(); - ::google::protobuf::internal::OnShutdown(&TableStruct::Shutdown); } +} // anonymous namespace void AddDescriptors() { static GOOGLE_PROTOBUF_DECLARE_ONCE(once); ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl); } -// Force AddDescriptors() to be called at static initialization time. +// Force AddDescriptors() to be called at dynamic initialization time. struct StaticDescriptorInitializer { StaticDescriptorInitializer() { AddDescriptors(); @@ -146,9 +144,7 @@ ProductType::ProductType() ProductType::ProductType(::google::protobuf::Arena* arena) : ::google::protobuf::Message(), _internal_metadata_(arena) { -#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER protobuf_base_2fProductType_2eproto::InitDefaults(); -#endif // GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:ProductType) @@ -174,6 +170,7 @@ ProductType::~ProductType() { void ProductType::SharedDtor() { ::google::protobuf::Arena* arena = GetArenaNoVirtual(); + GOOGLE_DCHECK(arena == NULL); if (arena != NULL) { return; } @@ -207,7 +204,12 @@ ProductType* ProductType::New(::google::protobuf::Arena* arena) const { void ProductType::Clear() { // @@protoc_insertion_point(message_clear_start:ProductType) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + kind_ = 0; + _internal_metadata_.Clear(); } bool ProductType::MergePartialFromCodedStream( @@ -223,7 +225,7 @@ bool ProductType::MergePartialFromCodedStream( // .ProductKind kind = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(8u)) { + static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) { int value; DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( @@ -237,12 +239,11 @@ bool ProductType::MergePartialFromCodedStream( default: { handle_unusual: - if (tag == 0 || - ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + if (tag == 0) { goto success; } - DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } @@ -268,6 +269,10 @@ void ProductType::SerializeWithCachedSizes( 1, this->kind(), output); } + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); + } // @@protoc_insertion_point(serialize_end:ProductType) } @@ -284,6 +289,10 @@ ::google::protobuf::uint8* ProductType::InternalSerializeWithCachedSizesToArray( 1, this->kind(), target); } + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); + } // @@protoc_insertion_point(serialize_to_array_end:ProductType) return target; } @@ -292,6 +301,11 @@ size_t ProductType::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:ProductType) size_t total_size = 0; + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); + } // .ProductKind kind = 1; if (this->kind() != 0) { total_size += 1 + @@ -370,8 +384,10 @@ void ProductType::UnsafeArenaSwap(ProductType* other) { InternalSwap(other); } void ProductType::InternalSwap(ProductType* other) { - std::swap(kind_, other->kind_); - std::swap(_cached_size_, other->_cached_size_); + using std::swap; + swap(kind_, other->kind_); + _internal_metadata_.Swap(&other->_internal_metadata_); + swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata ProductType::GetMetadata() const { diff --git a/languages/cpp/base/ProductType.pb.h b/languages/cpp/base/ProductType.pb.h index 01bba48..2cbab25 100644 --- a/languages/cpp/base/ProductType.pb.h +++ b/languages/cpp/base/ProductType.pb.h @@ -8,12 +8,12 @@ #include -#if GOOGLE_PROTOBUF_VERSION < 3003000 +#if GOOGLE_PROTOBUF_VERSION < 3004000 #error This file was generated by a newer version of protoc which is #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 3003002 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#if 3004000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION #error This file was generated by an older version of protoc which is #error incompatible with your Protocol Buffer headers. Please #error regenerate this file with a newer version of protoc. @@ -42,8 +42,9 @@ struct TableStruct { static const ::google::protobuf::internal::AuxillaryParseTableField aux[]; static const ::google::protobuf::internal::ParseTable schema[]; static const ::google::protobuf::uint32 offsets[]; + static const ::google::protobuf::internal::FieldMetadata field_metadata[]; + static const ::google::protobuf::internal::SerializationTable serialization_table[]; static void InitDefaultsImpl(); - static void Shutdown(); }; void AddDescriptors(); void InitDefaults(); @@ -62,7 +63,21 @@ class ProductType : public ::google::protobuf::Message /* @@protoc_insertion_poi CopyFrom(from); return *this; } + #if LANG_CXX11 + ProductType(ProductType&& from) noexcept + : ProductType() { + *this = ::std::move(from); + } + inline ProductType& operator=(ProductType&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif inline ::google::protobuf::Arena* GetArena() const PROTOBUF_FINAL { return GetArenaNoVirtual(); } @@ -81,6 +96,9 @@ class ProductType : public ::google::protobuf::Message /* @@protoc_insertion_poi void UnsafeArenaSwap(ProductType* other); void Swap(ProductType* other); + friend void swap(ProductType& a, ProductType& b) { + a.Swap(&b); + } // implements Message ---------------------------------------------- @@ -137,7 +155,7 @@ class ProductType : public ::google::protobuf::Message /* @@protoc_insertion_poi private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - friend class ::google::protobuf::Arena; + template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; int kind_; @@ -150,6 +168,10 @@ class ProductType : public ::google::protobuf::Message /* @@protoc_insertion_poi // =================================================================== #if !PROTOBUF_INLINE_NOT_IN_HEADERS +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ // ProductType // .ProductKind kind = 1; @@ -166,6 +188,9 @@ inline void ProductType::set_kind(::ProductKind value) { // @@protoc_insertion_point(field_set:ProductType.kind) } +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ #endif // !PROTOBUF_INLINE_NOT_IN_HEADERS // @@protoc_insertion_point(namespace_scope) diff --git a/languages/cpp/content/Brand.pb.cc b/languages/cpp/content/Brand.pb.cc index 2ad22df..a590e83 100644 --- a/languages/cpp/content/Brand.pb.cc +++ b/languages/cpp/content/Brand.pb.cc @@ -16,7 +16,10 @@ #include #include // @@protoc_insertion_point(includes) -class BrandDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed { +class BrandDefaultTypeInternal { +public: + ::google::protobuf::internal::ExplicitlyConstructed + _instance; } _Brand_default_instance_; namespace protobuf_content_2fBrand_2eproto { @@ -29,20 +32,20 @@ ::google::protobuf::Metadata file_level_metadata[1]; } // namespace PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::ParseTableField - const TableStruct::entries[] = { + const TableStruct::entries[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { {0, 0, 0, ::google::protobuf::internal::kInvalidMask, 0, 0}, }; PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::AuxillaryParseTableField - const TableStruct::aux[] = { + const TableStruct::aux[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { ::google::protobuf::internal::AuxillaryParseTableField(), }; PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::ParseTable const - TableStruct::schema[] = { - { NULL, NULL, 0, -1, -1, false }, + TableStruct::schema[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + { NULL, NULL, 0, -1, -1, -1, -1, NULL, false }, }; -const ::google::protobuf::uint32 TableStruct::offsets[] = { +const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Brand, _internal_metadata_), ~0u, // no _extensions_ @@ -53,8 +56,7 @@ const ::google::protobuf::uint32 TableStruct::offsets[] = { GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Brand, summary_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Brand, media_), }; - -static const ::google::protobuf::internal::MigrationSchema schemas[] = { +static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { { 0, -1, sizeof(Brand)}, }; @@ -84,12 +86,6 @@ void protobuf_RegisterTypes(const ::std::string&) { } } // namespace - -void TableStruct::Shutdown() { - _Brand_default_instance_.Shutdown(); - delete file_level_metadata[0].reflection; -} - void TableStruct::InitDefaultsImpl() { GOOGLE_PROTOBUF_VERIFY_VERSION; @@ -97,12 +93,13 @@ void TableStruct::InitDefaultsImpl() { ::protobuf_content_2fName_2eproto::InitDefaults(); ::protobuf_content_2fContent_2eproto::InitDefaults(); ::protobuf_media_2fMediaItem_2eproto::InitDefaults(); - _Brand_default_instance_.DefaultConstruct(); - _Brand_default_instance_.get_mutable()->name_ = const_cast< ::Name*>( + _Brand_default_instance_._instance.DefaultConstruct(); + ::google::protobuf::internal::OnShutdownDestroyMessage( + &_Brand_default_instance_);_Brand_default_instance_._instance.get_mutable()->name_ = const_cast< ::Name*>( ::Name::internal_default_instance()); - _Brand_default_instance_.get_mutable()->parent_ = const_cast< ::Brand*>( + _Brand_default_instance_._instance.get_mutable()->parent_ = const_cast< ::Brand*>( ::Brand::internal_default_instance()); - _Brand_default_instance_.get_mutable()->summary_ = const_cast< ::Content*>( + _Brand_default_instance_._instance.get_mutable()->summary_ = const_cast< ::Content*>( ::Content::internal_default_instance()); } @@ -110,9 +107,10 @@ void InitDefaults() { static GOOGLE_PROTOBUF_DECLARE_ONCE(once); ::google::protobuf::GoogleOnceInit(&once, &TableStruct::InitDefaultsImpl); } +namespace { void AddDescriptorsImpl() { InitDefaults(); - static const char descriptor[] = { + static const char descriptor[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { "\n\023content/Brand.proto\032\022content/Name.prot" "o\032\025content/Content.proto\032\025media/MediaIte" "m.proto\"j\n\005Brand\022\023\n\004name\030\001 \001(\0132\005.Name\022\026\n" @@ -128,14 +126,14 @@ void AddDescriptorsImpl() { ::protobuf_content_2fName_2eproto::AddDescriptors(); ::protobuf_content_2fContent_2eproto::AddDescriptors(); ::protobuf_media_2fMediaItem_2eproto::AddDescriptors(); - ::google::protobuf::internal::OnShutdown(&TableStruct::Shutdown); } +} // anonymous namespace void AddDescriptors() { static GOOGLE_PROTOBUF_DECLARE_ONCE(once); ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl); } -// Force AddDescriptors() to be called at static initialization time. +// Force AddDescriptors() to be called at dynamic initialization time. struct StaticDescriptorInitializer { StaticDescriptorInitializer() { AddDescriptors(); @@ -307,9 +305,7 @@ Brand::Brand(::google::protobuf::Arena* arena) : ::google::protobuf::Message(), _internal_metadata_(arena), media_(arena) { -#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER protobuf_content_2fBrand_2eproto::InitDefaults(); -#endif // GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:Brand) @@ -339,8 +335,9 @@ Brand::Brand(const Brand& from) } void Brand::SharedCtor() { - ::memset(&name_, 0, reinterpret_cast(&summary_) - - reinterpret_cast(&name_) + sizeof(summary_)); + ::memset(&name_, 0, static_cast( + reinterpret_cast(&summary_) - + reinterpret_cast(&name_)) + sizeof(summary_)); _cached_size_ = 0; } @@ -351,19 +348,14 @@ Brand::~Brand() { void Brand::SharedDtor() { ::google::protobuf::Arena* arena = GetArenaNoVirtual(); + GOOGLE_DCHECK(arena == NULL); if (arena != NULL) { return; } - if (this != internal_default_instance()) { - delete name_; - } - if (this != internal_default_instance()) { - delete parent_; - } - if (this != internal_default_instance()) { - delete summary_; - } + if (this != internal_default_instance()) delete name_; + if (this != internal_default_instance()) delete parent_; + if (this != internal_default_instance()) delete summary_; } void Brand::ArenaDtor(void* object) { @@ -393,6 +385,10 @@ Brand* Brand::New(::google::protobuf::Arena* arena) const { void Brand::Clear() { // @@protoc_insertion_point(message_clear_start:Brand) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + media_.Clear(); if (GetArenaNoVirtual() == NULL && name_ != NULL) { delete name_; @@ -406,6 +402,7 @@ void Brand::Clear() { delete summary_; } summary_ = NULL; + _internal_metadata_.Clear(); } bool Brand::MergePartialFromCodedStream( @@ -421,7 +418,7 @@ bool Brand::MergePartialFromCodedStream( // .Name name = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(10u)) { + static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, mutable_name())); } else { @@ -433,7 +430,7 @@ bool Brand::MergePartialFromCodedStream( // .Brand parent = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(18u)) { + static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, mutable_parent())); } else { @@ -445,7 +442,7 @@ bool Brand::MergePartialFromCodedStream( // .Content summary = 3; case 3: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(26u)) { + static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, mutable_summary())); } else { @@ -457,7 +454,7 @@ bool Brand::MergePartialFromCodedStream( // repeated .MediaItem media = 20; case 20: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(162u)) { + static_cast< ::google::protobuf::uint8>(162u /* 162 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, add_media())); } else { @@ -468,12 +465,11 @@ bool Brand::MergePartialFromCodedStream( default: { handle_unusual: - if (tag == 0 || - ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + if (tag == 0) { goto success; } - DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } @@ -512,11 +508,16 @@ void Brand::SerializeWithCachedSizes( } // repeated .MediaItem media = 20; - for (unsigned int i = 0, n = this->media_size(); i < n; i++) { + for (unsigned int i = 0, + n = static_cast(this->media_size()); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 20, this->media(i), output); + 20, this->media(static_cast(i)), output); } + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); + } // @@protoc_insertion_point(serialize_end:Brand) } @@ -549,12 +550,17 @@ ::google::protobuf::uint8* Brand::InternalSerializeWithCachedSizesToArray( } // repeated .MediaItem media = 20; - for (unsigned int i = 0, n = this->media_size(); i < n; i++) { + for (unsigned int i = 0, + n = static_cast(this->media_size()); i < n; i++) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageNoVirtualToArray( - 20, this->media(i), deterministic, target); + 20, this->media(static_cast(i)), deterministic, target); } + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); + } // @@protoc_insertion_point(serialize_to_array_end:Brand) return target; } @@ -563,14 +569,19 @@ size_t Brand::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:Brand) size_t total_size = 0; + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); + } // repeated .MediaItem media = 20; { - unsigned int count = this->media_size(); + unsigned int count = static_cast(this->media_size()); total_size += 2UL * count; for (unsigned int i = 0; i < count; i++) { total_size += ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->media(i)); + this->media(static_cast(i))); } } @@ -674,11 +685,13 @@ void Brand::UnsafeArenaSwap(Brand* other) { InternalSwap(other); } void Brand::InternalSwap(Brand* other) { + using std::swap; media_.InternalSwap(&other->media_); - std::swap(name_, other->name_); - std::swap(parent_, other->parent_); - std::swap(summary_, other->summary_); - std::swap(_cached_size_, other->_cached_size_); + swap(name_, other->name_); + swap(parent_, other->parent_); + swap(summary_, other->summary_); + _internal_metadata_.Swap(&other->_internal_metadata_); + swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata Brand::GetMetadata() const { @@ -698,9 +711,10 @@ void Brand::clear_name() { name_ = NULL; } const ::Name& Brand::name() const { + const ::Name* p = name_; // @@protoc_insertion_point(field_get:Brand.name) - return name_ != NULL ? *name_ - : *::Name::internal_default_instance(); + return p != NULL ? *p : *reinterpret_cast( + &::_Name_default_instance_); } ::Name* Brand::mutable_name() { @@ -747,9 +761,10 @@ void Brand::clear_parent() { parent_ = NULL; } const ::Brand& Brand::parent() const { + const ::Brand* p = parent_; // @@protoc_insertion_point(field_get:Brand.parent) - return parent_ != NULL ? *parent_ - : *::Brand::internal_default_instance(); + return p != NULL ? *p : *reinterpret_cast( + &::_Brand_default_instance_); } ::Brand* Brand::mutable_parent() { @@ -796,9 +811,10 @@ void Brand::clear_summary() { summary_ = NULL; } const ::Content& Brand::summary() const { + const ::Content* p = summary_; // @@protoc_insertion_point(field_get:Brand.summary) - return summary_ != NULL ? *summary_ - : *::Content::internal_default_instance(); + return p != NULL ? *p : *reinterpret_cast( + &::_Content_default_instance_); } ::Content* Brand::mutable_summary() { diff --git a/languages/cpp/content/Brand.pb.h b/languages/cpp/content/Brand.pb.h index 0ac09fe..05716db 100644 --- a/languages/cpp/content/Brand.pb.h +++ b/languages/cpp/content/Brand.pb.h @@ -8,12 +8,12 @@ #include -#if GOOGLE_PROTOBUF_VERSION < 3003000 +#if GOOGLE_PROTOBUF_VERSION < 3004000 #error This file was generated by a newer version of protoc which is #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 3003002 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#if 3004000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION #error This file was generated by an older version of protoc which is #error incompatible with your Protocol Buffer headers. Please #error regenerate this file with a newer version of protoc. @@ -36,15 +36,6 @@ class Brand; class BrandDefaultTypeInternal; extern BrandDefaultTypeInternal _Brand_default_instance_; -class Content; -class ContentDefaultTypeInternal; -extern ContentDefaultTypeInternal _Content_default_instance_; -class MediaItem; -class MediaItemDefaultTypeInternal; -extern MediaItemDefaultTypeInternal _MediaItem_default_instance_; -class Name; -class NameDefaultTypeInternal; -extern NameDefaultTypeInternal _Name_default_instance_; namespace protobuf_content_2fBrand_2eproto { // Internal implementation detail -- do not call these. @@ -53,8 +44,9 @@ struct TableStruct { static const ::google::protobuf::internal::AuxillaryParseTableField aux[]; static const ::google::protobuf::internal::ParseTable schema[]; static const ::google::protobuf::uint32 offsets[]; + static const ::google::protobuf::internal::FieldMetadata field_metadata[]; + static const ::google::protobuf::internal::SerializationTable serialization_table[]; static void InitDefaultsImpl(); - static void Shutdown(); }; void AddDescriptors(); void InitDefaults(); @@ -73,7 +65,21 @@ class Brand : public ::google::protobuf::Message /* @@protoc_insertion_point(cla CopyFrom(from); return *this; } + #if LANG_CXX11 + Brand(Brand&& from) noexcept + : Brand() { + *this = ::std::move(from); + } + inline Brand& operator=(Brand&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif inline ::google::protobuf::Arena* GetArena() const PROTOBUF_FINAL { return GetArenaNoVirtual(); } @@ -92,6 +98,9 @@ class Brand : public ::google::protobuf::Message /* @@protoc_insertion_point(cla void UnsafeArenaSwap(Brand* other); void Swap(Brand* other); + friend void swap(Brand& a, Brand& b) { + a.Swap(&b); + } // implements Message ---------------------------------------------- @@ -208,7 +217,7 @@ class Brand : public ::google::protobuf::Message /* @@protoc_insertion_point(cla private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - friend class ::google::protobuf::Arena; + template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; ::google::protobuf::RepeatedPtrField< ::MediaItem > media_; @@ -224,6 +233,10 @@ class Brand : public ::google::protobuf::Message /* @@protoc_insertion_point(cla // =================================================================== #if !PROTOBUF_INLINE_NOT_IN_HEADERS +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ // Brand // .Name name = 1; @@ -235,9 +248,10 @@ inline void Brand::clear_name() { name_ = NULL; } inline const ::Name& Brand::name() const { + const ::Name* p = name_; // @@protoc_insertion_point(field_get:Brand.name) - return name_ != NULL ? *name_ - : *::Name::internal_default_instance(); + return p != NULL ? *p : *reinterpret_cast( + &::_Name_default_instance_); } inline ::Name* Brand::mutable_name() { @@ -284,9 +298,10 @@ inline void Brand::clear_parent() { parent_ = NULL; } inline const ::Brand& Brand::parent() const { + const ::Brand* p = parent_; // @@protoc_insertion_point(field_get:Brand.parent) - return parent_ != NULL ? *parent_ - : *::Brand::internal_default_instance(); + return p != NULL ? *p : *reinterpret_cast( + &::_Brand_default_instance_); } inline ::Brand* Brand::mutable_parent() { @@ -333,9 +348,10 @@ inline void Brand::clear_summary() { summary_ = NULL; } inline const ::Content& Brand::summary() const { + const ::Content* p = summary_; // @@protoc_insertion_point(field_get:Brand.summary) - return summary_ != NULL ? *summary_ - : *::Content::internal_default_instance(); + return p != NULL ? *p : *reinterpret_cast( + &::_Content_default_instance_); } inline ::Content* Brand::mutable_summary() { @@ -403,6 +419,9 @@ Brand::media() const { return media_; } +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ #endif // !PROTOBUF_INLINE_NOT_IN_HEADERS // @@protoc_insertion_point(namespace_scope) diff --git a/languages/cpp/content/Content.pb.cc b/languages/cpp/content/Content.pb.cc index b215c27..72bb44a 100644 --- a/languages/cpp/content/Content.pb.cc +++ b/languages/cpp/content/Content.pb.cc @@ -16,7 +16,10 @@ #include #include // @@protoc_insertion_point(includes) -class ContentDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed { +class ContentDefaultTypeInternal { +public: + ::google::protobuf::internal::ExplicitlyConstructed + _instance; } _Content_default_instance_; namespace protobuf_content_2fContent_2eproto { @@ -30,20 +33,20 @@ const ::google::protobuf::EnumDescriptor* file_level_enum_descriptors[2]; } // namespace PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::ParseTableField - const TableStruct::entries[] = { + const TableStruct::entries[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { {0, 0, 0, ::google::protobuf::internal::kInvalidMask, 0, 0}, }; PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::AuxillaryParseTableField - const TableStruct::aux[] = { + const TableStruct::aux[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { ::google::protobuf::internal::AuxillaryParseTableField(), }; PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::ParseTable const - TableStruct::schema[] = { - { NULL, NULL, 0, -1, -1, false }, + TableStruct::schema[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + { NULL, NULL, 0, -1, -1, -1, -1, NULL, false }, }; -const ::google::protobuf::uint32 TableStruct::offsets[] = { +const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Content, _internal_metadata_), ~0u, // no _extensions_ @@ -55,8 +58,7 @@ const ::google::protobuf::uint32 TableStruct::offsets[] = { GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Content, language_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Content, compression_), }; - -static const ::google::protobuf::internal::MigrationSchema schemas[] = { +static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { { 0, -1, sizeof(Content)}, }; @@ -86,20 +88,15 @@ void protobuf_RegisterTypes(const ::std::string&) { } } // namespace - -void TableStruct::Shutdown() { - _Content_default_instance_.Shutdown(); - delete file_level_metadata[0].reflection; -} - void TableStruct::InitDefaultsImpl() { GOOGLE_PROTOBUF_VERIFY_VERSION; ::google::protobuf::internal::InitProtobufDefaults(); ::protobuf_base_2fLanguage_2eproto::InitDefaults(); ::protobuf_base_2fCompression_2eproto::InitDefaults(); - _Content_default_instance_.DefaultConstruct(); - _Content_default_instance_.get_mutable()->compression_ = const_cast< ::Compression*>( + _Content_default_instance_._instance.DefaultConstruct(); + ::google::protobuf::internal::OnShutdownDestroyMessage( + &_Content_default_instance_);_Content_default_instance_._instance.get_mutable()->compression_ = const_cast< ::Compression*>( ::Compression::internal_default_instance()); } @@ -107,9 +104,10 @@ void InitDefaults() { static GOOGLE_PROTOBUF_DECLARE_ONCE(once); ::google::protobuf::GoogleOnceInit(&once, &TableStruct::InitDefaultsImpl); } +namespace { void AddDescriptorsImpl() { InitDefaults(); - static const char descriptor[] = { + static const char descriptor[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { "\n\025content/Content.proto\032\023base/Language.p" "roto\032\026base/Compression.proto\"\334\001\n\007Content" "\022\033\n\004type\030\001 \001(\0162\r.Content.Type\022#\n\010encodin" @@ -126,14 +124,14 @@ void AddDescriptorsImpl() { "content/Content.proto", &protobuf_RegisterTypes); ::protobuf_base_2fLanguage_2eproto::AddDescriptors(); ::protobuf_base_2fCompression_2eproto::AddDescriptors(); - ::google::protobuf::internal::OnShutdown(&TableStruct::Shutdown); } +} // anonymous namespace void AddDescriptors() { static GOOGLE_PROTOBUF_DECLARE_ONCE(once); ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl); } -// Force AddDescriptors() to be called at static initialization time. +// Force AddDescriptors() to be called at dynamic initialization time. struct StaticDescriptorInitializer { StaticDescriptorInitializer() { AddDescriptors(); @@ -253,9 +251,7 @@ Content::Content() Content::Content(::google::protobuf::Arena* arena) : ::google::protobuf::Message(), _internal_metadata_(arena) { -#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER protobuf_content_2fContent_2eproto::InitDefaults(); -#endif // GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:Content) @@ -276,15 +272,16 @@ Content::Content(const Content& from) compression_ = NULL; } ::memcpy(&type_, &from.type_, - reinterpret_cast(&language_) - - reinterpret_cast(&type_) + sizeof(language_)); + static_cast(reinterpret_cast(&language_) - + reinterpret_cast(&type_)) + sizeof(language_)); // @@protoc_insertion_point(copy_constructor:Content) } void Content::SharedCtor() { content_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - ::memset(&compression_, 0, reinterpret_cast(&language_) - - reinterpret_cast(&compression_) + sizeof(language_)); + ::memset(&compression_, 0, static_cast( + reinterpret_cast(&language_) - + reinterpret_cast(&compression_)) + sizeof(language_)); _cached_size_ = 0; } @@ -295,14 +292,13 @@ Content::~Content() { void Content::SharedDtor() { ::google::protobuf::Arena* arena = GetArenaNoVirtual(); + GOOGLE_DCHECK(arena == NULL); if (arena != NULL) { return; } content_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), arena); - if (this != internal_default_instance()) { - delete compression_; - } + if (this != internal_default_instance()) delete compression_; } void Content::ArenaDtor(void* object) { @@ -332,13 +328,19 @@ Content* Content::New(::google::protobuf::Arena* arena) const { void Content::Clear() { // @@protoc_insertion_point(message_clear_start:Content) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + content_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); if (GetArenaNoVirtual() == NULL && compression_ != NULL) { delete compression_; } compression_ = NULL; - ::memset(&type_, 0, reinterpret_cast(&language_) - - reinterpret_cast(&type_) + sizeof(language_)); + ::memset(&type_, 0, static_cast( + reinterpret_cast(&language_) - + reinterpret_cast(&type_)) + sizeof(language_)); + _internal_metadata_.Clear(); } bool Content::MergePartialFromCodedStream( @@ -354,7 +356,7 @@ bool Content::MergePartialFromCodedStream( // .Content.Type type = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(8u)) { + static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) { int value; DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( @@ -369,7 +371,7 @@ bool Content::MergePartialFromCodedStream( // .Content.Encoding encoding = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(16u)) { + static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) { int value; DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( @@ -384,7 +386,7 @@ bool Content::MergePartialFromCodedStream( // bytes content = 3; case 3: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(26u)) { + static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadBytes( input, this->mutable_content())); } else { @@ -396,7 +398,7 @@ bool Content::MergePartialFromCodedStream( // .Language language = 4; case 4: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(32u)) { + static_cast< ::google::protobuf::uint8>(32u /* 32 & 0xFF */)) { int value; DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( @@ -411,7 +413,7 @@ bool Content::MergePartialFromCodedStream( // .Compression compression = 5; case 5: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(42u)) { + static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, mutable_compression())); } else { @@ -422,12 +424,11 @@ bool Content::MergePartialFromCodedStream( default: { handle_unusual: - if (tag == 0 || - ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + if (tag == 0) { goto success; } - DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } @@ -477,6 +478,10 @@ void Content::SerializeWithCachedSizes( 5, *this->compression_, output); } + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); + } // @@protoc_insertion_point(serialize_end:Content) } @@ -519,6 +524,10 @@ ::google::protobuf::uint8* Content::InternalSerializeWithCachedSizesToArray( 5, *this->compression_, deterministic, target); } + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); + } // @@protoc_insertion_point(serialize_to_array_end:Content) return target; } @@ -527,6 +536,11 @@ size_t Content::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:Content) size_t total_size = 0; + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); + } // bytes content = 3; if (this->content().size() > 0) { total_size += 1 + @@ -643,12 +657,14 @@ void Content::UnsafeArenaSwap(Content* other) { InternalSwap(other); } void Content::InternalSwap(Content* other) { + using std::swap; content_.Swap(&other->content_); - std::swap(compression_, other->compression_); - std::swap(type_, other->type_); - std::swap(encoding_, other->encoding_); - std::swap(language_, other->language_); - std::swap(_cached_size_, other->_cached_size_); + swap(compression_, other->compression_); + swap(type_, other->type_); + swap(encoding_, other->encoding_); + swap(language_, other->language_); + _internal_metadata_.Swap(&other->_internal_metadata_); + swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata Content::GetMetadata() const { @@ -700,6 +716,14 @@ void Content::set_content(const ::std::string& value) { content_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set:Content.content) } +#if LANG_CXX11 +void Content::set_content(::std::string&& value) { + + content_.Set( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_rvalue:Content.content) +} +#endif void Content::set_content(const char* value) { GOOGLE_DCHECK(value != NULL); @@ -777,9 +801,10 @@ void Content::clear_compression() { compression_ = NULL; } const ::Compression& Content::compression() const { + const ::Compression* p = compression_; // @@protoc_insertion_point(field_get:Content.compression) - return compression_ != NULL ? *compression_ - : *::Compression::internal_default_instance(); + return p != NULL ? *p : *reinterpret_cast( + &::_Compression_default_instance_); } ::Compression* Content::mutable_compression() { diff --git a/languages/cpp/content/Content.pb.h b/languages/cpp/content/Content.pb.h index 9cecbbe..de9fc5e 100644 --- a/languages/cpp/content/Content.pb.h +++ b/languages/cpp/content/Content.pb.h @@ -8,12 +8,12 @@ #include -#if GOOGLE_PROTOBUF_VERSION < 3003000 +#if GOOGLE_PROTOBUF_VERSION < 3004000 #error This file was generated by a newer version of protoc which is #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 3003002 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#if 3004000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION #error This file was generated by an older version of protoc which is #error incompatible with your Protocol Buffer headers. Please #error regenerate this file with a newer version of protoc. @@ -33,9 +33,6 @@ #include "base/Language.pb.h" #include "base/Compression.pb.h" // @@protoc_insertion_point(includes) -class Compression; -class CompressionDefaultTypeInternal; -extern CompressionDefaultTypeInternal _Compression_default_instance_; class Content; class ContentDefaultTypeInternal; extern ContentDefaultTypeInternal _Content_default_instance_; @@ -47,8 +44,9 @@ struct TableStruct { static const ::google::protobuf::internal::AuxillaryParseTableField aux[]; static const ::google::protobuf::internal::ParseTable schema[]; static const ::google::protobuf::uint32 offsets[]; + static const ::google::protobuf::internal::FieldMetadata field_metadata[]; + static const ::google::protobuf::internal::SerializationTable serialization_table[]; static void InitDefaultsImpl(); - static void Shutdown(); }; void AddDescriptors(); void InitDefaults(); @@ -109,7 +107,21 @@ class Content : public ::google::protobuf::Message /* @@protoc_insertion_point(c CopyFrom(from); return *this; } + #if LANG_CXX11 + Content(Content&& from) noexcept + : Content() { + *this = ::std::move(from); + } + inline Content& operator=(Content&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif inline ::google::protobuf::Arena* GetArena() const PROTOBUF_FINAL { return GetArenaNoVirtual(); } @@ -128,6 +140,9 @@ class Content : public ::google::protobuf::Message /* @@protoc_insertion_point(c void UnsafeArenaSwap(Content* other); void Swap(Content* other); + friend void swap(Content& a, Content& b) { + a.Swap(&b); + } // implements Message ---------------------------------------------- @@ -231,6 +246,9 @@ class Content : public ::google::protobuf::Message /* @@protoc_insertion_point(c static const int kContentFieldNumber = 3; const ::std::string& content() const; void set_content(const ::std::string& value); + #if LANG_CXX11 + void set_content(::std::string&& value); + #endif void set_content(const char* value); void set_content(const void* value, size_t size); ::std::string* mutable_content(); @@ -280,7 +298,7 @@ class Content : public ::google::protobuf::Message /* @@protoc_insertion_point(c private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - friend class ::google::protobuf::Arena; + template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; ::google::protobuf::internal::ArenaStringPtr content_; @@ -297,6 +315,10 @@ class Content : public ::google::protobuf::Message /* @@protoc_insertion_point(c // =================================================================== #if !PROTOBUF_INLINE_NOT_IN_HEADERS +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ // Content // .Content.Type type = 1; @@ -340,6 +362,14 @@ inline void Content::set_content(const ::std::string& value) { content_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set:Content.content) } +#if LANG_CXX11 +inline void Content::set_content(::std::string&& value) { + + content_.Set( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_rvalue:Content.content) +} +#endif inline void Content::set_content(const char* value) { GOOGLE_DCHECK(value != NULL); @@ -417,9 +447,10 @@ inline void Content::clear_compression() { compression_ = NULL; } inline const ::Compression& Content::compression() const { + const ::Compression* p = compression_; // @@protoc_insertion_point(field_get:Content.compression) - return compression_ != NULL ? *compression_ - : *::Compression::internal_default_instance(); + return p != NULL ? *p : *reinterpret_cast( + &::_Compression_default_instance_); } inline ::Compression* Content::mutable_compression() { @@ -457,12 +488,14 @@ inline void Content::set_allocated_compression(::Compression* compression) { // @@protoc_insertion_point(field_set_allocated:Content.compression) } +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ #endif // !PROTOBUF_INLINE_NOT_IN_HEADERS // @@protoc_insertion_point(namespace_scope) -#ifndef SWIG namespace google { namespace protobuf { @@ -479,7 +512,6 @@ inline const EnumDescriptor* GetEnumDescriptor< ::Content_Encoding>() { } // namespace protobuf } // namespace google -#endif // SWIG // @@protoc_insertion_point(global_scope) diff --git a/languages/cpp/content/MaterialsData.pb.cc b/languages/cpp/content/MaterialsData.pb.cc index ae0b70c..4de5ad4 100644 --- a/languages/cpp/content/MaterialsData.pb.cc +++ b/languages/cpp/content/MaterialsData.pb.cc @@ -16,7 +16,10 @@ #include #include // @@protoc_insertion_point(includes) -class MaterialsDataDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed { +class MaterialsDataDefaultTypeInternal { +public: + ::google::protobuf::internal::ExplicitlyConstructed + _instance; } _MaterialsData_default_instance_; namespace protobuf_content_2fMaterialsData_2eproto { @@ -29,20 +32,20 @@ ::google::protobuf::Metadata file_level_metadata[1]; } // namespace PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::ParseTableField - const TableStruct::entries[] = { + const TableStruct::entries[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { {0, 0, 0, ::google::protobuf::internal::kInvalidMask, 0, 0}, }; PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::AuxillaryParseTableField - const TableStruct::aux[] = { + const TableStruct::aux[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { ::google::protobuf::internal::AuxillaryParseTableField(), }; PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::ParseTable const - TableStruct::schema[] = { - { NULL, NULL, 0, -1, -1, false }, + TableStruct::schema[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + { NULL, NULL, 0, -1, -1, -1, -1, NULL, false }, }; -const ::google::protobuf::uint32 TableStruct::offsets[] = { +const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MaterialsData, _internal_metadata_), ~0u, // no _extensions_ @@ -53,8 +56,7 @@ const ::google::protobuf::uint32 TableStruct::offsets[] = { GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MaterialsData, species_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MaterialsData, genetics_), }; - -static const ::google::protobuf::internal::MigrationSchema schemas[] = { +static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { { 0, -1, sizeof(MaterialsData)}, }; @@ -84,12 +86,6 @@ void protobuf_RegisterTypes(const ::std::string&) { } } // namespace - -void TableStruct::Shutdown() { - _MaterialsData_default_instance_.Shutdown(); - delete file_level_metadata[0].reflection; -} - void TableStruct::InitDefaultsImpl() { GOOGLE_PROTOBUF_VERIFY_VERSION; @@ -97,8 +93,9 @@ void TableStruct::InitDefaultsImpl() { ::protobuf_structs_2fGrow_2eproto::InitDefaults(); ::protobuf_structs_2fSpecies_2eproto::InitDefaults(); ::protobuf_structs_2fGenetics_2eproto::InitDefaults(); - _MaterialsData_default_instance_.DefaultConstruct(); - _MaterialsData_default_instance_.get_mutable()->genetics_ = const_cast< ::Genetics*>( + _MaterialsData_default_instance_._instance.DefaultConstruct(); + ::google::protobuf::internal::OnShutdownDestroyMessage( + &_MaterialsData_default_instance_);_MaterialsData_default_instance_._instance.get_mutable()->genetics_ = const_cast< ::Genetics*>( ::Genetics::internal_default_instance()); } @@ -106,9 +103,10 @@ void InitDefaults() { static GOOGLE_PROTOBUF_DECLARE_ONCE(once); ::google::protobuf::GoogleOnceInit(&once, &TableStruct::InitDefaultsImpl); } +namespace { void AddDescriptorsImpl() { InitDefaults(); - static const char descriptor[] = { + static const char descriptor[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { "\n\033content/MaterialsData.proto\032\022structs/G" "row.proto\032\025structs/Species.proto\032\026struct" "s/Genetics.proto\"q\n\rMaterialsData\022\023\n\013ing" @@ -124,14 +122,14 @@ void AddDescriptorsImpl() { ::protobuf_structs_2fGrow_2eproto::AddDescriptors(); ::protobuf_structs_2fSpecies_2eproto::AddDescriptors(); ::protobuf_structs_2fGenetics_2eproto::AddDescriptors(); - ::google::protobuf::internal::OnShutdown(&TableStruct::Shutdown); } +} // anonymous namespace void AddDescriptors() { static GOOGLE_PROTOBUF_DECLARE_ONCE(once); ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl); } -// Force AddDescriptors() to be called at static initialization time. +// Force AddDescriptors() to be called at dynamic initialization time. struct StaticDescriptorInitializer { StaticDescriptorInitializer() { AddDescriptors(); @@ -209,9 +207,7 @@ MaterialsData::MaterialsData(::google::protobuf::Arena* arena) : ::google::protobuf::Message(), _internal_metadata_(arena), ingredients_(arena) { -#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER protobuf_content_2fMaterialsData_2eproto::InitDefaults(); -#endif // GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:MaterialsData) @@ -228,14 +224,15 @@ MaterialsData::MaterialsData(const MaterialsData& from) genetics_ = NULL; } ::memcpy(&grow_, &from.grow_, - reinterpret_cast(&species_) - - reinterpret_cast(&grow_) + sizeof(species_)); + static_cast(reinterpret_cast(&species_) - + reinterpret_cast(&grow_)) + sizeof(species_)); // @@protoc_insertion_point(copy_constructor:MaterialsData) } void MaterialsData::SharedCtor() { - ::memset(&genetics_, 0, reinterpret_cast(&species_) - - reinterpret_cast(&genetics_) + sizeof(species_)); + ::memset(&genetics_, 0, static_cast( + reinterpret_cast(&species_) - + reinterpret_cast(&genetics_)) + sizeof(species_)); _cached_size_ = 0; } @@ -246,13 +243,12 @@ MaterialsData::~MaterialsData() { void MaterialsData::SharedDtor() { ::google::protobuf::Arena* arena = GetArenaNoVirtual(); + GOOGLE_DCHECK(arena == NULL); if (arena != NULL) { return; } - if (this != internal_default_instance()) { - delete genetics_; - } + if (this != internal_default_instance()) delete genetics_; } void MaterialsData::ArenaDtor(void* object) { @@ -282,13 +278,19 @@ MaterialsData* MaterialsData::New(::google::protobuf::Arena* arena) const { void MaterialsData::Clear() { // @@protoc_insertion_point(message_clear_start:MaterialsData) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + ingredients_.Clear(); if (GetArenaNoVirtual() == NULL && genetics_ != NULL) { delete genetics_; } genetics_ = NULL; - ::memset(&grow_, 0, reinterpret_cast(&species_) - - reinterpret_cast(&grow_) + sizeof(species_)); + ::memset(&grow_, 0, static_cast( + reinterpret_cast(&species_) - + reinterpret_cast(&grow_)) + sizeof(species_)); + _internal_metadata_.Clear(); } bool MaterialsData::MergePartialFromCodedStream( @@ -304,12 +306,12 @@ bool MaterialsData::MergePartialFromCodedStream( // repeated string ingredients = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(10u)) { + static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->add_ingredients())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->ingredients(this->ingredients_size() - 1).data(), - this->ingredients(this->ingredients_size() - 1).length(), + static_cast(this->ingredients(this->ingredients_size() - 1).length()), ::google::protobuf::internal::WireFormatLite::PARSE, "MaterialsData.ingredients")); } else { @@ -321,7 +323,7 @@ bool MaterialsData::MergePartialFromCodedStream( // .Grow grow = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(16u)) { + static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) { int value; DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( @@ -336,7 +338,7 @@ bool MaterialsData::MergePartialFromCodedStream( // .Species species = 3; case 3: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(24u)) { + static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) { int value; DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( @@ -351,7 +353,7 @@ bool MaterialsData::MergePartialFromCodedStream( // .Genetics genetics = 4; case 4: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(34u)) { + static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, mutable_genetics())); } else { @@ -362,12 +364,11 @@ bool MaterialsData::MergePartialFromCodedStream( default: { handle_unusual: - if (tag == 0 || - ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + if (tag == 0) { goto success; } - DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } @@ -390,7 +391,7 @@ void MaterialsData::SerializeWithCachedSizes( // repeated string ingredients = 1; for (int i = 0, n = this->ingredients_size(); i < n; i++) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->ingredients(i).data(), this->ingredients(i).length(), + this->ingredients(i).data(), static_cast(this->ingredients(i).length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "MaterialsData.ingredients"); ::google::protobuf::internal::WireFormatLite::WriteString( @@ -415,6 +416,10 @@ void MaterialsData::SerializeWithCachedSizes( 4, *this->genetics_, output); } + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); + } // @@protoc_insertion_point(serialize_end:MaterialsData) } @@ -428,7 +433,7 @@ ::google::protobuf::uint8* MaterialsData::InternalSerializeWithCachedSizesToArra // repeated string ingredients = 1; for (int i = 0, n = this->ingredients_size(); i < n; i++) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->ingredients(i).data(), this->ingredients(i).length(), + this->ingredients(i).data(), static_cast(this->ingredients(i).length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "MaterialsData.ingredients"); target = ::google::protobuf::internal::WireFormatLite:: @@ -454,6 +459,10 @@ ::google::protobuf::uint8* MaterialsData::InternalSerializeWithCachedSizesToArra 4, *this->genetics_, deterministic, target); } + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); + } // @@protoc_insertion_point(serialize_to_array_end:MaterialsData) return target; } @@ -462,6 +471,11 @@ size_t MaterialsData::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:MaterialsData) size_t total_size = 0; + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); + } // repeated string ingredients = 1; total_size += 1 * ::google::protobuf::internal::FromIntSize(this->ingredients_size()); @@ -568,11 +582,13 @@ void MaterialsData::UnsafeArenaSwap(MaterialsData* other) { InternalSwap(other); } void MaterialsData::InternalSwap(MaterialsData* other) { + using std::swap; ingredients_.InternalSwap(&other->ingredients_); - std::swap(genetics_, other->genetics_); - std::swap(grow_, other->grow_); - std::swap(species_, other->species_); - std::swap(_cached_size_, other->_cached_size_); + swap(genetics_, other->genetics_); + swap(grow_, other->grow_); + swap(species_, other->species_); + _internal_metadata_.Swap(&other->_internal_metadata_); + swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata MaterialsData::GetMetadata() const { @@ -689,9 +705,10 @@ void MaterialsData::clear_genetics() { genetics_ = NULL; } const ::Genetics& MaterialsData::genetics() const { + const ::Genetics* p = genetics_; // @@protoc_insertion_point(field_get:MaterialsData.genetics) - return genetics_ != NULL ? *genetics_ - : *::Genetics::internal_default_instance(); + return p != NULL ? *p : *reinterpret_cast( + &::_Genetics_default_instance_); } ::Genetics* MaterialsData::mutable_genetics() { diff --git a/languages/cpp/content/MaterialsData.pb.h b/languages/cpp/content/MaterialsData.pb.h index d4908f2..14a7130 100644 --- a/languages/cpp/content/MaterialsData.pb.h +++ b/languages/cpp/content/MaterialsData.pb.h @@ -8,12 +8,12 @@ #include -#if GOOGLE_PROTOBUF_VERSION < 3003000 +#if GOOGLE_PROTOBUF_VERSION < 3004000 #error This file was generated by a newer version of protoc which is #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 3003002 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#if 3004000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION #error This file was generated by an older version of protoc which is #error incompatible with your Protocol Buffer headers. Please #error regenerate this file with a newer version of protoc. @@ -33,9 +33,6 @@ #include "structs/Species.pb.h" #include "structs/Genetics.pb.h" // @@protoc_insertion_point(includes) -class Genetics; -class GeneticsDefaultTypeInternal; -extern GeneticsDefaultTypeInternal _Genetics_default_instance_; class MaterialsData; class MaterialsDataDefaultTypeInternal; extern MaterialsDataDefaultTypeInternal _MaterialsData_default_instance_; @@ -47,8 +44,9 @@ struct TableStruct { static const ::google::protobuf::internal::AuxillaryParseTableField aux[]; static const ::google::protobuf::internal::ParseTable schema[]; static const ::google::protobuf::uint32 offsets[]; + static const ::google::protobuf::internal::FieldMetadata field_metadata[]; + static const ::google::protobuf::internal::SerializationTable serialization_table[]; static void InitDefaultsImpl(); - static void Shutdown(); }; void AddDescriptors(); void InitDefaults(); @@ -67,7 +65,21 @@ class MaterialsData : public ::google::protobuf::Message /* @@protoc_insertion_p CopyFrom(from); return *this; } + #if LANG_CXX11 + MaterialsData(MaterialsData&& from) noexcept + : MaterialsData() { + *this = ::std::move(from); + } + inline MaterialsData& operator=(MaterialsData&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif inline ::google::protobuf::Arena* GetArena() const PROTOBUF_FINAL { return GetArenaNoVirtual(); } @@ -86,6 +98,9 @@ class MaterialsData : public ::google::protobuf::Message /* @@protoc_insertion_p void UnsafeArenaSwap(MaterialsData* other); void Swap(MaterialsData* other); + friend void swap(MaterialsData& a, MaterialsData& b) { + a.Swap(&b); + } // implements Message ---------------------------------------------- @@ -188,7 +203,7 @@ class MaterialsData : public ::google::protobuf::Message /* @@protoc_insertion_p private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - friend class ::google::protobuf::Arena; + template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; ::google::protobuf::RepeatedPtrField< ::std::string> ingredients_; @@ -204,6 +219,10 @@ class MaterialsData : public ::google::protobuf::Message /* @@protoc_insertion_p // =================================================================== #if !PROTOBUF_INLINE_NOT_IN_HEADERS +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ // MaterialsData // repeated string ingredients = 1; @@ -312,9 +331,10 @@ inline void MaterialsData::clear_genetics() { genetics_ = NULL; } inline const ::Genetics& MaterialsData::genetics() const { + const ::Genetics* p = genetics_; // @@protoc_insertion_point(field_get:MaterialsData.genetics) - return genetics_ != NULL ? *genetics_ - : *::Genetics::internal_default_instance(); + return p != NULL ? *p : *reinterpret_cast( + &::_Genetics_default_instance_); } inline ::Genetics* MaterialsData::mutable_genetics() { @@ -352,6 +372,9 @@ inline void MaterialsData::set_allocated_genetics(::Genetics* genetics) { // @@protoc_insertion_point(field_set_allocated:MaterialsData.genetics) } +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ #endif // !PROTOBUF_INLINE_NOT_IN_HEADERS // @@protoc_insertion_point(namespace_scope) diff --git a/languages/cpp/content/Name.pb.cc b/languages/cpp/content/Name.pb.cc index 3819f09..e6e9687 100644 --- a/languages/cpp/content/Name.pb.cc +++ b/languages/cpp/content/Name.pb.cc @@ -16,7 +16,10 @@ #include #include // @@protoc_insertion_point(includes) -class NameDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed { +class NameDefaultTypeInternal { +public: + ::google::protobuf::internal::ExplicitlyConstructed + _instance; } _Name_default_instance_; namespace protobuf_content_2fName_2eproto { @@ -29,20 +32,20 @@ ::google::protobuf::Metadata file_level_metadata[1]; } // namespace PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::ParseTableField - const TableStruct::entries[] = { + const TableStruct::entries[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { {0, 0, 0, ::google::protobuf::internal::kInvalidMask, 0, 0}, }; PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::AuxillaryParseTableField - const TableStruct::aux[] = { + const TableStruct::aux[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { ::google::protobuf::internal::AuxillaryParseTableField(), }; PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::ParseTable const - TableStruct::schema[] = { - { NULL, NULL, 0, -1, -1, false }, + TableStruct::schema[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + { NULL, NULL, 0, -1, -1, -1, -1, NULL, false }, }; -const ::google::protobuf::uint32 TableStruct::offsets[] = { +const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Name, _internal_metadata_), ~0u, // no _extensions_ @@ -51,8 +54,7 @@ const ::google::protobuf::uint32 TableStruct::offsets[] = { GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Name, primary_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Name, display_), }; - -static const ::google::protobuf::internal::MigrationSchema schemas[] = { +static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { { 0, -1, sizeof(Name)}, }; @@ -82,26 +84,22 @@ void protobuf_RegisterTypes(const ::std::string&) { } } // namespace - -void TableStruct::Shutdown() { - _Name_default_instance_.Shutdown(); - delete file_level_metadata[0].reflection; -} - void TableStruct::InitDefaultsImpl() { GOOGLE_PROTOBUF_VERIFY_VERSION; ::google::protobuf::internal::InitProtobufDefaults(); - _Name_default_instance_.DefaultConstruct(); -} + _Name_default_instance_._instance.DefaultConstruct(); + ::google::protobuf::internal::OnShutdownDestroyMessage( + &_Name_default_instance_);} void InitDefaults() { static GOOGLE_PROTOBUF_DECLARE_ONCE(once); ::google::protobuf::GoogleOnceInit(&once, &TableStruct::InitDefaultsImpl); } +namespace { void AddDescriptorsImpl() { InitDefaults(); - static const char descriptor[] = { + static const char descriptor[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { "\n\022content/Name.proto\"(\n\004Name\022\017\n\007primary\030" "\001 \001(\t\022\017\n\007display\030\002 \001(\tB0\n\032io.bloombox.sc" "hema.contentB\013NameContentH\001P\001\370\001\001b\006proto3" @@ -110,14 +108,14 @@ void AddDescriptorsImpl() { descriptor, 120); ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( "content/Name.proto", &protobuf_RegisterTypes); - ::google::protobuf::internal::OnShutdown(&TableStruct::Shutdown); } +} // anonymous namespace void AddDescriptors() { static GOOGLE_PROTOBUF_DECLARE_ONCE(once); ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl); } -// Force AddDescriptors() to be called at static initialization time. +// Force AddDescriptors() to be called at dynamic initialization time. struct StaticDescriptorInitializer { StaticDescriptorInitializer() { AddDescriptors(); @@ -145,9 +143,7 @@ Name::Name() Name::Name(::google::protobuf::Arena* arena) : ::google::protobuf::Message(), _internal_metadata_(arena) { -#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER protobuf_content_2fName_2eproto::InitDefaults(); -#endif // GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:Name) @@ -183,6 +179,7 @@ Name::~Name() { void Name::SharedDtor() { ::google::protobuf::Arena* arena = GetArenaNoVirtual(); + GOOGLE_DCHECK(arena == NULL); if (arena != NULL) { return; } @@ -218,8 +215,13 @@ Name* Name::New(::google::protobuf::Arena* arena) const { void Name::Clear() { // @@protoc_insertion_point(message_clear_start:Name) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + primary_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); display_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + _internal_metadata_.Clear(); } bool Name::MergePartialFromCodedStream( @@ -235,11 +237,11 @@ bool Name::MergePartialFromCodedStream( // string primary = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(10u)) { + static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_primary())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->primary().data(), this->primary().length(), + this->primary().data(), static_cast(this->primary().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "Name.primary")); } else { @@ -251,11 +253,11 @@ bool Name::MergePartialFromCodedStream( // string display = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(18u)) { + static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_display())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->display().data(), this->display().length(), + this->display().data(), static_cast(this->display().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "Name.display")); } else { @@ -266,12 +268,11 @@ bool Name::MergePartialFromCodedStream( default: { handle_unusual: - if (tag == 0 || - ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + if (tag == 0) { goto success; } - DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } @@ -294,7 +295,7 @@ void Name::SerializeWithCachedSizes( // string primary = 1; if (this->primary().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->primary().data(), this->primary().length(), + this->primary().data(), static_cast(this->primary().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "Name.primary"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( @@ -304,13 +305,17 @@ void Name::SerializeWithCachedSizes( // string display = 2; if (this->display().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->display().data(), this->display().length(), + this->display().data(), static_cast(this->display().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "Name.display"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 2, this->display(), output); } + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); + } // @@protoc_insertion_point(serialize_end:Name) } @@ -324,7 +329,7 @@ ::google::protobuf::uint8* Name::InternalSerializeWithCachedSizesToArray( // string primary = 1; if (this->primary().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->primary().data(), this->primary().length(), + this->primary().data(), static_cast(this->primary().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "Name.primary"); target = @@ -335,7 +340,7 @@ ::google::protobuf::uint8* Name::InternalSerializeWithCachedSizesToArray( // string display = 2; if (this->display().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->display().data(), this->display().length(), + this->display().data(), static_cast(this->display().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "Name.display"); target = @@ -343,6 +348,10 @@ ::google::protobuf::uint8* Name::InternalSerializeWithCachedSizesToArray( 2, this->display(), target); } + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); + } // @@protoc_insertion_point(serialize_to_array_end:Name) return target; } @@ -351,6 +360,11 @@ size_t Name::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:Name) size_t total_size = 0; + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); + } // string primary = 1; if (this->primary().size() > 0) { total_size += 1 + @@ -440,9 +454,11 @@ void Name::UnsafeArenaSwap(Name* other) { InternalSwap(other); } void Name::InternalSwap(Name* other) { + using std::swap; primary_.Swap(&other->primary_); display_.Swap(&other->display_); - std::swap(_cached_size_, other->_cached_size_); + _internal_metadata_.Swap(&other->_internal_metadata_); + swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata Name::GetMetadata() const { @@ -466,6 +482,14 @@ void Name::set_primary(const ::std::string& value) { primary_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set:Name.primary) } +#if LANG_CXX11 +void Name::set_primary(::std::string&& value) { + + primary_.Set( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_rvalue:Name.primary) +} +#endif void Name::set_primary(const char* value) { GOOGLE_DCHECK(value != NULL); @@ -533,6 +557,14 @@ void Name::set_display(const ::std::string& value) { display_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set:Name.display) } +#if LANG_CXX11 +void Name::set_display(::std::string&& value) { + + display_.Set( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_rvalue:Name.display) +} +#endif void Name::set_display(const char* value) { GOOGLE_DCHECK(value != NULL); diff --git a/languages/cpp/content/Name.pb.h b/languages/cpp/content/Name.pb.h index 4afa12f..117170a 100644 --- a/languages/cpp/content/Name.pb.h +++ b/languages/cpp/content/Name.pb.h @@ -8,12 +8,12 @@ #include -#if GOOGLE_PROTOBUF_VERSION < 3003000 +#if GOOGLE_PROTOBUF_VERSION < 3004000 #error This file was generated by a newer version of protoc which is #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 3003002 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#if 3004000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION #error This file was generated by an older version of protoc which is #error incompatible with your Protocol Buffer headers. Please #error regenerate this file with a newer version of protoc. @@ -41,8 +41,9 @@ struct TableStruct { static const ::google::protobuf::internal::AuxillaryParseTableField aux[]; static const ::google::protobuf::internal::ParseTable schema[]; static const ::google::protobuf::uint32 offsets[]; + static const ::google::protobuf::internal::FieldMetadata field_metadata[]; + static const ::google::protobuf::internal::SerializationTable serialization_table[]; static void InitDefaultsImpl(); - static void Shutdown(); }; void AddDescriptors(); void InitDefaults(); @@ -61,7 +62,21 @@ class Name : public ::google::protobuf::Message /* @@protoc_insertion_point(clas CopyFrom(from); return *this; } + #if LANG_CXX11 + Name(Name&& from) noexcept + : Name() { + *this = ::std::move(from); + } + inline Name& operator=(Name&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif inline ::google::protobuf::Arena* GetArena() const PROTOBUF_FINAL { return GetArenaNoVirtual(); } @@ -80,6 +95,9 @@ class Name : public ::google::protobuf::Message /* @@protoc_insertion_point(clas void UnsafeArenaSwap(Name* other); void Swap(Name* other); + friend void swap(Name& a, Name& b) { + a.Swap(&b); + } // implements Message ---------------------------------------------- @@ -131,6 +149,9 @@ class Name : public ::google::protobuf::Message /* @@protoc_insertion_point(clas static const int kPrimaryFieldNumber = 1; const ::std::string& primary() const; void set_primary(const ::std::string& value); + #if LANG_CXX11 + void set_primary(::std::string&& value); + #endif void set_primary(const char* value); void set_primary(const char* value, size_t size); ::std::string* mutable_primary(); @@ -145,6 +166,9 @@ class Name : public ::google::protobuf::Message /* @@protoc_insertion_point(clas static const int kDisplayFieldNumber = 2; const ::std::string& display() const; void set_display(const ::std::string& value); + #if LANG_CXX11 + void set_display(::std::string&& value); + #endif void set_display(const char* value); void set_display(const char* value, size_t size); ::std::string* mutable_display(); @@ -158,7 +182,7 @@ class Name : public ::google::protobuf::Message /* @@protoc_insertion_point(clas private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - friend class ::google::protobuf::Arena; + template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; ::google::protobuf::internal::ArenaStringPtr primary_; @@ -172,6 +196,10 @@ class Name : public ::google::protobuf::Message /* @@protoc_insertion_point(clas // =================================================================== #if !PROTOBUF_INLINE_NOT_IN_HEADERS +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ // Name // string primary = 1; @@ -187,6 +215,14 @@ inline void Name::set_primary(const ::std::string& value) { primary_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set:Name.primary) } +#if LANG_CXX11 +inline void Name::set_primary(::std::string&& value) { + + primary_.Set( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_rvalue:Name.primary) +} +#endif inline void Name::set_primary(const char* value) { GOOGLE_DCHECK(value != NULL); @@ -254,6 +290,14 @@ inline void Name::set_display(const ::std::string& value) { display_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set:Name.display) } +#if LANG_CXX11 +inline void Name::set_display(::std::string&& value) { + + display_.Set( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_rvalue:Name.display) +} +#endif inline void Name::set_display(const char* value) { GOOGLE_DCHECK(value != NULL); @@ -308,6 +352,9 @@ inline void Name::unsafe_arena_set_allocated_display( // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Name.display) } +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ #endif // !PROTOBUF_INLINE_NOT_IN_HEADERS // @@protoc_insertion_point(namespace_scope) diff --git a/languages/cpp/content/ProductContent.pb.cc b/languages/cpp/content/ProductContent.pb.cc index 6f9059c..44e667e 100644 --- a/languages/cpp/content/ProductContent.pb.cc +++ b/languages/cpp/content/ProductContent.pb.cc @@ -16,7 +16,10 @@ #include #include // @@protoc_insertion_point(includes) -class ProductContentDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed { +class ProductContentDefaultTypeInternal { +public: + ::google::protobuf::internal::ExplicitlyConstructed + _instance; } _ProductContent_default_instance_; namespace protobuf_content_2fProductContent_2eproto { @@ -29,20 +32,20 @@ ::google::protobuf::Metadata file_level_metadata[1]; } // namespace PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::ParseTableField - const TableStruct::entries[] = { + const TableStruct::entries[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { {0, 0, 0, ::google::protobuf::internal::kInvalidMask, 0, 0}, }; PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::AuxillaryParseTableField - const TableStruct::aux[] = { + const TableStruct::aux[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { ::google::protobuf::internal::AuxillaryParseTableField(), }; PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::ParseTable const - TableStruct::schema[] = { - { NULL, NULL, 0, -1, -1, false }, + TableStruct::schema[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + { NULL, NULL, 0, -1, -1, -1, -1, NULL, false }, }; -const ::google::protobuf::uint32 TableStruct::offsets[] = { +const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ProductContent, _internal_metadata_), ~0u, // no _extensions_ @@ -56,8 +59,7 @@ const ::google::protobuf::uint32 TableStruct::offsets[] = { GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ProductContent, dosage_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ProductContent, advice_), }; - -static const ::google::protobuf::internal::MigrationSchema schemas[] = { +static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { { 0, -1, sizeof(ProductContent)}, }; @@ -87,12 +89,6 @@ void protobuf_RegisterTypes(const ::std::string&) { } } // namespace - -void TableStruct::Shutdown() { - _ProductContent_default_instance_.Shutdown(); - delete file_level_metadata[0].reflection; -} - void TableStruct::InitDefaultsImpl() { GOOGLE_PROTOBUF_VERIFY_VERSION; @@ -101,18 +97,19 @@ void TableStruct::InitDefaultsImpl() { ::protobuf_content_2fContent_2eproto::InitDefaults(); ::protobuf_content_2fBrand_2eproto::InitDefaults(); ::protobuf_media_2fMediaItem_2eproto::InitDefaults(); - _ProductContent_default_instance_.DefaultConstruct(); - _ProductContent_default_instance_.get_mutable()->name_ = const_cast< ::Name*>( + _ProductContent_default_instance_._instance.DefaultConstruct(); + ::google::protobuf::internal::OnShutdownDestroyMessage( + &_ProductContent_default_instance_);_ProductContent_default_instance_._instance.get_mutable()->name_ = const_cast< ::Name*>( ::Name::internal_default_instance()); - _ProductContent_default_instance_.get_mutable()->summary_ = const_cast< ::Content*>( + _ProductContent_default_instance_._instance.get_mutable()->summary_ = const_cast< ::Content*>( ::Content::internal_default_instance()); - _ProductContent_default_instance_.get_mutable()->brand_ = const_cast< ::Brand*>( + _ProductContent_default_instance_._instance.get_mutable()->brand_ = const_cast< ::Brand*>( ::Brand::internal_default_instance()); - _ProductContent_default_instance_.get_mutable()->usage_ = const_cast< ::Content*>( + _ProductContent_default_instance_._instance.get_mutable()->usage_ = const_cast< ::Content*>( ::Content::internal_default_instance()); - _ProductContent_default_instance_.get_mutable()->dosage_ = const_cast< ::Content*>( + _ProductContent_default_instance_._instance.get_mutable()->dosage_ = const_cast< ::Content*>( ::Content::internal_default_instance()); - _ProductContent_default_instance_.get_mutable()->advice_ = const_cast< ::Content*>( + _ProductContent_default_instance_._instance.get_mutable()->advice_ = const_cast< ::Content*>( ::Content::internal_default_instance()); } @@ -120,9 +117,10 @@ void InitDefaults() { static GOOGLE_PROTOBUF_DECLARE_ONCE(once); ::google::protobuf::GoogleOnceInit(&once, &TableStruct::InitDefaultsImpl); } +namespace { void AddDescriptorsImpl() { InitDefaults(); - static const char descriptor[] = { + static const char descriptor[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { "\n\034content/ProductContent.proto\032\022content/" "Name.proto\032\025content/Content.proto\032\023conte" "nt/Brand.proto\032\025media/MediaItem.proto\"\277\001" @@ -142,14 +140,14 @@ void AddDescriptorsImpl() { ::protobuf_content_2fContent_2eproto::AddDescriptors(); ::protobuf_content_2fBrand_2eproto::AddDescriptors(); ::protobuf_media_2fMediaItem_2eproto::AddDescriptors(); - ::google::protobuf::internal::OnShutdown(&TableStruct::Shutdown); } +} // anonymous namespace void AddDescriptors() { static GOOGLE_PROTOBUF_DECLARE_ONCE(once); ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl); } -// Force AddDescriptors() to be called at static initialization time. +// Force AddDescriptors() to be called at dynamic initialization time. struct StaticDescriptorInitializer { StaticDescriptorInitializer() { AddDescriptors(); @@ -465,9 +463,7 @@ ProductContent::ProductContent(::google::protobuf::Arena* arena) : ::google::protobuf::Message(), _internal_metadata_(arena), media_(arena) { -#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER protobuf_content_2fProductContent_2eproto::InitDefaults(); -#endif // GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:ProductContent) @@ -512,8 +508,9 @@ ProductContent::ProductContent(const ProductContent& from) } void ProductContent::SharedCtor() { - ::memset(&name_, 0, reinterpret_cast(&advice_) - - reinterpret_cast(&name_) + sizeof(advice_)); + ::memset(&name_, 0, static_cast( + reinterpret_cast(&advice_) - + reinterpret_cast(&name_)) + sizeof(advice_)); _cached_size_ = 0; } @@ -524,28 +521,17 @@ ProductContent::~ProductContent() { void ProductContent::SharedDtor() { ::google::protobuf::Arena* arena = GetArenaNoVirtual(); + GOOGLE_DCHECK(arena == NULL); if (arena != NULL) { return; } - if (this != internal_default_instance()) { - delete name_; - } - if (this != internal_default_instance()) { - delete summary_; - } - if (this != internal_default_instance()) { - delete brand_; - } - if (this != internal_default_instance()) { - delete usage_; - } - if (this != internal_default_instance()) { - delete dosage_; - } - if (this != internal_default_instance()) { - delete advice_; - } + if (this != internal_default_instance()) delete name_; + if (this != internal_default_instance()) delete summary_; + if (this != internal_default_instance()) delete brand_; + if (this != internal_default_instance()) delete usage_; + if (this != internal_default_instance()) delete dosage_; + if (this != internal_default_instance()) delete advice_; } void ProductContent::ArenaDtor(void* object) { @@ -575,6 +561,10 @@ ProductContent* ProductContent::New(::google::protobuf::Arena* arena) const { void ProductContent::Clear() { // @@protoc_insertion_point(message_clear_start:ProductContent) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + media_.Clear(); if (GetArenaNoVirtual() == NULL && name_ != NULL) { delete name_; @@ -600,6 +590,7 @@ void ProductContent::Clear() { delete advice_; } advice_ = NULL; + _internal_metadata_.Clear(); } bool ProductContent::MergePartialFromCodedStream( @@ -615,7 +606,7 @@ bool ProductContent::MergePartialFromCodedStream( // .Name name = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(10u)) { + static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, mutable_name())); } else { @@ -627,7 +618,7 @@ bool ProductContent::MergePartialFromCodedStream( // .Content summary = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(18u)) { + static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, mutable_summary())); } else { @@ -639,7 +630,7 @@ bool ProductContent::MergePartialFromCodedStream( // .Brand brand = 3; case 3: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(26u)) { + static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, mutable_brand())); } else { @@ -651,7 +642,7 @@ bool ProductContent::MergePartialFromCodedStream( // repeated .MediaItem media = 20; case 20: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(162u)) { + static_cast< ::google::protobuf::uint8>(162u /* 162 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, add_media())); } else { @@ -663,7 +654,7 @@ bool ProductContent::MergePartialFromCodedStream( // .Content usage = 30; case 30: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(242u)) { + static_cast< ::google::protobuf::uint8>(242u /* 242 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, mutable_usage())); } else { @@ -675,7 +666,7 @@ bool ProductContent::MergePartialFromCodedStream( // .Content dosage = 31; case 31: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(250u)) { + static_cast< ::google::protobuf::uint8>(250u /* 250 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, mutable_dosage())); } else { @@ -687,7 +678,7 @@ bool ProductContent::MergePartialFromCodedStream( // .Content advice = 32; case 32: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(258u)) { + static_cast< ::google::protobuf::uint8>(2u /* 258 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, mutable_advice())); } else { @@ -698,12 +689,11 @@ bool ProductContent::MergePartialFromCodedStream( default: { handle_unusual: - if (tag == 0 || - ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + if (tag == 0) { goto success; } - DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } @@ -742,9 +732,10 @@ void ProductContent::SerializeWithCachedSizes( } // repeated .MediaItem media = 20; - for (unsigned int i = 0, n = this->media_size(); i < n; i++) { + for (unsigned int i = 0, + n = static_cast(this->media_size()); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 20, this->media(i), output); + 20, this->media(static_cast(i)), output); } // .Content usage = 30; @@ -765,6 +756,10 @@ void ProductContent::SerializeWithCachedSizes( 32, *this->advice_, output); } + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); + } // @@protoc_insertion_point(serialize_end:ProductContent) } @@ -797,10 +792,11 @@ ::google::protobuf::uint8* ProductContent::InternalSerializeWithCachedSizesToArr } // repeated .MediaItem media = 20; - for (unsigned int i = 0, n = this->media_size(); i < n; i++) { + for (unsigned int i = 0, + n = static_cast(this->media_size()); i < n; i++) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageNoVirtualToArray( - 20, this->media(i), deterministic, target); + 20, this->media(static_cast(i)), deterministic, target); } // .Content usage = 30; @@ -824,6 +820,10 @@ ::google::protobuf::uint8* ProductContent::InternalSerializeWithCachedSizesToArr 32, *this->advice_, deterministic, target); } + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); + } // @@protoc_insertion_point(serialize_to_array_end:ProductContent) return target; } @@ -832,14 +832,19 @@ size_t ProductContent::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:ProductContent) size_t total_size = 0; + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); + } // repeated .MediaItem media = 20; { - unsigned int count = this->media_size(); + unsigned int count = static_cast(this->media_size()); total_size += 2UL * count; for (unsigned int i = 0; i < count; i++) { total_size += ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->media(i)); + this->media(static_cast(i))); } } @@ -973,14 +978,16 @@ void ProductContent::UnsafeArenaSwap(ProductContent* other) { InternalSwap(other); } void ProductContent::InternalSwap(ProductContent* other) { + using std::swap; media_.InternalSwap(&other->media_); - std::swap(name_, other->name_); - std::swap(summary_, other->summary_); - std::swap(brand_, other->brand_); - std::swap(usage_, other->usage_); - std::swap(dosage_, other->dosage_); - std::swap(advice_, other->advice_); - std::swap(_cached_size_, other->_cached_size_); + swap(name_, other->name_); + swap(summary_, other->summary_); + swap(brand_, other->brand_); + swap(usage_, other->usage_); + swap(dosage_, other->dosage_); + swap(advice_, other->advice_); + _internal_metadata_.Swap(&other->_internal_metadata_); + swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata ProductContent::GetMetadata() const { @@ -1000,9 +1007,10 @@ void ProductContent::clear_name() { name_ = NULL; } const ::Name& ProductContent::name() const { + const ::Name* p = name_; // @@protoc_insertion_point(field_get:ProductContent.name) - return name_ != NULL ? *name_ - : *::Name::internal_default_instance(); + return p != NULL ? *p : *reinterpret_cast( + &::_Name_default_instance_); } ::Name* ProductContent::mutable_name() { @@ -1049,9 +1057,10 @@ void ProductContent::clear_summary() { summary_ = NULL; } const ::Content& ProductContent::summary() const { + const ::Content* p = summary_; // @@protoc_insertion_point(field_get:ProductContent.summary) - return summary_ != NULL ? *summary_ - : *::Content::internal_default_instance(); + return p != NULL ? *p : *reinterpret_cast( + &::_Content_default_instance_); } ::Content* ProductContent::mutable_summary() { @@ -1098,9 +1107,10 @@ void ProductContent::clear_brand() { brand_ = NULL; } const ::Brand& ProductContent::brand() const { + const ::Brand* p = brand_; // @@protoc_insertion_point(field_get:ProductContent.brand) - return brand_ != NULL ? *brand_ - : *::Brand::internal_default_instance(); + return p != NULL ? *p : *reinterpret_cast( + &::_Brand_default_instance_); } ::Brand* ProductContent::mutable_brand() { @@ -1177,9 +1187,10 @@ void ProductContent::clear_usage() { usage_ = NULL; } const ::Content& ProductContent::usage() const { + const ::Content* p = usage_; // @@protoc_insertion_point(field_get:ProductContent.usage) - return usage_ != NULL ? *usage_ - : *::Content::internal_default_instance(); + return p != NULL ? *p : *reinterpret_cast( + &::_Content_default_instance_); } ::Content* ProductContent::mutable_usage() { @@ -1226,9 +1237,10 @@ void ProductContent::clear_dosage() { dosage_ = NULL; } const ::Content& ProductContent::dosage() const { + const ::Content* p = dosage_; // @@protoc_insertion_point(field_get:ProductContent.dosage) - return dosage_ != NULL ? *dosage_ - : *::Content::internal_default_instance(); + return p != NULL ? *p : *reinterpret_cast( + &::_Content_default_instance_); } ::Content* ProductContent::mutable_dosage() { @@ -1275,9 +1287,10 @@ void ProductContent::clear_advice() { advice_ = NULL; } const ::Content& ProductContent::advice() const { + const ::Content* p = advice_; // @@protoc_insertion_point(field_get:ProductContent.advice) - return advice_ != NULL ? *advice_ - : *::Content::internal_default_instance(); + return p != NULL ? *p : *reinterpret_cast( + &::_Content_default_instance_); } ::Content* ProductContent::mutable_advice() { diff --git a/languages/cpp/content/ProductContent.pb.h b/languages/cpp/content/ProductContent.pb.h index d0da1d3..08fa546 100644 --- a/languages/cpp/content/ProductContent.pb.h +++ b/languages/cpp/content/ProductContent.pb.h @@ -8,12 +8,12 @@ #include -#if GOOGLE_PROTOBUF_VERSION < 3003000 +#if GOOGLE_PROTOBUF_VERSION < 3004000 #error This file was generated by a newer version of protoc which is #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 3003002 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#if 3004000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION #error This file was generated by an older version of protoc which is #error incompatible with your Protocol Buffer headers. Please #error regenerate this file with a newer version of protoc. @@ -34,18 +34,6 @@ #include "content/Brand.pb.h" #include "media/MediaItem.pb.h" // @@protoc_insertion_point(includes) -class Brand; -class BrandDefaultTypeInternal; -extern BrandDefaultTypeInternal _Brand_default_instance_; -class Content; -class ContentDefaultTypeInternal; -extern ContentDefaultTypeInternal _Content_default_instance_; -class MediaItem; -class MediaItemDefaultTypeInternal; -extern MediaItemDefaultTypeInternal _MediaItem_default_instance_; -class Name; -class NameDefaultTypeInternal; -extern NameDefaultTypeInternal _Name_default_instance_; class ProductContent; class ProductContentDefaultTypeInternal; extern ProductContentDefaultTypeInternal _ProductContent_default_instance_; @@ -57,8 +45,9 @@ struct TableStruct { static const ::google::protobuf::internal::AuxillaryParseTableField aux[]; static const ::google::protobuf::internal::ParseTable schema[]; static const ::google::protobuf::uint32 offsets[]; + static const ::google::protobuf::internal::FieldMetadata field_metadata[]; + static const ::google::protobuf::internal::SerializationTable serialization_table[]; static void InitDefaultsImpl(); - static void Shutdown(); }; void AddDescriptors(); void InitDefaults(); @@ -77,7 +66,21 @@ class ProductContent : public ::google::protobuf::Message /* @@protoc_insertion_ CopyFrom(from); return *this; } + #if LANG_CXX11 + ProductContent(ProductContent&& from) noexcept + : ProductContent() { + *this = ::std::move(from); + } + inline ProductContent& operator=(ProductContent&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif inline ::google::protobuf::Arena* GetArena() const PROTOBUF_FINAL { return GetArenaNoVirtual(); } @@ -96,6 +99,9 @@ class ProductContent : public ::google::protobuf::Message /* @@protoc_insertion_ void UnsafeArenaSwap(ProductContent* other); void Swap(ProductContent* other); + friend void swap(ProductContent& a, ProductContent& b) { + a.Swap(&b); + } // implements Message ---------------------------------------------- @@ -266,7 +272,7 @@ class ProductContent : public ::google::protobuf::Message /* @@protoc_insertion_ private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - friend class ::google::protobuf::Arena; + template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; ::google::protobuf::RepeatedPtrField< ::MediaItem > media_; @@ -285,6 +291,10 @@ class ProductContent : public ::google::protobuf::Message /* @@protoc_insertion_ // =================================================================== #if !PROTOBUF_INLINE_NOT_IN_HEADERS +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ // ProductContent // .Name name = 1; @@ -296,9 +306,10 @@ inline void ProductContent::clear_name() { name_ = NULL; } inline const ::Name& ProductContent::name() const { + const ::Name* p = name_; // @@protoc_insertion_point(field_get:ProductContent.name) - return name_ != NULL ? *name_ - : *::Name::internal_default_instance(); + return p != NULL ? *p : *reinterpret_cast( + &::_Name_default_instance_); } inline ::Name* ProductContent::mutable_name() { @@ -345,9 +356,10 @@ inline void ProductContent::clear_summary() { summary_ = NULL; } inline const ::Content& ProductContent::summary() const { + const ::Content* p = summary_; // @@protoc_insertion_point(field_get:ProductContent.summary) - return summary_ != NULL ? *summary_ - : *::Content::internal_default_instance(); + return p != NULL ? *p : *reinterpret_cast( + &::_Content_default_instance_); } inline ::Content* ProductContent::mutable_summary() { @@ -394,9 +406,10 @@ inline void ProductContent::clear_brand() { brand_ = NULL; } inline const ::Brand& ProductContent::brand() const { + const ::Brand* p = brand_; // @@protoc_insertion_point(field_get:ProductContent.brand) - return brand_ != NULL ? *brand_ - : *::Brand::internal_default_instance(); + return p != NULL ? *p : *reinterpret_cast( + &::_Brand_default_instance_); } inline ::Brand* ProductContent::mutable_brand() { @@ -473,9 +486,10 @@ inline void ProductContent::clear_usage() { usage_ = NULL; } inline const ::Content& ProductContent::usage() const { + const ::Content* p = usage_; // @@protoc_insertion_point(field_get:ProductContent.usage) - return usage_ != NULL ? *usage_ - : *::Content::internal_default_instance(); + return p != NULL ? *p : *reinterpret_cast( + &::_Content_default_instance_); } inline ::Content* ProductContent::mutable_usage() { @@ -522,9 +536,10 @@ inline void ProductContent::clear_dosage() { dosage_ = NULL; } inline const ::Content& ProductContent::dosage() const { + const ::Content* p = dosage_; // @@protoc_insertion_point(field_get:ProductContent.dosage) - return dosage_ != NULL ? *dosage_ - : *::Content::internal_default_instance(); + return p != NULL ? *p : *reinterpret_cast( + &::_Content_default_instance_); } inline ::Content* ProductContent::mutable_dosage() { @@ -571,9 +586,10 @@ inline void ProductContent::clear_advice() { advice_ = NULL; } inline const ::Content& ProductContent::advice() const { + const ::Content* p = advice_; // @@protoc_insertion_point(field_get:ProductContent.advice) - return advice_ != NULL ? *advice_ - : *::Content::internal_default_instance(); + return p != NULL ? *p : *reinterpret_cast( + &::_Content_default_instance_); } inline ::Content* ProductContent::mutable_advice() { @@ -611,6 +627,9 @@ inline void ProductContent::set_allocated_advice(::Content* advice) { // @@protoc_insertion_point(field_set_allocated:ProductContent.advice) } +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ #endif // !PROTOBUF_INLINE_NOT_IN_HEADERS // @@protoc_insertion_point(namespace_scope) diff --git a/languages/cpp/geo/Address.pb.cc b/languages/cpp/geo/Address.pb.cc new file mode 100644 index 0000000..0d1615e --- /dev/null +++ b/languages/cpp/geo/Address.pb.cc @@ -0,0 +1,997 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: geo/Address.proto + +#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION +#include "geo/Address.pb.h" + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +// @@protoc_insertion_point(includes) +class AddressDefaultTypeInternal { +public: + ::google::protobuf::internal::ExplicitlyConstructed
+ _instance; +} _Address_default_instance_; + +namespace protobuf_geo_2fAddress_2eproto { + + +namespace { + +::google::protobuf::Metadata file_level_metadata[1]; + +} // namespace + +PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::ParseTableField + const TableStruct::entries[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + {0, 0, 0, ::google::protobuf::internal::kInvalidMask, 0, 0}, +}; + +PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::AuxillaryParseTableField + const TableStruct::aux[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + ::google::protobuf::internal::AuxillaryParseTableField(), +}; +PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::ParseTable const + TableStruct::schema[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + { NULL, NULL, 0, -1, -1, -1, -1, NULL, false }, +}; + +const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + ~0u, // no _has_bits_ + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Address, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Address, first_line_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Address, second_line_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Address, city_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Address, state_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Address, zipcode_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Address, country_), +}; +static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + { 0, -1, sizeof(Address)}, +}; + +static ::google::protobuf::Message const * const file_default_instances[] = { + reinterpret_cast(&_Address_default_instance_), +}; + +namespace { + +void protobuf_AssignDescriptors() { + AddDescriptors(); + ::google::protobuf::MessageFactory* factory = NULL; + AssignDescriptors( + "geo/Address.proto", schemas, file_default_instances, TableStruct::offsets, factory, + file_level_metadata, NULL, NULL); +} + +void protobuf_AssignDescriptorsOnce() { + static GOOGLE_PROTOBUF_DECLARE_ONCE(once); + ::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors); +} + +void protobuf_RegisterTypes(const ::std::string&) GOOGLE_ATTRIBUTE_COLD; +void protobuf_RegisterTypes(const ::std::string&) { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 1); +} + +} // namespace +void TableStruct::InitDefaultsImpl() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + ::google::protobuf::internal::InitProtobufDefaults(); + _Address_default_instance_._instance.DefaultConstruct(); + ::google::protobuf::internal::OnShutdownDestroyMessage( + &_Address_default_instance_);} + +void InitDefaults() { + static GOOGLE_PROTOBUF_DECLARE_ONCE(once); + ::google::protobuf::GoogleOnceInit(&once, &TableStruct::InitDefaultsImpl); +} +namespace { +void AddDescriptorsImpl() { + InitDefaults(); + static const char descriptor[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + "\n\021geo/Address.proto\"q\n\007Address\022\022\n\nfirst_" + "line\030\001 \001(\t\022\023\n\013second_line\030\002 \001(\t\022\014\n\004city\030" + "\003 \001(\t\022\r\n\005state\030\004 \001(\t\022\017\n\007zipcode\030\005 \001(\t\022\017\n" + "\007country\030\006 \001(\tB\034\n\026io.bloombox.schema.geo" + "H\001P\001b\006proto3" + }; + ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( + descriptor, 172); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( + "geo/Address.proto", &protobuf_RegisterTypes); +} +} // anonymous namespace + +void AddDescriptors() { + static GOOGLE_PROTOBUF_DECLARE_ONCE(once); + ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl); +} +// Force AddDescriptors() to be called at dynamic initialization time. +struct StaticDescriptorInitializer { + StaticDescriptorInitializer() { + AddDescriptors(); + } +} static_descriptor_initializer; + +} // namespace protobuf_geo_2fAddress_2eproto + + +// =================================================================== + +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int Address::kFirstLineFieldNumber; +const int Address::kSecondLineFieldNumber; +const int Address::kCityFieldNumber; +const int Address::kStateFieldNumber; +const int Address::kZipcodeFieldNumber; +const int Address::kCountryFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +Address::Address() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { + protobuf_geo_2fAddress_2eproto::InitDefaults(); + } + SharedCtor(); + // @@protoc_insertion_point(constructor:Address) +} +Address::Address(const Address& from) + : ::google::protobuf::Message(), + _internal_metadata_(NULL), + _cached_size_(0) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + first_line_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (from.first_line().size() > 0) { + first_line_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.first_line_); + } + second_line_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (from.second_line().size() > 0) { + second_line_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.second_line_); + } + city_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (from.city().size() > 0) { + city_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.city_); + } + state_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (from.state().size() > 0) { + state_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.state_); + } + zipcode_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (from.zipcode().size() > 0) { + zipcode_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.zipcode_); + } + country_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (from.country().size() > 0) { + country_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.country_); + } + // @@protoc_insertion_point(copy_constructor:Address) +} + +void Address::SharedCtor() { + first_line_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + second_line_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + city_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + state_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + zipcode_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + country_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + _cached_size_ = 0; +} + +Address::~Address() { + // @@protoc_insertion_point(destructor:Address) + SharedDtor(); +} + +void Address::SharedDtor() { + first_line_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + second_line_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + city_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + state_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + zipcode_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + country_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + +void Address::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* Address::descriptor() { + protobuf_geo_2fAddress_2eproto::protobuf_AssignDescriptorsOnce(); + return protobuf_geo_2fAddress_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; +} + +const Address& Address::default_instance() { + protobuf_geo_2fAddress_2eproto::InitDefaults(); + return *internal_default_instance(); +} + +Address* Address::New(::google::protobuf::Arena* arena) const { + Address* n = new Address; + if (arena != NULL) { + arena->Own(n); + } + return n; +} + +void Address::Clear() { +// @@protoc_insertion_point(message_clear_start:Address) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + first_line_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + second_line_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + city_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + state_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + zipcode_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + country_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + _internal_metadata_.Clear(); +} + +bool Address::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:Address) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // string first_line = 1; + case 1: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_first_line())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->first_line().data(), static_cast(this->first_line().length()), + ::google::protobuf::internal::WireFormatLite::PARSE, + "Address.first_line")); + } else { + goto handle_unusual; + } + break; + } + + // string second_line = 2; + case 2: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_second_line())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->second_line().data(), static_cast(this->second_line().length()), + ::google::protobuf::internal::WireFormatLite::PARSE, + "Address.second_line")); + } else { + goto handle_unusual; + } + break; + } + + // string city = 3; + case 3: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_city())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->city().data(), static_cast(this->city().length()), + ::google::protobuf::internal::WireFormatLite::PARSE, + "Address.city")); + } else { + goto handle_unusual; + } + break; + } + + // string state = 4; + case 4: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_state())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->state().data(), static_cast(this->state().length()), + ::google::protobuf::internal::WireFormatLite::PARSE, + "Address.state")); + } else { + goto handle_unusual; + } + break; + } + + // string zipcode = 5; + case 5: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_zipcode())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->zipcode().data(), static_cast(this->zipcode().length()), + ::google::protobuf::internal::WireFormatLite::PARSE, + "Address.zipcode")); + } else { + goto handle_unusual; + } + break; + } + + // string country = 6; + case 6: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_country())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->country().data(), static_cast(this->country().length()), + ::google::protobuf::internal::WireFormatLite::PARSE, + "Address.country")); + } else { + goto handle_unusual; + } + break; + } + + default: { + handle_unusual: + if (tag == 0) { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:Address) + return true; +failure: + // @@protoc_insertion_point(parse_failure:Address) + return false; +#undef DO_ +} + +void Address::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:Address) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string first_line = 1; + if (this->first_line().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->first_line().data(), static_cast(this->first_line().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "Address.first_line"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 1, this->first_line(), output); + } + + // string second_line = 2; + if (this->second_line().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->second_line().data(), static_cast(this->second_line().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "Address.second_line"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 2, this->second_line(), output); + } + + // string city = 3; + if (this->city().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->city().data(), static_cast(this->city().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "Address.city"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 3, this->city(), output); + } + + // string state = 4; + if (this->state().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->state().data(), static_cast(this->state().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "Address.state"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 4, this->state(), output); + } + + // string zipcode = 5; + if (this->zipcode().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->zipcode().data(), static_cast(this->zipcode().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "Address.zipcode"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 5, this->zipcode(), output); + } + + // string country = 6; + if (this->country().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->country().data(), static_cast(this->country().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "Address.country"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 6, this->country(), output); + } + + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); + } + // @@protoc_insertion_point(serialize_end:Address) +} + +::google::protobuf::uint8* Address::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused + // @@protoc_insertion_point(serialize_to_array_start:Address) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string first_line = 1; + if (this->first_line().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->first_line().data(), static_cast(this->first_line().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "Address.first_line"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 1, this->first_line(), target); + } + + // string second_line = 2; + if (this->second_line().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->second_line().data(), static_cast(this->second_line().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "Address.second_line"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 2, this->second_line(), target); + } + + // string city = 3; + if (this->city().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->city().data(), static_cast(this->city().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "Address.city"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 3, this->city(), target); + } + + // string state = 4; + if (this->state().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->state().data(), static_cast(this->state().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "Address.state"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 4, this->state(), target); + } + + // string zipcode = 5; + if (this->zipcode().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->zipcode().data(), static_cast(this->zipcode().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "Address.zipcode"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 5, this->zipcode(), target); + } + + // string country = 6; + if (this->country().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->country().data(), static_cast(this->country().length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "Address.country"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 6, this->country(), target); + } + + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:Address) + return target; +} + +size_t Address::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:Address) + size_t total_size = 0; + + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); + } + // string first_line = 1; + if (this->first_line().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->first_line()); + } + + // string second_line = 2; + if (this->second_line().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->second_line()); + } + + // string city = 3; + if (this->city().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->city()); + } + + // string state = 4; + if (this->state().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->state()); + } + + // string zipcode = 5; + if (this->zipcode().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->zipcode()); + } + + // string country = 6; + if (this->country().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->country()); + } + + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = cached_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void Address::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:Address) + GOOGLE_DCHECK_NE(&from, this); + const Address* source = + ::google::protobuf::internal::DynamicCastToGenerated( + &from); + if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:Address) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:Address) + MergeFrom(*source); + } +} + +void Address::MergeFrom(const Address& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:Address) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.first_line().size() > 0) { + + first_line_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.first_line_); + } + if (from.second_line().size() > 0) { + + second_line_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.second_line_); + } + if (from.city().size() > 0) { + + city_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.city_); + } + if (from.state().size() > 0) { + + state_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.state_); + } + if (from.zipcode().size() > 0) { + + zipcode_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.zipcode_); + } + if (from.country().size() > 0) { + + country_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.country_); + } +} + +void Address::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:Address) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void Address::CopyFrom(const Address& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:Address) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Address::IsInitialized() const { + return true; +} + +void Address::Swap(Address* other) { + if (other == this) return; + InternalSwap(other); +} +void Address::InternalSwap(Address* other) { + using std::swap; + first_line_.Swap(&other->first_line_); + second_line_.Swap(&other->second_line_); + city_.Swap(&other->city_); + state_.Swap(&other->state_); + zipcode_.Swap(&other->zipcode_); + country_.Swap(&other->country_); + _internal_metadata_.Swap(&other->_internal_metadata_); + swap(_cached_size_, other->_cached_size_); +} + +::google::protobuf::Metadata Address::GetMetadata() const { + protobuf_geo_2fAddress_2eproto::protobuf_AssignDescriptorsOnce(); + return protobuf_geo_2fAddress_2eproto::file_level_metadata[kIndexInFileMessages]; +} + +#if PROTOBUF_INLINE_NOT_IN_HEADERS +// Address + +// string first_line = 1; +void Address::clear_first_line() { + first_line_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +const ::std::string& Address::first_line() const { + // @@protoc_insertion_point(field_get:Address.first_line) + return first_line_.GetNoArena(); +} +void Address::set_first_line(const ::std::string& value) { + + first_line_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:Address.first_line) +} +#if LANG_CXX11 +void Address::set_first_line(::std::string&& value) { + + first_line_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:Address.first_line) +} +#endif +void Address::set_first_line(const char* value) { + GOOGLE_DCHECK(value != NULL); + + first_line_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:Address.first_line) +} +void Address::set_first_line(const char* value, size_t size) { + + first_line_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:Address.first_line) +} +::std::string* Address::mutable_first_line() { + + // @@protoc_insertion_point(field_mutable:Address.first_line) + return first_line_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +::std::string* Address::release_first_line() { + // @@protoc_insertion_point(field_release:Address.first_line) + + return first_line_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +void Address::set_allocated_first_line(::std::string* first_line) { + if (first_line != NULL) { + + } else { + + } + first_line_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), first_line); + // @@protoc_insertion_point(field_set_allocated:Address.first_line) +} + +// string second_line = 2; +void Address::clear_second_line() { + second_line_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +const ::std::string& Address::second_line() const { + // @@protoc_insertion_point(field_get:Address.second_line) + return second_line_.GetNoArena(); +} +void Address::set_second_line(const ::std::string& value) { + + second_line_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:Address.second_line) +} +#if LANG_CXX11 +void Address::set_second_line(::std::string&& value) { + + second_line_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:Address.second_line) +} +#endif +void Address::set_second_line(const char* value) { + GOOGLE_DCHECK(value != NULL); + + second_line_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:Address.second_line) +} +void Address::set_second_line(const char* value, size_t size) { + + second_line_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:Address.second_line) +} +::std::string* Address::mutable_second_line() { + + // @@protoc_insertion_point(field_mutable:Address.second_line) + return second_line_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +::std::string* Address::release_second_line() { + // @@protoc_insertion_point(field_release:Address.second_line) + + return second_line_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +void Address::set_allocated_second_line(::std::string* second_line) { + if (second_line != NULL) { + + } else { + + } + second_line_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), second_line); + // @@protoc_insertion_point(field_set_allocated:Address.second_line) +} + +// string city = 3; +void Address::clear_city() { + city_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +const ::std::string& Address::city() const { + // @@protoc_insertion_point(field_get:Address.city) + return city_.GetNoArena(); +} +void Address::set_city(const ::std::string& value) { + + city_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:Address.city) +} +#if LANG_CXX11 +void Address::set_city(::std::string&& value) { + + city_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:Address.city) +} +#endif +void Address::set_city(const char* value) { + GOOGLE_DCHECK(value != NULL); + + city_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:Address.city) +} +void Address::set_city(const char* value, size_t size) { + + city_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:Address.city) +} +::std::string* Address::mutable_city() { + + // @@protoc_insertion_point(field_mutable:Address.city) + return city_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +::std::string* Address::release_city() { + // @@protoc_insertion_point(field_release:Address.city) + + return city_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +void Address::set_allocated_city(::std::string* city) { + if (city != NULL) { + + } else { + + } + city_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), city); + // @@protoc_insertion_point(field_set_allocated:Address.city) +} + +// string state = 4; +void Address::clear_state() { + state_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +const ::std::string& Address::state() const { + // @@protoc_insertion_point(field_get:Address.state) + return state_.GetNoArena(); +} +void Address::set_state(const ::std::string& value) { + + state_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:Address.state) +} +#if LANG_CXX11 +void Address::set_state(::std::string&& value) { + + state_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:Address.state) +} +#endif +void Address::set_state(const char* value) { + GOOGLE_DCHECK(value != NULL); + + state_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:Address.state) +} +void Address::set_state(const char* value, size_t size) { + + state_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:Address.state) +} +::std::string* Address::mutable_state() { + + // @@protoc_insertion_point(field_mutable:Address.state) + return state_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +::std::string* Address::release_state() { + // @@protoc_insertion_point(field_release:Address.state) + + return state_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +void Address::set_allocated_state(::std::string* state) { + if (state != NULL) { + + } else { + + } + state_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), state); + // @@protoc_insertion_point(field_set_allocated:Address.state) +} + +// string zipcode = 5; +void Address::clear_zipcode() { + zipcode_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +const ::std::string& Address::zipcode() const { + // @@protoc_insertion_point(field_get:Address.zipcode) + return zipcode_.GetNoArena(); +} +void Address::set_zipcode(const ::std::string& value) { + + zipcode_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:Address.zipcode) +} +#if LANG_CXX11 +void Address::set_zipcode(::std::string&& value) { + + zipcode_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:Address.zipcode) +} +#endif +void Address::set_zipcode(const char* value) { + GOOGLE_DCHECK(value != NULL); + + zipcode_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:Address.zipcode) +} +void Address::set_zipcode(const char* value, size_t size) { + + zipcode_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:Address.zipcode) +} +::std::string* Address::mutable_zipcode() { + + // @@protoc_insertion_point(field_mutable:Address.zipcode) + return zipcode_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +::std::string* Address::release_zipcode() { + // @@protoc_insertion_point(field_release:Address.zipcode) + + return zipcode_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +void Address::set_allocated_zipcode(::std::string* zipcode) { + if (zipcode != NULL) { + + } else { + + } + zipcode_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), zipcode); + // @@protoc_insertion_point(field_set_allocated:Address.zipcode) +} + +// string country = 6; +void Address::clear_country() { + country_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +const ::std::string& Address::country() const { + // @@protoc_insertion_point(field_get:Address.country) + return country_.GetNoArena(); +} +void Address::set_country(const ::std::string& value) { + + country_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:Address.country) +} +#if LANG_CXX11 +void Address::set_country(::std::string&& value) { + + country_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:Address.country) +} +#endif +void Address::set_country(const char* value) { + GOOGLE_DCHECK(value != NULL); + + country_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:Address.country) +} +void Address::set_country(const char* value, size_t size) { + + country_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:Address.country) +} +::std::string* Address::mutable_country() { + + // @@protoc_insertion_point(field_mutable:Address.country) + return country_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +::std::string* Address::release_country() { + // @@protoc_insertion_point(field_release:Address.country) + + return country_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +void Address::set_allocated_country(::std::string* country) { + if (country != NULL) { + + } else { + + } + country_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), country); + // @@protoc_insertion_point(field_set_allocated:Address.country) +} + +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS + +// @@protoc_insertion_point(namespace_scope) + +// @@protoc_insertion_point(global_scope) diff --git a/languages/cpp/geo/Address.pb.h b/languages/cpp/geo/Address.pb.h new file mode 100644 index 0000000..74cfd8b --- /dev/null +++ b/languages/cpp/geo/Address.pb.h @@ -0,0 +1,572 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: geo/Address.proto + +#ifndef PROTOBUF_geo_2fAddress_2eproto__INCLUDED +#define PROTOBUF_geo_2fAddress_2eproto__INCLUDED + +#include + +#include + +#if GOOGLE_PROTOBUF_VERSION < 3004000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3004000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +// @@protoc_insertion_point(includes) +class Address; +class AddressDefaultTypeInternal; +extern AddressDefaultTypeInternal _Address_default_instance_; + +namespace protobuf_geo_2fAddress_2eproto { +// Internal implementation detail -- do not call these. +struct TableStruct { + static const ::google::protobuf::internal::ParseTableField entries[]; + static const ::google::protobuf::internal::AuxillaryParseTableField aux[]; + static const ::google::protobuf::internal::ParseTable schema[]; + static const ::google::protobuf::uint32 offsets[]; + static const ::google::protobuf::internal::FieldMetadata field_metadata[]; + static const ::google::protobuf::internal::SerializationTable serialization_table[]; + static void InitDefaultsImpl(); +}; +void AddDescriptors(); +void InitDefaults(); +} // namespace protobuf_geo_2fAddress_2eproto + +// =================================================================== + +class Address : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:Address) */ { + public: + Address(); + virtual ~Address(); + + Address(const Address& from); + + inline Address& operator=(const Address& from) { + CopyFrom(from); + return *this; + } + #if LANG_CXX11 + Address(Address&& from) noexcept + : Address() { + *this = ::std::move(from); + } + + inline Address& operator=(Address&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif + static const ::google::protobuf::Descriptor* descriptor(); + static const Address& default_instance(); + + static inline const Address* internal_default_instance() { + return reinterpret_cast( + &_Address_default_instance_); + } + static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = + 0; + + void Swap(Address* other); + friend void swap(Address& a, Address& b) { + a.Swap(&b); + } + + // implements Message ---------------------------------------------- + + inline Address* New() const PROTOBUF_FINAL { return New(NULL); } + + Address* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL; + void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; + void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; + void CopyFrom(const Address& from); + void MergeFrom(const Address& from); + void Clear() PROTOBUF_FINAL; + bool IsInitialized() const PROTOBUF_FINAL; + + size_t ByteSizeLong() const PROTOBUF_FINAL; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL; + int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const PROTOBUF_FINAL; + void InternalSwap(Address* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return NULL; + } + inline void* MaybeArenaPtr() const { + return NULL; + } + public: + + ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // string first_line = 1; + void clear_first_line(); + static const int kFirstLineFieldNumber = 1; + const ::std::string& first_line() const; + void set_first_line(const ::std::string& value); + #if LANG_CXX11 + void set_first_line(::std::string&& value); + #endif + void set_first_line(const char* value); + void set_first_line(const char* value, size_t size); + ::std::string* mutable_first_line(); + ::std::string* release_first_line(); + void set_allocated_first_line(::std::string* first_line); + + // string second_line = 2; + void clear_second_line(); + static const int kSecondLineFieldNumber = 2; + const ::std::string& second_line() const; + void set_second_line(const ::std::string& value); + #if LANG_CXX11 + void set_second_line(::std::string&& value); + #endif + void set_second_line(const char* value); + void set_second_line(const char* value, size_t size); + ::std::string* mutable_second_line(); + ::std::string* release_second_line(); + void set_allocated_second_line(::std::string* second_line); + + // string city = 3; + void clear_city(); + static const int kCityFieldNumber = 3; + const ::std::string& city() const; + void set_city(const ::std::string& value); + #if LANG_CXX11 + void set_city(::std::string&& value); + #endif + void set_city(const char* value); + void set_city(const char* value, size_t size); + ::std::string* mutable_city(); + ::std::string* release_city(); + void set_allocated_city(::std::string* city); + + // string state = 4; + void clear_state(); + static const int kStateFieldNumber = 4; + const ::std::string& state() const; + void set_state(const ::std::string& value); + #if LANG_CXX11 + void set_state(::std::string&& value); + #endif + void set_state(const char* value); + void set_state(const char* value, size_t size); + ::std::string* mutable_state(); + ::std::string* release_state(); + void set_allocated_state(::std::string* state); + + // string zipcode = 5; + void clear_zipcode(); + static const int kZipcodeFieldNumber = 5; + const ::std::string& zipcode() const; + void set_zipcode(const ::std::string& value); + #if LANG_CXX11 + void set_zipcode(::std::string&& value); + #endif + void set_zipcode(const char* value); + void set_zipcode(const char* value, size_t size); + ::std::string* mutable_zipcode(); + ::std::string* release_zipcode(); + void set_allocated_zipcode(::std::string* zipcode); + + // string country = 6; + void clear_country(); + static const int kCountryFieldNumber = 6; + const ::std::string& country() const; + void set_country(const ::std::string& value); + #if LANG_CXX11 + void set_country(::std::string&& value); + #endif + void set_country(const char* value); + void set_country(const char* value, size_t size); + ::std::string* mutable_country(); + ::std::string* release_country(); + void set_allocated_country(::std::string* country); + + // @@protoc_insertion_point(class_scope:Address) + private: + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::internal::ArenaStringPtr first_line_; + ::google::protobuf::internal::ArenaStringPtr second_line_; + ::google::protobuf::internal::ArenaStringPtr city_; + ::google::protobuf::internal::ArenaStringPtr state_; + ::google::protobuf::internal::ArenaStringPtr zipcode_; + ::google::protobuf::internal::ArenaStringPtr country_; + mutable int _cached_size_; + friend struct protobuf_geo_2fAddress_2eproto::TableStruct; +}; +// =================================================================== + + +// =================================================================== + +#if !PROTOBUF_INLINE_NOT_IN_HEADERS +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// Address + +// string first_line = 1; +inline void Address::clear_first_line() { + first_line_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline const ::std::string& Address::first_line() const { + // @@protoc_insertion_point(field_get:Address.first_line) + return first_line_.GetNoArena(); +} +inline void Address::set_first_line(const ::std::string& value) { + + first_line_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:Address.first_line) +} +#if LANG_CXX11 +inline void Address::set_first_line(::std::string&& value) { + + first_line_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:Address.first_line) +} +#endif +inline void Address::set_first_line(const char* value) { + GOOGLE_DCHECK(value != NULL); + + first_line_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:Address.first_line) +} +inline void Address::set_first_line(const char* value, size_t size) { + + first_line_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:Address.first_line) +} +inline ::std::string* Address::mutable_first_line() { + + // @@protoc_insertion_point(field_mutable:Address.first_line) + return first_line_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* Address::release_first_line() { + // @@protoc_insertion_point(field_release:Address.first_line) + + return first_line_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void Address::set_allocated_first_line(::std::string* first_line) { + if (first_line != NULL) { + + } else { + + } + first_line_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), first_line); + // @@protoc_insertion_point(field_set_allocated:Address.first_line) +} + +// string second_line = 2; +inline void Address::clear_second_line() { + second_line_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline const ::std::string& Address::second_line() const { + // @@protoc_insertion_point(field_get:Address.second_line) + return second_line_.GetNoArena(); +} +inline void Address::set_second_line(const ::std::string& value) { + + second_line_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:Address.second_line) +} +#if LANG_CXX11 +inline void Address::set_second_line(::std::string&& value) { + + second_line_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:Address.second_line) +} +#endif +inline void Address::set_second_line(const char* value) { + GOOGLE_DCHECK(value != NULL); + + second_line_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:Address.second_line) +} +inline void Address::set_second_line(const char* value, size_t size) { + + second_line_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:Address.second_line) +} +inline ::std::string* Address::mutable_second_line() { + + // @@protoc_insertion_point(field_mutable:Address.second_line) + return second_line_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* Address::release_second_line() { + // @@protoc_insertion_point(field_release:Address.second_line) + + return second_line_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void Address::set_allocated_second_line(::std::string* second_line) { + if (second_line != NULL) { + + } else { + + } + second_line_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), second_line); + // @@protoc_insertion_point(field_set_allocated:Address.second_line) +} + +// string city = 3; +inline void Address::clear_city() { + city_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline const ::std::string& Address::city() const { + // @@protoc_insertion_point(field_get:Address.city) + return city_.GetNoArena(); +} +inline void Address::set_city(const ::std::string& value) { + + city_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:Address.city) +} +#if LANG_CXX11 +inline void Address::set_city(::std::string&& value) { + + city_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:Address.city) +} +#endif +inline void Address::set_city(const char* value) { + GOOGLE_DCHECK(value != NULL); + + city_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:Address.city) +} +inline void Address::set_city(const char* value, size_t size) { + + city_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:Address.city) +} +inline ::std::string* Address::mutable_city() { + + // @@protoc_insertion_point(field_mutable:Address.city) + return city_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* Address::release_city() { + // @@protoc_insertion_point(field_release:Address.city) + + return city_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void Address::set_allocated_city(::std::string* city) { + if (city != NULL) { + + } else { + + } + city_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), city); + // @@protoc_insertion_point(field_set_allocated:Address.city) +} + +// string state = 4; +inline void Address::clear_state() { + state_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline const ::std::string& Address::state() const { + // @@protoc_insertion_point(field_get:Address.state) + return state_.GetNoArena(); +} +inline void Address::set_state(const ::std::string& value) { + + state_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:Address.state) +} +#if LANG_CXX11 +inline void Address::set_state(::std::string&& value) { + + state_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:Address.state) +} +#endif +inline void Address::set_state(const char* value) { + GOOGLE_DCHECK(value != NULL); + + state_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:Address.state) +} +inline void Address::set_state(const char* value, size_t size) { + + state_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:Address.state) +} +inline ::std::string* Address::mutable_state() { + + // @@protoc_insertion_point(field_mutable:Address.state) + return state_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* Address::release_state() { + // @@protoc_insertion_point(field_release:Address.state) + + return state_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void Address::set_allocated_state(::std::string* state) { + if (state != NULL) { + + } else { + + } + state_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), state); + // @@protoc_insertion_point(field_set_allocated:Address.state) +} + +// string zipcode = 5; +inline void Address::clear_zipcode() { + zipcode_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline const ::std::string& Address::zipcode() const { + // @@protoc_insertion_point(field_get:Address.zipcode) + return zipcode_.GetNoArena(); +} +inline void Address::set_zipcode(const ::std::string& value) { + + zipcode_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:Address.zipcode) +} +#if LANG_CXX11 +inline void Address::set_zipcode(::std::string&& value) { + + zipcode_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:Address.zipcode) +} +#endif +inline void Address::set_zipcode(const char* value) { + GOOGLE_DCHECK(value != NULL); + + zipcode_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:Address.zipcode) +} +inline void Address::set_zipcode(const char* value, size_t size) { + + zipcode_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:Address.zipcode) +} +inline ::std::string* Address::mutable_zipcode() { + + // @@protoc_insertion_point(field_mutable:Address.zipcode) + return zipcode_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* Address::release_zipcode() { + // @@protoc_insertion_point(field_release:Address.zipcode) + + return zipcode_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void Address::set_allocated_zipcode(::std::string* zipcode) { + if (zipcode != NULL) { + + } else { + + } + zipcode_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), zipcode); + // @@protoc_insertion_point(field_set_allocated:Address.zipcode) +} + +// string country = 6; +inline void Address::clear_country() { + country_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline const ::std::string& Address::country() const { + // @@protoc_insertion_point(field_get:Address.country) + return country_.GetNoArena(); +} +inline void Address::set_country(const ::std::string& value) { + + country_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:Address.country) +} +#if LANG_CXX11 +inline void Address::set_country(::std::string&& value) { + + country_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:Address.country) +} +#endif +inline void Address::set_country(const char* value) { + GOOGLE_DCHECK(value != NULL); + + country_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:Address.country) +} +inline void Address::set_country(const char* value, size_t size) { + + country_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:Address.country) +} +inline ::std::string* Address::mutable_country() { + + // @@protoc_insertion_point(field_mutable:Address.country) + return country_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* Address::release_country() { + // @@protoc_insertion_point(field_release:Address.country) + + return country_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void Address::set_allocated_country(::std::string* country) { + if (country != NULL) { + + } else { + + } + country_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), country); + // @@protoc_insertion_point(field_set_allocated:Address.country) +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +#endif // !PROTOBUF_INLINE_NOT_IN_HEADERS + +// @@protoc_insertion_point(namespace_scope) + + +// @@protoc_insertion_point(global_scope) + +#endif // PROTOBUF_geo_2fAddress_2eproto__INCLUDED diff --git a/languages/cpp/media/MediaItem.pb.cc b/languages/cpp/media/MediaItem.pb.cc index a086c0d..9365c10 100644 --- a/languages/cpp/media/MediaItem.pb.cc +++ b/languages/cpp/media/MediaItem.pb.cc @@ -16,7 +16,10 @@ #include #include // @@protoc_insertion_point(includes) -class MediaItemDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed { +class MediaItemDefaultTypeInternal { +public: + ::google::protobuf::internal::ExplicitlyConstructed + _instance; } _MediaItem_default_instance_; namespace protobuf_media_2fMediaItem_2eproto { @@ -29,20 +32,20 @@ ::google::protobuf::Metadata file_level_metadata[1]; } // namespace PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::ParseTableField - const TableStruct::entries[] = { + const TableStruct::entries[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { {0, 0, 0, ::google::protobuf::internal::kInvalidMask, 0, 0}, }; PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::AuxillaryParseTableField - const TableStruct::aux[] = { + const TableStruct::aux[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { ::google::protobuf::internal::AuxillaryParseTableField(), }; PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::ParseTable const - TableStruct::schema[] = { - { NULL, NULL, 0, -1, -1, false }, + TableStruct::schema[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + { NULL, NULL, 0, -1, -1, -1, -1, NULL, false }, }; -const ::google::protobuf::uint32 TableStruct::offsets[] = { +const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MediaItem, _internal_metadata_), ~0u, // no _extensions_ @@ -52,8 +55,7 @@ const ::google::protobuf::uint32 TableStruct::offsets[] = { GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MediaItem, type_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MediaItem, name_), }; - -static const ::google::protobuf::internal::MigrationSchema schemas[] = { +static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { { 0, -1, sizeof(MediaItem)}, }; @@ -83,22 +85,17 @@ void protobuf_RegisterTypes(const ::std::string&) { } } // namespace - -void TableStruct::Shutdown() { - _MediaItem_default_instance_.Shutdown(); - delete file_level_metadata[0].reflection; -} - void TableStruct::InitDefaultsImpl() { GOOGLE_PROTOBUF_VERIFY_VERSION; ::google::protobuf::internal::InitProtobufDefaults(); ::protobuf_media_2fMediaKey_2eproto::InitDefaults(); ::protobuf_media_2fMediaType_2eproto::InitDefaults(); - _MediaItem_default_instance_.DefaultConstruct(); - _MediaItem_default_instance_.get_mutable()->key_ = const_cast< ::MediaKey*>( + _MediaItem_default_instance_._instance.DefaultConstruct(); + ::google::protobuf::internal::OnShutdownDestroyMessage( + &_MediaItem_default_instance_);_MediaItem_default_instance_._instance.get_mutable()->key_ = const_cast< ::MediaKey*>( ::MediaKey::internal_default_instance()); - _MediaItem_default_instance_.get_mutable()->type_ = const_cast< ::MediaType*>( + _MediaItem_default_instance_._instance.get_mutable()->type_ = const_cast< ::MediaType*>( ::MediaType::internal_default_instance()); } @@ -106,9 +103,10 @@ void InitDefaults() { static GOOGLE_PROTOBUF_DECLARE_ONCE(once); ::google::protobuf::GoogleOnceInit(&once, &TableStruct::InitDefaultsImpl); } +namespace { void AddDescriptorsImpl() { InitDefaults(); - static const char descriptor[] = { + static const char descriptor[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { "\n\025media/MediaItem.proto\032\024media/MediaKey." "proto\032\025media/MediaType.proto\"K\n\tMediaIte" "m\022\026\n\003key\030\001 \001(\0132\t.MediaKey\022\030\n\004type\030\002 \001(\0132" @@ -122,14 +120,14 @@ void AddDescriptorsImpl() { "media/MediaItem.proto", &protobuf_RegisterTypes); ::protobuf_media_2fMediaKey_2eproto::AddDescriptors(); ::protobuf_media_2fMediaType_2eproto::AddDescriptors(); - ::google::protobuf::internal::OnShutdown(&TableStruct::Shutdown); } +} // anonymous namespace void AddDescriptors() { static GOOGLE_PROTOBUF_DECLARE_ONCE(once); ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl); } -// Force AddDescriptors() to be called at static initialization time. +// Force AddDescriptors() to be called at dynamic initialization time. struct StaticDescriptorInitializer { StaticDescriptorInitializer() { AddDescriptors(); @@ -252,9 +250,7 @@ MediaItem::MediaItem() MediaItem::MediaItem(::google::protobuf::Arena* arena) : ::google::protobuf::Message(), _internal_metadata_(arena) { -#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER protobuf_media_2fMediaItem_2eproto::InitDefaults(); -#endif // GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:MediaItem) @@ -284,8 +280,9 @@ MediaItem::MediaItem(const MediaItem& from) void MediaItem::SharedCtor() { name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - ::memset(&key_, 0, reinterpret_cast(&type_) - - reinterpret_cast(&key_) + sizeof(type_)); + ::memset(&key_, 0, static_cast( + reinterpret_cast(&type_) - + reinterpret_cast(&key_)) + sizeof(type_)); _cached_size_ = 0; } @@ -296,17 +293,14 @@ MediaItem::~MediaItem() { void MediaItem::SharedDtor() { ::google::protobuf::Arena* arena = GetArenaNoVirtual(); + GOOGLE_DCHECK(arena == NULL); if (arena != NULL) { return; } name_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), arena); - if (this != internal_default_instance()) { - delete key_; - } - if (this != internal_default_instance()) { - delete type_; - } + if (this != internal_default_instance()) delete key_; + if (this != internal_default_instance()) delete type_; } void MediaItem::ArenaDtor(void* object) { @@ -336,6 +330,10 @@ MediaItem* MediaItem::New(::google::protobuf::Arena* arena) const { void MediaItem::Clear() { // @@protoc_insertion_point(message_clear_start:MediaItem) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + name_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); if (GetArenaNoVirtual() == NULL && key_ != NULL) { delete key_; @@ -345,6 +343,7 @@ void MediaItem::Clear() { delete type_; } type_ = NULL; + _internal_metadata_.Clear(); } bool MediaItem::MergePartialFromCodedStream( @@ -360,7 +359,7 @@ bool MediaItem::MergePartialFromCodedStream( // .MediaKey key = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(10u)) { + static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, mutable_key())); } else { @@ -372,7 +371,7 @@ bool MediaItem::MergePartialFromCodedStream( // .MediaType type = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(18u)) { + static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, mutable_type())); } else { @@ -384,11 +383,11 @@ bool MediaItem::MergePartialFromCodedStream( // string name = 3; case 3: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(26u)) { + static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_name())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->name().data(), this->name().length(), + this->name().data(), static_cast(this->name().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "MediaItem.name")); } else { @@ -399,12 +398,11 @@ bool MediaItem::MergePartialFromCodedStream( default: { handle_unusual: - if (tag == 0 || - ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + if (tag == 0) { goto success; } - DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } @@ -439,13 +437,17 @@ void MediaItem::SerializeWithCachedSizes( // string name = 3; if (this->name().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->name().data(), this->name().length(), + this->name().data(), static_cast(this->name().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "MediaItem.name"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 3, this->name(), output); } + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); + } // @@protoc_insertion_point(serialize_end:MediaItem) } @@ -473,7 +475,7 @@ ::google::protobuf::uint8* MediaItem::InternalSerializeWithCachedSizesToArray( // string name = 3; if (this->name().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->name().data(), this->name().length(), + this->name().data(), static_cast(this->name().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "MediaItem.name"); target = @@ -481,6 +483,10 @@ ::google::protobuf::uint8* MediaItem::InternalSerializeWithCachedSizesToArray( 3, this->name(), target); } + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); + } // @@protoc_insertion_point(serialize_to_array_end:MediaItem) return target; } @@ -489,6 +495,11 @@ size_t MediaItem::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:MediaItem) size_t total_size = 0; + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); + } // string name = 3; if (this->name().size() > 0) { total_size += 1 + @@ -588,10 +599,12 @@ void MediaItem::UnsafeArenaSwap(MediaItem* other) { InternalSwap(other); } void MediaItem::InternalSwap(MediaItem* other) { + using std::swap; name_.Swap(&other->name_); - std::swap(key_, other->key_); - std::swap(type_, other->type_); - std::swap(_cached_size_, other->_cached_size_); + swap(key_, other->key_); + swap(type_, other->type_); + _internal_metadata_.Swap(&other->_internal_metadata_); + swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata MediaItem::GetMetadata() const { @@ -611,9 +624,10 @@ void MediaItem::clear_key() { key_ = NULL; } const ::MediaKey& MediaItem::key() const { + const ::MediaKey* p = key_; // @@protoc_insertion_point(field_get:MediaItem.key) - return key_ != NULL ? *key_ - : *::MediaKey::internal_default_instance(); + return p != NULL ? *p : *reinterpret_cast( + &::_MediaKey_default_instance_); } ::MediaKey* MediaItem::mutable_key() { @@ -660,9 +674,10 @@ void MediaItem::clear_type() { type_ = NULL; } const ::MediaType& MediaItem::type() const { + const ::MediaType* p = type_; // @@protoc_insertion_point(field_get:MediaItem.type) - return type_ != NULL ? *type_ - : *::MediaType::internal_default_instance(); + return p != NULL ? *p : *reinterpret_cast( + &::_MediaType_default_instance_); } ::MediaType* MediaItem::mutable_type() { @@ -713,6 +728,14 @@ void MediaItem::set_name(const ::std::string& value) { name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set:MediaItem.name) } +#if LANG_CXX11 +void MediaItem::set_name(::std::string&& value) { + + name_.Set( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_rvalue:MediaItem.name) +} +#endif void MediaItem::set_name(const char* value) { GOOGLE_DCHECK(value != NULL); diff --git a/languages/cpp/media/MediaItem.pb.h b/languages/cpp/media/MediaItem.pb.h index a6158b5..74b343e 100644 --- a/languages/cpp/media/MediaItem.pb.h +++ b/languages/cpp/media/MediaItem.pb.h @@ -8,12 +8,12 @@ #include -#if GOOGLE_PROTOBUF_VERSION < 3003000 +#if GOOGLE_PROTOBUF_VERSION < 3004000 #error This file was generated by a newer version of protoc which is #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 3003002 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#if 3004000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION #error This file was generated by an older version of protoc which is #error incompatible with your Protocol Buffer headers. Please #error regenerate this file with a newer version of protoc. @@ -32,24 +32,9 @@ #include "media/MediaKey.pb.h" #include "media/MediaType.pb.h" // @@protoc_insertion_point(includes) -class DocumentType; -class DocumentTypeDefaultTypeInternal; -extern DocumentTypeDefaultTypeInternal _DocumentType_default_instance_; -class ImageType; -class ImageTypeDefaultTypeInternal; -extern ImageTypeDefaultTypeInternal _ImageType_default_instance_; class MediaItem; class MediaItemDefaultTypeInternal; extern MediaItemDefaultTypeInternal _MediaItem_default_instance_; -class MediaKey; -class MediaKeyDefaultTypeInternal; -extern MediaKeyDefaultTypeInternal _MediaKey_default_instance_; -class MediaType; -class MediaTypeDefaultTypeInternal; -extern MediaTypeDefaultTypeInternal _MediaType_default_instance_; -class VideoType; -class VideoTypeDefaultTypeInternal; -extern VideoTypeDefaultTypeInternal _VideoType_default_instance_; namespace protobuf_media_2fMediaItem_2eproto { // Internal implementation detail -- do not call these. @@ -58,8 +43,9 @@ struct TableStruct { static const ::google::protobuf::internal::AuxillaryParseTableField aux[]; static const ::google::protobuf::internal::ParseTable schema[]; static const ::google::protobuf::uint32 offsets[]; + static const ::google::protobuf::internal::FieldMetadata field_metadata[]; + static const ::google::protobuf::internal::SerializationTable serialization_table[]; static void InitDefaultsImpl(); - static void Shutdown(); }; void AddDescriptors(); void InitDefaults(); @@ -78,7 +64,21 @@ class MediaItem : public ::google::protobuf::Message /* @@protoc_insertion_point CopyFrom(from); return *this; } + #if LANG_CXX11 + MediaItem(MediaItem&& from) noexcept + : MediaItem() { + *this = ::std::move(from); + } + inline MediaItem& operator=(MediaItem&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif inline ::google::protobuf::Arena* GetArena() const PROTOBUF_FINAL { return GetArenaNoVirtual(); } @@ -97,6 +97,9 @@ class MediaItem : public ::google::protobuf::Message /* @@protoc_insertion_point void UnsafeArenaSwap(MediaItem* other); void Swap(MediaItem* other); + friend void swap(MediaItem& a, MediaItem& b) { + a.Swap(&b); + } // implements Message ---------------------------------------------- @@ -148,6 +151,9 @@ class MediaItem : public ::google::protobuf::Message /* @@protoc_insertion_point static const int kNameFieldNumber = 3; const ::std::string& name() const; void set_name(const ::std::string& value); + #if LANG_CXX11 + void set_name(::std::string&& value); + #endif void set_name(const char* value); void set_name(const char* value, size_t size); ::std::string* mutable_name(); @@ -197,7 +203,7 @@ class MediaItem : public ::google::protobuf::Message /* @@protoc_insertion_point private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - friend class ::google::protobuf::Arena; + template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; ::google::protobuf::internal::ArenaStringPtr name_; @@ -212,6 +218,10 @@ class MediaItem : public ::google::protobuf::Message /* @@protoc_insertion_point // =================================================================== #if !PROTOBUF_INLINE_NOT_IN_HEADERS +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ // MediaItem // .MediaKey key = 1; @@ -223,9 +233,10 @@ inline void MediaItem::clear_key() { key_ = NULL; } inline const ::MediaKey& MediaItem::key() const { + const ::MediaKey* p = key_; // @@protoc_insertion_point(field_get:MediaItem.key) - return key_ != NULL ? *key_ - : *::MediaKey::internal_default_instance(); + return p != NULL ? *p : *reinterpret_cast( + &::_MediaKey_default_instance_); } inline ::MediaKey* MediaItem::mutable_key() { @@ -272,9 +283,10 @@ inline void MediaItem::clear_type() { type_ = NULL; } inline const ::MediaType& MediaItem::type() const { + const ::MediaType* p = type_; // @@protoc_insertion_point(field_get:MediaItem.type) - return type_ != NULL ? *type_ - : *::MediaType::internal_default_instance(); + return p != NULL ? *p : *reinterpret_cast( + &::_MediaType_default_instance_); } inline ::MediaType* MediaItem::mutable_type() { @@ -325,6 +337,14 @@ inline void MediaItem::set_name(const ::std::string& value) { name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set:MediaItem.name) } +#if LANG_CXX11 +inline void MediaItem::set_name(::std::string&& value) { + + name_.Set( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_rvalue:MediaItem.name) +} +#endif inline void MediaItem::set_name(const char* value) { GOOGLE_DCHECK(value != NULL); @@ -379,6 +399,9 @@ inline void MediaItem::unsafe_arena_set_allocated_name( // @@protoc_insertion_point(field_unsafe_arena_set_allocated:MediaItem.name) } +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ #endif // !PROTOBUF_INLINE_NOT_IN_HEADERS // @@protoc_insertion_point(namespace_scope) diff --git a/languages/cpp/media/MediaKey.pb.cc b/languages/cpp/media/MediaKey.pb.cc index 3c080d7..05c16cb 100644 --- a/languages/cpp/media/MediaKey.pb.cc +++ b/languages/cpp/media/MediaKey.pb.cc @@ -16,7 +16,10 @@ #include #include // @@protoc_insertion_point(includes) -class MediaKeyDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed { +class MediaKeyDefaultTypeInternal { +public: + ::google::protobuf::internal::ExplicitlyConstructed + _instance; } _MediaKey_default_instance_; namespace protobuf_media_2fMediaKey_2eproto { @@ -29,20 +32,20 @@ ::google::protobuf::Metadata file_level_metadata[1]; } // namespace PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::ParseTableField - const TableStruct::entries[] = { + const TableStruct::entries[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { {0, 0, 0, ::google::protobuf::internal::kInvalidMask, 0, 0}, }; PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::AuxillaryParseTableField - const TableStruct::aux[] = { + const TableStruct::aux[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { ::google::protobuf::internal::AuxillaryParseTableField(), }; PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::ParseTable const - TableStruct::schema[] = { - { NULL, NULL, 0, -1, -1, false }, + TableStruct::schema[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + { NULL, NULL, 0, -1, -1, -1, -1, NULL, false }, }; -const ::google::protobuf::uint32 TableStruct::offsets[] = { +const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MediaKey, _internal_metadata_), ~0u, // no _extensions_ @@ -50,8 +53,7 @@ const ::google::protobuf::uint32 TableStruct::offsets[] = { ~0u, // no _weak_field_map_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MediaKey, id_), }; - -static const ::google::protobuf::internal::MigrationSchema schemas[] = { +static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { { 0, -1, sizeof(MediaKey)}, }; @@ -81,26 +83,22 @@ void protobuf_RegisterTypes(const ::std::string&) { } } // namespace - -void TableStruct::Shutdown() { - _MediaKey_default_instance_.Shutdown(); - delete file_level_metadata[0].reflection; -} - void TableStruct::InitDefaultsImpl() { GOOGLE_PROTOBUF_VERIFY_VERSION; ::google::protobuf::internal::InitProtobufDefaults(); - _MediaKey_default_instance_.DefaultConstruct(); -} + _MediaKey_default_instance_._instance.DefaultConstruct(); + ::google::protobuf::internal::OnShutdownDestroyMessage( + &_MediaKey_default_instance_);} void InitDefaults() { static GOOGLE_PROTOBUF_DECLARE_ONCE(once); ::google::protobuf::GoogleOnceInit(&once, &TableStruct::InitDefaultsImpl); } +namespace { void AddDescriptorsImpl() { InitDefaults(); - static const char descriptor[] = { + static const char descriptor[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { "\n\024media/MediaKey.proto\"\026\n\010MediaKey\022\n\n\002id" "\030\001 \001(\tB/\n\030io.bloombox.schema.mediaB\014Medi" "aItemKeyH\001P\001\370\001\001b\006proto3" @@ -109,14 +107,14 @@ void AddDescriptorsImpl() { descriptor, 103); ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( "media/MediaKey.proto", &protobuf_RegisterTypes); - ::google::protobuf::internal::OnShutdown(&TableStruct::Shutdown); } +} // anonymous namespace void AddDescriptors() { static GOOGLE_PROTOBUF_DECLARE_ONCE(once); ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl); } -// Force AddDescriptors() to be called at static initialization time. +// Force AddDescriptors() to be called at dynamic initialization time. struct StaticDescriptorInitializer { StaticDescriptorInitializer() { AddDescriptors(); @@ -143,9 +141,7 @@ MediaKey::MediaKey() MediaKey::MediaKey(::google::protobuf::Arena* arena) : ::google::protobuf::Message(), _internal_metadata_(arena) { -#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER protobuf_media_2fMediaKey_2eproto::InitDefaults(); -#endif // GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:MediaKey) @@ -175,6 +171,7 @@ MediaKey::~MediaKey() { void MediaKey::SharedDtor() { ::google::protobuf::Arena* arena = GetArenaNoVirtual(); + GOOGLE_DCHECK(arena == NULL); if (arena != NULL) { return; } @@ -209,7 +206,12 @@ MediaKey* MediaKey::New(::google::protobuf::Arena* arena) const { void MediaKey::Clear() { // @@protoc_insertion_point(message_clear_start:MediaKey) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + id_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + _internal_metadata_.Clear(); } bool MediaKey::MergePartialFromCodedStream( @@ -225,11 +227,11 @@ bool MediaKey::MergePartialFromCodedStream( // string id = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(10u)) { + static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_id())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->id().data(), this->id().length(), + this->id().data(), static_cast(this->id().length()), ::google::protobuf::internal::WireFormatLite::PARSE, "MediaKey.id")); } else { @@ -240,12 +242,11 @@ bool MediaKey::MergePartialFromCodedStream( default: { handle_unusual: - if (tag == 0 || - ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + if (tag == 0) { goto success; } - DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } @@ -268,13 +269,17 @@ void MediaKey::SerializeWithCachedSizes( // string id = 1; if (this->id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->id().data(), this->id().length(), + this->id().data(), static_cast(this->id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "MediaKey.id"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->id(), output); } + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); + } // @@protoc_insertion_point(serialize_end:MediaKey) } @@ -288,7 +293,7 @@ ::google::protobuf::uint8* MediaKey::InternalSerializeWithCachedSizesToArray( // string id = 1; if (this->id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->id().data(), this->id().length(), + this->id().data(), static_cast(this->id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "MediaKey.id"); target = @@ -296,6 +301,10 @@ ::google::protobuf::uint8* MediaKey::InternalSerializeWithCachedSizesToArray( 1, this->id(), target); } + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); + } // @@protoc_insertion_point(serialize_to_array_end:MediaKey) return target; } @@ -304,6 +313,11 @@ size_t MediaKey::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:MediaKey) size_t total_size = 0; + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); + } // string id = 1; if (this->id().size() > 0) { total_size += 1 + @@ -383,8 +397,10 @@ void MediaKey::UnsafeArenaSwap(MediaKey* other) { InternalSwap(other); } void MediaKey::InternalSwap(MediaKey* other) { + using std::swap; id_.Swap(&other->id_); - std::swap(_cached_size_, other->_cached_size_); + _internal_metadata_.Swap(&other->_internal_metadata_); + swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata MediaKey::GetMetadata() const { @@ -408,6 +424,14 @@ void MediaKey::set_id(const ::std::string& value) { id_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set:MediaKey.id) } +#if LANG_CXX11 +void MediaKey::set_id(::std::string&& value) { + + id_.Set( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_rvalue:MediaKey.id) +} +#endif void MediaKey::set_id(const char* value) { GOOGLE_DCHECK(value != NULL); diff --git a/languages/cpp/media/MediaKey.pb.h b/languages/cpp/media/MediaKey.pb.h index 284d177..f1f2282 100644 --- a/languages/cpp/media/MediaKey.pb.h +++ b/languages/cpp/media/MediaKey.pb.h @@ -8,12 +8,12 @@ #include -#if GOOGLE_PROTOBUF_VERSION < 3003000 +#if GOOGLE_PROTOBUF_VERSION < 3004000 #error This file was generated by a newer version of protoc which is #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 3003002 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#if 3004000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION #error This file was generated by an older version of protoc which is #error incompatible with your Protocol Buffer headers. Please #error regenerate this file with a newer version of protoc. @@ -41,8 +41,9 @@ struct TableStruct { static const ::google::protobuf::internal::AuxillaryParseTableField aux[]; static const ::google::protobuf::internal::ParseTable schema[]; static const ::google::protobuf::uint32 offsets[]; + static const ::google::protobuf::internal::FieldMetadata field_metadata[]; + static const ::google::protobuf::internal::SerializationTable serialization_table[]; static void InitDefaultsImpl(); - static void Shutdown(); }; void AddDescriptors(); void InitDefaults(); @@ -61,7 +62,21 @@ class MediaKey : public ::google::protobuf::Message /* @@protoc_insertion_point( CopyFrom(from); return *this; } + #if LANG_CXX11 + MediaKey(MediaKey&& from) noexcept + : MediaKey() { + *this = ::std::move(from); + } + inline MediaKey& operator=(MediaKey&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif inline ::google::protobuf::Arena* GetArena() const PROTOBUF_FINAL { return GetArenaNoVirtual(); } @@ -80,6 +95,9 @@ class MediaKey : public ::google::protobuf::Message /* @@protoc_insertion_point( void UnsafeArenaSwap(MediaKey* other); void Swap(MediaKey* other); + friend void swap(MediaKey& a, MediaKey& b) { + a.Swap(&b); + } // implements Message ---------------------------------------------- @@ -131,6 +149,9 @@ class MediaKey : public ::google::protobuf::Message /* @@protoc_insertion_point( static const int kIdFieldNumber = 1; const ::std::string& id() const; void set_id(const ::std::string& value); + #if LANG_CXX11 + void set_id(::std::string&& value); + #endif void set_id(const char* value); void set_id(const char* value, size_t size); ::std::string* mutable_id(); @@ -144,7 +165,7 @@ class MediaKey : public ::google::protobuf::Message /* @@protoc_insertion_point( private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - friend class ::google::protobuf::Arena; + template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; ::google::protobuf::internal::ArenaStringPtr id_; @@ -157,6 +178,10 @@ class MediaKey : public ::google::protobuf::Message /* @@protoc_insertion_point( // =================================================================== #if !PROTOBUF_INLINE_NOT_IN_HEADERS +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ // MediaKey // string id = 1; @@ -172,6 +197,14 @@ inline void MediaKey::set_id(const ::std::string& value) { id_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); // @@protoc_insertion_point(field_set:MediaKey.id) } +#if LANG_CXX11 +inline void MediaKey::set_id(::std::string&& value) { + + id_.Set( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_rvalue:MediaKey.id) +} +#endif inline void MediaKey::set_id(const char* value) { GOOGLE_DCHECK(value != NULL); @@ -226,6 +259,9 @@ inline void MediaKey::unsafe_arena_set_allocated_id( // @@protoc_insertion_point(field_unsafe_arena_set_allocated:MediaKey.id) } +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ #endif // !PROTOBUF_INLINE_NOT_IN_HEADERS // @@protoc_insertion_point(namespace_scope) diff --git a/languages/cpp/media/MediaType.pb.cc b/languages/cpp/media/MediaType.pb.cc index 46956f3..c9a85ae 100644 --- a/languages/cpp/media/MediaType.pb.cc +++ b/languages/cpp/media/MediaType.pb.cc @@ -16,13 +16,25 @@ #include #include // @@protoc_insertion_point(includes) -class MediaTypeDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed { +class MediaTypeDefaultTypeInternal { +public: + ::google::protobuf::internal::ExplicitlyConstructed + _instance; } _MediaType_default_instance_; -class ImageTypeDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed { +class ImageTypeDefaultTypeInternal { +public: + ::google::protobuf::internal::ExplicitlyConstructed + _instance; } _ImageType_default_instance_; -class DocumentTypeDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed { +class DocumentTypeDefaultTypeInternal { +public: + ::google::protobuf::internal::ExplicitlyConstructed + _instance; } _DocumentType_default_instance_; -class VideoTypeDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed { +class VideoTypeDefaultTypeInternal { +public: + ::google::protobuf::internal::ExplicitlyConstructed + _instance; } _VideoType_default_instance_; namespace protobuf_media_2fMediaType_2eproto { @@ -36,23 +48,23 @@ const ::google::protobuf::EnumDescriptor* file_level_enum_descriptors[4]; } // namespace PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::ParseTableField - const TableStruct::entries[] = { + const TableStruct::entries[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { {0, 0, 0, ::google::protobuf::internal::kInvalidMask, 0, 0}, }; PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::AuxillaryParseTableField - const TableStruct::aux[] = { + const TableStruct::aux[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { ::google::protobuf::internal::AuxillaryParseTableField(), }; PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::ParseTable const - TableStruct::schema[] = { - { NULL, NULL, 0, -1, -1, false }, - { NULL, NULL, 0, -1, -1, false }, - { NULL, NULL, 0, -1, -1, false }, - { NULL, NULL, 0, -1, -1, false }, + TableStruct::schema[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + { NULL, NULL, 0, -1, -1, -1, -1, NULL, false }, + { NULL, NULL, 0, -1, -1, -1, -1, NULL, false }, + { NULL, NULL, 0, -1, -1, -1, -1, NULL, false }, + { NULL, NULL, 0, -1, -1, -1, -1, NULL, false }, }; -const ::google::protobuf::uint32 TableStruct::offsets[] = { +const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MediaType, _internal_metadata_), ~0u, // no _extensions_ @@ -82,8 +94,7 @@ const ::google::protobuf::uint32 TableStruct::offsets[] = { ~0u, // no _weak_field_map_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(VideoType, kind_), }; - -static const ::google::protobuf::internal::MigrationSchema schemas[] = { +static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { { 0, -1, sizeof(MediaType)}, { 9, -1, sizeof(ImageType)}, { 15, -1, sizeof(DocumentType)}, @@ -119,31 +130,23 @@ void protobuf_RegisterTypes(const ::std::string&) { } } // namespace - -void TableStruct::Shutdown() { - _MediaType_default_instance_.Shutdown(); - delete file_level_metadata[0].reflection; - _ImageType_default_instance_.Shutdown(); - delete file_level_metadata[1].reflection; - _DocumentType_default_instance_.Shutdown(); - delete file_level_metadata[2].reflection; - _VideoType_default_instance_.Shutdown(); - delete file_level_metadata[3].reflection; -} - void TableStruct::InitDefaultsImpl() { GOOGLE_PROTOBUF_VERIFY_VERSION; ::google::protobuf::internal::InitProtobufDefaults(); - _MediaType_default_instance_.DefaultConstruct(); - _ImageType_default_instance_.DefaultConstruct(); - _DocumentType_default_instance_.DefaultConstruct(); - _VideoType_default_instance_.DefaultConstruct(); - _MediaType_default_instance_.get_mutable()->image_type_ = const_cast< ::ImageType*>( + _MediaType_default_instance_._instance.DefaultConstruct(); + ::google::protobuf::internal::OnShutdownDestroyMessage( + &_MediaType_default_instance_);_ImageType_default_instance_._instance.DefaultConstruct(); + ::google::protobuf::internal::OnShutdownDestroyMessage( + &_ImageType_default_instance_);_DocumentType_default_instance_._instance.DefaultConstruct(); + ::google::protobuf::internal::OnShutdownDestroyMessage( + &_DocumentType_default_instance_);_VideoType_default_instance_._instance.DefaultConstruct(); + ::google::protobuf::internal::OnShutdownDestroyMessage( + &_VideoType_default_instance_);_MediaType_default_instance_._instance.get_mutable()->image_type_ = const_cast< ::ImageType*>( ::ImageType::internal_default_instance()); - _MediaType_default_instance_.get_mutable()->document_type_ = const_cast< ::DocumentType*>( + _MediaType_default_instance_._instance.get_mutable()->document_type_ = const_cast< ::DocumentType*>( ::DocumentType::internal_default_instance()); - _MediaType_default_instance_.get_mutable()->video_type_ = const_cast< ::VideoType*>( + _MediaType_default_instance_._instance.get_mutable()->video_type_ = const_cast< ::VideoType*>( ::VideoType::internal_default_instance()); } @@ -151,9 +154,10 @@ void InitDefaults() { static GOOGLE_PROTOBUF_DECLARE_ONCE(once); ::google::protobuf::GoogleOnceInit(&once, &TableStruct::InitDefaultsImpl); } +namespace { void AddDescriptorsImpl() { InitDefaults(); - static const char descriptor[] = { + static const char descriptor[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { "\n\025media/MediaType.proto\"\310\001\n\tMediaType\022\035\n" "\004kind\030\001 \001(\0162\017.MediaType.Kind\022\036\n\nimage_ty" "pe\030e \001(\0132\n.ImageType\022%\n\rdocument_type\030\311\001" @@ -175,14 +179,14 @@ void AddDescriptorsImpl() { descriptor, 618); ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( "media/MediaType.proto", &protobuf_RegisterTypes); - ::google::protobuf::internal::OnShutdown(&TableStruct::Shutdown); } +} // anonymous namespace void AddDescriptors() { static GOOGLE_PROTOBUF_DECLARE_ONCE(once); ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl); } -// Force AddDescriptors() to be called at static initialization time. +// Force AddDescriptors() to be called at dynamic initialization time. struct StaticDescriptorInitializer { StaticDescriptorInitializer() { AddDescriptors(); @@ -453,9 +457,7 @@ MediaType::MediaType() MediaType::MediaType(::google::protobuf::Arena* arena) : ::google::protobuf::Message(), _internal_metadata_(arena) { -#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER protobuf_media_2fMediaType_2eproto::InitDefaults(); -#endif // GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:MediaType) @@ -485,8 +487,9 @@ MediaType::MediaType(const MediaType& from) } void MediaType::SharedCtor() { - ::memset(&image_type_, 0, reinterpret_cast(&kind_) - - reinterpret_cast(&image_type_) + sizeof(kind_)); + ::memset(&image_type_, 0, static_cast( + reinterpret_cast(&kind_) - + reinterpret_cast(&image_type_)) + sizeof(kind_)); _cached_size_ = 0; } @@ -497,19 +500,14 @@ MediaType::~MediaType() { void MediaType::SharedDtor() { ::google::protobuf::Arena* arena = GetArenaNoVirtual(); + GOOGLE_DCHECK(arena == NULL); if (arena != NULL) { return; } - if (this != internal_default_instance()) { - delete image_type_; - } - if (this != internal_default_instance()) { - delete document_type_; - } - if (this != internal_default_instance()) { - delete video_type_; - } + if (this != internal_default_instance()) delete image_type_; + if (this != internal_default_instance()) delete document_type_; + if (this != internal_default_instance()) delete video_type_; } void MediaType::ArenaDtor(void* object) { @@ -539,6 +537,10 @@ MediaType* MediaType::New(::google::protobuf::Arena* arena) const { void MediaType::Clear() { // @@protoc_insertion_point(message_clear_start:MediaType) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + if (GetArenaNoVirtual() == NULL && image_type_ != NULL) { delete image_type_; } @@ -552,6 +554,7 @@ void MediaType::Clear() { } video_type_ = NULL; kind_ = 0; + _internal_metadata_.Clear(); } bool MediaType::MergePartialFromCodedStream( @@ -567,7 +570,7 @@ bool MediaType::MergePartialFromCodedStream( // .MediaType.Kind kind = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(8u)) { + static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) { int value; DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( @@ -582,7 +585,7 @@ bool MediaType::MergePartialFromCodedStream( // .ImageType image_type = 101; case 101: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(810u)) { + static_cast< ::google::protobuf::uint8>(42u /* 810 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, mutable_image_type())); } else { @@ -594,7 +597,7 @@ bool MediaType::MergePartialFromCodedStream( // .DocumentType document_type = 201; case 201: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(1610u)) { + static_cast< ::google::protobuf::uint8>(74u /* 1610 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, mutable_document_type())); } else { @@ -606,7 +609,7 @@ bool MediaType::MergePartialFromCodedStream( // .VideoType video_type = 301; case 301: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(2410u)) { + static_cast< ::google::protobuf::uint8>(106u /* 2410 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, mutable_video_type())); } else { @@ -617,12 +620,11 @@ bool MediaType::MergePartialFromCodedStream( default: { handle_unusual: - if (tag == 0 || - ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + if (tag == 0) { goto success; } - DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } @@ -666,6 +668,10 @@ void MediaType::SerializeWithCachedSizes( 301, *this->video_type_, output); } + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); + } // @@protoc_insertion_point(serialize_end:MediaType) } @@ -703,6 +709,10 @@ ::google::protobuf::uint8* MediaType::InternalSerializeWithCachedSizesToArray( 301, *this->video_type_, deterministic, target); } + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); + } // @@protoc_insertion_point(serialize_to_array_end:MediaType) return target; } @@ -711,6 +721,11 @@ size_t MediaType::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:MediaType) size_t total_size = 0; + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); + } // .ImageType image_type = 101; if (this->has_image_type()) { total_size += 2 + @@ -819,11 +834,13 @@ void MediaType::UnsafeArenaSwap(MediaType* other) { InternalSwap(other); } void MediaType::InternalSwap(MediaType* other) { - std::swap(image_type_, other->image_type_); - std::swap(document_type_, other->document_type_); - std::swap(video_type_, other->video_type_); - std::swap(kind_, other->kind_); - std::swap(_cached_size_, other->_cached_size_); + using std::swap; + swap(image_type_, other->image_type_); + swap(document_type_, other->document_type_); + swap(video_type_, other->video_type_); + swap(kind_, other->kind_); + _internal_metadata_.Swap(&other->_internal_metadata_); + swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata MediaType::GetMetadata() const { @@ -857,9 +874,10 @@ void MediaType::clear_image_type() { image_type_ = NULL; } const ::ImageType& MediaType::image_type() const { + const ::ImageType* p = image_type_; // @@protoc_insertion_point(field_get:MediaType.image_type) - return image_type_ != NULL ? *image_type_ - : *::ImageType::internal_default_instance(); + return p != NULL ? *p : *reinterpret_cast( + &::_ImageType_default_instance_); } ::ImageType* MediaType::mutable_image_type() { @@ -906,9 +924,10 @@ void MediaType::clear_document_type() { document_type_ = NULL; } const ::DocumentType& MediaType::document_type() const { + const ::DocumentType* p = document_type_; // @@protoc_insertion_point(field_get:MediaType.document_type) - return document_type_ != NULL ? *document_type_ - : *::DocumentType::internal_default_instance(); + return p != NULL ? *p : *reinterpret_cast( + &::_DocumentType_default_instance_); } ::DocumentType* MediaType::mutable_document_type() { @@ -955,9 +974,10 @@ void MediaType::clear_video_type() { video_type_ = NULL; } const ::VideoType& MediaType::video_type() const { + const ::VideoType* p = video_type_; // @@protoc_insertion_point(field_get:MediaType.video_type) - return video_type_ != NULL ? *video_type_ - : *::VideoType::internal_default_instance(); + return p != NULL ? *p : *reinterpret_cast( + &::_VideoType_default_instance_); } ::VideoType* MediaType::mutable_video_type() { @@ -1014,9 +1034,7 @@ ImageType::ImageType() ImageType::ImageType(::google::protobuf::Arena* arena) : ::google::protobuf::Message(), _internal_metadata_(arena) { -#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER protobuf_media_2fMediaType_2eproto::InitDefaults(); -#endif // GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:ImageType) @@ -1042,6 +1060,7 @@ ImageType::~ImageType() { void ImageType::SharedDtor() { ::google::protobuf::Arena* arena = GetArenaNoVirtual(); + GOOGLE_DCHECK(arena == NULL); if (arena != NULL) { return; } @@ -1075,7 +1094,12 @@ ImageType* ImageType::New(::google::protobuf::Arena* arena) const { void ImageType::Clear() { // @@protoc_insertion_point(message_clear_start:ImageType) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + kind_ = 0; + _internal_metadata_.Clear(); } bool ImageType::MergePartialFromCodedStream( @@ -1091,7 +1115,7 @@ bool ImageType::MergePartialFromCodedStream( // .ImageType.ImageKind kind = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(8u)) { + static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) { int value; DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( @@ -1105,12 +1129,11 @@ bool ImageType::MergePartialFromCodedStream( default: { handle_unusual: - if (tag == 0 || - ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + if (tag == 0) { goto success; } - DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } @@ -1136,6 +1159,10 @@ void ImageType::SerializeWithCachedSizes( 1, this->kind(), output); } + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); + } // @@protoc_insertion_point(serialize_end:ImageType) } @@ -1152,6 +1179,10 @@ ::google::protobuf::uint8* ImageType::InternalSerializeWithCachedSizesToArray( 1, this->kind(), target); } + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); + } // @@protoc_insertion_point(serialize_to_array_end:ImageType) return target; } @@ -1160,6 +1191,11 @@ size_t ImageType::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:ImageType) size_t total_size = 0; + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); + } // .ImageType.ImageKind kind = 1; if (this->kind() != 0) { total_size += 1 + @@ -1238,8 +1274,10 @@ void ImageType::UnsafeArenaSwap(ImageType* other) { InternalSwap(other); } void ImageType::InternalSwap(ImageType* other) { - std::swap(kind_, other->kind_); - std::swap(_cached_size_, other->_cached_size_); + using std::swap; + swap(kind_, other->kind_); + _internal_metadata_.Swap(&other->_internal_metadata_); + swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata ImageType::GetMetadata() const { @@ -1284,9 +1322,7 @@ DocumentType::DocumentType() DocumentType::DocumentType(::google::protobuf::Arena* arena) : ::google::protobuf::Message(), _internal_metadata_(arena) { -#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER protobuf_media_2fMediaType_2eproto::InitDefaults(); -#endif // GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:DocumentType) @@ -1297,14 +1333,15 @@ DocumentType::DocumentType(const DocumentType& from) _cached_size_(0) { _internal_metadata_.MergeFrom(from._internal_metadata_); ::memcpy(&kind_, &from.kind_, - reinterpret_cast(&compressed_) - - reinterpret_cast(&kind_) + sizeof(compressed_)); + static_cast(reinterpret_cast(&compressed_) - + reinterpret_cast(&kind_)) + sizeof(compressed_)); // @@protoc_insertion_point(copy_constructor:DocumentType) } void DocumentType::SharedCtor() { - ::memset(&kind_, 0, reinterpret_cast(&compressed_) - - reinterpret_cast(&kind_) + sizeof(compressed_)); + ::memset(&kind_, 0, static_cast( + reinterpret_cast(&compressed_) - + reinterpret_cast(&kind_)) + sizeof(compressed_)); _cached_size_ = 0; } @@ -1315,6 +1352,7 @@ DocumentType::~DocumentType() { void DocumentType::SharedDtor() { ::google::protobuf::Arena* arena = GetArenaNoVirtual(); + GOOGLE_DCHECK(arena == NULL); if (arena != NULL) { return; } @@ -1348,8 +1386,14 @@ DocumentType* DocumentType::New(::google::protobuf::Arena* arena) const { void DocumentType::Clear() { // @@protoc_insertion_point(message_clear_start:DocumentType) - ::memset(&kind_, 0, reinterpret_cast(&compressed_) - - reinterpret_cast(&kind_) + sizeof(compressed_)); + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + ::memset(&kind_, 0, static_cast( + reinterpret_cast(&compressed_) - + reinterpret_cast(&kind_)) + sizeof(compressed_)); + _internal_metadata_.Clear(); } bool DocumentType::MergePartialFromCodedStream( @@ -1365,7 +1409,7 @@ bool DocumentType::MergePartialFromCodedStream( // .DocumentType.DocumentKind kind = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(8u)) { + static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) { int value; DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( @@ -1380,7 +1424,7 @@ bool DocumentType::MergePartialFromCodedStream( // bool compressed = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(16u)) { + static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) { DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( @@ -1393,12 +1437,11 @@ bool DocumentType::MergePartialFromCodedStream( default: { handle_unusual: - if (tag == 0 || - ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + if (tag == 0) { goto success; } - DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } @@ -1429,6 +1472,10 @@ void DocumentType::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::WriteBool(2, this->compressed(), output); } + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); + } // @@protoc_insertion_point(serialize_end:DocumentType) } @@ -1450,6 +1497,10 @@ ::google::protobuf::uint8* DocumentType::InternalSerializeWithCachedSizesToArray target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(2, this->compressed(), target); } + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); + } // @@protoc_insertion_point(serialize_to_array_end:DocumentType) return target; } @@ -1458,6 +1509,11 @@ size_t DocumentType::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:DocumentType) size_t total_size = 0; + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); + } // .DocumentType.DocumentKind kind = 1; if (this->kind() != 0) { total_size += 1 + @@ -1544,9 +1600,11 @@ void DocumentType::UnsafeArenaSwap(DocumentType* other) { InternalSwap(other); } void DocumentType::InternalSwap(DocumentType* other) { - std::swap(kind_, other->kind_); - std::swap(compressed_, other->compressed_); - std::swap(_cached_size_, other->_cached_size_); + using std::swap; + swap(kind_, other->kind_); + swap(compressed_, other->compressed_); + _internal_metadata_.Swap(&other->_internal_metadata_); + swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata DocumentType::GetMetadata() const { @@ -1604,9 +1662,7 @@ VideoType::VideoType() VideoType::VideoType(::google::protobuf::Arena* arena) : ::google::protobuf::Message(), _internal_metadata_(arena) { -#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER protobuf_media_2fMediaType_2eproto::InitDefaults(); -#endif // GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:VideoType) @@ -1632,6 +1688,7 @@ VideoType::~VideoType() { void VideoType::SharedDtor() { ::google::protobuf::Arena* arena = GetArenaNoVirtual(); + GOOGLE_DCHECK(arena == NULL); if (arena != NULL) { return; } @@ -1665,7 +1722,12 @@ VideoType* VideoType::New(::google::protobuf::Arena* arena) const { void VideoType::Clear() { // @@protoc_insertion_point(message_clear_start:VideoType) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + kind_ = 0; + _internal_metadata_.Clear(); } bool VideoType::MergePartialFromCodedStream( @@ -1681,7 +1743,7 @@ bool VideoType::MergePartialFromCodedStream( // .VideoType.VideoKind kind = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(8u)) { + static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) { int value; DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( @@ -1695,12 +1757,11 @@ bool VideoType::MergePartialFromCodedStream( default: { handle_unusual: - if (tag == 0 || - ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + if (tag == 0) { goto success; } - DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } @@ -1726,6 +1787,10 @@ void VideoType::SerializeWithCachedSizes( 1, this->kind(), output); } + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); + } // @@protoc_insertion_point(serialize_end:VideoType) } @@ -1742,6 +1807,10 @@ ::google::protobuf::uint8* VideoType::InternalSerializeWithCachedSizesToArray( 1, this->kind(), target); } + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); + } // @@protoc_insertion_point(serialize_to_array_end:VideoType) return target; } @@ -1750,6 +1819,11 @@ size_t VideoType::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:VideoType) size_t total_size = 0; + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); + } // .VideoType.VideoKind kind = 1; if (this->kind() != 0) { total_size += 1 + @@ -1828,8 +1902,10 @@ void VideoType::UnsafeArenaSwap(VideoType* other) { InternalSwap(other); } void VideoType::InternalSwap(VideoType* other) { - std::swap(kind_, other->kind_); - std::swap(_cached_size_, other->_cached_size_); + using std::swap; + swap(kind_, other->kind_); + _internal_metadata_.Swap(&other->_internal_metadata_); + swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata VideoType::GetMetadata() const { diff --git a/languages/cpp/media/MediaType.pb.h b/languages/cpp/media/MediaType.pb.h index 9e616da..72ed00d 100644 --- a/languages/cpp/media/MediaType.pb.h +++ b/languages/cpp/media/MediaType.pb.h @@ -8,12 +8,12 @@ #include -#if GOOGLE_PROTOBUF_VERSION < 3003000 +#if GOOGLE_PROTOBUF_VERSION < 3004000 #error This file was generated by a newer version of protoc which is #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 3003002 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#if 3004000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION #error This file was generated by an older version of protoc which is #error incompatible with your Protocol Buffer headers. Please #error regenerate this file with a newer version of protoc. @@ -51,8 +51,9 @@ struct TableStruct { static const ::google::protobuf::internal::AuxillaryParseTableField aux[]; static const ::google::protobuf::internal::ParseTable schema[]; static const ::google::protobuf::uint32 offsets[]; + static const ::google::protobuf::internal::FieldMetadata field_metadata[]; + static const ::google::protobuf::internal::SerializationTable serialization_table[]; static void InitDefaultsImpl(); - static void Shutdown(); }; void AddDescriptors(); void InitDefaults(); @@ -163,7 +164,21 @@ class MediaType : public ::google::protobuf::Message /* @@protoc_insertion_point CopyFrom(from); return *this; } + #if LANG_CXX11 + MediaType(MediaType&& from) noexcept + : MediaType() { + *this = ::std::move(from); + } + inline MediaType& operator=(MediaType&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif inline ::google::protobuf::Arena* GetArena() const PROTOBUF_FINAL { return GetArenaNoVirtual(); } @@ -182,6 +197,9 @@ class MediaType : public ::google::protobuf::Message /* @@protoc_insertion_point void UnsafeArenaSwap(MediaType* other); void Swap(MediaType* other); + friend void swap(MediaType& a, MediaType& b) { + a.Swap(&b); + } // implements Message ---------------------------------------------- @@ -322,7 +340,7 @@ class MediaType : public ::google::protobuf::Message /* @@protoc_insertion_point private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - friend class ::google::protobuf::Arena; + template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; ::ImageType* image_type_; @@ -345,7 +363,21 @@ class ImageType : public ::google::protobuf::Message /* @@protoc_insertion_point CopyFrom(from); return *this; } + #if LANG_CXX11 + ImageType(ImageType&& from) noexcept + : ImageType() { + *this = ::std::move(from); + } + inline ImageType& operator=(ImageType&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif inline ::google::protobuf::Arena* GetArena() const PROTOBUF_FINAL { return GetArenaNoVirtual(); } @@ -364,6 +396,9 @@ class ImageType : public ::google::protobuf::Message /* @@protoc_insertion_point void UnsafeArenaSwap(ImageType* other); void Swap(ImageType* other); + friend void swap(ImageType& a, ImageType& b) { + a.Swap(&b); + } // implements Message ---------------------------------------------- @@ -452,7 +487,7 @@ class ImageType : public ::google::protobuf::Message /* @@protoc_insertion_point private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - friend class ::google::protobuf::Arena; + template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; int kind_; @@ -472,7 +507,21 @@ class DocumentType : public ::google::protobuf::Message /* @@protoc_insertion_po CopyFrom(from); return *this; } + #if LANG_CXX11 + DocumentType(DocumentType&& from) noexcept + : DocumentType() { + *this = ::std::move(from); + } + inline DocumentType& operator=(DocumentType&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif inline ::google::protobuf::Arena* GetArena() const PROTOBUF_FINAL { return GetArenaNoVirtual(); } @@ -491,6 +540,9 @@ class DocumentType : public ::google::protobuf::Message /* @@protoc_insertion_po void UnsafeArenaSwap(DocumentType* other); void Swap(DocumentType* other); + friend void swap(DocumentType& a, DocumentType& b) { + a.Swap(&b); + } // implements Message ---------------------------------------------- @@ -583,7 +635,7 @@ class DocumentType : public ::google::protobuf::Message /* @@protoc_insertion_po private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - friend class ::google::protobuf::Arena; + template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; int kind_; @@ -604,7 +656,21 @@ class VideoType : public ::google::protobuf::Message /* @@protoc_insertion_point CopyFrom(from); return *this; } + #if LANG_CXX11 + VideoType(VideoType&& from) noexcept + : VideoType() { + *this = ::std::move(from); + } + inline VideoType& operator=(VideoType&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif inline ::google::protobuf::Arena* GetArena() const PROTOBUF_FINAL { return GetArenaNoVirtual(); } @@ -623,6 +689,9 @@ class VideoType : public ::google::protobuf::Message /* @@protoc_insertion_point void UnsafeArenaSwap(VideoType* other); void Swap(VideoType* other); + friend void swap(VideoType& a, VideoType& b) { + a.Swap(&b); + } // implements Message ---------------------------------------------- @@ -707,7 +776,7 @@ class VideoType : public ::google::protobuf::Message /* @@protoc_insertion_point private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - friend class ::google::protobuf::Arena; + template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; int kind_; @@ -720,6 +789,10 @@ class VideoType : public ::google::protobuf::Message /* @@protoc_insertion_point // =================================================================== #if !PROTOBUF_INLINE_NOT_IN_HEADERS +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ // MediaType // .MediaType.Kind kind = 1; @@ -745,9 +818,10 @@ inline void MediaType::clear_image_type() { image_type_ = NULL; } inline const ::ImageType& MediaType::image_type() const { + const ::ImageType* p = image_type_; // @@protoc_insertion_point(field_get:MediaType.image_type) - return image_type_ != NULL ? *image_type_ - : *::ImageType::internal_default_instance(); + return p != NULL ? *p : *reinterpret_cast( + &::_ImageType_default_instance_); } inline ::ImageType* MediaType::mutable_image_type() { @@ -794,9 +868,10 @@ inline void MediaType::clear_document_type() { document_type_ = NULL; } inline const ::DocumentType& MediaType::document_type() const { + const ::DocumentType* p = document_type_; // @@protoc_insertion_point(field_get:MediaType.document_type) - return document_type_ != NULL ? *document_type_ - : *::DocumentType::internal_default_instance(); + return p != NULL ? *p : *reinterpret_cast( + &::_DocumentType_default_instance_); } inline ::DocumentType* MediaType::mutable_document_type() { @@ -843,9 +918,10 @@ inline void MediaType::clear_video_type() { video_type_ = NULL; } inline const ::VideoType& MediaType::video_type() const { + const ::VideoType* p = video_type_; // @@protoc_insertion_point(field_get:MediaType.video_type) - return video_type_ != NULL ? *video_type_ - : *::VideoType::internal_default_instance(); + return p != NULL ? *p : *reinterpret_cast( + &::_VideoType_default_instance_); } inline ::VideoType* MediaType::mutable_video_type() { @@ -951,6 +1027,9 @@ inline void VideoType::set_kind(::VideoType_VideoKind value) { // @@protoc_insertion_point(field_set:VideoType.kind) } +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ #endif // !PROTOBUF_INLINE_NOT_IN_HEADERS // ------------------------------------------------------------------- @@ -962,7 +1041,6 @@ inline void VideoType::set_kind(::VideoType_VideoKind value) { // @@protoc_insertion_point(namespace_scope) -#ifndef SWIG namespace google { namespace protobuf { @@ -989,7 +1067,6 @@ inline const EnumDescriptor* GetEnumDescriptor< ::VideoType_VideoKind>() { } // namespace protobuf } // namespace google -#endif // SWIG // @@protoc_insertion_point(global_scope) diff --git a/languages/cpp/products/Flower.pb.cc b/languages/cpp/products/Flower.pb.cc index 1804aec..225df91 100644 --- a/languages/cpp/products/Flower.pb.cc +++ b/languages/cpp/products/Flower.pb.cc @@ -16,7 +16,10 @@ #include #include // @@protoc_insertion_point(includes) -class FlowerDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed { +class FlowerDefaultTypeInternal { +public: + ::google::protobuf::internal::ExplicitlyConstructed + _instance; } _Flower_default_instance_; namespace protobuf_products_2fFlower_2eproto { @@ -29,20 +32,20 @@ ::google::protobuf::Metadata file_level_metadata[1]; } // namespace PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::ParseTableField - const TableStruct::entries[] = { + const TableStruct::entries[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { {0, 0, 0, ::google::protobuf::internal::kInvalidMask, 0, 0}, }; PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::AuxillaryParseTableField - const TableStruct::aux[] = { + const TableStruct::aux[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { ::google::protobuf::internal::AuxillaryParseTableField(), }; PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::ParseTable const - TableStruct::schema[] = { - { NULL, NULL, 0, -1, -1, false }, + TableStruct::schema[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + { NULL, NULL, 0, -1, -1, -1, -1, NULL, false }, }; -const ::google::protobuf::uint32 TableStruct::offsets[] = { +const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Flower, _internal_metadata_), ~0u, // no _extensions_ @@ -54,8 +57,7 @@ const ::google::protobuf::uint32 TableStruct::offsets[] = { GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Flower, flags_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Flower, pricing_), }; - -static const ::google::protobuf::internal::MigrationSchema schemas[] = { +static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { { 0, -1, sizeof(Flower)}, }; @@ -85,12 +87,6 @@ void protobuf_RegisterTypes(const ::std::string&) { } } // namespace - -void TableStruct::Shutdown() { - _Flower_default_instance_.Shutdown(); - delete file_level_metadata[0].reflection; -} - void TableStruct::InitDefaultsImpl() { GOOGLE_PROTOBUF_VERIFY_VERSION; @@ -100,16 +96,17 @@ void TableStruct::InitDefaultsImpl() { ::protobuf_content_2fProductContent_2eproto::InitDefaults(); ::protobuf_structs_2fFlagsDescriptor_2eproto::InitDefaults(); ::protobuf_structs_2fpricing_2fPricingDescriptor_2eproto::InitDefaults(); - _Flower_default_instance_.DefaultConstruct(); - _Flower_default_instance_.get_mutable()->key_ = const_cast< ::ProductKey*>( + _Flower_default_instance_._instance.DefaultConstruct(); + ::google::protobuf::internal::OnShutdownDestroyMessage( + &_Flower_default_instance_);_Flower_default_instance_._instance.get_mutable()->key_ = const_cast< ::ProductKey*>( ::ProductKey::internal_default_instance()); - _Flower_default_instance_.get_mutable()->product_data_ = const_cast< ::ProductContent*>( + _Flower_default_instance_._instance.get_mutable()->product_data_ = const_cast< ::ProductContent*>( ::ProductContent::internal_default_instance()); - _Flower_default_instance_.get_mutable()->material_data_ = const_cast< ::MaterialsData*>( + _Flower_default_instance_._instance.get_mutable()->material_data_ = const_cast< ::MaterialsData*>( ::MaterialsData::internal_default_instance()); - _Flower_default_instance_.get_mutable()->flags_ = const_cast< ::FlagsDescriptor*>( + _Flower_default_instance_._instance.get_mutable()->flags_ = const_cast< ::FlagsDescriptor*>( ::FlagsDescriptor::internal_default_instance()); - _Flower_default_instance_.get_mutable()->pricing_ = const_cast< ::ProductPricing*>( + _Flower_default_instance_._instance.get_mutable()->pricing_ = const_cast< ::ProductPricing*>( ::ProductPricing::internal_default_instance()); } @@ -117,9 +114,10 @@ void InitDefaults() { static GOOGLE_PROTOBUF_DECLARE_ONCE(once); ::google::protobuf::GoogleOnceInit(&once, &TableStruct::InitDefaultsImpl); } +namespace { void AddDescriptorsImpl() { InitDefaults(); - static const char descriptor[] = { + static const char descriptor[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { "\n\025products/Flower.proto\032\025base/ProductKey" ".proto\032\033content/MaterialsData.proto\032\034con" "tent/ProductContent.proto\032\035structs/Flags" @@ -141,14 +139,14 @@ void AddDescriptorsImpl() { ::protobuf_content_2fProductContent_2eproto::AddDescriptors(); ::protobuf_structs_2fFlagsDescriptor_2eproto::AddDescriptors(); ::protobuf_structs_2fpricing_2fPricingDescriptor_2eproto::AddDescriptors(); - ::google::protobuf::internal::OnShutdown(&TableStruct::Shutdown); } +} // anonymous namespace void AddDescriptors() { static GOOGLE_PROTOBUF_DECLARE_ONCE(once); ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl); } -// Force AddDescriptors() to be called at static initialization time. +// Force AddDescriptors() to be called at dynamic initialization time. struct StaticDescriptorInitializer { StaticDescriptorInitializer() { AddDescriptors(); @@ -414,9 +412,7 @@ Flower::Flower() Flower::Flower(::google::protobuf::Arena* arena) : ::google::protobuf::Message(), _internal_metadata_(arena) { -#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER protobuf_products_2fFlower_2eproto::InitDefaults(); -#endif // GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:Flower) @@ -455,8 +451,9 @@ Flower::Flower(const Flower& from) } void Flower::SharedCtor() { - ::memset(&key_, 0, reinterpret_cast(&pricing_) - - reinterpret_cast(&key_) + sizeof(pricing_)); + ::memset(&key_, 0, static_cast( + reinterpret_cast(&pricing_) - + reinterpret_cast(&key_)) + sizeof(pricing_)); _cached_size_ = 0; } @@ -467,25 +464,16 @@ Flower::~Flower() { void Flower::SharedDtor() { ::google::protobuf::Arena* arena = GetArenaNoVirtual(); + GOOGLE_DCHECK(arena == NULL); if (arena != NULL) { return; } - if (this != internal_default_instance()) { - delete key_; - } - if (this != internal_default_instance()) { - delete product_data_; - } - if (this != internal_default_instance()) { - delete material_data_; - } - if (this != internal_default_instance()) { - delete flags_; - } - if (this != internal_default_instance()) { - delete pricing_; - } + if (this != internal_default_instance()) delete key_; + if (this != internal_default_instance()) delete product_data_; + if (this != internal_default_instance()) delete material_data_; + if (this != internal_default_instance()) delete flags_; + if (this != internal_default_instance()) delete pricing_; } void Flower::ArenaDtor(void* object) { @@ -515,6 +503,10 @@ Flower* Flower::New(::google::protobuf::Arena* arena) const { void Flower::Clear() { // @@protoc_insertion_point(message_clear_start:Flower) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + if (GetArenaNoVirtual() == NULL && key_ != NULL) { delete key_; } @@ -535,6 +527,7 @@ void Flower::Clear() { delete pricing_; } pricing_ = NULL; + _internal_metadata_.Clear(); } bool Flower::MergePartialFromCodedStream( @@ -550,7 +543,7 @@ bool Flower::MergePartialFromCodedStream( // .ProductKey key = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(10u)) { + static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, mutable_key())); } else { @@ -562,7 +555,7 @@ bool Flower::MergePartialFromCodedStream( // .ProductContent product_data = 20; case 20: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(162u)) { + static_cast< ::google::protobuf::uint8>(162u /* 162 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, mutable_product_data())); } else { @@ -574,7 +567,7 @@ bool Flower::MergePartialFromCodedStream( // .MaterialsData material_data = 21; case 21: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(170u)) { + static_cast< ::google::protobuf::uint8>(170u /* 170 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, mutable_material_data())); } else { @@ -586,7 +579,7 @@ bool Flower::MergePartialFromCodedStream( // .FlagsDescriptor flags = 22; case 22: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(178u)) { + static_cast< ::google::protobuf::uint8>(178u /* 178 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, mutable_flags())); } else { @@ -598,7 +591,7 @@ bool Flower::MergePartialFromCodedStream( // .ProductPricing pricing = 23; case 23: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(186u)) { + static_cast< ::google::protobuf::uint8>(186u /* 186 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, mutable_pricing())); } else { @@ -609,12 +602,11 @@ bool Flower::MergePartialFromCodedStream( default: { handle_unusual: - if (tag == 0 || - ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + if (tag == 0) { goto success; } - DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } @@ -664,6 +656,10 @@ void Flower::SerializeWithCachedSizes( 23, *this->pricing_, output); } + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); + } // @@protoc_insertion_point(serialize_end:Flower) } @@ -709,6 +705,10 @@ ::google::protobuf::uint8* Flower::InternalSerializeWithCachedSizesToArray( 23, *this->pricing_, deterministic, target); } + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); + } // @@protoc_insertion_point(serialize_to_array_end:Flower) return target; } @@ -717,6 +717,11 @@ size_t Flower::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:Flower) size_t total_size = 0; + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); + } // .ProductKey key = 1; if (this->has_key()) { total_size += 1 + @@ -836,12 +841,14 @@ void Flower::UnsafeArenaSwap(Flower* other) { InternalSwap(other); } void Flower::InternalSwap(Flower* other) { - std::swap(key_, other->key_); - std::swap(product_data_, other->product_data_); - std::swap(material_data_, other->material_data_); - std::swap(flags_, other->flags_); - std::swap(pricing_, other->pricing_); - std::swap(_cached_size_, other->_cached_size_); + using std::swap; + swap(key_, other->key_); + swap(product_data_, other->product_data_); + swap(material_data_, other->material_data_); + swap(flags_, other->flags_); + swap(pricing_, other->pricing_); + _internal_metadata_.Swap(&other->_internal_metadata_); + swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata Flower::GetMetadata() const { @@ -861,9 +868,10 @@ void Flower::clear_key() { key_ = NULL; } const ::ProductKey& Flower::key() const { + const ::ProductKey* p = key_; // @@protoc_insertion_point(field_get:Flower.key) - return key_ != NULL ? *key_ - : *::ProductKey::internal_default_instance(); + return p != NULL ? *p : *reinterpret_cast( + &::_ProductKey_default_instance_); } ::ProductKey* Flower::mutable_key() { @@ -910,9 +918,10 @@ void Flower::clear_product_data() { product_data_ = NULL; } const ::ProductContent& Flower::product_data() const { + const ::ProductContent* p = product_data_; // @@protoc_insertion_point(field_get:Flower.product_data) - return product_data_ != NULL ? *product_data_ - : *::ProductContent::internal_default_instance(); + return p != NULL ? *p : *reinterpret_cast( + &::_ProductContent_default_instance_); } ::ProductContent* Flower::mutable_product_data() { @@ -959,9 +968,10 @@ void Flower::clear_material_data() { material_data_ = NULL; } const ::MaterialsData& Flower::material_data() const { + const ::MaterialsData* p = material_data_; // @@protoc_insertion_point(field_get:Flower.material_data) - return material_data_ != NULL ? *material_data_ - : *::MaterialsData::internal_default_instance(); + return p != NULL ? *p : *reinterpret_cast( + &::_MaterialsData_default_instance_); } ::MaterialsData* Flower::mutable_material_data() { @@ -1008,9 +1018,10 @@ void Flower::clear_flags() { flags_ = NULL; } const ::FlagsDescriptor& Flower::flags() const { + const ::FlagsDescriptor* p = flags_; // @@protoc_insertion_point(field_get:Flower.flags) - return flags_ != NULL ? *flags_ - : *::FlagsDescriptor::internal_default_instance(); + return p != NULL ? *p : *reinterpret_cast( + &::_FlagsDescriptor_default_instance_); } ::FlagsDescriptor* Flower::mutable_flags() { @@ -1057,9 +1068,10 @@ void Flower::clear_pricing() { pricing_ = NULL; } const ::ProductPricing& Flower::pricing() const { + const ::ProductPricing* p = pricing_; // @@protoc_insertion_point(field_get:Flower.pricing) - return pricing_ != NULL ? *pricing_ - : *::ProductPricing::internal_default_instance(); + return p != NULL ? *p : *reinterpret_cast( + &::_ProductPricing_default_instance_); } ::ProductPricing* Flower::mutable_pricing() { diff --git a/languages/cpp/products/Flower.pb.h b/languages/cpp/products/Flower.pb.h index 6227951..67651cc 100644 --- a/languages/cpp/products/Flower.pb.h +++ b/languages/cpp/products/Flower.pb.h @@ -8,12 +8,12 @@ #include -#if GOOGLE_PROTOBUF_VERSION < 3003000 +#if GOOGLE_PROTOBUF_VERSION < 3004000 #error This file was generated by a newer version of protoc which is #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 3003002 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#if 3004000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION #error This file was generated by an older version of protoc which is #error incompatible with your Protocol Buffer headers. Please #error regenerate this file with a newer version of protoc. @@ -35,45 +35,9 @@ #include "structs/FlagsDescriptor.pb.h" #include "structs/pricing/PricingDescriptor.pb.h" // @@protoc_insertion_point(includes) -class FlagsDescriptor; -class FlagsDescriptorDefaultTypeInternal; -extern FlagsDescriptorDefaultTypeInternal _FlagsDescriptor_default_instance_; class Flower; class FlowerDefaultTypeInternal; extern FlowerDefaultTypeInternal _Flower_default_instance_; -class FreebiePricingDescriptor; -class FreebiePricingDescriptorDefaultTypeInternal; -extern FreebiePricingDescriptorDefaultTypeInternal _FreebiePricingDescriptor_default_instance_; -class MaterialsData; -class MaterialsDataDefaultTypeInternal; -extern MaterialsDataDefaultTypeInternal _MaterialsData_default_instance_; -class PricingDescriptor; -class PricingDescriptorDefaultTypeInternal; -extern PricingDescriptorDefaultTypeInternal _PricingDescriptor_default_instance_; -class PricingTierAvailability; -class PricingTierAvailabilityDefaultTypeInternal; -extern PricingTierAvailabilityDefaultTypeInternal _PricingTierAvailability_default_instance_; -class ProductContent; -class ProductContentDefaultTypeInternal; -extern ProductContentDefaultTypeInternal _ProductContent_default_instance_; -class ProductFlagValue; -class ProductFlagValueDefaultTypeInternal; -extern ProductFlagValueDefaultTypeInternal _ProductFlagValue_default_instance_; -class ProductFlagset; -class ProductFlagsetDefaultTypeInternal; -extern ProductFlagsetDefaultTypeInternal _ProductFlagset_default_instance_; -class ProductKey; -class ProductKeyDefaultTypeInternal; -extern ProductKeyDefaultTypeInternal _ProductKey_default_instance_; -class ProductPricing; -class ProductPricingDefaultTypeInternal; -extern ProductPricingDefaultTypeInternal _ProductPricing_default_instance_; -class UnitPricingDescriptor; -class UnitPricingDescriptorDefaultTypeInternal; -extern UnitPricingDescriptorDefaultTypeInternal _UnitPricingDescriptor_default_instance_; -class WeightedPricingDescriptor; -class WeightedPricingDescriptorDefaultTypeInternal; -extern WeightedPricingDescriptorDefaultTypeInternal _WeightedPricingDescriptor_default_instance_; namespace protobuf_products_2fFlower_2eproto { // Internal implementation detail -- do not call these. @@ -82,8 +46,9 @@ struct TableStruct { static const ::google::protobuf::internal::AuxillaryParseTableField aux[]; static const ::google::protobuf::internal::ParseTable schema[]; static const ::google::protobuf::uint32 offsets[]; + static const ::google::protobuf::internal::FieldMetadata field_metadata[]; + static const ::google::protobuf::internal::SerializationTable serialization_table[]; static void InitDefaultsImpl(); - static void Shutdown(); }; void AddDescriptors(); void InitDefaults(); @@ -102,7 +67,21 @@ class Flower : public ::google::protobuf::Message /* @@protoc_insertion_point(cl CopyFrom(from); return *this; } + #if LANG_CXX11 + Flower(Flower&& from) noexcept + : Flower() { + *this = ::std::move(from); + } + inline Flower& operator=(Flower&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif inline ::google::protobuf::Arena* GetArena() const PROTOBUF_FINAL { return GetArenaNoVirtual(); } @@ -121,6 +100,9 @@ class Flower : public ::google::protobuf::Message /* @@protoc_insertion_point(cl void UnsafeArenaSwap(Flower* other); void Swap(Flower* other); + friend void swap(Flower& a, Flower& b) { + a.Swap(&b); + } // implements Message ---------------------------------------------- @@ -261,7 +243,7 @@ class Flower : public ::google::protobuf::Message /* @@protoc_insertion_point(cl private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - friend class ::google::protobuf::Arena; + template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; ::ProductKey* key_; @@ -278,6 +260,10 @@ class Flower : public ::google::protobuf::Message /* @@protoc_insertion_point(cl // =================================================================== #if !PROTOBUF_INLINE_NOT_IN_HEADERS +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ // Flower // .ProductKey key = 1; @@ -289,9 +275,10 @@ inline void Flower::clear_key() { key_ = NULL; } inline const ::ProductKey& Flower::key() const { + const ::ProductKey* p = key_; // @@protoc_insertion_point(field_get:Flower.key) - return key_ != NULL ? *key_ - : *::ProductKey::internal_default_instance(); + return p != NULL ? *p : *reinterpret_cast( + &::_ProductKey_default_instance_); } inline ::ProductKey* Flower::mutable_key() { @@ -338,9 +325,10 @@ inline void Flower::clear_product_data() { product_data_ = NULL; } inline const ::ProductContent& Flower::product_data() const { + const ::ProductContent* p = product_data_; // @@protoc_insertion_point(field_get:Flower.product_data) - return product_data_ != NULL ? *product_data_ - : *::ProductContent::internal_default_instance(); + return p != NULL ? *p : *reinterpret_cast( + &::_ProductContent_default_instance_); } inline ::ProductContent* Flower::mutable_product_data() { @@ -387,9 +375,10 @@ inline void Flower::clear_material_data() { material_data_ = NULL; } inline const ::MaterialsData& Flower::material_data() const { + const ::MaterialsData* p = material_data_; // @@protoc_insertion_point(field_get:Flower.material_data) - return material_data_ != NULL ? *material_data_ - : *::MaterialsData::internal_default_instance(); + return p != NULL ? *p : *reinterpret_cast( + &::_MaterialsData_default_instance_); } inline ::MaterialsData* Flower::mutable_material_data() { @@ -436,9 +425,10 @@ inline void Flower::clear_flags() { flags_ = NULL; } inline const ::FlagsDescriptor& Flower::flags() const { + const ::FlagsDescriptor* p = flags_; // @@protoc_insertion_point(field_get:Flower.flags) - return flags_ != NULL ? *flags_ - : *::FlagsDescriptor::internal_default_instance(); + return p != NULL ? *p : *reinterpret_cast( + &::_FlagsDescriptor_default_instance_); } inline ::FlagsDescriptor* Flower::mutable_flags() { @@ -485,9 +475,10 @@ inline void Flower::clear_pricing() { pricing_ = NULL; } inline const ::ProductPricing& Flower::pricing() const { + const ::ProductPricing* p = pricing_; // @@protoc_insertion_point(field_get:Flower.pricing) - return pricing_ != NULL ? *pricing_ - : *::ProductPricing::internal_default_instance(); + return p != NULL ? *p : *reinterpret_cast( + &::_ProductPricing_default_instance_); } inline ::ProductPricing* Flower::mutable_pricing() { @@ -525,6 +516,9 @@ inline void Flower::set_allocated_pricing(::ProductPricing* pricing) { // @@protoc_insertion_point(field_set_allocated:Flower.pricing) } +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ #endif // !PROTOBUF_INLINE_NOT_IN_HEADERS // @@protoc_insertion_point(namespace_scope) diff --git a/languages/cpp/structs/FlagsDescriptor.pb.cc b/languages/cpp/structs/FlagsDescriptor.pb.cc index 2f00ad0..4d2eb6e 100644 --- a/languages/cpp/structs/FlagsDescriptor.pb.cc +++ b/languages/cpp/structs/FlagsDescriptor.pb.cc @@ -16,11 +16,20 @@ #include #include // @@protoc_insertion_point(includes) -class ProductFlagValueDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed { +class ProductFlagValueDefaultTypeInternal { +public: + ::google::protobuf::internal::ExplicitlyConstructed + _instance; } _ProductFlagValue_default_instance_; -class ProductFlagsetDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed { +class ProductFlagsetDefaultTypeInternal { +public: + ::google::protobuf::internal::ExplicitlyConstructed + _instance; } _ProductFlagset_default_instance_; -class FlagsDescriptorDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed { +class FlagsDescriptorDefaultTypeInternal { +public: + ::google::protobuf::internal::ExplicitlyConstructed + _instance; } _FlagsDescriptor_default_instance_; namespace protobuf_structs_2fFlagsDescriptor_2eproto { @@ -34,22 +43,22 @@ const ::google::protobuf::EnumDescriptor* file_level_enum_descriptors[1]; } // namespace PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::ParseTableField - const TableStruct::entries[] = { + const TableStruct::entries[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { {0, 0, 0, ::google::protobuf::internal::kInvalidMask, 0, 0}, }; PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::AuxillaryParseTableField - const TableStruct::aux[] = { + const TableStruct::aux[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { ::google::protobuf::internal::AuxillaryParseTableField(), }; PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::ParseTable const - TableStruct::schema[] = { - { NULL, NULL, 0, -1, -1, false }, - { NULL, NULL, 0, -1, -1, false }, - { NULL, NULL, 0, -1, -1, false }, + TableStruct::schema[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + { NULL, NULL, 0, -1, -1, -1, -1, NULL, false }, + { NULL, NULL, 0, -1, -1, -1, -1, NULL, false }, + { NULL, NULL, 0, -1, -1, -1, -1, NULL, false }, }; -const ::google::protobuf::uint32 TableStruct::offsets[] = { +const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ProductFlagValue, _internal_metadata_), ~0u, // no _extensions_ @@ -74,8 +83,7 @@ const ::google::protobuf::uint32 TableStruct::offsets[] = { GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FlagsDescriptor, lastchance_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FlagsDescriptor, inhouse_), }; - -static const ::google::protobuf::internal::MigrationSchema schemas[] = { +static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { { 0, -1, sizeof(ProductFlagValue)}, { 7, -1, sizeof(ProductFlagset)}, { 13, -1, sizeof(FlagsDescriptor)}, @@ -109,32 +117,26 @@ void protobuf_RegisterTypes(const ::std::string&) { } } // namespace - -void TableStruct::Shutdown() { - _ProductFlagValue_default_instance_.Shutdown(); - delete file_level_metadata[0].reflection; - _ProductFlagset_default_instance_.Shutdown(); - delete file_level_metadata[1].reflection; - _FlagsDescriptor_default_instance_.Shutdown(); - delete file_level_metadata[2].reflection; -} - void TableStruct::InitDefaultsImpl() { GOOGLE_PROTOBUF_VERIFY_VERSION; ::google::protobuf::internal::InitProtobufDefaults(); - _ProductFlagValue_default_instance_.DefaultConstruct(); - _ProductFlagset_default_instance_.DefaultConstruct(); - _FlagsDescriptor_default_instance_.DefaultConstruct(); -} + _ProductFlagValue_default_instance_._instance.DefaultConstruct(); + ::google::protobuf::internal::OnShutdownDestroyMessage( + &_ProductFlagValue_default_instance_);_ProductFlagset_default_instance_._instance.DefaultConstruct(); + ::google::protobuf::internal::OnShutdownDestroyMessage( + &_ProductFlagset_default_instance_);_FlagsDescriptor_default_instance_._instance.DefaultConstruct(); + ::google::protobuf::internal::OnShutdownDestroyMessage( + &_FlagsDescriptor_default_instance_);} void InitDefaults() { static GOOGLE_PROTOBUF_DECLARE_ONCE(once); ::google::protobuf::GoogleOnceInit(&once, &TableStruct::InitDefaultsImpl); } +namespace { void AddDescriptorsImpl() { InitDefaults(); - static const char descriptor[] = { + static const char descriptor[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { "\n\035structs/FlagsDescriptor.proto\"=\n\020Produ" "ctFlagValue\022\032\n\004type\030\001 \001(\0162\014.ProductFlag\022" "\r\n\005value\030\002 \001(\010\"2\n\016ProductFlagset\022 \n\005flag" @@ -151,14 +153,14 @@ void AddDescriptorsImpl() { descriptor, 403); ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( "structs/FlagsDescriptor.proto", &protobuf_RegisterTypes); - ::google::protobuf::internal::OnShutdown(&TableStruct::Shutdown); } +} // anonymous namespace void AddDescriptors() { static GOOGLE_PROTOBUF_DECLARE_ONCE(once); ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl); } -// Force AddDescriptors() to be called at static initialization time. +// Force AddDescriptors() to be called at dynamic initialization time. struct StaticDescriptorInitializer { StaticDescriptorInitializer() { AddDescriptors(); @@ -203,9 +205,7 @@ ProductFlagValue::ProductFlagValue() ProductFlagValue::ProductFlagValue(::google::protobuf::Arena* arena) : ::google::protobuf::Message(), _internal_metadata_(arena) { -#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER protobuf_structs_2fFlagsDescriptor_2eproto::InitDefaults(); -#endif // GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:ProductFlagValue) @@ -216,14 +216,15 @@ ProductFlagValue::ProductFlagValue(const ProductFlagValue& from) _cached_size_(0) { _internal_metadata_.MergeFrom(from._internal_metadata_); ::memcpy(&type_, &from.type_, - reinterpret_cast(&value_) - - reinterpret_cast(&type_) + sizeof(value_)); + static_cast(reinterpret_cast(&value_) - + reinterpret_cast(&type_)) + sizeof(value_)); // @@protoc_insertion_point(copy_constructor:ProductFlagValue) } void ProductFlagValue::SharedCtor() { - ::memset(&type_, 0, reinterpret_cast(&value_) - - reinterpret_cast(&type_) + sizeof(value_)); + ::memset(&type_, 0, static_cast( + reinterpret_cast(&value_) - + reinterpret_cast(&type_)) + sizeof(value_)); _cached_size_ = 0; } @@ -234,6 +235,7 @@ ProductFlagValue::~ProductFlagValue() { void ProductFlagValue::SharedDtor() { ::google::protobuf::Arena* arena = GetArenaNoVirtual(); + GOOGLE_DCHECK(arena == NULL); if (arena != NULL) { return; } @@ -267,8 +269,14 @@ ProductFlagValue* ProductFlagValue::New(::google::protobuf::Arena* arena) const void ProductFlagValue::Clear() { // @@protoc_insertion_point(message_clear_start:ProductFlagValue) - ::memset(&type_, 0, reinterpret_cast(&value_) - - reinterpret_cast(&type_) + sizeof(value_)); + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + ::memset(&type_, 0, static_cast( + reinterpret_cast(&value_) - + reinterpret_cast(&type_)) + sizeof(value_)); + _internal_metadata_.Clear(); } bool ProductFlagValue::MergePartialFromCodedStream( @@ -284,7 +292,7 @@ bool ProductFlagValue::MergePartialFromCodedStream( // .ProductFlag type = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(8u)) { + static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) { int value; DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( @@ -299,7 +307,7 @@ bool ProductFlagValue::MergePartialFromCodedStream( // bool value = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(16u)) { + static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) { DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( @@ -312,12 +320,11 @@ bool ProductFlagValue::MergePartialFromCodedStream( default: { handle_unusual: - if (tag == 0 || - ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + if (tag == 0) { goto success; } - DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } @@ -348,6 +355,10 @@ void ProductFlagValue::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::WriteBool(2, this->value(), output); } + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); + } // @@protoc_insertion_point(serialize_end:ProductFlagValue) } @@ -369,6 +380,10 @@ ::google::protobuf::uint8* ProductFlagValue::InternalSerializeWithCachedSizesToA target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(2, this->value(), target); } + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); + } // @@protoc_insertion_point(serialize_to_array_end:ProductFlagValue) return target; } @@ -377,6 +392,11 @@ size_t ProductFlagValue::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:ProductFlagValue) size_t total_size = 0; + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); + } // .ProductFlag type = 1; if (this->type() != 0) { total_size += 1 + @@ -463,9 +483,11 @@ void ProductFlagValue::UnsafeArenaSwap(ProductFlagValue* other) { InternalSwap(other); } void ProductFlagValue::InternalSwap(ProductFlagValue* other) { - std::swap(type_, other->type_); - std::swap(value_, other->value_); - std::swap(_cached_size_, other->_cached_size_); + using std::swap; + swap(type_, other->type_); + swap(value_, other->value_); + _internal_metadata_.Swap(&other->_internal_metadata_); + swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata ProductFlagValue::GetMetadata() const { @@ -524,9 +546,7 @@ ProductFlagset::ProductFlagset(::google::protobuf::Arena* arena) : ::google::protobuf::Message(), _internal_metadata_(arena), flags_(arena) { -#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER protobuf_structs_2fFlagsDescriptor_2eproto::InitDefaults(); -#endif // GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:ProductFlagset) @@ -551,6 +571,7 @@ ProductFlagset::~ProductFlagset() { void ProductFlagset::SharedDtor() { ::google::protobuf::Arena* arena = GetArenaNoVirtual(); + GOOGLE_DCHECK(arena == NULL); if (arena != NULL) { return; } @@ -584,7 +605,12 @@ ProductFlagset* ProductFlagset::New(::google::protobuf::Arena* arena) const { void ProductFlagset::Clear() { // @@protoc_insertion_point(message_clear_start:ProductFlagset) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + flags_.Clear(); + _internal_metadata_.Clear(); } bool ProductFlagset::MergePartialFromCodedStream( @@ -600,7 +626,7 @@ bool ProductFlagset::MergePartialFromCodedStream( // repeated .ProductFlagValue flags = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(10u)) { + static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, add_flags())); } else { @@ -611,12 +637,11 @@ bool ProductFlagset::MergePartialFromCodedStream( default: { handle_unusual: - if (tag == 0 || - ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + if (tag == 0) { goto success; } - DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } @@ -637,11 +662,16 @@ void ProductFlagset::SerializeWithCachedSizes( (void) cached_has_bits; // repeated .ProductFlagValue flags = 1; - for (unsigned int i = 0, n = this->flags_size(); i < n; i++) { + for (unsigned int i = 0, + n = static_cast(this->flags_size()); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 1, this->flags(i), output); + 1, this->flags(static_cast(i)), output); } + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); + } // @@protoc_insertion_point(serialize_end:ProductFlagset) } @@ -653,12 +683,17 @@ ::google::protobuf::uint8* ProductFlagset::InternalSerializeWithCachedSizesToArr (void) cached_has_bits; // repeated .ProductFlagValue flags = 1; - for (unsigned int i = 0, n = this->flags_size(); i < n; i++) { + for (unsigned int i = 0, + n = static_cast(this->flags_size()); i < n; i++) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageNoVirtualToArray( - 1, this->flags(i), deterministic, target); + 1, this->flags(static_cast(i)), deterministic, target); } + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); + } // @@protoc_insertion_point(serialize_to_array_end:ProductFlagset) return target; } @@ -667,14 +702,19 @@ size_t ProductFlagset::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:ProductFlagset) size_t total_size = 0; + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); + } // repeated .ProductFlagValue flags = 1; { - unsigned int count = this->flags_size(); + unsigned int count = static_cast(this->flags_size()); total_size += 1UL * count; for (unsigned int i = 0; i < count; i++) { total_size += ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->flags(i)); + this->flags(static_cast(i))); } } @@ -748,8 +788,10 @@ void ProductFlagset::UnsafeArenaSwap(ProductFlagset* other) { InternalSwap(other); } void ProductFlagset::InternalSwap(ProductFlagset* other) { + using std::swap; flags_.InternalSwap(&other->flags_); - std::swap(_cached_size_, other->_cached_size_); + _internal_metadata_.Swap(&other->_internal_metadata_); + swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata ProductFlagset::GetMetadata() const { @@ -813,9 +855,7 @@ FlagsDescriptor::FlagsDescriptor() FlagsDescriptor::FlagsDescriptor(::google::protobuf::Arena* arena) : ::google::protobuf::Message(), _internal_metadata_(arena) { -#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER protobuf_structs_2fFlagsDescriptor_2eproto::InitDefaults(); -#endif // GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:FlagsDescriptor) @@ -826,14 +866,15 @@ FlagsDescriptor::FlagsDescriptor(const FlagsDescriptor& from) _cached_size_(0) { _internal_metadata_.MergeFrom(from._internal_metadata_); ::memcpy(&visible_, &from.visible_, - reinterpret_cast(&inhouse_) - - reinterpret_cast(&visible_) + sizeof(inhouse_)); + static_cast(reinterpret_cast(&inhouse_) - + reinterpret_cast(&visible_)) + sizeof(inhouse_)); // @@protoc_insertion_point(copy_constructor:FlagsDescriptor) } void FlagsDescriptor::SharedCtor() { - ::memset(&visible_, 0, reinterpret_cast(&inhouse_) - - reinterpret_cast(&visible_) + sizeof(inhouse_)); + ::memset(&visible_, 0, static_cast( + reinterpret_cast(&inhouse_) - + reinterpret_cast(&visible_)) + sizeof(inhouse_)); _cached_size_ = 0; } @@ -844,6 +885,7 @@ FlagsDescriptor::~FlagsDescriptor() { void FlagsDescriptor::SharedDtor() { ::google::protobuf::Arena* arena = GetArenaNoVirtual(); + GOOGLE_DCHECK(arena == NULL); if (arena != NULL) { return; } @@ -877,8 +919,14 @@ FlagsDescriptor* FlagsDescriptor::New(::google::protobuf::Arena* arena) const { void FlagsDescriptor::Clear() { // @@protoc_insertion_point(message_clear_start:FlagsDescriptor) - ::memset(&visible_, 0, reinterpret_cast(&inhouse_) - - reinterpret_cast(&visible_) + sizeof(inhouse_)); + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + ::memset(&visible_, 0, static_cast( + reinterpret_cast(&inhouse_) - + reinterpret_cast(&visible_)) + sizeof(inhouse_)); + _internal_metadata_.Clear(); } bool FlagsDescriptor::MergePartialFromCodedStream( @@ -894,7 +942,7 @@ bool FlagsDescriptor::MergePartialFromCodedStream( // bool visible = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(8u)) { + static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) { DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( @@ -908,7 +956,7 @@ bool FlagsDescriptor::MergePartialFromCodedStream( // bool premium = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(16u)) { + static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) { DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( @@ -922,7 +970,7 @@ bool FlagsDescriptor::MergePartialFromCodedStream( // bool featured = 3; case 3: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(24u)) { + static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) { DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( @@ -936,7 +984,7 @@ bool FlagsDescriptor::MergePartialFromCodedStream( // bool lastchance = 4; case 4: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(32u)) { + static_cast< ::google::protobuf::uint8>(32u /* 32 & 0xFF */)) { DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( @@ -950,7 +998,7 @@ bool FlagsDescriptor::MergePartialFromCodedStream( // bool inhouse = 5; case 5: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(40u)) { + static_cast< ::google::protobuf::uint8>(40u /* 40 & 0xFF */)) { DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( @@ -963,12 +1011,11 @@ bool FlagsDescriptor::MergePartialFromCodedStream( default: { handle_unusual: - if (tag == 0 || - ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + if (tag == 0) { goto success; } - DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } @@ -1013,6 +1060,10 @@ void FlagsDescriptor::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::WriteBool(5, this->inhouse(), output); } + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); + } // @@protoc_insertion_point(serialize_end:FlagsDescriptor) } @@ -1048,6 +1099,10 @@ ::google::protobuf::uint8* FlagsDescriptor::InternalSerializeWithCachedSizesToAr target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(5, this->inhouse(), target); } + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); + } // @@protoc_insertion_point(serialize_to_array_end:FlagsDescriptor) return target; } @@ -1056,6 +1111,11 @@ size_t FlagsDescriptor::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:FlagsDescriptor) size_t total_size = 0; + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); + } // bool visible = 1; if (this->visible() != 0) { total_size += 1 + 1; @@ -1165,12 +1225,14 @@ void FlagsDescriptor::UnsafeArenaSwap(FlagsDescriptor* other) { InternalSwap(other); } void FlagsDescriptor::InternalSwap(FlagsDescriptor* other) { - std::swap(visible_, other->visible_); - std::swap(premium_, other->premium_); - std::swap(featured_, other->featured_); - std::swap(lastchance_, other->lastchance_); - std::swap(inhouse_, other->inhouse_); - std::swap(_cached_size_, other->_cached_size_); + using std::swap; + swap(visible_, other->visible_); + swap(premium_, other->premium_); + swap(featured_, other->featured_); + swap(lastchance_, other->lastchance_); + swap(inhouse_, other->inhouse_); + _internal_metadata_.Swap(&other->_internal_metadata_); + swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata FlagsDescriptor::GetMetadata() const { diff --git a/languages/cpp/structs/FlagsDescriptor.pb.h b/languages/cpp/structs/FlagsDescriptor.pb.h index 194029b..71807de 100644 --- a/languages/cpp/structs/FlagsDescriptor.pb.h +++ b/languages/cpp/structs/FlagsDescriptor.pb.h @@ -8,12 +8,12 @@ #include -#if GOOGLE_PROTOBUF_VERSION < 3003000 +#if GOOGLE_PROTOBUF_VERSION < 3004000 #error This file was generated by a newer version of protoc which is #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 3003002 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#if 3004000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION #error This file was generated by an older version of protoc which is #error incompatible with your Protocol Buffer headers. Please #error regenerate this file with a newer version of protoc. @@ -48,8 +48,9 @@ struct TableStruct { static const ::google::protobuf::internal::AuxillaryParseTableField aux[]; static const ::google::protobuf::internal::ParseTable schema[]; static const ::google::protobuf::uint32 offsets[]; + static const ::google::protobuf::internal::FieldMetadata field_metadata[]; + static const ::google::protobuf::internal::SerializationTable serialization_table[]; static void InitDefaultsImpl(); - static void Shutdown(); }; void AddDescriptors(); void InitDefaults(); @@ -92,7 +93,21 @@ class ProductFlagValue : public ::google::protobuf::Message /* @@protoc_insertio CopyFrom(from); return *this; } + #if LANG_CXX11 + ProductFlagValue(ProductFlagValue&& from) noexcept + : ProductFlagValue() { + *this = ::std::move(from); + } + inline ProductFlagValue& operator=(ProductFlagValue&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif inline ::google::protobuf::Arena* GetArena() const PROTOBUF_FINAL { return GetArenaNoVirtual(); } @@ -111,6 +126,9 @@ class ProductFlagValue : public ::google::protobuf::Message /* @@protoc_insertio void UnsafeArenaSwap(ProductFlagValue* other); void Swap(ProductFlagValue* other); + friend void swap(ProductFlagValue& a, ProductFlagValue& b) { + a.Swap(&b); + } // implements Message ---------------------------------------------- @@ -173,7 +191,7 @@ class ProductFlagValue : public ::google::protobuf::Message /* @@protoc_insertio private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - friend class ::google::protobuf::Arena; + template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; int type_; @@ -194,7 +212,21 @@ class ProductFlagset : public ::google::protobuf::Message /* @@protoc_insertion_ CopyFrom(from); return *this; } + #if LANG_CXX11 + ProductFlagset(ProductFlagset&& from) noexcept + : ProductFlagset() { + *this = ::std::move(from); + } + inline ProductFlagset& operator=(ProductFlagset&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif inline ::google::protobuf::Arena* GetArena() const PROTOBUF_FINAL { return GetArenaNoVirtual(); } @@ -213,6 +245,9 @@ class ProductFlagset : public ::google::protobuf::Message /* @@protoc_insertion_ void UnsafeArenaSwap(ProductFlagset* other); void Swap(ProductFlagset* other); + friend void swap(ProductFlagset& a, ProductFlagset& b) { + a.Swap(&b); + } // implements Message ---------------------------------------------- @@ -275,7 +310,7 @@ class ProductFlagset : public ::google::protobuf::Message /* @@protoc_insertion_ private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - friend class ::google::protobuf::Arena; + template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; ::google::protobuf::RepeatedPtrField< ::ProductFlagValue > flags_; @@ -295,7 +330,21 @@ class FlagsDescriptor : public ::google::protobuf::Message /* @@protoc_insertion CopyFrom(from); return *this; } + #if LANG_CXX11 + FlagsDescriptor(FlagsDescriptor&& from) noexcept + : FlagsDescriptor() { + *this = ::std::move(from); + } + inline FlagsDescriptor& operator=(FlagsDescriptor&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif inline ::google::protobuf::Arena* GetArena() const PROTOBUF_FINAL { return GetArenaNoVirtual(); } @@ -314,6 +363,9 @@ class FlagsDescriptor : public ::google::protobuf::Message /* @@protoc_insertion void UnsafeArenaSwap(FlagsDescriptor* other); void Swap(FlagsDescriptor* other); + friend void swap(FlagsDescriptor& a, FlagsDescriptor& b) { + a.Swap(&b); + } // implements Message ---------------------------------------------- @@ -394,7 +446,7 @@ class FlagsDescriptor : public ::google::protobuf::Message /* @@protoc_insertion private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - friend class ::google::protobuf::Arena; + template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; bool visible_; @@ -411,6 +463,10 @@ class FlagsDescriptor : public ::google::protobuf::Message /* @@protoc_insertion // =================================================================== #if !PROTOBUF_INLINE_NOT_IN_HEADERS +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ // ProductFlagValue // .ProductFlag type = 1; @@ -549,6 +605,9 @@ inline void FlagsDescriptor::set_inhouse(bool value) { // @@protoc_insertion_point(field_set:FlagsDescriptor.inhouse) } +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ #endif // !PROTOBUF_INLINE_NOT_IN_HEADERS // ------------------------------------------------------------------- @@ -558,7 +617,6 @@ inline void FlagsDescriptor::set_inhouse(bool value) { // @@protoc_insertion_point(namespace_scope) -#ifndef SWIG namespace google { namespace protobuf { @@ -570,7 +628,6 @@ inline const EnumDescriptor* GetEnumDescriptor< ::ProductFlag>() { } // namespace protobuf } // namespace google -#endif // SWIG // @@protoc_insertion_point(global_scope) diff --git a/languages/cpp/structs/Genetics.pb.cc b/languages/cpp/structs/Genetics.pb.cc index eaa11c6..05a6fa7 100644 --- a/languages/cpp/structs/Genetics.pb.cc +++ b/languages/cpp/structs/Genetics.pb.cc @@ -16,7 +16,10 @@ #include #include // @@protoc_insertion_point(includes) -class GeneticsDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed { +class GeneticsDefaultTypeInternal { +public: + ::google::protobuf::internal::ExplicitlyConstructed + _instance; } _Genetics_default_instance_; namespace protobuf_structs_2fGenetics_2eproto { @@ -29,20 +32,20 @@ ::google::protobuf::Metadata file_level_metadata[1]; } // namespace PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::ParseTableField - const TableStruct::entries[] = { + const TableStruct::entries[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { {0, 0, 0, ::google::protobuf::internal::kInvalidMask, 0, 0}, }; PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::AuxillaryParseTableField - const TableStruct::aux[] = { + const TableStruct::aux[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { ::google::protobuf::internal::AuxillaryParseTableField(), }; PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::ParseTable const - TableStruct::schema[] = { - { NULL, NULL, 0, -1, -1, false }, + TableStruct::schema[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + { NULL, NULL, 0, -1, -1, -1, -1, NULL, false }, }; -const ::google::protobuf::uint32 TableStruct::offsets[] = { +const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Genetics, _internal_metadata_), ~0u, // no _extensions_ @@ -51,8 +54,7 @@ const ::google::protobuf::uint32 TableStruct::offsets[] = { GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Genetics, male_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Genetics, female_), }; - -static const ::google::protobuf::internal::MigrationSchema schemas[] = { +static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { { 0, -1, sizeof(Genetics)}, }; @@ -82,21 +84,16 @@ void protobuf_RegisterTypes(const ::std::string&) { } } // namespace - -void TableStruct::Shutdown() { - _Genetics_default_instance_.Shutdown(); - delete file_level_metadata[0].reflection; -} - void TableStruct::InitDefaultsImpl() { GOOGLE_PROTOBUF_VERIFY_VERSION; ::google::protobuf::internal::InitProtobufDefaults(); ::protobuf_content_2fName_2eproto::InitDefaults(); - _Genetics_default_instance_.DefaultConstruct(); - _Genetics_default_instance_.get_mutable()->male_ = const_cast< ::Name*>( + _Genetics_default_instance_._instance.DefaultConstruct(); + ::google::protobuf::internal::OnShutdownDestroyMessage( + &_Genetics_default_instance_);_Genetics_default_instance_._instance.get_mutable()->male_ = const_cast< ::Name*>( ::Name::internal_default_instance()); - _Genetics_default_instance_.get_mutable()->female_ = const_cast< ::Name*>( + _Genetics_default_instance_._instance.get_mutable()->female_ = const_cast< ::Name*>( ::Name::internal_default_instance()); } @@ -104,9 +101,10 @@ void InitDefaults() { static GOOGLE_PROTOBUF_DECLARE_ONCE(once); ::google::protobuf::GoogleOnceInit(&once, &TableStruct::InitDefaultsImpl); } +namespace { void AddDescriptorsImpl() { InitDefaults(); - static const char descriptor[] = { + static const char descriptor[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { "\n\026structs/Genetics.proto\032\022content/Name.p" "roto\"6\n\010Genetics\022\023\n\004male\030\001 \001(\0132\005.Name\022\025\n" "\006female\030\002 \001(\0132\005.NameB;\n!io.bloombox.sche" @@ -118,14 +116,14 @@ void AddDescriptorsImpl() { ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( "structs/Genetics.proto", &protobuf_RegisterTypes); ::protobuf_content_2fName_2eproto::AddDescriptors(); - ::google::protobuf::internal::OnShutdown(&TableStruct::Shutdown); } +} // anonymous namespace void AddDescriptors() { static GOOGLE_PROTOBUF_DECLARE_ONCE(once); ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl); } -// Force AddDescriptors() to be called at static initialization time. +// Force AddDescriptors() to be called at dynamic initialization time. struct StaticDescriptorInitializer { StaticDescriptorInitializer() { AddDescriptors(); @@ -247,9 +245,7 @@ Genetics::Genetics() Genetics::Genetics(::google::protobuf::Arena* arena) : ::google::protobuf::Message(), _internal_metadata_(arena) { -#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER protobuf_structs_2fGenetics_2eproto::InitDefaults(); -#endif // GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:Genetics) @@ -273,8 +269,9 @@ Genetics::Genetics(const Genetics& from) } void Genetics::SharedCtor() { - ::memset(&male_, 0, reinterpret_cast(&female_) - - reinterpret_cast(&male_) + sizeof(female_)); + ::memset(&male_, 0, static_cast( + reinterpret_cast(&female_) - + reinterpret_cast(&male_)) + sizeof(female_)); _cached_size_ = 0; } @@ -285,16 +282,13 @@ Genetics::~Genetics() { void Genetics::SharedDtor() { ::google::protobuf::Arena* arena = GetArenaNoVirtual(); + GOOGLE_DCHECK(arena == NULL); if (arena != NULL) { return; } - if (this != internal_default_instance()) { - delete male_; - } - if (this != internal_default_instance()) { - delete female_; - } + if (this != internal_default_instance()) delete male_; + if (this != internal_default_instance()) delete female_; } void Genetics::ArenaDtor(void* object) { @@ -324,6 +318,10 @@ Genetics* Genetics::New(::google::protobuf::Arena* arena) const { void Genetics::Clear() { // @@protoc_insertion_point(message_clear_start:Genetics) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + if (GetArenaNoVirtual() == NULL && male_ != NULL) { delete male_; } @@ -332,6 +330,7 @@ void Genetics::Clear() { delete female_; } female_ = NULL; + _internal_metadata_.Clear(); } bool Genetics::MergePartialFromCodedStream( @@ -347,7 +346,7 @@ bool Genetics::MergePartialFromCodedStream( // .Name male = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(10u)) { + static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, mutable_male())); } else { @@ -359,7 +358,7 @@ bool Genetics::MergePartialFromCodedStream( // .Name female = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(18u)) { + static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, mutable_female())); } else { @@ -370,12 +369,11 @@ bool Genetics::MergePartialFromCodedStream( default: { handle_unusual: - if (tag == 0 || - ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + if (tag == 0) { goto success; } - DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } @@ -407,6 +405,10 @@ void Genetics::SerializeWithCachedSizes( 2, *this->female_, output); } + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); + } // @@protoc_insertion_point(serialize_end:Genetics) } @@ -431,6 +433,10 @@ ::google::protobuf::uint8* Genetics::InternalSerializeWithCachedSizesToArray( 2, *this->female_, deterministic, target); } + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); + } // @@protoc_insertion_point(serialize_to_array_end:Genetics) return target; } @@ -439,6 +445,11 @@ size_t Genetics::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:Genetics) size_t total_size = 0; + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); + } // .Name male = 1; if (this->has_male()) { total_size += 1 + @@ -528,9 +539,11 @@ void Genetics::UnsafeArenaSwap(Genetics* other) { InternalSwap(other); } void Genetics::InternalSwap(Genetics* other) { - std::swap(male_, other->male_); - std::swap(female_, other->female_); - std::swap(_cached_size_, other->_cached_size_); + using std::swap; + swap(male_, other->male_); + swap(female_, other->female_); + _internal_metadata_.Swap(&other->_internal_metadata_); + swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata Genetics::GetMetadata() const { @@ -550,9 +563,10 @@ void Genetics::clear_male() { male_ = NULL; } const ::Name& Genetics::male() const { + const ::Name* p = male_; // @@protoc_insertion_point(field_get:Genetics.male) - return male_ != NULL ? *male_ - : *::Name::internal_default_instance(); + return p != NULL ? *p : *reinterpret_cast( + &::_Name_default_instance_); } ::Name* Genetics::mutable_male() { @@ -599,9 +613,10 @@ void Genetics::clear_female() { female_ = NULL; } const ::Name& Genetics::female() const { + const ::Name* p = female_; // @@protoc_insertion_point(field_get:Genetics.female) - return female_ != NULL ? *female_ - : *::Name::internal_default_instance(); + return p != NULL ? *p : *reinterpret_cast( + &::_Name_default_instance_); } ::Name* Genetics::mutable_female() { diff --git a/languages/cpp/structs/Genetics.pb.h b/languages/cpp/structs/Genetics.pb.h index 1040b85..c8e446c 100644 --- a/languages/cpp/structs/Genetics.pb.h +++ b/languages/cpp/structs/Genetics.pb.h @@ -8,12 +8,12 @@ #include -#if GOOGLE_PROTOBUF_VERSION < 3003000 +#if GOOGLE_PROTOBUF_VERSION < 3004000 #error This file was generated by a newer version of protoc which is #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 3003002 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#if 3004000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION #error This file was generated by an older version of protoc which is #error incompatible with your Protocol Buffer headers. Please #error regenerate this file with a newer version of protoc. @@ -34,9 +34,6 @@ class Genetics; class GeneticsDefaultTypeInternal; extern GeneticsDefaultTypeInternal _Genetics_default_instance_; -class Name; -class NameDefaultTypeInternal; -extern NameDefaultTypeInternal _Name_default_instance_; namespace protobuf_structs_2fGenetics_2eproto { // Internal implementation detail -- do not call these. @@ -45,8 +42,9 @@ struct TableStruct { static const ::google::protobuf::internal::AuxillaryParseTableField aux[]; static const ::google::protobuf::internal::ParseTable schema[]; static const ::google::protobuf::uint32 offsets[]; + static const ::google::protobuf::internal::FieldMetadata field_metadata[]; + static const ::google::protobuf::internal::SerializationTable serialization_table[]; static void InitDefaultsImpl(); - static void Shutdown(); }; void AddDescriptors(); void InitDefaults(); @@ -65,7 +63,21 @@ class Genetics : public ::google::protobuf::Message /* @@protoc_insertion_point( CopyFrom(from); return *this; } + #if LANG_CXX11 + Genetics(Genetics&& from) noexcept + : Genetics() { + *this = ::std::move(from); + } + inline Genetics& operator=(Genetics&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif inline ::google::protobuf::Arena* GetArena() const PROTOBUF_FINAL { return GetArenaNoVirtual(); } @@ -84,6 +96,9 @@ class Genetics : public ::google::protobuf::Message /* @@protoc_insertion_point( void UnsafeArenaSwap(Genetics* other); void Swap(Genetics* other); + friend void swap(Genetics& a, Genetics& b) { + a.Swap(&b); + } // implements Message ---------------------------------------------- @@ -170,7 +185,7 @@ class Genetics : public ::google::protobuf::Message /* @@protoc_insertion_point( private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - friend class ::google::protobuf::Arena; + template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; ::Name* male_; @@ -184,6 +199,10 @@ class Genetics : public ::google::protobuf::Message /* @@protoc_insertion_point( // =================================================================== #if !PROTOBUF_INLINE_NOT_IN_HEADERS +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ // Genetics // .Name male = 1; @@ -195,9 +214,10 @@ inline void Genetics::clear_male() { male_ = NULL; } inline const ::Name& Genetics::male() const { + const ::Name* p = male_; // @@protoc_insertion_point(field_get:Genetics.male) - return male_ != NULL ? *male_ - : *::Name::internal_default_instance(); + return p != NULL ? *p : *reinterpret_cast( + &::_Name_default_instance_); } inline ::Name* Genetics::mutable_male() { @@ -244,9 +264,10 @@ inline void Genetics::clear_female() { female_ = NULL; } inline const ::Name& Genetics::female() const { + const ::Name* p = female_; // @@protoc_insertion_point(field_get:Genetics.female) - return female_ != NULL ? *female_ - : *::Name::internal_default_instance(); + return p != NULL ? *p : *reinterpret_cast( + &::_Name_default_instance_); } inline ::Name* Genetics::mutable_female() { @@ -284,6 +305,9 @@ inline void Genetics::set_allocated_female(::Name* female) { // @@protoc_insertion_point(field_set_allocated:Genetics.female) } +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ #endif // !PROTOBUF_INLINE_NOT_IN_HEADERS // @@protoc_insertion_point(namespace_scope) diff --git a/languages/cpp/structs/Grow.pb.cc b/languages/cpp/structs/Grow.pb.cc index 1781191..9645c7b 100644 --- a/languages/cpp/structs/Grow.pb.cc +++ b/languages/cpp/structs/Grow.pb.cc @@ -27,20 +27,20 @@ const ::google::protobuf::EnumDescriptor* file_level_enum_descriptors[1]; } // namespace PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::ParseTableField - const TableStruct::entries[] = { + const TableStruct::entries[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { {0, 0, 0, ::google::protobuf::internal::kInvalidMask, 0, 0}, }; PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::AuxillaryParseTableField - const TableStruct::aux[] = { + const TableStruct::aux[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { ::google::protobuf::internal::AuxillaryParseTableField(), }; PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::ParseTable const - TableStruct::schema[] = { - { NULL, NULL, 0, -1, -1, false }, + TableStruct::schema[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + { NULL, NULL, 0, -1, -1, -1, -1, NULL, false }, }; -const ::google::protobuf::uint32 TableStruct::offsets[] = { ~0u }; +const ::google::protobuf::uint32 TableStruct::offsets[1] = {}; static const ::google::protobuf::internal::MigrationSchema* schemas = NULL; static const ::google::protobuf::Message* const* file_default_instances = NULL; namespace { @@ -64,10 +64,6 @@ void protobuf_RegisterTypes(const ::std::string&) { } } // namespace - -void TableStruct::Shutdown() { -} - void TableStruct::InitDefaultsImpl() { GOOGLE_PROTOBUF_VERIFY_VERSION; @@ -78,9 +74,10 @@ void InitDefaults() { static GOOGLE_PROTOBUF_DECLARE_ONCE(once); ::google::protobuf::GoogleOnceInit(&once, &TableStruct::InitDefaultsImpl); } +namespace { void AddDescriptorsImpl() { InitDefaults(); - static const char descriptor[] = { + static const char descriptor[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { "\n\022structs/Grow.proto*<\n\004Grow\022\013\n\007GENERIC\020" "\000\022\n\n\006INDOOR\020\001\022\016\n\nGREENHOUSE\020\002\022\013\n\007OUTDOOR" "\020\003B8\n!io.bloombox.schema.product.structB" @@ -90,14 +87,14 @@ void AddDescriptorsImpl() { descriptor, 148); ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( "structs/Grow.proto", &protobuf_RegisterTypes); - ::google::protobuf::internal::OnShutdown(&TableStruct::Shutdown); } +} // anonymous namespace void AddDescriptors() { static GOOGLE_PROTOBUF_DECLARE_ONCE(once); ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl); } -// Force AddDescriptors() to be called at static initialization time. +// Force AddDescriptors() to be called at dynamic initialization time. struct StaticDescriptorInitializer { StaticDescriptorInitializer() { AddDescriptors(); diff --git a/languages/cpp/structs/Grow.pb.h b/languages/cpp/structs/Grow.pb.h index 9e42f43..c6cefd7 100644 --- a/languages/cpp/structs/Grow.pb.h +++ b/languages/cpp/structs/Grow.pb.h @@ -8,12 +8,12 @@ #include -#if GOOGLE_PROTOBUF_VERSION < 3003000 +#if GOOGLE_PROTOBUF_VERSION < 3004000 #error This file was generated by a newer version of protoc which is #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 3003002 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#if 3004000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION #error This file was generated by an older version of protoc which is #error incompatible with your Protocol Buffer headers. Please #error regenerate this file with a newer version of protoc. @@ -37,8 +37,9 @@ struct TableStruct { static const ::google::protobuf::internal::AuxillaryParseTableField aux[]; static const ::google::protobuf::internal::ParseTable schema[]; static const ::google::protobuf::uint32 offsets[]; + static const ::google::protobuf::internal::FieldMetadata field_metadata[]; + static const ::google::protobuf::internal::SerializationTable serialization_table[]; static void InitDefaultsImpl(); - static void Shutdown(); }; void AddDescriptors(); void InitDefaults(); @@ -76,12 +77,18 @@ inline bool Grow_Parse( // =================================================================== #if !PROTOBUF_INLINE_NOT_IN_HEADERS +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ #endif // !PROTOBUF_INLINE_NOT_IN_HEADERS // @@protoc_insertion_point(namespace_scope) -#ifndef SWIG namespace google { namespace protobuf { @@ -93,7 +100,6 @@ inline const EnumDescriptor* GetEnumDescriptor< ::Grow>() { } // namespace protobuf } // namespace google -#endif // SWIG // @@protoc_insertion_point(global_scope) diff --git a/languages/cpp/structs/Species.pb.cc b/languages/cpp/structs/Species.pb.cc index 4bf0b86..8d04d94 100644 --- a/languages/cpp/structs/Species.pb.cc +++ b/languages/cpp/structs/Species.pb.cc @@ -27,20 +27,20 @@ const ::google::protobuf::EnumDescriptor* file_level_enum_descriptors[1]; } // namespace PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::ParseTableField - const TableStruct::entries[] = { + const TableStruct::entries[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { {0, 0, 0, ::google::protobuf::internal::kInvalidMask, 0, 0}, }; PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::AuxillaryParseTableField - const TableStruct::aux[] = { + const TableStruct::aux[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { ::google::protobuf::internal::AuxillaryParseTableField(), }; PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::ParseTable const - TableStruct::schema[] = { - { NULL, NULL, 0, -1, -1, false }, + TableStruct::schema[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + { NULL, NULL, 0, -1, -1, -1, -1, NULL, false }, }; -const ::google::protobuf::uint32 TableStruct::offsets[] = { ~0u }; +const ::google::protobuf::uint32 TableStruct::offsets[1] = {}; static const ::google::protobuf::internal::MigrationSchema* schemas = NULL; static const ::google::protobuf::Message* const* file_default_instances = NULL; namespace { @@ -64,10 +64,6 @@ void protobuf_RegisterTypes(const ::std::string&) { } } // namespace - -void TableStruct::Shutdown() { -} - void TableStruct::InitDefaultsImpl() { GOOGLE_PROTOBUF_VERIFY_VERSION; @@ -78,9 +74,10 @@ void InitDefaults() { static GOOGLE_PROTOBUF_DECLARE_ONCE(once); ::google::protobuf::GoogleOnceInit(&once, &TableStruct::InitDefaultsImpl); } +namespace { void AddDescriptorsImpl() { InitDefaults(); - static const char descriptor[] = { + static const char descriptor[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { "\n\025structs/Species.proto*d\n\007Species\022\017\n\013UN" "SPECIFIED\020\000\022\n\n\006SATIVA\020\001\022\021\n\rHYBRID_SATIVA" "\020\002\022\n\n\006HYBRID\020\003\022\021\n\rHYBRID_INDICA\020\004\022\n\n\006IND" @@ -91,14 +88,14 @@ void AddDescriptorsImpl() { descriptor, 194); ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( "structs/Species.proto", &protobuf_RegisterTypes); - ::google::protobuf::internal::OnShutdown(&TableStruct::Shutdown); } +} // anonymous namespace void AddDescriptors() { static GOOGLE_PROTOBUF_DECLARE_ONCE(once); ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl); } -// Force AddDescriptors() to be called at static initialization time. +// Force AddDescriptors() to be called at dynamic initialization time. struct StaticDescriptorInitializer { StaticDescriptorInitializer() { AddDescriptors(); diff --git a/languages/cpp/structs/Species.pb.h b/languages/cpp/structs/Species.pb.h index 3d35d73..ee90482 100644 --- a/languages/cpp/structs/Species.pb.h +++ b/languages/cpp/structs/Species.pb.h @@ -8,12 +8,12 @@ #include -#if GOOGLE_PROTOBUF_VERSION < 3003000 +#if GOOGLE_PROTOBUF_VERSION < 3004000 #error This file was generated by a newer version of protoc which is #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 3003002 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#if 3004000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION #error This file was generated by an older version of protoc which is #error incompatible with your Protocol Buffer headers. Please #error regenerate this file with a newer version of protoc. @@ -37,8 +37,9 @@ struct TableStruct { static const ::google::protobuf::internal::AuxillaryParseTableField aux[]; static const ::google::protobuf::internal::ParseTable schema[]; static const ::google::protobuf::uint32 offsets[]; + static const ::google::protobuf::internal::FieldMetadata field_metadata[]; + static const ::google::protobuf::internal::SerializationTable serialization_table[]; static void InitDefaultsImpl(); - static void Shutdown(); }; void AddDescriptors(); void InitDefaults(); @@ -78,12 +79,18 @@ inline bool Species_Parse( // =================================================================== #if !PROTOBUF_INLINE_NOT_IN_HEADERS +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ #endif // !PROTOBUF_INLINE_NOT_IN_HEADERS // @@protoc_insertion_point(namespace_scope) -#ifndef SWIG namespace google { namespace protobuf { @@ -95,7 +102,6 @@ inline const EnumDescriptor* GetEnumDescriptor< ::Species>() { } // namespace protobuf } // namespace google -#endif // SWIG // @@protoc_insertion_point(global_scope) diff --git a/languages/cpp/structs/pricing/PricingDescriptor.pb.cc b/languages/cpp/structs/pricing/PricingDescriptor.pb.cc index 01efdae..f2f7cdb 100644 --- a/languages/cpp/structs/pricing/PricingDescriptor.pb.cc +++ b/languages/cpp/structs/pricing/PricingDescriptor.pb.cc @@ -16,17 +16,35 @@ #include #include // @@protoc_insertion_point(includes) -class PricingTierAvailabilityDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed { +class PricingTierAvailabilityDefaultTypeInternal { +public: + ::google::protobuf::internal::ExplicitlyConstructed + _instance; } _PricingTierAvailability_default_instance_; -class UnitPricingDescriptorDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed { +class UnitPricingDescriptorDefaultTypeInternal { +public: + ::google::protobuf::internal::ExplicitlyConstructed + _instance; } _UnitPricingDescriptor_default_instance_; -class WeightedPricingDescriptorDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed { +class WeightedPricingDescriptorDefaultTypeInternal { +public: + ::google::protobuf::internal::ExplicitlyConstructed + _instance; } _WeightedPricingDescriptor_default_instance_; -class FreebiePricingDescriptorDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed { +class FreebiePricingDescriptorDefaultTypeInternal { +public: + ::google::protobuf::internal::ExplicitlyConstructed + _instance; } _FreebiePricingDescriptor_default_instance_; -class PricingDescriptorDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed { +class PricingDescriptorDefaultTypeInternal { +public: + ::google::protobuf::internal::ExplicitlyConstructed + _instance; } _PricingDescriptor_default_instance_; -class ProductPricingDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed { +class ProductPricingDefaultTypeInternal { +public: + ::google::protobuf::internal::ExplicitlyConstructed + _instance; } _ProductPricing_default_instance_; namespace protobuf_structs_2fpricing_2fPricingDescriptor_2eproto { @@ -40,25 +58,25 @@ const ::google::protobuf::EnumDescriptor* file_level_enum_descriptors[2]; } // namespace PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::ParseTableField - const TableStruct::entries[] = { + const TableStruct::entries[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { {0, 0, 0, ::google::protobuf::internal::kInvalidMask, 0, 0}, }; PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::AuxillaryParseTableField - const TableStruct::aux[] = { + const TableStruct::aux[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { ::google::protobuf::internal::AuxillaryParseTableField(), }; PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::ParseTable const - TableStruct::schema[] = { - { NULL, NULL, 0, -1, -1, false }, - { NULL, NULL, 0, -1, -1, false }, - { NULL, NULL, 0, -1, -1, false }, - { NULL, NULL, 0, -1, -1, false }, - { NULL, NULL, 0, -1, -1, false }, - { NULL, NULL, 0, -1, -1, false }, + TableStruct::schema[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + { NULL, NULL, 0, -1, -1, -1, -1, NULL, false }, + { NULL, NULL, 0, -1, -1, -1, -1, NULL, false }, + { NULL, NULL, 0, -1, -1, -1, -1, NULL, false }, + { NULL, NULL, 0, -1, -1, -1, -1, NULL, false }, + { NULL, NULL, 0, -1, -1, -1, -1, NULL, false }, + { NULL, NULL, 0, -1, -1, -1, -1, NULL, false }, }; -const ::google::protobuf::uint32 TableStruct::offsets[] = { +const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PricingTierAvailability, _internal_metadata_), ~0u, // no _extensions_ @@ -104,8 +122,7 @@ const ::google::protobuf::uint32 TableStruct::offsets[] = { GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ProductPricing, discounts_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ProductPricing, manifest_), }; - -static const ::google::protobuf::internal::MigrationSchema schemas[] = { +static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { { 0, -1, sizeof(PricingTierAvailability)}, { 7, -1, sizeof(UnitPricingDescriptor)}, { 15, -1, sizeof(WeightedPricingDescriptor)}, @@ -145,42 +162,32 @@ void protobuf_RegisterTypes(const ::std::string&) { } } // namespace - -void TableStruct::Shutdown() { - _PricingTierAvailability_default_instance_.Shutdown(); - delete file_level_metadata[0].reflection; - _UnitPricingDescriptor_default_instance_.Shutdown(); - delete file_level_metadata[1].reflection; - _WeightedPricingDescriptor_default_instance_.Shutdown(); - delete file_level_metadata[2].reflection; - _FreebiePricingDescriptor_default_instance_.Shutdown(); - delete file_level_metadata[3].reflection; - _PricingDescriptor_default_instance_.Shutdown(); - delete file_level_metadata[4].reflection; - _ProductPricing_default_instance_.Shutdown(); - delete file_level_metadata[5].reflection; -} - void TableStruct::InitDefaultsImpl() { GOOGLE_PROTOBUF_VERIFY_VERSION; ::google::protobuf::internal::InitProtobufDefaults(); ::protobuf_structs_2fpricing_2fSaleDescriptor_2eproto::InitDefaults(); - _PricingTierAvailability_default_instance_.DefaultConstruct(); - _UnitPricingDescriptor_default_instance_.DefaultConstruct(); - _WeightedPricingDescriptor_default_instance_.DefaultConstruct(); - _FreebiePricingDescriptor_default_instance_.DefaultConstruct(); - _PricingDescriptor_default_instance_.DefaultConstruct(); - _ProductPricing_default_instance_.DefaultConstruct(); - _UnitPricingDescriptor_default_instance_.get_mutable()->status_ = const_cast< ::PricingTierAvailability*>( + _PricingTierAvailability_default_instance_._instance.DefaultConstruct(); + ::google::protobuf::internal::OnShutdownDestroyMessage( + &_PricingTierAvailability_default_instance_);_UnitPricingDescriptor_default_instance_._instance.DefaultConstruct(); + ::google::protobuf::internal::OnShutdownDestroyMessage( + &_UnitPricingDescriptor_default_instance_);_WeightedPricingDescriptor_default_instance_._instance.DefaultConstruct(); + ::google::protobuf::internal::OnShutdownDestroyMessage( + &_WeightedPricingDescriptor_default_instance_);_FreebiePricingDescriptor_default_instance_._instance.DefaultConstruct(); + ::google::protobuf::internal::OnShutdownDestroyMessage( + &_FreebiePricingDescriptor_default_instance_);_PricingDescriptor_default_instance_._instance.DefaultConstruct(); + ::google::protobuf::internal::OnShutdownDestroyMessage( + &_PricingDescriptor_default_instance_);_ProductPricing_default_instance_._instance.DefaultConstruct(); + ::google::protobuf::internal::OnShutdownDestroyMessage( + &_ProductPricing_default_instance_);_UnitPricingDescriptor_default_instance_._instance.get_mutable()->status_ = const_cast< ::PricingTierAvailability*>( ::PricingTierAvailability::internal_default_instance()); - _WeightedPricingDescriptor_default_instance_.get_mutable()->tier_ = const_cast< ::UnitPricingDescriptor*>( + _WeightedPricingDescriptor_default_instance_._instance.get_mutable()->tier_ = const_cast< ::UnitPricingDescriptor*>( ::UnitPricingDescriptor::internal_default_instance()); - _PricingDescriptor_default_instance_.get_mutable()->unit_ = const_cast< ::UnitPricingDescriptor*>( + _PricingDescriptor_default_instance_._instance.get_mutable()->unit_ = const_cast< ::UnitPricingDescriptor*>( ::UnitPricingDescriptor::internal_default_instance()); - _PricingDescriptor_default_instance_.get_mutable()->weighted_ = const_cast< ::WeightedPricingDescriptor*>( + _PricingDescriptor_default_instance_._instance.get_mutable()->weighted_ = const_cast< ::WeightedPricingDescriptor*>( ::WeightedPricingDescriptor::internal_default_instance()); - _PricingDescriptor_default_instance_.get_mutable()->freebie_ = const_cast< ::FreebiePricingDescriptor*>( + _PricingDescriptor_default_instance_._instance.get_mutable()->freebie_ = const_cast< ::FreebiePricingDescriptor*>( ::FreebiePricingDescriptor::internal_default_instance()); } @@ -188,9 +195,10 @@ void InitDefaults() { static GOOGLE_PROTOBUF_DECLARE_ONCE(once); ::google::protobuf::GoogleOnceInit(&once, &TableStruct::InitDefaultsImpl); } +namespace { void AddDescriptorsImpl() { InitDefaults(); - static const char descriptor[] = { + static const char descriptor[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { "\n\'structs/pricing/PricingDescriptor.prot" "o\032$structs/pricing/SaleDescriptor.proto\"" "=\n\027PricingTierAvailability\022\017\n\007offered\030\001 " @@ -221,14 +229,14 @@ void AddDescriptorsImpl() { ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( "structs/pricing/PricingDescriptor.proto", &protobuf_RegisterTypes); ::protobuf_structs_2fpricing_2fSaleDescriptor_2eproto::AddDescriptors(); - ::google::protobuf::internal::OnShutdown(&TableStruct::Shutdown); } +} // anonymous namespace void AddDescriptors() { static GOOGLE_PROTOBUF_DECLARE_ONCE(once); ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl); } -// Force AddDescriptors() to be called at static initialization time. +// Force AddDescriptors() to be called at dynamic initialization time. struct StaticDescriptorInitializer { StaticDescriptorInitializer() { AddDescriptors(); @@ -293,9 +301,7 @@ PricingTierAvailability::PricingTierAvailability() PricingTierAvailability::PricingTierAvailability(::google::protobuf::Arena* arena) : ::google::protobuf::Message(), _internal_metadata_(arena) { -#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER protobuf_structs_2fpricing_2fPricingDescriptor_2eproto::InitDefaults(); -#endif // GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:PricingTierAvailability) @@ -306,14 +312,15 @@ PricingTierAvailability::PricingTierAvailability(const PricingTierAvailability& _cached_size_(0) { _internal_metadata_.MergeFrom(from._internal_metadata_); ::memcpy(&offered_, &from.offered_, - reinterpret_cast(&available_) - - reinterpret_cast(&offered_) + sizeof(available_)); + static_cast(reinterpret_cast(&available_) - + reinterpret_cast(&offered_)) + sizeof(available_)); // @@protoc_insertion_point(copy_constructor:PricingTierAvailability) } void PricingTierAvailability::SharedCtor() { - ::memset(&offered_, 0, reinterpret_cast(&available_) - - reinterpret_cast(&offered_) + sizeof(available_)); + ::memset(&offered_, 0, static_cast( + reinterpret_cast(&available_) - + reinterpret_cast(&offered_)) + sizeof(available_)); _cached_size_ = 0; } @@ -324,6 +331,7 @@ PricingTierAvailability::~PricingTierAvailability() { void PricingTierAvailability::SharedDtor() { ::google::protobuf::Arena* arena = GetArenaNoVirtual(); + GOOGLE_DCHECK(arena == NULL); if (arena != NULL) { return; } @@ -357,8 +365,14 @@ PricingTierAvailability* PricingTierAvailability::New(::google::protobuf::Arena* void PricingTierAvailability::Clear() { // @@protoc_insertion_point(message_clear_start:PricingTierAvailability) - ::memset(&offered_, 0, reinterpret_cast(&available_) - - reinterpret_cast(&offered_) + sizeof(available_)); + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + ::memset(&offered_, 0, static_cast( + reinterpret_cast(&available_) - + reinterpret_cast(&offered_)) + sizeof(available_)); + _internal_metadata_.Clear(); } bool PricingTierAvailability::MergePartialFromCodedStream( @@ -374,7 +388,7 @@ bool PricingTierAvailability::MergePartialFromCodedStream( // bool offered = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(8u)) { + static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) { DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( @@ -388,7 +402,7 @@ bool PricingTierAvailability::MergePartialFromCodedStream( // bool available = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(16u)) { + static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) { DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( @@ -401,12 +415,11 @@ bool PricingTierAvailability::MergePartialFromCodedStream( default: { handle_unusual: - if (tag == 0 || - ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + if (tag == 0) { goto success; } - DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } @@ -436,6 +449,10 @@ void PricingTierAvailability::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::WriteBool(2, this->available(), output); } + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); + } // @@protoc_insertion_point(serialize_end:PricingTierAvailability) } @@ -456,6 +473,10 @@ ::google::protobuf::uint8* PricingTierAvailability::InternalSerializeWithCachedS target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(2, this->available(), target); } + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); + } // @@protoc_insertion_point(serialize_to_array_end:PricingTierAvailability) return target; } @@ -464,6 +485,11 @@ size_t PricingTierAvailability::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:PricingTierAvailability) size_t total_size = 0; + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); + } // bool offered = 1; if (this->offered() != 0) { total_size += 1 + 1; @@ -549,9 +575,11 @@ void PricingTierAvailability::UnsafeArenaSwap(PricingTierAvailability* other) { InternalSwap(other); } void PricingTierAvailability::InternalSwap(PricingTierAvailability* other) { - std::swap(offered_, other->offered_); - std::swap(available_, other->available_); - std::swap(_cached_size_, other->_cached_size_); + using std::swap; + swap(offered_, other->offered_); + swap(available_, other->available_); + _internal_metadata_.Swap(&other->_internal_metadata_); + swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata PricingTierAvailability::GetMetadata() const { @@ -659,9 +687,7 @@ UnitPricingDescriptor::UnitPricingDescriptor(::google::protobuf::Arena* arena) : ::google::protobuf::Message(), _internal_metadata_(arena), discounts_(arena) { -#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER protobuf_structs_2fpricing_2fPricingDescriptor_2eproto::InitDefaults(); -#endif // GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:UnitPricingDescriptor) @@ -682,8 +708,9 @@ UnitPricingDescriptor::UnitPricingDescriptor(const UnitPricingDescriptor& from) } void UnitPricingDescriptor::SharedCtor() { - ::memset(&status_, 0, reinterpret_cast(&price_value_) - - reinterpret_cast(&status_) + sizeof(price_value_)); + ::memset(&status_, 0, static_cast( + reinterpret_cast(&price_value_) - + reinterpret_cast(&status_)) + sizeof(price_value_)); _cached_size_ = 0; } @@ -694,13 +721,12 @@ UnitPricingDescriptor::~UnitPricingDescriptor() { void UnitPricingDescriptor::SharedDtor() { ::google::protobuf::Arena* arena = GetArenaNoVirtual(); + GOOGLE_DCHECK(arena == NULL); if (arena != NULL) { return; } - if (this != internal_default_instance()) { - delete status_; - } + if (this != internal_default_instance()) delete status_; } void UnitPricingDescriptor::ArenaDtor(void* object) { @@ -730,12 +756,17 @@ UnitPricingDescriptor* UnitPricingDescriptor::New(::google::protobuf::Arena* are void UnitPricingDescriptor::Clear() { // @@protoc_insertion_point(message_clear_start:UnitPricingDescriptor) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + discounts_.Clear(); if (GetArenaNoVirtual() == NULL && status_ != NULL) { delete status_; } status_ = NULL; price_value_ = 0; + _internal_metadata_.Clear(); } bool UnitPricingDescriptor::MergePartialFromCodedStream( @@ -751,7 +782,7 @@ bool UnitPricingDescriptor::MergePartialFromCodedStream( // float price_value = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(13u)) { + static_cast< ::google::protobuf::uint8>(13u /* 13 & 0xFF */)) { DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( @@ -765,7 +796,7 @@ bool UnitPricingDescriptor::MergePartialFromCodedStream( // .PricingTierAvailability status = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(18u)) { + static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, mutable_status())); } else { @@ -777,7 +808,7 @@ bool UnitPricingDescriptor::MergePartialFromCodedStream( // repeated .SaleDescriptor discounts = 3; case 3: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(26u)) { + static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, add_discounts())); } else { @@ -788,12 +819,11 @@ bool UnitPricingDescriptor::MergePartialFromCodedStream( default: { handle_unusual: - if (tag == 0 || - ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + if (tag == 0) { goto success; } - DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } @@ -825,11 +855,16 @@ void UnitPricingDescriptor::SerializeWithCachedSizes( } // repeated .SaleDescriptor discounts = 3; - for (unsigned int i = 0, n = this->discounts_size(); i < n; i++) { + for (unsigned int i = 0, + n = static_cast(this->discounts_size()); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 3, this->discounts(i), output); + 3, this->discounts(static_cast(i)), output); } + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); + } // @@protoc_insertion_point(serialize_end:UnitPricingDescriptor) } @@ -853,12 +888,17 @@ ::google::protobuf::uint8* UnitPricingDescriptor::InternalSerializeWithCachedSiz } // repeated .SaleDescriptor discounts = 3; - for (unsigned int i = 0, n = this->discounts_size(); i < n; i++) { + for (unsigned int i = 0, + n = static_cast(this->discounts_size()); i < n; i++) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageNoVirtualToArray( - 3, this->discounts(i), deterministic, target); + 3, this->discounts(static_cast(i)), deterministic, target); } + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); + } // @@protoc_insertion_point(serialize_to_array_end:UnitPricingDescriptor) return target; } @@ -867,14 +907,19 @@ size_t UnitPricingDescriptor::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:UnitPricingDescriptor) size_t total_size = 0; + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); + } // repeated .SaleDescriptor discounts = 3; { - unsigned int count = this->discounts_size(); + unsigned int count = static_cast(this->discounts_size()); total_size += 1UL * count; for (unsigned int i = 0; i < count; i++) { total_size += ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->discounts(i)); + this->discounts(static_cast(i))); } } @@ -966,10 +1011,12 @@ void UnitPricingDescriptor::UnsafeArenaSwap(UnitPricingDescriptor* other) { InternalSwap(other); } void UnitPricingDescriptor::InternalSwap(UnitPricingDescriptor* other) { + using std::swap; discounts_.InternalSwap(&other->discounts_); - std::swap(status_, other->status_); - std::swap(price_value_, other->price_value_); - std::swap(_cached_size_, other->_cached_size_); + swap(status_, other->status_); + swap(price_value_, other->price_value_); + _internal_metadata_.Swap(&other->_internal_metadata_); + swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata UnitPricingDescriptor::GetMetadata() const { @@ -1003,9 +1050,10 @@ void UnitPricingDescriptor::clear_status() { status_ = NULL; } const ::PricingTierAvailability& UnitPricingDescriptor::status() const { + const ::PricingTierAvailability* p = status_; // @@protoc_insertion_point(field_get:UnitPricingDescriptor.status) - return status_ != NULL ? *status_ - : *::PricingTierAvailability::internal_default_instance(); + return p != NULL ? *p : *reinterpret_cast( + &::_PricingTierAvailability_default_instance_); } ::PricingTierAvailability* UnitPricingDescriptor::mutable_status() { @@ -1141,9 +1189,7 @@ WeightedPricingDescriptor::WeightedPricingDescriptor() WeightedPricingDescriptor::WeightedPricingDescriptor(::google::protobuf::Arena* arena) : ::google::protobuf::Message(), _internal_metadata_(arena) { -#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER protobuf_structs_2fpricing_2fPricingDescriptor_2eproto::InitDefaults(); -#endif // GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:WeightedPricingDescriptor) @@ -1159,14 +1205,15 @@ WeightedPricingDescriptor::WeightedPricingDescriptor(const WeightedPricingDescri tier_ = NULL; } ::memcpy(&weight_, &from.weight_, - reinterpret_cast(&weightingrams_) - - reinterpret_cast(&weight_) + sizeof(weightingrams_)); + static_cast(reinterpret_cast(&weightingrams_) - + reinterpret_cast(&weight_)) + sizeof(weightingrams_)); // @@protoc_insertion_point(copy_constructor:WeightedPricingDescriptor) } void WeightedPricingDescriptor::SharedCtor() { - ::memset(&tier_, 0, reinterpret_cast(&weightingrams_) - - reinterpret_cast(&tier_) + sizeof(weightingrams_)); + ::memset(&tier_, 0, static_cast( + reinterpret_cast(&weightingrams_) - + reinterpret_cast(&tier_)) + sizeof(weightingrams_)); _cached_size_ = 0; } @@ -1177,13 +1224,12 @@ WeightedPricingDescriptor::~WeightedPricingDescriptor() { void WeightedPricingDescriptor::SharedDtor() { ::google::protobuf::Arena* arena = GetArenaNoVirtual(); + GOOGLE_DCHECK(arena == NULL); if (arena != NULL) { return; } - if (this != internal_default_instance()) { - delete tier_; - } + if (this != internal_default_instance()) delete tier_; } void WeightedPricingDescriptor::ArenaDtor(void* object) { @@ -1213,12 +1259,18 @@ WeightedPricingDescriptor* WeightedPricingDescriptor::New(::google::protobuf::Ar void WeightedPricingDescriptor::Clear() { // @@protoc_insertion_point(message_clear_start:WeightedPricingDescriptor) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + if (GetArenaNoVirtual() == NULL && tier_ != NULL) { delete tier_; } tier_ = NULL; - ::memset(&weight_, 0, reinterpret_cast(&weightingrams_) - - reinterpret_cast(&weight_) + sizeof(weightingrams_)); + ::memset(&weight_, 0, static_cast( + reinterpret_cast(&weightingrams_) - + reinterpret_cast(&weight_)) + sizeof(weightingrams_)); + _internal_metadata_.Clear(); } bool WeightedPricingDescriptor::MergePartialFromCodedStream( @@ -1234,7 +1286,7 @@ bool WeightedPricingDescriptor::MergePartialFromCodedStream( // .PricingWeightTier weight = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(8u)) { + static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) { int value; DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( @@ -1249,7 +1301,7 @@ bool WeightedPricingDescriptor::MergePartialFromCodedStream( // .UnitPricingDescriptor tier = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(18u)) { + static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, mutable_tier())); } else { @@ -1261,7 +1313,7 @@ bool WeightedPricingDescriptor::MergePartialFromCodedStream( // float weightInGrams = 3; case 3: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(29u)) { + static_cast< ::google::protobuf::uint8>(29u /* 29 & 0xFF */)) { DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( @@ -1274,12 +1326,11 @@ bool WeightedPricingDescriptor::MergePartialFromCodedStream( default: { handle_unusual: - if (tag == 0 || - ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + if (tag == 0) { goto success; } - DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } @@ -1316,6 +1367,10 @@ void WeightedPricingDescriptor::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::WriteFloat(3, this->weightingrams(), output); } + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); + } // @@protoc_insertion_point(serialize_end:WeightedPricingDescriptor) } @@ -1344,6 +1399,10 @@ ::google::protobuf::uint8* WeightedPricingDescriptor::InternalSerializeWithCache target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(3, this->weightingrams(), target); } + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); + } // @@protoc_insertion_point(serialize_to_array_end:WeightedPricingDescriptor) return target; } @@ -1352,6 +1411,11 @@ size_t WeightedPricingDescriptor::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:WeightedPricingDescriptor) size_t total_size = 0; + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); + } // .UnitPricingDescriptor tier = 2; if (this->has_tier()) { total_size += 1 + @@ -1448,10 +1512,12 @@ void WeightedPricingDescriptor::UnsafeArenaSwap(WeightedPricingDescriptor* other InternalSwap(other); } void WeightedPricingDescriptor::InternalSwap(WeightedPricingDescriptor* other) { - std::swap(tier_, other->tier_); - std::swap(weight_, other->weight_); - std::swap(weightingrams_, other->weightingrams_); - std::swap(_cached_size_, other->_cached_size_); + using std::swap; + swap(tier_, other->tier_); + swap(weight_, other->weight_); + swap(weightingrams_, other->weightingrams_); + _internal_metadata_.Swap(&other->_internal_metadata_); + swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata WeightedPricingDescriptor::GetMetadata() const { @@ -1485,9 +1551,10 @@ void WeightedPricingDescriptor::clear_tier() { tier_ = NULL; } const ::UnitPricingDescriptor& WeightedPricingDescriptor::tier() const { + const ::UnitPricingDescriptor* p = tier_; // @@protoc_insertion_point(field_get:WeightedPricingDescriptor.tier) - return tier_ != NULL ? *tier_ - : *::UnitPricingDescriptor::internal_default_instance(); + return p != NULL ? *p : *reinterpret_cast( + &::_UnitPricingDescriptor_default_instance_); } ::UnitPricingDescriptor* WeightedPricingDescriptor::mutable_tier() { @@ -1557,9 +1624,7 @@ FreebiePricingDescriptor::FreebiePricingDescriptor() FreebiePricingDescriptor::FreebiePricingDescriptor(::google::protobuf::Arena* arena) : ::google::protobuf::Message(), _internal_metadata_(arena) { -#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER protobuf_structs_2fpricing_2fPricingDescriptor_2eproto::InitDefaults(); -#endif // GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:FreebiePricingDescriptor) @@ -1583,6 +1648,7 @@ FreebiePricingDescriptor::~FreebiePricingDescriptor() { void FreebiePricingDescriptor::SharedDtor() { ::google::protobuf::Arena* arena = GetArenaNoVirtual(); + GOOGLE_DCHECK(arena == NULL); if (arena != NULL) { return; } @@ -1616,6 +1682,11 @@ FreebiePricingDescriptor* FreebiePricingDescriptor::New(::google::protobuf::Aren void FreebiePricingDescriptor::Clear() { // @@protoc_insertion_point(message_clear_start:FreebiePricingDescriptor) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _internal_metadata_.Clear(); } bool FreebiePricingDescriptor::MergePartialFromCodedStream( @@ -1628,12 +1699,11 @@ bool FreebiePricingDescriptor::MergePartialFromCodedStream( tag = p.first; if (!p.second) goto handle_unusual; handle_unusual: - if (tag == 0 || - ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + if (tag == 0) { goto success; } - DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); } success: // @@protoc_insertion_point(parse_success:FreebiePricingDescriptor) @@ -1650,6 +1720,10 @@ void FreebiePricingDescriptor::SerializeWithCachedSizes( ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); + } // @@protoc_insertion_point(serialize_end:FreebiePricingDescriptor) } @@ -1660,6 +1734,10 @@ ::google::protobuf::uint8* FreebiePricingDescriptor::InternalSerializeWithCached ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); + } // @@protoc_insertion_point(serialize_to_array_end:FreebiePricingDescriptor) return target; } @@ -1668,6 +1746,11 @@ size_t FreebiePricingDescriptor::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:FreebiePricingDescriptor) size_t total_size = 0; + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); + } int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); _cached_size_ = cached_size; @@ -1737,7 +1820,9 @@ void FreebiePricingDescriptor::UnsafeArenaSwap(FreebiePricingDescriptor* other) InternalSwap(other); } void FreebiePricingDescriptor::InternalSwap(FreebiePricingDescriptor* other) { - std::swap(_cached_size_, other->_cached_size_); + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata FreebiePricingDescriptor::GetMetadata() const { @@ -1911,9 +1996,7 @@ PricingDescriptor::PricingDescriptor() PricingDescriptor::PricingDescriptor(::google::protobuf::Arena* arena) : ::google::protobuf::Message(), _internal_metadata_(arena) { -#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER protobuf_structs_2fpricing_2fPricingDescriptor_2eproto::InitDefaults(); -#endif // GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:PricingDescriptor) @@ -1943,8 +2026,9 @@ PricingDescriptor::PricingDescriptor(const PricingDescriptor& from) } void PricingDescriptor::SharedCtor() { - ::memset(&unit_, 0, reinterpret_cast(&type_) - - reinterpret_cast(&unit_) + sizeof(type_)); + ::memset(&unit_, 0, static_cast( + reinterpret_cast(&type_) - + reinterpret_cast(&unit_)) + sizeof(type_)); _cached_size_ = 0; } @@ -1955,19 +2039,14 @@ PricingDescriptor::~PricingDescriptor() { void PricingDescriptor::SharedDtor() { ::google::protobuf::Arena* arena = GetArenaNoVirtual(); + GOOGLE_DCHECK(arena == NULL); if (arena != NULL) { return; } - if (this != internal_default_instance()) { - delete unit_; - } - if (this != internal_default_instance()) { - delete weighted_; - } - if (this != internal_default_instance()) { - delete freebie_; - } + if (this != internal_default_instance()) delete unit_; + if (this != internal_default_instance()) delete weighted_; + if (this != internal_default_instance()) delete freebie_; } void PricingDescriptor::ArenaDtor(void* object) { @@ -1997,6 +2076,10 @@ PricingDescriptor* PricingDescriptor::New(::google::protobuf::Arena* arena) cons void PricingDescriptor::Clear() { // @@protoc_insertion_point(message_clear_start:PricingDescriptor) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + if (GetArenaNoVirtual() == NULL && unit_ != NULL) { delete unit_; } @@ -2010,6 +2093,7 @@ void PricingDescriptor::Clear() { } freebie_ = NULL; type_ = 0; + _internal_metadata_.Clear(); } bool PricingDescriptor::MergePartialFromCodedStream( @@ -2025,7 +2109,7 @@ bool PricingDescriptor::MergePartialFromCodedStream( // .PricingType type = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(8u)) { + static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) { int value; DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( @@ -2040,7 +2124,7 @@ bool PricingDescriptor::MergePartialFromCodedStream( // .UnitPricingDescriptor unit = 20; case 20: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(162u)) { + static_cast< ::google::protobuf::uint8>(162u /* 162 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, mutable_unit())); } else { @@ -2052,7 +2136,7 @@ bool PricingDescriptor::MergePartialFromCodedStream( // .WeightedPricingDescriptor weighted = 21; case 21: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(170u)) { + static_cast< ::google::protobuf::uint8>(170u /* 170 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, mutable_weighted())); } else { @@ -2064,7 +2148,7 @@ bool PricingDescriptor::MergePartialFromCodedStream( // .FreebiePricingDescriptor freebie = 22; case 22: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(178u)) { + static_cast< ::google::protobuf::uint8>(178u /* 178 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, mutable_freebie())); } else { @@ -2075,12 +2159,11 @@ bool PricingDescriptor::MergePartialFromCodedStream( default: { handle_unusual: - if (tag == 0 || - ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + if (tag == 0) { goto success; } - DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } @@ -2124,6 +2207,10 @@ void PricingDescriptor::SerializeWithCachedSizes( 22, *this->freebie_, output); } + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); + } // @@protoc_insertion_point(serialize_end:PricingDescriptor) } @@ -2161,6 +2248,10 @@ ::google::protobuf::uint8* PricingDescriptor::InternalSerializeWithCachedSizesTo 22, *this->freebie_, deterministic, target); } + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); + } // @@protoc_insertion_point(serialize_to_array_end:PricingDescriptor) return target; } @@ -2169,6 +2260,11 @@ size_t PricingDescriptor::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:PricingDescriptor) size_t total_size = 0; + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); + } // .UnitPricingDescriptor unit = 20; if (this->has_unit()) { total_size += 2 + @@ -2277,11 +2373,13 @@ void PricingDescriptor::UnsafeArenaSwap(PricingDescriptor* other) { InternalSwap(other); } void PricingDescriptor::InternalSwap(PricingDescriptor* other) { - std::swap(unit_, other->unit_); - std::swap(weighted_, other->weighted_); - std::swap(freebie_, other->freebie_); - std::swap(type_, other->type_); - std::swap(_cached_size_, other->_cached_size_); + using std::swap; + swap(unit_, other->unit_); + swap(weighted_, other->weighted_); + swap(freebie_, other->freebie_); + swap(type_, other->type_); + _internal_metadata_.Swap(&other->_internal_metadata_); + swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata PricingDescriptor::GetMetadata() const { @@ -2315,9 +2413,10 @@ void PricingDescriptor::clear_unit() { unit_ = NULL; } const ::UnitPricingDescriptor& PricingDescriptor::unit() const { + const ::UnitPricingDescriptor* p = unit_; // @@protoc_insertion_point(field_get:PricingDescriptor.unit) - return unit_ != NULL ? *unit_ - : *::UnitPricingDescriptor::internal_default_instance(); + return p != NULL ? *p : *reinterpret_cast( + &::_UnitPricingDescriptor_default_instance_); } ::UnitPricingDescriptor* PricingDescriptor::mutable_unit() { @@ -2364,9 +2463,10 @@ void PricingDescriptor::clear_weighted() { weighted_ = NULL; } const ::WeightedPricingDescriptor& PricingDescriptor::weighted() const { + const ::WeightedPricingDescriptor* p = weighted_; // @@protoc_insertion_point(field_get:PricingDescriptor.weighted) - return weighted_ != NULL ? *weighted_ - : *::WeightedPricingDescriptor::internal_default_instance(); + return p != NULL ? *p : *reinterpret_cast( + &::_WeightedPricingDescriptor_default_instance_); } ::WeightedPricingDescriptor* PricingDescriptor::mutable_weighted() { @@ -2413,9 +2513,10 @@ void PricingDescriptor::clear_freebie() { freebie_ = NULL; } const ::FreebiePricingDescriptor& PricingDescriptor::freebie() const { + const ::FreebiePricingDescriptor* p = freebie_; // @@protoc_insertion_point(field_get:PricingDescriptor.freebie) - return freebie_ != NULL ? *freebie_ - : *::FreebiePricingDescriptor::internal_default_instance(); + return p != NULL ? *p : *reinterpret_cast( + &::_FreebiePricingDescriptor_default_instance_); } ::FreebiePricingDescriptor* PricingDescriptor::mutable_freebie() { @@ -2475,9 +2576,7 @@ ProductPricing::ProductPricing(::google::protobuf::Arena* arena) _internal_metadata_(arena), discounts_(arena), manifest_(arena) { -#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER protobuf_structs_2fpricing_2fPricingDescriptor_2eproto::InitDefaults(); -#endif // GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:ProductPricing) @@ -2503,6 +2602,7 @@ ProductPricing::~ProductPricing() { void ProductPricing::SharedDtor() { ::google::protobuf::Arena* arena = GetArenaNoVirtual(); + GOOGLE_DCHECK(arena == NULL); if (arena != NULL) { return; } @@ -2536,8 +2636,13 @@ ProductPricing* ProductPricing::New(::google::protobuf::Arena* arena) const { void ProductPricing::Clear() { // @@protoc_insertion_point(message_clear_start:ProductPricing) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + discounts_.Clear(); manifest_.Clear(); + _internal_metadata_.Clear(); } bool ProductPricing::MergePartialFromCodedStream( @@ -2553,7 +2658,7 @@ bool ProductPricing::MergePartialFromCodedStream( // repeated .SaleDescriptor discounts = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(10u)) { + static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, add_discounts())); } else { @@ -2565,7 +2670,7 @@ bool ProductPricing::MergePartialFromCodedStream( // repeated .PricingDescriptor manifest = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(18u)) { + static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, add_manifest())); } else { @@ -2576,12 +2681,11 @@ bool ProductPricing::MergePartialFromCodedStream( default: { handle_unusual: - if (tag == 0 || - ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + if (tag == 0) { goto success; } - DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } @@ -2602,17 +2706,23 @@ void ProductPricing::SerializeWithCachedSizes( (void) cached_has_bits; // repeated .SaleDescriptor discounts = 1; - for (unsigned int i = 0, n = this->discounts_size(); i < n; i++) { + for (unsigned int i = 0, + n = static_cast(this->discounts_size()); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 1, this->discounts(i), output); + 1, this->discounts(static_cast(i)), output); } // repeated .PricingDescriptor manifest = 2; - for (unsigned int i = 0, n = this->manifest_size(); i < n; i++) { + for (unsigned int i = 0, + n = static_cast(this->manifest_size()); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 2, this->manifest(i), output); + 2, this->manifest(static_cast(i)), output); } + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); + } // @@protoc_insertion_point(serialize_end:ProductPricing) } @@ -2624,19 +2734,25 @@ ::google::protobuf::uint8* ProductPricing::InternalSerializeWithCachedSizesToArr (void) cached_has_bits; // repeated .SaleDescriptor discounts = 1; - for (unsigned int i = 0, n = this->discounts_size(); i < n; i++) { + for (unsigned int i = 0, + n = static_cast(this->discounts_size()); i < n; i++) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageNoVirtualToArray( - 1, this->discounts(i), deterministic, target); + 1, this->discounts(static_cast(i)), deterministic, target); } // repeated .PricingDescriptor manifest = 2; - for (unsigned int i = 0, n = this->manifest_size(); i < n; i++) { + for (unsigned int i = 0, + n = static_cast(this->manifest_size()); i < n; i++) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageNoVirtualToArray( - 2, this->manifest(i), deterministic, target); + 2, this->manifest(static_cast(i)), deterministic, target); } + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); + } // @@protoc_insertion_point(serialize_to_array_end:ProductPricing) return target; } @@ -2645,25 +2761,30 @@ size_t ProductPricing::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:ProductPricing) size_t total_size = 0; + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); + } // repeated .SaleDescriptor discounts = 1; { - unsigned int count = this->discounts_size(); + unsigned int count = static_cast(this->discounts_size()); total_size += 1UL * count; for (unsigned int i = 0; i < count; i++) { total_size += ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->discounts(i)); + this->discounts(static_cast(i))); } } // repeated .PricingDescriptor manifest = 2; { - unsigned int count = this->manifest_size(); + unsigned int count = static_cast(this->manifest_size()); total_size += 1UL * count; for (unsigned int i = 0; i < count; i++) { total_size += ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->manifest(i)); + this->manifest(static_cast(i))); } } @@ -2738,9 +2859,11 @@ void ProductPricing::UnsafeArenaSwap(ProductPricing* other) { InternalSwap(other); } void ProductPricing::InternalSwap(ProductPricing* other) { + using std::swap; discounts_.InternalSwap(&other->discounts_); manifest_.InternalSwap(&other->manifest_); - std::swap(_cached_size_, other->_cached_size_); + _internal_metadata_.Swap(&other->_internal_metadata_); + swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata ProductPricing::GetMetadata() const { diff --git a/languages/cpp/structs/pricing/PricingDescriptor.pb.h b/languages/cpp/structs/pricing/PricingDescriptor.pb.h index 4dbd626..e694dc4 100644 --- a/languages/cpp/structs/pricing/PricingDescriptor.pb.h +++ b/languages/cpp/structs/pricing/PricingDescriptor.pb.h @@ -8,12 +8,12 @@ #include -#if GOOGLE_PROTOBUF_VERSION < 3003000 +#if GOOGLE_PROTOBUF_VERSION < 3004000 #error This file was generated by a newer version of protoc which is #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 3003002 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#if 3004000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION #error This file was generated by an older version of protoc which is #error incompatible with your Protocol Buffer headers. Please #error regenerate this file with a newer version of protoc. @@ -44,9 +44,6 @@ extern PricingTierAvailabilityDefaultTypeInternal _PricingTierAvailability_defau class ProductPricing; class ProductPricingDefaultTypeInternal; extern ProductPricingDefaultTypeInternal _ProductPricing_default_instance_; -class SaleDescriptor; -class SaleDescriptorDefaultTypeInternal; -extern SaleDescriptorDefaultTypeInternal _SaleDescriptor_default_instance_; class UnitPricingDescriptor; class UnitPricingDescriptorDefaultTypeInternal; extern UnitPricingDescriptorDefaultTypeInternal _UnitPricingDescriptor_default_instance_; @@ -61,8 +58,9 @@ struct TableStruct { static const ::google::protobuf::internal::AuxillaryParseTableField aux[]; static const ::google::protobuf::internal::ParseTable schema[]; static const ::google::protobuf::uint32 offsets[]; + static const ::google::protobuf::internal::FieldMetadata field_metadata[]; + static const ::google::protobuf::internal::SerializationTable serialization_table[]; static void InitDefaultsImpl(); - static void Shutdown(); }; void AddDescriptors(); void InitDefaults(); @@ -132,7 +130,21 @@ class PricingTierAvailability : public ::google::protobuf::Message /* @@protoc_i CopyFrom(from); return *this; } + #if LANG_CXX11 + PricingTierAvailability(PricingTierAvailability&& from) noexcept + : PricingTierAvailability() { + *this = ::std::move(from); + } + inline PricingTierAvailability& operator=(PricingTierAvailability&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif inline ::google::protobuf::Arena* GetArena() const PROTOBUF_FINAL { return GetArenaNoVirtual(); } @@ -151,6 +163,9 @@ class PricingTierAvailability : public ::google::protobuf::Message /* @@protoc_i void UnsafeArenaSwap(PricingTierAvailability* other); void Swap(PricingTierAvailability* other); + friend void swap(PricingTierAvailability& a, PricingTierAvailability& b) { + a.Swap(&b); + } // implements Message ---------------------------------------------- @@ -213,7 +228,7 @@ class PricingTierAvailability : public ::google::protobuf::Message /* @@protoc_i private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - friend class ::google::protobuf::Arena; + template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; bool offered_; @@ -234,7 +249,21 @@ class UnitPricingDescriptor : public ::google::protobuf::Message /* @@protoc_ins CopyFrom(from); return *this; } + #if LANG_CXX11 + UnitPricingDescriptor(UnitPricingDescriptor&& from) noexcept + : UnitPricingDescriptor() { + *this = ::std::move(from); + } + inline UnitPricingDescriptor& operator=(UnitPricingDescriptor&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif inline ::google::protobuf::Arena* GetArena() const PROTOBUF_FINAL { return GetArenaNoVirtual(); } @@ -253,6 +282,9 @@ class UnitPricingDescriptor : public ::google::protobuf::Message /* @@protoc_ins void UnsafeArenaSwap(UnitPricingDescriptor* other); void Swap(UnitPricingDescriptor* other); + friend void swap(UnitPricingDescriptor& a, UnitPricingDescriptor& b) { + a.Swap(&b); + } // implements Message ---------------------------------------------- @@ -339,7 +371,7 @@ class UnitPricingDescriptor : public ::google::protobuf::Message /* @@protoc_ins private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - friend class ::google::protobuf::Arena; + template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; ::google::protobuf::RepeatedPtrField< ::SaleDescriptor > discounts_; @@ -361,7 +393,21 @@ class WeightedPricingDescriptor : public ::google::protobuf::Message /* @@protoc CopyFrom(from); return *this; } + #if LANG_CXX11 + WeightedPricingDescriptor(WeightedPricingDescriptor&& from) noexcept + : WeightedPricingDescriptor() { + *this = ::std::move(from); + } + inline WeightedPricingDescriptor& operator=(WeightedPricingDescriptor&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif inline ::google::protobuf::Arena* GetArena() const PROTOBUF_FINAL { return GetArenaNoVirtual(); } @@ -380,6 +426,9 @@ class WeightedPricingDescriptor : public ::google::protobuf::Message /* @@protoc void UnsafeArenaSwap(WeightedPricingDescriptor* other); void Swap(WeightedPricingDescriptor* other); + friend void swap(WeightedPricingDescriptor& a, WeightedPricingDescriptor& b) { + a.Swap(&b); + } // implements Message ---------------------------------------------- @@ -460,7 +509,7 @@ class WeightedPricingDescriptor : public ::google::protobuf::Message /* @@protoc private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - friend class ::google::protobuf::Arena; + template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; ::UnitPricingDescriptor* tier_; @@ -482,7 +531,21 @@ class FreebiePricingDescriptor : public ::google::protobuf::Message /* @@protoc_ CopyFrom(from); return *this; } + #if LANG_CXX11 + FreebiePricingDescriptor(FreebiePricingDescriptor&& from) noexcept + : FreebiePricingDescriptor() { + *this = ::std::move(from); + } + inline FreebiePricingDescriptor& operator=(FreebiePricingDescriptor&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif inline ::google::protobuf::Arena* GetArena() const PROTOBUF_FINAL { return GetArenaNoVirtual(); } @@ -501,6 +564,9 @@ class FreebiePricingDescriptor : public ::google::protobuf::Message /* @@protoc_ void UnsafeArenaSwap(FreebiePricingDescriptor* other); void Swap(FreebiePricingDescriptor* other); + friend void swap(FreebiePricingDescriptor& a, FreebiePricingDescriptor& b) { + a.Swap(&b); + } // implements Message ---------------------------------------------- @@ -551,7 +617,7 @@ class FreebiePricingDescriptor : public ::google::protobuf::Message /* @@protoc_ private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - friend class ::google::protobuf::Arena; + template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; mutable int _cached_size_; @@ -570,7 +636,21 @@ class PricingDescriptor : public ::google::protobuf::Message /* @@protoc_inserti CopyFrom(from); return *this; } + #if LANG_CXX11 + PricingDescriptor(PricingDescriptor&& from) noexcept + : PricingDescriptor() { + *this = ::std::move(from); + } + inline PricingDescriptor& operator=(PricingDescriptor&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif inline ::google::protobuf::Arena* GetArena() const PROTOBUF_FINAL { return GetArenaNoVirtual(); } @@ -589,6 +669,9 @@ class PricingDescriptor : public ::google::protobuf::Message /* @@protoc_inserti void UnsafeArenaSwap(PricingDescriptor* other); void Swap(PricingDescriptor* other); + friend void swap(PricingDescriptor& a, PricingDescriptor& b) { + a.Swap(&b); + } // implements Message ---------------------------------------------- @@ -699,7 +782,7 @@ class PricingDescriptor : public ::google::protobuf::Message /* @@protoc_inserti private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - friend class ::google::protobuf::Arena; + template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; ::UnitPricingDescriptor* unit_; @@ -722,7 +805,21 @@ class ProductPricing : public ::google::protobuf::Message /* @@protoc_insertion_ CopyFrom(from); return *this; } + #if LANG_CXX11 + ProductPricing(ProductPricing&& from) noexcept + : ProductPricing() { + *this = ::std::move(from); + } + inline ProductPricing& operator=(ProductPricing&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif inline ::google::protobuf::Arena* GetArena() const PROTOBUF_FINAL { return GetArenaNoVirtual(); } @@ -741,6 +838,9 @@ class ProductPricing : public ::google::protobuf::Message /* @@protoc_insertion_ void UnsafeArenaSwap(ProductPricing* other); void Swap(ProductPricing* other); + friend void swap(ProductPricing& a, ProductPricing& b) { + a.Swap(&b); + } // implements Message ---------------------------------------------- @@ -815,7 +915,7 @@ class ProductPricing : public ::google::protobuf::Message /* @@protoc_insertion_ private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - friend class ::google::protobuf::Arena; + template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; ::google::protobuf::RepeatedPtrField< ::SaleDescriptor > discounts_; @@ -829,6 +929,10 @@ class ProductPricing : public ::google::protobuf::Message /* @@protoc_insertion_ // =================================================================== #if !PROTOBUF_INLINE_NOT_IN_HEADERS +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ // PricingTierAvailability // bool offered = 1; @@ -886,9 +990,10 @@ inline void UnitPricingDescriptor::clear_status() { status_ = NULL; } inline const ::PricingTierAvailability& UnitPricingDescriptor::status() const { + const ::PricingTierAvailability* p = status_; // @@protoc_insertion_point(field_get:UnitPricingDescriptor.status) - return status_ != NULL ? *status_ - : *::PricingTierAvailability::internal_default_instance(); + return p != NULL ? *p : *reinterpret_cast( + &::_PricingTierAvailability_default_instance_); } inline ::PricingTierAvailability* UnitPricingDescriptor::mutable_status() { @@ -983,9 +1088,10 @@ inline void WeightedPricingDescriptor::clear_tier() { tier_ = NULL; } inline const ::UnitPricingDescriptor& WeightedPricingDescriptor::tier() const { + const ::UnitPricingDescriptor* p = tier_; // @@protoc_insertion_point(field_get:WeightedPricingDescriptor.tier) - return tier_ != NULL ? *tier_ - : *::UnitPricingDescriptor::internal_default_instance(); + return p != NULL ? *p : *reinterpret_cast( + &::_UnitPricingDescriptor_default_instance_); } inline ::UnitPricingDescriptor* WeightedPricingDescriptor::mutable_tier() { @@ -1068,9 +1174,10 @@ inline void PricingDescriptor::clear_unit() { unit_ = NULL; } inline const ::UnitPricingDescriptor& PricingDescriptor::unit() const { + const ::UnitPricingDescriptor* p = unit_; // @@protoc_insertion_point(field_get:PricingDescriptor.unit) - return unit_ != NULL ? *unit_ - : *::UnitPricingDescriptor::internal_default_instance(); + return p != NULL ? *p : *reinterpret_cast( + &::_UnitPricingDescriptor_default_instance_); } inline ::UnitPricingDescriptor* PricingDescriptor::mutable_unit() { @@ -1117,9 +1224,10 @@ inline void PricingDescriptor::clear_weighted() { weighted_ = NULL; } inline const ::WeightedPricingDescriptor& PricingDescriptor::weighted() const { + const ::WeightedPricingDescriptor* p = weighted_; // @@protoc_insertion_point(field_get:PricingDescriptor.weighted) - return weighted_ != NULL ? *weighted_ - : *::WeightedPricingDescriptor::internal_default_instance(); + return p != NULL ? *p : *reinterpret_cast( + &::_WeightedPricingDescriptor_default_instance_); } inline ::WeightedPricingDescriptor* PricingDescriptor::mutable_weighted() { @@ -1166,9 +1274,10 @@ inline void PricingDescriptor::clear_freebie() { freebie_ = NULL; } inline const ::FreebiePricingDescriptor& PricingDescriptor::freebie() const { + const ::FreebiePricingDescriptor* p = freebie_; // @@protoc_insertion_point(field_get:PricingDescriptor.freebie) - return freebie_ != NULL ? *freebie_ - : *::FreebiePricingDescriptor::internal_default_instance(); + return p != NULL ? *p : *reinterpret_cast( + &::_FreebiePricingDescriptor_default_instance_); } inline ::FreebiePricingDescriptor* PricingDescriptor::mutable_freebie() { @@ -1270,6 +1379,9 @@ ProductPricing::manifest() const { return manifest_; } +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ #endif // !PROTOBUF_INLINE_NOT_IN_HEADERS // ------------------------------------------------------------------- @@ -1285,7 +1397,6 @@ ProductPricing::manifest() const { // @@protoc_insertion_point(namespace_scope) -#ifndef SWIG namespace google { namespace protobuf { @@ -1302,7 +1413,6 @@ inline const EnumDescriptor* GetEnumDescriptor< ::PricingWeightTier>() { } // namespace protobuf } // namespace google -#endif // SWIG // @@protoc_insertion_point(global_scope) diff --git a/languages/cpp/structs/pricing/SaleDescriptor.pb.cc b/languages/cpp/structs/pricing/SaleDescriptor.pb.cc index 98316dd..4aed6b7 100644 --- a/languages/cpp/structs/pricing/SaleDescriptor.pb.cc +++ b/languages/cpp/structs/pricing/SaleDescriptor.pb.cc @@ -16,7 +16,10 @@ #include #include // @@protoc_insertion_point(includes) -class SaleDescriptorDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed { +class SaleDescriptorDefaultTypeInternal { +public: + ::google::protobuf::internal::ExplicitlyConstructed + _instance; } _SaleDescriptor_default_instance_; namespace protobuf_structs_2fpricing_2fSaleDescriptor_2eproto { @@ -30,20 +33,20 @@ const ::google::protobuf::EnumDescriptor* file_level_enum_descriptors[1]; } // namespace PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::ParseTableField - const TableStruct::entries[] = { + const TableStruct::entries[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { {0, 0, 0, ::google::protobuf::internal::kInvalidMask, 0, 0}, }; PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::AuxillaryParseTableField - const TableStruct::aux[] = { + const TableStruct::aux[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { ::google::protobuf::internal::AuxillaryParseTableField(), }; PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::ParseTable const - TableStruct::schema[] = { - { NULL, NULL, 0, -1, -1, false }, + TableStruct::schema[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + { NULL, NULL, 0, -1, -1, -1, -1, NULL, false }, }; -const ::google::protobuf::uint32 TableStruct::offsets[] = { +const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { ~0u, // no _has_bits_ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SaleDescriptor, _internal_metadata_), ~0u, // no _extensions_ @@ -58,8 +61,7 @@ const ::google::protobuf::uint32 TableStruct::offsets[] = { GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SaleDescriptor, loyalty_trigger_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SaleDescriptor, loyalty_reward_), }; - -static const ::google::protobuf::internal::MigrationSchema schemas[] = { +static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { { 0, -1, sizeof(SaleDescriptor)}, }; @@ -89,26 +91,22 @@ void protobuf_RegisterTypes(const ::std::string&) { } } // namespace - -void TableStruct::Shutdown() { - _SaleDescriptor_default_instance_.Shutdown(); - delete file_level_metadata[0].reflection; -} - void TableStruct::InitDefaultsImpl() { GOOGLE_PROTOBUF_VERIFY_VERSION; ::google::protobuf::internal::InitProtobufDefaults(); - _SaleDescriptor_default_instance_.DefaultConstruct(); -} + _SaleDescriptor_default_instance_._instance.DefaultConstruct(); + ::google::protobuf::internal::OnShutdownDestroyMessage( + &_SaleDescriptor_default_instance_);} void InitDefaults() { static GOOGLE_PROTOBUF_DECLARE_ONCE(once); ::google::protobuf::GoogleOnceInit(&once, &TableStruct::InitDefaultsImpl); } +namespace { void AddDescriptorsImpl() { InitDefaults(); - static const char descriptor[] = { + static const char descriptor[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { "\n$structs/pricing/SaleDescriptor.proto\"\307" "\001\n\016SaleDescriptor\022\027\n\004type\030\001 \001(\0162\t.SaleTy" "pe\022\021\n\teffective\030\002 \001(\004\022\022\n\nexpiration\030\003 \001(" @@ -123,14 +121,14 @@ void AddDescriptorsImpl() { descriptor, 360); ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( "structs/pricing/SaleDescriptor.proto", &protobuf_RegisterTypes); - ::google::protobuf::internal::OnShutdown(&TableStruct::Shutdown); } +} // anonymous namespace void AddDescriptors() { static GOOGLE_PROTOBUF_DECLARE_ONCE(once); ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl); } -// Force AddDescriptors() to be called at static initialization time. +// Force AddDescriptors() to be called at dynamic initialization time. struct StaticDescriptorInitializer { StaticDescriptorInitializer() { AddDescriptors(); @@ -179,9 +177,7 @@ SaleDescriptor::SaleDescriptor() SaleDescriptor::SaleDescriptor(::google::protobuf::Arena* arena) : ::google::protobuf::Message(), _internal_metadata_(arena) { -#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER protobuf_structs_2fpricing_2fSaleDescriptor_2eproto::InitDefaults(); -#endif // GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER SharedCtor(); RegisterArenaDtor(arena); // @@protoc_insertion_point(arena_constructor:SaleDescriptor) @@ -192,14 +188,15 @@ SaleDescriptor::SaleDescriptor(const SaleDescriptor& from) _cached_size_(0) { _internal_metadata_.MergeFrom(from._internal_metadata_); ::memcpy(&effective_, &from.effective_, - reinterpret_cast(&loyalty_reward_) - - reinterpret_cast(&effective_) + sizeof(loyalty_reward_)); + static_cast(reinterpret_cast(&loyalty_reward_) - + reinterpret_cast(&effective_)) + sizeof(loyalty_reward_)); // @@protoc_insertion_point(copy_constructor:SaleDescriptor) } void SaleDescriptor::SharedCtor() { - ::memset(&effective_, 0, reinterpret_cast(&loyalty_reward_) - - reinterpret_cast(&effective_) + sizeof(loyalty_reward_)); + ::memset(&effective_, 0, static_cast( + reinterpret_cast(&loyalty_reward_) - + reinterpret_cast(&effective_)) + sizeof(loyalty_reward_)); _cached_size_ = 0; } @@ -210,6 +207,7 @@ SaleDescriptor::~SaleDescriptor() { void SaleDescriptor::SharedDtor() { ::google::protobuf::Arena* arena = GetArenaNoVirtual(); + GOOGLE_DCHECK(arena == NULL); if (arena != NULL) { return; } @@ -243,8 +241,14 @@ SaleDescriptor* SaleDescriptor::New(::google::protobuf::Arena* arena) const { void SaleDescriptor::Clear() { // @@protoc_insertion_point(message_clear_start:SaleDescriptor) - ::memset(&effective_, 0, reinterpret_cast(&loyalty_reward_) - - reinterpret_cast(&effective_) + sizeof(loyalty_reward_)); + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + ::memset(&effective_, 0, static_cast( + reinterpret_cast(&loyalty_reward_) - + reinterpret_cast(&effective_)) + sizeof(loyalty_reward_)); + _internal_metadata_.Clear(); } bool SaleDescriptor::MergePartialFromCodedStream( @@ -260,7 +264,7 @@ bool SaleDescriptor::MergePartialFromCodedStream( // .SaleType type = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(8u)) { + static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) { int value; DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( @@ -275,7 +279,7 @@ bool SaleDescriptor::MergePartialFromCodedStream( // uint64 effective = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(16u)) { + static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) { DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>( @@ -289,7 +293,7 @@ bool SaleDescriptor::MergePartialFromCodedStream( // uint64 expiration = 3; case 3: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(24u)) { + static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) { DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>( @@ -303,7 +307,7 @@ bool SaleDescriptor::MergePartialFromCodedStream( // uint32 percentage_amount = 20; case 20: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(160u)) { + static_cast< ::google::protobuf::uint8>(160u /* 160 & 0xFF */)) { DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( @@ -317,7 +321,7 @@ bool SaleDescriptor::MergePartialFromCodedStream( // uint32 bogo_trigger = 21; case 21: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(168u)) { + static_cast< ::google::protobuf::uint8>(168u /* 168 & 0xFF */)) { DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( @@ -331,7 +335,7 @@ bool SaleDescriptor::MergePartialFromCodedStream( // uint32 bogo_reward = 22; case 22: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(176u)) { + static_cast< ::google::protobuf::uint8>(176u /* 176 & 0xFF */)) { DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( @@ -345,7 +349,7 @@ bool SaleDescriptor::MergePartialFromCodedStream( // uint32 loyalty_trigger = 23; case 23: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(184u)) { + static_cast< ::google::protobuf::uint8>(184u /* 184 & 0xFF */)) { DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( @@ -359,7 +363,7 @@ bool SaleDescriptor::MergePartialFromCodedStream( // uint32 loyalty_reward = 24; case 24: { if (static_cast< ::google::protobuf::uint8>(tag) == - static_cast< ::google::protobuf::uint8>(192u)) { + static_cast< ::google::protobuf::uint8>(192u /* 192 & 0xFF */)) { DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( @@ -372,12 +376,11 @@ bool SaleDescriptor::MergePartialFromCodedStream( default: { handle_unusual: - if (tag == 0 || - ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + if (tag == 0) { goto success; } - DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); break; } } @@ -438,6 +441,10 @@ void SaleDescriptor::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::WriteUInt32(24, this->loyalty_reward(), output); } + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); + } // @@protoc_insertion_point(serialize_end:SaleDescriptor) } @@ -489,6 +496,10 @@ ::google::protobuf::uint8* SaleDescriptor::InternalSerializeWithCachedSizesToArr target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(24, this->loyalty_reward(), target); } + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); + } // @@protoc_insertion_point(serialize_to_array_end:SaleDescriptor) return target; } @@ -497,6 +508,11 @@ size_t SaleDescriptor::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:SaleDescriptor) size_t total_size = 0; + if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); + } // uint64 effective = 2; if (this->effective() != 0) { total_size += 1 + @@ -645,15 +661,17 @@ void SaleDescriptor::UnsafeArenaSwap(SaleDescriptor* other) { InternalSwap(other); } void SaleDescriptor::InternalSwap(SaleDescriptor* other) { - std::swap(effective_, other->effective_); - std::swap(expiration_, other->expiration_); - std::swap(type_, other->type_); - std::swap(percentage_amount_, other->percentage_amount_); - std::swap(bogo_trigger_, other->bogo_trigger_); - std::swap(bogo_reward_, other->bogo_reward_); - std::swap(loyalty_trigger_, other->loyalty_trigger_); - std::swap(loyalty_reward_, other->loyalty_reward_); - std::swap(_cached_size_, other->_cached_size_); + using std::swap; + swap(effective_, other->effective_); + swap(expiration_, other->expiration_); + swap(type_, other->type_); + swap(percentage_amount_, other->percentage_amount_); + swap(bogo_trigger_, other->bogo_trigger_); + swap(bogo_reward_, other->bogo_reward_); + swap(loyalty_trigger_, other->loyalty_trigger_); + swap(loyalty_reward_, other->loyalty_reward_); + _internal_metadata_.Swap(&other->_internal_metadata_); + swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata SaleDescriptor::GetMetadata() const { diff --git a/languages/cpp/structs/pricing/SaleDescriptor.pb.h b/languages/cpp/structs/pricing/SaleDescriptor.pb.h index c2f1f27..135a7e4 100644 --- a/languages/cpp/structs/pricing/SaleDescriptor.pb.h +++ b/languages/cpp/structs/pricing/SaleDescriptor.pb.h @@ -8,12 +8,12 @@ #include -#if GOOGLE_PROTOBUF_VERSION < 3003000 +#if GOOGLE_PROTOBUF_VERSION < 3004000 #error This file was generated by a newer version of protoc which is #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 3003002 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#if 3004000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION #error This file was generated by an older version of protoc which is #error incompatible with your Protocol Buffer headers. Please #error regenerate this file with a newer version of protoc. @@ -42,8 +42,9 @@ struct TableStruct { static const ::google::protobuf::internal::AuxillaryParseTableField aux[]; static const ::google::protobuf::internal::ParseTable schema[]; static const ::google::protobuf::uint32 offsets[]; + static const ::google::protobuf::internal::FieldMetadata field_metadata[]; + static const ::google::protobuf::internal::SerializationTable serialization_table[]; static void InitDefaultsImpl(); - static void Shutdown(); }; void AddDescriptors(); void InitDefaults(); @@ -84,7 +85,21 @@ class SaleDescriptor : public ::google::protobuf::Message /* @@protoc_insertion_ CopyFrom(from); return *this; } + #if LANG_CXX11 + SaleDescriptor(SaleDescriptor&& from) noexcept + : SaleDescriptor() { + *this = ::std::move(from); + } + inline SaleDescriptor& operator=(SaleDescriptor&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif inline ::google::protobuf::Arena* GetArena() const PROTOBUF_FINAL { return GetArenaNoVirtual(); } @@ -103,6 +118,9 @@ class SaleDescriptor : public ::google::protobuf::Message /* @@protoc_insertion_ void UnsafeArenaSwap(SaleDescriptor* other); void Swap(SaleDescriptor* other); + friend void swap(SaleDescriptor& a, SaleDescriptor& b) { + a.Swap(&b); + } // implements Message ---------------------------------------------- @@ -201,7 +219,7 @@ class SaleDescriptor : public ::google::protobuf::Message /* @@protoc_insertion_ private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - friend class ::google::protobuf::Arena; + template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; ::google::protobuf::uint64 effective_; @@ -221,6 +239,10 @@ class SaleDescriptor : public ::google::protobuf::Message /* @@protoc_insertion_ // =================================================================== #if !PROTOBUF_INLINE_NOT_IN_HEADERS +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ // SaleDescriptor // .SaleType type = 1; @@ -335,12 +357,14 @@ inline void SaleDescriptor::set_loyalty_reward(::google::protobuf::uint32 value) // @@protoc_insertion_point(field_set:SaleDescriptor.loyalty_reward) } +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ #endif // !PROTOBUF_INLINE_NOT_IN_HEADERS // @@protoc_insertion_point(namespace_scope) -#ifndef SWIG namespace google { namespace protobuf { @@ -352,7 +376,6 @@ inline const EnumDescriptor* GetEnumDescriptor< ::SaleType>() { } // namespace protobuf } // namespace google -#endif // SWIG // @@protoc_insertion_point(global_scope) diff --git a/languages/csharp/Addressg.cs b/languages/csharp/Addressg.cs new file mode 100644 index 0000000..b79240a --- /dev/null +++ b/languages/csharp/Addressg.cs @@ -0,0 +1,297 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: geo/Address.proto +#pragma warning disable 1591, 0612, 3021 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +/// Holder for reflection information generated from geo/Address.proto +public static partial class AddressReflection { + + #region Descriptor + /// File descriptor for geo/Address.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static AddressReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "ChFnZW8vQWRkcmVzcy5wcm90byJxCgdBZGRyZXNzEhIKCmZpcnN0X2xpbmUY", + "ASABKAkSEwoLc2Vjb25kX2xpbmUYAiABKAkSDAoEY2l0eRgDIAEoCRINCgVz", + "dGF0ZRgEIAEoCRIPCgd6aXBjb2RlGAUgASgJEg8KB2NvdW50cnkYBiABKAlC", + "HAoWaW8uYmxvb21ib3guc2NoZW1hLmdlb0gBUAFiBnByb3RvMw==")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Address), global::Address.Parser, new[]{ "FirstLine", "SecondLine", "City", "State", "Zipcode", "Country" }, null, null, null) + })); + } + #endregion + +} +#region Messages +public sealed partial class Address : pb::IMessage
{ + private static readonly pb::MessageParser
_parser = new pb::MessageParser
(() => new Address()); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser
Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::AddressReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public Address() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public Address(Address other) : this() { + firstLine_ = other.firstLine_; + secondLine_ = other.secondLine_; + city_ = other.city_; + state_ = other.state_; + zipcode_ = other.zipcode_; + country_ = other.country_; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public Address Clone() { + return new Address(this); + } + + /// Field number for the "first_line" field. + public const int FirstLineFieldNumber = 1; + private string firstLine_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public string FirstLine { + get { return firstLine_; } + set { + firstLine_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "second_line" field. + public const int SecondLineFieldNumber = 2; + private string secondLine_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public string SecondLine { + get { return secondLine_; } + set { + secondLine_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "city" field. + public const int CityFieldNumber = 3; + private string city_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public string City { + get { return city_; } + set { + city_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "state" field. + public const int StateFieldNumber = 4; + private string state_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public string State { + get { return state_; } + set { + state_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "zipcode" field. + public const int ZipcodeFieldNumber = 5; + private string zipcode_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public string Zipcode { + get { return zipcode_; } + set { + zipcode_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "country" field. + public const int CountryFieldNumber = 6; + private string country_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public string Country { + get { return country_; } + set { + country_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as Address); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(Address other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (FirstLine != other.FirstLine) return false; + if (SecondLine != other.SecondLine) return false; + if (City != other.City) return false; + if (State != other.State) return false; + if (Zipcode != other.Zipcode) return false; + if (Country != other.Country) return false; + return true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (FirstLine.Length != 0) hash ^= FirstLine.GetHashCode(); + if (SecondLine.Length != 0) hash ^= SecondLine.GetHashCode(); + if (City.Length != 0) hash ^= City.GetHashCode(); + if (State.Length != 0) hash ^= State.GetHashCode(); + if (Zipcode.Length != 0) hash ^= Zipcode.GetHashCode(); + if (Country.Length != 0) hash ^= Country.GetHashCode(); + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (FirstLine.Length != 0) { + output.WriteRawTag(10); + output.WriteString(FirstLine); + } + if (SecondLine.Length != 0) { + output.WriteRawTag(18); + output.WriteString(SecondLine); + } + if (City.Length != 0) { + output.WriteRawTag(26); + output.WriteString(City); + } + if (State.Length != 0) { + output.WriteRawTag(34); + output.WriteString(State); + } + if (Zipcode.Length != 0) { + output.WriteRawTag(42); + output.WriteString(Zipcode); + } + if (Country.Length != 0) { + output.WriteRawTag(50); + output.WriteString(Country); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (FirstLine.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(FirstLine); + } + if (SecondLine.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(SecondLine); + } + if (City.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(City); + } + if (State.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(State); + } + if (Zipcode.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Zipcode); + } + if (Country.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Country); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(Address other) { + if (other == null) { + return; + } + if (other.FirstLine.Length != 0) { + FirstLine = other.FirstLine; + } + if (other.SecondLine.Length != 0) { + SecondLine = other.SecondLine; + } + if (other.City.Length != 0) { + City = other.City; + } + if (other.State.Length != 0) { + State = other.State; + } + if (other.Zipcode.Length != 0) { + Zipcode = other.Zipcode; + } + if (other.Country.Length != 0) { + Country = other.Country; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + input.SkipLastField(); + break; + case 10: { + FirstLine = input.ReadString(); + break; + } + case 18: { + SecondLine = input.ReadString(); + break; + } + case 26: { + City = input.ReadString(); + break; + } + case 34: { + State = input.ReadString(); + break; + } + case 42: { + Zipcode = input.ReadString(); + break; + } + case 50: { + Country = input.ReadString(); + break; + } + } + } + } + +} + +#endregion + + +#endregion Designer generated code diff --git a/languages/dart/geo/Address.pb.dart b/languages/dart/geo/Address.pb.dart new file mode 100644 index 0000000..64016b5 --- /dev/null +++ b/languages/dart/geo/Address.pb.dart @@ -0,0 +1,72 @@ +/// +// Generated code. Do not modify. +/// +// ignore_for_file: non_constant_identifier_names +// ignore_for_file: library_prefixes +library Address; + +// ignore: UNUSED_SHOWN_NAME +import 'dart:core' show int, bool, double, String, List, override; + +import 'package:protobuf/protobuf.dart'; + +class Address extends GeneratedMessage { + static final BuilderInfo _i = new BuilderInfo('Address') + ..a/**/(1, 'firstLine', PbFieldType.OS) + ..a/**/(2, 'secondLine', PbFieldType.OS) + ..a/**/(3, 'city', PbFieldType.OS) + ..a/**/(4, 'state', PbFieldType.OS) + ..a/**/(5, 'zipcode', PbFieldType.OS) + ..a/**/(6, 'country', PbFieldType.OS) + ..hasRequiredFields = false + ; + + Address() : super(); + Address.fromBuffer(List i, [ExtensionRegistry r = ExtensionRegistry.EMPTY]) : super.fromBuffer(i, r); + Address.fromJson(String i, [ExtensionRegistry r = ExtensionRegistry.EMPTY]) : super.fromJson(i, r); + Address clone() => new Address()..mergeFromMessage(this); + BuilderInfo get info_ => _i; + static Address create() => new Address(); + static PbList
createRepeated() => new PbList
(); + static Address getDefault() { + if (_defaultInstance == null) _defaultInstance = new _ReadonlyAddress(); + return _defaultInstance; + } + static Address _defaultInstance; + static void $checkItem(Address v) { + if (v is! Address) checkItemFailed(v, 'Address'); + } + + String get firstLine => $_get(0, 1, ''); + set firstLine(String v) { $_setString(0, 1, v); } + bool hasFirstLine() => $_has(0, 1); + void clearFirstLine() => clearField(1); + + String get secondLine => $_get(1, 2, ''); + set secondLine(String v) { $_setString(1, 2, v); } + bool hasSecondLine() => $_has(1, 2); + void clearSecondLine() => clearField(2); + + String get city => $_get(2, 3, ''); + set city(String v) { $_setString(2, 3, v); } + bool hasCity() => $_has(2, 3); + void clearCity() => clearField(3); + + String get state => $_get(3, 4, ''); + set state(String v) { $_setString(3, 4, v); } + bool hasState() => $_has(3, 4); + void clearState() => clearField(4); + + String get zipcode => $_get(4, 5, ''); + set zipcode(String v) { $_setString(4, 5, v); } + bool hasZipcode() => $_has(4, 5); + void clearZipcode() => clearField(5); + + String get country => $_get(5, 6, ''); + set country(String v) { $_setString(5, 6, v); } + bool hasCountry() => $_has(5, 6); + void clearCountry() => clearField(6); +} + +class _ReadonlyAddress extends Address with ReadonlyMessageMixin {} + diff --git a/languages/dart/geo/Address.pbenum.dart b/languages/dart/geo/Address.pbenum.dart new file mode 100644 index 0000000..ae1ffa7 --- /dev/null +++ b/languages/dart/geo/Address.pbenum.dart @@ -0,0 +1,7 @@ +/// +// Generated code. Do not modify. +/// +// ignore_for_file: non_constant_identifier_names +// ignore_for_file: library_prefixes +library Address_pbenum; + diff --git a/languages/dart/geo/Address.pbjson.dart b/languages/dart/geo/Address.pbjson.dart new file mode 100644 index 0000000..77777d3 --- /dev/null +++ b/languages/dart/geo/Address.pbjson.dart @@ -0,0 +1,19 @@ +/// +// Generated code. Do not modify. +/// +// ignore_for_file: non_constant_identifier_names +// ignore_for_file: library_prefixes +library Address_pbjson; + +const Address$json = const { + '1': 'Address', + '2': const [ + const {'1': 'first_line', '3': 1, '4': 1, '5': 9, '10': 'firstLine'}, + const {'1': 'second_line', '3': 2, '4': 1, '5': 9, '10': 'secondLine'}, + const {'1': 'city', '3': 3, '4': 1, '5': 9, '10': 'city'}, + const {'1': 'state', '3': 4, '4': 1, '5': 9, '10': 'state'}, + const {'1': 'zipcode', '3': 5, '4': 1, '5': 9, '10': 'zipcode'}, + const {'1': 'country', '3': 6, '4': 1, '5': 9, '10': 'country'}, + ], +}; + diff --git a/languages/dart/geo/Address.pbserver.dart b/languages/dart/geo/Address.pbserver.dart new file mode 100644 index 0000000..9ae3039 --- /dev/null +++ b/languages/dart/geo/Address.pbserver.dart @@ -0,0 +1,9 @@ +/// +// Generated code. Do not modify. +/// +// ignore_for_file: non_constant_identifier_names +// ignore_for_file: library_prefixes +library Address_pbserver; + +export 'Address.pb.dart'; + diff --git a/languages/go/Product.pb.go b/languages/go/Product.pb.go index d8979f3..2ff61b1 100644 --- a/languages/go/Product.pb.go +++ b/languages/go/Product.pb.go @@ -16,6 +16,7 @@ It is generated from these files: content/MaterialsData.proto content/Name.proto content/ProductContent.proto + geo/Address.proto media/MediaItem.proto media/MediaKey.proto media/MediaType.proto @@ -37,6 +38,7 @@ It has these top-level messages: MaterialsData Name ProductContent + Address MediaItem MediaKey MediaType diff --git a/languages/go/geo/Address.pb.go b/languages/go/geo/Address.pb.go new file mode 100644 index 0000000..663d4a4 --- /dev/null +++ b/languages/go/geo/Address.pb.go @@ -0,0 +1,91 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: geo/Address.proto + +package schema + +import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +type Address struct { + FirstLine string `protobuf:"bytes,1,opt,name=first_line,json=firstLine" json:"first_line,omitempty"` + SecondLine string `protobuf:"bytes,2,opt,name=second_line,json=secondLine" json:"second_line,omitempty"` + City string `protobuf:"bytes,3,opt,name=city" json:"city,omitempty"` + State string `protobuf:"bytes,4,opt,name=state" json:"state,omitempty"` + Zipcode string `protobuf:"bytes,5,opt,name=zipcode" json:"zipcode,omitempty"` + Country string `protobuf:"bytes,6,opt,name=country" json:"country,omitempty"` +} + +func (m *Address) Reset() { *m = Address{} } +func (m *Address) String() string { return proto.CompactTextString(m) } +func (*Address) ProtoMessage() {} +func (*Address) Descriptor() ([]byte, []int) { return fileDescriptor11, []int{0} } + +func (m *Address) GetFirstLine() string { + if m != nil { + return m.FirstLine + } + return "" +} + +func (m *Address) GetSecondLine() string { + if m != nil { + return m.SecondLine + } + return "" +} + +func (m *Address) GetCity() string { + if m != nil { + return m.City + } + return "" +} + +func (m *Address) GetState() string { + if m != nil { + return m.State + } + return "" +} + +func (m *Address) GetZipcode() string { + if m != nil { + return m.Zipcode + } + return "" +} + +func (m *Address) GetCountry() string { + if m != nil { + return m.Country + } + return "" +} + +func init() { + proto.RegisterType((*Address)(nil), "Address") +} + +func init() { proto.RegisterFile("geo/Address.proto", fileDescriptor11) } + +var fileDescriptor11 = []byte{ + // 190 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x34, 0x8f, 0xbf, 0x4e, 0xc3, 0x30, + 0x10, 0x87, 0x65, 0xc8, 0x1f, 0xe5, 0x98, 0xb0, 0x10, 0xf2, 0x00, 0x02, 0x31, 0x31, 0x99, 0x81, + 0x27, 0x80, 0xa9, 0x43, 0x87, 0xaa, 0x2f, 0x50, 0x25, 0xf6, 0x35, 0xb5, 0x94, 0xf8, 0x22, 0xdb, + 0x95, 0x9a, 0xbe, 0x50, 0x5f, 0xb3, 0xea, 0x39, 0xdd, 0xee, 0xfb, 0xbe, 0x5b, 0x7e, 0xf0, 0xdc, + 0x23, 0xfd, 0xfc, 0x59, 0x1b, 0x30, 0x46, 0x3d, 0x05, 0x4a, 0xf4, 0x75, 0x11, 0x50, 0x2f, 0x46, + 0xbe, 0x03, 0xec, 0x5d, 0x88, 0x69, 0x37, 0x38, 0x8f, 0x4a, 0x7c, 0x8a, 0xef, 0x66, 0xdb, 0xb0, + 0x59, 0x3b, 0x8f, 0xf2, 0x03, 0x9e, 0x22, 0x1a, 0xf2, 0x36, 0xf7, 0x07, 0xee, 0x90, 0x15, 0x3f, + 0x48, 0x28, 0x8c, 0x4b, 0xb3, 0x7a, 0xe4, 0xc2, 0xb7, 0x7c, 0x81, 0x32, 0xa6, 0x36, 0xa1, 0x2a, + 0x58, 0x66, 0x90, 0x0a, 0xea, 0xb3, 0x9b, 0x0c, 0x59, 0x54, 0x25, 0xfb, 0x3b, 0xde, 0x8a, 0xa1, + 0xa3, 0x4f, 0x61, 0x56, 0x55, 0x2e, 0x0b, 0xfe, 0xbf, 0xc1, 0xab, 0x23, 0xdd, 0x0d, 0x44, 0x63, + 0x47, 0x27, 0x1d, 0xcd, 0x01, 0xc7, 0x56, 0xf7, 0x48, 0x2b, 0xb1, 0x11, 0x5d, 0xc5, 0x73, 0x7e, + 0xaf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x9d, 0xc3, 0x6f, 0x10, 0xe3, 0x00, 0x00, 0x00, +} diff --git a/languages/go/media/MediaItem.pb.go b/languages/go/media/MediaItem.pb.go index da7ac0e..8980143 100644 --- a/languages/go/media/MediaItem.pb.go +++ b/languages/go/media/MediaItem.pb.go @@ -21,7 +21,7 @@ type MediaItem struct { func (m *MediaItem) Reset() { *m = MediaItem{} } func (m *MediaItem) String() string { return proto.CompactTextString(m) } func (*MediaItem) ProtoMessage() {} -func (*MediaItem) Descriptor() ([]byte, []int) { return fileDescriptor11, []int{0} } +func (*MediaItem) Descriptor() ([]byte, []int) { return fileDescriptor12, []int{0} } func (m *MediaItem) GetKey() *MediaKey { if m != nil { @@ -48,9 +48,9 @@ func init() { proto.RegisterType((*MediaItem)(nil), "MediaItem") } -func init() { proto.RegisterFile("media/MediaItem.proto", fileDescriptor11) } +func init() { proto.RegisterFile("media/MediaItem.proto", fileDescriptor12) } -var fileDescriptor11 = []byte{ +var fileDescriptor12 = []byte{ // 174 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xcd, 0x4d, 0x4d, 0xc9, 0x4c, 0xd4, 0xf7, 0x05, 0x91, 0x9e, 0x25, 0xa9, 0xb9, 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, 0x52, diff --git a/languages/go/media/MediaKey.pb.go b/languages/go/media/MediaKey.pb.go index d230339..796025e 100644 --- a/languages/go/media/MediaKey.pb.go +++ b/languages/go/media/MediaKey.pb.go @@ -19,7 +19,7 @@ type MediaKey struct { func (m *MediaKey) Reset() { *m = MediaKey{} } func (m *MediaKey) String() string { return proto.CompactTextString(m) } func (*MediaKey) ProtoMessage() {} -func (*MediaKey) Descriptor() ([]byte, []int) { return fileDescriptor12, []int{0} } +func (*MediaKey) Descriptor() ([]byte, []int) { return fileDescriptor13, []int{0} } func (m *MediaKey) GetId() string { if m != nil { @@ -32,9 +32,9 @@ func init() { proto.RegisterType((*MediaKey)(nil), "MediaKey") } -func init() { proto.RegisterFile("media/MediaKey.proto", fileDescriptor12) } +func init() { proto.RegisterFile("media/MediaKey.proto", fileDescriptor13) } -var fileDescriptor12 = []byte{ +var fileDescriptor13 = []byte{ // 114 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xc9, 0x4d, 0x4d, 0xc9, 0x4c, 0xd4, 0xf7, 0x05, 0x91, 0xde, 0xa9, 0x95, 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, 0x4a, 0x52, diff --git a/languages/go/media/MediaType.pb.go b/languages/go/media/MediaType.pb.go index 2be2bc5..91240b5 100644 --- a/languages/go/media/MediaType.pb.go +++ b/languages/go/media/MediaType.pb.go @@ -37,7 +37,7 @@ var MediaType_Kind_value = map[string]int32{ func (x MediaType_Kind) String() string { return proto.EnumName(MediaType_Kind_name, int32(x)) } -func (MediaType_Kind) EnumDescriptor() ([]byte, []int) { return fileDescriptor13, []int{0, 0} } +func (MediaType_Kind) EnumDescriptor() ([]byte, []int) { return fileDescriptor14, []int{0, 0} } type ImageType_ImageKind int32 @@ -67,7 +67,7 @@ var ImageType_ImageKind_value = map[string]int32{ func (x ImageType_ImageKind) String() string { return proto.EnumName(ImageType_ImageKind_name, int32(x)) } -func (ImageType_ImageKind) EnumDescriptor() ([]byte, []int) { return fileDescriptor13, []int{1, 0} } +func (ImageType_ImageKind) EnumDescriptor() ([]byte, []int) { return fileDescriptor14, []int{1, 0} } type DocumentType_DocumentKind int32 @@ -95,7 +95,7 @@ func (x DocumentType_DocumentKind) String() string { return proto.EnumName(DocumentType_DocumentKind_name, int32(x)) } func (DocumentType_DocumentKind) EnumDescriptor() ([]byte, []int) { - return fileDescriptor13, []int{2, 0} + return fileDescriptor14, []int{2, 0} } type VideoType_VideoKind int32 @@ -120,7 +120,7 @@ var VideoType_VideoKind_value = map[string]int32{ func (x VideoType_VideoKind) String() string { return proto.EnumName(VideoType_VideoKind_name, int32(x)) } -func (VideoType_VideoKind) EnumDescriptor() ([]byte, []int) { return fileDescriptor13, []int{3, 0} } +func (VideoType_VideoKind) EnumDescriptor() ([]byte, []int) { return fileDescriptor14, []int{3, 0} } // -- Media Type: Top-level -- // type MediaType struct { @@ -133,7 +133,7 @@ type MediaType struct { func (m *MediaType) Reset() { *m = MediaType{} } func (m *MediaType) String() string { return proto.CompactTextString(m) } func (*MediaType) ProtoMessage() {} -func (*MediaType) Descriptor() ([]byte, []int) { return fileDescriptor13, []int{0} } +func (*MediaType) Descriptor() ([]byte, []int) { return fileDescriptor14, []int{0} } func (m *MediaType) GetKind() MediaType_Kind { if m != nil { @@ -171,7 +171,7 @@ type ImageType struct { func (m *ImageType) Reset() { *m = ImageType{} } func (m *ImageType) String() string { return proto.CompactTextString(m) } func (*ImageType) ProtoMessage() {} -func (*ImageType) Descriptor() ([]byte, []int) { return fileDescriptor13, []int{1} } +func (*ImageType) Descriptor() ([]byte, []int) { return fileDescriptor14, []int{1} } func (m *ImageType) GetKind() ImageType_ImageKind { if m != nil { @@ -189,7 +189,7 @@ type DocumentType struct { func (m *DocumentType) Reset() { *m = DocumentType{} } func (m *DocumentType) String() string { return proto.CompactTextString(m) } func (*DocumentType) ProtoMessage() {} -func (*DocumentType) Descriptor() ([]byte, []int) { return fileDescriptor13, []int{2} } +func (*DocumentType) Descriptor() ([]byte, []int) { return fileDescriptor14, []int{2} } func (m *DocumentType) GetKind() DocumentType_DocumentKind { if m != nil { @@ -213,7 +213,7 @@ type VideoType struct { func (m *VideoType) Reset() { *m = VideoType{} } func (m *VideoType) String() string { return proto.CompactTextString(m) } func (*VideoType) ProtoMessage() {} -func (*VideoType) Descriptor() ([]byte, []int) { return fileDescriptor13, []int{3} } +func (*VideoType) Descriptor() ([]byte, []int) { return fileDescriptor14, []int{3} } func (m *VideoType) GetKind() VideoType_VideoKind { if m != nil { @@ -233,9 +233,9 @@ func init() { proto.RegisterEnum("VideoType_VideoKind", VideoType_VideoKind_name, VideoType_VideoKind_value) } -func init() { proto.RegisterFile("media/MediaType.proto", fileDescriptor13) } +func init() { proto.RegisterFile("media/MediaType.proto", fileDescriptor14) } -var fileDescriptor13 = []byte{ +var fileDescriptor14 = []byte{ // 420 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x52, 0x4d, 0x8f, 0x94, 0x40, 0x10, 0x9d, 0x06, 0x54, 0x28, 0x19, 0xed, 0x74, 0x34, 0x21, 0x1e, 0xcc, 0x06, 0x13, 0x33, 0x7a, diff --git a/languages/go/products/Flower.pb.go b/languages/go/products/Flower.pb.go index 350fcee..2dce803 100644 --- a/languages/go/products/Flower.pb.go +++ b/languages/go/products/Flower.pb.go @@ -26,7 +26,7 @@ type Flower struct { func (m *Flower) Reset() { *m = Flower{} } func (m *Flower) String() string { return proto.CompactTextString(m) } func (*Flower) ProtoMessage() {} -func (*Flower) Descriptor() ([]byte, []int) { return fileDescriptor14, []int{0} } +func (*Flower) Descriptor() ([]byte, []int) { return fileDescriptor15, []int{0} } func (m *Flower) GetKey() *ProductKey { if m != nil { @@ -67,9 +67,9 @@ func init() { proto.RegisterType((*Flower)(nil), "Flower") } -func init() { proto.RegisterFile("products/Flower.proto", fileDescriptor14) } +func init() { proto.RegisterFile("products/Flower.proto", fileDescriptor15) } -var fileDescriptor14 = []byte{ +var fileDescriptor15 = []byte{ // 278 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x90, 0xdf, 0x4a, 0xc3, 0x30, 0x14, 0xc6, 0x0d, 0xe2, 0x84, 0x6c, 0x53, 0x29, 0x56, 0xcb, 0x74, 0x20, 0x5e, 0xf8, 0xe7, 0x26, diff --git a/languages/go/structs/FlagsDescriptor.pb.go b/languages/go/structs/FlagsDescriptor.pb.go index 0e22149..757a4a5 100644 --- a/languages/go/structs/FlagsDescriptor.pb.go +++ b/languages/go/structs/FlagsDescriptor.pb.go @@ -40,7 +40,7 @@ var ProductFlag_value = map[string]int32{ func (x ProductFlag) String() string { return proto.EnumName(ProductFlag_name, int32(x)) } -func (ProductFlag) EnumDescriptor() ([]byte, []int) { return fileDescriptor15, []int{0} } +func (ProductFlag) EnumDescriptor() ([]byte, []int) { return fileDescriptor16, []int{0} } type ProductFlagValue struct { Type ProductFlag `protobuf:"varint,1,opt,name=type,enum=ProductFlag" json:"type,omitempty"` @@ -50,7 +50,7 @@ type ProductFlagValue struct { func (m *ProductFlagValue) Reset() { *m = ProductFlagValue{} } func (m *ProductFlagValue) String() string { return proto.CompactTextString(m) } func (*ProductFlagValue) ProtoMessage() {} -func (*ProductFlagValue) Descriptor() ([]byte, []int) { return fileDescriptor15, []int{0} } +func (*ProductFlagValue) Descriptor() ([]byte, []int) { return fileDescriptor16, []int{0} } func (m *ProductFlagValue) GetType() ProductFlag { if m != nil { @@ -73,7 +73,7 @@ type ProductFlagset struct { func (m *ProductFlagset) Reset() { *m = ProductFlagset{} } func (m *ProductFlagset) String() string { return proto.CompactTextString(m) } func (*ProductFlagset) ProtoMessage() {} -func (*ProductFlagset) Descriptor() ([]byte, []int) { return fileDescriptor15, []int{1} } +func (*ProductFlagset) Descriptor() ([]byte, []int) { return fileDescriptor16, []int{1} } func (m *ProductFlagset) GetFlags() []*ProductFlagValue { if m != nil { @@ -93,7 +93,7 @@ type FlagsDescriptor struct { func (m *FlagsDescriptor) Reset() { *m = FlagsDescriptor{} } func (m *FlagsDescriptor) String() string { return proto.CompactTextString(m) } func (*FlagsDescriptor) ProtoMessage() {} -func (*FlagsDescriptor) Descriptor() ([]byte, []int) { return fileDescriptor15, []int{2} } +func (*FlagsDescriptor) Descriptor() ([]byte, []int) { return fileDescriptor16, []int{2} } func (m *FlagsDescriptor) GetVisible() bool { if m != nil { @@ -137,9 +137,9 @@ func init() { proto.RegisterEnum("ProductFlag", ProductFlag_name, ProductFlag_value) } -func init() { proto.RegisterFile("structs/FlagsDescriptor.proto", fileDescriptor15) } +func init() { proto.RegisterFile("structs/FlagsDescriptor.proto", fileDescriptor16) } -var fileDescriptor15 = []byte{ +var fileDescriptor16 = []byte{ // 333 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x91, 0x4f, 0x4f, 0xc2, 0x30, 0x18, 0xc6, 0x2d, 0x7f, 0x64, 0x79, 0x47, 0x70, 0x36, 0x1e, 0x16, 0x13, 0xcd, 0xe4, 0x22, 0xf1, diff --git a/languages/go/structs/Genetics.pb.go b/languages/go/structs/Genetics.pb.go index c130161..8b3b142 100644 --- a/languages/go/structs/Genetics.pb.go +++ b/languages/go/structs/Genetics.pb.go @@ -20,7 +20,7 @@ type Genetics struct { func (m *Genetics) Reset() { *m = Genetics{} } func (m *Genetics) String() string { return proto.CompactTextString(m) } func (*Genetics) ProtoMessage() {} -func (*Genetics) Descriptor() ([]byte, []int) { return fileDescriptor16, []int{0} } +func (*Genetics) Descriptor() ([]byte, []int) { return fileDescriptor17, []int{0} } func (m *Genetics) GetMale() *Name { if m != nil { @@ -40,9 +40,9 @@ func init() { proto.RegisterType((*Genetics)(nil), "Genetics") } -func init() { proto.RegisterFile("structs/Genetics.proto", fileDescriptor16) } +func init() { proto.RegisterFile("structs/Genetics.proto", fileDescriptor17) } -var fileDescriptor16 = []byte{ +var fileDescriptor17 = []byte{ // 156 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x2b, 0x2e, 0x29, 0x2a, 0x4d, 0x2e, 0x29, 0xd6, 0x77, 0x4f, 0xcd, 0x4b, 0x2d, 0xc9, 0x4c, 0x2e, 0xd6, 0x2b, 0x28, 0xca, diff --git a/languages/go/structs/Grow.pb.go b/languages/go/structs/Grow.pb.go index 7102ad6..43e4f59 100644 --- a/languages/go/structs/Grow.pb.go +++ b/languages/go/structs/Grow.pb.go @@ -37,15 +37,15 @@ var Grow_value = map[string]int32{ func (x Grow) String() string { return proto.EnumName(Grow_name, int32(x)) } -func (Grow) EnumDescriptor() ([]byte, []int) { return fileDescriptor17, []int{0} } +func (Grow) EnumDescriptor() ([]byte, []int) { return fileDescriptor18, []int{0} } func init() { proto.RegisterEnum("Grow", Grow_name, Grow_value) } -func init() { proto.RegisterFile("structs/Grow.proto", fileDescriptor17) } +func init() { proto.RegisterFile("structs/Grow.proto", fileDescriptor18) } -var fileDescriptor17 = []byte{ +var fileDescriptor18 = []byte{ // 154 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x2a, 0x2e, 0x29, 0x2a, 0x4d, 0x2e, 0x29, 0xd6, 0x77, 0x2f, 0xca, 0x2f, 0xd7, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0xd7, 0xb2, diff --git a/languages/go/structs/Species.pb.go b/languages/go/structs/Species.pb.go index 6b4fe84..cf45a03 100644 --- a/languages/go/structs/Species.pb.go +++ b/languages/go/structs/Species.pb.go @@ -43,15 +43,15 @@ var Species_value = map[string]int32{ func (x Species) String() string { return proto.EnumName(Species_name, int32(x)) } -func (Species) EnumDescriptor() ([]byte, []int) { return fileDescriptor18, []int{0} } +func (Species) EnumDescriptor() ([]byte, []int) { return fileDescriptor19, []int{0} } func init() { proto.RegisterEnum("Species", Species_name, Species_value) } -func init() { proto.RegisterFile("structs/Species.proto", fileDescriptor18) } +func init() { proto.RegisterFile("structs/Species.proto", fileDescriptor19) } -var fileDescriptor18 = []byte{ +var fileDescriptor19 = []byte{ // 172 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x2d, 0x2e, 0x29, 0x2a, 0x4d, 0x2e, 0x29, 0xd6, 0x0f, 0x2e, 0x48, 0x4d, 0xce, 0x4c, 0x2d, 0xd6, 0x2b, 0x28, 0xca, 0x2f, diff --git a/languages/go/structs/pricing/PricingDescriptor.pb.go b/languages/go/structs/pricing/PricingDescriptor.pb.go index 199d7d3..1c5a056 100644 --- a/languages/go/structs/pricing/PricingDescriptor.pb.go +++ b/languages/go/structs/pricing/PricingDescriptor.pb.go @@ -35,7 +35,7 @@ var PricingType_value = map[string]int32{ func (x PricingType) String() string { return proto.EnumName(PricingType_name, int32(x)) } -func (PricingType) EnumDescriptor() ([]byte, []int) { return fileDescriptor19, []int{0} } +func (PricingType) EnumDescriptor() ([]byte, []int) { return fileDescriptor20, []int{0} } type PricingWeightTier int32 @@ -80,7 +80,7 @@ var PricingWeightTier_value = map[string]int32{ func (x PricingWeightTier) String() string { return proto.EnumName(PricingWeightTier_name, int32(x)) } -func (PricingWeightTier) EnumDescriptor() ([]byte, []int) { return fileDescriptor19, []int{1} } +func (PricingWeightTier) EnumDescriptor() ([]byte, []int) { return fileDescriptor20, []int{1} } type PricingTierAvailability struct { Offered bool `protobuf:"varint,1,opt,name=offered" json:"offered,omitempty"` @@ -90,7 +90,7 @@ type PricingTierAvailability struct { func (m *PricingTierAvailability) Reset() { *m = PricingTierAvailability{} } func (m *PricingTierAvailability) String() string { return proto.CompactTextString(m) } func (*PricingTierAvailability) ProtoMessage() {} -func (*PricingTierAvailability) Descriptor() ([]byte, []int) { return fileDescriptor19, []int{0} } +func (*PricingTierAvailability) Descriptor() ([]byte, []int) { return fileDescriptor20, []int{0} } func (m *PricingTierAvailability) GetOffered() bool { if m != nil { @@ -116,7 +116,7 @@ type UnitPricingDescriptor struct { func (m *UnitPricingDescriptor) Reset() { *m = UnitPricingDescriptor{} } func (m *UnitPricingDescriptor) String() string { return proto.CompactTextString(m) } func (*UnitPricingDescriptor) ProtoMessage() {} -func (*UnitPricingDescriptor) Descriptor() ([]byte, []int) { return fileDescriptor19, []int{1} } +func (*UnitPricingDescriptor) Descriptor() ([]byte, []int) { return fileDescriptor20, []int{1} } func (m *UnitPricingDescriptor) GetPriceValue() float32 { if m != nil { @@ -148,7 +148,7 @@ type WeightedPricingDescriptor struct { func (m *WeightedPricingDescriptor) Reset() { *m = WeightedPricingDescriptor{} } func (m *WeightedPricingDescriptor) String() string { return proto.CompactTextString(m) } func (*WeightedPricingDescriptor) ProtoMessage() {} -func (*WeightedPricingDescriptor) Descriptor() ([]byte, []int) { return fileDescriptor19, []int{2} } +func (*WeightedPricingDescriptor) Descriptor() ([]byte, []int) { return fileDescriptor20, []int{2} } func (m *WeightedPricingDescriptor) GetWeight() PricingWeightTier { if m != nil { @@ -177,7 +177,7 @@ type FreebiePricingDescriptor struct { func (m *FreebiePricingDescriptor) Reset() { *m = FreebiePricingDescriptor{} } func (m *FreebiePricingDescriptor) String() string { return proto.CompactTextString(m) } func (*FreebiePricingDescriptor) ProtoMessage() {} -func (*FreebiePricingDescriptor) Descriptor() ([]byte, []int) { return fileDescriptor19, []int{3} } +func (*FreebiePricingDescriptor) Descriptor() ([]byte, []int) { return fileDescriptor20, []int{3} } // -- Pricing: Main Descriptor type PricingDescriptor struct { @@ -191,7 +191,7 @@ type PricingDescriptor struct { func (m *PricingDescriptor) Reset() { *m = PricingDescriptor{} } func (m *PricingDescriptor) String() string { return proto.CompactTextString(m) } func (*PricingDescriptor) ProtoMessage() {} -func (*PricingDescriptor) Descriptor() ([]byte, []int) { return fileDescriptor19, []int{4} } +func (*PricingDescriptor) Descriptor() ([]byte, []int) { return fileDescriptor20, []int{4} } func (m *PricingDescriptor) GetType() PricingType { if m != nil { @@ -230,7 +230,7 @@ type ProductPricing struct { func (m *ProductPricing) Reset() { *m = ProductPricing{} } func (m *ProductPricing) String() string { return proto.CompactTextString(m) } func (*ProductPricing) ProtoMessage() {} -func (*ProductPricing) Descriptor() ([]byte, []int) { return fileDescriptor19, []int{5} } +func (*ProductPricing) Descriptor() ([]byte, []int) { return fileDescriptor20, []int{5} } func (m *ProductPricing) GetDiscounts() []*SaleDescriptor { if m != nil { @@ -257,9 +257,9 @@ func init() { proto.RegisterEnum("PricingWeightTier", PricingWeightTier_name, PricingWeightTier_value) } -func init() { proto.RegisterFile("structs/pricing/PricingDescriptor.proto", fileDescriptor19) } +func init() { proto.RegisterFile("structs/pricing/PricingDescriptor.proto", fileDescriptor20) } -var fileDescriptor19 = []byte{ +var fileDescriptor20 = []byte{ // 557 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x93, 0xd1, 0x6e, 0xda, 0x30, 0x14, 0x86, 0x1b, 0xa0, 0x10, 0x4e, 0xba, 0xd6, 0xb3, 0xd6, 0x2e, 0xad, 0x26, 0xad, 0x43, 0x95, diff --git a/languages/go/structs/pricing/SaleDescriptor.pb.go b/languages/go/structs/pricing/SaleDescriptor.pb.go index 8fbc791..63278f6 100644 --- a/languages/go/structs/pricing/SaleDescriptor.pb.go +++ b/languages/go/structs/pricing/SaleDescriptor.pb.go @@ -34,7 +34,7 @@ var SaleType_value = map[string]int32{ func (x SaleType) String() string { return proto.EnumName(SaleType_name, int32(x)) } -func (SaleType) EnumDescriptor() ([]byte, []int) { return fileDescriptor20, []int{0} } +func (SaleType) EnumDescriptor() ([]byte, []int) { return fileDescriptor21, []int{0} } type SaleDescriptor struct { // sale metadata @@ -52,7 +52,7 @@ type SaleDescriptor struct { func (m *SaleDescriptor) Reset() { *m = SaleDescriptor{} } func (m *SaleDescriptor) String() string { return proto.CompactTextString(m) } func (*SaleDescriptor) ProtoMessage() {} -func (*SaleDescriptor) Descriptor() ([]byte, []int) { return fileDescriptor20, []int{0} } +func (*SaleDescriptor) Descriptor() ([]byte, []int) { return fileDescriptor21, []int{0} } func (m *SaleDescriptor) GetType() SaleType { if m != nil { @@ -115,9 +115,9 @@ func init() { proto.RegisterEnum("SaleType", SaleType_name, SaleType_value) } -func init() { proto.RegisterFile("structs/pricing/SaleDescriptor.proto", fileDescriptor20) } +func init() { proto.RegisterFile("structs/pricing/SaleDescriptor.proto", fileDescriptor21) } -var fileDescriptor20 = []byte{ +var fileDescriptor21 = []byte{ // 333 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0xd1, 0x4f, 0x4f, 0xfa, 0x30, 0x1c, 0x06, 0xf0, 0x5f, 0xf9, 0x11, 0x85, 0x2f, 0x32, 0x66, 0xe3, 0x9f, 0x1d, 0xfc, 0x03, 0x46, diff --git a/languages/java/io/bloombox/schema/base/Compression.java b/languages/java/io/bloombox/schema/base/Compression.java index db297bf..eda8b63 100644 --- a/languages/java/io/bloombox/schema/base/Compression.java +++ b/languages/java/io/bloombox/schema/base/Compression.java @@ -10,6 +10,7 @@ public final class Compression extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:Compression) CompressionOrBuilder { +private static final long serialVersionUID = 0L; // Use Compression.newBuilder() to construct. private Compression(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -22,7 +23,7 @@ private Compression() { @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + return this.unknownFields; } private Compression( com.google.protobuf.CodedInputStream input, @@ -30,6 +31,8 @@ private Compression( throws com.google.protobuf.InvalidProtocolBufferException { this(); int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { @@ -39,7 +42,8 @@ private Compression( done = true; break; default: { - if (!input.skipField(tag)) { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -63,6 +67,7 @@ private Compression( throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { + this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } @@ -210,6 +215,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (type_ != io.bloombox.schema.base.Compression.Type.GZIP.getNumber()) { output.writeEnum(2, type_); } + unknownFields.writeTo(output); } public int getSerializedSize() { @@ -225,11 +231,11 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeEnumSize(2, type_); } + size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } - private static final long serialVersionUID = 0L; @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { @@ -244,6 +250,7 @@ public boolean equals(final java.lang.Object obj) { result = result && (getEnabled() == other.getEnabled()); result = result && type_ == other.type_; + result = result && unknownFields.equals(other.unknownFields); return result; } @@ -425,7 +432,7 @@ public Builder clone() { } public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { + java.lang.Object value) { return (Builder) super.setField(field, value); } public Builder clearField( @@ -438,12 +445,12 @@ public Builder clearOneof( } public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { + int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { + java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } public Builder mergeFrom(com.google.protobuf.Message other) { @@ -463,6 +470,7 @@ public Builder mergeFrom(io.bloombox.schema.base.Compression other) { if (other.type_ != 0) { setTypeValue(other.getTypeValue()); } + this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @@ -560,12 +568,12 @@ public Builder clearType() { } public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; + return super.setUnknownFieldsProto3(unknownFields); } public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; + return super.mergeUnknownFields(unknownFields); } diff --git a/languages/java/io/bloombox/schema/base/Product.java b/languages/java/io/bloombox/schema/base/Product.java index daea730..064eb54 100644 --- a/languages/java/io/bloombox/schema/base/Product.java +++ b/languages/java/io/bloombox/schema/base/Product.java @@ -14,6 +14,7 @@ public final class Product extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:Product) ProductOrBuilder { +private static final long serialVersionUID = 0L; // Use Product.newBuilder() to construct. private Product(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -24,7 +25,7 @@ private Product() { @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + return this.unknownFields; } private Product( com.google.protobuf.CodedInputStream input, @@ -32,6 +33,8 @@ private Product( throws com.google.protobuf.InvalidProtocolBufferException { this(); int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { @@ -41,7 +44,8 @@ private Product( done = true; break; default: { - if (!input.skipField(tag)) { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -93,6 +97,7 @@ private Product( throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { + this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } @@ -192,6 +197,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (data_ != null) { output.writeMessage(3, getData()); } + unknownFields.writeTo(output); } public int getSerializedSize() { @@ -211,11 +217,11 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, getData()); } + size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } - private static final long serialVersionUID = 0L; @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { @@ -242,6 +248,7 @@ public boolean equals(final java.lang.Object obj) { result = result && getData() .equals(other.getData()); } + result = result && unknownFields.equals(other.unknownFields); return result; } @@ -461,7 +468,7 @@ public Builder clone() { } public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { + java.lang.Object value) { return (Builder) super.setField(field, value); } public Builder clearField( @@ -474,12 +481,12 @@ public Builder clearOneof( } public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { + int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { + java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } public Builder mergeFrom(com.google.protobuf.Message other) { @@ -502,6 +509,7 @@ public Builder mergeFrom(io.bloombox.schema.base.Product other) { if (other.hasData()) { mergeData(other.getData()); } + this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @@ -880,12 +888,12 @@ public com.google.protobuf.AnyOrBuilder getDataOrBuilder() { } public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; + return super.setUnknownFieldsProto3(unknownFields); } public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; + return super.mergeUnknownFields(unknownFields); } diff --git a/languages/java/io/bloombox/schema/base/ProductKey.java b/languages/java/io/bloombox/schema/base/ProductKey.java index 78dcc61..7980407 100644 --- a/languages/java/io/bloombox/schema/base/ProductKey.java +++ b/languages/java/io/bloombox/schema/base/ProductKey.java @@ -10,6 +10,7 @@ public final class ProductKey extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:ProductKey) ProductKeyOrBuilder { +private static final long serialVersionUID = 0L; // Use ProductKey.newBuilder() to construct. private ProductKey(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -21,7 +22,7 @@ private ProductKey() { @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + return this.unknownFields; } private ProductKey( com.google.protobuf.CodedInputStream input, @@ -29,6 +30,8 @@ private ProductKey( throws com.google.protobuf.InvalidProtocolBufferException { this(); int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { @@ -38,7 +41,8 @@ private ProductKey( done = true; break; default: { - if (!input.skipField(tag)) { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -57,6 +61,7 @@ private ProductKey( throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { + this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } @@ -121,6 +126,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (!getIdBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); } + unknownFields.writeTo(output); } public int getSerializedSize() { @@ -131,11 +137,11 @@ public int getSerializedSize() { if (!getIdBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); } + size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } - private static final long serialVersionUID = 0L; @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { @@ -149,6 +155,7 @@ public boolean equals(final java.lang.Object obj) { boolean result = true; result = result && getId() .equals(other.getId()); + result = result && unknownFields.equals(other.unknownFields); return result; } @@ -324,7 +331,7 @@ public Builder clone() { } public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { + java.lang.Object value) { return (Builder) super.setField(field, value); } public Builder clearField( @@ -337,12 +344,12 @@ public Builder clearOneof( } public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { + int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { + java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } public Builder mergeFrom(com.google.protobuf.Message other) { @@ -360,6 +367,7 @@ public Builder mergeFrom(io.bloombox.schema.base.ProductKey other) { id_ = other.id_; onChanged(); } + this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @@ -456,12 +464,12 @@ public Builder setIdBytes( } public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; + return super.setUnknownFieldsProto3(unknownFields); } public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; + return super.mergeUnknownFields(unknownFields); } diff --git a/languages/java/io/bloombox/schema/base/ProductType.java b/languages/java/io/bloombox/schema/base/ProductType.java index 967a227..79bf382 100644 --- a/languages/java/io/bloombox/schema/base/ProductType.java +++ b/languages/java/io/bloombox/schema/base/ProductType.java @@ -14,6 +14,7 @@ public final class ProductType extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:ProductType) ProductTypeOrBuilder { +private static final long serialVersionUID = 0L; // Use ProductType.newBuilder() to construct. private ProductType(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -25,7 +26,7 @@ private ProductType() { @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + return this.unknownFields; } private ProductType( com.google.protobuf.CodedInputStream input, @@ -33,6 +34,8 @@ private ProductType( throws com.google.protobuf.InvalidProtocolBufferException { this(); int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { @@ -42,7 +45,8 @@ private ProductType( done = true; break; default: { - if (!input.skipField(tag)) { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -61,6 +65,7 @@ private ProductType( throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { + this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } @@ -107,6 +112,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (kind_ != io.bloombox.schema.base.ProductKind.FLOWERS.getNumber()) { output.writeEnum(1, kind_); } + unknownFields.writeTo(output); } public int getSerializedSize() { @@ -118,11 +124,11 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeEnumSize(1, kind_); } + size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } - private static final long serialVersionUID = 0L; @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { @@ -135,6 +141,7 @@ public boolean equals(final java.lang.Object obj) { boolean result = true; result = result && kind_ == other.kind_; + result = result && unknownFields.equals(other.unknownFields); return result; } @@ -314,7 +321,7 @@ public Builder clone() { } public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { + java.lang.Object value) { return (Builder) super.setField(field, value); } public Builder clearField( @@ -327,12 +334,12 @@ public Builder clearOneof( } public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { + int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { + java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } public Builder mergeFrom(com.google.protobuf.Message other) { @@ -349,6 +356,7 @@ public Builder mergeFrom(io.bloombox.schema.base.ProductType other) { if (other.kind_ != 0) { setKindValue(other.getKindValue()); } + this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @@ -420,12 +428,12 @@ public Builder clearKind() { } public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; + return super.setUnknownFieldsProto3(unknownFields); } public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; + return super.mergeUnknownFields(unknownFields); } diff --git a/languages/java/io/bloombox/schema/content/Brand.java b/languages/java/io/bloombox/schema/content/Brand.java index 2369329..087705c 100644 --- a/languages/java/io/bloombox/schema/content/Brand.java +++ b/languages/java/io/bloombox/schema/content/Brand.java @@ -10,6 +10,7 @@ public final class Brand extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:Brand) BrandOrBuilder { +private static final long serialVersionUID = 0L; // Use Brand.newBuilder() to construct. private Brand(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -21,7 +22,7 @@ private Brand() { @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + return this.unknownFields; } private Brand( com.google.protobuf.CodedInputStream input, @@ -29,6 +30,8 @@ private Brand( throws com.google.protobuf.InvalidProtocolBufferException { this(); int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { @@ -38,7 +41,8 @@ private Brand( done = true; break; default: { - if (!input.skipField(tag)) { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -102,6 +106,7 @@ private Brand( if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) { media_ = java.util.Collections.unmodifiableList(media_); } + this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } @@ -272,6 +277,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) for (int i = 0; i < media_.size(); i++) { output.writeMessage(20, media_.get(i)); } + unknownFields.writeTo(output); } public int getSerializedSize() { @@ -295,11 +301,11 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(20, media_.get(i)); } + size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } - private static final long serialVersionUID = 0L; @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { @@ -328,6 +334,7 @@ public boolean equals(final java.lang.Object obj) { } result = result && getMediaList() .equals(other.getMediaList()); + result = result && unknownFields.equals(other.unknownFields); return result; } @@ -566,7 +573,7 @@ public Builder clone() { } public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { + java.lang.Object value) { return (Builder) super.setField(field, value); } public Builder clearField( @@ -579,12 +586,12 @@ public Builder clearOneof( } public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { + int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { + java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } public Builder mergeFrom(com.google.protobuf.Message other) { @@ -633,6 +640,7 @@ public Builder mergeFrom(io.bloombox.schema.content.Brand other) { } } } + this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @@ -1360,12 +1368,12 @@ public io.bloombox.schema.media.MediaItem.Builder addMediaBuilder( } public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; + return super.setUnknownFieldsProto3(unknownFields); } public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; + return super.mergeUnknownFields(unknownFields); } diff --git a/languages/java/io/bloombox/schema/content/Content.java b/languages/java/io/bloombox/schema/content/Content.java index 3ae562a..f3d3f7a 100644 --- a/languages/java/io/bloombox/schema/content/Content.java +++ b/languages/java/io/bloombox/schema/content/Content.java @@ -10,6 +10,7 @@ public final class Content extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:Content) ContentOrBuilder { +private static final long serialVersionUID = 0L; // Use Content.newBuilder() to construct. private Content(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -24,7 +25,7 @@ private Content() { @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + return this.unknownFields; } private Content( com.google.protobuf.CodedInputStream input, @@ -32,6 +33,8 @@ private Content( throws com.google.protobuf.InvalidProtocolBufferException { this(); int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { @@ -41,7 +44,8 @@ private Content( done = true; break; default: { - if (!input.skipField(tag)) { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -90,6 +94,7 @@ private Content( throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { + this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } @@ -406,6 +411,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (compression_ != null) { output.writeMessage(5, getCompression()); } + unknownFields.writeTo(output); } public int getSerializedSize() { @@ -433,11 +439,11 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(5, getCompression()); } + size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } - private static final long serialVersionUID = 0L; @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { @@ -459,6 +465,7 @@ public boolean equals(final java.lang.Object obj) { result = result && getCompression() .equals(other.getCompression()); } + result = result && unknownFields.equals(other.unknownFields); return result; } @@ -664,7 +671,7 @@ public Builder clone() { } public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { + java.lang.Object value) { return (Builder) super.setField(field, value); } public Builder clearField( @@ -677,12 +684,12 @@ public Builder clearOneof( } public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { + int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { + java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } public Builder mergeFrom(com.google.protobuf.Message other) { @@ -711,6 +718,7 @@ public Builder mergeFrom(io.bloombox.schema.content.Content other) { if (other.hasCompression()) { mergeCompression(other.getCompression()); } + this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @@ -1016,12 +1024,12 @@ public io.bloombox.schema.base.CompressionOrBuilder getCompressionOrBuilder() { } public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; + return super.setUnknownFieldsProto3(unknownFields); } public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; + return super.mergeUnknownFields(unknownFields); } diff --git a/languages/java/io/bloombox/schema/content/MaterialsData.java b/languages/java/io/bloombox/schema/content/MaterialsData.java index 5c06eea..4cbc933 100644 --- a/languages/java/io/bloombox/schema/content/MaterialsData.java +++ b/languages/java/io/bloombox/schema/content/MaterialsData.java @@ -10,6 +10,7 @@ public final class MaterialsData extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:MaterialsData) MaterialsDataOrBuilder { +private static final long serialVersionUID = 0L; // Use MaterialsData.newBuilder() to construct. private MaterialsData(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -23,7 +24,7 @@ private MaterialsData() { @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + return this.unknownFields; } private MaterialsData( com.google.protobuf.CodedInputStream input, @@ -31,6 +32,8 @@ private MaterialsData( throws com.google.protobuf.InvalidProtocolBufferException { this(); int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { @@ -40,7 +43,8 @@ private MaterialsData( done = true; break; default: { - if (!input.skipField(tag)) { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -90,6 +94,7 @@ private MaterialsData( if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { ingredients_ = ingredients_.getUnmodifiableView(); } + this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } @@ -212,6 +217,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (genetics_ != null) { output.writeMessage(4, getGenetics()); } + unknownFields.writeTo(output); } public int getSerializedSize() { @@ -239,11 +245,11 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(4, getGenetics()); } + size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } - private static final long serialVersionUID = 0L; @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { @@ -264,6 +270,7 @@ public boolean equals(final java.lang.Object obj) { result = result && getGenetics() .equals(other.getGenetics()); } + result = result && unknownFields.equals(other.unknownFields); return result; } @@ -473,7 +480,7 @@ public Builder clone() { } public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { + java.lang.Object value) { return (Builder) super.setField(field, value); } public Builder clearField( @@ -486,12 +493,12 @@ public Builder clearOneof( } public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { + int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { + java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } public Builder mergeFrom(com.google.protobuf.Message other) { @@ -524,6 +531,7 @@ public Builder mergeFrom(io.bloombox.schema.content.MaterialsData other) { if (other.hasGenetics()) { mergeGenetics(other.getGenetics()); } + this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @@ -851,12 +859,12 @@ public io.bloombox.schema.product.struct.GeneticsOrBuilder getGeneticsOrBuilder( } public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; + return super.setUnknownFieldsProto3(unknownFields); } public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; + return super.mergeUnknownFields(unknownFields); } diff --git a/languages/java/io/bloombox/schema/content/Name.java b/languages/java/io/bloombox/schema/content/Name.java index 37df7c1..b514347 100644 --- a/languages/java/io/bloombox/schema/content/Name.java +++ b/languages/java/io/bloombox/schema/content/Name.java @@ -10,6 +10,7 @@ public final class Name extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:Name) NameOrBuilder { +private static final long serialVersionUID = 0L; // Use Name.newBuilder() to construct. private Name(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -22,7 +23,7 @@ private Name() { @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + return this.unknownFields; } private Name( com.google.protobuf.CodedInputStream input, @@ -30,6 +31,8 @@ private Name( throws com.google.protobuf.InvalidProtocolBufferException { this(); int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { @@ -39,7 +42,8 @@ private Name( done = true; break; default: { - if (!input.skipField(tag)) { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -64,6 +68,7 @@ private Name( throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { + this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } @@ -181,6 +186,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (!getDisplayBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, display_); } + unknownFields.writeTo(output); } public int getSerializedSize() { @@ -194,11 +200,11 @@ public int getSerializedSize() { if (!getDisplayBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, display_); } + size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } - private static final long serialVersionUID = 0L; @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { @@ -214,6 +220,7 @@ public boolean equals(final java.lang.Object obj) { .equals(other.getPrimary()); result = result && getDisplay() .equals(other.getDisplay()); + result = result && unknownFields.equals(other.unknownFields); return result; } @@ -394,7 +401,7 @@ public Builder clone() { } public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { + java.lang.Object value) { return (Builder) super.setField(field, value); } public Builder clearField( @@ -407,12 +414,12 @@ public Builder clearOneof( } public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { + int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { + java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } public Builder mergeFrom(com.google.protobuf.Message other) { @@ -434,6 +441,7 @@ public Builder mergeFrom(io.bloombox.schema.content.Name other) { display_ = other.display_; onChanged(); } + this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @@ -639,12 +647,12 @@ public Builder setDisplayBytes( } public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; + return super.setUnknownFieldsProto3(unknownFields); } public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; + return super.mergeUnknownFields(unknownFields); } diff --git a/languages/java/io/bloombox/schema/content/ProductContent.java b/languages/java/io/bloombox/schema/content/ProductContent.java index b653bc6..fad9b1a 100644 --- a/languages/java/io/bloombox/schema/content/ProductContent.java +++ b/languages/java/io/bloombox/schema/content/ProductContent.java @@ -10,6 +10,7 @@ public final class ProductContent extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:ProductContent) ProductContentOrBuilder { +private static final long serialVersionUID = 0L; // Use ProductContent.newBuilder() to construct. private ProductContent(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -21,7 +22,7 @@ private ProductContent() { @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + return this.unknownFields; } private ProductContent( com.google.protobuf.CodedInputStream input, @@ -29,6 +30,8 @@ private ProductContent( throws com.google.protobuf.InvalidProtocolBufferException { this(); int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { @@ -38,7 +41,8 @@ private ProductContent( done = true; break; default: { - if (!input.skipField(tag)) { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -141,6 +145,7 @@ private ProductContent( if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) { media_ = java.util.Collections.unmodifiableList(media_); } + this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } @@ -443,6 +448,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (advice_ != null) { output.writeMessage(32, getAdvice()); } + unknownFields.writeTo(output); } public int getSerializedSize() { @@ -478,11 +484,11 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(32, getAdvice()); } + size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } - private static final long serialVersionUID = 0L; @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { @@ -526,6 +532,7 @@ public boolean equals(final java.lang.Object obj) { result = result && getAdvice() .equals(other.getAdvice()); } + result = result && unknownFields.equals(other.unknownFields); return result; } @@ -809,7 +816,7 @@ public Builder clone() { } public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { + java.lang.Object value) { return (Builder) super.setField(field, value); } public Builder clearField( @@ -822,12 +829,12 @@ public Builder clearOneof( } public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { + int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { + java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } public Builder mergeFrom(com.google.protobuf.Message other) { @@ -885,6 +892,7 @@ public Builder mergeFrom(io.bloombox.schema.content.ProductContent other) { if (other.hasAdvice()) { mergeAdvice(other.getAdvice()); } + this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @@ -2143,12 +2151,12 @@ public io.bloombox.schema.content.ContentOrBuilder getAdviceOrBuilder() { } public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; + return super.setUnknownFieldsProto3(unknownFields); } public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; + return super.mergeUnknownFields(unknownFields); } diff --git a/languages/java/io/bloombox/schema/geo/Address.java b/languages/java/io/bloombox/schema/geo/Address.java new file mode 100644 index 0000000..32ba133 --- /dev/null +++ b/languages/java/io/bloombox/schema/geo/Address.java @@ -0,0 +1,1148 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: geo/Address.proto + +package io.bloombox.schema.geo; + +/** + * Protobuf type {@code Address} + */ +public final class Address extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:Address) + AddressOrBuilder { +private static final long serialVersionUID = 0L; + // Use Address.newBuilder() to construct. + private Address(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Address() { + firstLine_ = ""; + secondLine_ = ""; + city_ = ""; + state_ = ""; + zipcode_ = ""; + country_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Address( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + firstLine_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + secondLine_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + city_ = s; + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + state_ = s; + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + + zipcode_ = s; + break; + } + case 50: { + java.lang.String s = input.readStringRequireUtf8(); + + country_ = s; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.bloombox.schema.geo.AddressOuterClass.internal_static_Address_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.bloombox.schema.geo.AddressOuterClass.internal_static_Address_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.bloombox.schema.geo.Address.class, io.bloombox.schema.geo.Address.Builder.class); + } + + public static final int FIRST_LINE_FIELD_NUMBER = 1; + private volatile java.lang.Object firstLine_; + /** + * string first_line = 1; + */ + public java.lang.String getFirstLine() { + java.lang.Object ref = firstLine_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + firstLine_ = s; + return s; + } + } + /** + * string first_line = 1; + */ + public com.google.protobuf.ByteString + getFirstLineBytes() { + java.lang.Object ref = firstLine_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + firstLine_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SECOND_LINE_FIELD_NUMBER = 2; + private volatile java.lang.Object secondLine_; + /** + * string second_line = 2; + */ + public java.lang.String getSecondLine() { + java.lang.Object ref = secondLine_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + secondLine_ = s; + return s; + } + } + /** + * string second_line = 2; + */ + public com.google.protobuf.ByteString + getSecondLineBytes() { + java.lang.Object ref = secondLine_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + secondLine_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CITY_FIELD_NUMBER = 3; + private volatile java.lang.Object city_; + /** + * string city = 3; + */ + public java.lang.String getCity() { + java.lang.Object ref = city_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + city_ = s; + return s; + } + } + /** + * string city = 3; + */ + public com.google.protobuf.ByteString + getCityBytes() { + java.lang.Object ref = city_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + city_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATE_FIELD_NUMBER = 4; + private volatile java.lang.Object state_; + /** + * string state = 4; + */ + public java.lang.String getState() { + java.lang.Object ref = state_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + state_ = s; + return s; + } + } + /** + * string state = 4; + */ + public com.google.protobuf.ByteString + getStateBytes() { + java.lang.Object ref = state_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + state_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ZIPCODE_FIELD_NUMBER = 5; + private volatile java.lang.Object zipcode_; + /** + * string zipcode = 5; + */ + public java.lang.String getZipcode() { + java.lang.Object ref = zipcode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + zipcode_ = s; + return s; + } + } + /** + * string zipcode = 5; + */ + public com.google.protobuf.ByteString + getZipcodeBytes() { + java.lang.Object ref = zipcode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + zipcode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int COUNTRY_FIELD_NUMBER = 6; + private volatile java.lang.Object country_; + /** + * string country = 6; + */ + public java.lang.String getCountry() { + java.lang.Object ref = country_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + country_ = s; + return s; + } + } + /** + * string country = 6; + */ + public com.google.protobuf.ByteString + getCountryBytes() { + java.lang.Object ref = country_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + country_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getFirstLineBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, firstLine_); + } + if (!getSecondLineBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, secondLine_); + } + if (!getCityBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, city_); + } + if (!getStateBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, state_); + } + if (!getZipcodeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, zipcode_); + } + if (!getCountryBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, country_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getFirstLineBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, firstLine_); + } + if (!getSecondLineBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, secondLine_); + } + if (!getCityBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, city_); + } + if (!getStateBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, state_); + } + if (!getZipcodeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, zipcode_); + } + if (!getCountryBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, country_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.bloombox.schema.geo.Address)) { + return super.equals(obj); + } + io.bloombox.schema.geo.Address other = (io.bloombox.schema.geo.Address) obj; + + boolean result = true; + result = result && getFirstLine() + .equals(other.getFirstLine()); + result = result && getSecondLine() + .equals(other.getSecondLine()); + result = result && getCity() + .equals(other.getCity()); + result = result && getState() + .equals(other.getState()); + result = result && getZipcode() + .equals(other.getZipcode()); + result = result && getCountry() + .equals(other.getCountry()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + FIRST_LINE_FIELD_NUMBER; + hash = (53 * hash) + getFirstLine().hashCode(); + hash = (37 * hash) + SECOND_LINE_FIELD_NUMBER; + hash = (53 * hash) + getSecondLine().hashCode(); + hash = (37 * hash) + CITY_FIELD_NUMBER; + hash = (53 * hash) + getCity().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + getState().hashCode(); + hash = (37 * hash) + ZIPCODE_FIELD_NUMBER; + hash = (53 * hash) + getZipcode().hashCode(); + hash = (37 * hash) + COUNTRY_FIELD_NUMBER; + hash = (53 * hash) + getCountry().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.bloombox.schema.geo.Address parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.bloombox.schema.geo.Address parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.bloombox.schema.geo.Address parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.bloombox.schema.geo.Address parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.bloombox.schema.geo.Address parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.bloombox.schema.geo.Address parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.bloombox.schema.geo.Address parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.bloombox.schema.geo.Address parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.bloombox.schema.geo.Address parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.bloombox.schema.geo.Address parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.bloombox.schema.geo.Address parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.bloombox.schema.geo.Address parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.bloombox.schema.geo.Address prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code Address} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:Address) + io.bloombox.schema.geo.AddressOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.bloombox.schema.geo.AddressOuterClass.internal_static_Address_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.bloombox.schema.geo.AddressOuterClass.internal_static_Address_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.bloombox.schema.geo.Address.class, io.bloombox.schema.geo.Address.Builder.class); + } + + // Construct using io.bloombox.schema.geo.Address.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + firstLine_ = ""; + + secondLine_ = ""; + + city_ = ""; + + state_ = ""; + + zipcode_ = ""; + + country_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.bloombox.schema.geo.AddressOuterClass.internal_static_Address_descriptor; + } + + public io.bloombox.schema.geo.Address getDefaultInstanceForType() { + return io.bloombox.schema.geo.Address.getDefaultInstance(); + } + + public io.bloombox.schema.geo.Address build() { + io.bloombox.schema.geo.Address result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public io.bloombox.schema.geo.Address buildPartial() { + io.bloombox.schema.geo.Address result = new io.bloombox.schema.geo.Address(this); + result.firstLine_ = firstLine_; + result.secondLine_ = secondLine_; + result.city_ = city_; + result.state_ = state_; + result.zipcode_ = zipcode_; + result.country_ = country_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.bloombox.schema.geo.Address) { + return mergeFrom((io.bloombox.schema.geo.Address)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.bloombox.schema.geo.Address other) { + if (other == io.bloombox.schema.geo.Address.getDefaultInstance()) return this; + if (!other.getFirstLine().isEmpty()) { + firstLine_ = other.firstLine_; + onChanged(); + } + if (!other.getSecondLine().isEmpty()) { + secondLine_ = other.secondLine_; + onChanged(); + } + if (!other.getCity().isEmpty()) { + city_ = other.city_; + onChanged(); + } + if (!other.getState().isEmpty()) { + state_ = other.state_; + onChanged(); + } + if (!other.getZipcode().isEmpty()) { + zipcode_ = other.zipcode_; + onChanged(); + } + if (!other.getCountry().isEmpty()) { + country_ = other.country_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + io.bloombox.schema.geo.Address parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (io.bloombox.schema.geo.Address) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object firstLine_ = ""; + /** + * string first_line = 1; + */ + public java.lang.String getFirstLine() { + java.lang.Object ref = firstLine_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + firstLine_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string first_line = 1; + */ + public com.google.protobuf.ByteString + getFirstLineBytes() { + java.lang.Object ref = firstLine_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + firstLine_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string first_line = 1; + */ + public Builder setFirstLine( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + firstLine_ = value; + onChanged(); + return this; + } + /** + * string first_line = 1; + */ + public Builder clearFirstLine() { + + firstLine_ = getDefaultInstance().getFirstLine(); + onChanged(); + return this; + } + /** + * string first_line = 1; + */ + public Builder setFirstLineBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + firstLine_ = value; + onChanged(); + return this; + } + + private java.lang.Object secondLine_ = ""; + /** + * string second_line = 2; + */ + public java.lang.String getSecondLine() { + java.lang.Object ref = secondLine_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + secondLine_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string second_line = 2; + */ + public com.google.protobuf.ByteString + getSecondLineBytes() { + java.lang.Object ref = secondLine_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + secondLine_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string second_line = 2; + */ + public Builder setSecondLine( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + secondLine_ = value; + onChanged(); + return this; + } + /** + * string second_line = 2; + */ + public Builder clearSecondLine() { + + secondLine_ = getDefaultInstance().getSecondLine(); + onChanged(); + return this; + } + /** + * string second_line = 2; + */ + public Builder setSecondLineBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + secondLine_ = value; + onChanged(); + return this; + } + + private java.lang.Object city_ = ""; + /** + * string city = 3; + */ + public java.lang.String getCity() { + java.lang.Object ref = city_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + city_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string city = 3; + */ + public com.google.protobuf.ByteString + getCityBytes() { + java.lang.Object ref = city_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + city_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string city = 3; + */ + public Builder setCity( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + city_ = value; + onChanged(); + return this; + } + /** + * string city = 3; + */ + public Builder clearCity() { + + city_ = getDefaultInstance().getCity(); + onChanged(); + return this; + } + /** + * string city = 3; + */ + public Builder setCityBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + city_ = value; + onChanged(); + return this; + } + + private java.lang.Object state_ = ""; + /** + * string state = 4; + */ + public java.lang.String getState() { + java.lang.Object ref = state_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + state_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string state = 4; + */ + public com.google.protobuf.ByteString + getStateBytes() { + java.lang.Object ref = state_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + state_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string state = 4; + */ + public Builder setState( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + state_ = value; + onChanged(); + return this; + } + /** + * string state = 4; + */ + public Builder clearState() { + + state_ = getDefaultInstance().getState(); + onChanged(); + return this; + } + /** + * string state = 4; + */ + public Builder setStateBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + state_ = value; + onChanged(); + return this; + } + + private java.lang.Object zipcode_ = ""; + /** + * string zipcode = 5; + */ + public java.lang.String getZipcode() { + java.lang.Object ref = zipcode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + zipcode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string zipcode = 5; + */ + public com.google.protobuf.ByteString + getZipcodeBytes() { + java.lang.Object ref = zipcode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + zipcode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string zipcode = 5; + */ + public Builder setZipcode( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + zipcode_ = value; + onChanged(); + return this; + } + /** + * string zipcode = 5; + */ + public Builder clearZipcode() { + + zipcode_ = getDefaultInstance().getZipcode(); + onChanged(); + return this; + } + /** + * string zipcode = 5; + */ + public Builder setZipcodeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + zipcode_ = value; + onChanged(); + return this; + } + + private java.lang.Object country_ = ""; + /** + * string country = 6; + */ + public java.lang.String getCountry() { + java.lang.Object ref = country_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + country_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string country = 6; + */ + public com.google.protobuf.ByteString + getCountryBytes() { + java.lang.Object ref = country_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + country_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string country = 6; + */ + public Builder setCountry( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + country_ = value; + onChanged(); + return this; + } + /** + * string country = 6; + */ + public Builder clearCountry() { + + country_ = getDefaultInstance().getCountry(); + onChanged(); + return this; + } + /** + * string country = 6; + */ + public Builder setCountryBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + country_ = value; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:Address) + } + + // @@protoc_insertion_point(class_scope:Address) + private static final io.bloombox.schema.geo.Address DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.bloombox.schema.geo.Address(); + } + + public static io.bloombox.schema.geo.Address getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser
+ PARSER = new com.google.protobuf.AbstractParser
() { + public Address parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Address(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser
parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser
getParserForType() { + return PARSER; + } + + public io.bloombox.schema.geo.Address getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/languages/java/io/bloombox/schema/geo/AddressOrBuilder.java b/languages/java/io/bloombox/schema/geo/AddressOrBuilder.java new file mode 100644 index 0000000..bea504e --- /dev/null +++ b/languages/java/io/bloombox/schema/geo/AddressOrBuilder.java @@ -0,0 +1,69 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: geo/Address.proto + +package io.bloombox.schema.geo; + +public interface AddressOrBuilder extends + // @@protoc_insertion_point(interface_extends:Address) + com.google.protobuf.MessageOrBuilder { + + /** + * string first_line = 1; + */ + java.lang.String getFirstLine(); + /** + * string first_line = 1; + */ + com.google.protobuf.ByteString + getFirstLineBytes(); + + /** + * string second_line = 2; + */ + java.lang.String getSecondLine(); + /** + * string second_line = 2; + */ + com.google.protobuf.ByteString + getSecondLineBytes(); + + /** + * string city = 3; + */ + java.lang.String getCity(); + /** + * string city = 3; + */ + com.google.protobuf.ByteString + getCityBytes(); + + /** + * string state = 4; + */ + java.lang.String getState(); + /** + * string state = 4; + */ + com.google.protobuf.ByteString + getStateBytes(); + + /** + * string zipcode = 5; + */ + java.lang.String getZipcode(); + /** + * string zipcode = 5; + */ + com.google.protobuf.ByteString + getZipcodeBytes(); + + /** + * string country = 6; + */ + java.lang.String getCountry(); + /** + * string country = 6; + */ + com.google.protobuf.ByteString + getCountryBytes(); +} diff --git a/languages/java/io/bloombox/schema/geo/AddressOuterClass.java b/languages/java/io/bloombox/schema/geo/AddressOuterClass.java new file mode 100644 index 0000000..e21fe55 --- /dev/null +++ b/languages/java/io/bloombox/schema/geo/AddressOuterClass.java @@ -0,0 +1,58 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: geo/Address.proto + +package io.bloombox.schema.geo; + +public final class AddressOuterClass { + private AddressOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_Address_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_Address_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\021geo/Address.proto\"q\n\007Address\022\022\n\nfirst_" + + "line\030\001 \001(\t\022\023\n\013second_line\030\002 \001(\t\022\014\n\004city\030" + + "\003 \001(\t\022\r\n\005state\030\004 \001(\t\022\017\n\007zipcode\030\005 \001(\t\022\017\n" + + "\007country\030\006 \001(\tB\034\n\026io.bloombox.schema.geo" + + "H\001P\001b\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); + internal_static_Address_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_Address_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_Address_descriptor, + new java.lang.String[] { "FirstLine", "SecondLine", "City", "State", "Zipcode", "Country", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/languages/java/io/bloombox/schema/media/DocumentType.java b/languages/java/io/bloombox/schema/media/DocumentType.java index e820e9a..1214760 100644 --- a/languages/java/io/bloombox/schema/media/DocumentType.java +++ b/languages/java/io/bloombox/schema/media/DocumentType.java @@ -14,6 +14,7 @@ public final class DocumentType extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:DocumentType) DocumentTypeOrBuilder { +private static final long serialVersionUID = 0L; // Use DocumentType.newBuilder() to construct. private DocumentType(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -26,7 +27,7 @@ private DocumentType() { @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + return this.unknownFields; } private DocumentType( com.google.protobuf.CodedInputStream input, @@ -34,6 +35,8 @@ private DocumentType( throws com.google.protobuf.InvalidProtocolBufferException { this(); int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { @@ -43,7 +46,8 @@ private DocumentType( done = true; break; default: { - if (!input.skipField(tag)) { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -67,6 +71,7 @@ private DocumentType( throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { + this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } @@ -241,6 +246,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (compressed_ != false) { output.writeBool(2, compressed_); } + unknownFields.writeTo(output); } public int getSerializedSize() { @@ -256,11 +262,11 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeBoolSize(2, compressed_); } + size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } - private static final long serialVersionUID = 0L; @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { @@ -275,6 +281,7 @@ public boolean equals(final java.lang.Object obj) { result = result && kind_ == other.kind_; result = result && (getCompressed() == other.getCompressed()); + result = result && unknownFields.equals(other.unknownFields); return result; } @@ -460,7 +467,7 @@ public Builder clone() { } public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { + java.lang.Object value) { return (Builder) super.setField(field, value); } public Builder clearField( @@ -473,12 +480,12 @@ public Builder clearOneof( } public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { + int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { + java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } public Builder mergeFrom(com.google.protobuf.Message other) { @@ -498,6 +505,7 @@ public Builder mergeFrom(io.bloombox.schema.media.DocumentType other) { if (other.getCompressed() != false) { setCompressed(other.getCompressed()); } + this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @@ -595,12 +603,12 @@ public Builder clearCompressed() { } public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; + return super.setUnknownFieldsProto3(unknownFields); } public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; + return super.mergeUnknownFields(unknownFields); } diff --git a/languages/java/io/bloombox/schema/media/ImageType.java b/languages/java/io/bloombox/schema/media/ImageType.java index 9fe18aa..7ed0ddc 100644 --- a/languages/java/io/bloombox/schema/media/ImageType.java +++ b/languages/java/io/bloombox/schema/media/ImageType.java @@ -14,6 +14,7 @@ public final class ImageType extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:ImageType) ImageTypeOrBuilder { +private static final long serialVersionUID = 0L; // Use ImageType.newBuilder() to construct. private ImageType(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -25,7 +26,7 @@ private ImageType() { @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + return this.unknownFields; } private ImageType( com.google.protobuf.CodedInputStream input, @@ -33,6 +34,8 @@ private ImageType( throws com.google.protobuf.InvalidProtocolBufferException { this(); int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { @@ -42,7 +45,8 @@ private ImageType( done = true; break; default: { - if (!input.skipField(tag)) { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -61,6 +65,7 @@ private ImageType( throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { + this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } @@ -232,6 +237,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (kind_ != io.bloombox.schema.media.ImageType.ImageKind.PNG.getNumber()) { output.writeEnum(1, kind_); } + unknownFields.writeTo(output); } public int getSerializedSize() { @@ -243,11 +249,11 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeEnumSize(1, kind_); } + size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } - private static final long serialVersionUID = 0L; @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { @@ -260,6 +266,7 @@ public boolean equals(final java.lang.Object obj) { boolean result = true; result = result && kind_ == other.kind_; + result = result && unknownFields.equals(other.unknownFields); return result; } @@ -439,7 +446,7 @@ public Builder clone() { } public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { + java.lang.Object value) { return (Builder) super.setField(field, value); } public Builder clearField( @@ -452,12 +459,12 @@ public Builder clearOneof( } public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { + int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { + java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } public Builder mergeFrom(com.google.protobuf.Message other) { @@ -474,6 +481,7 @@ public Builder mergeFrom(io.bloombox.schema.media.ImageType other) { if (other.kind_ != 0) { setKindValue(other.getKindValue()); } + this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @@ -545,12 +553,12 @@ public Builder clearKind() { } public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; + return super.setUnknownFieldsProto3(unknownFields); } public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; + return super.mergeUnknownFields(unknownFields); } diff --git a/languages/java/io/bloombox/schema/media/MediaItem.java b/languages/java/io/bloombox/schema/media/MediaItem.java index b259af4..13e128d 100644 --- a/languages/java/io/bloombox/schema/media/MediaItem.java +++ b/languages/java/io/bloombox/schema/media/MediaItem.java @@ -10,6 +10,7 @@ public final class MediaItem extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:MediaItem) MediaItemOrBuilder { +private static final long serialVersionUID = 0L; // Use MediaItem.newBuilder() to construct. private MediaItem(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -21,7 +22,7 @@ private MediaItem() { @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + return this.unknownFields; } private MediaItem( com.google.protobuf.CodedInputStream input, @@ -29,6 +30,8 @@ private MediaItem( throws com.google.protobuf.InvalidProtocolBufferException { this(); int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { @@ -38,7 +41,8 @@ private MediaItem( done = true; break; default: { - if (!input.skipField(tag)) { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -83,6 +87,7 @@ private MediaItem( throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { + this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } @@ -195,6 +200,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (!getNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, name_); } + unknownFields.writeTo(output); } public int getSerializedSize() { @@ -213,11 +219,11 @@ public int getSerializedSize() { if (!getNameBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, name_); } + size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } - private static final long serialVersionUID = 0L; @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { @@ -241,6 +247,7 @@ public boolean equals(final java.lang.Object obj) { } result = result && getName() .equals(other.getName()); + result = result && unknownFields.equals(other.unknownFields); return result; } @@ -446,7 +453,7 @@ public Builder clone() { } public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { + java.lang.Object value) { return (Builder) super.setField(field, value); } public Builder clearField( @@ -459,12 +466,12 @@ public Builder clearOneof( } public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { + int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { + java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } public Builder mergeFrom(com.google.protobuf.Message other) { @@ -488,6 +495,7 @@ public Builder mergeFrom(io.bloombox.schema.media.MediaItem other) { name_ = other.name_; onChanged(); } + this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @@ -818,12 +826,12 @@ public Builder setNameBytes( } public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; + return super.setUnknownFieldsProto3(unknownFields); } public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; + return super.mergeUnknownFields(unknownFields); } diff --git a/languages/java/io/bloombox/schema/media/MediaKey.java b/languages/java/io/bloombox/schema/media/MediaKey.java index b233f3f..c28a3af 100644 --- a/languages/java/io/bloombox/schema/media/MediaKey.java +++ b/languages/java/io/bloombox/schema/media/MediaKey.java @@ -10,6 +10,7 @@ public final class MediaKey extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:MediaKey) MediaKeyOrBuilder { +private static final long serialVersionUID = 0L; // Use MediaKey.newBuilder() to construct. private MediaKey(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -21,7 +22,7 @@ private MediaKey() { @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + return this.unknownFields; } private MediaKey( com.google.protobuf.CodedInputStream input, @@ -29,6 +30,8 @@ private MediaKey( throws com.google.protobuf.InvalidProtocolBufferException { this(); int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { @@ -38,7 +41,8 @@ private MediaKey( done = true; break; default: { - if (!input.skipField(tag)) { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -57,6 +61,7 @@ private MediaKey( throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { + this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } @@ -121,6 +126,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (!getIdBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); } + unknownFields.writeTo(output); } public int getSerializedSize() { @@ -131,11 +137,11 @@ public int getSerializedSize() { if (!getIdBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); } + size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } - private static final long serialVersionUID = 0L; @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { @@ -149,6 +155,7 @@ public boolean equals(final java.lang.Object obj) { boolean result = true; result = result && getId() .equals(other.getId()); + result = result && unknownFields.equals(other.unknownFields); return result; } @@ -324,7 +331,7 @@ public Builder clone() { } public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { + java.lang.Object value) { return (Builder) super.setField(field, value); } public Builder clearField( @@ -337,12 +344,12 @@ public Builder clearOneof( } public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { + int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { + java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } public Builder mergeFrom(com.google.protobuf.Message other) { @@ -360,6 +367,7 @@ public Builder mergeFrom(io.bloombox.schema.media.MediaKey other) { id_ = other.id_; onChanged(); } + this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @@ -456,12 +464,12 @@ public Builder setIdBytes( } public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; + return super.setUnknownFieldsProto3(unknownFields); } public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; + return super.mergeUnknownFields(unknownFields); } diff --git a/languages/java/io/bloombox/schema/media/MediaType.java b/languages/java/io/bloombox/schema/media/MediaType.java index 3ac90b0..6128ac2 100644 --- a/languages/java/io/bloombox/schema/media/MediaType.java +++ b/languages/java/io/bloombox/schema/media/MediaType.java @@ -14,6 +14,7 @@ public final class MediaType extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:MediaType) MediaTypeOrBuilder { +private static final long serialVersionUID = 0L; // Use MediaType.newBuilder() to construct. private MediaType(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -25,7 +26,7 @@ private MediaType() { @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + return this.unknownFields; } private MediaType( com.google.protobuf.CodedInputStream input, @@ -33,6 +34,8 @@ private MediaType( throws com.google.protobuf.InvalidProtocolBufferException { this(); int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { @@ -42,7 +45,8 @@ private MediaType( done = true; break; default: { - if (!input.skipField(tag)) { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -100,6 +104,7 @@ private MediaType( throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { + this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } @@ -334,6 +339,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (videoType_ != null) { output.writeMessage(301, getVideoType()); } + unknownFields.writeTo(output); } public int getSerializedSize() { @@ -357,11 +363,11 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(301, getVideoType()); } + size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } - private static final long serialVersionUID = 0L; @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { @@ -389,6 +395,7 @@ public boolean equals(final java.lang.Object obj) { result = result && getVideoType() .equals(other.getVideoType()); } + result = result && unknownFields.equals(other.unknownFields); return result; } @@ -613,7 +620,7 @@ public Builder clone() { } public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { + java.lang.Object value) { return (Builder) super.setField(field, value); } public Builder clearField( @@ -626,12 +633,12 @@ public Builder clearOneof( } public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { + int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { + java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } public Builder mergeFrom(com.google.protobuf.Message other) { @@ -657,6 +664,7 @@ public Builder mergeFrom(io.bloombox.schema.media.MediaType other) { if (other.hasVideoType()) { mergeVideoType(other.getVideoType()); } + this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @@ -1079,12 +1087,12 @@ public io.bloombox.schema.media.VideoTypeOrBuilder getVideoTypeOrBuilder() { } public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; + return super.setUnknownFieldsProto3(unknownFields); } public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; + return super.mergeUnknownFields(unknownFields); } diff --git a/languages/java/io/bloombox/schema/media/VideoType.java b/languages/java/io/bloombox/schema/media/VideoType.java index 15f86ac..65fdbb2 100644 --- a/languages/java/io/bloombox/schema/media/VideoType.java +++ b/languages/java/io/bloombox/schema/media/VideoType.java @@ -14,6 +14,7 @@ public final class VideoType extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:VideoType) VideoTypeOrBuilder { +private static final long serialVersionUID = 0L; // Use VideoType.newBuilder() to construct. private VideoType(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -25,7 +26,7 @@ private VideoType() { @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + return this.unknownFields; } private VideoType( com.google.protobuf.CodedInputStream input, @@ -33,6 +34,8 @@ private VideoType( throws com.google.protobuf.InvalidProtocolBufferException { this(); int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { @@ -42,7 +45,8 @@ private VideoType( done = true; break; default: { - if (!input.skipField(tag)) { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -61,6 +65,7 @@ private VideoType( throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { + this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } @@ -214,6 +219,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (kind_ != io.bloombox.schema.media.VideoType.VideoKind.MP4.getNumber()) { output.writeEnum(1, kind_); } + unknownFields.writeTo(output); } public int getSerializedSize() { @@ -225,11 +231,11 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeEnumSize(1, kind_); } + size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } - private static final long serialVersionUID = 0L; @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { @@ -242,6 +248,7 @@ public boolean equals(final java.lang.Object obj) { boolean result = true; result = result && kind_ == other.kind_; + result = result && unknownFields.equals(other.unknownFields); return result; } @@ -421,7 +428,7 @@ public Builder clone() { } public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { + java.lang.Object value) { return (Builder) super.setField(field, value); } public Builder clearField( @@ -434,12 +441,12 @@ public Builder clearOneof( } public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { + int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { + java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } public Builder mergeFrom(com.google.protobuf.Message other) { @@ -456,6 +463,7 @@ public Builder mergeFrom(io.bloombox.schema.media.VideoType other) { if (other.kind_ != 0) { setKindValue(other.getKindValue()); } + this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @@ -527,12 +535,12 @@ public Builder clearKind() { } public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; + return super.setUnknownFieldsProto3(unknownFields); } public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; + return super.mergeUnknownFields(unknownFields); } diff --git a/languages/java/io/bloombox/schema/product/FlowerProduct.java b/languages/java/io/bloombox/schema/product/FlowerProduct.java index 085fe6a..6dd7c1d 100644 --- a/languages/java/io/bloombox/schema/product/FlowerProduct.java +++ b/languages/java/io/bloombox/schema/product/FlowerProduct.java @@ -126,6 +126,7 @@ public static final class Flower extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:Flower) FlowerOrBuilder { + private static final long serialVersionUID = 0L; // Use Flower.newBuilder() to construct. private Flower(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -136,7 +137,7 @@ private Flower() { @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + return this.unknownFields; } private Flower( com.google.protobuf.CodedInputStream input, @@ -144,6 +145,8 @@ private Flower( throws com.google.protobuf.InvalidProtocolBufferException { this(); int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { @@ -153,7 +156,8 @@ private Flower( done = true; break; default: { - if (!input.skipField(tag)) { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -231,6 +235,7 @@ private Flower( throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { + this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } @@ -414,6 +419,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (pricing_ != null) { output.writeMessage(23, getPricing()); } + unknownFields.writeTo(output); } public int getSerializedSize() { @@ -441,11 +447,11 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(23, getPricing()); } + size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } - private static final long serialVersionUID = 0L; @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { @@ -482,6 +488,7 @@ public boolean equals(final java.lang.Object obj) { result = result && getPricing() .equals(other.getPricing()); } + result = result && unknownFields.equals(other.unknownFields); return result; } @@ -727,7 +734,7 @@ public Builder clone() { } public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { + java.lang.Object value) { return (Builder) super.setField(field, value); } public Builder clearField( @@ -740,12 +747,12 @@ public Builder clearOneof( } public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { + int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { + java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } public Builder mergeFrom(com.google.protobuf.Message other) { @@ -774,6 +781,7 @@ public Builder mergeFrom(io.bloombox.schema.product.FlowerProduct.Flower other) if (other.hasPricing()) { mergePricing(other.getPricing()); } + this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @@ -1494,12 +1502,12 @@ public io.bloombox.schema.product.struct.ProductPricingOrBuilder getPricingOrBui } public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; + return super.setUnknownFieldsProto3(unknownFields); } public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; + return super.mergeUnknownFields(unknownFields); } diff --git a/languages/java/io/bloombox/schema/product/struct/FlagsDescriptor.java b/languages/java/io/bloombox/schema/product/struct/FlagsDescriptor.java index e06afbf..83d34cd 100644 --- a/languages/java/io/bloombox/schema/product/struct/FlagsDescriptor.java +++ b/languages/java/io/bloombox/schema/product/struct/FlagsDescriptor.java @@ -10,6 +10,7 @@ public final class FlagsDescriptor extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:FlagsDescriptor) FlagsDescriptorOrBuilder { +private static final long serialVersionUID = 0L; // Use FlagsDescriptor.newBuilder() to construct. private FlagsDescriptor(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -25,7 +26,7 @@ private FlagsDescriptor() { @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + return this.unknownFields; } private FlagsDescriptor( com.google.protobuf.CodedInputStream input, @@ -33,6 +34,8 @@ private FlagsDescriptor( throws com.google.protobuf.InvalidProtocolBufferException { this(); int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { @@ -42,7 +45,8 @@ private FlagsDescriptor( done = true; break; default: { - if (!input.skipField(tag)) { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -80,6 +84,7 @@ private FlagsDescriptor( throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { + this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } @@ -167,6 +172,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (inhouse_ != false) { output.writeBool(5, inhouse_); } + unknownFields.writeTo(output); } public int getSerializedSize() { @@ -194,11 +200,11 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeBoolSize(5, inhouse_); } + size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } - private static final long serialVersionUID = 0L; @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { @@ -220,6 +226,7 @@ public boolean equals(final java.lang.Object obj) { == other.getLastchance()); result = result && (getInhouse() == other.getInhouse()); + result = result && unknownFields.equals(other.unknownFields); return result; } @@ -420,7 +427,7 @@ public Builder clone() { } public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { + java.lang.Object value) { return (Builder) super.setField(field, value); } public Builder clearField( @@ -433,12 +440,12 @@ public Builder clearOneof( } public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { + int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { + java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } public Builder mergeFrom(com.google.protobuf.Message other) { @@ -467,6 +474,7 @@ public Builder mergeFrom(io.bloombox.schema.product.struct.FlagsDescriptor other if (other.getInhouse() != false) { setInhouse(other.getInhouse()); } + this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @@ -624,12 +632,12 @@ public Builder clearInhouse() { } public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; + return super.setUnknownFieldsProto3(unknownFields); } public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; + return super.mergeUnknownFields(unknownFields); } diff --git a/languages/java/io/bloombox/schema/product/struct/FreebiePricingDescriptor.java b/languages/java/io/bloombox/schema/product/struct/FreebiePricingDescriptor.java index a266f01..38956c1 100644 --- a/languages/java/io/bloombox/schema/product/struct/FreebiePricingDescriptor.java +++ b/languages/java/io/bloombox/schema/product/struct/FreebiePricingDescriptor.java @@ -10,6 +10,7 @@ public final class FreebiePricingDescriptor extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:FreebiePricingDescriptor) FreebiePricingDescriptorOrBuilder { +private static final long serialVersionUID = 0L; // Use FreebiePricingDescriptor.newBuilder() to construct. private FreebiePricingDescriptor(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -20,13 +21,15 @@ private FreebiePricingDescriptor() { @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + return this.unknownFields; } private FreebiePricingDescriptor( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { @@ -36,7 +39,8 @@ private FreebiePricingDescriptor( done = true; break; default: { - if (!input.skipField(tag)) { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -49,6 +53,7 @@ private FreebiePricingDescriptor( throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { + this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } @@ -76,6 +81,7 @@ public final boolean isInitialized() { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + unknownFields.writeTo(output); } public int getSerializedSize() { @@ -83,11 +89,11 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; + size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } - private static final long serialVersionUID = 0L; @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { @@ -99,6 +105,7 @@ public boolean equals(final java.lang.Object obj) { io.bloombox.schema.product.struct.FreebiePricingDescriptor other = (io.bloombox.schema.product.struct.FreebiePricingDescriptor) obj; boolean result = true; + result = result && unknownFields.equals(other.unknownFields); return result; } @@ -269,7 +276,7 @@ public Builder clone() { } public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { + java.lang.Object value) { return (Builder) super.setField(field, value); } public Builder clearField( @@ -282,12 +289,12 @@ public Builder clearOneof( } public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { + int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { + java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } public Builder mergeFrom(com.google.protobuf.Message other) { @@ -301,6 +308,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(io.bloombox.schema.product.struct.FreebiePricingDescriptor other) { if (other == io.bloombox.schema.product.struct.FreebiePricingDescriptor.getDefaultInstance()) return this; + this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @@ -328,12 +336,12 @@ public Builder mergeFrom( } public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; + return super.setUnknownFieldsProto3(unknownFields); } public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; + return super.mergeUnknownFields(unknownFields); } diff --git a/languages/java/io/bloombox/schema/product/struct/Genetics.java b/languages/java/io/bloombox/schema/product/struct/Genetics.java index 063fb6b..c11c901 100644 --- a/languages/java/io/bloombox/schema/product/struct/Genetics.java +++ b/languages/java/io/bloombox/schema/product/struct/Genetics.java @@ -10,6 +10,7 @@ public final class Genetics extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:Genetics) GeneticsOrBuilder { +private static final long serialVersionUID = 0L; // Use Genetics.newBuilder() to construct. private Genetics(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -20,7 +21,7 @@ private Genetics() { @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + return this.unknownFields; } private Genetics( com.google.protobuf.CodedInputStream input, @@ -28,6 +29,8 @@ private Genetics( throws com.google.protobuf.InvalidProtocolBufferException { this(); int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { @@ -37,7 +40,8 @@ private Genetics( done = true; break; default: { - if (!input.skipField(tag)) { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -76,6 +80,7 @@ private Genetics( throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { + this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } @@ -151,6 +156,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (female_ != null) { output.writeMessage(2, getFemale()); } + unknownFields.writeTo(output); } public int getSerializedSize() { @@ -166,11 +172,11 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, getFemale()); } + size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } - private static final long serialVersionUID = 0L; @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { @@ -192,6 +198,7 @@ public boolean equals(final java.lang.Object obj) { result = result && getFemale() .equals(other.getFemale()); } + result = result && unknownFields.equals(other.unknownFields); return result; } @@ -392,7 +399,7 @@ public Builder clone() { } public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { + java.lang.Object value) { return (Builder) super.setField(field, value); } public Builder clearField( @@ -405,12 +412,12 @@ public Builder clearOneof( } public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { + int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { + java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } public Builder mergeFrom(com.google.protobuf.Message other) { @@ -430,6 +437,7 @@ public Builder mergeFrom(io.bloombox.schema.product.struct.Genetics other) { if (other.hasFemale()) { mergeFemale(other.getFemale()); } + this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @@ -691,12 +699,12 @@ public io.bloombox.schema.content.NameOrBuilder getFemaleOrBuilder() { } public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; + return super.setUnknownFieldsProto3(unknownFields); } public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; + return super.mergeUnknownFields(unknownFields); } diff --git a/languages/java/io/bloombox/schema/product/struct/PricingDescriptor.java b/languages/java/io/bloombox/schema/product/struct/PricingDescriptor.java index 6668976..3f8649d 100644 --- a/languages/java/io/bloombox/schema/product/struct/PricingDescriptor.java +++ b/languages/java/io/bloombox/schema/product/struct/PricingDescriptor.java @@ -14,6 +14,7 @@ public final class PricingDescriptor extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:PricingDescriptor) PricingDescriptorOrBuilder { +private static final long serialVersionUID = 0L; // Use PricingDescriptor.newBuilder() to construct. private PricingDescriptor(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -25,7 +26,7 @@ private PricingDescriptor() { @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + return this.unknownFields; } private PricingDescriptor( com.google.protobuf.CodedInputStream input, @@ -33,6 +34,8 @@ private PricingDescriptor( throws com.google.protobuf.InvalidProtocolBufferException { this(); int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { @@ -42,7 +45,8 @@ private PricingDescriptor( done = true; break; default: { - if (!input.skipField(tag)) { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -100,6 +104,7 @@ private PricingDescriptor( throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { + this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } @@ -230,6 +235,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (freebie_ != null) { output.writeMessage(22, getFreebie()); } + unknownFields.writeTo(output); } public int getSerializedSize() { @@ -253,11 +259,11 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(22, getFreebie()); } + size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } - private static final long serialVersionUID = 0L; @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { @@ -285,6 +291,7 @@ public boolean equals(final java.lang.Object obj) { result = result && getFreebie() .equals(other.getFreebie()); } + result = result && unknownFields.equals(other.unknownFields); return result; } @@ -509,7 +516,7 @@ public Builder clone() { } public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { + java.lang.Object value) { return (Builder) super.setField(field, value); } public Builder clearField( @@ -522,12 +529,12 @@ public Builder clearOneof( } public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { + int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { + java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } public Builder mergeFrom(com.google.protobuf.Message other) { @@ -553,6 +560,7 @@ public Builder mergeFrom(io.bloombox.schema.product.struct.PricingDescriptor oth if (other.hasFreebie()) { mergeFreebie(other.getFreebie()); } + this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @@ -1011,12 +1019,12 @@ public io.bloombox.schema.product.struct.FreebiePricingDescriptorOrBuilder getFr } public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; + return super.setUnknownFieldsProto3(unknownFields); } public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; + return super.mergeUnknownFields(unknownFields); } diff --git a/languages/java/io/bloombox/schema/product/struct/PricingTierAvailability.java b/languages/java/io/bloombox/schema/product/struct/PricingTierAvailability.java index 88fab19..8f601e7 100644 --- a/languages/java/io/bloombox/schema/product/struct/PricingTierAvailability.java +++ b/languages/java/io/bloombox/schema/product/struct/PricingTierAvailability.java @@ -10,6 +10,7 @@ public final class PricingTierAvailability extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:PricingTierAvailability) PricingTierAvailabilityOrBuilder { +private static final long serialVersionUID = 0L; // Use PricingTierAvailability.newBuilder() to construct. private PricingTierAvailability(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -22,7 +23,7 @@ private PricingTierAvailability() { @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + return this.unknownFields; } private PricingTierAvailability( com.google.protobuf.CodedInputStream input, @@ -30,6 +31,8 @@ private PricingTierAvailability( throws com.google.protobuf.InvalidProtocolBufferException { this(); int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { @@ -39,7 +42,8 @@ private PricingTierAvailability( done = true; break; default: { - if (!input.skipField(tag)) { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -62,6 +66,7 @@ private PricingTierAvailability( throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { + this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } @@ -113,6 +118,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (available_ != false) { output.writeBool(2, available_); } + unknownFields.writeTo(output); } public int getSerializedSize() { @@ -128,11 +134,11 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeBoolSize(2, available_); } + size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } - private static final long serialVersionUID = 0L; @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { @@ -148,6 +154,7 @@ public boolean equals(final java.lang.Object obj) { == other.getOffered()); result = result && (getAvailable() == other.getAvailable()); + result = result && unknownFields.equals(other.unknownFields); return result; } @@ -330,7 +337,7 @@ public Builder clone() { } public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { + java.lang.Object value) { return (Builder) super.setField(field, value); } public Builder clearField( @@ -343,12 +350,12 @@ public Builder clearOneof( } public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { + int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { + java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } public Builder mergeFrom(com.google.protobuf.Message other) { @@ -368,6 +375,7 @@ public Builder mergeFrom(io.bloombox.schema.product.struct.PricingTierAvailabili if (other.getAvailable() != false) { setAvailable(other.getAvailable()); } + this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @@ -447,12 +455,12 @@ public Builder clearAvailable() { } public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; + return super.setUnknownFieldsProto3(unknownFields); } public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; + return super.mergeUnknownFields(unknownFields); } diff --git a/languages/java/io/bloombox/schema/product/struct/ProductFlagValue.java b/languages/java/io/bloombox/schema/product/struct/ProductFlagValue.java index 1d12ce0..97824ba 100644 --- a/languages/java/io/bloombox/schema/product/struct/ProductFlagValue.java +++ b/languages/java/io/bloombox/schema/product/struct/ProductFlagValue.java @@ -10,6 +10,7 @@ public final class ProductFlagValue extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:ProductFlagValue) ProductFlagValueOrBuilder { +private static final long serialVersionUID = 0L; // Use ProductFlagValue.newBuilder() to construct. private ProductFlagValue(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -22,7 +23,7 @@ private ProductFlagValue() { @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + return this.unknownFields; } private ProductFlagValue( com.google.protobuf.CodedInputStream input, @@ -30,6 +31,8 @@ private ProductFlagValue( throws com.google.protobuf.InvalidProtocolBufferException { this(); int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { @@ -39,7 +42,8 @@ private ProductFlagValue( done = true; break; default: { - if (!input.skipField(tag)) { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -63,6 +67,7 @@ private ProductFlagValue( throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { + this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } @@ -121,6 +126,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (value_ != false) { output.writeBool(2, value_); } + unknownFields.writeTo(output); } public int getSerializedSize() { @@ -136,11 +142,11 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeBoolSize(2, value_); } + size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } - private static final long serialVersionUID = 0L; @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { @@ -155,6 +161,7 @@ public boolean equals(final java.lang.Object obj) { result = result && type_ == other.type_; result = result && (getValue() == other.getValue()); + result = result && unknownFields.equals(other.unknownFields); return result; } @@ -336,7 +343,7 @@ public Builder clone() { } public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { + java.lang.Object value) { return (Builder) super.setField(field, value); } public Builder clearField( @@ -349,12 +356,12 @@ public Builder clearOneof( } public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { + int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { + java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } public Builder mergeFrom(com.google.protobuf.Message other) { @@ -374,6 +381,7 @@ public Builder mergeFrom(io.bloombox.schema.product.struct.ProductFlagValue othe if (other.getValue() != false) { setValue(other.getValue()); } + this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @@ -471,12 +479,12 @@ public Builder clearValue() { } public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; + return super.setUnknownFieldsProto3(unknownFields); } public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; + return super.mergeUnknownFields(unknownFields); } diff --git a/languages/java/io/bloombox/schema/product/struct/ProductFlagset.java b/languages/java/io/bloombox/schema/product/struct/ProductFlagset.java index fca1011..4506bc7 100644 --- a/languages/java/io/bloombox/schema/product/struct/ProductFlagset.java +++ b/languages/java/io/bloombox/schema/product/struct/ProductFlagset.java @@ -10,6 +10,7 @@ public final class ProductFlagset extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:ProductFlagset) ProductFlagsetOrBuilder { +private static final long serialVersionUID = 0L; // Use ProductFlagset.newBuilder() to construct. private ProductFlagset(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -21,7 +22,7 @@ private ProductFlagset() { @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + return this.unknownFields; } private ProductFlagset( com.google.protobuf.CodedInputStream input, @@ -29,6 +30,8 @@ private ProductFlagset( throws com.google.protobuf.InvalidProtocolBufferException { this(); int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { @@ -38,7 +41,8 @@ private ProductFlagset( done = true; break; default: { - if (!input.skipField(tag)) { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -63,6 +67,7 @@ private ProductFlagset( if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { flags_ = java.util.Collections.unmodifiableList(flags_); } + this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } @@ -128,6 +133,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) for (int i = 0; i < flags_.size(); i++) { output.writeMessage(1, flags_.get(i)); } + unknownFields.writeTo(output); } public int getSerializedSize() { @@ -139,11 +145,11 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, flags_.get(i)); } + size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } - private static final long serialVersionUID = 0L; @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { @@ -157,6 +163,7 @@ public boolean equals(final java.lang.Object obj) { boolean result = true; result = result && getFlagsList() .equals(other.getFlagsList()); + result = result && unknownFields.equals(other.unknownFields); return result; } @@ -348,7 +355,7 @@ public Builder clone() { } public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { + java.lang.Object value) { return (Builder) super.setField(field, value); } public Builder clearField( @@ -361,12 +368,12 @@ public Builder clearOneof( } public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { + int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { + java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } public Builder mergeFrom(com.google.protobuf.Message other) { @@ -406,6 +413,7 @@ public Builder mergeFrom(io.bloombox.schema.product.struct.ProductFlagset other) } } } + this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @@ -674,12 +682,12 @@ public io.bloombox.schema.product.struct.ProductFlagValue.Builder addFlagsBuilde } public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; + return super.setUnknownFieldsProto3(unknownFields); } public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; + return super.mergeUnknownFields(unknownFields); } diff --git a/languages/java/io/bloombox/schema/product/struct/ProductPricing.java b/languages/java/io/bloombox/schema/product/struct/ProductPricing.java index 9eb0e8a..ddd9487 100644 --- a/languages/java/io/bloombox/schema/product/struct/ProductPricing.java +++ b/languages/java/io/bloombox/schema/product/struct/ProductPricing.java @@ -14,6 +14,7 @@ public final class ProductPricing extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:ProductPricing) ProductPricingOrBuilder { +private static final long serialVersionUID = 0L; // Use ProductPricing.newBuilder() to construct. private ProductPricing(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -26,7 +27,7 @@ private ProductPricing() { @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + return this.unknownFields; } private ProductPricing( com.google.protobuf.CodedInputStream input, @@ -34,6 +35,8 @@ private ProductPricing( throws com.google.protobuf.InvalidProtocolBufferException { this(); int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { @@ -43,7 +46,8 @@ private ProductPricing( done = true; break; default: { - if (!input.skipField(tag)) { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -80,6 +84,7 @@ private ProductPricing( if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { manifest_ = java.util.Collections.unmodifiableList(manifest_); } + this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } @@ -183,6 +188,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) for (int i = 0; i < manifest_.size(); i++) { output.writeMessage(2, manifest_.get(i)); } + unknownFields.writeTo(output); } public int getSerializedSize() { @@ -198,11 +204,11 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, manifest_.get(i)); } + size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } - private static final long serialVersionUID = 0L; @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { @@ -218,6 +224,7 @@ public boolean equals(final java.lang.Object obj) { .equals(other.getDiscountsList()); result = result && getManifestList() .equals(other.getManifestList()); + result = result && unknownFields.equals(other.unknownFields); return result; } @@ -433,7 +440,7 @@ public Builder clone() { } public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { + java.lang.Object value) { return (Builder) super.setField(field, value); } public Builder clearField( @@ -446,12 +453,12 @@ public Builder clearOneof( } public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { + int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { + java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } public Builder mergeFrom(com.google.protobuf.Message other) { @@ -517,6 +524,7 @@ public Builder mergeFrom(io.bloombox.schema.product.struct.ProductPricing other) } } } + this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @@ -1025,12 +1033,12 @@ public io.bloombox.schema.product.struct.PricingDescriptor.Builder addManifestBu } public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; + return super.setUnknownFieldsProto3(unknownFields); } public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; + return super.mergeUnknownFields(unknownFields); } diff --git a/languages/java/io/bloombox/schema/product/struct/SaleDescriptor.java b/languages/java/io/bloombox/schema/product/struct/SaleDescriptor.java index 1457621..1e50c4e 100644 --- a/languages/java/io/bloombox/schema/product/struct/SaleDescriptor.java +++ b/languages/java/io/bloombox/schema/product/struct/SaleDescriptor.java @@ -10,6 +10,7 @@ public final class SaleDescriptor extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:SaleDescriptor) SaleDescriptorOrBuilder { +private static final long serialVersionUID = 0L; // Use SaleDescriptor.newBuilder() to construct. private SaleDescriptor(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -28,7 +29,7 @@ private SaleDescriptor() { @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + return this.unknownFields; } private SaleDescriptor( com.google.protobuf.CodedInputStream input, @@ -36,6 +37,8 @@ private SaleDescriptor( throws com.google.protobuf.InvalidProtocolBufferException { this(); int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { @@ -45,7 +48,8 @@ private SaleDescriptor( done = true; break; default: { - if (!input.skipField(tag)) { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -99,6 +103,7 @@ private SaleDescriptor( throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { + this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } @@ -241,6 +246,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (loyaltyReward_ != 0) { output.writeUInt32(24, loyaltyReward_); } + unknownFields.writeTo(output); } public int getSerializedSize() { @@ -280,11 +286,11 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeUInt32Size(24, loyaltyReward_); } + size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } - private static final long serialVersionUID = 0L; @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { @@ -311,6 +317,7 @@ public boolean equals(final java.lang.Object obj) { == other.getLoyaltyTrigger()); result = result && (getLoyaltyReward() == other.getLoyaltyReward()); + result = result && unknownFields.equals(other.unknownFields); return result; } @@ -523,7 +530,7 @@ public Builder clone() { } public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { + java.lang.Object value) { return (Builder) super.setField(field, value); } public Builder clearField( @@ -536,12 +543,12 @@ public Builder clearOneof( } public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { + int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { + java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } public Builder mergeFrom(com.google.protobuf.Message other) { @@ -579,6 +586,7 @@ public Builder mergeFrom(io.bloombox.schema.product.struct.SaleDescriptor other) if (other.getLoyaltyReward() != 0) { setLoyaltyReward(other.getLoyaltyReward()); } + this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @@ -864,12 +872,12 @@ public Builder clearLoyaltyReward() { } public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; + return super.setUnknownFieldsProto3(unknownFields); } public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; + return super.mergeUnknownFields(unknownFields); } diff --git a/languages/java/io/bloombox/schema/product/struct/UnitPricingDescriptor.java b/languages/java/io/bloombox/schema/product/struct/UnitPricingDescriptor.java index 61010f2..3678e63 100644 --- a/languages/java/io/bloombox/schema/product/struct/UnitPricingDescriptor.java +++ b/languages/java/io/bloombox/schema/product/struct/UnitPricingDescriptor.java @@ -14,6 +14,7 @@ public final class UnitPricingDescriptor extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:UnitPricingDescriptor) UnitPricingDescriptorOrBuilder { +private static final long serialVersionUID = 0L; // Use UnitPricingDescriptor.newBuilder() to construct. private UnitPricingDescriptor(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -26,7 +27,7 @@ private UnitPricingDescriptor() { @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + return this.unknownFields; } private UnitPricingDescriptor( com.google.protobuf.CodedInputStream input, @@ -34,6 +35,8 @@ private UnitPricingDescriptor( throws com.google.protobuf.InvalidProtocolBufferException { this(); int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { @@ -43,7 +46,8 @@ private UnitPricingDescriptor( done = true; break; default: { - if (!input.skipField(tag)) { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -86,6 +90,7 @@ private UnitPricingDescriptor( if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { discounts_ = java.util.Collections.unmodifiableList(discounts_); } + this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } @@ -188,6 +193,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) for (int i = 0; i < discounts_.size(); i++) { output.writeMessage(3, discounts_.get(i)); } + unknownFields.writeTo(output); } public int getSerializedSize() { @@ -207,11 +213,11 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, discounts_.get(i)); } + size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } - private static final long serialVersionUID = 0L; @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { @@ -234,6 +240,7 @@ public boolean equals(final java.lang.Object obj) { } result = result && getDiscountsList() .equals(other.getDiscountsList()); + result = result && unknownFields.equals(other.unknownFields); return result; } @@ -452,7 +459,7 @@ public Builder clone() { } public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { + java.lang.Object value) { return (Builder) super.setField(field, value); } public Builder clearField( @@ -465,12 +472,12 @@ public Builder clearOneof( } public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { + int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { + java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } public Builder mergeFrom(com.google.protobuf.Message other) { @@ -516,6 +523,7 @@ public Builder mergeFrom(io.bloombox.schema.product.struct.UnitPricingDescriptor } } } + this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @@ -927,12 +935,12 @@ public io.bloombox.schema.product.struct.SaleDescriptor.Builder addDiscountsBuil } public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; + return super.setUnknownFieldsProto3(unknownFields); } public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; + return super.mergeUnknownFields(unknownFields); } diff --git a/languages/java/io/bloombox/schema/product/struct/WeightedPricingDescriptor.java b/languages/java/io/bloombox/schema/product/struct/WeightedPricingDescriptor.java index 8b87ca1..7b37cf2 100644 --- a/languages/java/io/bloombox/schema/product/struct/WeightedPricingDescriptor.java +++ b/languages/java/io/bloombox/schema/product/struct/WeightedPricingDescriptor.java @@ -10,6 +10,7 @@ public final class WeightedPricingDescriptor extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:WeightedPricingDescriptor) WeightedPricingDescriptorOrBuilder { +private static final long serialVersionUID = 0L; // Use WeightedPricingDescriptor.newBuilder() to construct. private WeightedPricingDescriptor(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); @@ -22,7 +23,7 @@ private WeightedPricingDescriptor() { @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + return this.unknownFields; } private WeightedPricingDescriptor( com.google.protobuf.CodedInputStream input, @@ -30,6 +31,8 @@ private WeightedPricingDescriptor( throws com.google.protobuf.InvalidProtocolBufferException { this(); int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { @@ -39,7 +42,8 @@ private WeightedPricingDescriptor( done = true; break; default: { - if (!input.skipField(tag)) { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -76,6 +80,7 @@ private WeightedPricingDescriptor( throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { + this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } @@ -158,6 +163,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (weightInGrams_ != 0F) { output.writeFloat(3, weightInGrams_); } + unknownFields.writeTo(output); } public int getSerializedSize() { @@ -177,11 +183,11 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeFloatSize(3, weightInGrams_); } + size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } - private static final long serialVersionUID = 0L; @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { @@ -203,6 +209,7 @@ public boolean equals(final java.lang.Object obj) { java.lang.Float.floatToIntBits(getWeightInGrams()) == java.lang.Float.floatToIntBits( other.getWeightInGrams())); + result = result && unknownFields.equals(other.unknownFields); return result; } @@ -399,7 +406,7 @@ public Builder clone() { } public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { + java.lang.Object value) { return (Builder) super.setField(field, value); } public Builder clearField( @@ -412,12 +419,12 @@ public Builder clearOneof( } public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { + int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { + java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } public Builder mergeFrom(com.google.protobuf.Message other) { @@ -440,6 +447,7 @@ public Builder mergeFrom(io.bloombox.schema.product.struct.WeightedPricingDescri if (other.getWeightInGrams() != 0F) { setWeightInGrams(other.getWeightInGrams()); } + this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @@ -654,12 +662,12 @@ public Builder clearWeightInGrams() { } public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; + return super.setUnknownFieldsProto3(unknownFields); } public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; + return super.mergeUnknownFields(unknownFields); } diff --git a/languages/js/browser/Product_pb.js b/languages/js/browser/Product_pb.js index db37178..efb4722 100644 --- a/languages/js/browser/Product_pb.js +++ b/languages/js/browser/Product_pb.js @@ -1,6 +1,8 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! @@ -49,6 +51,7 @@ proto.Product.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.Product} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.Product.toObject = function(includeInstance, msg) { var f, obj = { @@ -131,6 +134,7 @@ proto.Product.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.Product} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.Product.serializeBinaryToWriter = function(message, writer) { var f = undefined; diff --git a/languages/js/browser/base/Compression_pb.js b/languages/js/browser/base/Compression_pb.js index 839c1e8..b4cdaea 100644 --- a/languages/js/browser/base/Compression_pb.js +++ b/languages/js/browser/base/Compression_pb.js @@ -1,6 +1,8 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! @@ -50,6 +52,7 @@ proto.Compression.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.Compression} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.Compression.toObject = function(includeInstance, msg) { var f, obj = { @@ -124,6 +127,7 @@ proto.Compression.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.Compression} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.Compression.serializeBinaryToWriter = function(message, writer) { var f = undefined; diff --git a/languages/js/browser/base/Language_pb.js b/languages/js/browser/base/Language_pb.js index 7730d4f..975cfbe 100644 --- a/languages/js/browser/base/Language_pb.js +++ b/languages/js/browser/base/Language_pb.js @@ -1,6 +1,8 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! diff --git a/languages/js/browser/base/ProductKey_pb.js b/languages/js/browser/base/ProductKey_pb.js index fbe4343..fb41a21 100644 --- a/languages/js/browser/base/ProductKey_pb.js +++ b/languages/js/browser/base/ProductKey_pb.js @@ -1,6 +1,8 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! @@ -49,6 +51,7 @@ proto.ProductKey.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.ProductKey} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ProductKey.toObject = function(includeInstance, msg) { var f, obj = { @@ -118,6 +121,7 @@ proto.ProductKey.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.ProductKey} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ProductKey.serializeBinaryToWriter = function(message, writer) { var f = undefined; diff --git a/languages/js/browser/base/ProductKind_pb.js b/languages/js/browser/base/ProductKind_pb.js index 9f1faa5..1f6699b 100644 --- a/languages/js/browser/base/ProductKind_pb.js +++ b/languages/js/browser/base/ProductKind_pb.js @@ -1,6 +1,8 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! diff --git a/languages/js/browser/base/ProductType_pb.js b/languages/js/browser/base/ProductType_pb.js index a4a3a63..5ae0459 100644 --- a/languages/js/browser/base/ProductType_pb.js +++ b/languages/js/browser/base/ProductType_pb.js @@ -1,6 +1,8 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! @@ -49,6 +51,7 @@ proto.ProductType.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.ProductType} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ProductType.toObject = function(includeInstance, msg) { var f, obj = { @@ -118,6 +121,7 @@ proto.ProductType.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.ProductType} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ProductType.serializeBinaryToWriter = function(message, writer) { var f = undefined; diff --git a/languages/js/browser/content/Brand_pb.js b/languages/js/browser/content/Brand_pb.js index a767a2b..0cb57ab 100644 --- a/languages/js/browser/content/Brand_pb.js +++ b/languages/js/browser/content/Brand_pb.js @@ -1,6 +1,8 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! @@ -56,6 +58,7 @@ proto.Brand.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.Brand} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.Brand.toObject = function(includeInstance, msg) { var f, obj = { @@ -145,6 +148,7 @@ proto.Brand.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.Brand} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.Brand.serializeBinaryToWriter = function(message, writer) { var f = undefined; @@ -275,8 +279,6 @@ proto.Brand.prototype.hasSummary = function() { /** * repeated MediaItem media = 20; - * If you change this array by adding, removing or replacing elements, or if you - * replace the array itself, then you must call the setter to update it. * @return {!Array.} */ proto.Brand.prototype.getMediaList = function() { diff --git a/languages/js/browser/content/Content_pb.js b/languages/js/browser/content/Content_pb.js index 59f0525..883792e 100644 --- a/languages/js/browser/content/Content_pb.js +++ b/languages/js/browser/content/Content_pb.js @@ -1,6 +1,8 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! @@ -51,6 +53,7 @@ proto.Content.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.Content} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.Content.toObject = function(includeInstance, msg) { var f, obj = { @@ -141,6 +144,7 @@ proto.Content.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.Content} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.Content.serializeBinaryToWriter = function(message, writer) { var f = undefined; diff --git a/languages/js/browser/content/MaterialsData_pb.js b/languages/js/browser/content/MaterialsData_pb.js index 1c5deb9..4564fb8 100644 --- a/languages/js/browser/content/MaterialsData_pb.js +++ b/languages/js/browser/content/MaterialsData_pb.js @@ -1,6 +1,8 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! @@ -56,10 +58,11 @@ proto.MaterialsData.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.MaterialsData} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.MaterialsData.toObject = function(includeInstance, msg) { var f, obj = { - ingredientsList: jspb.Message.getField(msg, 1), + ingredientsList: jspb.Message.getRepeatedField(msg, 1), grow: jspb.Message.getFieldWithDefault(msg, 2, 0), species: jspb.Message.getFieldWithDefault(msg, 3, 0), genetics: (f = msg.getGenetics()) && proto.Genetics.toObject(includeInstance, f) @@ -141,6 +144,7 @@ proto.MaterialsData.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.MaterialsData} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.MaterialsData.serializeBinaryToWriter = function(message, writer) { var f = undefined; @@ -178,12 +182,10 @@ proto.MaterialsData.serializeBinaryToWriter = function(message, writer) { /** * repeated string ingredients = 1; - * If you change this array by adding, removing or replacing elements, or if you - * replace the array itself, then you must call the setter to update it. * @return {!Array.} */ proto.MaterialsData.prototype.getIngredientsList = function() { - return /** @type {!Array.} */ (jspb.Message.getField(this, 1)); + return /** @type {!Array.} */ (jspb.Message.getRepeatedField(this, 1)); }; diff --git a/languages/js/browser/content/Name_pb.js b/languages/js/browser/content/Name_pb.js index acbedba..4908fbf 100644 --- a/languages/js/browser/content/Name_pb.js +++ b/languages/js/browser/content/Name_pb.js @@ -1,6 +1,8 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! @@ -49,6 +51,7 @@ proto.Name.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.Name} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.Name.toObject = function(includeInstance, msg) { var f, obj = { @@ -123,6 +126,7 @@ proto.Name.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.Name} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.Name.serializeBinaryToWriter = function(message, writer) { var f = undefined; diff --git a/languages/js/browser/content/ProductContent_pb.js b/languages/js/browser/content/ProductContent_pb.js index e3b91a5..1498090 100644 --- a/languages/js/browser/content/ProductContent_pb.js +++ b/languages/js/browser/content/ProductContent_pb.js @@ -1,6 +1,8 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! @@ -56,6 +58,7 @@ proto.ProductContent.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.ProductContent} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ProductContent.toObject = function(includeInstance, msg) { var f, obj = { @@ -163,6 +166,7 @@ proto.ProductContent.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.ProductContent} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ProductContent.serializeBinaryToWriter = function(message, writer) { var f = undefined; @@ -317,8 +321,6 @@ proto.ProductContent.prototype.hasBrand = function() { /** * repeated MediaItem media = 20; - * If you change this array by adding, removing or replacing elements, or if you - * replace the array itself, then you must call the setter to update it. * @return {!Array.} */ proto.ProductContent.prototype.getMediaList = function() { diff --git a/languages/js/browser/geo/Address_pb.js b/languages/js/browser/geo/Address_pb.js new file mode 100644 index 0000000..509593c --- /dev/null +++ b/languages/js/browser/geo/Address_pb.js @@ -0,0 +1,287 @@ +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! + +goog.exportSymbol('proto.Address', null, global); + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.Address = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.Address, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.Address.displayName = 'proto.Address'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.Address.prototype.toObject = function(opt_includeInstance) { + return proto.Address.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.Address} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.Address.toObject = function(includeInstance, msg) { + var f, obj = { + firstLine: jspb.Message.getFieldWithDefault(msg, 1, ""), + secondLine: jspb.Message.getFieldWithDefault(msg, 2, ""), + city: jspb.Message.getFieldWithDefault(msg, 3, ""), + state: jspb.Message.getFieldWithDefault(msg, 4, ""), + zipcode: jspb.Message.getFieldWithDefault(msg, 5, ""), + country: jspb.Message.getFieldWithDefault(msg, 6, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.Address} + */ +proto.Address.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.Address; + return proto.Address.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.Address} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.Address} + */ +proto.Address.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setFirstLine(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setSecondLine(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setCity(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setState(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setZipcode(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setCountry(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.Address.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.Address.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.Address} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.Address.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFirstLine(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getSecondLine(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getCity(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getState(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getZipcode(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getCountry(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } +}; + + +/** + * optional string first_line = 1; + * @return {string} + */ +proto.Address.prototype.getFirstLine = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.Address.prototype.setFirstLine = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional string second_line = 2; + * @return {string} + */ +proto.Address.prototype.getSecondLine = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** @param {string} value */ +proto.Address.prototype.setSecondLine = function(value) { + jspb.Message.setField(this, 2, value); +}; + + +/** + * optional string city = 3; + * @return {string} + */ +proto.Address.prototype.getCity = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** @param {string} value */ +proto.Address.prototype.setCity = function(value) { + jspb.Message.setField(this, 3, value); +}; + + +/** + * optional string state = 4; + * @return {string} + */ +proto.Address.prototype.getState = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** @param {string} value */ +proto.Address.prototype.setState = function(value) { + jspb.Message.setField(this, 4, value); +}; + + +/** + * optional string zipcode = 5; + * @return {string} + */ +proto.Address.prototype.getZipcode = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** @param {string} value */ +proto.Address.prototype.setZipcode = function(value) { + jspb.Message.setField(this, 5, value); +}; + + +/** + * optional string country = 6; + * @return {string} + */ +proto.Address.prototype.getCountry = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** @param {string} value */ +proto.Address.prototype.setCountry = function(value) { + jspb.Message.setField(this, 6, value); +}; + + diff --git a/languages/js/browser/media/MediaItem_pb.js b/languages/js/browser/media/MediaItem_pb.js index ce759f1..fe8389c 100644 --- a/languages/js/browser/media/MediaItem_pb.js +++ b/languages/js/browser/media/MediaItem_pb.js @@ -1,6 +1,8 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! @@ -49,6 +51,7 @@ proto.MediaItem.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.MediaItem} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.MediaItem.toObject = function(includeInstance, msg) { var f, obj = { @@ -130,6 +133,7 @@ proto.MediaItem.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.MediaItem} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.MediaItem.serializeBinaryToWriter = function(message, writer) { var f = undefined; diff --git a/languages/js/browser/media/MediaKey_pb.js b/languages/js/browser/media/MediaKey_pb.js index effb4c5..51e1e10 100644 --- a/languages/js/browser/media/MediaKey_pb.js +++ b/languages/js/browser/media/MediaKey_pb.js @@ -1,6 +1,8 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! @@ -49,6 +51,7 @@ proto.MediaKey.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.MediaKey} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.MediaKey.toObject = function(includeInstance, msg) { var f, obj = { @@ -118,6 +121,7 @@ proto.MediaKey.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.MediaKey} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.MediaKey.serializeBinaryToWriter = function(message, writer) { var f = undefined; diff --git a/languages/js/browser/media/MediaType_pb.js b/languages/js/browser/media/MediaType_pb.js index 30fa84b..588fbd2 100644 --- a/languages/js/browser/media/MediaType_pb.js +++ b/languages/js/browser/media/MediaType_pb.js @@ -1,6 +1,8 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! @@ -56,6 +58,7 @@ proto.MediaType.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.MediaType} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.MediaType.toObject = function(includeInstance, msg) { var f, obj = { @@ -143,6 +146,7 @@ proto.MediaType.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.MediaType} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.MediaType.serializeBinaryToWriter = function(message, writer) { var f = undefined; @@ -338,6 +342,7 @@ proto.ImageType.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.ImageType} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ImageType.toObject = function(includeInstance, msg) { var f, obj = { @@ -407,6 +412,7 @@ proto.ImageType.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.ImageType} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ImageType.serializeBinaryToWriter = function(message, writer) { var f = undefined; @@ -489,6 +495,7 @@ proto.DocumentType.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.DocumentType} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.DocumentType.toObject = function(includeInstance, msg) { var f, obj = { @@ -563,6 +570,7 @@ proto.DocumentType.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.DocumentType} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.DocumentType.serializeBinaryToWriter = function(message, writer) { var f = undefined; @@ -668,6 +676,7 @@ proto.VideoType.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.VideoType} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.VideoType.toObject = function(includeInstance, msg) { var f, obj = { @@ -737,6 +746,7 @@ proto.VideoType.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.VideoType} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.VideoType.serializeBinaryToWriter = function(message, writer) { var f = undefined; diff --git a/languages/js/browser/products/Flower_pb.js b/languages/js/browser/products/Flower_pb.js index cf7f83e..7e4686c 100644 --- a/languages/js/browser/products/Flower_pb.js +++ b/languages/js/browser/products/Flower_pb.js @@ -1,6 +1,8 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! @@ -49,6 +51,7 @@ proto.Flower.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.Flower} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.Flower.toObject = function(includeInstance, msg) { var f, obj = { @@ -143,6 +146,7 @@ proto.Flower.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.Flower} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.Flower.serializeBinaryToWriter = function(message, writer) { var f = undefined; diff --git a/languages/js/browser/structs/FlagsDescriptor_pb.js b/languages/js/browser/structs/FlagsDescriptor_pb.js index 8c9c2af..099042d 100644 --- a/languages/js/browser/structs/FlagsDescriptor_pb.js +++ b/languages/js/browser/structs/FlagsDescriptor_pb.js @@ -1,6 +1,8 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! @@ -52,6 +54,7 @@ proto.ProductFlagValue.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.ProductFlagValue} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ProductFlagValue.toObject = function(includeInstance, msg) { var f, obj = { @@ -126,6 +129,7 @@ proto.ProductFlagValue.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.ProductFlagValue} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ProductFlagValue.serializeBinaryToWriter = function(message, writer) { var f = undefined; @@ -228,6 +232,7 @@ proto.ProductFlagset.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.ProductFlagset} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ProductFlagset.toObject = function(includeInstance, msg) { var f, obj = { @@ -299,6 +304,7 @@ proto.ProductFlagset.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.ProductFlagset} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ProductFlagset.serializeBinaryToWriter = function(message, writer) { var f = undefined; @@ -315,8 +321,6 @@ proto.ProductFlagset.serializeBinaryToWriter = function(message, writer) { /** * repeated ProductFlagValue flags = 1; - * If you change this array by adding, removing or replacing elements, or if you - * replace the array itself, then you must call the setter to update it. * @return {!Array.} */ proto.ProductFlagset.prototype.getFlagsList = function() { @@ -389,6 +393,7 @@ proto.FlagsDescriptor.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.FlagsDescriptor} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.FlagsDescriptor.toObject = function(includeInstance, msg) { var f, obj = { @@ -478,6 +483,7 @@ proto.FlagsDescriptor.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.FlagsDescriptor} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.FlagsDescriptor.serializeBinaryToWriter = function(message, writer) { var f = undefined; diff --git a/languages/js/browser/structs/Genetics_pb.js b/languages/js/browser/structs/Genetics_pb.js index 7e4b9b2..832ab7f 100644 --- a/languages/js/browser/structs/Genetics_pb.js +++ b/languages/js/browser/structs/Genetics_pb.js @@ -1,6 +1,8 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! @@ -49,6 +51,7 @@ proto.Genetics.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.Genetics} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.Genetics.toObject = function(includeInstance, msg) { var f, obj = { @@ -125,6 +128,7 @@ proto.Genetics.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.Genetics} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.Genetics.serializeBinaryToWriter = function(message, writer) { var f = undefined; diff --git a/languages/js/browser/structs/Grow_pb.js b/languages/js/browser/structs/Grow_pb.js index 02cec16..39f28d2 100644 --- a/languages/js/browser/structs/Grow_pb.js +++ b/languages/js/browser/structs/Grow_pb.js @@ -1,6 +1,8 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! diff --git a/languages/js/browser/structs/Species_pb.js b/languages/js/browser/structs/Species_pb.js index 29e4639..fb4e9b4 100644 --- a/languages/js/browser/structs/Species_pb.js +++ b/languages/js/browser/structs/Species_pb.js @@ -1,6 +1,8 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! diff --git a/languages/js/browser/structs/pricing/PricingDescriptor_pb.js b/languages/js/browser/structs/pricing/PricingDescriptor_pb.js index 7519a42..c162d44 100644 --- a/languages/js/browser/structs/pricing/PricingDescriptor_pb.js +++ b/languages/js/browser/structs/pricing/PricingDescriptor_pb.js @@ -1,6 +1,8 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! @@ -56,6 +58,7 @@ proto.PricingTierAvailability.prototype.toObject = function(opt_includeInstance) * http://goto/soy-param-migration * @param {!proto.PricingTierAvailability} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.PricingTierAvailability.toObject = function(includeInstance, msg) { var f, obj = { @@ -130,6 +133,7 @@ proto.PricingTierAvailability.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.PricingTierAvailability} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.PricingTierAvailability.serializeBinaryToWriter = function(message, writer) { var f = undefined; @@ -234,6 +238,7 @@ proto.UnitPricingDescriptor.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.UnitPricingDescriptor} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.UnitPricingDescriptor.toObject = function(includeInstance, msg) { var f, obj = { @@ -316,6 +321,7 @@ proto.UnitPricingDescriptor.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.UnitPricingDescriptor} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.UnitPricingDescriptor.serializeBinaryToWriter = function(message, writer) { var f = undefined; @@ -392,8 +398,6 @@ proto.UnitPricingDescriptor.prototype.hasStatus = function() { /** * repeated SaleDescriptor discounts = 3; - * If you change this array by adding, removing or replacing elements, or if you - * replace the array itself, then you must call the setter to update it. * @return {!Array.} */ proto.UnitPricingDescriptor.prototype.getDiscountsList = function() { @@ -466,6 +470,7 @@ proto.WeightedPricingDescriptor.prototype.toObject = function(opt_includeInstanc * http://goto/soy-param-migration * @param {!proto.WeightedPricingDescriptor} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.WeightedPricingDescriptor.toObject = function(includeInstance, msg) { var f, obj = { @@ -546,6 +551,7 @@ proto.WeightedPricingDescriptor.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.WeightedPricingDescriptor} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.WeightedPricingDescriptor.serializeBinaryToWriter = function(message, writer) { var f = undefined; @@ -677,6 +683,7 @@ proto.FreebiePricingDescriptor.prototype.toObject = function(opt_includeInstance * http://goto/soy-param-migration * @param {!proto.FreebiePricingDescriptor} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.FreebiePricingDescriptor.toObject = function(includeInstance, msg) { var f, obj = { @@ -742,6 +749,7 @@ proto.FreebiePricingDescriptor.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.FreebiePricingDescriptor} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.FreebiePricingDescriptor.serializeBinaryToWriter = function(message, writer) { var f = undefined; @@ -791,6 +799,7 @@ proto.PricingDescriptor.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.PricingDescriptor} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.PricingDescriptor.toObject = function(includeInstance, msg) { var f, obj = { @@ -878,6 +887,7 @@ proto.PricingDescriptor.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.PricingDescriptor} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.PricingDescriptor.serializeBinaryToWriter = function(message, writer) { var f = undefined; @@ -1070,6 +1080,7 @@ proto.ProductPricing.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.ProductPricing} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ProductPricing.toObject = function(includeInstance, msg) { var f, obj = { @@ -1148,6 +1159,7 @@ proto.ProductPricing.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.ProductPricing} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ProductPricing.serializeBinaryToWriter = function(message, writer) { var f = undefined; @@ -1172,8 +1184,6 @@ proto.ProductPricing.serializeBinaryToWriter = function(message, writer) { /** * repeated SaleDescriptor discounts = 1; - * If you change this array by adding, removing or replacing elements, or if you - * replace the array itself, then you must call the setter to update it. * @return {!Array.} */ proto.ProductPricing.prototype.getDiscountsList = function() { @@ -1205,8 +1215,6 @@ proto.ProductPricing.prototype.clearDiscountsList = function() { /** * repeated PricingDescriptor manifest = 2; - * If you change this array by adding, removing or replacing elements, or if you - * replace the array itself, then you must call the setter to update it. * @return {!Array.} */ proto.ProductPricing.prototype.getManifestList = function() { diff --git a/languages/js/browser/structs/pricing/SaleDescriptor_pb.js b/languages/js/browser/structs/pricing/SaleDescriptor_pb.js index 1ec6294..5dfe5ba 100644 --- a/languages/js/browser/structs/pricing/SaleDescriptor_pb.js +++ b/languages/js/browser/structs/pricing/SaleDescriptor_pb.js @@ -1,6 +1,8 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! @@ -50,6 +52,7 @@ proto.SaleDescriptor.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.SaleDescriptor} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.SaleDescriptor.toObject = function(includeInstance, msg) { var f, obj = { @@ -154,6 +157,7 @@ proto.SaleDescriptor.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.SaleDescriptor} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.SaleDescriptor.serializeBinaryToWriter = function(message, writer) { var f = undefined; diff --git a/languages/js/closure/addresspb.js b/languages/js/closure/addresspb.js new file mode 100644 index 0000000..8f69f8b --- /dev/null +++ b/languages/js/closure/addresspb.js @@ -0,0 +1,292 @@ +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! + +goog.provide('proto.Address'); + +goog.require('jspb.BinaryReader'); +goog.require('jspb.BinaryWriter'); +goog.require('jspb.Message'); + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.Address = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.Address, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.Address.displayName = 'proto.Address'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.Address.prototype.toObject = function(opt_includeInstance) { + return proto.Address.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.Address} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.Address.toObject = function(includeInstance, msg) { + var f, obj = { + firstLine: jspb.Message.getFieldWithDefault(msg, 1, ""), + secondLine: jspb.Message.getFieldWithDefault(msg, 2, ""), + city: jspb.Message.getFieldWithDefault(msg, 3, ""), + state: jspb.Message.getFieldWithDefault(msg, 4, ""), + zipcode: jspb.Message.getFieldWithDefault(msg, 5, ""), + country: jspb.Message.getFieldWithDefault(msg, 6, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.Address} + */ +proto.Address.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.Address; + return proto.Address.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.Address} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.Address} + */ +proto.Address.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setFirstLine(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setSecondLine(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setCity(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setState(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setZipcode(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setCountry(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.Address.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.Address.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.Address} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.Address.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFirstLine(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getSecondLine(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getCity(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getState(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getZipcode(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getCountry(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } +}; + + +/** + * optional string first_line = 1; + * @return {string} + */ +proto.Address.prototype.getFirstLine = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.Address.prototype.setFirstLine = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional string second_line = 2; + * @return {string} + */ +proto.Address.prototype.getSecondLine = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** @param {string} value */ +proto.Address.prototype.setSecondLine = function(value) { + jspb.Message.setField(this, 2, value); +}; + + +/** + * optional string city = 3; + * @return {string} + */ +proto.Address.prototype.getCity = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** @param {string} value */ +proto.Address.prototype.setCity = function(value) { + jspb.Message.setField(this, 3, value); +}; + + +/** + * optional string state = 4; + * @return {string} + */ +proto.Address.prototype.getState = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** @param {string} value */ +proto.Address.prototype.setState = function(value) { + jspb.Message.setField(this, 4, value); +}; + + +/** + * optional string zipcode = 5; + * @return {string} + */ +proto.Address.prototype.getZipcode = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** @param {string} value */ +proto.Address.prototype.setZipcode = function(value) { + jspb.Message.setField(this, 5, value); +}; + + +/** + * optional string country = 6; + * @return {string} + */ +proto.Address.prototype.getCountry = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** @param {string} value */ +proto.Address.prototype.setCountry = function(value) { + jspb.Message.setField(this, 6, value); +}; + + diff --git a/languages/js/closure/brandpb.js b/languages/js/closure/brandpb.js index 8626e02..4840cd4 100644 --- a/languages/js/closure/brandpb.js +++ b/languages/js/closure/brandpb.js @@ -1,15 +1,17 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! goog.provide('proto.Brand'); -goog.require('jspb.Message'); goog.require('jspb.BinaryReader'); goog.require('jspb.BinaryWriter'); +goog.require('jspb.Message'); goog.require('proto.Content'); goog.require('proto.MediaItem'); goog.require('proto.Name'); @@ -64,6 +66,7 @@ proto.Brand.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.Brand} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.Brand.toObject = function(includeInstance, msg) { var f, obj = { @@ -153,6 +156,7 @@ proto.Brand.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.Brand} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.Brand.serializeBinaryToWriter = function(message, writer) { var f = undefined; @@ -283,8 +287,6 @@ proto.Brand.prototype.hasSummary = function() { /** * repeated MediaItem media = 20; - * If you change this array by adding, removing or replacing elements, or if you - * replace the array itself, then you must call the setter to update it. * @return {!Array.} */ proto.Brand.prototype.getMediaList = function() { diff --git a/languages/js/closure/compressionpb.js b/languages/js/closure/compressionpb.js index 37d987e..34d8c21 100644 --- a/languages/js/closure/compressionpb.js +++ b/languages/js/closure/compressionpb.js @@ -1,6 +1,8 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! @@ -8,9 +10,9 @@ goog.provide('proto.Compression'); goog.provide('proto.Compression.Type'); -goog.require('jspb.Message'); goog.require('jspb.BinaryReader'); goog.require('jspb.BinaryWriter'); +goog.require('jspb.Message'); /** @@ -55,6 +57,7 @@ proto.Compression.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.Compression} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.Compression.toObject = function(includeInstance, msg) { var f, obj = { @@ -129,6 +132,7 @@ proto.Compression.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.Compression} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.Compression.serializeBinaryToWriter = function(message, writer) { var f = undefined; diff --git a/languages/js/closure/contentpb.js b/languages/js/closure/contentpb.js index 8223e89..1ccefd3 100644 --- a/languages/js/closure/contentpb.js +++ b/languages/js/closure/contentpb.js @@ -1,6 +1,8 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! @@ -9,9 +11,9 @@ goog.provide('proto.Content'); goog.provide('proto.Content.Encoding'); goog.provide('proto.Content.Type'); -goog.require('jspb.Message'); goog.require('jspb.BinaryReader'); goog.require('jspb.BinaryWriter'); +goog.require('jspb.Message'); goog.require('proto.Compression'); goog.forwardDeclare('proto.Language'); @@ -58,6 +60,7 @@ proto.Content.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.Content} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.Content.toObject = function(includeInstance, msg) { var f, obj = { @@ -148,6 +151,7 @@ proto.Content.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.Content} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.Content.serializeBinaryToWriter = function(message, writer) { var f = undefined; diff --git a/languages/js/closure/documenttypepb.js b/languages/js/closure/documenttypepb.js index 1b36a89..15efa78 100644 --- a/languages/js/closure/documenttypepb.js +++ b/languages/js/closure/documenttypepb.js @@ -1,6 +1,8 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! @@ -8,9 +10,9 @@ goog.provide('proto.DocumentType'); goog.provide('proto.DocumentType.DocumentKind'); -goog.require('jspb.Message'); goog.require('jspb.BinaryReader'); goog.require('jspb.BinaryWriter'); +goog.require('jspb.Message'); /** @@ -55,6 +57,7 @@ proto.DocumentType.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.DocumentType} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.DocumentType.toObject = function(includeInstance, msg) { var f, obj = { @@ -129,6 +132,7 @@ proto.DocumentType.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.DocumentType} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.DocumentType.serializeBinaryToWriter = function(message, writer) { var f = undefined; diff --git a/languages/js/closure/flagsdescriptorpb.js b/languages/js/closure/flagsdescriptorpb.js index 1717780..cad620e 100644 --- a/languages/js/closure/flagsdescriptorpb.js +++ b/languages/js/closure/flagsdescriptorpb.js @@ -1,15 +1,17 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! goog.provide('proto.FlagsDescriptor'); -goog.require('jspb.Message'); goog.require('jspb.BinaryReader'); goog.require('jspb.BinaryWriter'); +goog.require('jspb.Message'); /** @@ -54,6 +56,7 @@ proto.FlagsDescriptor.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.FlagsDescriptor} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.FlagsDescriptor.toObject = function(includeInstance, msg) { var f, obj = { @@ -143,6 +146,7 @@ proto.FlagsDescriptor.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.FlagsDescriptor} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.FlagsDescriptor.serializeBinaryToWriter = function(message, writer) { var f = undefined; diff --git a/languages/js/closure/flowerpb.js b/languages/js/closure/flowerpb.js index f75ccc5..8761b4d 100644 --- a/languages/js/closure/flowerpb.js +++ b/languages/js/closure/flowerpb.js @@ -1,15 +1,17 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! goog.provide('proto.Flower'); -goog.require('jspb.Message'); goog.require('jspb.BinaryReader'); goog.require('jspb.BinaryWriter'); +goog.require('jspb.Message'); goog.require('proto.FlagsDescriptor'); goog.require('proto.MaterialsData'); goog.require('proto.ProductContent'); @@ -59,6 +61,7 @@ proto.Flower.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.Flower} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.Flower.toObject = function(includeInstance, msg) { var f, obj = { @@ -153,6 +156,7 @@ proto.Flower.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.Flower} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.Flower.serializeBinaryToWriter = function(message, writer) { var f = undefined; diff --git a/languages/js/closure/freebiepricingdescriptorpb.js b/languages/js/closure/freebiepricingdescriptorpb.js index 9b33101..9c6cd49 100644 --- a/languages/js/closure/freebiepricingdescriptorpb.js +++ b/languages/js/closure/freebiepricingdescriptorpb.js @@ -1,15 +1,17 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! goog.provide('proto.FreebiePricingDescriptor'); -goog.require('jspb.Message'); goog.require('jspb.BinaryReader'); goog.require('jspb.BinaryWriter'); +goog.require('jspb.Message'); /** @@ -54,6 +56,7 @@ proto.FreebiePricingDescriptor.prototype.toObject = function(opt_includeInstance * http://goto/soy-param-migration * @param {!proto.FreebiePricingDescriptor} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.FreebiePricingDescriptor.toObject = function(includeInstance, msg) { var f, obj = { @@ -119,6 +122,7 @@ proto.FreebiePricingDescriptor.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.FreebiePricingDescriptor} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.FreebiePricingDescriptor.serializeBinaryToWriter = function(message, writer) { var f = undefined; diff --git a/languages/js/closure/geneticspb.js b/languages/js/closure/geneticspb.js index 12ac3fd..d1b355c 100644 --- a/languages/js/closure/geneticspb.js +++ b/languages/js/closure/geneticspb.js @@ -1,15 +1,17 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! goog.provide('proto.Genetics'); -goog.require('jspb.Message'); goog.require('jspb.BinaryReader'); goog.require('jspb.BinaryWriter'); +goog.require('jspb.Message'); goog.require('proto.Name'); @@ -55,6 +57,7 @@ proto.Genetics.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.Genetics} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.Genetics.toObject = function(includeInstance, msg) { var f, obj = { @@ -131,6 +134,7 @@ proto.Genetics.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.Genetics} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.Genetics.serializeBinaryToWriter = function(message, writer) { var f = undefined; diff --git a/languages/js/closure/growpb.js b/languages/js/closure/growpb.js index 7caa551..61e1f55 100644 --- a/languages/js/closure/growpb.js +++ b/languages/js/closure/growpb.js @@ -1,6 +1,8 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! diff --git a/languages/js/closure/imagetypepb.js b/languages/js/closure/imagetypepb.js index 488f2a7..c8343d1 100644 --- a/languages/js/closure/imagetypepb.js +++ b/languages/js/closure/imagetypepb.js @@ -1,6 +1,8 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! @@ -8,9 +10,9 @@ goog.provide('proto.ImageType'); goog.provide('proto.ImageType.ImageKind'); -goog.require('jspb.Message'); goog.require('jspb.BinaryReader'); goog.require('jspb.BinaryWriter'); +goog.require('jspb.Message'); /** @@ -55,6 +57,7 @@ proto.ImageType.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.ImageType} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ImageType.toObject = function(includeInstance, msg) { var f, obj = { @@ -124,6 +127,7 @@ proto.ImageType.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.ImageType} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ImageType.serializeBinaryToWriter = function(message, writer) { var f = undefined; diff --git a/languages/js/closure/languagepb.js b/languages/js/closure/languagepb.js index dc5bc35..de7a5b8 100644 --- a/languages/js/closure/languagepb.js +++ b/languages/js/closure/languagepb.js @@ -1,6 +1,8 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! diff --git a/languages/js/closure/materialsdatapb.js b/languages/js/closure/materialsdatapb.js index a5ffe63..3fbc677 100644 --- a/languages/js/closure/materialsdatapb.js +++ b/languages/js/closure/materialsdatapb.js @@ -1,15 +1,17 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! goog.provide('proto.MaterialsData'); -goog.require('jspb.Message'); goog.require('jspb.BinaryReader'); goog.require('jspb.BinaryWriter'); +goog.require('jspb.Message'); goog.require('proto.Genetics'); goog.forwardDeclare('proto.Grow'); @@ -64,10 +66,11 @@ proto.MaterialsData.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.MaterialsData} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.MaterialsData.toObject = function(includeInstance, msg) { var f, obj = { - ingredientsList: jspb.Message.getField(msg, 1), + ingredientsList: jspb.Message.getRepeatedField(msg, 1), grow: jspb.Message.getFieldWithDefault(msg, 2, 0), species: jspb.Message.getFieldWithDefault(msg, 3, 0), genetics: (f = msg.getGenetics()) && proto.Genetics.toObject(includeInstance, f) @@ -149,6 +152,7 @@ proto.MaterialsData.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.MaterialsData} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.MaterialsData.serializeBinaryToWriter = function(message, writer) { var f = undefined; @@ -186,12 +190,10 @@ proto.MaterialsData.serializeBinaryToWriter = function(message, writer) { /** * repeated string ingredients = 1; - * If you change this array by adding, removing or replacing elements, or if you - * replace the array itself, then you must call the setter to update it. * @return {!Array.} */ proto.MaterialsData.prototype.getIngredientsList = function() { - return /** @type {!Array.} */ (jspb.Message.getField(this, 1)); + return /** @type {!Array.} */ (jspb.Message.getRepeatedField(this, 1)); }; diff --git a/languages/js/closure/mediaitempb.js b/languages/js/closure/mediaitempb.js index ee75565..415ee96 100644 --- a/languages/js/closure/mediaitempb.js +++ b/languages/js/closure/mediaitempb.js @@ -1,15 +1,17 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! goog.provide('proto.MediaItem'); -goog.require('jspb.Message'); goog.require('jspb.BinaryReader'); goog.require('jspb.BinaryWriter'); +goog.require('jspb.Message'); goog.require('proto.MediaKey'); goog.require('proto.MediaType'); @@ -56,6 +58,7 @@ proto.MediaItem.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.MediaItem} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.MediaItem.toObject = function(includeInstance, msg) { var f, obj = { @@ -137,6 +140,7 @@ proto.MediaItem.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.MediaItem} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.MediaItem.serializeBinaryToWriter = function(message, writer) { var f = undefined; diff --git a/languages/js/closure/mediakeypb.js b/languages/js/closure/mediakeypb.js index 3d943fb..529abfd 100644 --- a/languages/js/closure/mediakeypb.js +++ b/languages/js/closure/mediakeypb.js @@ -1,15 +1,17 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! goog.provide('proto.MediaKey'); -goog.require('jspb.Message'); goog.require('jspb.BinaryReader'); goog.require('jspb.BinaryWriter'); +goog.require('jspb.Message'); /** @@ -54,6 +56,7 @@ proto.MediaKey.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.MediaKey} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.MediaKey.toObject = function(includeInstance, msg) { var f, obj = { @@ -123,6 +126,7 @@ proto.MediaKey.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.MediaKey} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.MediaKey.serializeBinaryToWriter = function(message, writer) { var f = undefined; diff --git a/languages/js/closure/mediatypepb.js b/languages/js/closure/mediatypepb.js index b2ab16f..557ad6b 100644 --- a/languages/js/closure/mediatypepb.js +++ b/languages/js/closure/mediatypepb.js @@ -1,6 +1,8 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! @@ -8,9 +10,9 @@ goog.provide('proto.MediaType'); goog.provide('proto.MediaType.Kind'); -goog.require('jspb.Message'); goog.require('jspb.BinaryReader'); goog.require('jspb.BinaryWriter'); +goog.require('jspb.Message'); goog.require('proto.DocumentType'); goog.require('proto.ImageType'); goog.require('proto.VideoType'); @@ -58,6 +60,7 @@ proto.MediaType.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.MediaType} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.MediaType.toObject = function(includeInstance, msg) { var f, obj = { @@ -145,6 +148,7 @@ proto.MediaType.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.MediaType} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.MediaType.serializeBinaryToWriter = function(message, writer) { var f = undefined; diff --git a/languages/js/closure/namepb.js b/languages/js/closure/namepb.js index fc28315..f873035 100644 --- a/languages/js/closure/namepb.js +++ b/languages/js/closure/namepb.js @@ -1,15 +1,17 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! goog.provide('proto.Name'); -goog.require('jspb.Message'); goog.require('jspb.BinaryReader'); goog.require('jspb.BinaryWriter'); +goog.require('jspb.Message'); /** @@ -54,6 +56,7 @@ proto.Name.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.Name} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.Name.toObject = function(includeInstance, msg) { var f, obj = { @@ -128,6 +131,7 @@ proto.Name.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.Name} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.Name.serializeBinaryToWriter = function(message, writer) { var f = undefined; diff --git a/languages/js/closure/pricingdescriptorpb.js b/languages/js/closure/pricingdescriptorpb.js index 51d94b2..c3b4f67 100644 --- a/languages/js/closure/pricingdescriptorpb.js +++ b/languages/js/closure/pricingdescriptorpb.js @@ -1,15 +1,17 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! goog.provide('proto.PricingDescriptor'); -goog.require('jspb.Message'); goog.require('jspb.BinaryReader'); goog.require('jspb.BinaryWriter'); +goog.require('jspb.Message'); goog.require('proto.FreebiePricingDescriptor'); goog.require('proto.UnitPricingDescriptor'); goog.require('proto.WeightedPricingDescriptor'); @@ -58,6 +60,7 @@ proto.PricingDescriptor.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.PricingDescriptor} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.PricingDescriptor.toObject = function(includeInstance, msg) { var f, obj = { @@ -145,6 +148,7 @@ proto.PricingDescriptor.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.PricingDescriptor} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.PricingDescriptor.serializeBinaryToWriter = function(message, writer) { var f = undefined; diff --git a/languages/js/closure/pricingtieravailabilitypb.js b/languages/js/closure/pricingtieravailabilitypb.js index d81dff1..92d72fc 100644 --- a/languages/js/closure/pricingtieravailabilitypb.js +++ b/languages/js/closure/pricingtieravailabilitypb.js @@ -1,15 +1,17 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! goog.provide('proto.PricingTierAvailability'); -goog.require('jspb.Message'); goog.require('jspb.BinaryReader'); goog.require('jspb.BinaryWriter'); +goog.require('jspb.Message'); /** @@ -54,6 +56,7 @@ proto.PricingTierAvailability.prototype.toObject = function(opt_includeInstance) * http://goto/soy-param-migration * @param {!proto.PricingTierAvailability} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.PricingTierAvailability.toObject = function(includeInstance, msg) { var f, obj = { @@ -128,6 +131,7 @@ proto.PricingTierAvailability.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.PricingTierAvailability} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.PricingTierAvailability.serializeBinaryToWriter = function(message, writer) { var f = undefined; diff --git a/languages/js/closure/pricingtypepb.js b/languages/js/closure/pricingtypepb.js index 8672487..1fde416 100644 --- a/languages/js/closure/pricingtypepb.js +++ b/languages/js/closure/pricingtypepb.js @@ -1,6 +1,8 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! diff --git a/languages/js/closure/pricingweighttierpb.js b/languages/js/closure/pricingweighttierpb.js index 712be5a..4bb4066 100644 --- a/languages/js/closure/pricingweighttierpb.js +++ b/languages/js/closure/pricingweighttierpb.js @@ -1,6 +1,8 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! diff --git a/languages/js/closure/productcontentpb.js b/languages/js/closure/productcontentpb.js index 1075e86..02f983c 100644 --- a/languages/js/closure/productcontentpb.js +++ b/languages/js/closure/productcontentpb.js @@ -1,15 +1,17 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! goog.provide('proto.ProductContent'); -goog.require('jspb.Message'); goog.require('jspb.BinaryReader'); goog.require('jspb.BinaryWriter'); +goog.require('jspb.Message'); goog.require('proto.Brand'); goog.require('proto.Content'); goog.require('proto.MediaItem'); @@ -65,6 +67,7 @@ proto.ProductContent.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.ProductContent} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ProductContent.toObject = function(includeInstance, msg) { var f, obj = { @@ -172,6 +175,7 @@ proto.ProductContent.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.ProductContent} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ProductContent.serializeBinaryToWriter = function(message, writer) { var f = undefined; @@ -326,8 +330,6 @@ proto.ProductContent.prototype.hasBrand = function() { /** * repeated MediaItem media = 20; - * If you change this array by adding, removing or replacing elements, or if you - * replace the array itself, then you must call the setter to update it. * @return {!Array.} */ proto.ProductContent.prototype.getMediaList = function() { diff --git a/languages/js/closure/productflagpb.js b/languages/js/closure/productflagpb.js index d6dccf0..f0f5717 100644 --- a/languages/js/closure/productflagpb.js +++ b/languages/js/closure/productflagpb.js @@ -1,6 +1,8 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! diff --git a/languages/js/closure/productflagsetpb.js b/languages/js/closure/productflagsetpb.js index b76fa85..56b9935 100644 --- a/languages/js/closure/productflagsetpb.js +++ b/languages/js/closure/productflagsetpb.js @@ -1,15 +1,17 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! goog.provide('proto.ProductFlagset'); -goog.require('jspb.Message'); goog.require('jspb.BinaryReader'); goog.require('jspb.BinaryWriter'); +goog.require('jspb.Message'); goog.require('proto.ProductFlagValue'); @@ -62,6 +64,7 @@ proto.ProductFlagset.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.ProductFlagset} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ProductFlagset.toObject = function(includeInstance, msg) { var f, obj = { @@ -133,6 +136,7 @@ proto.ProductFlagset.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.ProductFlagset} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ProductFlagset.serializeBinaryToWriter = function(message, writer) { var f = undefined; @@ -149,8 +153,6 @@ proto.ProductFlagset.serializeBinaryToWriter = function(message, writer) { /** * repeated ProductFlagValue flags = 1; - * If you change this array by adding, removing or replacing elements, or if you - * replace the array itself, then you must call the setter to update it. * @return {!Array.} */ proto.ProductFlagset.prototype.getFlagsList = function() { diff --git a/languages/js/closure/productflagvaluepb.js b/languages/js/closure/productflagvaluepb.js index 1493f63..ca6389b 100644 --- a/languages/js/closure/productflagvaluepb.js +++ b/languages/js/closure/productflagvaluepb.js @@ -1,15 +1,17 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! goog.provide('proto.ProductFlagValue'); -goog.require('jspb.Message'); goog.require('jspb.BinaryReader'); goog.require('jspb.BinaryWriter'); +goog.require('jspb.Message'); goog.forwardDeclare('proto.ProductFlag'); @@ -55,6 +57,7 @@ proto.ProductFlagValue.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.ProductFlagValue} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ProductFlagValue.toObject = function(includeInstance, msg) { var f, obj = { @@ -129,6 +132,7 @@ proto.ProductFlagValue.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.ProductFlagValue} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ProductFlagValue.serializeBinaryToWriter = function(message, writer) { var f = undefined; diff --git a/languages/js/closure/productkeypb.js b/languages/js/closure/productkeypb.js index 2425198..1ce8b26 100644 --- a/languages/js/closure/productkeypb.js +++ b/languages/js/closure/productkeypb.js @@ -1,15 +1,17 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! goog.provide('proto.ProductKey'); -goog.require('jspb.Message'); goog.require('jspb.BinaryReader'); goog.require('jspb.BinaryWriter'); +goog.require('jspb.Message'); /** @@ -54,6 +56,7 @@ proto.ProductKey.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.ProductKey} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ProductKey.toObject = function(includeInstance, msg) { var f, obj = { @@ -123,6 +126,7 @@ proto.ProductKey.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.ProductKey} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ProductKey.serializeBinaryToWriter = function(message, writer) { var f = undefined; diff --git a/languages/js/closure/productkindpb.js b/languages/js/closure/productkindpb.js index ecd9842..3f85aa7 100644 --- a/languages/js/closure/productkindpb.js +++ b/languages/js/closure/productkindpb.js @@ -1,6 +1,8 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! diff --git a/languages/js/closure/productpb.js b/languages/js/closure/productpb.js index f7158b6..cb302e1 100644 --- a/languages/js/closure/productpb.js +++ b/languages/js/closure/productpb.js @@ -1,15 +1,17 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! goog.provide('proto.Product'); -goog.require('jspb.Message'); goog.require('jspb.BinaryReader'); goog.require('jspb.BinaryWriter'); +goog.require('jspb.Message'); goog.require('proto.ProductKey'); goog.require('proto.ProductType'); goog.require('proto.google.protobuf.Any'); @@ -57,6 +59,7 @@ proto.Product.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.Product} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.Product.toObject = function(includeInstance, msg) { var f, obj = { @@ -139,6 +142,7 @@ proto.Product.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.Product} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.Product.serializeBinaryToWriter = function(message, writer) { var f = undefined; diff --git a/languages/js/closure/productpricingpb.js b/languages/js/closure/productpricingpb.js index 8580649..ad0826e 100644 --- a/languages/js/closure/productpricingpb.js +++ b/languages/js/closure/productpricingpb.js @@ -1,15 +1,17 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! goog.provide('proto.ProductPricing'); -goog.require('jspb.Message'); goog.require('jspb.BinaryReader'); goog.require('jspb.BinaryWriter'); +goog.require('jspb.Message'); goog.require('proto.PricingDescriptor'); goog.require('proto.SaleDescriptor'); @@ -63,6 +65,7 @@ proto.ProductPricing.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.ProductPricing} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ProductPricing.toObject = function(includeInstance, msg) { var f, obj = { @@ -141,6 +144,7 @@ proto.ProductPricing.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.ProductPricing} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ProductPricing.serializeBinaryToWriter = function(message, writer) { var f = undefined; @@ -165,8 +169,6 @@ proto.ProductPricing.serializeBinaryToWriter = function(message, writer) { /** * repeated SaleDescriptor discounts = 1; - * If you change this array by adding, removing or replacing elements, or if you - * replace the array itself, then you must call the setter to update it. * @return {!Array.} */ proto.ProductPricing.prototype.getDiscountsList = function() { @@ -198,8 +200,6 @@ proto.ProductPricing.prototype.clearDiscountsList = function() { /** * repeated PricingDescriptor manifest = 2; - * If you change this array by adding, removing or replacing elements, or if you - * replace the array itself, then you must call the setter to update it. * @return {!Array.} */ proto.ProductPricing.prototype.getManifestList = function() { diff --git a/languages/js/closure/producttypepb.js b/languages/js/closure/producttypepb.js index d5209ec..4e217ae 100644 --- a/languages/js/closure/producttypepb.js +++ b/languages/js/closure/producttypepb.js @@ -1,15 +1,17 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! goog.provide('proto.ProductType'); -goog.require('jspb.Message'); goog.require('jspb.BinaryReader'); goog.require('jspb.BinaryWriter'); +goog.require('jspb.Message'); goog.forwardDeclare('proto.ProductKind'); @@ -55,6 +57,7 @@ proto.ProductType.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.ProductType} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ProductType.toObject = function(includeInstance, msg) { var f, obj = { @@ -124,6 +127,7 @@ proto.ProductType.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.ProductType} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ProductType.serializeBinaryToWriter = function(message, writer) { var f = undefined; diff --git a/languages/js/closure/saledescriptorpb.js b/languages/js/closure/saledescriptorpb.js index d1ae833..61995ac 100644 --- a/languages/js/closure/saledescriptorpb.js +++ b/languages/js/closure/saledescriptorpb.js @@ -1,15 +1,17 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! goog.provide('proto.SaleDescriptor'); -goog.require('jspb.Message'); goog.require('jspb.BinaryReader'); goog.require('jspb.BinaryWriter'); +goog.require('jspb.Message'); goog.forwardDeclare('proto.SaleType'); @@ -55,6 +57,7 @@ proto.SaleDescriptor.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.SaleDescriptor} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.SaleDescriptor.toObject = function(includeInstance, msg) { var f, obj = { @@ -159,6 +162,7 @@ proto.SaleDescriptor.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.SaleDescriptor} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.SaleDescriptor.serializeBinaryToWriter = function(message, writer) { var f = undefined; diff --git a/languages/js/closure/saletypepb.js b/languages/js/closure/saletypepb.js index 62cca76..fd88bd3 100644 --- a/languages/js/closure/saletypepb.js +++ b/languages/js/closure/saletypepb.js @@ -1,6 +1,8 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! diff --git a/languages/js/closure/speciespb.js b/languages/js/closure/speciespb.js index 194f974..5ee6bff 100644 --- a/languages/js/closure/speciespb.js +++ b/languages/js/closure/speciespb.js @@ -1,6 +1,8 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! diff --git a/languages/js/closure/unitpricingdescriptorpb.js b/languages/js/closure/unitpricingdescriptorpb.js index c205b3e..7177414 100644 --- a/languages/js/closure/unitpricingdescriptorpb.js +++ b/languages/js/closure/unitpricingdescriptorpb.js @@ -1,15 +1,17 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! goog.provide('proto.UnitPricingDescriptor'); -goog.require('jspb.Message'); goog.require('jspb.BinaryReader'); goog.require('jspb.BinaryWriter'); +goog.require('jspb.Message'); goog.require('proto.PricingTierAvailability'); goog.require('proto.SaleDescriptor'); @@ -63,6 +65,7 @@ proto.UnitPricingDescriptor.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.UnitPricingDescriptor} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.UnitPricingDescriptor.toObject = function(includeInstance, msg) { var f, obj = { @@ -145,6 +148,7 @@ proto.UnitPricingDescriptor.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.UnitPricingDescriptor} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.UnitPricingDescriptor.serializeBinaryToWriter = function(message, writer) { var f = undefined; @@ -221,8 +225,6 @@ proto.UnitPricingDescriptor.prototype.hasStatus = function() { /** * repeated SaleDescriptor discounts = 3; - * If you change this array by adding, removing or replacing elements, or if you - * replace the array itself, then you must call the setter to update it. * @return {!Array.} */ proto.UnitPricingDescriptor.prototype.getDiscountsList = function() { diff --git a/languages/js/closure/videotypepb.js b/languages/js/closure/videotypepb.js index ada53c4..6d83488 100644 --- a/languages/js/closure/videotypepb.js +++ b/languages/js/closure/videotypepb.js @@ -1,6 +1,8 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! @@ -8,9 +10,9 @@ goog.provide('proto.VideoType'); goog.provide('proto.VideoType.VideoKind'); -goog.require('jspb.Message'); goog.require('jspb.BinaryReader'); goog.require('jspb.BinaryWriter'); +goog.require('jspb.Message'); /** @@ -55,6 +57,7 @@ proto.VideoType.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.VideoType} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.VideoType.toObject = function(includeInstance, msg) { var f, obj = { @@ -124,6 +127,7 @@ proto.VideoType.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.VideoType} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.VideoType.serializeBinaryToWriter = function(message, writer) { var f = undefined; diff --git a/languages/js/closure/weightedpricingdescriptorpb.js b/languages/js/closure/weightedpricingdescriptorpb.js index cbdd65e..e54a7ca 100644 --- a/languages/js/closure/weightedpricingdescriptorpb.js +++ b/languages/js/closure/weightedpricingdescriptorpb.js @@ -1,15 +1,17 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! goog.provide('proto.WeightedPricingDescriptor'); -goog.require('jspb.Message'); goog.require('jspb.BinaryReader'); goog.require('jspb.BinaryWriter'); +goog.require('jspb.Message'); goog.require('proto.UnitPricingDescriptor'); goog.forwardDeclare('proto.PricingWeightTier'); @@ -56,6 +58,7 @@ proto.WeightedPricingDescriptor.prototype.toObject = function(opt_includeInstanc * http://goto/soy-param-migration * @param {!proto.WeightedPricingDescriptor} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.WeightedPricingDescriptor.toObject = function(includeInstance, msg) { var f, obj = { @@ -136,6 +139,7 @@ proto.WeightedPricingDescriptor.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.WeightedPricingDescriptor} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.WeightedPricingDescriptor.serializeBinaryToWriter = function(message, writer) { var f = undefined; diff --git a/languages/js/commonjs/Product_pb.js b/languages/js/commonjs/Product_pb.js index 2a6f818..71ab8f8 100644 --- a/languages/js/commonjs/Product_pb.js +++ b/languages/js/commonjs/Product_pb.js @@ -1,6 +1,8 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! @@ -56,6 +58,7 @@ proto.Product.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.Product} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.Product.toObject = function(includeInstance, msg) { var f, obj = { @@ -138,6 +141,7 @@ proto.Product.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.Product} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.Product.serializeBinaryToWriter = function(message, writer) { var f = undefined; diff --git a/languages/js/commonjs/base/Compression_pb.js b/languages/js/commonjs/base/Compression_pb.js index 92fa5b4..1a00537 100644 --- a/languages/js/commonjs/base/Compression_pb.js +++ b/languages/js/commonjs/base/Compression_pb.js @@ -1,6 +1,8 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! @@ -54,6 +56,7 @@ proto.Compression.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.Compression} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.Compression.toObject = function(includeInstance, msg) { var f, obj = { @@ -128,6 +131,7 @@ proto.Compression.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.Compression} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.Compression.serializeBinaryToWriter = function(message, writer) { var f = undefined; diff --git a/languages/js/commonjs/base/Language_pb.js b/languages/js/commonjs/base/Language_pb.js index 891a023..5b70d66 100644 --- a/languages/js/commonjs/base/Language_pb.js +++ b/languages/js/commonjs/base/Language_pb.js @@ -1,6 +1,8 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! diff --git a/languages/js/commonjs/base/ProductKey_pb.js b/languages/js/commonjs/base/ProductKey_pb.js index 18ac607..28fec5d 100644 --- a/languages/js/commonjs/base/ProductKey_pb.js +++ b/languages/js/commonjs/base/ProductKey_pb.js @@ -1,6 +1,8 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! @@ -53,6 +55,7 @@ proto.ProductKey.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.ProductKey} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ProductKey.toObject = function(includeInstance, msg) { var f, obj = { @@ -122,6 +125,7 @@ proto.ProductKey.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.ProductKey} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ProductKey.serializeBinaryToWriter = function(message, writer) { var f = undefined; diff --git a/languages/js/commonjs/base/ProductKind_pb.js b/languages/js/commonjs/base/ProductKind_pb.js index 96320e4..9aa4523 100644 --- a/languages/js/commonjs/base/ProductKind_pb.js +++ b/languages/js/commonjs/base/ProductKind_pb.js @@ -1,6 +1,8 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! diff --git a/languages/js/commonjs/base/ProductType_pb.js b/languages/js/commonjs/base/ProductType_pb.js index fda3d0f..981134d 100644 --- a/languages/js/commonjs/base/ProductType_pb.js +++ b/languages/js/commonjs/base/ProductType_pb.js @@ -1,6 +1,8 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! @@ -54,6 +56,7 @@ proto.ProductType.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.ProductType} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ProductType.toObject = function(includeInstance, msg) { var f, obj = { @@ -123,6 +126,7 @@ proto.ProductType.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.ProductType} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ProductType.serializeBinaryToWriter = function(message, writer) { var f = undefined; diff --git a/languages/js/commonjs/content/Brand_pb.js b/languages/js/commonjs/content/Brand_pb.js index 58442c3..c104d7f 100644 --- a/languages/js/commonjs/content/Brand_pb.js +++ b/languages/js/commonjs/content/Brand_pb.js @@ -1,6 +1,8 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! @@ -63,6 +65,7 @@ proto.Brand.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.Brand} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.Brand.toObject = function(includeInstance, msg) { var f, obj = { @@ -152,6 +155,7 @@ proto.Brand.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.Brand} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.Brand.serializeBinaryToWriter = function(message, writer) { var f = undefined; @@ -282,8 +286,6 @@ proto.Brand.prototype.hasSummary = function() { /** * repeated MediaItem media = 20; - * If you change this array by adding, removing or replacing elements, or if you - * replace the array itself, then you must call the setter to update it. * @return {!Array.} */ proto.Brand.prototype.getMediaList = function() { diff --git a/languages/js/commonjs/content/Content_pb.js b/languages/js/commonjs/content/Content_pb.js index 06ad4b9..f8616af 100644 --- a/languages/js/commonjs/content/Content_pb.js +++ b/languages/js/commonjs/content/Content_pb.js @@ -1,6 +1,8 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! @@ -57,6 +59,7 @@ proto.Content.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.Content} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.Content.toObject = function(includeInstance, msg) { var f, obj = { @@ -147,6 +150,7 @@ proto.Content.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.Content} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.Content.serializeBinaryToWriter = function(message, writer) { var f = undefined; diff --git a/languages/js/commonjs/content/MaterialsData_pb.js b/languages/js/commonjs/content/MaterialsData_pb.js index f4728d8..3f9d94c 100644 --- a/languages/js/commonjs/content/MaterialsData_pb.js +++ b/languages/js/commonjs/content/MaterialsData_pb.js @@ -1,6 +1,8 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! @@ -63,10 +65,11 @@ proto.MaterialsData.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.MaterialsData} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.MaterialsData.toObject = function(includeInstance, msg) { var f, obj = { - ingredientsList: jspb.Message.getField(msg, 1), + ingredientsList: jspb.Message.getRepeatedField(msg, 1), grow: jspb.Message.getFieldWithDefault(msg, 2, 0), species: jspb.Message.getFieldWithDefault(msg, 3, 0), genetics: (f = msg.getGenetics()) && structs_Genetics_pb.Genetics.toObject(includeInstance, f) @@ -148,6 +151,7 @@ proto.MaterialsData.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.MaterialsData} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.MaterialsData.serializeBinaryToWriter = function(message, writer) { var f = undefined; @@ -185,12 +189,10 @@ proto.MaterialsData.serializeBinaryToWriter = function(message, writer) { /** * repeated string ingredients = 1; - * If you change this array by adding, removing or replacing elements, or if you - * replace the array itself, then you must call the setter to update it. * @return {!Array.} */ proto.MaterialsData.prototype.getIngredientsList = function() { - return /** @type {!Array.} */ (jspb.Message.getField(this, 1)); + return /** @type {!Array.} */ (jspb.Message.getRepeatedField(this, 1)); }; diff --git a/languages/js/commonjs/content/Name_pb.js b/languages/js/commonjs/content/Name_pb.js index 025b5af..f4d63c1 100644 --- a/languages/js/commonjs/content/Name_pb.js +++ b/languages/js/commonjs/content/Name_pb.js @@ -1,6 +1,8 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! @@ -53,6 +55,7 @@ proto.Name.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.Name} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.Name.toObject = function(includeInstance, msg) { var f, obj = { @@ -127,6 +130,7 @@ proto.Name.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.Name} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.Name.serializeBinaryToWriter = function(message, writer) { var f = undefined; diff --git a/languages/js/commonjs/content/ProductContent_pb.js b/languages/js/commonjs/content/ProductContent_pb.js index 2ef8539..3c39e23 100644 --- a/languages/js/commonjs/content/ProductContent_pb.js +++ b/languages/js/commonjs/content/ProductContent_pb.js @@ -1,6 +1,8 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! @@ -64,6 +66,7 @@ proto.ProductContent.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.ProductContent} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ProductContent.toObject = function(includeInstance, msg) { var f, obj = { @@ -171,6 +174,7 @@ proto.ProductContent.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.ProductContent} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ProductContent.serializeBinaryToWriter = function(message, writer) { var f = undefined; @@ -325,8 +329,6 @@ proto.ProductContent.prototype.hasBrand = function() { /** * repeated MediaItem media = 20; - * If you change this array by adding, removing or replacing elements, or if you - * replace the array itself, then you must call the setter to update it. * @return {!Array.} */ proto.ProductContent.prototype.getMediaList = function() { diff --git a/languages/js/commonjs/geo/Address_pb.js b/languages/js/commonjs/geo/Address_pb.js new file mode 100644 index 0000000..2914c5b --- /dev/null +++ b/languages/js/commonjs/geo/Address_pb.js @@ -0,0 +1,292 @@ +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +goog.exportSymbol('proto.Address', null, global); + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.Address = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.Address, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.Address.displayName = 'proto.Address'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.Address.prototype.toObject = function(opt_includeInstance) { + return proto.Address.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.Address} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.Address.toObject = function(includeInstance, msg) { + var f, obj = { + firstLine: jspb.Message.getFieldWithDefault(msg, 1, ""), + secondLine: jspb.Message.getFieldWithDefault(msg, 2, ""), + city: jspb.Message.getFieldWithDefault(msg, 3, ""), + state: jspb.Message.getFieldWithDefault(msg, 4, ""), + zipcode: jspb.Message.getFieldWithDefault(msg, 5, ""), + country: jspb.Message.getFieldWithDefault(msg, 6, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.Address} + */ +proto.Address.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.Address; + return proto.Address.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.Address} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.Address} + */ +proto.Address.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setFirstLine(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setSecondLine(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setCity(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setState(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setZipcode(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setCountry(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.Address.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.Address.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.Address} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.Address.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFirstLine(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getSecondLine(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getCity(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getState(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getZipcode(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getCountry(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } +}; + + +/** + * optional string first_line = 1; + * @return {string} + */ +proto.Address.prototype.getFirstLine = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.Address.prototype.setFirstLine = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional string second_line = 2; + * @return {string} + */ +proto.Address.prototype.getSecondLine = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** @param {string} value */ +proto.Address.prototype.setSecondLine = function(value) { + jspb.Message.setField(this, 2, value); +}; + + +/** + * optional string city = 3; + * @return {string} + */ +proto.Address.prototype.getCity = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** @param {string} value */ +proto.Address.prototype.setCity = function(value) { + jspb.Message.setField(this, 3, value); +}; + + +/** + * optional string state = 4; + * @return {string} + */ +proto.Address.prototype.getState = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** @param {string} value */ +proto.Address.prototype.setState = function(value) { + jspb.Message.setField(this, 4, value); +}; + + +/** + * optional string zipcode = 5; + * @return {string} + */ +proto.Address.prototype.getZipcode = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** @param {string} value */ +proto.Address.prototype.setZipcode = function(value) { + jspb.Message.setField(this, 5, value); +}; + + +/** + * optional string country = 6; + * @return {string} + */ +proto.Address.prototype.getCountry = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** @param {string} value */ +proto.Address.prototype.setCountry = function(value) { + jspb.Message.setField(this, 6, value); +}; + + +goog.object.extend(exports, proto); diff --git a/languages/js/commonjs/media/MediaItem_pb.js b/languages/js/commonjs/media/MediaItem_pb.js index 2fb6da9..6a955d8 100644 --- a/languages/js/commonjs/media/MediaItem_pb.js +++ b/languages/js/commonjs/media/MediaItem_pb.js @@ -1,6 +1,8 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! @@ -55,6 +57,7 @@ proto.MediaItem.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.MediaItem} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.MediaItem.toObject = function(includeInstance, msg) { var f, obj = { @@ -136,6 +139,7 @@ proto.MediaItem.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.MediaItem} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.MediaItem.serializeBinaryToWriter = function(message, writer) { var f = undefined; diff --git a/languages/js/commonjs/media/MediaKey_pb.js b/languages/js/commonjs/media/MediaKey_pb.js index 0dbf600..c86b8e7 100644 --- a/languages/js/commonjs/media/MediaKey_pb.js +++ b/languages/js/commonjs/media/MediaKey_pb.js @@ -1,6 +1,8 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! @@ -53,6 +55,7 @@ proto.MediaKey.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.MediaKey} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.MediaKey.toObject = function(includeInstance, msg) { var f, obj = { @@ -122,6 +125,7 @@ proto.MediaKey.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.MediaKey} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.MediaKey.serializeBinaryToWriter = function(message, writer) { var f = undefined; diff --git a/languages/js/commonjs/media/MediaType_pb.js b/languages/js/commonjs/media/MediaType_pb.js index 245fe85..76005a3 100644 --- a/languages/js/commonjs/media/MediaType_pb.js +++ b/languages/js/commonjs/media/MediaType_pb.js @@ -1,6 +1,8 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! @@ -60,6 +62,7 @@ proto.MediaType.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.MediaType} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.MediaType.toObject = function(includeInstance, msg) { var f, obj = { @@ -147,6 +150,7 @@ proto.MediaType.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.MediaType} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.MediaType.serializeBinaryToWriter = function(message, writer) { var f = undefined; @@ -342,6 +346,7 @@ proto.ImageType.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.ImageType} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ImageType.toObject = function(includeInstance, msg) { var f, obj = { @@ -411,6 +416,7 @@ proto.ImageType.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.ImageType} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ImageType.serializeBinaryToWriter = function(message, writer) { var f = undefined; @@ -493,6 +499,7 @@ proto.DocumentType.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.DocumentType} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.DocumentType.toObject = function(includeInstance, msg) { var f, obj = { @@ -567,6 +574,7 @@ proto.DocumentType.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.DocumentType} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.DocumentType.serializeBinaryToWriter = function(message, writer) { var f = undefined; @@ -672,6 +680,7 @@ proto.VideoType.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.VideoType} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.VideoType.toObject = function(includeInstance, msg) { var f, obj = { @@ -741,6 +750,7 @@ proto.VideoType.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.VideoType} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.VideoType.serializeBinaryToWriter = function(message, writer) { var f = undefined; diff --git a/languages/js/commonjs/products/Flower_pb.js b/languages/js/commonjs/products/Flower_pb.js index a91160a..a851685 100644 --- a/languages/js/commonjs/products/Flower_pb.js +++ b/languages/js/commonjs/products/Flower_pb.js @@ -1,6 +1,8 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! @@ -58,6 +60,7 @@ proto.Flower.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.Flower} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.Flower.toObject = function(includeInstance, msg) { var f, obj = { @@ -152,6 +155,7 @@ proto.Flower.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.Flower} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.Flower.serializeBinaryToWriter = function(message, writer) { var f = undefined; diff --git a/languages/js/commonjs/structs/FlagsDescriptor_pb.js b/languages/js/commonjs/structs/FlagsDescriptor_pb.js index 02d10c9..86e8095 100644 --- a/languages/js/commonjs/structs/FlagsDescriptor_pb.js +++ b/languages/js/commonjs/structs/FlagsDescriptor_pb.js @@ -1,6 +1,8 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! @@ -56,6 +58,7 @@ proto.ProductFlagValue.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.ProductFlagValue} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ProductFlagValue.toObject = function(includeInstance, msg) { var f, obj = { @@ -130,6 +133,7 @@ proto.ProductFlagValue.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.ProductFlagValue} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ProductFlagValue.serializeBinaryToWriter = function(message, writer) { var f = undefined; @@ -232,6 +236,7 @@ proto.ProductFlagset.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.ProductFlagset} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ProductFlagset.toObject = function(includeInstance, msg) { var f, obj = { @@ -303,6 +308,7 @@ proto.ProductFlagset.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.ProductFlagset} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ProductFlagset.serializeBinaryToWriter = function(message, writer) { var f = undefined; @@ -319,8 +325,6 @@ proto.ProductFlagset.serializeBinaryToWriter = function(message, writer) { /** * repeated ProductFlagValue flags = 1; - * If you change this array by adding, removing or replacing elements, or if you - * replace the array itself, then you must call the setter to update it. * @return {!Array.} */ proto.ProductFlagset.prototype.getFlagsList = function() { @@ -393,6 +397,7 @@ proto.FlagsDescriptor.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.FlagsDescriptor} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.FlagsDescriptor.toObject = function(includeInstance, msg) { var f, obj = { @@ -482,6 +487,7 @@ proto.FlagsDescriptor.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.FlagsDescriptor} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.FlagsDescriptor.serializeBinaryToWriter = function(message, writer) { var f = undefined; diff --git a/languages/js/commonjs/structs/Genetics_pb.js b/languages/js/commonjs/structs/Genetics_pb.js index ebfec59..3478c07 100644 --- a/languages/js/commonjs/structs/Genetics_pb.js +++ b/languages/js/commonjs/structs/Genetics_pb.js @@ -1,6 +1,8 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! @@ -54,6 +56,7 @@ proto.Genetics.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.Genetics} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.Genetics.toObject = function(includeInstance, msg) { var f, obj = { @@ -130,6 +133,7 @@ proto.Genetics.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.Genetics} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.Genetics.serializeBinaryToWriter = function(message, writer) { var f = undefined; diff --git a/languages/js/commonjs/structs/Grow_pb.js b/languages/js/commonjs/structs/Grow_pb.js index 380f7bf..9acea1f 100644 --- a/languages/js/commonjs/structs/Grow_pb.js +++ b/languages/js/commonjs/structs/Grow_pb.js @@ -1,6 +1,8 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! diff --git a/languages/js/commonjs/structs/Species_pb.js b/languages/js/commonjs/structs/Species_pb.js index 8bd592c..88ecf96 100644 --- a/languages/js/commonjs/structs/Species_pb.js +++ b/languages/js/commonjs/structs/Species_pb.js @@ -1,6 +1,8 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! diff --git a/languages/js/commonjs/structs/pricing/PricingDescriptor_pb.js b/languages/js/commonjs/structs/pricing/PricingDescriptor_pb.js index a607691..5c63c12 100644 --- a/languages/js/commonjs/structs/pricing/PricingDescriptor_pb.js +++ b/languages/js/commonjs/structs/pricing/PricingDescriptor_pb.js @@ -1,6 +1,8 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! @@ -61,6 +63,7 @@ proto.PricingTierAvailability.prototype.toObject = function(opt_includeInstance) * http://goto/soy-param-migration * @param {!proto.PricingTierAvailability} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.PricingTierAvailability.toObject = function(includeInstance, msg) { var f, obj = { @@ -135,6 +138,7 @@ proto.PricingTierAvailability.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.PricingTierAvailability} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.PricingTierAvailability.serializeBinaryToWriter = function(message, writer) { var f = undefined; @@ -239,6 +243,7 @@ proto.UnitPricingDescriptor.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.UnitPricingDescriptor} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.UnitPricingDescriptor.toObject = function(includeInstance, msg) { var f, obj = { @@ -321,6 +326,7 @@ proto.UnitPricingDescriptor.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.UnitPricingDescriptor} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.UnitPricingDescriptor.serializeBinaryToWriter = function(message, writer) { var f = undefined; @@ -397,8 +403,6 @@ proto.UnitPricingDescriptor.prototype.hasStatus = function() { /** * repeated SaleDescriptor discounts = 3; - * If you change this array by adding, removing or replacing elements, or if you - * replace the array itself, then you must call the setter to update it. * @return {!Array.} */ proto.UnitPricingDescriptor.prototype.getDiscountsList = function() { @@ -471,6 +475,7 @@ proto.WeightedPricingDescriptor.prototype.toObject = function(opt_includeInstanc * http://goto/soy-param-migration * @param {!proto.WeightedPricingDescriptor} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.WeightedPricingDescriptor.toObject = function(includeInstance, msg) { var f, obj = { @@ -551,6 +556,7 @@ proto.WeightedPricingDescriptor.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.WeightedPricingDescriptor} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.WeightedPricingDescriptor.serializeBinaryToWriter = function(message, writer) { var f = undefined; @@ -682,6 +688,7 @@ proto.FreebiePricingDescriptor.prototype.toObject = function(opt_includeInstance * http://goto/soy-param-migration * @param {!proto.FreebiePricingDescriptor} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.FreebiePricingDescriptor.toObject = function(includeInstance, msg) { var f, obj = { @@ -747,6 +754,7 @@ proto.FreebiePricingDescriptor.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.FreebiePricingDescriptor} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.FreebiePricingDescriptor.serializeBinaryToWriter = function(message, writer) { var f = undefined; @@ -796,6 +804,7 @@ proto.PricingDescriptor.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.PricingDescriptor} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.PricingDescriptor.toObject = function(includeInstance, msg) { var f, obj = { @@ -883,6 +892,7 @@ proto.PricingDescriptor.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.PricingDescriptor} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.PricingDescriptor.serializeBinaryToWriter = function(message, writer) { var f = undefined; @@ -1075,6 +1085,7 @@ proto.ProductPricing.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.ProductPricing} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ProductPricing.toObject = function(includeInstance, msg) { var f, obj = { @@ -1153,6 +1164,7 @@ proto.ProductPricing.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.ProductPricing} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ProductPricing.serializeBinaryToWriter = function(message, writer) { var f = undefined; @@ -1177,8 +1189,6 @@ proto.ProductPricing.serializeBinaryToWriter = function(message, writer) { /** * repeated SaleDescriptor discounts = 1; - * If you change this array by adding, removing or replacing elements, or if you - * replace the array itself, then you must call the setter to update it. * @return {!Array.} */ proto.ProductPricing.prototype.getDiscountsList = function() { @@ -1210,8 +1220,6 @@ proto.ProductPricing.prototype.clearDiscountsList = function() { /** * repeated PricingDescriptor manifest = 2; - * If you change this array by adding, removing or replacing elements, or if you - * replace the array itself, then you must call the setter to update it. * @return {!Array.} */ proto.ProductPricing.prototype.getManifestList = function() { diff --git a/languages/js/commonjs/structs/pricing/SaleDescriptor_pb.js b/languages/js/commonjs/structs/pricing/SaleDescriptor_pb.js index d51169b..062f541 100644 --- a/languages/js/commonjs/structs/pricing/SaleDescriptor_pb.js +++ b/languages/js/commonjs/structs/pricing/SaleDescriptor_pb.js @@ -1,6 +1,8 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! @@ -54,6 +56,7 @@ proto.SaleDescriptor.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.SaleDescriptor} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.SaleDescriptor.toObject = function(includeInstance, msg) { var f, obj = { @@ -158,6 +161,7 @@ proto.SaleDescriptor.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.SaleDescriptor} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.SaleDescriptor.serializeBinaryToWriter = function(message, writer) { var f = undefined; diff --git a/languages/js/es6/Product_pb.js b/languages/js/es6/Product_pb.js index db37178..efb4722 100644 --- a/languages/js/es6/Product_pb.js +++ b/languages/js/es6/Product_pb.js @@ -1,6 +1,8 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! @@ -49,6 +51,7 @@ proto.Product.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.Product} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.Product.toObject = function(includeInstance, msg) { var f, obj = { @@ -131,6 +134,7 @@ proto.Product.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.Product} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.Product.serializeBinaryToWriter = function(message, writer) { var f = undefined; diff --git a/languages/js/es6/base/Compression_pb.js b/languages/js/es6/base/Compression_pb.js index 839c1e8..b4cdaea 100644 --- a/languages/js/es6/base/Compression_pb.js +++ b/languages/js/es6/base/Compression_pb.js @@ -1,6 +1,8 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! @@ -50,6 +52,7 @@ proto.Compression.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.Compression} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.Compression.toObject = function(includeInstance, msg) { var f, obj = { @@ -124,6 +127,7 @@ proto.Compression.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.Compression} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.Compression.serializeBinaryToWriter = function(message, writer) { var f = undefined; diff --git a/languages/js/es6/base/Language_pb.js b/languages/js/es6/base/Language_pb.js index 7730d4f..975cfbe 100644 --- a/languages/js/es6/base/Language_pb.js +++ b/languages/js/es6/base/Language_pb.js @@ -1,6 +1,8 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! diff --git a/languages/js/es6/base/ProductKey_pb.js b/languages/js/es6/base/ProductKey_pb.js index fbe4343..fb41a21 100644 --- a/languages/js/es6/base/ProductKey_pb.js +++ b/languages/js/es6/base/ProductKey_pb.js @@ -1,6 +1,8 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! @@ -49,6 +51,7 @@ proto.ProductKey.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.ProductKey} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ProductKey.toObject = function(includeInstance, msg) { var f, obj = { @@ -118,6 +121,7 @@ proto.ProductKey.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.ProductKey} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ProductKey.serializeBinaryToWriter = function(message, writer) { var f = undefined; diff --git a/languages/js/es6/base/ProductKind_pb.js b/languages/js/es6/base/ProductKind_pb.js index 9f1faa5..1f6699b 100644 --- a/languages/js/es6/base/ProductKind_pb.js +++ b/languages/js/es6/base/ProductKind_pb.js @@ -1,6 +1,8 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! diff --git a/languages/js/es6/base/ProductType_pb.js b/languages/js/es6/base/ProductType_pb.js index a4a3a63..5ae0459 100644 --- a/languages/js/es6/base/ProductType_pb.js +++ b/languages/js/es6/base/ProductType_pb.js @@ -1,6 +1,8 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! @@ -49,6 +51,7 @@ proto.ProductType.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.ProductType} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ProductType.toObject = function(includeInstance, msg) { var f, obj = { @@ -118,6 +121,7 @@ proto.ProductType.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.ProductType} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ProductType.serializeBinaryToWriter = function(message, writer) { var f = undefined; diff --git a/languages/js/es6/content/Brand_pb.js b/languages/js/es6/content/Brand_pb.js index a767a2b..0cb57ab 100644 --- a/languages/js/es6/content/Brand_pb.js +++ b/languages/js/es6/content/Brand_pb.js @@ -1,6 +1,8 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! @@ -56,6 +58,7 @@ proto.Brand.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.Brand} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.Brand.toObject = function(includeInstance, msg) { var f, obj = { @@ -145,6 +148,7 @@ proto.Brand.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.Brand} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.Brand.serializeBinaryToWriter = function(message, writer) { var f = undefined; @@ -275,8 +279,6 @@ proto.Brand.prototype.hasSummary = function() { /** * repeated MediaItem media = 20; - * If you change this array by adding, removing or replacing elements, or if you - * replace the array itself, then you must call the setter to update it. * @return {!Array.} */ proto.Brand.prototype.getMediaList = function() { diff --git a/languages/js/es6/content/Content_pb.js b/languages/js/es6/content/Content_pb.js index c8bd40b..3f464cb 100644 --- a/languages/js/es6/content/Content_pb.js +++ b/languages/js/es6/content/Content_pb.js @@ -1,6 +1,8 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! @@ -51,6 +53,7 @@ proto.Content.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.Content} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.Content.toObject = function(includeInstance, msg) { var f, obj = { @@ -141,6 +144,7 @@ proto.Content.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.Content} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.Content.serializeBinaryToWriter = function(message, writer) { var f = undefined; diff --git a/languages/js/es6/content/MaterialsData_pb.js b/languages/js/es6/content/MaterialsData_pb.js index 1c5deb9..4564fb8 100644 --- a/languages/js/es6/content/MaterialsData_pb.js +++ b/languages/js/es6/content/MaterialsData_pb.js @@ -1,6 +1,8 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! @@ -56,10 +58,11 @@ proto.MaterialsData.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.MaterialsData} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.MaterialsData.toObject = function(includeInstance, msg) { var f, obj = { - ingredientsList: jspb.Message.getField(msg, 1), + ingredientsList: jspb.Message.getRepeatedField(msg, 1), grow: jspb.Message.getFieldWithDefault(msg, 2, 0), species: jspb.Message.getFieldWithDefault(msg, 3, 0), genetics: (f = msg.getGenetics()) && proto.Genetics.toObject(includeInstance, f) @@ -141,6 +144,7 @@ proto.MaterialsData.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.MaterialsData} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.MaterialsData.serializeBinaryToWriter = function(message, writer) { var f = undefined; @@ -178,12 +182,10 @@ proto.MaterialsData.serializeBinaryToWriter = function(message, writer) { /** * repeated string ingredients = 1; - * If you change this array by adding, removing or replacing elements, or if you - * replace the array itself, then you must call the setter to update it. * @return {!Array.} */ proto.MaterialsData.prototype.getIngredientsList = function() { - return /** @type {!Array.} */ (jspb.Message.getField(this, 1)); + return /** @type {!Array.} */ (jspb.Message.getRepeatedField(this, 1)); }; diff --git a/languages/js/es6/content/Name_pb.js b/languages/js/es6/content/Name_pb.js index acbedba..4908fbf 100644 --- a/languages/js/es6/content/Name_pb.js +++ b/languages/js/es6/content/Name_pb.js @@ -1,6 +1,8 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! @@ -49,6 +51,7 @@ proto.Name.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.Name} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.Name.toObject = function(includeInstance, msg) { var f, obj = { @@ -123,6 +126,7 @@ proto.Name.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.Name} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.Name.serializeBinaryToWriter = function(message, writer) { var f = undefined; diff --git a/languages/js/es6/content/ProductContent_pb.js b/languages/js/es6/content/ProductContent_pb.js index e3b91a5..1498090 100644 --- a/languages/js/es6/content/ProductContent_pb.js +++ b/languages/js/es6/content/ProductContent_pb.js @@ -1,6 +1,8 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! @@ -56,6 +58,7 @@ proto.ProductContent.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.ProductContent} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ProductContent.toObject = function(includeInstance, msg) { var f, obj = { @@ -163,6 +166,7 @@ proto.ProductContent.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.ProductContent} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ProductContent.serializeBinaryToWriter = function(message, writer) { var f = undefined; @@ -317,8 +321,6 @@ proto.ProductContent.prototype.hasBrand = function() { /** * repeated MediaItem media = 20; - * If you change this array by adding, removing or replacing elements, or if you - * replace the array itself, then you must call the setter to update it. * @return {!Array.} */ proto.ProductContent.prototype.getMediaList = function() { diff --git a/languages/js/es6/geo/Address_pb.js b/languages/js/es6/geo/Address_pb.js new file mode 100644 index 0000000..509593c --- /dev/null +++ b/languages/js/es6/geo/Address_pb.js @@ -0,0 +1,287 @@ +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! + +goog.exportSymbol('proto.Address', null, global); + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.Address = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.Address, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.Address.displayName = 'proto.Address'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.Address.prototype.toObject = function(opt_includeInstance) { + return proto.Address.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.Address} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.Address.toObject = function(includeInstance, msg) { + var f, obj = { + firstLine: jspb.Message.getFieldWithDefault(msg, 1, ""), + secondLine: jspb.Message.getFieldWithDefault(msg, 2, ""), + city: jspb.Message.getFieldWithDefault(msg, 3, ""), + state: jspb.Message.getFieldWithDefault(msg, 4, ""), + zipcode: jspb.Message.getFieldWithDefault(msg, 5, ""), + country: jspb.Message.getFieldWithDefault(msg, 6, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.Address} + */ +proto.Address.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.Address; + return proto.Address.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.Address} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.Address} + */ +proto.Address.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setFirstLine(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setSecondLine(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setCity(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setState(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setZipcode(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setCountry(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.Address.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.Address.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.Address} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.Address.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFirstLine(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getSecondLine(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getCity(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getState(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getZipcode(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getCountry(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } +}; + + +/** + * optional string first_line = 1; + * @return {string} + */ +proto.Address.prototype.getFirstLine = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.Address.prototype.setFirstLine = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional string second_line = 2; + * @return {string} + */ +proto.Address.prototype.getSecondLine = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** @param {string} value */ +proto.Address.prototype.setSecondLine = function(value) { + jspb.Message.setField(this, 2, value); +}; + + +/** + * optional string city = 3; + * @return {string} + */ +proto.Address.prototype.getCity = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** @param {string} value */ +proto.Address.prototype.setCity = function(value) { + jspb.Message.setField(this, 3, value); +}; + + +/** + * optional string state = 4; + * @return {string} + */ +proto.Address.prototype.getState = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** @param {string} value */ +proto.Address.prototype.setState = function(value) { + jspb.Message.setField(this, 4, value); +}; + + +/** + * optional string zipcode = 5; + * @return {string} + */ +proto.Address.prototype.getZipcode = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** @param {string} value */ +proto.Address.prototype.setZipcode = function(value) { + jspb.Message.setField(this, 5, value); +}; + + +/** + * optional string country = 6; + * @return {string} + */ +proto.Address.prototype.getCountry = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** @param {string} value */ +proto.Address.prototype.setCountry = function(value) { + jspb.Message.setField(this, 6, value); +}; + + diff --git a/languages/js/es6/media/MediaItem_pb.js b/languages/js/es6/media/MediaItem_pb.js index ce759f1..fe8389c 100644 --- a/languages/js/es6/media/MediaItem_pb.js +++ b/languages/js/es6/media/MediaItem_pb.js @@ -1,6 +1,8 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! @@ -49,6 +51,7 @@ proto.MediaItem.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.MediaItem} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.MediaItem.toObject = function(includeInstance, msg) { var f, obj = { @@ -130,6 +133,7 @@ proto.MediaItem.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.MediaItem} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.MediaItem.serializeBinaryToWriter = function(message, writer) { var f = undefined; diff --git a/languages/js/es6/media/MediaKey_pb.js b/languages/js/es6/media/MediaKey_pb.js index effb4c5..51e1e10 100644 --- a/languages/js/es6/media/MediaKey_pb.js +++ b/languages/js/es6/media/MediaKey_pb.js @@ -1,6 +1,8 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! @@ -49,6 +51,7 @@ proto.MediaKey.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.MediaKey} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.MediaKey.toObject = function(includeInstance, msg) { var f, obj = { @@ -118,6 +121,7 @@ proto.MediaKey.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.MediaKey} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.MediaKey.serializeBinaryToWriter = function(message, writer) { var f = undefined; diff --git a/languages/js/es6/media/MediaType_pb.js b/languages/js/es6/media/MediaType_pb.js index 30fa84b..588fbd2 100644 --- a/languages/js/es6/media/MediaType_pb.js +++ b/languages/js/es6/media/MediaType_pb.js @@ -1,6 +1,8 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! @@ -56,6 +58,7 @@ proto.MediaType.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.MediaType} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.MediaType.toObject = function(includeInstance, msg) { var f, obj = { @@ -143,6 +146,7 @@ proto.MediaType.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.MediaType} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.MediaType.serializeBinaryToWriter = function(message, writer) { var f = undefined; @@ -338,6 +342,7 @@ proto.ImageType.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.ImageType} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ImageType.toObject = function(includeInstance, msg) { var f, obj = { @@ -407,6 +412,7 @@ proto.ImageType.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.ImageType} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ImageType.serializeBinaryToWriter = function(message, writer) { var f = undefined; @@ -489,6 +495,7 @@ proto.DocumentType.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.DocumentType} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.DocumentType.toObject = function(includeInstance, msg) { var f, obj = { @@ -563,6 +570,7 @@ proto.DocumentType.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.DocumentType} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.DocumentType.serializeBinaryToWriter = function(message, writer) { var f = undefined; @@ -668,6 +676,7 @@ proto.VideoType.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.VideoType} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.VideoType.toObject = function(includeInstance, msg) { var f, obj = { @@ -737,6 +746,7 @@ proto.VideoType.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.VideoType} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.VideoType.serializeBinaryToWriter = function(message, writer) { var f = undefined; diff --git a/languages/js/es6/products/Flower_pb.js b/languages/js/es6/products/Flower_pb.js index cf7f83e..7e4686c 100644 --- a/languages/js/es6/products/Flower_pb.js +++ b/languages/js/es6/products/Flower_pb.js @@ -1,6 +1,8 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! @@ -49,6 +51,7 @@ proto.Flower.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.Flower} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.Flower.toObject = function(includeInstance, msg) { var f, obj = { @@ -143,6 +146,7 @@ proto.Flower.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.Flower} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.Flower.serializeBinaryToWriter = function(message, writer) { var f = undefined; diff --git a/languages/js/es6/structs/FlagsDescriptor_pb.js b/languages/js/es6/structs/FlagsDescriptor_pb.js index 8c9c2af..099042d 100644 --- a/languages/js/es6/structs/FlagsDescriptor_pb.js +++ b/languages/js/es6/structs/FlagsDescriptor_pb.js @@ -1,6 +1,8 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! @@ -52,6 +54,7 @@ proto.ProductFlagValue.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.ProductFlagValue} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ProductFlagValue.toObject = function(includeInstance, msg) { var f, obj = { @@ -126,6 +129,7 @@ proto.ProductFlagValue.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.ProductFlagValue} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ProductFlagValue.serializeBinaryToWriter = function(message, writer) { var f = undefined; @@ -228,6 +232,7 @@ proto.ProductFlagset.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.ProductFlagset} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ProductFlagset.toObject = function(includeInstance, msg) { var f, obj = { @@ -299,6 +304,7 @@ proto.ProductFlagset.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.ProductFlagset} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ProductFlagset.serializeBinaryToWriter = function(message, writer) { var f = undefined; @@ -315,8 +321,6 @@ proto.ProductFlagset.serializeBinaryToWriter = function(message, writer) { /** * repeated ProductFlagValue flags = 1; - * If you change this array by adding, removing or replacing elements, or if you - * replace the array itself, then you must call the setter to update it. * @return {!Array.} */ proto.ProductFlagset.prototype.getFlagsList = function() { @@ -389,6 +393,7 @@ proto.FlagsDescriptor.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.FlagsDescriptor} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.FlagsDescriptor.toObject = function(includeInstance, msg) { var f, obj = { @@ -478,6 +483,7 @@ proto.FlagsDescriptor.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.FlagsDescriptor} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.FlagsDescriptor.serializeBinaryToWriter = function(message, writer) { var f = undefined; diff --git a/languages/js/es6/structs/Genetics_pb.js b/languages/js/es6/structs/Genetics_pb.js index 7e4b9b2..832ab7f 100644 --- a/languages/js/es6/structs/Genetics_pb.js +++ b/languages/js/es6/structs/Genetics_pb.js @@ -1,6 +1,8 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! @@ -49,6 +51,7 @@ proto.Genetics.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.Genetics} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.Genetics.toObject = function(includeInstance, msg) { var f, obj = { @@ -125,6 +128,7 @@ proto.Genetics.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.Genetics} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.Genetics.serializeBinaryToWriter = function(message, writer) { var f = undefined; diff --git a/languages/js/es6/structs/Grow_pb.js b/languages/js/es6/structs/Grow_pb.js index 02cec16..39f28d2 100644 --- a/languages/js/es6/structs/Grow_pb.js +++ b/languages/js/es6/structs/Grow_pb.js @@ -1,6 +1,8 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! diff --git a/languages/js/es6/structs/Species_pb.js b/languages/js/es6/structs/Species_pb.js index 29e4639..fb4e9b4 100644 --- a/languages/js/es6/structs/Species_pb.js +++ b/languages/js/es6/structs/Species_pb.js @@ -1,6 +1,8 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! diff --git a/languages/js/es6/structs/pricing/PricingDescriptor_pb.js b/languages/js/es6/structs/pricing/PricingDescriptor_pb.js index 7519a42..c162d44 100644 --- a/languages/js/es6/structs/pricing/PricingDescriptor_pb.js +++ b/languages/js/es6/structs/pricing/PricingDescriptor_pb.js @@ -1,6 +1,8 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! @@ -56,6 +58,7 @@ proto.PricingTierAvailability.prototype.toObject = function(opt_includeInstance) * http://goto/soy-param-migration * @param {!proto.PricingTierAvailability} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.PricingTierAvailability.toObject = function(includeInstance, msg) { var f, obj = { @@ -130,6 +133,7 @@ proto.PricingTierAvailability.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.PricingTierAvailability} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.PricingTierAvailability.serializeBinaryToWriter = function(message, writer) { var f = undefined; @@ -234,6 +238,7 @@ proto.UnitPricingDescriptor.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.UnitPricingDescriptor} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.UnitPricingDescriptor.toObject = function(includeInstance, msg) { var f, obj = { @@ -316,6 +321,7 @@ proto.UnitPricingDescriptor.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.UnitPricingDescriptor} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.UnitPricingDescriptor.serializeBinaryToWriter = function(message, writer) { var f = undefined; @@ -392,8 +398,6 @@ proto.UnitPricingDescriptor.prototype.hasStatus = function() { /** * repeated SaleDescriptor discounts = 3; - * If you change this array by adding, removing or replacing elements, or if you - * replace the array itself, then you must call the setter to update it. * @return {!Array.} */ proto.UnitPricingDescriptor.prototype.getDiscountsList = function() { @@ -466,6 +470,7 @@ proto.WeightedPricingDescriptor.prototype.toObject = function(opt_includeInstanc * http://goto/soy-param-migration * @param {!proto.WeightedPricingDescriptor} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.WeightedPricingDescriptor.toObject = function(includeInstance, msg) { var f, obj = { @@ -546,6 +551,7 @@ proto.WeightedPricingDescriptor.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.WeightedPricingDescriptor} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.WeightedPricingDescriptor.serializeBinaryToWriter = function(message, writer) { var f = undefined; @@ -677,6 +683,7 @@ proto.FreebiePricingDescriptor.prototype.toObject = function(opt_includeInstance * http://goto/soy-param-migration * @param {!proto.FreebiePricingDescriptor} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.FreebiePricingDescriptor.toObject = function(includeInstance, msg) { var f, obj = { @@ -742,6 +749,7 @@ proto.FreebiePricingDescriptor.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.FreebiePricingDescriptor} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.FreebiePricingDescriptor.serializeBinaryToWriter = function(message, writer) { var f = undefined; @@ -791,6 +799,7 @@ proto.PricingDescriptor.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.PricingDescriptor} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.PricingDescriptor.toObject = function(includeInstance, msg) { var f, obj = { @@ -878,6 +887,7 @@ proto.PricingDescriptor.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.PricingDescriptor} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.PricingDescriptor.serializeBinaryToWriter = function(message, writer) { var f = undefined; @@ -1070,6 +1080,7 @@ proto.ProductPricing.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.ProductPricing} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ProductPricing.toObject = function(includeInstance, msg) { var f, obj = { @@ -1148,6 +1159,7 @@ proto.ProductPricing.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.ProductPricing} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ProductPricing.serializeBinaryToWriter = function(message, writer) { var f = undefined; @@ -1172,8 +1184,6 @@ proto.ProductPricing.serializeBinaryToWriter = function(message, writer) { /** * repeated SaleDescriptor discounts = 1; - * If you change this array by adding, removing or replacing elements, or if you - * replace the array itself, then you must call the setter to update it. * @return {!Array.} */ proto.ProductPricing.prototype.getDiscountsList = function() { @@ -1205,8 +1215,6 @@ proto.ProductPricing.prototype.clearDiscountsList = function() { /** * repeated PricingDescriptor manifest = 2; - * If you change this array by adding, removing or replacing elements, or if you - * replace the array itself, then you must call the setter to update it. * @return {!Array.} */ proto.ProductPricing.prototype.getManifestList = function() { diff --git a/languages/js/es6/structs/pricing/SaleDescriptor_pb.js b/languages/js/es6/structs/pricing/SaleDescriptor_pb.js index 1ec6294..5dfe5ba 100644 --- a/languages/js/es6/structs/pricing/SaleDescriptor_pb.js +++ b/languages/js/es6/structs/pricing/SaleDescriptor_pb.js @@ -1,6 +1,8 @@ /** * @fileoverview * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! @@ -50,6 +52,7 @@ proto.SaleDescriptor.prototype.toObject = function(opt_includeInstance) { * http://goto/soy-param-migration * @param {!proto.SaleDescriptor} msg The msg instance to transform. * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.SaleDescriptor.toObject = function(includeInstance, msg) { var f, obj = { @@ -154,6 +157,7 @@ proto.SaleDescriptor.prototype.serializeBinary = function() { * format), writing to the given BinaryWriter. * @param {!proto.SaleDescriptor} message * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.SaleDescriptor.serializeBinaryToWriter = function(message, writer) { var f = undefined; diff --git a/languages/js/schema-1.0.3.pb.js.js b/languages/js/schema-1.0.3.pb.js.js new file mode 100644 index 0000000..2421aae --- /dev/null +++ b/languages/js/schema-1.0.3.pb.js.js @@ -0,0 +1,6442 @@ +/** + * @fileoverview + * @enhanceable + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! + + +goog.provide('proto.Address'); +goog.provide('proto.Brand'); +goog.provide('proto.Compression'); +goog.provide('proto.Compression.Type'); +goog.provide('proto.Content'); +goog.provide('proto.Content.Encoding'); +goog.provide('proto.Content.Type'); +goog.provide('proto.DocumentType'); +goog.provide('proto.DocumentType.DocumentKind'); +goog.provide('proto.FlagsDescriptor'); +goog.provide('proto.Flower'); +goog.provide('proto.FreebiePricingDescriptor'); +goog.provide('proto.Genetics'); +goog.provide('proto.Grow'); +goog.provide('proto.ImageType'); +goog.provide('proto.ImageType.ImageKind'); +goog.provide('proto.Language'); +goog.provide('proto.MaterialsData'); +goog.provide('proto.MediaItem'); +goog.provide('proto.MediaKey'); +goog.provide('proto.MediaType'); +goog.provide('proto.MediaType.Kind'); +goog.provide('proto.Name'); +goog.provide('proto.PricingDescriptor'); +goog.provide('proto.PricingTierAvailability'); +goog.provide('proto.PricingType'); +goog.provide('proto.PricingWeightTier'); +goog.provide('proto.Product'); +goog.provide('proto.ProductContent'); +goog.provide('proto.ProductFlag'); +goog.provide('proto.ProductFlagValue'); +goog.provide('proto.ProductFlagset'); +goog.provide('proto.ProductKey'); +goog.provide('proto.ProductKind'); +goog.provide('proto.ProductPricing'); +goog.provide('proto.ProductType'); +goog.provide('proto.SaleDescriptor'); +goog.provide('proto.SaleType'); +goog.provide('proto.Species'); +goog.provide('proto.UnitPricingDescriptor'); +goog.provide('proto.VideoType'); +goog.provide('proto.VideoType.VideoKind'); +goog.provide('proto.WeightedPricingDescriptor'); + +goog.require('jspb.BinaryReader'); +goog.require('jspb.BinaryWriter'); +goog.require('jspb.Message'); +goog.require('proto.google.protobuf.Any'); + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ProductKey = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ProductKey, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.ProductKey.displayName = 'proto.ProductKey'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.ProductKey.prototype.toObject = function(opt_includeInstance) { + return proto.ProductKey.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ProductKey} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ProductKey.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ProductKey} + */ +proto.ProductKey.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ProductKey; + return proto.ProductKey.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ProductKey} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ProductKey} + */ +proto.ProductKey.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ProductKey.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ProductKey.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ProductKey} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ProductKey.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.ProductKey.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.ProductKey.prototype.setId = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * @enum {number} + */ +proto.ProductKind = { + FLOWERS: 0, + EDIBLES: 1, + EXTRACTS: 2, + PREROLLS: 3, + APOTHECARY: 4, + CARTRIDGES: 5, + PLANTS: 6, + MERCHANDISE: 7 +}; + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ProductType = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ProductType, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.ProductType.displayName = 'proto.ProductType'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.ProductType.prototype.toObject = function(opt_includeInstance) { + return proto.ProductType.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ProductType} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ProductType.toObject = function(includeInstance, msg) { + var f, obj = { + kind: jspb.Message.getFieldWithDefault(msg, 1, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ProductType} + */ +proto.ProductType.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ProductType; + return proto.ProductType.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ProductType} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ProductType} + */ +proto.ProductType.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.ProductKind} */ (reader.readEnum()); + msg.setKind(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ProductType.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ProductType.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ProductType} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ProductType.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getKind(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } +}; + + +/** + * optional ProductKind kind = 1; + * @return {!proto.ProductKind} + */ +proto.ProductType.prototype.getKind = function() { + return /** @type {!proto.ProductKind} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** @param {!proto.ProductKind} value */ +proto.ProductType.prototype.setKind = function(value) { + jspb.Message.setField(this, 1, value); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.Product = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.Product, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.Product.displayName = 'proto.Product'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.Product.prototype.toObject = function(opt_includeInstance) { + return proto.Product.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.Product} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.Product.toObject = function(includeInstance, msg) { + var f, obj = { + key: (f = msg.getKey()) && proto.ProductKey.toObject(includeInstance, f), + type: (f = msg.getType()) && proto.ProductType.toObject(includeInstance, f), + data: (f = msg.getData()) && proto.google.protobuf.Any.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.Product} + */ +proto.Product.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.Product; + return proto.Product.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.Product} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.Product} + */ +proto.Product.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.ProductKey; + reader.readMessage(value,proto.ProductKey.deserializeBinaryFromReader); + msg.setKey(value); + break; + case 2: + var value = new proto.ProductType; + reader.readMessage(value,proto.ProductType.deserializeBinaryFromReader); + msg.setType(value); + break; + case 3: + var value = new proto.google.protobuf.Any; + reader.readMessage(value,proto.google.protobuf.Any.deserializeBinaryFromReader); + msg.setData(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.Product.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.Product.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.Product} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.Product.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getKey(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.ProductKey.serializeBinaryToWriter + ); + } + f = message.getType(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.ProductType.serializeBinaryToWriter + ); + } + f = message.getData(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.google.protobuf.Any.serializeBinaryToWriter + ); + } +}; + + +/** + * optional ProductKey key = 1; + * @return {?proto.ProductKey} + */ +proto.Product.prototype.getKey = function() { + return /** @type{?proto.ProductKey} */ ( + jspb.Message.getWrapperField(this, proto.ProductKey, 1)); +}; + + +/** @param {?proto.ProductKey|undefined} value */ +proto.Product.prototype.setKey = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +proto.Product.prototype.clearKey = function() { + this.setKey(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {!boolean} + */ +proto.Product.prototype.hasKey = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional ProductType type = 2; + * @return {?proto.ProductType} + */ +proto.Product.prototype.getType = function() { + return /** @type{?proto.ProductType} */ ( + jspb.Message.getWrapperField(this, proto.ProductType, 2)); +}; + + +/** @param {?proto.ProductType|undefined} value */ +proto.Product.prototype.setType = function(value) { + jspb.Message.setWrapperField(this, 2, value); +}; + + +proto.Product.prototype.clearType = function() { + this.setType(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {!boolean} + */ +proto.Product.prototype.hasType = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional google.protobuf.Any data = 3; + * @return {?proto.google.protobuf.Any} + */ +proto.Product.prototype.getData = function() { + return /** @type{?proto.google.protobuf.Any} */ ( + jspb.Message.getWrapperField(this, proto.google.protobuf.Any, 3)); +}; + + +/** @param {?proto.google.protobuf.Any|undefined} value */ +proto.Product.prototype.setData = function(value) { + jspb.Message.setWrapperField(this, 3, value); +}; + + +proto.Product.prototype.clearData = function() { + this.setData(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {!boolean} + */ +proto.Product.prototype.hasData = function() { + return jspb.Message.getField(this, 3) != null; +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.Compression = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.Compression, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.Compression.displayName = 'proto.Compression'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.Compression.prototype.toObject = function(opt_includeInstance) { + return proto.Compression.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.Compression} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.Compression.toObject = function(includeInstance, msg) { + var f, obj = { + enabled: jspb.Message.getFieldWithDefault(msg, 1, false), + type: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.Compression} + */ +proto.Compression.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.Compression; + return proto.Compression.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.Compression} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.Compression} + */ +proto.Compression.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setEnabled(value); + break; + case 2: + var value = /** @type {!proto.Compression.Type} */ (reader.readEnum()); + msg.setType(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.Compression.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.Compression.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.Compression} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.Compression.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getEnabled(); + if (f) { + writer.writeBool( + 1, + f + ); + } + f = message.getType(); + if (f !== 0.0) { + writer.writeEnum( + 2, + f + ); + } +}; + + +/** + * @enum {number} + */ +proto.Compression.Type = { + GZIP: 0 +}; + +/** + * optional bool enabled = 1; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. + * @return {boolean} + */ +proto.Compression.prototype.getEnabled = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 1, false)); +}; + + +/** @param {boolean} value */ +proto.Compression.prototype.setEnabled = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional Type type = 2; + * @return {!proto.Compression.Type} + */ +proto.Compression.prototype.getType = function() { + return /** @type {!proto.Compression.Type} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {!proto.Compression.Type} value */ +proto.Compression.prototype.setType = function(value) { + jspb.Message.setField(this, 2, value); +}; + + +/** + * @enum {number} + */ +proto.Language = { + ENGLISH: 0, + SPANISH: 1, + FRENCH: 2 +}; + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.Name = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.Name, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.Name.displayName = 'proto.Name'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.Name.prototype.toObject = function(opt_includeInstance) { + return proto.Name.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.Name} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.Name.toObject = function(includeInstance, msg) { + var f, obj = { + primary: jspb.Message.getFieldWithDefault(msg, 1, ""), + display: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.Name} + */ +proto.Name.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.Name; + return proto.Name.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.Name} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.Name} + */ +proto.Name.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setPrimary(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDisplay(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.Name.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.Name.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.Name} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.Name.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPrimary(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDisplay(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string primary = 1; + * @return {string} + */ +proto.Name.prototype.getPrimary = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.Name.prototype.setPrimary = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional string display = 2; + * @return {string} + */ +proto.Name.prototype.getDisplay = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** @param {string} value */ +proto.Name.prototype.setDisplay = function(value) { + jspb.Message.setField(this, 2, value); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.Content = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.Content, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.Content.displayName = 'proto.Content'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.Content.prototype.toObject = function(opt_includeInstance) { + return proto.Content.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.Content} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.Content.toObject = function(includeInstance, msg) { + var f, obj = { + type: jspb.Message.getFieldWithDefault(msg, 1, 0), + encoding: jspb.Message.getFieldWithDefault(msg, 2, 0), + content: msg.getContent_asB64(), + language: jspb.Message.getFieldWithDefault(msg, 4, 0), + compression: (f = msg.getCompression()) && proto.Compression.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.Content} + */ +proto.Content.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.Content; + return proto.Content.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.Content} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.Content} + */ +proto.Content.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.Content.Type} */ (reader.readEnum()); + msg.setType(value); + break; + case 2: + var value = /** @type {!proto.Content.Encoding} */ (reader.readEnum()); + msg.setEncoding(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setContent(value); + break; + case 4: + var value = /** @type {!proto.Language} */ (reader.readEnum()); + msg.setLanguage(value); + break; + case 5: + var value = new proto.Compression; + reader.readMessage(value,proto.Compression.deserializeBinaryFromReader); + msg.setCompression(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.Content.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.Content.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.Content} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.Content.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getType(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getEncoding(); + if (f !== 0.0) { + writer.writeEnum( + 2, + f + ); + } + f = message.getContent_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } + f = message.getLanguage(); + if (f !== 0.0) { + writer.writeEnum( + 4, + f + ); + } + f = message.getCompression(); + if (f != null) { + writer.writeMessage( + 5, + f, + proto.Compression.serializeBinaryToWriter + ); + } +}; + + +/** + * @enum {number} + */ +proto.Content.Type = { + TEXT: 0, + MARKDOWN: 1, + HTML: 2 +}; + +/** + * @enum {number} + */ +proto.Content.Encoding = { + UTF8: 0 +}; + +/** + * optional Type type = 1; + * @return {!proto.Content.Type} + */ +proto.Content.prototype.getType = function() { + return /** @type {!proto.Content.Type} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** @param {!proto.Content.Type} value */ +proto.Content.prototype.setType = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional Encoding encoding = 2; + * @return {!proto.Content.Encoding} + */ +proto.Content.prototype.getEncoding = function() { + return /** @type {!proto.Content.Encoding} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {!proto.Content.Encoding} value */ +proto.Content.prototype.setEncoding = function(value) { + jspb.Message.setField(this, 2, value); +}; + + +/** + * optional bytes content = 3; + * @return {string} + */ +proto.Content.prototype.getContent = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes content = 3; + * This is a type-conversion wrapper around `getContent()` + * @return {string} + */ +proto.Content.prototype.getContent_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getContent())); +}; + + +/** + * optional bytes content = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getContent()` + * @return {!Uint8Array} + */ +proto.Content.prototype.getContent_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getContent())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.Content.prototype.setContent = function(value) { + jspb.Message.setField(this, 3, value); +}; + + +/** + * optional Language language = 4; + * @return {!proto.Language} + */ +proto.Content.prototype.getLanguage = function() { + return /** @type {!proto.Language} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** @param {!proto.Language} value */ +proto.Content.prototype.setLanguage = function(value) { + jspb.Message.setField(this, 4, value); +}; + + +/** + * optional Compression compression = 5; + * @return {?proto.Compression} + */ +proto.Content.prototype.getCompression = function() { + return /** @type{?proto.Compression} */ ( + jspb.Message.getWrapperField(this, proto.Compression, 5)); +}; + + +/** @param {?proto.Compression|undefined} value */ +proto.Content.prototype.setCompression = function(value) { + jspb.Message.setWrapperField(this, 5, value); +}; + + +proto.Content.prototype.clearCompression = function() { + this.setCompression(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {!boolean} + */ +proto.Content.prototype.hasCompression = function() { + return jspb.Message.getField(this, 5) != null; +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.MediaKey = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.MediaKey, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.MediaKey.displayName = 'proto.MediaKey'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.MediaKey.prototype.toObject = function(opt_includeInstance) { + return proto.MediaKey.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.MediaKey} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.MediaKey.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.MediaKey} + */ +proto.MediaKey.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.MediaKey; + return proto.MediaKey.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.MediaKey} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.MediaKey} + */ +proto.MediaKey.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.MediaKey.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.MediaKey.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.MediaKey} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.MediaKey.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.MediaKey.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.MediaKey.prototype.setId = function(value) { + jspb.Message.setField(this, 1, value); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.MediaType = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.MediaType, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.MediaType.displayName = 'proto.MediaType'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.MediaType.prototype.toObject = function(opt_includeInstance) { + return proto.MediaType.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.MediaType} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.MediaType.toObject = function(includeInstance, msg) { + var f, obj = { + kind: jspb.Message.getFieldWithDefault(msg, 1, 0), + imageType: (f = msg.getImageType()) && proto.ImageType.toObject(includeInstance, f), + documentType: (f = msg.getDocumentType()) && proto.DocumentType.toObject(includeInstance, f), + videoType: (f = msg.getVideoType()) && proto.VideoType.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.MediaType} + */ +proto.MediaType.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.MediaType; + return proto.MediaType.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.MediaType} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.MediaType} + */ +proto.MediaType.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.MediaType.Kind} */ (reader.readEnum()); + msg.setKind(value); + break; + case 101: + var value = new proto.ImageType; + reader.readMessage(value,proto.ImageType.deserializeBinaryFromReader); + msg.setImageType(value); + break; + case 201: + var value = new proto.DocumentType; + reader.readMessage(value,proto.DocumentType.deserializeBinaryFromReader); + msg.setDocumentType(value); + break; + case 301: + var value = new proto.VideoType; + reader.readMessage(value,proto.VideoType.deserializeBinaryFromReader); + msg.setVideoType(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.MediaType.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.MediaType.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.MediaType} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.MediaType.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getKind(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getImageType(); + if (f != null) { + writer.writeMessage( + 101, + f, + proto.ImageType.serializeBinaryToWriter + ); + } + f = message.getDocumentType(); + if (f != null) { + writer.writeMessage( + 201, + f, + proto.DocumentType.serializeBinaryToWriter + ); + } + f = message.getVideoType(); + if (f != null) { + writer.writeMessage( + 301, + f, + proto.VideoType.serializeBinaryToWriter + ); + } +}; + + +/** + * @enum {number} + */ +proto.MediaType.Kind = { + LINK: 0, + IMAGE: 1, + DOCUMENT: 2, + VIDEO: 3 +}; + +/** + * optional Kind kind = 1; + * @return {!proto.MediaType.Kind} + */ +proto.MediaType.prototype.getKind = function() { + return /** @type {!proto.MediaType.Kind} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** @param {!proto.MediaType.Kind} value */ +proto.MediaType.prototype.setKind = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional ImageType image_type = 101; + * @return {?proto.ImageType} + */ +proto.MediaType.prototype.getImageType = function() { + return /** @type{?proto.ImageType} */ ( + jspb.Message.getWrapperField(this, proto.ImageType, 101)); +}; + + +/** @param {?proto.ImageType|undefined} value */ +proto.MediaType.prototype.setImageType = function(value) { + jspb.Message.setWrapperField(this, 101, value); +}; + + +proto.MediaType.prototype.clearImageType = function() { + this.setImageType(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {!boolean} + */ +proto.MediaType.prototype.hasImageType = function() { + return jspb.Message.getField(this, 101) != null; +}; + + +/** + * optional DocumentType document_type = 201; + * @return {?proto.DocumentType} + */ +proto.MediaType.prototype.getDocumentType = function() { + return /** @type{?proto.DocumentType} */ ( + jspb.Message.getWrapperField(this, proto.DocumentType, 201)); +}; + + +/** @param {?proto.DocumentType|undefined} value */ +proto.MediaType.prototype.setDocumentType = function(value) { + jspb.Message.setWrapperField(this, 201, value); +}; + + +proto.MediaType.prototype.clearDocumentType = function() { + this.setDocumentType(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {!boolean} + */ +proto.MediaType.prototype.hasDocumentType = function() { + return jspb.Message.getField(this, 201) != null; +}; + + +/** + * optional VideoType video_type = 301; + * @return {?proto.VideoType} + */ +proto.MediaType.prototype.getVideoType = function() { + return /** @type{?proto.VideoType} */ ( + jspb.Message.getWrapperField(this, proto.VideoType, 301)); +}; + + +/** @param {?proto.VideoType|undefined} value */ +proto.MediaType.prototype.setVideoType = function(value) { + jspb.Message.setWrapperField(this, 301, value); +}; + + +proto.MediaType.prototype.clearVideoType = function() { + this.setVideoType(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {!boolean} + */ +proto.MediaType.prototype.hasVideoType = function() { + return jspb.Message.getField(this, 301) != null; +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ImageType = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ImageType, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.ImageType.displayName = 'proto.ImageType'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.ImageType.prototype.toObject = function(opt_includeInstance) { + return proto.ImageType.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ImageType} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ImageType.toObject = function(includeInstance, msg) { + var f, obj = { + kind: jspb.Message.getFieldWithDefault(msg, 1, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ImageType} + */ +proto.ImageType.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ImageType; + return proto.ImageType.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ImageType} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ImageType} + */ +proto.ImageType.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.ImageType.ImageKind} */ (reader.readEnum()); + msg.setKind(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ImageType.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ImageType.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ImageType} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ImageType.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getKind(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } +}; + + +/** + * @enum {number} + */ +proto.ImageType.ImageKind = { + PNG: 0, + JPG: 1, + GIF: 2, + SVG: 3, + WEBP: 4 +}; + +/** + * optional ImageKind kind = 1; + * @return {!proto.ImageType.ImageKind} + */ +proto.ImageType.prototype.getKind = function() { + return /** @type {!proto.ImageType.ImageKind} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** @param {!proto.ImageType.ImageKind} value */ +proto.ImageType.prototype.setKind = function(value) { + jspb.Message.setField(this, 1, value); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.DocumentType = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.DocumentType, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.DocumentType.displayName = 'proto.DocumentType'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.DocumentType.prototype.toObject = function(opt_includeInstance) { + return proto.DocumentType.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.DocumentType} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.DocumentType.toObject = function(includeInstance, msg) { + var f, obj = { + kind: jspb.Message.getFieldWithDefault(msg, 1, 0), + compressed: jspb.Message.getFieldWithDefault(msg, 2, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.DocumentType} + */ +proto.DocumentType.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.DocumentType; + return proto.DocumentType.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.DocumentType} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.DocumentType} + */ +proto.DocumentType.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.DocumentType.DocumentKind} */ (reader.readEnum()); + msg.setKind(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setCompressed(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.DocumentType.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.DocumentType.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.DocumentType} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.DocumentType.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getKind(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getCompressed(); + if (f) { + writer.writeBool( + 2, + f + ); + } +}; + + +/** + * @enum {number} + */ +proto.DocumentType.DocumentKind = { + TXT: 0, + HTML: 1, + PDF: 2, + MARKDOWN: 3 +}; + +/** + * optional DocumentKind kind = 1; + * @return {!proto.DocumentType.DocumentKind} + */ +proto.DocumentType.prototype.getKind = function() { + return /** @type {!proto.DocumentType.DocumentKind} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** @param {!proto.DocumentType.DocumentKind} value */ +proto.DocumentType.prototype.setKind = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional bool compressed = 2; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. + * @return {boolean} + */ +proto.DocumentType.prototype.getCompressed = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 2, false)); +}; + + +/** @param {boolean} value */ +proto.DocumentType.prototype.setCompressed = function(value) { + jspb.Message.setField(this, 2, value); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.VideoType = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.VideoType, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.VideoType.displayName = 'proto.VideoType'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.VideoType.prototype.toObject = function(opt_includeInstance) { + return proto.VideoType.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.VideoType} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.VideoType.toObject = function(includeInstance, msg) { + var f, obj = { + kind: jspb.Message.getFieldWithDefault(msg, 1, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.VideoType} + */ +proto.VideoType.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.VideoType; + return proto.VideoType.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.VideoType} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.VideoType} + */ +proto.VideoType.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.VideoType.VideoKind} */ (reader.readEnum()); + msg.setKind(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.VideoType.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.VideoType.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.VideoType} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.VideoType.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getKind(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } +}; + + +/** + * @enum {number} + */ +proto.VideoType.VideoKind = { + MP4: 0, + FLV: 1, + HLS: 2 +}; + +/** + * optional VideoKind kind = 1; + * @return {!proto.VideoType.VideoKind} + */ +proto.VideoType.prototype.getKind = function() { + return /** @type {!proto.VideoType.VideoKind} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** @param {!proto.VideoType.VideoKind} value */ +proto.VideoType.prototype.setKind = function(value) { + jspb.Message.setField(this, 1, value); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.MediaItem = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.MediaItem, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.MediaItem.displayName = 'proto.MediaItem'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.MediaItem.prototype.toObject = function(opt_includeInstance) { + return proto.MediaItem.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.MediaItem} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.MediaItem.toObject = function(includeInstance, msg) { + var f, obj = { + key: (f = msg.getKey()) && proto.MediaKey.toObject(includeInstance, f), + type: (f = msg.getType()) && proto.MediaType.toObject(includeInstance, f), + name: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.MediaItem} + */ +proto.MediaItem.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.MediaItem; + return proto.MediaItem.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.MediaItem} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.MediaItem} + */ +proto.MediaItem.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.MediaKey; + reader.readMessage(value,proto.MediaKey.deserializeBinaryFromReader); + msg.setKey(value); + break; + case 2: + var value = new proto.MediaType; + reader.readMessage(value,proto.MediaType.deserializeBinaryFromReader); + msg.setType(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.MediaItem.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.MediaItem.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.MediaItem} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.MediaItem.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getKey(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.MediaKey.serializeBinaryToWriter + ); + } + f = message.getType(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.MediaType.serializeBinaryToWriter + ); + } + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional MediaKey key = 1; + * @return {?proto.MediaKey} + */ +proto.MediaItem.prototype.getKey = function() { + return /** @type{?proto.MediaKey} */ ( + jspb.Message.getWrapperField(this, proto.MediaKey, 1)); +}; + + +/** @param {?proto.MediaKey|undefined} value */ +proto.MediaItem.prototype.setKey = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +proto.MediaItem.prototype.clearKey = function() { + this.setKey(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {!boolean} + */ +proto.MediaItem.prototype.hasKey = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional MediaType type = 2; + * @return {?proto.MediaType} + */ +proto.MediaItem.prototype.getType = function() { + return /** @type{?proto.MediaType} */ ( + jspb.Message.getWrapperField(this, proto.MediaType, 2)); +}; + + +/** @param {?proto.MediaType|undefined} value */ +proto.MediaItem.prototype.setType = function(value) { + jspb.Message.setWrapperField(this, 2, value); +}; + + +proto.MediaItem.prototype.clearType = function() { + this.setType(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {!boolean} + */ +proto.MediaItem.prototype.hasType = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional string name = 3; + * @return {string} + */ +proto.MediaItem.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** @param {string} value */ +proto.MediaItem.prototype.setName = function(value) { + jspb.Message.setField(this, 3, value); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.Brand = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.Brand.repeatedFields_, null); +}; +goog.inherits(proto.Brand, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.Brand.displayName = 'proto.Brand'; +} +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.Brand.repeatedFields_ = [20]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.Brand.prototype.toObject = function(opt_includeInstance) { + return proto.Brand.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.Brand} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.Brand.toObject = function(includeInstance, msg) { + var f, obj = { + name: (f = msg.getName()) && proto.Name.toObject(includeInstance, f), + parent: (f = msg.getParent()) && proto.Brand.toObject(includeInstance, f), + summary: (f = msg.getSummary()) && proto.Content.toObject(includeInstance, f), + mediaList: jspb.Message.toObjectList(msg.getMediaList(), + proto.MediaItem.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.Brand} + */ +proto.Brand.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.Brand; + return proto.Brand.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.Brand} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.Brand} + */ +proto.Brand.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.Name; + reader.readMessage(value,proto.Name.deserializeBinaryFromReader); + msg.setName(value); + break; + case 2: + var value = new proto.Brand; + reader.readMessage(value,proto.Brand.deserializeBinaryFromReader); + msg.setParent(value); + break; + case 3: + var value = new proto.Content; + reader.readMessage(value,proto.Content.deserializeBinaryFromReader); + msg.setSummary(value); + break; + case 20: + var value = new proto.MediaItem; + reader.readMessage(value,proto.MediaItem.deserializeBinaryFromReader); + msg.addMedia(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.Brand.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.Brand.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.Brand} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.Brand.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.Name.serializeBinaryToWriter + ); + } + f = message.getParent(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.Brand.serializeBinaryToWriter + ); + } + f = message.getSummary(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.Content.serializeBinaryToWriter + ); + } + f = message.getMediaList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 20, + f, + proto.MediaItem.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Name name = 1; + * @return {?proto.Name} + */ +proto.Brand.prototype.getName = function() { + return /** @type{?proto.Name} */ ( + jspb.Message.getWrapperField(this, proto.Name, 1)); +}; + + +/** @param {?proto.Name|undefined} value */ +proto.Brand.prototype.setName = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +proto.Brand.prototype.clearName = function() { + this.setName(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {!boolean} + */ +proto.Brand.prototype.hasName = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional Brand parent = 2; + * @return {?proto.Brand} + */ +proto.Brand.prototype.getParent = function() { + return /** @type{?proto.Brand} */ ( + jspb.Message.getWrapperField(this, proto.Brand, 2)); +}; + + +/** @param {?proto.Brand|undefined} value */ +proto.Brand.prototype.setParent = function(value) { + jspb.Message.setWrapperField(this, 2, value); +}; + + +proto.Brand.prototype.clearParent = function() { + this.setParent(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {!boolean} + */ +proto.Brand.prototype.hasParent = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional Content summary = 3; + * @return {?proto.Content} + */ +proto.Brand.prototype.getSummary = function() { + return /** @type{?proto.Content} */ ( + jspb.Message.getWrapperField(this, proto.Content, 3)); +}; + + +/** @param {?proto.Content|undefined} value */ +proto.Brand.prototype.setSummary = function(value) { + jspb.Message.setWrapperField(this, 3, value); +}; + + +proto.Brand.prototype.clearSummary = function() { + this.setSummary(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {!boolean} + */ +proto.Brand.prototype.hasSummary = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * repeated MediaItem media = 20; + * @return {!Array.} + */ +proto.Brand.prototype.getMediaList = function() { + return /** @type{!Array.} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.MediaItem, 20)); +}; + + +/** @param {!Array.} value */ +proto.Brand.prototype.setMediaList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 20, value); +}; + + +/** + * @param {!proto.MediaItem=} opt_value + * @param {number=} opt_index + * @return {!proto.MediaItem} + */ +proto.Brand.prototype.addMedia = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 20, opt_value, proto.MediaItem, opt_index); +}; + + +proto.Brand.prototype.clearMediaList = function() { + this.setMediaList([]); +}; + + +/** + * @enum {number} + */ +proto.Grow = { + GENERIC: 0, + INDOOR: 1, + GREENHOUSE: 2, + OUTDOOR: 3 +}; + +/** + * @enum {number} + */ +proto.Species = { + UNSPECIFIED: 0, + SATIVA: 1, + HYBRID_SATIVA: 2, + HYBRID: 3, + HYBRID_INDICA: 4, + INDICA: 5 +}; + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.Genetics = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.Genetics, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.Genetics.displayName = 'proto.Genetics'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.Genetics.prototype.toObject = function(opt_includeInstance) { + return proto.Genetics.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.Genetics} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.Genetics.toObject = function(includeInstance, msg) { + var f, obj = { + male: (f = msg.getMale()) && proto.Name.toObject(includeInstance, f), + female: (f = msg.getFemale()) && proto.Name.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.Genetics} + */ +proto.Genetics.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.Genetics; + return proto.Genetics.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.Genetics} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.Genetics} + */ +proto.Genetics.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.Name; + reader.readMessage(value,proto.Name.deserializeBinaryFromReader); + msg.setMale(value); + break; + case 2: + var value = new proto.Name; + reader.readMessage(value,proto.Name.deserializeBinaryFromReader); + msg.setFemale(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.Genetics.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.Genetics.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.Genetics} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.Genetics.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMale(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.Name.serializeBinaryToWriter + ); + } + f = message.getFemale(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.Name.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Name male = 1; + * @return {?proto.Name} + */ +proto.Genetics.prototype.getMale = function() { + return /** @type{?proto.Name} */ ( + jspb.Message.getWrapperField(this, proto.Name, 1)); +}; + + +/** @param {?proto.Name|undefined} value */ +proto.Genetics.prototype.setMale = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +proto.Genetics.prototype.clearMale = function() { + this.setMale(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {!boolean} + */ +proto.Genetics.prototype.hasMale = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional Name female = 2; + * @return {?proto.Name} + */ +proto.Genetics.prototype.getFemale = function() { + return /** @type{?proto.Name} */ ( + jspb.Message.getWrapperField(this, proto.Name, 2)); +}; + + +/** @param {?proto.Name|undefined} value */ +proto.Genetics.prototype.setFemale = function(value) { + jspb.Message.setWrapperField(this, 2, value); +}; + + +proto.Genetics.prototype.clearFemale = function() { + this.setFemale(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {!boolean} + */ +proto.Genetics.prototype.hasFemale = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.MaterialsData = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.MaterialsData.repeatedFields_, null); +}; +goog.inherits(proto.MaterialsData, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.MaterialsData.displayName = 'proto.MaterialsData'; +} +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.MaterialsData.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.MaterialsData.prototype.toObject = function(opt_includeInstance) { + return proto.MaterialsData.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.MaterialsData} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.MaterialsData.toObject = function(includeInstance, msg) { + var f, obj = { + ingredientsList: jspb.Message.getRepeatedField(msg, 1), + grow: jspb.Message.getFieldWithDefault(msg, 2, 0), + species: jspb.Message.getFieldWithDefault(msg, 3, 0), + genetics: (f = msg.getGenetics()) && proto.Genetics.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.MaterialsData} + */ +proto.MaterialsData.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.MaterialsData; + return proto.MaterialsData.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.MaterialsData} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.MaterialsData} + */ +proto.MaterialsData.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.addIngredients(value); + break; + case 2: + var value = /** @type {!proto.Grow} */ (reader.readEnum()); + msg.setGrow(value); + break; + case 3: + var value = /** @type {!proto.Species} */ (reader.readEnum()); + msg.setSpecies(value); + break; + case 4: + var value = new proto.Genetics; + reader.readMessage(value,proto.Genetics.deserializeBinaryFromReader); + msg.setGenetics(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.MaterialsData.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.MaterialsData.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.MaterialsData} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.MaterialsData.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getIngredientsList(); + if (f.length > 0) { + writer.writeRepeatedString( + 1, + f + ); + } + f = message.getGrow(); + if (f !== 0.0) { + writer.writeEnum( + 2, + f + ); + } + f = message.getSpecies(); + if (f !== 0.0) { + writer.writeEnum( + 3, + f + ); + } + f = message.getGenetics(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.Genetics.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated string ingredients = 1; + * @return {!Array.} + */ +proto.MaterialsData.prototype.getIngredientsList = function() { + return /** @type {!Array.} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** @param {!Array.} value */ +proto.MaterialsData.prototype.setIngredientsList = function(value) { + jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {!string} value + * @param {number=} opt_index + */ +proto.MaterialsData.prototype.addIngredients = function(value, opt_index) { + jspb.Message.addToRepeatedField(this, 1, value, opt_index); +}; + + +proto.MaterialsData.prototype.clearIngredientsList = function() { + this.setIngredientsList([]); +}; + + +/** + * optional Grow grow = 2; + * @return {!proto.Grow} + */ +proto.MaterialsData.prototype.getGrow = function() { + return /** @type {!proto.Grow} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {!proto.Grow} value */ +proto.MaterialsData.prototype.setGrow = function(value) { + jspb.Message.setField(this, 2, value); +}; + + +/** + * optional Species species = 3; + * @return {!proto.Species} + */ +proto.MaterialsData.prototype.getSpecies = function() { + return /** @type {!proto.Species} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** @param {!proto.Species} value */ +proto.MaterialsData.prototype.setSpecies = function(value) { + jspb.Message.setField(this, 3, value); +}; + + +/** + * optional Genetics genetics = 4; + * @return {?proto.Genetics} + */ +proto.MaterialsData.prototype.getGenetics = function() { + return /** @type{?proto.Genetics} */ ( + jspb.Message.getWrapperField(this, proto.Genetics, 4)); +}; + + +/** @param {?proto.Genetics|undefined} value */ +proto.MaterialsData.prototype.setGenetics = function(value) { + jspb.Message.setWrapperField(this, 4, value); +}; + + +proto.MaterialsData.prototype.clearGenetics = function() { + this.setGenetics(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {!boolean} + */ +proto.MaterialsData.prototype.hasGenetics = function() { + return jspb.Message.getField(this, 4) != null; +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ProductContent = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ProductContent.repeatedFields_, null); +}; +goog.inherits(proto.ProductContent, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.ProductContent.displayName = 'proto.ProductContent'; +} +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ProductContent.repeatedFields_ = [20]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.ProductContent.prototype.toObject = function(opt_includeInstance) { + return proto.ProductContent.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ProductContent} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ProductContent.toObject = function(includeInstance, msg) { + var f, obj = { + name: (f = msg.getName()) && proto.Name.toObject(includeInstance, f), + summary: (f = msg.getSummary()) && proto.Content.toObject(includeInstance, f), + brand: (f = msg.getBrand()) && proto.Brand.toObject(includeInstance, f), + mediaList: jspb.Message.toObjectList(msg.getMediaList(), + proto.MediaItem.toObject, includeInstance), + usage: (f = msg.getUsage()) && proto.Content.toObject(includeInstance, f), + dosage: (f = msg.getDosage()) && proto.Content.toObject(includeInstance, f), + advice: (f = msg.getAdvice()) && proto.Content.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ProductContent} + */ +proto.ProductContent.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ProductContent; + return proto.ProductContent.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ProductContent} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ProductContent} + */ +proto.ProductContent.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.Name; + reader.readMessage(value,proto.Name.deserializeBinaryFromReader); + msg.setName(value); + break; + case 2: + var value = new proto.Content; + reader.readMessage(value,proto.Content.deserializeBinaryFromReader); + msg.setSummary(value); + break; + case 3: + var value = new proto.Brand; + reader.readMessage(value,proto.Brand.deserializeBinaryFromReader); + msg.setBrand(value); + break; + case 20: + var value = new proto.MediaItem; + reader.readMessage(value,proto.MediaItem.deserializeBinaryFromReader); + msg.addMedia(value); + break; + case 30: + var value = new proto.Content; + reader.readMessage(value,proto.Content.deserializeBinaryFromReader); + msg.setUsage(value); + break; + case 31: + var value = new proto.Content; + reader.readMessage(value,proto.Content.deserializeBinaryFromReader); + msg.setDosage(value); + break; + case 32: + var value = new proto.Content; + reader.readMessage(value,proto.Content.deserializeBinaryFromReader); + msg.setAdvice(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ProductContent.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ProductContent.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ProductContent} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ProductContent.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.Name.serializeBinaryToWriter + ); + } + f = message.getSummary(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.Content.serializeBinaryToWriter + ); + } + f = message.getBrand(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.Brand.serializeBinaryToWriter + ); + } + f = message.getMediaList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 20, + f, + proto.MediaItem.serializeBinaryToWriter + ); + } + f = message.getUsage(); + if (f != null) { + writer.writeMessage( + 30, + f, + proto.Content.serializeBinaryToWriter + ); + } + f = message.getDosage(); + if (f != null) { + writer.writeMessage( + 31, + f, + proto.Content.serializeBinaryToWriter + ); + } + f = message.getAdvice(); + if (f != null) { + writer.writeMessage( + 32, + f, + proto.Content.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Name name = 1; + * @return {?proto.Name} + */ +proto.ProductContent.prototype.getName = function() { + return /** @type{?proto.Name} */ ( + jspb.Message.getWrapperField(this, proto.Name, 1)); +}; + + +/** @param {?proto.Name|undefined} value */ +proto.ProductContent.prototype.setName = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +proto.ProductContent.prototype.clearName = function() { + this.setName(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {!boolean} + */ +proto.ProductContent.prototype.hasName = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional Content summary = 2; + * @return {?proto.Content} + */ +proto.ProductContent.prototype.getSummary = function() { + return /** @type{?proto.Content} */ ( + jspb.Message.getWrapperField(this, proto.Content, 2)); +}; + + +/** @param {?proto.Content|undefined} value */ +proto.ProductContent.prototype.setSummary = function(value) { + jspb.Message.setWrapperField(this, 2, value); +}; + + +proto.ProductContent.prototype.clearSummary = function() { + this.setSummary(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {!boolean} + */ +proto.ProductContent.prototype.hasSummary = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional Brand brand = 3; + * @return {?proto.Brand} + */ +proto.ProductContent.prototype.getBrand = function() { + return /** @type{?proto.Brand} */ ( + jspb.Message.getWrapperField(this, proto.Brand, 3)); +}; + + +/** @param {?proto.Brand|undefined} value */ +proto.ProductContent.prototype.setBrand = function(value) { + jspb.Message.setWrapperField(this, 3, value); +}; + + +proto.ProductContent.prototype.clearBrand = function() { + this.setBrand(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {!boolean} + */ +proto.ProductContent.prototype.hasBrand = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * repeated MediaItem media = 20; + * @return {!Array.} + */ +proto.ProductContent.prototype.getMediaList = function() { + return /** @type{!Array.} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.MediaItem, 20)); +}; + + +/** @param {!Array.} value */ +proto.ProductContent.prototype.setMediaList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 20, value); +}; + + +/** + * @param {!proto.MediaItem=} opt_value + * @param {number=} opt_index + * @return {!proto.MediaItem} + */ +proto.ProductContent.prototype.addMedia = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 20, opt_value, proto.MediaItem, opt_index); +}; + + +proto.ProductContent.prototype.clearMediaList = function() { + this.setMediaList([]); +}; + + +/** + * optional Content usage = 30; + * @return {?proto.Content} + */ +proto.ProductContent.prototype.getUsage = function() { + return /** @type{?proto.Content} */ ( + jspb.Message.getWrapperField(this, proto.Content, 30)); +}; + + +/** @param {?proto.Content|undefined} value */ +proto.ProductContent.prototype.setUsage = function(value) { + jspb.Message.setWrapperField(this, 30, value); +}; + + +proto.ProductContent.prototype.clearUsage = function() { + this.setUsage(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {!boolean} + */ +proto.ProductContent.prototype.hasUsage = function() { + return jspb.Message.getField(this, 30) != null; +}; + + +/** + * optional Content dosage = 31; + * @return {?proto.Content} + */ +proto.ProductContent.prototype.getDosage = function() { + return /** @type{?proto.Content} */ ( + jspb.Message.getWrapperField(this, proto.Content, 31)); +}; + + +/** @param {?proto.Content|undefined} value */ +proto.ProductContent.prototype.setDosage = function(value) { + jspb.Message.setWrapperField(this, 31, value); +}; + + +proto.ProductContent.prototype.clearDosage = function() { + this.setDosage(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {!boolean} + */ +proto.ProductContent.prototype.hasDosage = function() { + return jspb.Message.getField(this, 31) != null; +}; + + +/** + * optional Content advice = 32; + * @return {?proto.Content} + */ +proto.ProductContent.prototype.getAdvice = function() { + return /** @type{?proto.Content} */ ( + jspb.Message.getWrapperField(this, proto.Content, 32)); +}; + + +/** @param {?proto.Content|undefined} value */ +proto.ProductContent.prototype.setAdvice = function(value) { + jspb.Message.setWrapperField(this, 32, value); +}; + + +proto.ProductContent.prototype.clearAdvice = function() { + this.setAdvice(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {!boolean} + */ +proto.ProductContent.prototype.hasAdvice = function() { + return jspb.Message.getField(this, 32) != null; +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.Address = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.Address, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.Address.displayName = 'proto.Address'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.Address.prototype.toObject = function(opt_includeInstance) { + return proto.Address.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.Address} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.Address.toObject = function(includeInstance, msg) { + var f, obj = { + firstLine: jspb.Message.getFieldWithDefault(msg, 1, ""), + secondLine: jspb.Message.getFieldWithDefault(msg, 2, ""), + city: jspb.Message.getFieldWithDefault(msg, 3, ""), + state: jspb.Message.getFieldWithDefault(msg, 4, ""), + zipcode: jspb.Message.getFieldWithDefault(msg, 5, ""), + country: jspb.Message.getFieldWithDefault(msg, 6, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.Address} + */ +proto.Address.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.Address; + return proto.Address.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.Address} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.Address} + */ +proto.Address.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setFirstLine(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setSecondLine(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setCity(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setState(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setZipcode(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setCountry(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.Address.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.Address.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.Address} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.Address.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFirstLine(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getSecondLine(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getCity(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getState(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getZipcode(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getCountry(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } +}; + + +/** + * optional string first_line = 1; + * @return {string} + */ +proto.Address.prototype.getFirstLine = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.Address.prototype.setFirstLine = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional string second_line = 2; + * @return {string} + */ +proto.Address.prototype.getSecondLine = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** @param {string} value */ +proto.Address.prototype.setSecondLine = function(value) { + jspb.Message.setField(this, 2, value); +}; + + +/** + * optional string city = 3; + * @return {string} + */ +proto.Address.prototype.getCity = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** @param {string} value */ +proto.Address.prototype.setCity = function(value) { + jspb.Message.setField(this, 3, value); +}; + + +/** + * optional string state = 4; + * @return {string} + */ +proto.Address.prototype.getState = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** @param {string} value */ +proto.Address.prototype.setState = function(value) { + jspb.Message.setField(this, 4, value); +}; + + +/** + * optional string zipcode = 5; + * @return {string} + */ +proto.Address.prototype.getZipcode = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** @param {string} value */ +proto.Address.prototype.setZipcode = function(value) { + jspb.Message.setField(this, 5, value); +}; + + +/** + * optional string country = 6; + * @return {string} + */ +proto.Address.prototype.getCountry = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** @param {string} value */ +proto.Address.prototype.setCountry = function(value) { + jspb.Message.setField(this, 6, value); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ProductFlagValue = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ProductFlagValue, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.ProductFlagValue.displayName = 'proto.ProductFlagValue'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.ProductFlagValue.prototype.toObject = function(opt_includeInstance) { + return proto.ProductFlagValue.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ProductFlagValue} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ProductFlagValue.toObject = function(includeInstance, msg) { + var f, obj = { + type: jspb.Message.getFieldWithDefault(msg, 1, 0), + value: jspb.Message.getFieldWithDefault(msg, 2, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ProductFlagValue} + */ +proto.ProductFlagValue.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ProductFlagValue; + return proto.ProductFlagValue.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ProductFlagValue} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ProductFlagValue} + */ +proto.ProductFlagValue.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.ProductFlag} */ (reader.readEnum()); + msg.setType(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setValue(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ProductFlagValue.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ProductFlagValue.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ProductFlagValue} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ProductFlagValue.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getType(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getValue(); + if (f) { + writer.writeBool( + 2, + f + ); + } +}; + + +/** + * optional ProductFlag type = 1; + * @return {!proto.ProductFlag} + */ +proto.ProductFlagValue.prototype.getType = function() { + return /** @type {!proto.ProductFlag} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** @param {!proto.ProductFlag} value */ +proto.ProductFlagValue.prototype.setType = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional bool value = 2; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. + * @return {boolean} + */ +proto.ProductFlagValue.prototype.getValue = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 2, false)); +}; + + +/** @param {boolean} value */ +proto.ProductFlagValue.prototype.setValue = function(value) { + jspb.Message.setField(this, 2, value); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ProductFlagset = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ProductFlagset.repeatedFields_, null); +}; +goog.inherits(proto.ProductFlagset, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.ProductFlagset.displayName = 'proto.ProductFlagset'; +} +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ProductFlagset.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.ProductFlagset.prototype.toObject = function(opt_includeInstance) { + return proto.ProductFlagset.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ProductFlagset} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ProductFlagset.toObject = function(includeInstance, msg) { + var f, obj = { + flagsList: jspb.Message.toObjectList(msg.getFlagsList(), + proto.ProductFlagValue.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ProductFlagset} + */ +proto.ProductFlagset.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ProductFlagset; + return proto.ProductFlagset.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ProductFlagset} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ProductFlagset} + */ +proto.ProductFlagset.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.ProductFlagValue; + reader.readMessage(value,proto.ProductFlagValue.deserializeBinaryFromReader); + msg.addFlags(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ProductFlagset.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ProductFlagset.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ProductFlagset} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ProductFlagset.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFlagsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.ProductFlagValue.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated ProductFlagValue flags = 1; + * @return {!Array.} + */ +proto.ProductFlagset.prototype.getFlagsList = function() { + return /** @type{!Array.} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.ProductFlagValue, 1)); +}; + + +/** @param {!Array.} value */ +proto.ProductFlagset.prototype.setFlagsList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.ProductFlagValue=} opt_value + * @param {number=} opt_index + * @return {!proto.ProductFlagValue} + */ +proto.ProductFlagset.prototype.addFlags = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.ProductFlagValue, opt_index); +}; + + +proto.ProductFlagset.prototype.clearFlagsList = function() { + this.setFlagsList([]); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.FlagsDescriptor = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.FlagsDescriptor, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.FlagsDescriptor.displayName = 'proto.FlagsDescriptor'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.FlagsDescriptor.prototype.toObject = function(opt_includeInstance) { + return proto.FlagsDescriptor.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.FlagsDescriptor} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.FlagsDescriptor.toObject = function(includeInstance, msg) { + var f, obj = { + visible: jspb.Message.getFieldWithDefault(msg, 1, false), + premium: jspb.Message.getFieldWithDefault(msg, 2, false), + featured: jspb.Message.getFieldWithDefault(msg, 3, false), + lastchance: jspb.Message.getFieldWithDefault(msg, 4, false), + inhouse: jspb.Message.getFieldWithDefault(msg, 5, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.FlagsDescriptor} + */ +proto.FlagsDescriptor.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.FlagsDescriptor; + return proto.FlagsDescriptor.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.FlagsDescriptor} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.FlagsDescriptor} + */ +proto.FlagsDescriptor.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setVisible(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setPremium(value); + break; + case 3: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setFeatured(value); + break; + case 4: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setLastchance(value); + break; + case 5: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setInhouse(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.FlagsDescriptor.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.FlagsDescriptor.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.FlagsDescriptor} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.FlagsDescriptor.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getVisible(); + if (f) { + writer.writeBool( + 1, + f + ); + } + f = message.getPremium(); + if (f) { + writer.writeBool( + 2, + f + ); + } + f = message.getFeatured(); + if (f) { + writer.writeBool( + 3, + f + ); + } + f = message.getLastchance(); + if (f) { + writer.writeBool( + 4, + f + ); + } + f = message.getInhouse(); + if (f) { + writer.writeBool( + 5, + f + ); + } +}; + + +/** + * optional bool visible = 1; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. + * @return {boolean} + */ +proto.FlagsDescriptor.prototype.getVisible = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 1, false)); +}; + + +/** @param {boolean} value */ +proto.FlagsDescriptor.prototype.setVisible = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional bool premium = 2; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. + * @return {boolean} + */ +proto.FlagsDescriptor.prototype.getPremium = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 2, false)); +}; + + +/** @param {boolean} value */ +proto.FlagsDescriptor.prototype.setPremium = function(value) { + jspb.Message.setField(this, 2, value); +}; + + +/** + * optional bool featured = 3; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. + * @return {boolean} + */ +proto.FlagsDescriptor.prototype.getFeatured = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 3, false)); +}; + + +/** @param {boolean} value */ +proto.FlagsDescriptor.prototype.setFeatured = function(value) { + jspb.Message.setField(this, 3, value); +}; + + +/** + * optional bool lastchance = 4; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. + * @return {boolean} + */ +proto.FlagsDescriptor.prototype.getLastchance = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 4, false)); +}; + + +/** @param {boolean} value */ +proto.FlagsDescriptor.prototype.setLastchance = function(value) { + jspb.Message.setField(this, 4, value); +}; + + +/** + * optional bool inhouse = 5; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. + * @return {boolean} + */ +proto.FlagsDescriptor.prototype.getInhouse = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 5, false)); +}; + + +/** @param {boolean} value */ +proto.FlagsDescriptor.prototype.setInhouse = function(value) { + jspb.Message.setField(this, 5, value); +}; + + +/** + * @enum {number} + */ +proto.ProductFlag = { + VISIBLE: 0, + PREMIUM: 1, + FEATURED: 2, + LASTCHANCE: 3, + INHOUSE: 4 +}; + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.SaleDescriptor = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.SaleDescriptor, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.SaleDescriptor.displayName = 'proto.SaleDescriptor'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.SaleDescriptor.prototype.toObject = function(opt_includeInstance) { + return proto.SaleDescriptor.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.SaleDescriptor} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.SaleDescriptor.toObject = function(includeInstance, msg) { + var f, obj = { + type: jspb.Message.getFieldWithDefault(msg, 1, 0), + effective: jspb.Message.getFieldWithDefault(msg, 2, 0), + expiration: jspb.Message.getFieldWithDefault(msg, 3, 0), + percentageAmount: jspb.Message.getFieldWithDefault(msg, 20, 0), + bogoTrigger: jspb.Message.getFieldWithDefault(msg, 21, 0), + bogoReward: jspb.Message.getFieldWithDefault(msg, 22, 0), + loyaltyTrigger: jspb.Message.getFieldWithDefault(msg, 23, 0), + loyaltyReward: jspb.Message.getFieldWithDefault(msg, 24, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.SaleDescriptor} + */ +proto.SaleDescriptor.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.SaleDescriptor; + return proto.SaleDescriptor.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.SaleDescriptor} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.SaleDescriptor} + */ +proto.SaleDescriptor.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.SaleType} */ (reader.readEnum()); + msg.setType(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setEffective(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setExpiration(value); + break; + case 20: + var value = /** @type {number} */ (reader.readUint32()); + msg.setPercentageAmount(value); + break; + case 21: + var value = /** @type {number} */ (reader.readUint32()); + msg.setBogoTrigger(value); + break; + case 22: + var value = /** @type {number} */ (reader.readUint32()); + msg.setBogoReward(value); + break; + case 23: + var value = /** @type {number} */ (reader.readUint32()); + msg.setLoyaltyTrigger(value); + break; + case 24: + var value = /** @type {number} */ (reader.readUint32()); + msg.setLoyaltyReward(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.SaleDescriptor.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.SaleDescriptor.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.SaleDescriptor} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.SaleDescriptor.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getType(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getEffective(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getExpiration(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } + f = message.getPercentageAmount(); + if (f !== 0) { + writer.writeUint32( + 20, + f + ); + } + f = message.getBogoTrigger(); + if (f !== 0) { + writer.writeUint32( + 21, + f + ); + } + f = message.getBogoReward(); + if (f !== 0) { + writer.writeUint32( + 22, + f + ); + } + f = message.getLoyaltyTrigger(); + if (f !== 0) { + writer.writeUint32( + 23, + f + ); + } + f = message.getLoyaltyReward(); + if (f !== 0) { + writer.writeUint32( + 24, + f + ); + } +}; + + +/** + * optional SaleType type = 1; + * @return {!proto.SaleType} + */ +proto.SaleDescriptor.prototype.getType = function() { + return /** @type {!proto.SaleType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** @param {!proto.SaleType} value */ +proto.SaleDescriptor.prototype.setType = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional uint64 effective = 2; + * @return {number} + */ +proto.SaleDescriptor.prototype.getEffective = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** @param {number} value */ +proto.SaleDescriptor.prototype.setEffective = function(value) { + jspb.Message.setField(this, 2, value); +}; + + +/** + * optional uint64 expiration = 3; + * @return {number} + */ +proto.SaleDescriptor.prototype.getExpiration = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** @param {number} value */ +proto.SaleDescriptor.prototype.setExpiration = function(value) { + jspb.Message.setField(this, 3, value); +}; + + +/** + * optional uint32 percentage_amount = 20; + * @return {number} + */ +proto.SaleDescriptor.prototype.getPercentageAmount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 20, 0)); +}; + + +/** @param {number} value */ +proto.SaleDescriptor.prototype.setPercentageAmount = function(value) { + jspb.Message.setField(this, 20, value); +}; + + +/** + * optional uint32 bogo_trigger = 21; + * @return {number} + */ +proto.SaleDescriptor.prototype.getBogoTrigger = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 21, 0)); +}; + + +/** @param {number} value */ +proto.SaleDescriptor.prototype.setBogoTrigger = function(value) { + jspb.Message.setField(this, 21, value); +}; + + +/** + * optional uint32 bogo_reward = 22; + * @return {number} + */ +proto.SaleDescriptor.prototype.getBogoReward = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 22, 0)); +}; + + +/** @param {number} value */ +proto.SaleDescriptor.prototype.setBogoReward = function(value) { + jspb.Message.setField(this, 22, value); +}; + + +/** + * optional uint32 loyalty_trigger = 23; + * @return {number} + */ +proto.SaleDescriptor.prototype.getLoyaltyTrigger = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 23, 0)); +}; + + +/** @param {number} value */ +proto.SaleDescriptor.prototype.setLoyaltyTrigger = function(value) { + jspb.Message.setField(this, 23, value); +}; + + +/** + * optional uint32 loyalty_reward = 24; + * @return {number} + */ +proto.SaleDescriptor.prototype.getLoyaltyReward = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 24, 0)); +}; + + +/** @param {number} value */ +proto.SaleDescriptor.prototype.setLoyaltyReward = function(value) { + jspb.Message.setField(this, 24, value); +}; + + +/** + * @enum {number} + */ +proto.SaleType = { + PERCENTAGE: 0, + BOGO: 1, + LOYALTY: 2 +}; + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.PricingTierAvailability = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.PricingTierAvailability, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.PricingTierAvailability.displayName = 'proto.PricingTierAvailability'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.PricingTierAvailability.prototype.toObject = function(opt_includeInstance) { + return proto.PricingTierAvailability.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.PricingTierAvailability} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.PricingTierAvailability.toObject = function(includeInstance, msg) { + var f, obj = { + offered: jspb.Message.getFieldWithDefault(msg, 1, false), + available: jspb.Message.getFieldWithDefault(msg, 2, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.PricingTierAvailability} + */ +proto.PricingTierAvailability.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.PricingTierAvailability; + return proto.PricingTierAvailability.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.PricingTierAvailability} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.PricingTierAvailability} + */ +proto.PricingTierAvailability.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setOffered(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setAvailable(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.PricingTierAvailability.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.PricingTierAvailability.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.PricingTierAvailability} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.PricingTierAvailability.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOffered(); + if (f) { + writer.writeBool( + 1, + f + ); + } + f = message.getAvailable(); + if (f) { + writer.writeBool( + 2, + f + ); + } +}; + + +/** + * optional bool offered = 1; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. + * @return {boolean} + */ +proto.PricingTierAvailability.prototype.getOffered = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 1, false)); +}; + + +/** @param {boolean} value */ +proto.PricingTierAvailability.prototype.setOffered = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional bool available = 2; + * Note that Boolean fields may be set to 0/1 when serialized from a Java server. + * You should avoid comparisons like {@code val === true/false} in those cases. + * @return {boolean} + */ +proto.PricingTierAvailability.prototype.getAvailable = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 2, false)); +}; + + +/** @param {boolean} value */ +proto.PricingTierAvailability.prototype.setAvailable = function(value) { + jspb.Message.setField(this, 2, value); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.UnitPricingDescriptor = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.UnitPricingDescriptor.repeatedFields_, null); +}; +goog.inherits(proto.UnitPricingDescriptor, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.UnitPricingDescriptor.displayName = 'proto.UnitPricingDescriptor'; +} +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.UnitPricingDescriptor.repeatedFields_ = [3]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.UnitPricingDescriptor.prototype.toObject = function(opt_includeInstance) { + return proto.UnitPricingDescriptor.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.UnitPricingDescriptor} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.UnitPricingDescriptor.toObject = function(includeInstance, msg) { + var f, obj = { + priceValue: +jspb.Message.getFieldWithDefault(msg, 1, 0.0), + status: (f = msg.getStatus()) && proto.PricingTierAvailability.toObject(includeInstance, f), + discountsList: jspb.Message.toObjectList(msg.getDiscountsList(), + proto.SaleDescriptor.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.UnitPricingDescriptor} + */ +proto.UnitPricingDescriptor.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.UnitPricingDescriptor; + return proto.UnitPricingDescriptor.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.UnitPricingDescriptor} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.UnitPricingDescriptor} + */ +proto.UnitPricingDescriptor.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readFloat()); + msg.setPriceValue(value); + break; + case 2: + var value = new proto.PricingTierAvailability; + reader.readMessage(value,proto.PricingTierAvailability.deserializeBinaryFromReader); + msg.setStatus(value); + break; + case 3: + var value = new proto.SaleDescriptor; + reader.readMessage(value,proto.SaleDescriptor.deserializeBinaryFromReader); + msg.addDiscounts(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.UnitPricingDescriptor.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.UnitPricingDescriptor.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.UnitPricingDescriptor} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.UnitPricingDescriptor.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPriceValue(); + if (f !== 0.0) { + writer.writeFloat( + 1, + f + ); + } + f = message.getStatus(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.PricingTierAvailability.serializeBinaryToWriter + ); + } + f = message.getDiscountsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + proto.SaleDescriptor.serializeBinaryToWriter + ); + } +}; + + +/** + * optional float price_value = 1; + * @return {number} + */ +proto.UnitPricingDescriptor.prototype.getPriceValue = function() { + return /** @type {number} */ (+jspb.Message.getFieldWithDefault(this, 1, 0.0)); +}; + + +/** @param {number} value */ +proto.UnitPricingDescriptor.prototype.setPriceValue = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional PricingTierAvailability status = 2; + * @return {?proto.PricingTierAvailability} + */ +proto.UnitPricingDescriptor.prototype.getStatus = function() { + return /** @type{?proto.PricingTierAvailability} */ ( + jspb.Message.getWrapperField(this, proto.PricingTierAvailability, 2)); +}; + + +/** @param {?proto.PricingTierAvailability|undefined} value */ +proto.UnitPricingDescriptor.prototype.setStatus = function(value) { + jspb.Message.setWrapperField(this, 2, value); +}; + + +proto.UnitPricingDescriptor.prototype.clearStatus = function() { + this.setStatus(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {!boolean} + */ +proto.UnitPricingDescriptor.prototype.hasStatus = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * repeated SaleDescriptor discounts = 3; + * @return {!Array.} + */ +proto.UnitPricingDescriptor.prototype.getDiscountsList = function() { + return /** @type{!Array.} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.SaleDescriptor, 3)); +}; + + +/** @param {!Array.} value */ +proto.UnitPricingDescriptor.prototype.setDiscountsList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.SaleDescriptor=} opt_value + * @param {number=} opt_index + * @return {!proto.SaleDescriptor} + */ +proto.UnitPricingDescriptor.prototype.addDiscounts = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.SaleDescriptor, opt_index); +}; + + +proto.UnitPricingDescriptor.prototype.clearDiscountsList = function() { + this.setDiscountsList([]); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.WeightedPricingDescriptor = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.WeightedPricingDescriptor, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.WeightedPricingDescriptor.displayName = 'proto.WeightedPricingDescriptor'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.WeightedPricingDescriptor.prototype.toObject = function(opt_includeInstance) { + return proto.WeightedPricingDescriptor.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.WeightedPricingDescriptor} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.WeightedPricingDescriptor.toObject = function(includeInstance, msg) { + var f, obj = { + weight: jspb.Message.getFieldWithDefault(msg, 1, 0), + tier: (f = msg.getTier()) && proto.UnitPricingDescriptor.toObject(includeInstance, f), + weightingrams: +jspb.Message.getFieldWithDefault(msg, 3, 0.0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.WeightedPricingDescriptor} + */ +proto.WeightedPricingDescriptor.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.WeightedPricingDescriptor; + return proto.WeightedPricingDescriptor.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.WeightedPricingDescriptor} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.WeightedPricingDescriptor} + */ +proto.WeightedPricingDescriptor.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.PricingWeightTier} */ (reader.readEnum()); + msg.setWeight(value); + break; + case 2: + var value = new proto.UnitPricingDescriptor; + reader.readMessage(value,proto.UnitPricingDescriptor.deserializeBinaryFromReader); + msg.setTier(value); + break; + case 3: + var value = /** @type {number} */ (reader.readFloat()); + msg.setWeightingrams(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.WeightedPricingDescriptor.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.WeightedPricingDescriptor.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.WeightedPricingDescriptor} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.WeightedPricingDescriptor.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getWeight(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getTier(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.UnitPricingDescriptor.serializeBinaryToWriter + ); + } + f = message.getWeightingrams(); + if (f !== 0.0) { + writer.writeFloat( + 3, + f + ); + } +}; + + +/** + * optional PricingWeightTier weight = 1; + * @return {!proto.PricingWeightTier} + */ +proto.WeightedPricingDescriptor.prototype.getWeight = function() { + return /** @type {!proto.PricingWeightTier} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** @param {!proto.PricingWeightTier} value */ +proto.WeightedPricingDescriptor.prototype.setWeight = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional UnitPricingDescriptor tier = 2; + * @return {?proto.UnitPricingDescriptor} + */ +proto.WeightedPricingDescriptor.prototype.getTier = function() { + return /** @type{?proto.UnitPricingDescriptor} */ ( + jspb.Message.getWrapperField(this, proto.UnitPricingDescriptor, 2)); +}; + + +/** @param {?proto.UnitPricingDescriptor|undefined} value */ +proto.WeightedPricingDescriptor.prototype.setTier = function(value) { + jspb.Message.setWrapperField(this, 2, value); +}; + + +proto.WeightedPricingDescriptor.prototype.clearTier = function() { + this.setTier(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {!boolean} + */ +proto.WeightedPricingDescriptor.prototype.hasTier = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional float weightInGrams = 3; + * @return {number} + */ +proto.WeightedPricingDescriptor.prototype.getWeightingrams = function() { + return /** @type {number} */ (+jspb.Message.getFieldWithDefault(this, 3, 0.0)); +}; + + +/** @param {number} value */ +proto.WeightedPricingDescriptor.prototype.setWeightingrams = function(value) { + jspb.Message.setField(this, 3, value); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.FreebiePricingDescriptor = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.FreebiePricingDescriptor, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.FreebiePricingDescriptor.displayName = 'proto.FreebiePricingDescriptor'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.FreebiePricingDescriptor.prototype.toObject = function(opt_includeInstance) { + return proto.FreebiePricingDescriptor.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.FreebiePricingDescriptor} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.FreebiePricingDescriptor.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.FreebiePricingDescriptor} + */ +proto.FreebiePricingDescriptor.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.FreebiePricingDescriptor; + return proto.FreebiePricingDescriptor.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.FreebiePricingDescriptor} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.FreebiePricingDescriptor} + */ +proto.FreebiePricingDescriptor.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.FreebiePricingDescriptor.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.FreebiePricingDescriptor.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.FreebiePricingDescriptor} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.FreebiePricingDescriptor.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.PricingDescriptor = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.PricingDescriptor, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.PricingDescriptor.displayName = 'proto.PricingDescriptor'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.PricingDescriptor.prototype.toObject = function(opt_includeInstance) { + return proto.PricingDescriptor.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.PricingDescriptor} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.PricingDescriptor.toObject = function(includeInstance, msg) { + var f, obj = { + type: jspb.Message.getFieldWithDefault(msg, 1, 0), + unit: (f = msg.getUnit()) && proto.UnitPricingDescriptor.toObject(includeInstance, f), + weighted: (f = msg.getWeighted()) && proto.WeightedPricingDescriptor.toObject(includeInstance, f), + freebie: (f = msg.getFreebie()) && proto.FreebiePricingDescriptor.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.PricingDescriptor} + */ +proto.PricingDescriptor.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.PricingDescriptor; + return proto.PricingDescriptor.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.PricingDescriptor} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.PricingDescriptor} + */ +proto.PricingDescriptor.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.PricingType} */ (reader.readEnum()); + msg.setType(value); + break; + case 20: + var value = new proto.UnitPricingDescriptor; + reader.readMessage(value,proto.UnitPricingDescriptor.deserializeBinaryFromReader); + msg.setUnit(value); + break; + case 21: + var value = new proto.WeightedPricingDescriptor; + reader.readMessage(value,proto.WeightedPricingDescriptor.deserializeBinaryFromReader); + msg.setWeighted(value); + break; + case 22: + var value = new proto.FreebiePricingDescriptor; + reader.readMessage(value,proto.FreebiePricingDescriptor.deserializeBinaryFromReader); + msg.setFreebie(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.PricingDescriptor.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.PricingDescriptor.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.PricingDescriptor} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.PricingDescriptor.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getType(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getUnit(); + if (f != null) { + writer.writeMessage( + 20, + f, + proto.UnitPricingDescriptor.serializeBinaryToWriter + ); + } + f = message.getWeighted(); + if (f != null) { + writer.writeMessage( + 21, + f, + proto.WeightedPricingDescriptor.serializeBinaryToWriter + ); + } + f = message.getFreebie(); + if (f != null) { + writer.writeMessage( + 22, + f, + proto.FreebiePricingDescriptor.serializeBinaryToWriter + ); + } +}; + + +/** + * optional PricingType type = 1; + * @return {!proto.PricingType} + */ +proto.PricingDescriptor.prototype.getType = function() { + return /** @type {!proto.PricingType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** @param {!proto.PricingType} value */ +proto.PricingDescriptor.prototype.setType = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional UnitPricingDescriptor unit = 20; + * @return {?proto.UnitPricingDescriptor} + */ +proto.PricingDescriptor.prototype.getUnit = function() { + return /** @type{?proto.UnitPricingDescriptor} */ ( + jspb.Message.getWrapperField(this, proto.UnitPricingDescriptor, 20)); +}; + + +/** @param {?proto.UnitPricingDescriptor|undefined} value */ +proto.PricingDescriptor.prototype.setUnit = function(value) { + jspb.Message.setWrapperField(this, 20, value); +}; + + +proto.PricingDescriptor.prototype.clearUnit = function() { + this.setUnit(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {!boolean} + */ +proto.PricingDescriptor.prototype.hasUnit = function() { + return jspb.Message.getField(this, 20) != null; +}; + + +/** + * optional WeightedPricingDescriptor weighted = 21; + * @return {?proto.WeightedPricingDescriptor} + */ +proto.PricingDescriptor.prototype.getWeighted = function() { + return /** @type{?proto.WeightedPricingDescriptor} */ ( + jspb.Message.getWrapperField(this, proto.WeightedPricingDescriptor, 21)); +}; + + +/** @param {?proto.WeightedPricingDescriptor|undefined} value */ +proto.PricingDescriptor.prototype.setWeighted = function(value) { + jspb.Message.setWrapperField(this, 21, value); +}; + + +proto.PricingDescriptor.prototype.clearWeighted = function() { + this.setWeighted(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {!boolean} + */ +proto.PricingDescriptor.prototype.hasWeighted = function() { + return jspb.Message.getField(this, 21) != null; +}; + + +/** + * optional FreebiePricingDescriptor freebie = 22; + * @return {?proto.FreebiePricingDescriptor} + */ +proto.PricingDescriptor.prototype.getFreebie = function() { + return /** @type{?proto.FreebiePricingDescriptor} */ ( + jspb.Message.getWrapperField(this, proto.FreebiePricingDescriptor, 22)); +}; + + +/** @param {?proto.FreebiePricingDescriptor|undefined} value */ +proto.PricingDescriptor.prototype.setFreebie = function(value) { + jspb.Message.setWrapperField(this, 22, value); +}; + + +proto.PricingDescriptor.prototype.clearFreebie = function() { + this.setFreebie(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {!boolean} + */ +proto.PricingDescriptor.prototype.hasFreebie = function() { + return jspb.Message.getField(this, 22) != null; +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ProductPricing = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ProductPricing.repeatedFields_, null); +}; +goog.inherits(proto.ProductPricing, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.ProductPricing.displayName = 'proto.ProductPricing'; +} +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ProductPricing.repeatedFields_ = [1,2]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.ProductPricing.prototype.toObject = function(opt_includeInstance) { + return proto.ProductPricing.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ProductPricing} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ProductPricing.toObject = function(includeInstance, msg) { + var f, obj = { + discountsList: jspb.Message.toObjectList(msg.getDiscountsList(), + proto.SaleDescriptor.toObject, includeInstance), + manifestList: jspb.Message.toObjectList(msg.getManifestList(), + proto.PricingDescriptor.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ProductPricing} + */ +proto.ProductPricing.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ProductPricing; + return proto.ProductPricing.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ProductPricing} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ProductPricing} + */ +proto.ProductPricing.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.SaleDescriptor; + reader.readMessage(value,proto.SaleDescriptor.deserializeBinaryFromReader); + msg.addDiscounts(value); + break; + case 2: + var value = new proto.PricingDescriptor; + reader.readMessage(value,proto.PricingDescriptor.deserializeBinaryFromReader); + msg.addManifest(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ProductPricing.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ProductPricing.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ProductPricing} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ProductPricing.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDiscountsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.SaleDescriptor.serializeBinaryToWriter + ); + } + f = message.getManifestList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.PricingDescriptor.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated SaleDescriptor discounts = 1; + * @return {!Array.} + */ +proto.ProductPricing.prototype.getDiscountsList = function() { + return /** @type{!Array.} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.SaleDescriptor, 1)); +}; + + +/** @param {!Array.} value */ +proto.ProductPricing.prototype.setDiscountsList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.SaleDescriptor=} opt_value + * @param {number=} opt_index + * @return {!proto.SaleDescriptor} + */ +proto.ProductPricing.prototype.addDiscounts = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.SaleDescriptor, opt_index); +}; + + +proto.ProductPricing.prototype.clearDiscountsList = function() { + this.setDiscountsList([]); +}; + + +/** + * repeated PricingDescriptor manifest = 2; + * @return {!Array.} + */ +proto.ProductPricing.prototype.getManifestList = function() { + return /** @type{!Array.} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.PricingDescriptor, 2)); +}; + + +/** @param {!Array.} value */ +proto.ProductPricing.prototype.setManifestList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.PricingDescriptor=} opt_value + * @param {number=} opt_index + * @return {!proto.PricingDescriptor} + */ +proto.ProductPricing.prototype.addManifest = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.PricingDescriptor, opt_index); +}; + + +proto.ProductPricing.prototype.clearManifestList = function() { + this.setManifestList([]); +}; + + +/** + * @enum {number} + */ +proto.PricingType = { + UNIT: 0, + WEIGHTED: 1, + FREEBIE: 2 +}; + +/** + * @enum {number} + */ +proto.PricingWeightTier = { + OTHER: 0, + GRAM: 1, + HALFGRAM: 2, + QUARTERGRAM: 3, + DUB: 4, + EIGHTH: 5, + QUARTER: 6, + HALF: 7, + OUNCE: 8, + POUND: 9 +}; + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.Flower = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.Flower, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.Flower.displayName = 'proto.Flower'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.Flower.prototype.toObject = function(opt_includeInstance) { + return proto.Flower.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.Flower} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.Flower.toObject = function(includeInstance, msg) { + var f, obj = { + key: (f = msg.getKey()) && proto.ProductKey.toObject(includeInstance, f), + productData: (f = msg.getProductData()) && proto.ProductContent.toObject(includeInstance, f), + materialData: (f = msg.getMaterialData()) && proto.MaterialsData.toObject(includeInstance, f), + flags: (f = msg.getFlags()) && proto.FlagsDescriptor.toObject(includeInstance, f), + pricing: (f = msg.getPricing()) && proto.ProductPricing.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.Flower} + */ +proto.Flower.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.Flower; + return proto.Flower.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.Flower} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.Flower} + */ +proto.Flower.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.ProductKey; + reader.readMessage(value,proto.ProductKey.deserializeBinaryFromReader); + msg.setKey(value); + break; + case 20: + var value = new proto.ProductContent; + reader.readMessage(value,proto.ProductContent.deserializeBinaryFromReader); + msg.setProductData(value); + break; + case 21: + var value = new proto.MaterialsData; + reader.readMessage(value,proto.MaterialsData.deserializeBinaryFromReader); + msg.setMaterialData(value); + break; + case 22: + var value = new proto.FlagsDescriptor; + reader.readMessage(value,proto.FlagsDescriptor.deserializeBinaryFromReader); + msg.setFlags(value); + break; + case 23: + var value = new proto.ProductPricing; + reader.readMessage(value,proto.ProductPricing.deserializeBinaryFromReader); + msg.setPricing(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.Flower.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.Flower.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.Flower} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.Flower.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getKey(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.ProductKey.serializeBinaryToWriter + ); + } + f = message.getProductData(); + if (f != null) { + writer.writeMessage( + 20, + f, + proto.ProductContent.serializeBinaryToWriter + ); + } + f = message.getMaterialData(); + if (f != null) { + writer.writeMessage( + 21, + f, + proto.MaterialsData.serializeBinaryToWriter + ); + } + f = message.getFlags(); + if (f != null) { + writer.writeMessage( + 22, + f, + proto.FlagsDescriptor.serializeBinaryToWriter + ); + } + f = message.getPricing(); + if (f != null) { + writer.writeMessage( + 23, + f, + proto.ProductPricing.serializeBinaryToWriter + ); + } +}; + + +/** + * optional ProductKey key = 1; + * @return {?proto.ProductKey} + */ +proto.Flower.prototype.getKey = function() { + return /** @type{?proto.ProductKey} */ ( + jspb.Message.getWrapperField(this, proto.ProductKey, 1)); +}; + + +/** @param {?proto.ProductKey|undefined} value */ +proto.Flower.prototype.setKey = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +proto.Flower.prototype.clearKey = function() { + this.setKey(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {!boolean} + */ +proto.Flower.prototype.hasKey = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional ProductContent product_data = 20; + * @return {?proto.ProductContent} + */ +proto.Flower.prototype.getProductData = function() { + return /** @type{?proto.ProductContent} */ ( + jspb.Message.getWrapperField(this, proto.ProductContent, 20)); +}; + + +/** @param {?proto.ProductContent|undefined} value */ +proto.Flower.prototype.setProductData = function(value) { + jspb.Message.setWrapperField(this, 20, value); +}; + + +proto.Flower.prototype.clearProductData = function() { + this.setProductData(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {!boolean} + */ +proto.Flower.prototype.hasProductData = function() { + return jspb.Message.getField(this, 20) != null; +}; + + +/** + * optional MaterialsData material_data = 21; + * @return {?proto.MaterialsData} + */ +proto.Flower.prototype.getMaterialData = function() { + return /** @type{?proto.MaterialsData} */ ( + jspb.Message.getWrapperField(this, proto.MaterialsData, 21)); +}; + + +/** @param {?proto.MaterialsData|undefined} value */ +proto.Flower.prototype.setMaterialData = function(value) { + jspb.Message.setWrapperField(this, 21, value); +}; + + +proto.Flower.prototype.clearMaterialData = function() { + this.setMaterialData(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {!boolean} + */ +proto.Flower.prototype.hasMaterialData = function() { + return jspb.Message.getField(this, 21) != null; +}; + + +/** + * optional FlagsDescriptor flags = 22; + * @return {?proto.FlagsDescriptor} + */ +proto.Flower.prototype.getFlags = function() { + return /** @type{?proto.FlagsDescriptor} */ ( + jspb.Message.getWrapperField(this, proto.FlagsDescriptor, 22)); +}; + + +/** @param {?proto.FlagsDescriptor|undefined} value */ +proto.Flower.prototype.setFlags = function(value) { + jspb.Message.setWrapperField(this, 22, value); +}; + + +proto.Flower.prototype.clearFlags = function() { + this.setFlags(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {!boolean} + */ +proto.Flower.prototype.hasFlags = function() { + return jspb.Message.getField(this, 22) != null; +}; + + +/** + * optional ProductPricing pricing = 23; + * @return {?proto.ProductPricing} + */ +proto.Flower.prototype.getPricing = function() { + return /** @type{?proto.ProductPricing} */ ( + jspb.Message.getWrapperField(this, proto.ProductPricing, 23)); +}; + + +/** @param {?proto.ProductPricing|undefined} value */ +proto.Flower.prototype.setPricing = function(value) { + jspb.Message.setWrapperField(this, 23, value); +}; + + +proto.Flower.prototype.clearPricing = function() { + this.setPricing(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {!boolean} + */ +proto.Flower.prototype.hasPricing = function() { + return jspb.Message.getField(this, 23) != null; +}; + + diff --git a/languages/objc/geo/Address.pbobjc.h b/languages/objc/geo/Address.pbobjc.h new file mode 100644 index 0000000..3e4ae83 --- /dev/null +++ b/languages/objc/geo/Address.pbobjc.h @@ -0,0 +1,80 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: geo/Address.proto + +// This CPP symbol can be defined to use imports that match up to the framework +// imports needed when using CocoaPods. +#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS) + #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0 +#endif + +#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS + #import +#else + #import "GPBProtocolBuffers.h" +#endif + +#if GOOGLE_PROTOBUF_OBJC_VERSION < 30002 +#error This file was generated by a newer version of protoc which is incompatible with your Protocol Buffer library sources. +#endif +#if 30002 < GOOGLE_PROTOBUF_OBJC_MIN_SUPPORTED_VERSION +#error This file was generated by an older version of protoc which is incompatible with your Protocol Buffer library sources. +#endif + +// @@protoc_insertion_point(imports) + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + +CF_EXTERN_C_BEGIN + +NS_ASSUME_NONNULL_BEGIN + +#pragma mark - AddressRoot + +/** + * Exposes the extension registry for this file. + * + * The base class provides: + * @code + * + (GPBExtensionRegistry *)extensionRegistry; + * @endcode + * which is a @c GPBExtensionRegistry that includes all the extensions defined by + * this file and all files that it depends on. + **/ +@interface AddressRoot : GPBRootObject +@end + +#pragma mark - Address + +typedef GPB_ENUM(Address_FieldNumber) { + Address_FieldNumber_FirstLine = 1, + Address_FieldNumber_SecondLine = 2, + Address_FieldNumber_City = 3, + Address_FieldNumber_State = 4, + Address_FieldNumber_Zipcode = 5, + Address_FieldNumber_Country = 6, +}; + +@interface Address : GPBMessage + +@property(nonatomic, readwrite, copy, null_resettable) NSString *firstLine; + +@property(nonatomic, readwrite, copy, null_resettable) NSString *secondLine; + +@property(nonatomic, readwrite, copy, null_resettable) NSString *city; + +@property(nonatomic, readwrite, copy, null_resettable) NSString *state; + +@property(nonatomic, readwrite, copy, null_resettable) NSString *zipcode; + +@property(nonatomic, readwrite, copy, null_resettable) NSString *country; + +@end + +NS_ASSUME_NONNULL_END + +CF_EXTERN_C_END + +#pragma clang diagnostic pop + +// @@protoc_insertion_point(global_scope) diff --git a/languages/objc/geo/Address.pbobjc.m b/languages/objc/geo/Address.pbobjc.m new file mode 100644 index 0000000..a6b0471 --- /dev/null +++ b/languages/objc/geo/Address.pbobjc.m @@ -0,0 +1,146 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: geo/Address.proto + +// This CPP symbol can be defined to use imports that match up to the framework +// imports needed when using CocoaPods. +#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS) + #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0 +#endif + +#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS + #import +#else + #import "GPBProtocolBuffers_RuntimeSupport.h" +#endif + + #import "geo/Address.pbobjc.h" +// @@protoc_insertion_point(imports) + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + +#pragma mark - AddressRoot + +@implementation AddressRoot + +// No extensions in the file and no imports, so no need to generate +// +extensionRegistry. + +@end + +#pragma mark - AddressRoot_FileDescriptor + +static GPBFileDescriptor *AddressRoot_FileDescriptor(void) { + // This is called by +initialize so there is no need to worry + // about thread safety of the singleton. + static GPBFileDescriptor *descriptor = NULL; + if (!descriptor) { + GPB_DEBUG_CHECK_RUNTIME_VERSIONS(); + descriptor = [[GPBFileDescriptor alloc] initWithPackage:@"" + syntax:GPBFileSyntaxProto3]; + } + return descriptor; +} + +#pragma mark - Address + +@implementation Address + +@dynamic firstLine; +@dynamic secondLine; +@dynamic city; +@dynamic state; +@dynamic zipcode; +@dynamic country; + +typedef struct Address__storage_ { + uint32_t _has_storage_[1]; + NSString *firstLine; + NSString *secondLine; + NSString *city; + NSString *state; + NSString *zipcode; + NSString *country; +} Address__storage_; + +// This method is threadsafe because it is initially called +// in +initialize for each subclass. ++ (GPBDescriptor *)descriptor { + static GPBDescriptor *descriptor = nil; + if (!descriptor) { + static GPBMessageFieldDescription fields[] = { + { + .name = "firstLine", + .dataTypeSpecific.className = NULL, + .number = Address_FieldNumber_FirstLine, + .hasIndex = 0, + .offset = (uint32_t)offsetof(Address__storage_, firstLine), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeString, + }, + { + .name = "secondLine", + .dataTypeSpecific.className = NULL, + .number = Address_FieldNumber_SecondLine, + .hasIndex = 1, + .offset = (uint32_t)offsetof(Address__storage_, secondLine), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeString, + }, + { + .name = "city", + .dataTypeSpecific.className = NULL, + .number = Address_FieldNumber_City, + .hasIndex = 2, + .offset = (uint32_t)offsetof(Address__storage_, city), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeString, + }, + { + .name = "state", + .dataTypeSpecific.className = NULL, + .number = Address_FieldNumber_State, + .hasIndex = 3, + .offset = (uint32_t)offsetof(Address__storage_, state), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeString, + }, + { + .name = "zipcode", + .dataTypeSpecific.className = NULL, + .number = Address_FieldNumber_Zipcode, + .hasIndex = 4, + .offset = (uint32_t)offsetof(Address__storage_, zipcode), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeString, + }, + { + .name = "country", + .dataTypeSpecific.className = NULL, + .number = Address_FieldNumber_Country, + .hasIndex = 5, + .offset = (uint32_t)offsetof(Address__storage_, country), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeString, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[Address class] + rootClass:[AddressRoot class] + file:AddressRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(Address__storage_) + flags:GPBDescriptorInitializationFlag_None]; + NSAssert(descriptor == nil, @"Startup recursed!"); + descriptor = localDescriptor; + } + return descriptor; +} + +@end + + +#pragma clang diagnostic pop + +// @@protoc_insertion_point(global_scope) diff --git a/languages/php/Address.php b/languages/php/Address.php new file mode 100644 index 0000000..d5baca6 --- /dev/null +++ b/languages/php/Address.php @@ -0,0 +1,177 @@ +Address + */ +class Address extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string first_line = 1; + */ + private $first_line = ''; + /** + * Generated from protobuf field string second_line = 2; + */ + private $second_line = ''; + /** + * Generated from protobuf field string city = 3; + */ + private $city = ''; + /** + * Generated from protobuf field string state = 4; + */ + private $state = ''; + /** + * Generated from protobuf field string zipcode = 5; + */ + private $zipcode = ''; + /** + * Generated from protobuf field string country = 6; + */ + private $country = ''; + + public function __construct() { + \GPBMetadata\Geo\Address::initOnce(); + parent::__construct(); + } + + /** + * Generated from protobuf field string first_line = 1; + * @return string + */ + public function getFirstLine() + { + return $this->first_line; + } + + /** + * Generated from protobuf field string first_line = 1; + * @param string $var + * @return $this + */ + public function setFirstLine($var) + { + GPBUtil::checkString($var, True); + $this->first_line = $var; + + return $this; + } + + /** + * Generated from protobuf field string second_line = 2; + * @return string + */ + public function getSecondLine() + { + return $this->second_line; + } + + /** + * Generated from protobuf field string second_line = 2; + * @param string $var + * @return $this + */ + public function setSecondLine($var) + { + GPBUtil::checkString($var, True); + $this->second_line = $var; + + return $this; + } + + /** + * Generated from protobuf field string city = 3; + * @return string + */ + public function getCity() + { + return $this->city; + } + + /** + * Generated from protobuf field string city = 3; + * @param string $var + * @return $this + */ + public function setCity($var) + { + GPBUtil::checkString($var, True); + $this->city = $var; + + return $this; + } + + /** + * Generated from protobuf field string state = 4; + * @return string + */ + public function getState() + { + return $this->state; + } + + /** + * Generated from protobuf field string state = 4; + * @param string $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkString($var, True); + $this->state = $var; + + return $this; + } + + /** + * Generated from protobuf field string zipcode = 5; + * @return string + */ + public function getZipcode() + { + return $this->zipcode; + } + + /** + * Generated from protobuf field string zipcode = 5; + * @param string $var + * @return $this + */ + public function setZipcode($var) + { + GPBUtil::checkString($var, True); + $this->zipcode = $var; + + return $this; + } + + /** + * Generated from protobuf field string country = 6; + * @return string + */ + public function getCountry() + { + return $this->country; + } + + /** + * Generated from protobuf field string country = 6; + * @param string $var + * @return $this + */ + public function setCountry($var) + { + GPBUtil::checkString($var, True); + $this->country = $var; + + return $this; + } + +} + diff --git a/languages/php/Brand.php b/languages/php/Brand.php index 7697149..2baef31 100644 --- a/languages/php/Brand.php +++ b/languages/php/Brand.php @@ -7,32 +7,28 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Protobuf type Brand + * Generated from protobuf message Brand */ class Brand extends \Google\Protobuf\Internal\Message { /** - *
      * -- Basic Properties
-     * 
* - * .Name name = 1; + * Generated from protobuf field .Name name = 1; */ private $name = null; /** - * .Brand parent = 2; + * Generated from protobuf field .Brand parent = 2; */ private $parent = null; /** - * .Content summary = 3; + * Generated from protobuf field .Content summary = 3; */ private $summary = null; /** - *
      * -- Media
-     * 
* - * repeated .MediaItem media = 20; + * Generated from protobuf field repeated .MediaItem media = 20; */ private $media; @@ -42,11 +38,10 @@ public function __construct() { } /** - *
      * -- Basic Properties
-     * 
* - * .Name name = 1; + * Generated from protobuf field .Name name = 1; + * @return \Name */ public function getName() { @@ -54,20 +49,23 @@ public function getName() } /** - *
      * -- Basic Properties
-     * 
* - * .Name name = 1; + * Generated from protobuf field .Name name = 1; + * @param \Name $var + * @return $this */ - public function setName(&$var) + public function setName($var) { GPBUtil::checkMessage($var, \Name::class); $this->name = $var; + + return $this; } /** - * .Brand parent = 2; + * Generated from protobuf field .Brand parent = 2; + * @return \Brand */ public function getParent() { @@ -75,16 +73,21 @@ public function getParent() } /** - * .Brand parent = 2; + * Generated from protobuf field .Brand parent = 2; + * @param \Brand $var + * @return $this */ - public function setParent(&$var) + public function setParent($var) { GPBUtil::checkMessage($var, \Brand::class); $this->parent = $var; + + return $this; } /** - * .Content summary = 3; + * Generated from protobuf field .Content summary = 3; + * @return \Content */ public function getSummary() { @@ -92,20 +95,23 @@ public function getSummary() } /** - * .Content summary = 3; + * Generated from protobuf field .Content summary = 3; + * @param \Content $var + * @return $this */ - public function setSummary(&$var) + public function setSummary($var) { GPBUtil::checkMessage($var, \Content::class); $this->summary = $var; + + return $this; } /** - *
      * -- Media
-     * 
* - * repeated .MediaItem media = 20; + * Generated from protobuf field repeated .MediaItem media = 20; + * @return \Google\Protobuf\Internal\RepeatedField */ public function getMedia() { @@ -113,16 +119,18 @@ public function getMedia() } /** - *
      * -- Media
-     * 
* - * repeated .MediaItem media = 20; + * Generated from protobuf field repeated .MediaItem media = 20; + * @param \MediaItem[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this */ - public function setMedia(&$var) + public function setMedia($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \MediaItem::class); $this->media = $arr; + + return $this; } } diff --git a/languages/php/Compression.php b/languages/php/Compression.php index a299e55..a02ae4e 100644 --- a/languages/php/Compression.php +++ b/languages/php/Compression.php @@ -7,16 +7,16 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Protobuf type Compression + * Generated from protobuf message Compression */ class Compression extends \Google\Protobuf\Internal\Message { /** - * bool enabled = 1; + * Generated from protobuf field bool enabled = 1; */ private $enabled = false; /** - * .Compression.Type type = 2; + * Generated from protobuf field .Compression.Type type = 2; */ private $type = 0; @@ -26,7 +26,8 @@ public function __construct() { } /** - * bool enabled = 1; + * Generated from protobuf field bool enabled = 1; + * @return bool */ public function getEnabled() { @@ -34,16 +35,21 @@ public function getEnabled() } /** - * bool enabled = 1; + * Generated from protobuf field bool enabled = 1; + * @param bool $var + * @return $this */ public function setEnabled($var) { GPBUtil::checkBool($var); $this->enabled = $var; + + return $this; } /** - * .Compression.Type type = 2; + * Generated from protobuf field .Compression.Type type = 2; + * @return int */ public function getType() { @@ -51,12 +57,16 @@ public function getType() } /** - * .Compression.Type type = 2; + * Generated from protobuf field .Compression.Type type = 2; + * @param int $var + * @return $this */ public function setType($var) { GPBUtil::checkEnum($var, \Compression_Type::class); $this->type = $var; + + return $this; } } diff --git a/languages/php/Compression_Type.php b/languages/php/Compression_Type.php index feb807b..9a997c0 100644 --- a/languages/php/Compression_Type.php +++ b/languages/php/Compression_Type.php @@ -3,12 +3,12 @@ # source: base/Compression.proto /** - * Protobuf enum Compression.Type + * Protobuf enum Compression\Type */ class Compression_Type { /** - * GZIP = 0; + * Generated from protobuf enum GZIP = 0; */ const GZIP = 0; } diff --git a/languages/php/Content.php b/languages/php/Content.php index 68a5a45..5b297b2 100644 --- a/languages/php/Content.php +++ b/languages/php/Content.php @@ -7,28 +7,28 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Protobuf type Content + * Generated from protobuf message Content */ class Content extends \Google\Protobuf\Internal\Message { /** - * .Content.Type type = 1; + * Generated from protobuf field .Content.Type type = 1; */ private $type = 0; /** - * .Content.Encoding encoding = 2; + * Generated from protobuf field .Content.Encoding encoding = 2; */ private $encoding = 0; /** - * bytes content = 3; + * Generated from protobuf field bytes content = 3; */ private $content = ''; /** - * .Language language = 4; + * Generated from protobuf field .Language language = 4; */ private $language = 0; /** - * .Compression compression = 5; + * Generated from protobuf field .Compression compression = 5; */ private $compression = null; @@ -38,7 +38,8 @@ public function __construct() { } /** - * .Content.Type type = 1; + * Generated from protobuf field .Content.Type type = 1; + * @return int */ public function getType() { @@ -46,16 +47,21 @@ public function getType() } /** - * .Content.Type type = 1; + * Generated from protobuf field .Content.Type type = 1; + * @param int $var + * @return $this */ public function setType($var) { GPBUtil::checkEnum($var, \Content_Type::class); $this->type = $var; + + return $this; } /** - * .Content.Encoding encoding = 2; + * Generated from protobuf field .Content.Encoding encoding = 2; + * @return int */ public function getEncoding() { @@ -63,16 +69,21 @@ public function getEncoding() } /** - * .Content.Encoding encoding = 2; + * Generated from protobuf field .Content.Encoding encoding = 2; + * @param int $var + * @return $this */ public function setEncoding($var) { GPBUtil::checkEnum($var, \Content_Encoding::class); $this->encoding = $var; + + return $this; } /** - * bytes content = 3; + * Generated from protobuf field bytes content = 3; + * @return string */ public function getContent() { @@ -80,16 +91,21 @@ public function getContent() } /** - * bytes content = 3; + * Generated from protobuf field bytes content = 3; + * @param string $var + * @return $this */ public function setContent($var) { GPBUtil::checkString($var, False); $this->content = $var; + + return $this; } /** - * .Language language = 4; + * Generated from protobuf field .Language language = 4; + * @return int */ public function getLanguage() { @@ -97,16 +113,21 @@ public function getLanguage() } /** - * .Language language = 4; + * Generated from protobuf field .Language language = 4; + * @param int $var + * @return $this */ public function setLanguage($var) { GPBUtil::checkEnum($var, \Language::class); $this->language = $var; + + return $this; } /** - * .Compression compression = 5; + * Generated from protobuf field .Compression compression = 5; + * @return \Compression */ public function getCompression() { @@ -114,12 +135,16 @@ public function getCompression() } /** - * .Compression compression = 5; + * Generated from protobuf field .Compression compression = 5; + * @param \Compression $var + * @return $this */ - public function setCompression(&$var) + public function setCompression($var) { GPBUtil::checkMessage($var, \Compression::class); $this->compression = $var; + + return $this; } } diff --git a/languages/php/Content_Encoding.php b/languages/php/Content_Encoding.php index b783ad9..55d2f6b 100644 --- a/languages/php/Content_Encoding.php +++ b/languages/php/Content_Encoding.php @@ -3,12 +3,12 @@ # source: content/Content.proto /** - * Protobuf enum Content.Encoding + * Protobuf enum Content\Encoding */ class Content_Encoding { /** - * UTF8 = 0; + * Generated from protobuf enum UTF8 = 0; */ const UTF8 = 0; } diff --git a/languages/php/Content_Type.php b/languages/php/Content_Type.php index d9ce533..1d1745e 100644 --- a/languages/php/Content_Type.php +++ b/languages/php/Content_Type.php @@ -3,20 +3,20 @@ # source: content/Content.proto /** - * Protobuf enum Content.Type + * Protobuf enum Content\Type */ class Content_Type { /** - * TEXT = 0; + * Generated from protobuf enum TEXT = 0; */ const TEXT = 0; /** - * MARKDOWN = 1; + * Generated from protobuf enum MARKDOWN = 1; */ const MARKDOWN = 1; /** - * HTML = 2; + * Generated from protobuf enum HTML = 2; */ const HTML = 2; } diff --git a/languages/php/DocumentType.php b/languages/php/DocumentType.php index 83da924..65b8731 100644 --- a/languages/php/DocumentType.php +++ b/languages/php/DocumentType.php @@ -7,20 +7,18 @@ use Google\Protobuf\Internal\GPBUtil; /** - *
  * -- Media Type: Document -- //
- * 
* - * Protobuf type DocumentType + * Generated from protobuf message DocumentType */ class DocumentType extends \Google\Protobuf\Internal\Message { /** - * .DocumentType.DocumentKind kind = 1; + * Generated from protobuf field .DocumentType.DocumentKind kind = 1; */ private $kind = 0; /** - * bool compressed = 2; + * Generated from protobuf field bool compressed = 2; */ private $compressed = false; @@ -30,7 +28,8 @@ public function __construct() { } /** - * .DocumentType.DocumentKind kind = 1; + * Generated from protobuf field .DocumentType.DocumentKind kind = 1; + * @return int */ public function getKind() { @@ -38,16 +37,21 @@ public function getKind() } /** - * .DocumentType.DocumentKind kind = 1; + * Generated from protobuf field .DocumentType.DocumentKind kind = 1; + * @param int $var + * @return $this */ public function setKind($var) { GPBUtil::checkEnum($var, \DocumentType_DocumentKind::class); $this->kind = $var; + + return $this; } /** - * bool compressed = 2; + * Generated from protobuf field bool compressed = 2; + * @return bool */ public function getCompressed() { @@ -55,12 +59,16 @@ public function getCompressed() } /** - * bool compressed = 2; + * Generated from protobuf field bool compressed = 2; + * @param bool $var + * @return $this */ public function setCompressed($var) { GPBUtil::checkBool($var); $this->compressed = $var; + + return $this; } } diff --git a/languages/php/DocumentType_DocumentKind.php b/languages/php/DocumentType_DocumentKind.php index a9bf886..38da5be 100644 --- a/languages/php/DocumentType_DocumentKind.php +++ b/languages/php/DocumentType_DocumentKind.php @@ -3,24 +3,24 @@ # source: media/MediaType.proto /** - * Protobuf enum DocumentType.DocumentKind + * Protobuf enum DocumentType\DocumentKind */ class DocumentType_DocumentKind { /** - * TXT = 0; + * Generated from protobuf enum TXT = 0; */ const TXT = 0; /** - * HTML = 1; + * Generated from protobuf enum HTML = 1; */ const HTML = 1; /** - * PDF = 2; + * Generated from protobuf enum PDF = 2; */ const PDF = 2; /** - * MARKDOWN = 3; + * Generated from protobuf enum MARKDOWN = 3; */ const MARKDOWN = 3; } diff --git a/languages/php/FlagsDescriptor.php b/languages/php/FlagsDescriptor.php index 71c225d..937d302 100644 --- a/languages/php/FlagsDescriptor.php +++ b/languages/php/FlagsDescriptor.php @@ -7,28 +7,28 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Protobuf type FlagsDescriptor + * Generated from protobuf message FlagsDescriptor */ class FlagsDescriptor extends \Google\Protobuf\Internal\Message { /** - * bool visible = 1; + * Generated from protobuf field bool visible = 1; */ private $visible = false; /** - * bool premium = 2; + * Generated from protobuf field bool premium = 2; */ private $premium = false; /** - * bool featured = 3; + * Generated from protobuf field bool featured = 3; */ private $featured = false; /** - * bool lastchance = 4; + * Generated from protobuf field bool lastchance = 4; */ private $lastchance = false; /** - * bool inhouse = 5; + * Generated from protobuf field bool inhouse = 5; */ private $inhouse = false; @@ -38,7 +38,8 @@ public function __construct() { } /** - * bool visible = 1; + * Generated from protobuf field bool visible = 1; + * @return bool */ public function getVisible() { @@ -46,16 +47,21 @@ public function getVisible() } /** - * bool visible = 1; + * Generated from protobuf field bool visible = 1; + * @param bool $var + * @return $this */ public function setVisible($var) { GPBUtil::checkBool($var); $this->visible = $var; + + return $this; } /** - * bool premium = 2; + * Generated from protobuf field bool premium = 2; + * @return bool */ public function getPremium() { @@ -63,16 +69,21 @@ public function getPremium() } /** - * bool premium = 2; + * Generated from protobuf field bool premium = 2; + * @param bool $var + * @return $this */ public function setPremium($var) { GPBUtil::checkBool($var); $this->premium = $var; + + return $this; } /** - * bool featured = 3; + * Generated from protobuf field bool featured = 3; + * @return bool */ public function getFeatured() { @@ -80,16 +91,21 @@ public function getFeatured() } /** - * bool featured = 3; + * Generated from protobuf field bool featured = 3; + * @param bool $var + * @return $this */ public function setFeatured($var) { GPBUtil::checkBool($var); $this->featured = $var; + + return $this; } /** - * bool lastchance = 4; + * Generated from protobuf field bool lastchance = 4; + * @return bool */ public function getLastchance() { @@ -97,16 +113,21 @@ public function getLastchance() } /** - * bool lastchance = 4; + * Generated from protobuf field bool lastchance = 4; + * @param bool $var + * @return $this */ public function setLastchance($var) { GPBUtil::checkBool($var); $this->lastchance = $var; + + return $this; } /** - * bool inhouse = 5; + * Generated from protobuf field bool inhouse = 5; + * @return bool */ public function getInhouse() { @@ -114,12 +135,16 @@ public function getInhouse() } /** - * bool inhouse = 5; + * Generated from protobuf field bool inhouse = 5; + * @param bool $var + * @return $this */ public function setInhouse($var) { GPBUtil::checkBool($var); $this->inhouse = $var; + + return $this; } } diff --git a/languages/php/Flower.php b/languages/php/Flower.php index dad4be0..963fd6d 100644 --- a/languages/php/Flower.php +++ b/languages/php/Flower.php @@ -7,40 +7,34 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Protobuf type Flower + * Generated from protobuf message Flower */ class Flower extends \Google\Protobuf\Internal\Message { /** - *
      * -- Object Key
-     * 
* - * .ProductKey key = 1; + * Generated from protobuf field .ProductKey key = 1; */ private $key = null; /** - *
-     * -- Basic Product & Materials Data
-     * 
+ * -- Basic Product & Materials Data * - * .ProductContent product_data = 20; + * Generated from protobuf field .ProductContent product_data = 20; */ private $product_data = null; /** - * .MaterialsData material_data = 21; + * Generated from protobuf field .MaterialsData material_data = 21; */ private $material_data = null; /** - *
      * -- Flags and Pricing
-     * 
* - * .FlagsDescriptor flags = 22; + * Generated from protobuf field .FlagsDescriptor flags = 22; */ private $flags = null; /** - * .ProductPricing pricing = 23; + * Generated from protobuf field .ProductPricing pricing = 23; */ private $pricing = null; @@ -50,11 +44,10 @@ public function __construct() { } /** - *
      * -- Object Key
-     * 
* - * .ProductKey key = 1; + * Generated from protobuf field .ProductKey key = 1; + * @return \ProductKey */ public function getKey() { @@ -62,24 +55,25 @@ public function getKey() } /** - *
      * -- Object Key
-     * 
* - * .ProductKey key = 1; + * Generated from protobuf field .ProductKey key = 1; + * @param \ProductKey $var + * @return $this */ - public function setKey(&$var) + public function setKey($var) { GPBUtil::checkMessage($var, \ProductKey::class); $this->key = $var; + + return $this; } /** - *
-     * -- Basic Product & Materials Data
-     * 
+ * -- Basic Product & Materials Data * - * .ProductContent product_data = 20; + * Generated from protobuf field .ProductContent product_data = 20; + * @return \ProductContent */ public function getProductData() { @@ -87,20 +81,23 @@ public function getProductData() } /** - *
-     * -- Basic Product & Materials Data
-     * 
+ * -- Basic Product & Materials Data * - * .ProductContent product_data = 20; + * Generated from protobuf field .ProductContent product_data = 20; + * @param \ProductContent $var + * @return $this */ - public function setProductData(&$var) + public function setProductData($var) { GPBUtil::checkMessage($var, \ProductContent::class); $this->product_data = $var; + + return $this; } /** - * .MaterialsData material_data = 21; + * Generated from protobuf field .MaterialsData material_data = 21; + * @return \MaterialsData */ public function getMaterialData() { @@ -108,20 +105,23 @@ public function getMaterialData() } /** - * .MaterialsData material_data = 21; + * Generated from protobuf field .MaterialsData material_data = 21; + * @param \MaterialsData $var + * @return $this */ - public function setMaterialData(&$var) + public function setMaterialData($var) { GPBUtil::checkMessage($var, \MaterialsData::class); $this->material_data = $var; + + return $this; } /** - *
      * -- Flags and Pricing
-     * 
* - * .FlagsDescriptor flags = 22; + * Generated from protobuf field .FlagsDescriptor flags = 22; + * @return \FlagsDescriptor */ public function getFlags() { @@ -129,20 +129,23 @@ public function getFlags() } /** - *
      * -- Flags and Pricing
-     * 
* - * .FlagsDescriptor flags = 22; + * Generated from protobuf field .FlagsDescriptor flags = 22; + * @param \FlagsDescriptor $var + * @return $this */ - public function setFlags(&$var) + public function setFlags($var) { GPBUtil::checkMessage($var, \FlagsDescriptor::class); $this->flags = $var; + + return $this; } /** - * .ProductPricing pricing = 23; + * Generated from protobuf field .ProductPricing pricing = 23; + * @return \ProductPricing */ public function getPricing() { @@ -150,12 +153,16 @@ public function getPricing() } /** - * .ProductPricing pricing = 23; + * Generated from protobuf field .ProductPricing pricing = 23; + * @param \ProductPricing $var + * @return $this */ - public function setPricing(&$var) + public function setPricing($var) { GPBUtil::checkMessage($var, \ProductPricing::class); $this->pricing = $var; + + return $this; } } diff --git a/languages/php/FreebiePricingDescriptor.php b/languages/php/FreebiePricingDescriptor.php index 6923fd6..4e616d1 100644 --- a/languages/php/FreebiePricingDescriptor.php +++ b/languages/php/FreebiePricingDescriptor.php @@ -7,7 +7,7 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Protobuf type FreebiePricingDescriptor + * Generated from protobuf message FreebiePricingDescriptor */ class FreebiePricingDescriptor extends \Google\Protobuf\Internal\Message { diff --git a/languages/php/GPBMetadata/Geo/Address.php b/languages/php/GPBMetadata/Geo/Address.php new file mode 100644 index 0000000..04a8df8 --- /dev/null +++ b/languages/php/GPBMetadata/Geo/Address.php @@ -0,0 +1,29 @@ +internalAddGeneratedFile(hex2bin( + "0aac010a1167656f2f416464726573732e70726f746f22710a0741646472" . + "65737312120a0a66697273745f6c696e6518012001280912130a0b736563" . + "6f6e645f6c696e65180220012809120c0a0463697479180320012809120d" . + "0a057374617465180420012809120f0a077a6970636f6465180520012809" . + "120f0a07636f756e747279180620012809421c0a16696f2e626c6f6f6d62" . + "6f782e736368656d612e67656f48015001620670726f746f33" + )); + + static::$is_initialized = true; + } +} + diff --git a/languages/php/Genetics.php b/languages/php/Genetics.php index 215d252..61d87c8 100644 --- a/languages/php/Genetics.php +++ b/languages/php/Genetics.php @@ -7,16 +7,16 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Protobuf type Genetics + * Generated from protobuf message Genetics */ class Genetics extends \Google\Protobuf\Internal\Message { /** - * .Name male = 1; + * Generated from protobuf field .Name male = 1; */ private $male = null; /** - * .Name female = 2; + * Generated from protobuf field .Name female = 2; */ private $female = null; @@ -26,7 +26,8 @@ public function __construct() { } /** - * .Name male = 1; + * Generated from protobuf field .Name male = 1; + * @return \Name */ public function getMale() { @@ -34,16 +35,21 @@ public function getMale() } /** - * .Name male = 1; + * Generated from protobuf field .Name male = 1; + * @param \Name $var + * @return $this */ - public function setMale(&$var) + public function setMale($var) { GPBUtil::checkMessage($var, \Name::class); $this->male = $var; + + return $this; } /** - * .Name female = 2; + * Generated from protobuf field .Name female = 2; + * @return \Name */ public function getFemale() { @@ -51,12 +57,16 @@ public function getFemale() } /** - * .Name female = 2; + * Generated from protobuf field .Name female = 2; + * @param \Name $var + * @return $this */ - public function setFemale(&$var) + public function setFemale($var) { GPBUtil::checkMessage($var, \Name::class); $this->female = $var; + + return $this; } } diff --git a/languages/php/Grow.php b/languages/php/Grow.php index 47f0d3d..2f40ffd 100644 --- a/languages/php/Grow.php +++ b/languages/php/Grow.php @@ -8,19 +8,19 @@ class Grow { /** - * GENERIC = 0; + * Generated from protobuf enum GENERIC = 0; */ const GENERIC = 0; /** - * INDOOR = 1; + * Generated from protobuf enum INDOOR = 1; */ const INDOOR = 1; /** - * GREENHOUSE = 2; + * Generated from protobuf enum GREENHOUSE = 2; */ const GREENHOUSE = 2; /** - * OUTDOOR = 3; + * Generated from protobuf enum OUTDOOR = 3; */ const OUTDOOR = 3; } diff --git a/languages/php/ImageType.php b/languages/php/ImageType.php index 9a58e56..8eaa8ab 100644 --- a/languages/php/ImageType.php +++ b/languages/php/ImageType.php @@ -7,16 +7,14 @@ use Google\Protobuf\Internal\GPBUtil; /** - *
  * -- Media Type: Images -- //
- * 
* - * Protobuf type ImageType + * Generated from protobuf message ImageType */ class ImageType extends \Google\Protobuf\Internal\Message { /** - * .ImageType.ImageKind kind = 1; + * Generated from protobuf field .ImageType.ImageKind kind = 1; */ private $kind = 0; @@ -26,7 +24,8 @@ public function __construct() { } /** - * .ImageType.ImageKind kind = 1; + * Generated from protobuf field .ImageType.ImageKind kind = 1; + * @return int */ public function getKind() { @@ -34,12 +33,16 @@ public function getKind() } /** - * .ImageType.ImageKind kind = 1; + * Generated from protobuf field .ImageType.ImageKind kind = 1; + * @param int $var + * @return $this */ public function setKind($var) { GPBUtil::checkEnum($var, \ImageType_ImageKind::class); $this->kind = $var; + + return $this; } } diff --git a/languages/php/ImageType_ImageKind.php b/languages/php/ImageType_ImageKind.php index 538a869..a6dbfd1 100644 --- a/languages/php/ImageType_ImageKind.php +++ b/languages/php/ImageType_ImageKind.php @@ -3,28 +3,28 @@ # source: media/MediaType.proto /** - * Protobuf enum ImageType.ImageKind + * Protobuf enum ImageType\ImageKind */ class ImageType_ImageKind { /** - * PNG = 0; + * Generated from protobuf enum PNG = 0; */ const PNG = 0; /** - * JPG = 1; + * Generated from protobuf enum JPG = 1; */ const JPG = 1; /** - * GIF = 2; + * Generated from protobuf enum GIF = 2; */ const GIF = 2; /** - * SVG = 3; + * Generated from protobuf enum SVG = 3; */ const SVG = 3; /** - * WEBP = 4; + * Generated from protobuf enum WEBP = 4; */ const WEBP = 4; } diff --git a/languages/php/Language.php b/languages/php/Language.php index 55c4a3d..ede8371 100644 --- a/languages/php/Language.php +++ b/languages/php/Language.php @@ -8,15 +8,15 @@ class Language { /** - * ENGLISH = 0; + * Generated from protobuf enum ENGLISH = 0; */ const ENGLISH = 0; /** - * SPANISH = 1; + * Generated from protobuf enum SPANISH = 1; */ const SPANISH = 1; /** - * FRENCH = 2; + * Generated from protobuf enum FRENCH = 2; */ const FRENCH = 2; } diff --git a/languages/php/MaterialsData.php b/languages/php/MaterialsData.php index 503547d..1401a17 100644 --- a/languages/php/MaterialsData.php +++ b/languages/php/MaterialsData.php @@ -7,24 +7,24 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Protobuf type MaterialsData + * Generated from protobuf message MaterialsData */ class MaterialsData extends \Google\Protobuf\Internal\Message { /** - * repeated string ingredients = 1; + * Generated from protobuf field repeated string ingredients = 1; */ private $ingredients; /** - * .Grow grow = 2; + * Generated from protobuf field .Grow grow = 2; */ private $grow = 0; /** - * .Species species = 3; + * Generated from protobuf field .Species species = 3; */ private $species = 0; /** - * .Genetics genetics = 4; + * Generated from protobuf field .Genetics genetics = 4; */ private $genetics = null; @@ -34,7 +34,8 @@ public function __construct() { } /** - * repeated string ingredients = 1; + * Generated from protobuf field repeated string ingredients = 1; + * @return \Google\Protobuf\Internal\RepeatedField */ public function getIngredients() { @@ -42,16 +43,21 @@ public function getIngredients() } /** - * repeated string ingredients = 1; + * Generated from protobuf field repeated string ingredients = 1; + * @param string[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this */ - public function setIngredients(&$var) + public function setIngredients($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); $this->ingredients = $arr; + + return $this; } /** - * .Grow grow = 2; + * Generated from protobuf field .Grow grow = 2; + * @return int */ public function getGrow() { @@ -59,16 +65,21 @@ public function getGrow() } /** - * .Grow grow = 2; + * Generated from protobuf field .Grow grow = 2; + * @param int $var + * @return $this */ public function setGrow($var) { GPBUtil::checkEnum($var, \Grow::class); $this->grow = $var; + + return $this; } /** - * .Species species = 3; + * Generated from protobuf field .Species species = 3; + * @return int */ public function getSpecies() { @@ -76,16 +87,21 @@ public function getSpecies() } /** - * .Species species = 3; + * Generated from protobuf field .Species species = 3; + * @param int $var + * @return $this */ public function setSpecies($var) { GPBUtil::checkEnum($var, \Species::class); $this->species = $var; + + return $this; } /** - * .Genetics genetics = 4; + * Generated from protobuf field .Genetics genetics = 4; + * @return \Genetics */ public function getGenetics() { @@ -93,12 +109,16 @@ public function getGenetics() } /** - * .Genetics genetics = 4; + * Generated from protobuf field .Genetics genetics = 4; + * @param \Genetics $var + * @return $this */ - public function setGenetics(&$var) + public function setGenetics($var) { GPBUtil::checkMessage($var, \Genetics::class); $this->genetics = $var; + + return $this; } } diff --git a/languages/php/MediaItem.php b/languages/php/MediaItem.php index 399d8e4..1fae8e9 100644 --- a/languages/php/MediaItem.php +++ b/languages/php/MediaItem.php @@ -7,20 +7,20 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Protobuf type MediaItem + * Generated from protobuf message MediaItem */ class MediaItem extends \Google\Protobuf\Internal\Message { /** - * .MediaKey key = 1; + * Generated from protobuf field .MediaKey key = 1; */ private $key = null; /** - * .MediaType type = 2; + * Generated from protobuf field .MediaType type = 2; */ private $type = null; /** - * string name = 3; + * Generated from protobuf field string name = 3; */ private $name = ''; @@ -30,7 +30,8 @@ public function __construct() { } /** - * .MediaKey key = 1; + * Generated from protobuf field .MediaKey key = 1; + * @return \MediaKey */ public function getKey() { @@ -38,16 +39,21 @@ public function getKey() } /** - * .MediaKey key = 1; + * Generated from protobuf field .MediaKey key = 1; + * @param \MediaKey $var + * @return $this */ - public function setKey(&$var) + public function setKey($var) { GPBUtil::checkMessage($var, \MediaKey::class); $this->key = $var; + + return $this; } /** - * .MediaType type = 2; + * Generated from protobuf field .MediaType type = 2; + * @return \MediaType */ public function getType() { @@ -55,16 +61,21 @@ public function getType() } /** - * .MediaType type = 2; + * Generated from protobuf field .MediaType type = 2; + * @param \MediaType $var + * @return $this */ - public function setType(&$var) + public function setType($var) { GPBUtil::checkMessage($var, \MediaType::class); $this->type = $var; + + return $this; } /** - * string name = 3; + * Generated from protobuf field string name = 3; + * @return string */ public function getName() { @@ -72,12 +83,16 @@ public function getName() } /** - * string name = 3; + * Generated from protobuf field string name = 3; + * @param string $var + * @return $this */ public function setName($var) { GPBUtil::checkString($var, True); $this->name = $var; + + return $this; } } diff --git a/languages/php/MediaKey.php b/languages/php/MediaKey.php index e204895..ce336c5 100644 --- a/languages/php/MediaKey.php +++ b/languages/php/MediaKey.php @@ -7,12 +7,12 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Protobuf type MediaKey + * Generated from protobuf message MediaKey */ class MediaKey extends \Google\Protobuf\Internal\Message { /** - * string id = 1; + * Generated from protobuf field string id = 1; */ private $id = ''; @@ -22,7 +22,8 @@ public function __construct() { } /** - * string id = 1; + * Generated from protobuf field string id = 1; + * @return string */ public function getId() { @@ -30,12 +31,16 @@ public function getId() } /** - * string id = 1; + * Generated from protobuf field string id = 1; + * @param string $var + * @return $this */ public function setId($var) { GPBUtil::checkString($var, True); $this->id = $var; + + return $this; } } diff --git a/languages/php/MediaType.php b/languages/php/MediaType.php index 5df0526..1b4f985 100644 --- a/languages/php/MediaType.php +++ b/languages/php/MediaType.php @@ -7,28 +7,26 @@ use Google\Protobuf\Internal\GPBUtil; /** - *
  * -- Media Type: Top-level -- //
- * 
* - * Protobuf type MediaType + * Generated from protobuf message MediaType */ class MediaType extends \Google\Protobuf\Internal\Message { /** - * .MediaType.Kind kind = 1; + * Generated from protobuf field .MediaType.Kind kind = 1; */ private $kind = 0; /** - * .ImageType image_type = 101; + * Generated from protobuf field .ImageType image_type = 101; */ private $image_type = null; /** - * .DocumentType document_type = 201; + * Generated from protobuf field .DocumentType document_type = 201; */ private $document_type = null; /** - * .VideoType video_type = 301; + * Generated from protobuf field .VideoType video_type = 301; */ private $video_type = null; @@ -38,7 +36,8 @@ public function __construct() { } /** - * .MediaType.Kind kind = 1; + * Generated from protobuf field .MediaType.Kind kind = 1; + * @return int */ public function getKind() { @@ -46,16 +45,21 @@ public function getKind() } /** - * .MediaType.Kind kind = 1; + * Generated from protobuf field .MediaType.Kind kind = 1; + * @param int $var + * @return $this */ public function setKind($var) { GPBUtil::checkEnum($var, \MediaType_Kind::class); $this->kind = $var; + + return $this; } /** - * .ImageType image_type = 101; + * Generated from protobuf field .ImageType image_type = 101; + * @return \ImageType */ public function getImageType() { @@ -63,16 +67,21 @@ public function getImageType() } /** - * .ImageType image_type = 101; + * Generated from protobuf field .ImageType image_type = 101; + * @param \ImageType $var + * @return $this */ - public function setImageType(&$var) + public function setImageType($var) { GPBUtil::checkMessage($var, \ImageType::class); $this->image_type = $var; + + return $this; } /** - * .DocumentType document_type = 201; + * Generated from protobuf field .DocumentType document_type = 201; + * @return \DocumentType */ public function getDocumentType() { @@ -80,16 +89,21 @@ public function getDocumentType() } /** - * .DocumentType document_type = 201; + * Generated from protobuf field .DocumentType document_type = 201; + * @param \DocumentType $var + * @return $this */ - public function setDocumentType(&$var) + public function setDocumentType($var) { GPBUtil::checkMessage($var, \DocumentType::class); $this->document_type = $var; + + return $this; } /** - * .VideoType video_type = 301; + * Generated from protobuf field .VideoType video_type = 301; + * @return \VideoType */ public function getVideoType() { @@ -97,12 +111,16 @@ public function getVideoType() } /** - * .VideoType video_type = 301; + * Generated from protobuf field .VideoType video_type = 301; + * @param \VideoType $var + * @return $this */ - public function setVideoType(&$var) + public function setVideoType($var) { GPBUtil::checkMessage($var, \VideoType::class); $this->video_type = $var; + + return $this; } } diff --git a/languages/php/MediaType_Kind.php b/languages/php/MediaType_Kind.php index 9c6d3e6..1031752 100644 --- a/languages/php/MediaType_Kind.php +++ b/languages/php/MediaType_Kind.php @@ -3,24 +3,24 @@ # source: media/MediaType.proto /** - * Protobuf enum MediaType.Kind + * Protobuf enum MediaType\Kind */ class MediaType_Kind { /** - * LINK = 0; + * Generated from protobuf enum LINK = 0; */ const LINK = 0; /** - * IMAGE = 1; + * Generated from protobuf enum IMAGE = 1; */ const IMAGE = 1; /** - * DOCUMENT = 2; + * Generated from protobuf enum DOCUMENT = 2; */ const DOCUMENT = 2; /** - * VIDEO = 3; + * Generated from protobuf enum VIDEO = 3; */ const VIDEO = 3; } diff --git a/languages/php/Name.php b/languages/php/Name.php index 6c7f10c..e36209c 100644 --- a/languages/php/Name.php +++ b/languages/php/Name.php @@ -7,24 +7,20 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Protobuf type Name + * Generated from protobuf message Name */ class Name extends \Google\Protobuf\Internal\Message { /** - *
      * basic name
-     * 
* - * string primary = 1; + * Generated from protobuf field string primary = 1; */ private $primary = ''; /** - *
      * display name
-     * 
* - * string display = 2; + * Generated from protobuf field string display = 2; */ private $display = ''; @@ -34,11 +30,10 @@ public function __construct() { } /** - *
      * basic name
-     * 
* - * string primary = 1; + * Generated from protobuf field string primary = 1; + * @return string */ public function getPrimary() { @@ -46,24 +41,25 @@ public function getPrimary() } /** - *
      * basic name
-     * 
* - * string primary = 1; + * Generated from protobuf field string primary = 1; + * @param string $var + * @return $this */ public function setPrimary($var) { GPBUtil::checkString($var, True); $this->primary = $var; + + return $this; } /** - *
      * display name
-     * 
* - * string display = 2; + * Generated from protobuf field string display = 2; + * @return string */ public function getDisplay() { @@ -71,16 +67,18 @@ public function getDisplay() } /** - *
      * display name
-     * 
* - * string display = 2; + * Generated from protobuf field string display = 2; + * @param string $var + * @return $this */ public function setDisplay($var) { GPBUtil::checkString($var, True); $this->display = $var; + + return $this; } } diff --git a/languages/php/PricingDescriptor.php b/languages/php/PricingDescriptor.php index 4051b05..ad849c0 100644 --- a/languages/php/PricingDescriptor.php +++ b/languages/php/PricingDescriptor.php @@ -7,32 +7,28 @@ use Google\Protobuf\Internal\GPBUtil; /** - *
  * -- Pricing: Main Descriptor
- * 
* - * Protobuf type PricingDescriptor + * Generated from protobuf message PricingDescriptor */ class PricingDescriptor extends \Google\Protobuf\Internal\Message { /** - * .PricingType type = 1; + * Generated from protobuf field .PricingType type = 1; */ private $type = 0; /** - *
      * -- descriptors
-     * 
* - * .UnitPricingDescriptor unit = 20; + * Generated from protobuf field .UnitPricingDescriptor unit = 20; */ private $unit = null; /** - * .WeightedPricingDescriptor weighted = 21; + * Generated from protobuf field .WeightedPricingDescriptor weighted = 21; */ private $weighted = null; /** - * .FreebiePricingDescriptor freebie = 22; + * Generated from protobuf field .FreebiePricingDescriptor freebie = 22; */ private $freebie = null; @@ -42,7 +38,8 @@ public function __construct() { } /** - * .PricingType type = 1; + * Generated from protobuf field .PricingType type = 1; + * @return int */ public function getType() { @@ -50,20 +47,23 @@ public function getType() } /** - * .PricingType type = 1; + * Generated from protobuf field .PricingType type = 1; + * @param int $var + * @return $this */ public function setType($var) { GPBUtil::checkEnum($var, \PricingType::class); $this->type = $var; + + return $this; } /** - *
      * -- descriptors
-     * 
* - * .UnitPricingDescriptor unit = 20; + * Generated from protobuf field .UnitPricingDescriptor unit = 20; + * @return \UnitPricingDescriptor */ public function getUnit() { @@ -71,20 +71,23 @@ public function getUnit() } /** - *
      * -- descriptors
-     * 
* - * .UnitPricingDescriptor unit = 20; + * Generated from protobuf field .UnitPricingDescriptor unit = 20; + * @param \UnitPricingDescriptor $var + * @return $this */ - public function setUnit(&$var) + public function setUnit($var) { GPBUtil::checkMessage($var, \UnitPricingDescriptor::class); $this->unit = $var; + + return $this; } /** - * .WeightedPricingDescriptor weighted = 21; + * Generated from protobuf field .WeightedPricingDescriptor weighted = 21; + * @return \WeightedPricingDescriptor */ public function getWeighted() { @@ -92,16 +95,21 @@ public function getWeighted() } /** - * .WeightedPricingDescriptor weighted = 21; + * Generated from protobuf field .WeightedPricingDescriptor weighted = 21; + * @param \WeightedPricingDescriptor $var + * @return $this */ - public function setWeighted(&$var) + public function setWeighted($var) { GPBUtil::checkMessage($var, \WeightedPricingDescriptor::class); $this->weighted = $var; + + return $this; } /** - * .FreebiePricingDescriptor freebie = 22; + * Generated from protobuf field .FreebiePricingDescriptor freebie = 22; + * @return \FreebiePricingDescriptor */ public function getFreebie() { @@ -109,12 +117,16 @@ public function getFreebie() } /** - * .FreebiePricingDescriptor freebie = 22; + * Generated from protobuf field .FreebiePricingDescriptor freebie = 22; + * @param \FreebiePricingDescriptor $var + * @return $this */ - public function setFreebie(&$var) + public function setFreebie($var) { GPBUtil::checkMessage($var, \FreebiePricingDescriptor::class); $this->freebie = $var; + + return $this; } } diff --git a/languages/php/PricingTierAvailability.php b/languages/php/PricingTierAvailability.php index b12bf08..c1eac64 100644 --- a/languages/php/PricingTierAvailability.php +++ b/languages/php/PricingTierAvailability.php @@ -7,16 +7,16 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Protobuf type PricingTierAvailability + * Generated from protobuf message PricingTierAvailability */ class PricingTierAvailability extends \Google\Protobuf\Internal\Message { /** - * bool offered = 1; + * Generated from protobuf field bool offered = 1; */ private $offered = false; /** - * bool available = 2; + * Generated from protobuf field bool available = 2; */ private $available = false; @@ -26,7 +26,8 @@ public function __construct() { } /** - * bool offered = 1; + * Generated from protobuf field bool offered = 1; + * @return bool */ public function getOffered() { @@ -34,16 +35,21 @@ public function getOffered() } /** - * bool offered = 1; + * Generated from protobuf field bool offered = 1; + * @param bool $var + * @return $this */ public function setOffered($var) { GPBUtil::checkBool($var); $this->offered = $var; + + return $this; } /** - * bool available = 2; + * Generated from protobuf field bool available = 2; + * @return bool */ public function getAvailable() { @@ -51,12 +57,16 @@ public function getAvailable() } /** - * bool available = 2; + * Generated from protobuf field bool available = 2; + * @param bool $var + * @return $this */ public function setAvailable($var) { GPBUtil::checkBool($var); $this->available = $var; + + return $this; } } diff --git a/languages/php/PricingType.php b/languages/php/PricingType.php index c2d476f..58c84f3 100644 --- a/languages/php/PricingType.php +++ b/languages/php/PricingType.php @@ -3,24 +3,22 @@ # source: structs/pricing/PricingDescriptor.proto /** - *
  * -- Pricing: Objects
- * 
* * Protobuf enum PricingType */ class PricingType { /** - * UNIT = 0; + * Generated from protobuf enum UNIT = 0; */ const UNIT = 0; /** - * WEIGHTED = 1; + * Generated from protobuf enum WEIGHTED = 1; */ const WEIGHTED = 1; /** - * FREEBIE = 2; + * Generated from protobuf enum FREEBIE = 2; */ const FREEBIE = 2; } diff --git a/languages/php/PricingWeightTier.php b/languages/php/PricingWeightTier.php index b67a06d..a7adf2b 100644 --- a/languages/php/PricingWeightTier.php +++ b/languages/php/PricingWeightTier.php @@ -8,43 +8,43 @@ class PricingWeightTier { /** - * OTHER = 0; + * Generated from protobuf enum OTHER = 0; */ const OTHER = 0; /** - * GRAM = 1; + * Generated from protobuf enum GRAM = 1; */ const GRAM = 1; /** - * HALFGRAM = 2; + * Generated from protobuf enum HALFGRAM = 2; */ const HALFGRAM = 2; /** - * QUARTERGRAM = 3; + * Generated from protobuf enum QUARTERGRAM = 3; */ const QUARTERGRAM = 3; /** - * DUB = 4; + * Generated from protobuf enum DUB = 4; */ const DUB = 4; /** - * EIGHTH = 5; + * Generated from protobuf enum EIGHTH = 5; */ const EIGHTH = 5; /** - * QUARTER = 6; + * Generated from protobuf enum QUARTER = 6; */ const QUARTER = 6; /** - * HALF = 7; + * Generated from protobuf enum HALF = 7; */ const HALF = 7; /** - * OUNCE = 8; + * Generated from protobuf enum OUNCE = 8; */ const OUNCE = 8; /** - * POUND = 9; + * Generated from protobuf enum POUND = 9; */ const POUND = 9; } diff --git a/languages/php/Product.php b/languages/php/Product.php index eef439e..d86b6d9 100644 --- a/languages/php/Product.php +++ b/languages/php/Product.php @@ -7,24 +7,22 @@ use Google\Protobuf\Internal\GPBUtil; /** - *
  * -- Product Type: Top-level -- //
- * 
* - * Protobuf type Product + * Generated from protobuf message Product */ class Product extends \Google\Protobuf\Internal\Message { /** - * .ProductKey key = 1; + * Generated from protobuf field .ProductKey key = 1; */ private $key = null; /** - * .ProductType type = 2; + * Generated from protobuf field .ProductType type = 2; */ private $type = null; /** - * .google.protobuf.Any data = 3; + * Generated from protobuf field .google.protobuf.Any data = 3; */ private $data = null; @@ -34,7 +32,8 @@ public function __construct() { } /** - * .ProductKey key = 1; + * Generated from protobuf field .ProductKey key = 1; + * @return \ProductKey */ public function getKey() { @@ -42,16 +41,21 @@ public function getKey() } /** - * .ProductKey key = 1; + * Generated from protobuf field .ProductKey key = 1; + * @param \ProductKey $var + * @return $this */ - public function setKey(&$var) + public function setKey($var) { GPBUtil::checkMessage($var, \ProductKey::class); $this->key = $var; + + return $this; } /** - * .ProductType type = 2; + * Generated from protobuf field .ProductType type = 2; + * @return \ProductType */ public function getType() { @@ -59,16 +63,21 @@ public function getType() } /** - * .ProductType type = 2; + * Generated from protobuf field .ProductType type = 2; + * @param \ProductType $var + * @return $this */ - public function setType(&$var) + public function setType($var) { GPBUtil::checkMessage($var, \ProductType::class); $this->type = $var; + + return $this; } /** - * .google.protobuf.Any data = 3; + * Generated from protobuf field .google.protobuf.Any data = 3; + * @return \Google\Protobuf\Any */ public function getData() { @@ -76,12 +85,16 @@ public function getData() } /** - * .google.protobuf.Any data = 3; + * Generated from protobuf field .google.protobuf.Any data = 3; + * @param \Google\Protobuf\Any $var + * @return $this */ - public function setData(&$var) + public function setData($var) { GPBUtil::checkMessage($var, \Google\Protobuf\Any::class); $this->data = $var; + + return $this; } } diff --git a/languages/php/ProductContent.php b/languages/php/ProductContent.php index e6c383c..32fa78c 100644 --- a/languages/php/ProductContent.php +++ b/languages/php/ProductContent.php @@ -7,64 +7,50 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Protobuf type ProductContent + * Generated from protobuf message ProductContent */ class ProductContent extends \Google\Protobuf\Internal\Message { /** - *
      * -- Basic Properties
-     * 
* - * .Name name = 1; + * Generated from protobuf field .Name name = 1; */ private $name = null; /** - *
      * narrative summary
-     * 
* - * .Content summary = 2; + * Generated from protobuf field .Content summary = 2; */ private $summary = null; /** - *
      * product's brand
-     * 
* - * .Brand brand = 3; + * Generated from protobuf field .Brand brand = 3; */ private $brand = null; /** - *
      * -- Media
-     * 
* - * repeated .MediaItem media = 20; + * Generated from protobuf field repeated .MediaItem media = 20; */ private $media; /** - *
      * -- Extended Attributes
-     * 
* - * .Content usage = 30; + * Generated from protobuf field .Content usage = 30; */ private $usage = null; /** - *
      * dosage advice
-     * 
* - * .Content dosage = 31; + * Generated from protobuf field .Content dosage = 31; */ private $dosage = null; /** - *
      * internal advice
-     * 
* - * .Content advice = 32; + * Generated from protobuf field .Content advice = 32; */ private $advice = null; @@ -74,11 +60,10 @@ public function __construct() { } /** - *
      * -- Basic Properties
-     * 
* - * .Name name = 1; + * Generated from protobuf field .Name name = 1; + * @return \Name */ public function getName() { @@ -86,24 +71,25 @@ public function getName() } /** - *
      * -- Basic Properties
-     * 
* - * .Name name = 1; + * Generated from protobuf field .Name name = 1; + * @param \Name $var + * @return $this */ - public function setName(&$var) + public function setName($var) { GPBUtil::checkMessage($var, \Name::class); $this->name = $var; + + return $this; } /** - *
      * narrative summary
-     * 
* - * .Content summary = 2; + * Generated from protobuf field .Content summary = 2; + * @return \Content */ public function getSummary() { @@ -111,24 +97,25 @@ public function getSummary() } /** - *
      * narrative summary
-     * 
* - * .Content summary = 2; + * Generated from protobuf field .Content summary = 2; + * @param \Content $var + * @return $this */ - public function setSummary(&$var) + public function setSummary($var) { GPBUtil::checkMessage($var, \Content::class); $this->summary = $var; + + return $this; } /** - *
      * product's brand
-     * 
* - * .Brand brand = 3; + * Generated from protobuf field .Brand brand = 3; + * @return \Brand */ public function getBrand() { @@ -136,24 +123,25 @@ public function getBrand() } /** - *
      * product's brand
-     * 
* - * .Brand brand = 3; + * Generated from protobuf field .Brand brand = 3; + * @param \Brand $var + * @return $this */ - public function setBrand(&$var) + public function setBrand($var) { GPBUtil::checkMessage($var, \Brand::class); $this->brand = $var; + + return $this; } /** - *
      * -- Media
-     * 
* - * repeated .MediaItem media = 20; + * Generated from protobuf field repeated .MediaItem media = 20; + * @return \Google\Protobuf\Internal\RepeatedField */ public function getMedia() { @@ -161,24 +149,25 @@ public function getMedia() } /** - *
      * -- Media
-     * 
* - * repeated .MediaItem media = 20; + * Generated from protobuf field repeated .MediaItem media = 20; + * @param \MediaItem[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this */ - public function setMedia(&$var) + public function setMedia($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \MediaItem::class); $this->media = $arr; + + return $this; } /** - *
      * -- Extended Attributes
-     * 
* - * .Content usage = 30; + * Generated from protobuf field .Content usage = 30; + * @return \Content */ public function getUsage() { @@ -186,24 +175,25 @@ public function getUsage() } /** - *
      * -- Extended Attributes
-     * 
* - * .Content usage = 30; + * Generated from protobuf field .Content usage = 30; + * @param \Content $var + * @return $this */ - public function setUsage(&$var) + public function setUsage($var) { GPBUtil::checkMessage($var, \Content::class); $this->usage = $var; + + return $this; } /** - *
      * dosage advice
-     * 
* - * .Content dosage = 31; + * Generated from protobuf field .Content dosage = 31; + * @return \Content */ public function getDosage() { @@ -211,24 +201,25 @@ public function getDosage() } /** - *
      * dosage advice
-     * 
* - * .Content dosage = 31; + * Generated from protobuf field .Content dosage = 31; + * @param \Content $var + * @return $this */ - public function setDosage(&$var) + public function setDosage($var) { GPBUtil::checkMessage($var, \Content::class); $this->dosage = $var; + + return $this; } /** - *
      * internal advice
-     * 
* - * .Content advice = 32; + * Generated from protobuf field .Content advice = 32; + * @return \Content */ public function getAdvice() { @@ -236,16 +227,18 @@ public function getAdvice() } /** - *
      * internal advice
-     * 
* - * .Content advice = 32; + * Generated from protobuf field .Content advice = 32; + * @param \Content $var + * @return $this */ - public function setAdvice(&$var) + public function setAdvice($var) { GPBUtil::checkMessage($var, \Content::class); $this->advice = $var; + + return $this; } } diff --git a/languages/php/ProductFlag.php b/languages/php/ProductFlag.php index 227ee12..35de405 100644 --- a/languages/php/ProductFlag.php +++ b/languages/php/ProductFlag.php @@ -8,23 +8,23 @@ class ProductFlag { /** - * VISIBLE = 0; + * Generated from protobuf enum VISIBLE = 0; */ const VISIBLE = 0; /** - * PREMIUM = 1; + * Generated from protobuf enum PREMIUM = 1; */ const PREMIUM = 1; /** - * FEATURED = 2; + * Generated from protobuf enum FEATURED = 2; */ const FEATURED = 2; /** - * LASTCHANCE = 3; + * Generated from protobuf enum LASTCHANCE = 3; */ const LASTCHANCE = 3; /** - * INHOUSE = 4; + * Generated from protobuf enum INHOUSE = 4; */ const INHOUSE = 4; } diff --git a/languages/php/ProductFlagValue.php b/languages/php/ProductFlagValue.php index f4a2fca..855bb3c 100644 --- a/languages/php/ProductFlagValue.php +++ b/languages/php/ProductFlagValue.php @@ -7,16 +7,16 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Protobuf type ProductFlagValue + * Generated from protobuf message ProductFlagValue */ class ProductFlagValue extends \Google\Protobuf\Internal\Message { /** - * .ProductFlag type = 1; + * Generated from protobuf field .ProductFlag type = 1; */ private $type = 0; /** - * bool value = 2; + * Generated from protobuf field bool value = 2; */ private $value = false; @@ -26,7 +26,8 @@ public function __construct() { } /** - * .ProductFlag type = 1; + * Generated from protobuf field .ProductFlag type = 1; + * @return int */ public function getType() { @@ -34,16 +35,21 @@ public function getType() } /** - * .ProductFlag type = 1; + * Generated from protobuf field .ProductFlag type = 1; + * @param int $var + * @return $this */ public function setType($var) { GPBUtil::checkEnum($var, \ProductFlag::class); $this->type = $var; + + return $this; } /** - * bool value = 2; + * Generated from protobuf field bool value = 2; + * @return bool */ public function getValue() { @@ -51,12 +57,16 @@ public function getValue() } /** - * bool value = 2; + * Generated from protobuf field bool value = 2; + * @param bool $var + * @return $this */ public function setValue($var) { GPBUtil::checkBool($var); $this->value = $var; + + return $this; } } diff --git a/languages/php/ProductFlagset.php b/languages/php/ProductFlagset.php index d287ec5..f41d1b2 100644 --- a/languages/php/ProductFlagset.php +++ b/languages/php/ProductFlagset.php @@ -7,12 +7,12 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Protobuf type ProductFlagset + * Generated from protobuf message ProductFlagset */ class ProductFlagset extends \Google\Protobuf\Internal\Message { /** - * repeated .ProductFlagValue flags = 1; + * Generated from protobuf field repeated .ProductFlagValue flags = 1; */ private $flags; @@ -22,7 +22,8 @@ public function __construct() { } /** - * repeated .ProductFlagValue flags = 1; + * Generated from protobuf field repeated .ProductFlagValue flags = 1; + * @return \Google\Protobuf\Internal\RepeatedField */ public function getFlags() { @@ -30,12 +31,16 @@ public function getFlags() } /** - * repeated .ProductFlagValue flags = 1; + * Generated from protobuf field repeated .ProductFlagValue flags = 1; + * @param \ProductFlagValue[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this */ - public function setFlags(&$var) + public function setFlags($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \ProductFlagValue::class); $this->flags = $arr; + + return $this; } } diff --git a/languages/php/ProductKey.php b/languages/php/ProductKey.php index 48967ca..b71f0e3 100644 --- a/languages/php/ProductKey.php +++ b/languages/php/ProductKey.php @@ -7,12 +7,12 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Protobuf type ProductKey + * Generated from protobuf message ProductKey */ class ProductKey extends \Google\Protobuf\Internal\Message { /** - * string id = 1; + * Generated from protobuf field string id = 1; */ private $id = ''; @@ -22,7 +22,8 @@ public function __construct() { } /** - * string id = 1; + * Generated from protobuf field string id = 1; + * @return string */ public function getId() { @@ -30,12 +31,16 @@ public function getId() } /** - * string id = 1; + * Generated from protobuf field string id = 1; + * @param string $var + * @return $this */ public function setId($var) { GPBUtil::checkString($var, True); $this->id = $var; + + return $this; } } diff --git a/languages/php/ProductKind.php b/languages/php/ProductKind.php index b861fe5..bf7a512 100644 --- a/languages/php/ProductKind.php +++ b/languages/php/ProductKind.php @@ -8,35 +8,35 @@ class ProductKind { /** - * FLOWERS = 0; + * Generated from protobuf enum FLOWERS = 0; */ const FLOWERS = 0; /** - * EDIBLES = 1; + * Generated from protobuf enum EDIBLES = 1; */ const EDIBLES = 1; /** - * EXTRACTS = 2; + * Generated from protobuf enum EXTRACTS = 2; */ const EXTRACTS = 2; /** - * PREROLLS = 3; + * Generated from protobuf enum PREROLLS = 3; */ const PREROLLS = 3; /** - * APOTHECARY = 4; + * Generated from protobuf enum APOTHECARY = 4; */ const APOTHECARY = 4; /** - * CARTRIDGES = 5; + * Generated from protobuf enum CARTRIDGES = 5; */ const CARTRIDGES = 5; /** - * PLANTS = 6; + * Generated from protobuf enum PLANTS = 6; */ const PLANTS = 6; /** - * MERCHANDISE = 7; + * Generated from protobuf enum MERCHANDISE = 7; */ const MERCHANDISE = 7; } diff --git a/languages/php/ProductPricing.php b/languages/php/ProductPricing.php index 4caf2d2..8f5995a 100644 --- a/languages/php/ProductPricing.php +++ b/languages/php/ProductPricing.php @@ -7,20 +7,18 @@ use Google\Protobuf\Internal\GPBUtil; /** - *
  * -- Pricing: Product-level Object
- * 
* - * Protobuf type ProductPricing + * Generated from protobuf message ProductPricing */ class ProductPricing extends \Google\Protobuf\Internal\Message { /** - * repeated .SaleDescriptor discounts = 1; + * Generated from protobuf field repeated .SaleDescriptor discounts = 1; */ private $discounts; /** - * repeated .PricingDescriptor manifest = 2; + * Generated from protobuf field repeated .PricingDescriptor manifest = 2; */ private $manifest; @@ -30,7 +28,8 @@ public function __construct() { } /** - * repeated .SaleDescriptor discounts = 1; + * Generated from protobuf field repeated .SaleDescriptor discounts = 1; + * @return \Google\Protobuf\Internal\RepeatedField */ public function getDiscounts() { @@ -38,16 +37,21 @@ public function getDiscounts() } /** - * repeated .SaleDescriptor discounts = 1; + * Generated from protobuf field repeated .SaleDescriptor discounts = 1; + * @param \SaleDescriptor[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this */ - public function setDiscounts(&$var) + public function setDiscounts($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \SaleDescriptor::class); $this->discounts = $arr; + + return $this; } /** - * repeated .PricingDescriptor manifest = 2; + * Generated from protobuf field repeated .PricingDescriptor manifest = 2; + * @return \Google\Protobuf\Internal\RepeatedField */ public function getManifest() { @@ -55,12 +59,16 @@ public function getManifest() } /** - * repeated .PricingDescriptor manifest = 2; + * Generated from protobuf field repeated .PricingDescriptor manifest = 2; + * @param \PricingDescriptor[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this */ - public function setManifest(&$var) + public function setManifest($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \PricingDescriptor::class); $this->manifest = $arr; + + return $this; } } diff --git a/languages/php/ProductType.php b/languages/php/ProductType.php index 3070744..d4c32a6 100644 --- a/languages/php/ProductType.php +++ b/languages/php/ProductType.php @@ -7,16 +7,14 @@ use Google\Protobuf\Internal\GPBUtil; /** - *
  * -- Product Type: Top-level -- //
- * 
* - * Protobuf type ProductType + * Generated from protobuf message ProductType */ class ProductType extends \Google\Protobuf\Internal\Message { /** - * .ProductKind kind = 1; + * Generated from protobuf field .ProductKind kind = 1; */ private $kind = 0; @@ -26,7 +24,8 @@ public function __construct() { } /** - * .ProductKind kind = 1; + * Generated from protobuf field .ProductKind kind = 1; + * @return int */ public function getKind() { @@ -34,12 +33,16 @@ public function getKind() } /** - * .ProductKind kind = 1; + * Generated from protobuf field .ProductKind kind = 1; + * @param int $var + * @return $this */ public function setKind($var) { GPBUtil::checkEnum($var, \ProductKind::class); $this->kind = $var; + + return $this; } } diff --git a/languages/php/SaleDescriptor.php b/languages/php/SaleDescriptor.php index 67f830b..2ea6e92 100644 --- a/languages/php/SaleDescriptor.php +++ b/languages/php/SaleDescriptor.php @@ -7,48 +7,44 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Protobuf type SaleDescriptor + * Generated from protobuf message SaleDescriptor */ class SaleDescriptor extends \Google\Protobuf\Internal\Message { /** - *
      * sale metadata
-     * 
* - * .SaleType type = 1; + * Generated from protobuf field .SaleType type = 1; */ private $type = 0; /** - * uint64 effective = 2; + * Generated from protobuf field uint64 effective = 2; */ private $effective = 0; /** - * uint64 expiration = 3; + * Generated from protobuf field uint64 expiration = 3; */ private $expiration = 0; /** - *
      * sale amount and trigger properties
-     * 
* - * uint32 percentage_amount = 20; + * Generated from protobuf field uint32 percentage_amount = 20; */ private $percentage_amount = 0; /** - * uint32 bogo_trigger = 21; + * Generated from protobuf field uint32 bogo_trigger = 21; */ private $bogo_trigger = 0; /** - * uint32 bogo_reward = 22; + * Generated from protobuf field uint32 bogo_reward = 22; */ private $bogo_reward = 0; /** - * uint32 loyalty_trigger = 23; + * Generated from protobuf field uint32 loyalty_trigger = 23; */ private $loyalty_trigger = 0; /** - * uint32 loyalty_reward = 24; + * Generated from protobuf field uint32 loyalty_reward = 24; */ private $loyalty_reward = 0; @@ -58,11 +54,10 @@ public function __construct() { } /** - *
      * sale metadata
-     * 
* - * .SaleType type = 1; + * Generated from protobuf field .SaleType type = 1; + * @return int */ public function getType() { @@ -70,20 +65,23 @@ public function getType() } /** - *
      * sale metadata
-     * 
* - * .SaleType type = 1; + * Generated from protobuf field .SaleType type = 1; + * @param int $var + * @return $this */ public function setType($var) { GPBUtil::checkEnum($var, \SaleType::class); $this->type = $var; + + return $this; } /** - * uint64 effective = 2; + * Generated from protobuf field uint64 effective = 2; + * @return int|string */ public function getEffective() { @@ -91,16 +89,21 @@ public function getEffective() } /** - * uint64 effective = 2; + * Generated from protobuf field uint64 effective = 2; + * @param int|string $var + * @return $this */ public function setEffective($var) { GPBUtil::checkUint64($var); $this->effective = $var; + + return $this; } /** - * uint64 expiration = 3; + * Generated from protobuf field uint64 expiration = 3; + * @return int|string */ public function getExpiration() { @@ -108,20 +111,23 @@ public function getExpiration() } /** - * uint64 expiration = 3; + * Generated from protobuf field uint64 expiration = 3; + * @param int|string $var + * @return $this */ public function setExpiration($var) { GPBUtil::checkUint64($var); $this->expiration = $var; + + return $this; } /** - *
      * sale amount and trigger properties
-     * 
* - * uint32 percentage_amount = 20; + * Generated from protobuf field uint32 percentage_amount = 20; + * @return int */ public function getPercentageAmount() { @@ -129,20 +135,23 @@ public function getPercentageAmount() } /** - *
      * sale amount and trigger properties
-     * 
* - * uint32 percentage_amount = 20; + * Generated from protobuf field uint32 percentage_amount = 20; + * @param int $var + * @return $this */ public function setPercentageAmount($var) { GPBUtil::checkUint32($var); $this->percentage_amount = $var; + + return $this; } /** - * uint32 bogo_trigger = 21; + * Generated from protobuf field uint32 bogo_trigger = 21; + * @return int */ public function getBogoTrigger() { @@ -150,16 +159,21 @@ public function getBogoTrigger() } /** - * uint32 bogo_trigger = 21; + * Generated from protobuf field uint32 bogo_trigger = 21; + * @param int $var + * @return $this */ public function setBogoTrigger($var) { GPBUtil::checkUint32($var); $this->bogo_trigger = $var; + + return $this; } /** - * uint32 bogo_reward = 22; + * Generated from protobuf field uint32 bogo_reward = 22; + * @return int */ public function getBogoReward() { @@ -167,16 +181,21 @@ public function getBogoReward() } /** - * uint32 bogo_reward = 22; + * Generated from protobuf field uint32 bogo_reward = 22; + * @param int $var + * @return $this */ public function setBogoReward($var) { GPBUtil::checkUint32($var); $this->bogo_reward = $var; + + return $this; } /** - * uint32 loyalty_trigger = 23; + * Generated from protobuf field uint32 loyalty_trigger = 23; + * @return int */ public function getLoyaltyTrigger() { @@ -184,16 +203,21 @@ public function getLoyaltyTrigger() } /** - * uint32 loyalty_trigger = 23; + * Generated from protobuf field uint32 loyalty_trigger = 23; + * @param int $var + * @return $this */ public function setLoyaltyTrigger($var) { GPBUtil::checkUint32($var); $this->loyalty_trigger = $var; + + return $this; } /** - * uint32 loyalty_reward = 24; + * Generated from protobuf field uint32 loyalty_reward = 24; + * @return int */ public function getLoyaltyReward() { @@ -201,12 +225,16 @@ public function getLoyaltyReward() } /** - * uint32 loyalty_reward = 24; + * Generated from protobuf field uint32 loyalty_reward = 24; + * @param int $var + * @return $this */ public function setLoyaltyReward($var) { GPBUtil::checkUint32($var); $this->loyalty_reward = $var; + + return $this; } } diff --git a/languages/php/SaleType.php b/languages/php/SaleType.php index 6032d8d..195e65f 100644 --- a/languages/php/SaleType.php +++ b/languages/php/SaleType.php @@ -8,15 +8,15 @@ class SaleType { /** - * PERCENTAGE = 0; + * Generated from protobuf enum PERCENTAGE = 0; */ const PERCENTAGE = 0; /** - * BOGO = 1; + * Generated from protobuf enum BOGO = 1; */ const BOGO = 1; /** - * LOYALTY = 2; + * Generated from protobuf enum LOYALTY = 2; */ const LOYALTY = 2; } diff --git a/languages/php/Species.php b/languages/php/Species.php index 37bc90b..a24250b 100644 --- a/languages/php/Species.php +++ b/languages/php/Species.php @@ -8,27 +8,27 @@ class Species { /** - * UNSPECIFIED = 0; + * Generated from protobuf enum UNSPECIFIED = 0; */ const UNSPECIFIED = 0; /** - * SATIVA = 1; + * Generated from protobuf enum SATIVA = 1; */ const SATIVA = 1; /** - * HYBRID_SATIVA = 2; + * Generated from protobuf enum HYBRID_SATIVA = 2; */ const HYBRID_SATIVA = 2; /** - * HYBRID = 3; + * Generated from protobuf enum HYBRID = 3; */ const HYBRID = 3; /** - * HYBRID_INDICA = 4; + * Generated from protobuf enum HYBRID_INDICA = 4; */ const HYBRID_INDICA = 4; /** - * INDICA = 5; + * Generated from protobuf enum INDICA = 5; */ const INDICA = 5; } diff --git a/languages/php/UnitPricingDescriptor.php b/languages/php/UnitPricingDescriptor.php index 0142852..fd8856d 100644 --- a/languages/php/UnitPricingDescriptor.php +++ b/languages/php/UnitPricingDescriptor.php @@ -7,24 +7,22 @@ use Google\Protobuf\Internal\GPBUtil; /** - *
  * -- Pricing: Typed Descriptors
- * 
* - * Protobuf type UnitPricingDescriptor + * Generated from protobuf message UnitPricingDescriptor */ class UnitPricingDescriptor extends \Google\Protobuf\Internal\Message { /** - * float price_value = 1; + * Generated from protobuf field float price_value = 1; */ private $price_value = 0.0; /** - * .PricingTierAvailability status = 2; + * Generated from protobuf field .PricingTierAvailability status = 2; */ private $status = null; /** - * repeated .SaleDescriptor discounts = 3; + * Generated from protobuf field repeated .SaleDescriptor discounts = 3; */ private $discounts; @@ -34,7 +32,8 @@ public function __construct() { } /** - * float price_value = 1; + * Generated from protobuf field float price_value = 1; + * @return float */ public function getPriceValue() { @@ -42,16 +41,21 @@ public function getPriceValue() } /** - * float price_value = 1; + * Generated from protobuf field float price_value = 1; + * @param float $var + * @return $this */ public function setPriceValue($var) { GPBUtil::checkFloat($var); $this->price_value = $var; + + return $this; } /** - * .PricingTierAvailability status = 2; + * Generated from protobuf field .PricingTierAvailability status = 2; + * @return \PricingTierAvailability */ public function getStatus() { @@ -59,16 +63,21 @@ public function getStatus() } /** - * .PricingTierAvailability status = 2; + * Generated from protobuf field .PricingTierAvailability status = 2; + * @param \PricingTierAvailability $var + * @return $this */ - public function setStatus(&$var) + public function setStatus($var) { GPBUtil::checkMessage($var, \PricingTierAvailability::class); $this->status = $var; + + return $this; } /** - * repeated .SaleDescriptor discounts = 3; + * Generated from protobuf field repeated .SaleDescriptor discounts = 3; + * @return \Google\Protobuf\Internal\RepeatedField */ public function getDiscounts() { @@ -76,12 +85,16 @@ public function getDiscounts() } /** - * repeated .SaleDescriptor discounts = 3; + * Generated from protobuf field repeated .SaleDescriptor discounts = 3; + * @param \SaleDescriptor[]|\Google\Protobuf\Internal\RepeatedField $var + * @return $this */ - public function setDiscounts(&$var) + public function setDiscounts($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \SaleDescriptor::class); $this->discounts = $arr; + + return $this; } } diff --git a/languages/php/VideoType.php b/languages/php/VideoType.php index c15c831..cd6df6e 100644 --- a/languages/php/VideoType.php +++ b/languages/php/VideoType.php @@ -7,16 +7,14 @@ use Google\Protobuf\Internal\GPBUtil; /** - *
  * -- Media Type: Video -- //
- * 
* - * Protobuf type VideoType + * Generated from protobuf message VideoType */ class VideoType extends \Google\Protobuf\Internal\Message { /** - * .VideoType.VideoKind kind = 1; + * Generated from protobuf field .VideoType.VideoKind kind = 1; */ private $kind = 0; @@ -26,7 +24,8 @@ public function __construct() { } /** - * .VideoType.VideoKind kind = 1; + * Generated from protobuf field .VideoType.VideoKind kind = 1; + * @return int */ public function getKind() { @@ -34,12 +33,16 @@ public function getKind() } /** - * .VideoType.VideoKind kind = 1; + * Generated from protobuf field .VideoType.VideoKind kind = 1; + * @param int $var + * @return $this */ public function setKind($var) { GPBUtil::checkEnum($var, \VideoType_VideoKind::class); $this->kind = $var; + + return $this; } } diff --git a/languages/php/VideoType_VideoKind.php b/languages/php/VideoType_VideoKind.php index d45c413..69140d6 100644 --- a/languages/php/VideoType_VideoKind.php +++ b/languages/php/VideoType_VideoKind.php @@ -3,20 +3,20 @@ # source: media/MediaType.proto /** - * Protobuf enum VideoType.VideoKind + * Protobuf enum VideoType\VideoKind */ class VideoType_VideoKind { /** - * MP4 = 0; + * Generated from protobuf enum MP4 = 0; */ const MP4 = 0; /** - * FLV = 1; + * Generated from protobuf enum FLV = 1; */ const FLV = 1; /** - * HLS = 2; + * Generated from protobuf enum HLS = 2; */ const HLS = 2; } diff --git a/languages/php/WeightedPricingDescriptor.php b/languages/php/WeightedPricingDescriptor.php index f8c3147..e3b7dfb 100644 --- a/languages/php/WeightedPricingDescriptor.php +++ b/languages/php/WeightedPricingDescriptor.php @@ -7,20 +7,20 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Protobuf type WeightedPricingDescriptor + * Generated from protobuf message WeightedPricingDescriptor */ class WeightedPricingDescriptor extends \Google\Protobuf\Internal\Message { /** - * .PricingWeightTier weight = 1; + * Generated from protobuf field .PricingWeightTier weight = 1; */ private $weight = 0; /** - * .UnitPricingDescriptor tier = 2; + * Generated from protobuf field .UnitPricingDescriptor tier = 2; */ private $tier = null; /** - * float weightInGrams = 3; + * Generated from protobuf field float weightInGrams = 3; */ private $weightInGrams = 0.0; @@ -30,7 +30,8 @@ public function __construct() { } /** - * .PricingWeightTier weight = 1; + * Generated from protobuf field .PricingWeightTier weight = 1; + * @return int */ public function getWeight() { @@ -38,16 +39,21 @@ public function getWeight() } /** - * .PricingWeightTier weight = 1; + * Generated from protobuf field .PricingWeightTier weight = 1; + * @param int $var + * @return $this */ public function setWeight($var) { GPBUtil::checkEnum($var, \PricingWeightTier::class); $this->weight = $var; + + return $this; } /** - * .UnitPricingDescriptor tier = 2; + * Generated from protobuf field .UnitPricingDescriptor tier = 2; + * @return \UnitPricingDescriptor */ public function getTier() { @@ -55,16 +61,21 @@ public function getTier() } /** - * .UnitPricingDescriptor tier = 2; + * Generated from protobuf field .UnitPricingDescriptor tier = 2; + * @param \UnitPricingDescriptor $var + * @return $this */ - public function setTier(&$var) + public function setTier($var) { GPBUtil::checkMessage($var, \UnitPricingDescriptor::class); $this->tier = $var; + + return $this; } /** - * float weightInGrams = 3; + * Generated from protobuf field float weightInGrams = 3; + * @return float */ public function getWeightInGrams() { @@ -72,12 +83,16 @@ public function getWeightInGrams() } /** - * float weightInGrams = 3; + * Generated from protobuf field float weightInGrams = 3; + * @param float $var + * @return $this */ public function setWeightInGrams($var) { GPBUtil::checkFloat($var); $this->weightInGrams = $var; + + return $this; } } diff --git a/languages/python/geo/Address_pb2.py b/languages/python/geo/Address_pb2.py new file mode 100644 index 0000000..ce7a884 --- /dev/null +++ b/languages/python/geo/Address_pb2.py @@ -0,0 +1,106 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: geo/Address.proto + +import sys +_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +from google.protobuf import descriptor_pb2 +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor.FileDescriptor( + name='geo/Address.proto', + package='', + syntax='proto3', + serialized_pb=_b('\n\x11geo/Address.proto\"q\n\x07\x41\x64\x64ress\x12\x12\n\nfirst_line\x18\x01 \x01(\t\x12\x13\n\x0bsecond_line\x18\x02 \x01(\t\x12\x0c\n\x04\x63ity\x18\x03 \x01(\t\x12\r\n\x05state\x18\x04 \x01(\t\x12\x0f\n\x07zipcode\x18\x05 \x01(\t\x12\x0f\n\x07\x63ountry\x18\x06 \x01(\tB\x1c\n\x16io.bloombox.schema.geoH\x01P\x01\x62\x06proto3') +) + + + + +_ADDRESS = _descriptor.Descriptor( + name='Address', + full_name='Address', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='first_line', full_name='Address.first_line', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='second_line', full_name='Address.second_line', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='city', full_name='Address.city', index=2, + number=3, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='state', full_name='Address.state', index=3, + number=4, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='zipcode', full_name='Address.zipcode', index=4, + number=5, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + _descriptor.FieldDescriptor( + name='country', full_name='Address.country', index=5, + number=6, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=21, + serialized_end=134, +) + +DESCRIPTOR.message_types_by_name['Address'] = _ADDRESS +_sym_db.RegisterFileDescriptor(DESCRIPTOR) + +Address = _reflection.GeneratedProtocolMessageType('Address', (_message.Message,), dict( + DESCRIPTOR = _ADDRESS, + __module__ = 'geo.Address_pb2' + # @@protoc_insertion_point(class_scope:Address) + )) +_sym_db.RegisterMessage(Address) + + +DESCRIPTOR.has_options = True +DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('\n\026io.bloombox.schema.geoH\001P\001')) +# @@protoc_insertion_point(module_scope) diff --git a/languages/ruby/geo/Address_pb.rb b/languages/ruby/geo/Address_pb.rb new file mode 100644 index 0000000..095945c --- /dev/null +++ b/languages/ruby/geo/Address_pb.rb @@ -0,0 +1,17 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: geo/Address.proto + +require 'google/protobuf' + +Google::Protobuf::DescriptorPool.generated_pool.build do + add_message "Address" do + optional :first_line, :string, 1 + optional :second_line, :string, 2 + optional :city, :string, 3 + optional :state, :string, 4 + optional :zipcode, :string, 5 + optional :country, :string, 6 + end +end + +Address = Google::Protobuf::DescriptorPool.generated_pool.lookup("Address").msgclass diff --git a/languages/swift/Address.pb.swift b/languages/swift/Address.pb.swift new file mode 100644 index 0000000..a4bc0eb --- /dev/null +++ b/languages/swift/Address.pb.swift @@ -0,0 +1,108 @@ +// DO NOT EDIT. +// +// Generated by the Swift generator plugin for the protocol buffer compiler. +// Source: geo/Address.proto +// +// For information on using the generated types, please see the documenation: +// https://github.com/apple/swift-protobuf/ + +import Foundation +import SwiftProtobuf + +// If the compiler emits an error on this type, it is because this file +// was generated by a version of the `protoc` Swift plug-in that is +// incompatible with the version of SwiftProtobuf to which you are linking. +// Please ensure that your are building against the same version of the API +// that was used to generate this file. +fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { + struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} + typealias Version = _2 +} + +public struct Address: SwiftProtobuf.Message { + public static let protoMessageName: String = "Address" + + public var firstLine: String = String() + + public var secondLine: String = String() + + public var city: String = String() + + public var state: String = String() + + public var zipcode: String = String() + + public var country: String = String() + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &self.firstLine) + case 2: try decoder.decodeSingularStringField(value: &self.secondLine) + case 3: try decoder.decodeSingularStringField(value: &self.city) + case 4: try decoder.decodeSingularStringField(value: &self.state) + case 5: try decoder.decodeSingularStringField(value: &self.zipcode) + case 6: try decoder.decodeSingularStringField(value: &self.country) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.firstLine.isEmpty { + try visitor.visitSingularStringField(value: self.firstLine, fieldNumber: 1) + } + if !self.secondLine.isEmpty { + try visitor.visitSingularStringField(value: self.secondLine, fieldNumber: 2) + } + if !self.city.isEmpty { + try visitor.visitSingularStringField(value: self.city, fieldNumber: 3) + } + if !self.state.isEmpty { + try visitor.visitSingularStringField(value: self.state, fieldNumber: 4) + } + if !self.zipcode.isEmpty { + try visitor.visitSingularStringField(value: self.zipcode, fieldNumber: 5) + } + if !self.country.isEmpty { + try visitor.visitSingularStringField(value: self.country, fieldNumber: 6) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +// MARK: - Code below here is support for the SwiftProtobuf runtime. + +extension Address: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "first_line"), + 2: .standard(proto: "second_line"), + 3: .same(proto: "city"), + 4: .same(proto: "state"), + 5: .same(proto: "zipcode"), + 6: .same(proto: "country"), + ] + + public func _protobuf_generated_isEqualTo(other: Address) -> Bool { + if self.firstLine != other.firstLine {return false} + if self.secondLine != other.secondLine {return false} + if self.city != other.city {return false} + if self.state != other.state {return false} + if self.zipcode != other.zipcode {return false} + if self.country != other.country {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} diff --git a/releases/cpp-1.0.3.tar.gz b/releases/cpp-1.0.3.tar.gz new file mode 100644 index 0000000..c691a96 Binary files /dev/null and b/releases/cpp-1.0.3.tar.gz differ diff --git a/releases/csharp-1.0.3.tar.gz b/releases/csharp-1.0.3.tar.gz new file mode 100644 index 0000000..44b52de Binary files /dev/null and b/releases/csharp-1.0.3.tar.gz differ diff --git a/releases/dart-1.0.3.tar.gz b/releases/dart-1.0.3.tar.gz new file mode 100644 index 0000000..8b9fe92 Binary files /dev/null and b/releases/dart-1.0.3.tar.gz differ diff --git a/releases/go-1.0.3.tar.gz b/releases/go-1.0.3.tar.gz new file mode 100644 index 0000000..37835c8 Binary files /dev/null and b/releases/go-1.0.3.tar.gz differ diff --git a/releases/java-1.0.3.tar.gz b/releases/java-1.0.3.tar.gz new file mode 100644 index 0000000..9c0f21b Binary files /dev/null and b/releases/java-1.0.3.tar.gz differ diff --git a/releases/js-1.0.3.tar.gz b/releases/js-1.0.3.tar.gz new file mode 100644 index 0000000..a95b939 Binary files /dev/null and b/releases/js-1.0.3.tar.gz differ diff --git a/releases/objc-1.0.3.tar.gz b/releases/objc-1.0.3.tar.gz new file mode 100644 index 0000000..b228110 Binary files /dev/null and b/releases/objc-1.0.3.tar.gz differ diff --git a/releases/php-1.0.3.tar.gz b/releases/php-1.0.3.tar.gz new file mode 100644 index 0000000..5ead05d Binary files /dev/null and b/releases/php-1.0.3.tar.gz differ diff --git a/releases/python-1.0.3.tar.gz b/releases/python-1.0.3.tar.gz new file mode 100644 index 0000000..5e931b0 Binary files /dev/null and b/releases/python-1.0.3.tar.gz differ diff --git a/releases/ruby-1.0.3.tar.gz b/releases/ruby-1.0.3.tar.gz new file mode 100644 index 0000000..3e463a4 Binary files /dev/null and b/releases/ruby-1.0.3.tar.gz differ diff --git a/releases/swift-1.0.3.tar.gz b/releases/swift-1.0.3.tar.gz new file mode 100644 index 0000000..77e1a6e Binary files /dev/null and b/releases/swift-1.0.3.tar.gz differ diff --git a/sources/geo/Address.proto b/sources/geo/Address.proto new file mode 100644 index 0000000..d7aacd2 --- /dev/null +++ b/sources/geo/Address.proto @@ -0,0 +1,16 @@ + +syntax = "proto3"; + +option optimize_for = SPEED; +option java_package = "io.bloombox.schema.geo"; +option java_multiple_files = true; + + +message Address { + string first_line = 1; + string second_line = 2; + string city = 3; + string state = 4; + string zipcode = 5; + string country = 6; +}