diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
commit | 26a029d407be480d791972afb5975cf62c9360a6 (patch) | |
tree | f435a8308119effd964b339f76abb83a57c29483 /toolkit/components/url-classifier/chromium | |
parent | Initial commit. (diff) | |
download | firefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz firefox-26a029d407be480d791972afb5975cf62c9360a6.zip |
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'toolkit/components/url-classifier/chromium')
4 files changed, 19516 insertions, 0 deletions
diff --git a/toolkit/components/url-classifier/chromium/README.txt b/toolkit/components/url-classifier/chromium/README.txt new file mode 100644 index 0000000000..e4d4285804 --- /dev/null +++ b/toolkit/components/url-classifier/chromium/README.txt @@ -0,0 +1,41 @@ +# Overview + +'safebrowsing.proto' is modified from [1] with the following changes: + +- Added "package mozilla.safebrowsing;" +- Added more threatHit information + +################################## + // Client-reported identification. + optional ClientInfo client_info = 5; + + // Details about the user that encountered the threat. + message UserInfo { + // The UN M.49 region code associated with the user's location. + optional string region_code = 1; + + // Unique ID stable over a week or two + optional bytes user_id = 2; + } + + // Details about the user that encountered the threat. + optional UserInfo user_info = 6; +#################################### + +to avoid naming pollution. We use this source file along with protobuf compiler (protoc) to generate safebrowsing.pb.h/cc for safebrowsing v4 update and hash completion. The current generated files are compiled by protoc 2.6.1 since the protobuf library in gecko is not upgraded to 3.0 yet. + +# Update + +If you want to update to the latest upstream version, + +1. Checkout the latest one in [2] +2. Use protoc to generate safebrowsing.pb.h and safebrowsing.pb.cc. For example, + +$ protoc -I=. --cpp_out="../protobuf/" safebrowsing.proto + +(Note that we should use protoc v2.6.1 [3] to compile. You can find the compiled protoc in [4] if you don't have one.) + +[1] https://chromium.googlesource.com/chromium/src.git/+/9c4485f1ce7cac7ae82f7a4ae36ccc663afe806c/components/safe_browsing_db/safebrowsing.proto +[2] https://chromium.googlesource.com/chromium/src.git/+/master/components/safe_browsing_db/safebrowsing.proto +[3] https://github.com/google/protobuf/releases/tag/v2.6.1 +[4] https://repo1.maven.org/maven2/com/google/protobuf/protoc diff --git a/toolkit/components/url-classifier/chromium/safebrowsing.pb.cc b/toolkit/components/url-classifier/chromium/safebrowsing.pb.cc new file mode 100644 index 0000000000..ec0994bfd6 --- /dev/null +++ b/toolkit/components/url-classifier/chromium/safebrowsing.pb.cc @@ -0,0 +1,8925 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: safebrowsing.proto + +#include "safebrowsing.pb.h" + +#include <algorithm> + +#include <google/protobuf/io/coded_stream.h> +#include <google/protobuf/extension_set.h> +#include <google/protobuf/wire_format_lite.h> +#include <google/protobuf/io/zero_copy_stream_impl_lite.h> +// @@protoc_insertion_point(includes) +#include <google/protobuf/port_def.inc> + +PROTOBUF_PRAGMA_INIT_SEG + +namespace _pb = ::PROTOBUF_NAMESPACE_ID; +namespace _pbi = _pb::internal; + +namespace mozilla { +namespace safebrowsing { +PROTOBUF_CONSTEXPR ThreatInfo::ThreatInfo( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.threat_types_)*/{} + , /*decltype(_impl_.platform_types_)*/{} + , /*decltype(_impl_.threat_entries_)*/{} + , /*decltype(_impl_.threat_entry_types_)*/{} + , /*decltype(_impl_._cached_size_)*/{}} {} +struct ThreatInfoDefaultTypeInternal { + PROTOBUF_CONSTEXPR ThreatInfoDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~ThreatInfoDefaultTypeInternal() {} + union { + ThreatInfo _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ThreatInfoDefaultTypeInternal _ThreatInfo_default_instance_; +PROTOBUF_CONSTEXPR ThreatMatch::ThreatMatch( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_._has_bits_)*/{} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_.threat_)*/nullptr + , /*decltype(_impl_.threat_entry_metadata_)*/nullptr + , /*decltype(_impl_.cache_duration_)*/nullptr + , /*decltype(_impl_.threat_type_)*/0 + , /*decltype(_impl_.platform_type_)*/0 + , /*decltype(_impl_.threat_entry_type_)*/0} {} +struct ThreatMatchDefaultTypeInternal { + PROTOBUF_CONSTEXPR ThreatMatchDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~ThreatMatchDefaultTypeInternal() {} + union { + ThreatMatch _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ThreatMatchDefaultTypeInternal _ThreatMatch_default_instance_; +PROTOBUF_CONSTEXPR FindThreatMatchesRequest::FindThreatMatchesRequest( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_._has_bits_)*/{} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_.client_)*/nullptr + , /*decltype(_impl_.threat_info_)*/nullptr} {} +struct FindThreatMatchesRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR FindThreatMatchesRequestDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~FindThreatMatchesRequestDefaultTypeInternal() {} + union { + FindThreatMatchesRequest _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FindThreatMatchesRequestDefaultTypeInternal _FindThreatMatchesRequest_default_instance_; +PROTOBUF_CONSTEXPR FindThreatMatchesResponse::FindThreatMatchesResponse( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.matches_)*/{} + , /*decltype(_impl_._cached_size_)*/{}} {} +struct FindThreatMatchesResponseDefaultTypeInternal { + PROTOBUF_CONSTEXPR FindThreatMatchesResponseDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~FindThreatMatchesResponseDefaultTypeInternal() {} + union { + FindThreatMatchesResponse _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FindThreatMatchesResponseDefaultTypeInternal _FindThreatMatchesResponse_default_instance_; +PROTOBUF_CONSTEXPR FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints::FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_._has_bits_)*/{} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_.supported_compressions_)*/{} + , /*decltype(_impl_.region_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.max_update_entries_)*/0 + , /*decltype(_impl_.max_database_entries_)*/0} {} +struct FetchThreatListUpdatesRequest_ListUpdateRequest_ConstraintsDefaultTypeInternal { + PROTOBUF_CONSTEXPR FetchThreatListUpdatesRequest_ListUpdateRequest_ConstraintsDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~FetchThreatListUpdatesRequest_ListUpdateRequest_ConstraintsDefaultTypeInternal() {} + union { + FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FetchThreatListUpdatesRequest_ListUpdateRequest_ConstraintsDefaultTypeInternal _FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints_default_instance_; +PROTOBUF_CONSTEXPR FetchThreatListUpdatesRequest_ListUpdateRequest::FetchThreatListUpdatesRequest_ListUpdateRequest( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_._has_bits_)*/{} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_.state_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.constraints_)*/nullptr + , /*decltype(_impl_.threat_type_)*/0 + , /*decltype(_impl_.platform_type_)*/0 + , /*decltype(_impl_.threat_entry_type_)*/0} {} +struct FetchThreatListUpdatesRequest_ListUpdateRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR FetchThreatListUpdatesRequest_ListUpdateRequestDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~FetchThreatListUpdatesRequest_ListUpdateRequestDefaultTypeInternal() {} + union { + FetchThreatListUpdatesRequest_ListUpdateRequest _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FetchThreatListUpdatesRequest_ListUpdateRequestDefaultTypeInternal _FetchThreatListUpdatesRequest_ListUpdateRequest_default_instance_; +PROTOBUF_CONSTEXPR FetchThreatListUpdatesRequest::FetchThreatListUpdatesRequest( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_._has_bits_)*/{} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_.list_update_requests_)*/{} + , /*decltype(_impl_.client_)*/nullptr + , /*decltype(_impl_.chrome_client_info_)*/nullptr} {} +struct FetchThreatListUpdatesRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR FetchThreatListUpdatesRequestDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~FetchThreatListUpdatesRequestDefaultTypeInternal() {} + union { + FetchThreatListUpdatesRequest _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FetchThreatListUpdatesRequestDefaultTypeInternal _FetchThreatListUpdatesRequest_default_instance_; +PROTOBUF_CONSTEXPR FetchThreatListUpdatesResponse_ListUpdateResponse::FetchThreatListUpdatesResponse_ListUpdateResponse( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_._has_bits_)*/{} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_.additions_)*/{} + , /*decltype(_impl_.removals_)*/{} + , /*decltype(_impl_.new_client_state_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.checksum_)*/nullptr + , /*decltype(_impl_.threat_type_)*/0 + , /*decltype(_impl_.threat_entry_type_)*/0 + , /*decltype(_impl_.platform_type_)*/0 + , /*decltype(_impl_.response_type_)*/0} {} +struct FetchThreatListUpdatesResponse_ListUpdateResponseDefaultTypeInternal { + PROTOBUF_CONSTEXPR FetchThreatListUpdatesResponse_ListUpdateResponseDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~FetchThreatListUpdatesResponse_ListUpdateResponseDefaultTypeInternal() {} + union { + FetchThreatListUpdatesResponse_ListUpdateResponse _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FetchThreatListUpdatesResponse_ListUpdateResponseDefaultTypeInternal _FetchThreatListUpdatesResponse_ListUpdateResponse_default_instance_; +PROTOBUF_CONSTEXPR FetchThreatListUpdatesResponse::FetchThreatListUpdatesResponse( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_._has_bits_)*/{} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_.list_update_responses_)*/{} + , /*decltype(_impl_.minimum_wait_duration_)*/nullptr} {} +struct FetchThreatListUpdatesResponseDefaultTypeInternal { + PROTOBUF_CONSTEXPR FetchThreatListUpdatesResponseDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~FetchThreatListUpdatesResponseDefaultTypeInternal() {} + union { + FetchThreatListUpdatesResponse _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FetchThreatListUpdatesResponseDefaultTypeInternal _FetchThreatListUpdatesResponse_default_instance_; +PROTOBUF_CONSTEXPR FindFullHashesRequest::FindFullHashesRequest( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_._has_bits_)*/{} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_.client_states_)*/{} + , /*decltype(_impl_.client_)*/nullptr + , /*decltype(_impl_.threat_info_)*/nullptr} {} +struct FindFullHashesRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR FindFullHashesRequestDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~FindFullHashesRequestDefaultTypeInternal() {} + union { + FindFullHashesRequest _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FindFullHashesRequestDefaultTypeInternal _FindFullHashesRequest_default_instance_; +PROTOBUF_CONSTEXPR FindFullHashesResponse::FindFullHashesResponse( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_._has_bits_)*/{} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_.matches_)*/{} + , /*decltype(_impl_.minimum_wait_duration_)*/nullptr + , /*decltype(_impl_.negative_cache_duration_)*/nullptr} {} +struct FindFullHashesResponseDefaultTypeInternal { + PROTOBUF_CONSTEXPR FindFullHashesResponseDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~FindFullHashesResponseDefaultTypeInternal() {} + union { + FindFullHashesResponse _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FindFullHashesResponseDefaultTypeInternal _FindFullHashesResponse_default_instance_; +PROTOBUF_CONSTEXPR ThreatHit_ThreatSource::ThreatHit_ThreatSource( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_._has_bits_)*/{} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_.url_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.remote_ip_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.referrer_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.type_)*/0} {} +struct ThreatHit_ThreatSourceDefaultTypeInternal { + PROTOBUF_CONSTEXPR ThreatHit_ThreatSourceDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~ThreatHit_ThreatSourceDefaultTypeInternal() {} + union { + ThreatHit_ThreatSource _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ThreatHit_ThreatSourceDefaultTypeInternal _ThreatHit_ThreatSource_default_instance_; +PROTOBUF_CONSTEXPR ThreatHit_UserInfo::ThreatHit_UserInfo( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_._has_bits_)*/{} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_.region_code_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.user_id_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}} {} +struct ThreatHit_UserInfoDefaultTypeInternal { + PROTOBUF_CONSTEXPR ThreatHit_UserInfoDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~ThreatHit_UserInfoDefaultTypeInternal() {} + union { + ThreatHit_UserInfo _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ThreatHit_UserInfoDefaultTypeInternal _ThreatHit_UserInfo_default_instance_; +PROTOBUF_CONSTEXPR ThreatHit::ThreatHit( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_._has_bits_)*/{} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_.resources_)*/{} + , /*decltype(_impl_.entry_)*/nullptr + , /*decltype(_impl_.client_info_)*/nullptr + , /*decltype(_impl_.user_info_)*/nullptr + , /*decltype(_impl_.threat_type_)*/0 + , /*decltype(_impl_.platform_type_)*/0} {} +struct ThreatHitDefaultTypeInternal { + PROTOBUF_CONSTEXPR ThreatHitDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~ThreatHitDefaultTypeInternal() {} + union { + ThreatHit _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ThreatHitDefaultTypeInternal _ThreatHit_default_instance_; +PROTOBUF_CONSTEXPR ClientInfo::ClientInfo( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_._has_bits_)*/{} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_.client_id_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.client_version_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}} {} +struct ClientInfoDefaultTypeInternal { + PROTOBUF_CONSTEXPR ClientInfoDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~ClientInfoDefaultTypeInternal() {} + union { + ClientInfo _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ClientInfoDefaultTypeInternal _ClientInfo_default_instance_; +PROTOBUF_CONSTEXPR ChromeClientInfo::ChromeClientInfo( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_._has_bits_)*/{} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_.reporting_population_)*/0} {} +struct ChromeClientInfoDefaultTypeInternal { + PROTOBUF_CONSTEXPR ChromeClientInfoDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~ChromeClientInfoDefaultTypeInternal() {} + union { + ChromeClientInfo _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ChromeClientInfoDefaultTypeInternal _ChromeClientInfo_default_instance_; +PROTOBUF_CONSTEXPR Checksum::Checksum( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_._has_bits_)*/{} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_.sha256_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}} {} +struct ChecksumDefaultTypeInternal { + PROTOBUF_CONSTEXPR ChecksumDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~ChecksumDefaultTypeInternal() {} + union { + Checksum _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ChecksumDefaultTypeInternal _Checksum_default_instance_; +PROTOBUF_CONSTEXPR ThreatEntry::ThreatEntry( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_._has_bits_)*/{} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_.hash_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.url_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}} {} +struct ThreatEntryDefaultTypeInternal { + PROTOBUF_CONSTEXPR ThreatEntryDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~ThreatEntryDefaultTypeInternal() {} + union { + ThreatEntry _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ThreatEntryDefaultTypeInternal _ThreatEntry_default_instance_; +PROTOBUF_CONSTEXPR ThreatEntrySet::ThreatEntrySet( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_._has_bits_)*/{} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_.raw_hashes_)*/nullptr + , /*decltype(_impl_.raw_indices_)*/nullptr + , /*decltype(_impl_.rice_hashes_)*/nullptr + , /*decltype(_impl_.rice_indices_)*/nullptr + , /*decltype(_impl_.compression_type_)*/0} {} +struct ThreatEntrySetDefaultTypeInternal { + PROTOBUF_CONSTEXPR ThreatEntrySetDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~ThreatEntrySetDefaultTypeInternal() {} + union { + ThreatEntrySet _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ThreatEntrySetDefaultTypeInternal _ThreatEntrySet_default_instance_; +PROTOBUF_CONSTEXPR RawIndices::RawIndices( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.indices_)*/{} + , /*decltype(_impl_._cached_size_)*/{}} {} +struct RawIndicesDefaultTypeInternal { + PROTOBUF_CONSTEXPR RawIndicesDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~RawIndicesDefaultTypeInternal() {} + union { + RawIndices _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RawIndicesDefaultTypeInternal _RawIndices_default_instance_; +PROTOBUF_CONSTEXPR RawHashes::RawHashes( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_._has_bits_)*/{} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_.raw_hashes_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.prefix_size_)*/0} {} +struct RawHashesDefaultTypeInternal { + PROTOBUF_CONSTEXPR RawHashesDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~RawHashesDefaultTypeInternal() {} + union { + RawHashes _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RawHashesDefaultTypeInternal _RawHashes_default_instance_; +PROTOBUF_CONSTEXPR RiceDeltaEncoding::RiceDeltaEncoding( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_._has_bits_)*/{} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_.encoded_data_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.first_value_)*/int64_t{0} + , /*decltype(_impl_.rice_parameter_)*/0 + , /*decltype(_impl_.num_entries_)*/0} {} +struct RiceDeltaEncodingDefaultTypeInternal { + PROTOBUF_CONSTEXPR RiceDeltaEncodingDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~RiceDeltaEncodingDefaultTypeInternal() {} + union { + RiceDeltaEncoding _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RiceDeltaEncodingDefaultTypeInternal _RiceDeltaEncoding_default_instance_; +PROTOBUF_CONSTEXPR ThreatEntryMetadata_MetadataEntry::ThreatEntryMetadata_MetadataEntry( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_._has_bits_)*/{} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_.key_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.value_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}} {} +struct ThreatEntryMetadata_MetadataEntryDefaultTypeInternal { + PROTOBUF_CONSTEXPR ThreatEntryMetadata_MetadataEntryDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~ThreatEntryMetadata_MetadataEntryDefaultTypeInternal() {} + union { + ThreatEntryMetadata_MetadataEntry _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ThreatEntryMetadata_MetadataEntryDefaultTypeInternal _ThreatEntryMetadata_MetadataEntry_default_instance_; +PROTOBUF_CONSTEXPR ThreatEntryMetadata::ThreatEntryMetadata( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.entries_)*/{} + , /*decltype(_impl_._cached_size_)*/{}} {} +struct ThreatEntryMetadataDefaultTypeInternal { + PROTOBUF_CONSTEXPR ThreatEntryMetadataDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~ThreatEntryMetadataDefaultTypeInternal() {} + union { + ThreatEntryMetadata _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ThreatEntryMetadataDefaultTypeInternal _ThreatEntryMetadata_default_instance_; +PROTOBUF_CONSTEXPR ThreatListDescriptor::ThreatListDescriptor( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_._has_bits_)*/{} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_.threat_type_)*/0 + , /*decltype(_impl_.platform_type_)*/0 + , /*decltype(_impl_.threat_entry_type_)*/0} {} +struct ThreatListDescriptorDefaultTypeInternal { + PROTOBUF_CONSTEXPR ThreatListDescriptorDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~ThreatListDescriptorDefaultTypeInternal() {} + union { + ThreatListDescriptor _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ThreatListDescriptorDefaultTypeInternal _ThreatListDescriptor_default_instance_; +PROTOBUF_CONSTEXPR ListThreatListsResponse::ListThreatListsResponse( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.threat_lists_)*/{} + , /*decltype(_impl_._cached_size_)*/{}} {} +struct ListThreatListsResponseDefaultTypeInternal { + PROTOBUF_CONSTEXPR ListThreatListsResponseDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~ListThreatListsResponseDefaultTypeInternal() {} + union { + ListThreatListsResponse _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ListThreatListsResponseDefaultTypeInternal _ListThreatListsResponse_default_instance_; +PROTOBUF_CONSTEXPR Duration::Duration( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_._has_bits_)*/{} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_.seconds_)*/int64_t{0} + , /*decltype(_impl_.nanos_)*/0} {} +struct DurationDefaultTypeInternal { + PROTOBUF_CONSTEXPR DurationDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~DurationDefaultTypeInternal() {} + union { + Duration _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DurationDefaultTypeInternal _Duration_default_instance_; +} // namespace safebrowsing +} // namespace mozilla +namespace mozilla { +namespace safebrowsing { +bool FetchThreatListUpdatesResponse_ListUpdateResponse_ResponseType_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + return true; + default: + return false; + } +} + +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> FetchThreatListUpdatesResponse_ListUpdateResponse_ResponseType_strings[3] = {}; + +static const char FetchThreatListUpdatesResponse_ListUpdateResponse_ResponseType_names[] = + "FULL_UPDATE" + "PARTIAL_UPDATE" + "RESPONSE_TYPE_UNSPECIFIED"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry FetchThreatListUpdatesResponse_ListUpdateResponse_ResponseType_entries[] = { + { {FetchThreatListUpdatesResponse_ListUpdateResponse_ResponseType_names + 0, 11}, 2 }, + { {FetchThreatListUpdatesResponse_ListUpdateResponse_ResponseType_names + 11, 14}, 1 }, + { {FetchThreatListUpdatesResponse_ListUpdateResponse_ResponseType_names + 25, 25}, 0 }, +}; + +static const int FetchThreatListUpdatesResponse_ListUpdateResponse_ResponseType_entries_by_number[] = { + 2, // 0 -> RESPONSE_TYPE_UNSPECIFIED + 1, // 1 -> PARTIAL_UPDATE + 0, // 2 -> FULL_UPDATE +}; + +const std::string& FetchThreatListUpdatesResponse_ListUpdateResponse_ResponseType_Name( + FetchThreatListUpdatesResponse_ListUpdateResponse_ResponseType value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + FetchThreatListUpdatesResponse_ListUpdateResponse_ResponseType_entries, + FetchThreatListUpdatesResponse_ListUpdateResponse_ResponseType_entries_by_number, + 3, FetchThreatListUpdatesResponse_ListUpdateResponse_ResponseType_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + FetchThreatListUpdatesResponse_ListUpdateResponse_ResponseType_entries, + FetchThreatListUpdatesResponse_ListUpdateResponse_ResponseType_entries_by_number, + 3, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + FetchThreatListUpdatesResponse_ListUpdateResponse_ResponseType_strings[idx].get(); +} +bool FetchThreatListUpdatesResponse_ListUpdateResponse_ResponseType_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, FetchThreatListUpdatesResponse_ListUpdateResponse_ResponseType* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + FetchThreatListUpdatesResponse_ListUpdateResponse_ResponseType_entries, 3, name, &int_value); + if (success) { + *value = static_cast<FetchThreatListUpdatesResponse_ListUpdateResponse_ResponseType>(int_value); + } + return success; +} +#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) +constexpr FetchThreatListUpdatesResponse_ListUpdateResponse_ResponseType FetchThreatListUpdatesResponse_ListUpdateResponse::RESPONSE_TYPE_UNSPECIFIED; +constexpr FetchThreatListUpdatesResponse_ListUpdateResponse_ResponseType FetchThreatListUpdatesResponse_ListUpdateResponse::PARTIAL_UPDATE; +constexpr FetchThreatListUpdatesResponse_ListUpdateResponse_ResponseType FetchThreatListUpdatesResponse_ListUpdateResponse::FULL_UPDATE; +constexpr FetchThreatListUpdatesResponse_ListUpdateResponse_ResponseType FetchThreatListUpdatesResponse_ListUpdateResponse::ResponseType_MIN; +constexpr FetchThreatListUpdatesResponse_ListUpdateResponse_ResponseType FetchThreatListUpdatesResponse_ListUpdateResponse::ResponseType_MAX; +constexpr int FetchThreatListUpdatesResponse_ListUpdateResponse::ResponseType_ARRAYSIZE; +#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) +bool ThreatHit_ThreatSourceType_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + case 3: + case 4: + return true; + default: + return false; + } +} + +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> ThreatHit_ThreatSourceType_strings[5] = {}; + +static const char ThreatHit_ThreatSourceType_names[] = + "MATCHING_URL" + "TAB_REDIRECT" + "TAB_RESOURCE" + "TAB_URL" + "THREAT_SOURCE_TYPE_UNSPECIFIED"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry ThreatHit_ThreatSourceType_entries[] = { + { {ThreatHit_ThreatSourceType_names + 0, 12}, 1 }, + { {ThreatHit_ThreatSourceType_names + 12, 12}, 3 }, + { {ThreatHit_ThreatSourceType_names + 24, 12}, 4 }, + { {ThreatHit_ThreatSourceType_names + 36, 7}, 2 }, + { {ThreatHit_ThreatSourceType_names + 43, 30}, 0 }, +}; + +static const int ThreatHit_ThreatSourceType_entries_by_number[] = { + 4, // 0 -> THREAT_SOURCE_TYPE_UNSPECIFIED + 0, // 1 -> MATCHING_URL + 3, // 2 -> TAB_URL + 1, // 3 -> TAB_REDIRECT + 2, // 4 -> TAB_RESOURCE +}; + +const std::string& ThreatHit_ThreatSourceType_Name( + ThreatHit_ThreatSourceType value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + ThreatHit_ThreatSourceType_entries, + ThreatHit_ThreatSourceType_entries_by_number, + 5, ThreatHit_ThreatSourceType_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + ThreatHit_ThreatSourceType_entries, + ThreatHit_ThreatSourceType_entries_by_number, + 5, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + ThreatHit_ThreatSourceType_strings[idx].get(); +} +bool ThreatHit_ThreatSourceType_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, ThreatHit_ThreatSourceType* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + ThreatHit_ThreatSourceType_entries, 5, name, &int_value); + if (success) { + *value = static_cast<ThreatHit_ThreatSourceType>(int_value); + } + return success; +} +#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) +constexpr ThreatHit_ThreatSourceType ThreatHit::THREAT_SOURCE_TYPE_UNSPECIFIED; +constexpr ThreatHit_ThreatSourceType ThreatHit::MATCHING_URL; +constexpr ThreatHit_ThreatSourceType ThreatHit::TAB_URL; +constexpr ThreatHit_ThreatSourceType ThreatHit::TAB_REDIRECT; +constexpr ThreatHit_ThreatSourceType ThreatHit::TAB_RESOURCE; +constexpr ThreatHit_ThreatSourceType ThreatHit::ThreatSourceType_MIN; +constexpr ThreatHit_ThreatSourceType ThreatHit::ThreatSourceType_MAX; +constexpr int ThreatHit::ThreatSourceType_ARRAYSIZE; +#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) +bool ChromeClientInfo_SafeBrowsingReportingPopulation_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + case 3: + return true; + default: + return false; + } +} + +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> ChromeClientInfo_SafeBrowsingReportingPopulation_strings[4] = {}; + +static const char ChromeClientInfo_SafeBrowsingReportingPopulation_names[] = + "EXTENDED" + "OPT_OUT" + "SCOUT" + "UNSPECIFIED"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry ChromeClientInfo_SafeBrowsingReportingPopulation_entries[] = { + { {ChromeClientInfo_SafeBrowsingReportingPopulation_names + 0, 8}, 2 }, + { {ChromeClientInfo_SafeBrowsingReportingPopulation_names + 8, 7}, 1 }, + { {ChromeClientInfo_SafeBrowsingReportingPopulation_names + 15, 5}, 3 }, + { {ChromeClientInfo_SafeBrowsingReportingPopulation_names + 20, 11}, 0 }, +}; + +static const int ChromeClientInfo_SafeBrowsingReportingPopulation_entries_by_number[] = { + 3, // 0 -> UNSPECIFIED + 1, // 1 -> OPT_OUT + 0, // 2 -> EXTENDED + 2, // 3 -> SCOUT +}; + +const std::string& ChromeClientInfo_SafeBrowsingReportingPopulation_Name( + ChromeClientInfo_SafeBrowsingReportingPopulation value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + ChromeClientInfo_SafeBrowsingReportingPopulation_entries, + ChromeClientInfo_SafeBrowsingReportingPopulation_entries_by_number, + 4, ChromeClientInfo_SafeBrowsingReportingPopulation_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + ChromeClientInfo_SafeBrowsingReportingPopulation_entries, + ChromeClientInfo_SafeBrowsingReportingPopulation_entries_by_number, + 4, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + ChromeClientInfo_SafeBrowsingReportingPopulation_strings[idx].get(); +} +bool ChromeClientInfo_SafeBrowsingReportingPopulation_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, ChromeClientInfo_SafeBrowsingReportingPopulation* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + ChromeClientInfo_SafeBrowsingReportingPopulation_entries, 4, name, &int_value); + if (success) { + *value = static_cast<ChromeClientInfo_SafeBrowsingReportingPopulation>(int_value); + } + return success; +} +#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) +constexpr ChromeClientInfo_SafeBrowsingReportingPopulation ChromeClientInfo::UNSPECIFIED; +constexpr ChromeClientInfo_SafeBrowsingReportingPopulation ChromeClientInfo::OPT_OUT; +constexpr ChromeClientInfo_SafeBrowsingReportingPopulation ChromeClientInfo::EXTENDED; +constexpr ChromeClientInfo_SafeBrowsingReportingPopulation ChromeClientInfo::SCOUT; +constexpr ChromeClientInfo_SafeBrowsingReportingPopulation ChromeClientInfo::SafeBrowsingReportingPopulation_MIN; +constexpr ChromeClientInfo_SafeBrowsingReportingPopulation ChromeClientInfo::SafeBrowsingReportingPopulation_MAX; +constexpr int ChromeClientInfo::SafeBrowsingReportingPopulation_ARRAYSIZE; +#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) +bool ThreatType_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 13: + return true; + default: + return false; + } +} + +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> ThreatType_strings[12] = {}; + +static const char ThreatType_names[] = + "API_ABUSE" + "CLIENT_INCIDENT" + "CSD_DOWNLOAD_WHITELIST" + "CSD_WHITELIST" + "MALICIOUS_BINARY" + "MALWARE_THREAT" + "POTENTIALLY_HARMFUL_APPLICATION" + "SOCIAL_ENGINEERING" + "SOCIAL_ENGINEERING_PUBLIC" + "SUBRESOURCE_FILTER" + "THREAT_TYPE_UNSPECIFIED" + "UNWANTED_SOFTWARE"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry ThreatType_entries[] = { + { {ThreatType_names + 0, 9}, 6 }, + { {ThreatType_names + 9, 15}, 10 }, + { {ThreatType_names + 24, 22}, 9 }, + { {ThreatType_names + 46, 13}, 8 }, + { {ThreatType_names + 59, 16}, 7 }, + { {ThreatType_names + 75, 14}, 1 }, + { {ThreatType_names + 89, 31}, 4 }, + { {ThreatType_names + 120, 18}, 5 }, + { {ThreatType_names + 138, 25}, 2 }, + { {ThreatType_names + 163, 18}, 13 }, + { {ThreatType_names + 181, 23}, 0 }, + { {ThreatType_names + 204, 17}, 3 }, +}; + +static const int ThreatType_entries_by_number[] = { + 10, // 0 -> THREAT_TYPE_UNSPECIFIED + 5, // 1 -> MALWARE_THREAT + 8, // 2 -> SOCIAL_ENGINEERING_PUBLIC + 11, // 3 -> UNWANTED_SOFTWARE + 6, // 4 -> POTENTIALLY_HARMFUL_APPLICATION + 7, // 5 -> SOCIAL_ENGINEERING + 0, // 6 -> API_ABUSE + 4, // 7 -> MALICIOUS_BINARY + 3, // 8 -> CSD_WHITELIST + 2, // 9 -> CSD_DOWNLOAD_WHITELIST + 1, // 10 -> CLIENT_INCIDENT + 9, // 13 -> SUBRESOURCE_FILTER +}; + +const std::string& ThreatType_Name( + ThreatType value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + ThreatType_entries, + ThreatType_entries_by_number, + 12, ThreatType_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + ThreatType_entries, + ThreatType_entries_by_number, + 12, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + ThreatType_strings[idx].get(); +} +bool ThreatType_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, ThreatType* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + ThreatType_entries, 12, name, &int_value); + if (success) { + *value = static_cast<ThreatType>(int_value); + } + return success; +} +bool PlatformType_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + return true; + default: + return false; + } +} + +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> PlatformType_strings[9] = {}; + +static const char PlatformType_names[] = + "ALL_PLATFORMS" + "ANDROID_PLATFORM" + "ANY_PLATFORM" + "CHROME_PLATFORM" + "IOS_PLATFORM" + "LINUX_PLATFORM" + "OSX_PLATFORM" + "PLATFORM_TYPE_UNSPECIFIED" + "WINDOWS_PLATFORM"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry PlatformType_entries[] = { + { {PlatformType_names + 0, 13}, 7 }, + { {PlatformType_names + 13, 16}, 3 }, + { {PlatformType_names + 29, 12}, 6 }, + { {PlatformType_names + 41, 15}, 8 }, + { {PlatformType_names + 56, 12}, 5 }, + { {PlatformType_names + 68, 14}, 2 }, + { {PlatformType_names + 82, 12}, 4 }, + { {PlatformType_names + 94, 25}, 0 }, + { {PlatformType_names + 119, 16}, 1 }, +}; + +static const int PlatformType_entries_by_number[] = { + 7, // 0 -> PLATFORM_TYPE_UNSPECIFIED + 8, // 1 -> WINDOWS_PLATFORM + 5, // 2 -> LINUX_PLATFORM + 1, // 3 -> ANDROID_PLATFORM + 6, // 4 -> OSX_PLATFORM + 4, // 5 -> IOS_PLATFORM + 2, // 6 -> ANY_PLATFORM + 0, // 7 -> ALL_PLATFORMS + 3, // 8 -> CHROME_PLATFORM +}; + +const std::string& PlatformType_Name( + PlatformType value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + PlatformType_entries, + PlatformType_entries_by_number, + 9, PlatformType_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + PlatformType_entries, + PlatformType_entries_by_number, + 9, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + PlatformType_strings[idx].get(); +} +bool PlatformType_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, PlatformType* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + PlatformType_entries, 9, name, &int_value); + if (success) { + *value = static_cast<PlatformType>(int_value); + } + return success; +} +bool CompressionType_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + return true; + default: + return false; + } +} + +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> CompressionType_strings[3] = {}; + +static const char CompressionType_names[] = + "COMPRESSION_TYPE_UNSPECIFIED" + "RAW" + "RICE"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry CompressionType_entries[] = { + { {CompressionType_names + 0, 28}, 0 }, + { {CompressionType_names + 28, 3}, 1 }, + { {CompressionType_names + 31, 4}, 2 }, +}; + +static const int CompressionType_entries_by_number[] = { + 0, // 0 -> COMPRESSION_TYPE_UNSPECIFIED + 1, // 1 -> RAW + 2, // 2 -> RICE +}; + +const std::string& CompressionType_Name( + CompressionType value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + CompressionType_entries, + CompressionType_entries_by_number, + 3, CompressionType_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + CompressionType_entries, + CompressionType_entries_by_number, + 3, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + CompressionType_strings[idx].get(); +} +bool CompressionType_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, CompressionType* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + CompressionType_entries, 3, name, &int_value); + if (success) { + *value = static_cast<CompressionType>(int_value); + } + return success; +} +bool ThreatEntryType_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + return true; + default: + return false; + } +} + +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> ThreatEntryType_strings[7] = {}; + +static const char ThreatEntryType_names[] = + "CERT" + "CHROME_EXTENSION" + "EXECUTABLE" + "FILENAME" + "IP_RANGE" + "THREAT_ENTRY_TYPE_UNSPECIFIED" + "URL"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry ThreatEntryType_entries[] = { + { {ThreatEntryType_names + 0, 4}, 6 }, + { {ThreatEntryType_names + 4, 16}, 4 }, + { {ThreatEntryType_names + 20, 10}, 2 }, + { {ThreatEntryType_names + 30, 8}, 5 }, + { {ThreatEntryType_names + 38, 8}, 3 }, + { {ThreatEntryType_names + 46, 29}, 0 }, + { {ThreatEntryType_names + 75, 3}, 1 }, +}; + +static const int ThreatEntryType_entries_by_number[] = { + 5, // 0 -> THREAT_ENTRY_TYPE_UNSPECIFIED + 6, // 1 -> URL + 2, // 2 -> EXECUTABLE + 4, // 3 -> IP_RANGE + 1, // 4 -> CHROME_EXTENSION + 3, // 5 -> FILENAME + 0, // 6 -> CERT +}; + +const std::string& ThreatEntryType_Name( + ThreatEntryType value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + ThreatEntryType_entries, + ThreatEntryType_entries_by_number, + 7, ThreatEntryType_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + ThreatEntryType_entries, + ThreatEntryType_entries_by_number, + 7, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + ThreatEntryType_strings[idx].get(); +} +bool ThreatEntryType_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, ThreatEntryType* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + ThreatEntryType_entries, 7, name, &int_value); + if (success) { + *value = static_cast<ThreatEntryType>(int_value); + } + return success; +} + +// =================================================================== + +class ThreatInfo::_Internal { + public: +}; + +ThreatInfo::ThreatInfo(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:mozilla.safebrowsing.ThreatInfo) +} +ThreatInfo::ThreatInfo(const ThreatInfo& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite() { + ThreatInfo* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.threat_types_){from._impl_.threat_types_} + , decltype(_impl_.platform_types_){from._impl_.platform_types_} + , decltype(_impl_.threat_entries_){from._impl_.threat_entries_} + , decltype(_impl_.threat_entry_types_){from._impl_.threat_entry_types_} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); + // @@protoc_insertion_point(copy_constructor:mozilla.safebrowsing.ThreatInfo) +} + +inline void ThreatInfo::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.threat_types_){arena} + , decltype(_impl_.platform_types_){arena} + , decltype(_impl_.threat_entries_){arena} + , decltype(_impl_.threat_entry_types_){arena} + , /*decltype(_impl_._cached_size_)*/{} + }; +} + +ThreatInfo::~ThreatInfo() { + // @@protoc_insertion_point(destructor:mozilla.safebrowsing.ThreatInfo) + if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void ThreatInfo::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.threat_types_.~RepeatedField(); + _impl_.platform_types_.~RepeatedField(); + _impl_.threat_entries_.~RepeatedPtrField(); + _impl_.threat_entry_types_.~RepeatedField(); +} + +void ThreatInfo::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void ThreatInfo::Clear() { +// @@protoc_insertion_point(message_clear_start:mozilla.safebrowsing.ThreatInfo) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.threat_types_.Clear(); + _impl_.platform_types_.Clear(); + _impl_.threat_entries_.Clear(); + _impl_.threat_entry_types_.Clear(); + _internal_metadata_.Clear<std::string>(); +} + +const char* ThreatInfo::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // repeated .mozilla.safebrowsing.ThreatType threat_types = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) { + ptr -= 1; + do { + ptr += 1; + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::mozilla::safebrowsing::ThreatType_IsValid(val))) { + _internal_add_threat_types(static_cast<::mozilla::safebrowsing::ThreatType>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields()); + } + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<8>(ptr)); + } else if (static_cast<uint8_t>(tag) == 10) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedEnumParser<std::string>(_internal_mutable_threat_types(), ptr, ctx, ::mozilla::safebrowsing::ThreatType_IsValid, &_internal_metadata_, 1); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // repeated .mozilla.safebrowsing.PlatformType platform_types = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) { + ptr -= 1; + do { + ptr += 1; + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::mozilla::safebrowsing::PlatformType_IsValid(val))) { + _internal_add_platform_types(static_cast<::mozilla::safebrowsing::PlatformType>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(2, val, mutable_unknown_fields()); + } + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<16>(ptr)); + } else if (static_cast<uint8_t>(tag) == 18) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedEnumParser<std::string>(_internal_mutable_platform_types(), ptr, ctx, ::mozilla::safebrowsing::PlatformType_IsValid, &_internal_metadata_, 2); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // repeated .mozilla.safebrowsing.ThreatEntry threat_entries = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_threat_entries(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr)); + } else + goto handle_unusual; + continue; + // repeated .mozilla.safebrowsing.ThreatEntryType threat_entry_types = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) { + ptr -= 1; + do { + ptr += 1; + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::mozilla::safebrowsing::ThreatEntryType_IsValid(val))) { + _internal_add_threat_entry_types(static_cast<::mozilla::safebrowsing::ThreatEntryType>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(4, val, mutable_unknown_fields()); + } + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<32>(ptr)); + } else if (static_cast<uint8_t>(tag) == 34) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedEnumParser<std::string>(_internal_mutable_threat_entry_types(), ptr, ctx, ::mozilla::safebrowsing::ThreatEntryType_IsValid, &_internal_metadata_, 4); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<std::string>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* ThreatInfo::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:mozilla.safebrowsing.ThreatInfo) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // repeated .mozilla.safebrowsing.ThreatType threat_types = 1; + for (int i = 0, n = this->_internal_threat_types_size(); i < n; i++) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 1, this->_internal_threat_types(i), target); + } + + // repeated .mozilla.safebrowsing.PlatformType platform_types = 2; + for (int i = 0, n = this->_internal_platform_types_size(); i < n; i++) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 2, this->_internal_platform_types(i), target); + } + + // repeated .mozilla.safebrowsing.ThreatEntry threat_entries = 3; + for (unsigned i = 0, + n = static_cast<unsigned>(this->_internal_threat_entries_size()); i < n; i++) { + const auto& repfield = this->_internal_threat_entries(i); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(3, repfield, repfield.GetCachedSize(), target, stream); + } + + // repeated .mozilla.safebrowsing.ThreatEntryType threat_entry_types = 4; + for (int i = 0, n = this->_internal_threat_entry_types_size(); i < n; i++) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 4, this->_internal_threat_entry_types(i), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:mozilla.safebrowsing.ThreatInfo) + return target; +} + +size_t ThreatInfo::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:mozilla.safebrowsing.ThreatInfo) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated .mozilla.safebrowsing.ThreatType threat_types = 1; + { + size_t data_size = 0; + unsigned int count = static_cast<unsigned int>(this->_internal_threat_types_size());for (unsigned int i = 0; i < count; i++) { + data_size += ::_pbi::WireFormatLite::EnumSize( + this->_internal_threat_types(static_cast<int>(i))); + } + total_size += (1UL * count) + data_size; + } + + // repeated .mozilla.safebrowsing.PlatformType platform_types = 2; + { + size_t data_size = 0; + unsigned int count = static_cast<unsigned int>(this->_internal_platform_types_size());for (unsigned int i = 0; i < count; i++) { + data_size += ::_pbi::WireFormatLite::EnumSize( + this->_internal_platform_types(static_cast<int>(i))); + } + total_size += (1UL * count) + data_size; + } + + // repeated .mozilla.safebrowsing.ThreatEntry threat_entries = 3; + total_size += 1UL * this->_internal_threat_entries_size(); + for (const auto& msg : this->_impl_.threat_entries_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + // repeated .mozilla.safebrowsing.ThreatEntryType threat_entry_types = 4; + { + size_t data_size = 0; + unsigned int count = static_cast<unsigned int>(this->_internal_threat_entry_types_size());for (unsigned int i = 0; i < count; i++) { + data_size += ::_pbi::WireFormatLite::EnumSize( + this->_internal_threat_entry_types(static_cast<int>(i))); + } + total_size += (1UL * count) + data_size; + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::_pbi::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void ThreatInfo::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::_pbi::DownCast<const ThreatInfo*>( + &from)); +} + +void ThreatInfo::MergeFrom(const ThreatInfo& from) { + ThreatInfo* const _this = this; + // @@protoc_insertion_point(class_specific_merge_from_start:mozilla.safebrowsing.ThreatInfo) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _this->_impl_.threat_types_.MergeFrom(from._impl_.threat_types_); + _this->_impl_.platform_types_.MergeFrom(from._impl_.platform_types_); + _this->_impl_.threat_entries_.MergeFrom(from._impl_.threat_entries_); + _this->_impl_.threat_entry_types_.MergeFrom(from._impl_.threat_entry_types_); + _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); +} + +void ThreatInfo::CopyFrom(const ThreatInfo& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:mozilla.safebrowsing.ThreatInfo) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ThreatInfo::IsInitialized() const { + return true; +} + +void ThreatInfo::InternalSwap(ThreatInfo* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + _impl_.threat_types_.InternalSwap(&other->_impl_.threat_types_); + _impl_.platform_types_.InternalSwap(&other->_impl_.platform_types_); + _impl_.threat_entries_.InternalSwap(&other->_impl_.threat_entries_); + _impl_.threat_entry_types_.InternalSwap(&other->_impl_.threat_entry_types_); +} + +std::string ThreatInfo::GetTypeName() const { + return "mozilla.safebrowsing.ThreatInfo"; +} + + +// =================================================================== + +class ThreatMatch::_Internal { + public: + using HasBits = decltype(std::declval<ThreatMatch>()._impl_._has_bits_); + static void set_has_threat_type(HasBits* has_bits) { + (*has_bits)[0] |= 8u; + } + static void set_has_platform_type(HasBits* has_bits) { + (*has_bits)[0] |= 16u; + } + static void set_has_threat_entry_type(HasBits* has_bits) { + (*has_bits)[0] |= 32u; + } + static const ::mozilla::safebrowsing::ThreatEntry& threat(const ThreatMatch* msg); + static void set_has_threat(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static const ::mozilla::safebrowsing::ThreatEntryMetadata& threat_entry_metadata(const ThreatMatch* msg); + static void set_has_threat_entry_metadata(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static const ::mozilla::safebrowsing::Duration& cache_duration(const ThreatMatch* msg); + static void set_has_cache_duration(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } +}; + +const ::mozilla::safebrowsing::ThreatEntry& +ThreatMatch::_Internal::threat(const ThreatMatch* msg) { + return *msg->_impl_.threat_; +} +const ::mozilla::safebrowsing::ThreatEntryMetadata& +ThreatMatch::_Internal::threat_entry_metadata(const ThreatMatch* msg) { + return *msg->_impl_.threat_entry_metadata_; +} +const ::mozilla::safebrowsing::Duration& +ThreatMatch::_Internal::cache_duration(const ThreatMatch* msg) { + return *msg->_impl_.cache_duration_; +} +ThreatMatch::ThreatMatch(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:mozilla.safebrowsing.ThreatMatch) +} +ThreatMatch::ThreatMatch(const ThreatMatch& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite() { + ThreatMatch* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_._has_bits_){from._impl_._has_bits_} + , /*decltype(_impl_._cached_size_)*/{} + , decltype(_impl_.threat_){nullptr} + , decltype(_impl_.threat_entry_metadata_){nullptr} + , decltype(_impl_.cache_duration_){nullptr} + , decltype(_impl_.threat_type_){} + , decltype(_impl_.platform_type_){} + , decltype(_impl_.threat_entry_type_){}}; + + _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); + if (from._internal_has_threat()) { + _this->_impl_.threat_ = new ::mozilla::safebrowsing::ThreatEntry(*from._impl_.threat_); + } + if (from._internal_has_threat_entry_metadata()) { + _this->_impl_.threat_entry_metadata_ = new ::mozilla::safebrowsing::ThreatEntryMetadata(*from._impl_.threat_entry_metadata_); + } + if (from._internal_has_cache_duration()) { + _this->_impl_.cache_duration_ = new ::mozilla::safebrowsing::Duration(*from._impl_.cache_duration_); + } + ::memcpy(&_impl_.threat_type_, &from._impl_.threat_type_, + static_cast<size_t>(reinterpret_cast<char*>(&_impl_.threat_entry_type_) - + reinterpret_cast<char*>(&_impl_.threat_type_)) + sizeof(_impl_.threat_entry_type_)); + // @@protoc_insertion_point(copy_constructor:mozilla.safebrowsing.ThreatMatch) +} + +inline void ThreatMatch::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_._has_bits_){} + , /*decltype(_impl_._cached_size_)*/{} + , decltype(_impl_.threat_){nullptr} + , decltype(_impl_.threat_entry_metadata_){nullptr} + , decltype(_impl_.cache_duration_){nullptr} + , decltype(_impl_.threat_type_){0} + , decltype(_impl_.platform_type_){0} + , decltype(_impl_.threat_entry_type_){0} + }; +} + +ThreatMatch::~ThreatMatch() { + // @@protoc_insertion_point(destructor:mozilla.safebrowsing.ThreatMatch) + if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void ThreatMatch::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + if (this != internal_default_instance()) delete _impl_.threat_; + if (this != internal_default_instance()) delete _impl_.threat_entry_metadata_; + if (this != internal_default_instance()) delete _impl_.cache_duration_; +} + +void ThreatMatch::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void ThreatMatch::Clear() { +// @@protoc_insertion_point(message_clear_start:mozilla.safebrowsing.ThreatMatch) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + if (cached_has_bits & 0x00000001u) { + GOOGLE_DCHECK(_impl_.threat_ != nullptr); + _impl_.threat_->Clear(); + } + if (cached_has_bits & 0x00000002u) { + GOOGLE_DCHECK(_impl_.threat_entry_metadata_ != nullptr); + _impl_.threat_entry_metadata_->Clear(); + } + if (cached_has_bits & 0x00000004u) { + GOOGLE_DCHECK(_impl_.cache_duration_ != nullptr); + _impl_.cache_duration_->Clear(); + } + } + if (cached_has_bits & 0x00000038u) { + ::memset(&_impl_.threat_type_, 0, static_cast<size_t>( + reinterpret_cast<char*>(&_impl_.threat_entry_type_) - + reinterpret_cast<char*>(&_impl_.threat_type_)) + sizeof(_impl_.threat_entry_type_)); + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<std::string>(); +} + +const char* ThreatMatch::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional .mozilla.safebrowsing.ThreatType threat_type = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::mozilla::safebrowsing::ThreatType_IsValid(val))) { + _internal_set_threat_type(static_cast<::mozilla::safebrowsing::ThreatType>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // optional .mozilla.safebrowsing.PlatformType platform_type = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::mozilla::safebrowsing::PlatformType_IsValid(val))) { + _internal_set_platform_type(static_cast<::mozilla::safebrowsing::PlatformType>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(2, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // optional .mozilla.safebrowsing.ThreatEntry threat = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) { + ptr = ctx->ParseMessage(_internal_mutable_threat(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .mozilla.safebrowsing.ThreatEntryMetadata threat_entry_metadata = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) { + ptr = ctx->ParseMessage(_internal_mutable_threat_entry_metadata(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .mozilla.safebrowsing.Duration cache_duration = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 42)) { + ptr = ctx->ParseMessage(_internal_mutable_cache_duration(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .mozilla.safebrowsing.ThreatEntryType threat_entry_type = 6; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 48)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::mozilla::safebrowsing::ThreatEntryType_IsValid(val))) { + _internal_set_threat_entry_type(static_cast<::mozilla::safebrowsing::ThreatEntryType>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(6, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<std::string>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _impl_._has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* ThreatMatch::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:mozilla.safebrowsing.ThreatMatch) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + // optional .mozilla.safebrowsing.ThreatType threat_type = 1; + if (cached_has_bits & 0x00000008u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 1, this->_internal_threat_type(), target); + } + + // optional .mozilla.safebrowsing.PlatformType platform_type = 2; + if (cached_has_bits & 0x00000010u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 2, this->_internal_platform_type(), target); + } + + // optional .mozilla.safebrowsing.ThreatEntry threat = 3; + if (cached_has_bits & 0x00000001u) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(3, _Internal::threat(this), + _Internal::threat(this).GetCachedSize(), target, stream); + } + + // optional .mozilla.safebrowsing.ThreatEntryMetadata threat_entry_metadata = 4; + if (cached_has_bits & 0x00000002u) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(4, _Internal::threat_entry_metadata(this), + _Internal::threat_entry_metadata(this).GetCachedSize(), target, stream); + } + + // optional .mozilla.safebrowsing.Duration cache_duration = 5; + if (cached_has_bits & 0x00000004u) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(5, _Internal::cache_duration(this), + _Internal::cache_duration(this).GetCachedSize(), target, stream); + } + + // optional .mozilla.safebrowsing.ThreatEntryType threat_entry_type = 6; + if (cached_has_bits & 0x00000020u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 6, this->_internal_threat_entry_type(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:mozilla.safebrowsing.ThreatMatch) + return target; +} + +size_t ThreatMatch::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:mozilla.safebrowsing.ThreatMatch) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x0000003fu) { + // optional .mozilla.safebrowsing.ThreatEntry threat = 3; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.threat_); + } + + // optional .mozilla.safebrowsing.ThreatEntryMetadata threat_entry_metadata = 4; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.threat_entry_metadata_); + } + + // optional .mozilla.safebrowsing.Duration cache_duration = 5; + if (cached_has_bits & 0x00000004u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.cache_duration_); + } + + // optional .mozilla.safebrowsing.ThreatType threat_type = 1; + if (cached_has_bits & 0x00000008u) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_threat_type()); + } + + // optional .mozilla.safebrowsing.PlatformType platform_type = 2; + if (cached_has_bits & 0x00000010u) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_platform_type()); + } + + // optional .mozilla.safebrowsing.ThreatEntryType threat_entry_type = 6; + if (cached_has_bits & 0x00000020u) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_threat_entry_type()); + } + + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::_pbi::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void ThreatMatch::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::_pbi::DownCast<const ThreatMatch*>( + &from)); +} + +void ThreatMatch::MergeFrom(const ThreatMatch& from) { + ThreatMatch* const _this = this; + // @@protoc_insertion_point(class_specific_merge_from_start:mozilla.safebrowsing.ThreatMatch) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (cached_has_bits & 0x0000003fu) { + if (cached_has_bits & 0x00000001u) { + _this->_internal_mutable_threat()->::mozilla::safebrowsing::ThreatEntry::MergeFrom( + from._internal_threat()); + } + if (cached_has_bits & 0x00000002u) { + _this->_internal_mutable_threat_entry_metadata()->::mozilla::safebrowsing::ThreatEntryMetadata::MergeFrom( + from._internal_threat_entry_metadata()); + } + if (cached_has_bits & 0x00000004u) { + _this->_internal_mutable_cache_duration()->::mozilla::safebrowsing::Duration::MergeFrom( + from._internal_cache_duration()); + } + if (cached_has_bits & 0x00000008u) { + _this->_impl_.threat_type_ = from._impl_.threat_type_; + } + if (cached_has_bits & 0x00000010u) { + _this->_impl_.platform_type_ = from._impl_.platform_type_; + } + if (cached_has_bits & 0x00000020u) { + _this->_impl_.threat_entry_type_ = from._impl_.threat_entry_type_; + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + } + _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); +} + +void ThreatMatch::CopyFrom(const ThreatMatch& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:mozilla.safebrowsing.ThreatMatch) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ThreatMatch::IsInitialized() const { + return true; +} + +void ThreatMatch::InternalSwap(ThreatMatch* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(ThreatMatch, _impl_.threat_entry_type_) + + sizeof(ThreatMatch::_impl_.threat_entry_type_) + - PROTOBUF_FIELD_OFFSET(ThreatMatch, _impl_.threat_)>( + reinterpret_cast<char*>(&_impl_.threat_), + reinterpret_cast<char*>(&other->_impl_.threat_)); +} + +std::string ThreatMatch::GetTypeName() const { + return "mozilla.safebrowsing.ThreatMatch"; +} + + +// =================================================================== + +class FindThreatMatchesRequest::_Internal { + public: + using HasBits = decltype(std::declval<FindThreatMatchesRequest>()._impl_._has_bits_); + static const ::mozilla::safebrowsing::ClientInfo& client(const FindThreatMatchesRequest* msg); + static void set_has_client(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static const ::mozilla::safebrowsing::ThreatInfo& threat_info(const FindThreatMatchesRequest* msg); + static void set_has_threat_info(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } +}; + +const ::mozilla::safebrowsing::ClientInfo& +FindThreatMatchesRequest::_Internal::client(const FindThreatMatchesRequest* msg) { + return *msg->_impl_.client_; +} +const ::mozilla::safebrowsing::ThreatInfo& +FindThreatMatchesRequest::_Internal::threat_info(const FindThreatMatchesRequest* msg) { + return *msg->_impl_.threat_info_; +} +FindThreatMatchesRequest::FindThreatMatchesRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:mozilla.safebrowsing.FindThreatMatchesRequest) +} +FindThreatMatchesRequest::FindThreatMatchesRequest(const FindThreatMatchesRequest& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite() { + FindThreatMatchesRequest* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_._has_bits_){from._impl_._has_bits_} + , /*decltype(_impl_._cached_size_)*/{} + , decltype(_impl_.client_){nullptr} + , decltype(_impl_.threat_info_){nullptr}}; + + _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); + if (from._internal_has_client()) { + _this->_impl_.client_ = new ::mozilla::safebrowsing::ClientInfo(*from._impl_.client_); + } + if (from._internal_has_threat_info()) { + _this->_impl_.threat_info_ = new ::mozilla::safebrowsing::ThreatInfo(*from._impl_.threat_info_); + } + // @@protoc_insertion_point(copy_constructor:mozilla.safebrowsing.FindThreatMatchesRequest) +} + +inline void FindThreatMatchesRequest::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_._has_bits_){} + , /*decltype(_impl_._cached_size_)*/{} + , decltype(_impl_.client_){nullptr} + , decltype(_impl_.threat_info_){nullptr} + }; +} + +FindThreatMatchesRequest::~FindThreatMatchesRequest() { + // @@protoc_insertion_point(destructor:mozilla.safebrowsing.FindThreatMatchesRequest) + if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void FindThreatMatchesRequest::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + if (this != internal_default_instance()) delete _impl_.client_; + if (this != internal_default_instance()) delete _impl_.threat_info_; +} + +void FindThreatMatchesRequest::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void FindThreatMatchesRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:mozilla.safebrowsing.FindThreatMatchesRequest) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + GOOGLE_DCHECK(_impl_.client_ != nullptr); + _impl_.client_->Clear(); + } + if (cached_has_bits & 0x00000002u) { + GOOGLE_DCHECK(_impl_.threat_info_ != nullptr); + _impl_.threat_info_->Clear(); + } + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<std::string>(); +} + +const char* FindThreatMatchesRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional .mozilla.safebrowsing.ClientInfo client = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) { + ptr = ctx->ParseMessage(_internal_mutable_client(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .mozilla.safebrowsing.ThreatInfo threat_info = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) { + ptr = ctx->ParseMessage(_internal_mutable_threat_info(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<std::string>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _impl_._has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* FindThreatMatchesRequest::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:mozilla.safebrowsing.FindThreatMatchesRequest) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + // optional .mozilla.safebrowsing.ClientInfo client = 1; + if (cached_has_bits & 0x00000001u) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(1, _Internal::client(this), + _Internal::client(this).GetCachedSize(), target, stream); + } + + // optional .mozilla.safebrowsing.ThreatInfo threat_info = 2; + if (cached_has_bits & 0x00000002u) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(2, _Internal::threat_info(this), + _Internal::threat_info(this).GetCachedSize(), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:mozilla.safebrowsing.FindThreatMatchesRequest) + return target; +} + +size_t FindThreatMatchesRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:mozilla.safebrowsing.FindThreatMatchesRequest) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + // optional .mozilla.safebrowsing.ClientInfo client = 1; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.client_); + } + + // optional .mozilla.safebrowsing.ThreatInfo threat_info = 2; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.threat_info_); + } + + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::_pbi::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void FindThreatMatchesRequest::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::_pbi::DownCast<const FindThreatMatchesRequest*>( + &from)); +} + +void FindThreatMatchesRequest::MergeFrom(const FindThreatMatchesRequest& from) { + FindThreatMatchesRequest* const _this = this; + // @@protoc_insertion_point(class_specific_merge_from_start:mozilla.safebrowsing.FindThreatMatchesRequest) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + _this->_internal_mutable_client()->::mozilla::safebrowsing::ClientInfo::MergeFrom( + from._internal_client()); + } + if (cached_has_bits & 0x00000002u) { + _this->_internal_mutable_threat_info()->::mozilla::safebrowsing::ThreatInfo::MergeFrom( + from._internal_threat_info()); + } + } + _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); +} + +void FindThreatMatchesRequest::CopyFrom(const FindThreatMatchesRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:mozilla.safebrowsing.FindThreatMatchesRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool FindThreatMatchesRequest::IsInitialized() const { + return true; +} + +void FindThreatMatchesRequest::InternalSwap(FindThreatMatchesRequest* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(FindThreatMatchesRequest, _impl_.threat_info_) + + sizeof(FindThreatMatchesRequest::_impl_.threat_info_) + - PROTOBUF_FIELD_OFFSET(FindThreatMatchesRequest, _impl_.client_)>( + reinterpret_cast<char*>(&_impl_.client_), + reinterpret_cast<char*>(&other->_impl_.client_)); +} + +std::string FindThreatMatchesRequest::GetTypeName() const { + return "mozilla.safebrowsing.FindThreatMatchesRequest"; +} + + +// =================================================================== + +class FindThreatMatchesResponse::_Internal { + public: +}; + +FindThreatMatchesResponse::FindThreatMatchesResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:mozilla.safebrowsing.FindThreatMatchesResponse) +} +FindThreatMatchesResponse::FindThreatMatchesResponse(const FindThreatMatchesResponse& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite() { + FindThreatMatchesResponse* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.matches_){from._impl_.matches_} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); + // @@protoc_insertion_point(copy_constructor:mozilla.safebrowsing.FindThreatMatchesResponse) +} + +inline void FindThreatMatchesResponse::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.matches_){arena} + , /*decltype(_impl_._cached_size_)*/{} + }; +} + +FindThreatMatchesResponse::~FindThreatMatchesResponse() { + // @@protoc_insertion_point(destructor:mozilla.safebrowsing.FindThreatMatchesResponse) + if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void FindThreatMatchesResponse::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.matches_.~RepeatedPtrField(); +} + +void FindThreatMatchesResponse::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void FindThreatMatchesResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:mozilla.safebrowsing.FindThreatMatchesResponse) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.matches_.Clear(); + _internal_metadata_.Clear<std::string>(); +} + +const char* FindThreatMatchesResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // repeated .mozilla.safebrowsing.ThreatMatch matches = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_matches(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr)); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<std::string>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* FindThreatMatchesResponse::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:mozilla.safebrowsing.FindThreatMatchesResponse) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // repeated .mozilla.safebrowsing.ThreatMatch matches = 1; + for (unsigned i = 0, + n = static_cast<unsigned>(this->_internal_matches_size()); i < n; i++) { + const auto& repfield = this->_internal_matches(i); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(1, repfield, repfield.GetCachedSize(), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:mozilla.safebrowsing.FindThreatMatchesResponse) + return target; +} + +size_t FindThreatMatchesResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:mozilla.safebrowsing.FindThreatMatchesResponse) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated .mozilla.safebrowsing.ThreatMatch matches = 1; + total_size += 1UL * this->_internal_matches_size(); + for (const auto& msg : this->_impl_.matches_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::_pbi::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void FindThreatMatchesResponse::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::_pbi::DownCast<const FindThreatMatchesResponse*>( + &from)); +} + +void FindThreatMatchesResponse::MergeFrom(const FindThreatMatchesResponse& from) { + FindThreatMatchesResponse* const _this = this; + // @@protoc_insertion_point(class_specific_merge_from_start:mozilla.safebrowsing.FindThreatMatchesResponse) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _this->_impl_.matches_.MergeFrom(from._impl_.matches_); + _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); +} + +void FindThreatMatchesResponse::CopyFrom(const FindThreatMatchesResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:mozilla.safebrowsing.FindThreatMatchesResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool FindThreatMatchesResponse::IsInitialized() const { + return true; +} + +void FindThreatMatchesResponse::InternalSwap(FindThreatMatchesResponse* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + _impl_.matches_.InternalSwap(&other->_impl_.matches_); +} + +std::string FindThreatMatchesResponse::GetTypeName() const { + return "mozilla.safebrowsing.FindThreatMatchesResponse"; +} + + +// =================================================================== + +class FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints::_Internal { + public: + using HasBits = decltype(std::declval<FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints>()._impl_._has_bits_); + static void set_has_max_update_entries(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static void set_has_max_database_entries(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } + static void set_has_region(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } +}; + +FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints::FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:mozilla.safebrowsing.FetchThreatListUpdatesRequest.ListUpdateRequest.Constraints) +} +FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints::FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints(const FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite() { + FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_._has_bits_){from._impl_._has_bits_} + , /*decltype(_impl_._cached_size_)*/{} + , decltype(_impl_.supported_compressions_){from._impl_.supported_compressions_} + , decltype(_impl_.region_){} + , decltype(_impl_.max_update_entries_){} + , decltype(_impl_.max_database_entries_){}}; + + _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); + _impl_.region_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.region_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_region()) { + _this->_impl_.region_.Set(from._internal_region(), + _this->GetArenaForAllocation()); + } + ::memcpy(&_impl_.max_update_entries_, &from._impl_.max_update_entries_, + static_cast<size_t>(reinterpret_cast<char*>(&_impl_.max_database_entries_) - + reinterpret_cast<char*>(&_impl_.max_update_entries_)) + sizeof(_impl_.max_database_entries_)); + // @@protoc_insertion_point(copy_constructor:mozilla.safebrowsing.FetchThreatListUpdatesRequest.ListUpdateRequest.Constraints) +} + +inline void FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_._has_bits_){} + , /*decltype(_impl_._cached_size_)*/{} + , decltype(_impl_.supported_compressions_){arena} + , decltype(_impl_.region_){} + , decltype(_impl_.max_update_entries_){0} + , decltype(_impl_.max_database_entries_){0} + }; + _impl_.region_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.region_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints::~FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints() { + // @@protoc_insertion_point(destructor:mozilla.safebrowsing.FetchThreatListUpdatesRequest.ListUpdateRequest.Constraints) + if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.supported_compressions_.~RepeatedField(); + _impl_.region_.Destroy(); +} + +void FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints::Clear() { +// @@protoc_insertion_point(message_clear_start:mozilla.safebrowsing.FetchThreatListUpdatesRequest.ListUpdateRequest.Constraints) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.supported_compressions_.Clear(); + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + _impl_.region_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000006u) { + ::memset(&_impl_.max_update_entries_, 0, static_cast<size_t>( + reinterpret_cast<char*>(&_impl_.max_database_entries_) - + reinterpret_cast<char*>(&_impl_.max_update_entries_)) + sizeof(_impl_.max_database_entries_)); + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<std::string>(); +} + +const char* FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional int32 max_update_entries = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) { + _Internal::set_has_max_update_entries(&has_bits); + _impl_.max_update_entries_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional int32 max_database_entries = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) { + _Internal::set_has_max_database_entries(&has_bits); + _impl_.max_database_entries_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional string region = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) { + auto str = _internal_mutable_region(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // repeated .mozilla.safebrowsing.CompressionType supported_compressions = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) { + ptr -= 1; + do { + ptr += 1; + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::mozilla::safebrowsing::CompressionType_IsValid(val))) { + _internal_add_supported_compressions(static_cast<::mozilla::safebrowsing::CompressionType>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(4, val, mutable_unknown_fields()); + } + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<32>(ptr)); + } else if (static_cast<uint8_t>(tag) == 34) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedEnumParser<std::string>(_internal_mutable_supported_compressions(), ptr, ctx, ::mozilla::safebrowsing::CompressionType_IsValid, &_internal_metadata_, 4); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<std::string>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _impl_._has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:mozilla.safebrowsing.FetchThreatListUpdatesRequest.ListUpdateRequest.Constraints) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + // optional int32 max_update_entries = 1; + if (cached_has_bits & 0x00000002u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt32ToArray(1, this->_internal_max_update_entries(), target); + } + + // optional int32 max_database_entries = 2; + if (cached_has_bits & 0x00000004u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_max_database_entries(), target); + } + + // optional string region = 3; + if (cached_has_bits & 0x00000001u) { + target = stream->WriteStringMaybeAliased( + 3, this->_internal_region(), target); + } + + // repeated .mozilla.safebrowsing.CompressionType supported_compressions = 4; + for (int i = 0, n = this->_internal_supported_compressions_size(); i < n; i++) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 4, this->_internal_supported_compressions(i), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:mozilla.safebrowsing.FetchThreatListUpdatesRequest.ListUpdateRequest.Constraints) + return target; +} + +size_t FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:mozilla.safebrowsing.FetchThreatListUpdatesRequest.ListUpdateRequest.Constraints) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated .mozilla.safebrowsing.CompressionType supported_compressions = 4; + { + size_t data_size = 0; + unsigned int count = static_cast<unsigned int>(this->_internal_supported_compressions_size());for (unsigned int i = 0; i < count; i++) { + data_size += ::_pbi::WireFormatLite::EnumSize( + this->_internal_supported_compressions(static_cast<int>(i))); + } + total_size += (1UL * count) + data_size; + } + + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + // optional string region = 3; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_region()); + } + + // optional int32 max_update_entries = 1; + if (cached_has_bits & 0x00000002u) { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_max_update_entries()); + } + + // optional int32 max_database_entries = 2; + if (cached_has_bits & 0x00000004u) { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_max_database_entries()); + } + + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::_pbi::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::_pbi::DownCast<const FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints*>( + &from)); +} + +void FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints::MergeFrom(const FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints& from) { + FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints* const _this = this; + // @@protoc_insertion_point(class_specific_merge_from_start:mozilla.safebrowsing.FetchThreatListUpdatesRequest.ListUpdateRequest.Constraints) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _this->_impl_.supported_compressions_.MergeFrom(from._impl_.supported_compressions_); + cached_has_bits = from._impl_._has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + if (cached_has_bits & 0x00000001u) { + _this->_internal_set_region(from._internal_region()); + } + if (cached_has_bits & 0x00000002u) { + _this->_impl_.max_update_entries_ = from._impl_.max_update_entries_; + } + if (cached_has_bits & 0x00000004u) { + _this->_impl_.max_database_entries_ = from._impl_.max_database_entries_; + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + } + _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); +} + +void FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints::CopyFrom(const FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:mozilla.safebrowsing.FetchThreatListUpdatesRequest.ListUpdateRequest.Constraints) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints::IsInitialized() const { + return true; +} + +void FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints::InternalSwap(FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + _impl_.supported_compressions_.InternalSwap(&other->_impl_.supported_compressions_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.region_, lhs_arena, + &other->_impl_.region_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints, _impl_.max_database_entries_) + + sizeof(FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints::_impl_.max_database_entries_) + - PROTOBUF_FIELD_OFFSET(FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints, _impl_.max_update_entries_)>( + reinterpret_cast<char*>(&_impl_.max_update_entries_), + reinterpret_cast<char*>(&other->_impl_.max_update_entries_)); +} + +std::string FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints::GetTypeName() const { + return "mozilla.safebrowsing.FetchThreatListUpdatesRequest.ListUpdateRequest.Constraints"; +} + + +// =================================================================== + +class FetchThreatListUpdatesRequest_ListUpdateRequest::_Internal { + public: + using HasBits = decltype(std::declval<FetchThreatListUpdatesRequest_ListUpdateRequest>()._impl_._has_bits_); + static void set_has_threat_type(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } + static void set_has_platform_type(HasBits* has_bits) { + (*has_bits)[0] |= 8u; + } + static void set_has_threat_entry_type(HasBits* has_bits) { + (*has_bits)[0] |= 16u; + } + static void set_has_state(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static const ::mozilla::safebrowsing::FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints& constraints(const FetchThreatListUpdatesRequest_ListUpdateRequest* msg); + static void set_has_constraints(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } +}; + +const ::mozilla::safebrowsing::FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints& +FetchThreatListUpdatesRequest_ListUpdateRequest::_Internal::constraints(const FetchThreatListUpdatesRequest_ListUpdateRequest* msg) { + return *msg->_impl_.constraints_; +} +FetchThreatListUpdatesRequest_ListUpdateRequest::FetchThreatListUpdatesRequest_ListUpdateRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:mozilla.safebrowsing.FetchThreatListUpdatesRequest.ListUpdateRequest) +} +FetchThreatListUpdatesRequest_ListUpdateRequest::FetchThreatListUpdatesRequest_ListUpdateRequest(const FetchThreatListUpdatesRequest_ListUpdateRequest& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite() { + FetchThreatListUpdatesRequest_ListUpdateRequest* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_._has_bits_){from._impl_._has_bits_} + , /*decltype(_impl_._cached_size_)*/{} + , decltype(_impl_.state_){} + , decltype(_impl_.constraints_){nullptr} + , decltype(_impl_.threat_type_){} + , decltype(_impl_.platform_type_){} + , decltype(_impl_.threat_entry_type_){}}; + + _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); + _impl_.state_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.state_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_state()) { + _this->_impl_.state_.Set(from._internal_state(), + _this->GetArenaForAllocation()); + } + if (from._internal_has_constraints()) { + _this->_impl_.constraints_ = new ::mozilla::safebrowsing::FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints(*from._impl_.constraints_); + } + ::memcpy(&_impl_.threat_type_, &from._impl_.threat_type_, + static_cast<size_t>(reinterpret_cast<char*>(&_impl_.threat_entry_type_) - + reinterpret_cast<char*>(&_impl_.threat_type_)) + sizeof(_impl_.threat_entry_type_)); + // @@protoc_insertion_point(copy_constructor:mozilla.safebrowsing.FetchThreatListUpdatesRequest.ListUpdateRequest) +} + +inline void FetchThreatListUpdatesRequest_ListUpdateRequest::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_._has_bits_){} + , /*decltype(_impl_._cached_size_)*/{} + , decltype(_impl_.state_){} + , decltype(_impl_.constraints_){nullptr} + , decltype(_impl_.threat_type_){0} + , decltype(_impl_.platform_type_){0} + , decltype(_impl_.threat_entry_type_){0} + }; + _impl_.state_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.state_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +FetchThreatListUpdatesRequest_ListUpdateRequest::~FetchThreatListUpdatesRequest_ListUpdateRequest() { + // @@protoc_insertion_point(destructor:mozilla.safebrowsing.FetchThreatListUpdatesRequest.ListUpdateRequest) + if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void FetchThreatListUpdatesRequest_ListUpdateRequest::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.state_.Destroy(); + if (this != internal_default_instance()) delete _impl_.constraints_; +} + +void FetchThreatListUpdatesRequest_ListUpdateRequest::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void FetchThreatListUpdatesRequest_ListUpdateRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:mozilla.safebrowsing.FetchThreatListUpdatesRequest.ListUpdateRequest) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + _impl_.state_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000002u) { + GOOGLE_DCHECK(_impl_.constraints_ != nullptr); + _impl_.constraints_->Clear(); + } + } + if (cached_has_bits & 0x0000001cu) { + ::memset(&_impl_.threat_type_, 0, static_cast<size_t>( + reinterpret_cast<char*>(&_impl_.threat_entry_type_) - + reinterpret_cast<char*>(&_impl_.threat_type_)) + sizeof(_impl_.threat_entry_type_)); + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<std::string>(); +} + +const char* FetchThreatListUpdatesRequest_ListUpdateRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional .mozilla.safebrowsing.ThreatType threat_type = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::mozilla::safebrowsing::ThreatType_IsValid(val))) { + _internal_set_threat_type(static_cast<::mozilla::safebrowsing::ThreatType>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // optional .mozilla.safebrowsing.PlatformType platform_type = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::mozilla::safebrowsing::PlatformType_IsValid(val))) { + _internal_set_platform_type(static_cast<::mozilla::safebrowsing::PlatformType>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(2, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // optional bytes state = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) { + auto str = _internal_mutable_state(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .mozilla.safebrowsing.FetchThreatListUpdatesRequest.ListUpdateRequest.Constraints constraints = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) { + ptr = ctx->ParseMessage(_internal_mutable_constraints(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .mozilla.safebrowsing.ThreatEntryType threat_entry_type = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 40)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::mozilla::safebrowsing::ThreatEntryType_IsValid(val))) { + _internal_set_threat_entry_type(static_cast<::mozilla::safebrowsing::ThreatEntryType>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(5, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<std::string>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _impl_._has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* FetchThreatListUpdatesRequest_ListUpdateRequest::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:mozilla.safebrowsing.FetchThreatListUpdatesRequest.ListUpdateRequest) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + // optional .mozilla.safebrowsing.ThreatType threat_type = 1; + if (cached_has_bits & 0x00000004u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 1, this->_internal_threat_type(), target); + } + + // optional .mozilla.safebrowsing.PlatformType platform_type = 2; + if (cached_has_bits & 0x00000008u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 2, this->_internal_platform_type(), target); + } + + // optional bytes state = 3; + if (cached_has_bits & 0x00000001u) { + target = stream->WriteBytesMaybeAliased( + 3, this->_internal_state(), target); + } + + // optional .mozilla.safebrowsing.FetchThreatListUpdatesRequest.ListUpdateRequest.Constraints constraints = 4; + if (cached_has_bits & 0x00000002u) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(4, _Internal::constraints(this), + _Internal::constraints(this).GetCachedSize(), target, stream); + } + + // optional .mozilla.safebrowsing.ThreatEntryType threat_entry_type = 5; + if (cached_has_bits & 0x00000010u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 5, this->_internal_threat_entry_type(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:mozilla.safebrowsing.FetchThreatListUpdatesRequest.ListUpdateRequest) + return target; +} + +size_t FetchThreatListUpdatesRequest_ListUpdateRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:mozilla.safebrowsing.FetchThreatListUpdatesRequest.ListUpdateRequest) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x0000001fu) { + // optional bytes state = 3; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_state()); + } + + // optional .mozilla.safebrowsing.FetchThreatListUpdatesRequest.ListUpdateRequest.Constraints constraints = 4; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.constraints_); + } + + // optional .mozilla.safebrowsing.ThreatType threat_type = 1; + if (cached_has_bits & 0x00000004u) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_threat_type()); + } + + // optional .mozilla.safebrowsing.PlatformType platform_type = 2; + if (cached_has_bits & 0x00000008u) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_platform_type()); + } + + // optional .mozilla.safebrowsing.ThreatEntryType threat_entry_type = 5; + if (cached_has_bits & 0x00000010u) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_threat_entry_type()); + } + + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::_pbi::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void FetchThreatListUpdatesRequest_ListUpdateRequest::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::_pbi::DownCast<const FetchThreatListUpdatesRequest_ListUpdateRequest*>( + &from)); +} + +void FetchThreatListUpdatesRequest_ListUpdateRequest::MergeFrom(const FetchThreatListUpdatesRequest_ListUpdateRequest& from) { + FetchThreatListUpdatesRequest_ListUpdateRequest* const _this = this; + // @@protoc_insertion_point(class_specific_merge_from_start:mozilla.safebrowsing.FetchThreatListUpdatesRequest.ListUpdateRequest) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (cached_has_bits & 0x0000001fu) { + if (cached_has_bits & 0x00000001u) { + _this->_internal_set_state(from._internal_state()); + } + if (cached_has_bits & 0x00000002u) { + _this->_internal_mutable_constraints()->::mozilla::safebrowsing::FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints::MergeFrom( + from._internal_constraints()); + } + if (cached_has_bits & 0x00000004u) { + _this->_impl_.threat_type_ = from._impl_.threat_type_; + } + if (cached_has_bits & 0x00000008u) { + _this->_impl_.platform_type_ = from._impl_.platform_type_; + } + if (cached_has_bits & 0x00000010u) { + _this->_impl_.threat_entry_type_ = from._impl_.threat_entry_type_; + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + } + _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); +} + +void FetchThreatListUpdatesRequest_ListUpdateRequest::CopyFrom(const FetchThreatListUpdatesRequest_ListUpdateRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:mozilla.safebrowsing.FetchThreatListUpdatesRequest.ListUpdateRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool FetchThreatListUpdatesRequest_ListUpdateRequest::IsInitialized() const { + return true; +} + +void FetchThreatListUpdatesRequest_ListUpdateRequest::InternalSwap(FetchThreatListUpdatesRequest_ListUpdateRequest* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.state_, lhs_arena, + &other->_impl_.state_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(FetchThreatListUpdatesRequest_ListUpdateRequest, _impl_.threat_entry_type_) + + sizeof(FetchThreatListUpdatesRequest_ListUpdateRequest::_impl_.threat_entry_type_) + - PROTOBUF_FIELD_OFFSET(FetchThreatListUpdatesRequest_ListUpdateRequest, _impl_.constraints_)>( + reinterpret_cast<char*>(&_impl_.constraints_), + reinterpret_cast<char*>(&other->_impl_.constraints_)); +} + +std::string FetchThreatListUpdatesRequest_ListUpdateRequest::GetTypeName() const { + return "mozilla.safebrowsing.FetchThreatListUpdatesRequest.ListUpdateRequest"; +} + + +// =================================================================== + +class FetchThreatListUpdatesRequest::_Internal { + public: + using HasBits = decltype(std::declval<FetchThreatListUpdatesRequest>()._impl_._has_bits_); + static const ::mozilla::safebrowsing::ClientInfo& client(const FetchThreatListUpdatesRequest* msg); + static void set_has_client(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static const ::mozilla::safebrowsing::ChromeClientInfo& chrome_client_info(const FetchThreatListUpdatesRequest* msg); + static void set_has_chrome_client_info(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } +}; + +const ::mozilla::safebrowsing::ClientInfo& +FetchThreatListUpdatesRequest::_Internal::client(const FetchThreatListUpdatesRequest* msg) { + return *msg->_impl_.client_; +} +const ::mozilla::safebrowsing::ChromeClientInfo& +FetchThreatListUpdatesRequest::_Internal::chrome_client_info(const FetchThreatListUpdatesRequest* msg) { + return *msg->_impl_.chrome_client_info_; +} +FetchThreatListUpdatesRequest::FetchThreatListUpdatesRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:mozilla.safebrowsing.FetchThreatListUpdatesRequest) +} +FetchThreatListUpdatesRequest::FetchThreatListUpdatesRequest(const FetchThreatListUpdatesRequest& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite() { + FetchThreatListUpdatesRequest* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_._has_bits_){from._impl_._has_bits_} + , /*decltype(_impl_._cached_size_)*/{} + , decltype(_impl_.list_update_requests_){from._impl_.list_update_requests_} + , decltype(_impl_.client_){nullptr} + , decltype(_impl_.chrome_client_info_){nullptr}}; + + _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); + if (from._internal_has_client()) { + _this->_impl_.client_ = new ::mozilla::safebrowsing::ClientInfo(*from._impl_.client_); + } + if (from._internal_has_chrome_client_info()) { + _this->_impl_.chrome_client_info_ = new ::mozilla::safebrowsing::ChromeClientInfo(*from._impl_.chrome_client_info_); + } + // @@protoc_insertion_point(copy_constructor:mozilla.safebrowsing.FetchThreatListUpdatesRequest) +} + +inline void FetchThreatListUpdatesRequest::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_._has_bits_){} + , /*decltype(_impl_._cached_size_)*/{} + , decltype(_impl_.list_update_requests_){arena} + , decltype(_impl_.client_){nullptr} + , decltype(_impl_.chrome_client_info_){nullptr} + }; +} + +FetchThreatListUpdatesRequest::~FetchThreatListUpdatesRequest() { + // @@protoc_insertion_point(destructor:mozilla.safebrowsing.FetchThreatListUpdatesRequest) + if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void FetchThreatListUpdatesRequest::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.list_update_requests_.~RepeatedPtrField(); + if (this != internal_default_instance()) delete _impl_.client_; + if (this != internal_default_instance()) delete _impl_.chrome_client_info_; +} + +void FetchThreatListUpdatesRequest::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void FetchThreatListUpdatesRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:mozilla.safebrowsing.FetchThreatListUpdatesRequest) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.list_update_requests_.Clear(); + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + GOOGLE_DCHECK(_impl_.client_ != nullptr); + _impl_.client_->Clear(); + } + if (cached_has_bits & 0x00000002u) { + GOOGLE_DCHECK(_impl_.chrome_client_info_ != nullptr); + _impl_.chrome_client_info_->Clear(); + } + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<std::string>(); +} + +const char* FetchThreatListUpdatesRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional .mozilla.safebrowsing.ClientInfo client = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) { + ptr = ctx->ParseMessage(_internal_mutable_client(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // repeated .mozilla.safebrowsing.FetchThreatListUpdatesRequest.ListUpdateRequest list_update_requests = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_list_update_requests(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr)); + } else + goto handle_unusual; + continue; + // optional .mozilla.safebrowsing.ChromeClientInfo chrome_client_info = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) { + ptr = ctx->ParseMessage(_internal_mutable_chrome_client_info(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<std::string>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _impl_._has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* FetchThreatListUpdatesRequest::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:mozilla.safebrowsing.FetchThreatListUpdatesRequest) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + // optional .mozilla.safebrowsing.ClientInfo client = 1; + if (cached_has_bits & 0x00000001u) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(1, _Internal::client(this), + _Internal::client(this).GetCachedSize(), target, stream); + } + + // repeated .mozilla.safebrowsing.FetchThreatListUpdatesRequest.ListUpdateRequest list_update_requests = 3; + for (unsigned i = 0, + n = static_cast<unsigned>(this->_internal_list_update_requests_size()); i < n; i++) { + const auto& repfield = this->_internal_list_update_requests(i); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(3, repfield, repfield.GetCachedSize(), target, stream); + } + + // optional .mozilla.safebrowsing.ChromeClientInfo chrome_client_info = 4; + if (cached_has_bits & 0x00000002u) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(4, _Internal::chrome_client_info(this), + _Internal::chrome_client_info(this).GetCachedSize(), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:mozilla.safebrowsing.FetchThreatListUpdatesRequest) + return target; +} + +size_t FetchThreatListUpdatesRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:mozilla.safebrowsing.FetchThreatListUpdatesRequest) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated .mozilla.safebrowsing.FetchThreatListUpdatesRequest.ListUpdateRequest list_update_requests = 3; + total_size += 1UL * this->_internal_list_update_requests_size(); + for (const auto& msg : this->_impl_.list_update_requests_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + // optional .mozilla.safebrowsing.ClientInfo client = 1; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.client_); + } + + // optional .mozilla.safebrowsing.ChromeClientInfo chrome_client_info = 4; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.chrome_client_info_); + } + + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::_pbi::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void FetchThreatListUpdatesRequest::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::_pbi::DownCast<const FetchThreatListUpdatesRequest*>( + &from)); +} + +void FetchThreatListUpdatesRequest::MergeFrom(const FetchThreatListUpdatesRequest& from) { + FetchThreatListUpdatesRequest* const _this = this; + // @@protoc_insertion_point(class_specific_merge_from_start:mozilla.safebrowsing.FetchThreatListUpdatesRequest) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _this->_impl_.list_update_requests_.MergeFrom(from._impl_.list_update_requests_); + cached_has_bits = from._impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + _this->_internal_mutable_client()->::mozilla::safebrowsing::ClientInfo::MergeFrom( + from._internal_client()); + } + if (cached_has_bits & 0x00000002u) { + _this->_internal_mutable_chrome_client_info()->::mozilla::safebrowsing::ChromeClientInfo::MergeFrom( + from._internal_chrome_client_info()); + } + } + _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); +} + +void FetchThreatListUpdatesRequest::CopyFrom(const FetchThreatListUpdatesRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:mozilla.safebrowsing.FetchThreatListUpdatesRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool FetchThreatListUpdatesRequest::IsInitialized() const { + return true; +} + +void FetchThreatListUpdatesRequest::InternalSwap(FetchThreatListUpdatesRequest* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + _impl_.list_update_requests_.InternalSwap(&other->_impl_.list_update_requests_); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(FetchThreatListUpdatesRequest, _impl_.chrome_client_info_) + + sizeof(FetchThreatListUpdatesRequest::_impl_.chrome_client_info_) + - PROTOBUF_FIELD_OFFSET(FetchThreatListUpdatesRequest, _impl_.client_)>( + reinterpret_cast<char*>(&_impl_.client_), + reinterpret_cast<char*>(&other->_impl_.client_)); +} + +std::string FetchThreatListUpdatesRequest::GetTypeName() const { + return "mozilla.safebrowsing.FetchThreatListUpdatesRequest"; +} + + +// =================================================================== + +class FetchThreatListUpdatesResponse_ListUpdateResponse::_Internal { + public: + using HasBits = decltype(std::declval<FetchThreatListUpdatesResponse_ListUpdateResponse>()._impl_._has_bits_); + static void set_has_threat_type(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } + static void set_has_threat_entry_type(HasBits* has_bits) { + (*has_bits)[0] |= 8u; + } + static void set_has_platform_type(HasBits* has_bits) { + (*has_bits)[0] |= 16u; + } + static void set_has_response_type(HasBits* has_bits) { + (*has_bits)[0] |= 32u; + } + static void set_has_new_client_state(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static const ::mozilla::safebrowsing::Checksum& checksum(const FetchThreatListUpdatesResponse_ListUpdateResponse* msg); + static void set_has_checksum(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } +}; + +const ::mozilla::safebrowsing::Checksum& +FetchThreatListUpdatesResponse_ListUpdateResponse::_Internal::checksum(const FetchThreatListUpdatesResponse_ListUpdateResponse* msg) { + return *msg->_impl_.checksum_; +} +FetchThreatListUpdatesResponse_ListUpdateResponse::FetchThreatListUpdatesResponse_ListUpdateResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:mozilla.safebrowsing.FetchThreatListUpdatesResponse.ListUpdateResponse) +} +FetchThreatListUpdatesResponse_ListUpdateResponse::FetchThreatListUpdatesResponse_ListUpdateResponse(const FetchThreatListUpdatesResponse_ListUpdateResponse& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite() { + FetchThreatListUpdatesResponse_ListUpdateResponse* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_._has_bits_){from._impl_._has_bits_} + , /*decltype(_impl_._cached_size_)*/{} + , decltype(_impl_.additions_){from._impl_.additions_} + , decltype(_impl_.removals_){from._impl_.removals_} + , decltype(_impl_.new_client_state_){} + , decltype(_impl_.checksum_){nullptr} + , decltype(_impl_.threat_type_){} + , decltype(_impl_.threat_entry_type_){} + , decltype(_impl_.platform_type_){} + , decltype(_impl_.response_type_){}}; + + _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); + _impl_.new_client_state_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.new_client_state_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_new_client_state()) { + _this->_impl_.new_client_state_.Set(from._internal_new_client_state(), + _this->GetArenaForAllocation()); + } + if (from._internal_has_checksum()) { + _this->_impl_.checksum_ = new ::mozilla::safebrowsing::Checksum(*from._impl_.checksum_); + } + ::memcpy(&_impl_.threat_type_, &from._impl_.threat_type_, + static_cast<size_t>(reinterpret_cast<char*>(&_impl_.response_type_) - + reinterpret_cast<char*>(&_impl_.threat_type_)) + sizeof(_impl_.response_type_)); + // @@protoc_insertion_point(copy_constructor:mozilla.safebrowsing.FetchThreatListUpdatesResponse.ListUpdateResponse) +} + +inline void FetchThreatListUpdatesResponse_ListUpdateResponse::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_._has_bits_){} + , /*decltype(_impl_._cached_size_)*/{} + , decltype(_impl_.additions_){arena} + , decltype(_impl_.removals_){arena} + , decltype(_impl_.new_client_state_){} + , decltype(_impl_.checksum_){nullptr} + , decltype(_impl_.threat_type_){0} + , decltype(_impl_.threat_entry_type_){0} + , decltype(_impl_.platform_type_){0} + , decltype(_impl_.response_type_){0} + }; + _impl_.new_client_state_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.new_client_state_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +FetchThreatListUpdatesResponse_ListUpdateResponse::~FetchThreatListUpdatesResponse_ListUpdateResponse() { + // @@protoc_insertion_point(destructor:mozilla.safebrowsing.FetchThreatListUpdatesResponse.ListUpdateResponse) + if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void FetchThreatListUpdatesResponse_ListUpdateResponse::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.additions_.~RepeatedPtrField(); + _impl_.removals_.~RepeatedPtrField(); + _impl_.new_client_state_.Destroy(); + if (this != internal_default_instance()) delete _impl_.checksum_; +} + +void FetchThreatListUpdatesResponse_ListUpdateResponse::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void FetchThreatListUpdatesResponse_ListUpdateResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:mozilla.safebrowsing.FetchThreatListUpdatesResponse.ListUpdateResponse) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.additions_.Clear(); + _impl_.removals_.Clear(); + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + _impl_.new_client_state_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000002u) { + GOOGLE_DCHECK(_impl_.checksum_ != nullptr); + _impl_.checksum_->Clear(); + } + } + if (cached_has_bits & 0x0000003cu) { + ::memset(&_impl_.threat_type_, 0, static_cast<size_t>( + reinterpret_cast<char*>(&_impl_.response_type_) - + reinterpret_cast<char*>(&_impl_.threat_type_)) + sizeof(_impl_.response_type_)); + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<std::string>(); +} + +const char* FetchThreatListUpdatesResponse_ListUpdateResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional .mozilla.safebrowsing.ThreatType threat_type = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::mozilla::safebrowsing::ThreatType_IsValid(val))) { + _internal_set_threat_type(static_cast<::mozilla::safebrowsing::ThreatType>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // optional .mozilla.safebrowsing.ThreatEntryType threat_entry_type = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::mozilla::safebrowsing::ThreatEntryType_IsValid(val))) { + _internal_set_threat_entry_type(static_cast<::mozilla::safebrowsing::ThreatEntryType>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(2, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // optional .mozilla.safebrowsing.PlatformType platform_type = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::mozilla::safebrowsing::PlatformType_IsValid(val))) { + _internal_set_platform_type(static_cast<::mozilla::safebrowsing::PlatformType>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(3, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // optional .mozilla.safebrowsing.FetchThreatListUpdatesResponse.ListUpdateResponse.ResponseType response_type = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::mozilla::safebrowsing::FetchThreatListUpdatesResponse_ListUpdateResponse_ResponseType_IsValid(val))) { + _internal_set_response_type(static_cast<::mozilla::safebrowsing::FetchThreatListUpdatesResponse_ListUpdateResponse_ResponseType>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(4, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // repeated .mozilla.safebrowsing.ThreatEntrySet additions = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 42)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_additions(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<42>(ptr)); + } else + goto handle_unusual; + continue; + // repeated .mozilla.safebrowsing.ThreatEntrySet removals = 6; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 50)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_removals(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<50>(ptr)); + } else + goto handle_unusual; + continue; + // optional bytes new_client_state = 7; + case 7: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 58)) { + auto str = _internal_mutable_new_client_state(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .mozilla.safebrowsing.Checksum checksum = 8; + case 8: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 66)) { + ptr = ctx->ParseMessage(_internal_mutable_checksum(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<std::string>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _impl_._has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* FetchThreatListUpdatesResponse_ListUpdateResponse::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:mozilla.safebrowsing.FetchThreatListUpdatesResponse.ListUpdateResponse) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + // optional .mozilla.safebrowsing.ThreatType threat_type = 1; + if (cached_has_bits & 0x00000004u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 1, this->_internal_threat_type(), target); + } + + // optional .mozilla.safebrowsing.ThreatEntryType threat_entry_type = 2; + if (cached_has_bits & 0x00000008u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 2, this->_internal_threat_entry_type(), target); + } + + // optional .mozilla.safebrowsing.PlatformType platform_type = 3; + if (cached_has_bits & 0x00000010u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 3, this->_internal_platform_type(), target); + } + + // optional .mozilla.safebrowsing.FetchThreatListUpdatesResponse.ListUpdateResponse.ResponseType response_type = 4; + if (cached_has_bits & 0x00000020u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 4, this->_internal_response_type(), target); + } + + // repeated .mozilla.safebrowsing.ThreatEntrySet additions = 5; + for (unsigned i = 0, + n = static_cast<unsigned>(this->_internal_additions_size()); i < n; i++) { + const auto& repfield = this->_internal_additions(i); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(5, repfield, repfield.GetCachedSize(), target, stream); + } + + // repeated .mozilla.safebrowsing.ThreatEntrySet removals = 6; + for (unsigned i = 0, + n = static_cast<unsigned>(this->_internal_removals_size()); i < n; i++) { + const auto& repfield = this->_internal_removals(i); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(6, repfield, repfield.GetCachedSize(), target, stream); + } + + // optional bytes new_client_state = 7; + if (cached_has_bits & 0x00000001u) { + target = stream->WriteBytesMaybeAliased( + 7, this->_internal_new_client_state(), target); + } + + // optional .mozilla.safebrowsing.Checksum checksum = 8; + if (cached_has_bits & 0x00000002u) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(8, _Internal::checksum(this), + _Internal::checksum(this).GetCachedSize(), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:mozilla.safebrowsing.FetchThreatListUpdatesResponse.ListUpdateResponse) + return target; +} + +size_t FetchThreatListUpdatesResponse_ListUpdateResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:mozilla.safebrowsing.FetchThreatListUpdatesResponse.ListUpdateResponse) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated .mozilla.safebrowsing.ThreatEntrySet additions = 5; + total_size += 1UL * this->_internal_additions_size(); + for (const auto& msg : this->_impl_.additions_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + // repeated .mozilla.safebrowsing.ThreatEntrySet removals = 6; + total_size += 1UL * this->_internal_removals_size(); + for (const auto& msg : this->_impl_.removals_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x0000003fu) { + // optional bytes new_client_state = 7; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_new_client_state()); + } + + // optional .mozilla.safebrowsing.Checksum checksum = 8; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.checksum_); + } + + // optional .mozilla.safebrowsing.ThreatType threat_type = 1; + if (cached_has_bits & 0x00000004u) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_threat_type()); + } + + // optional .mozilla.safebrowsing.ThreatEntryType threat_entry_type = 2; + if (cached_has_bits & 0x00000008u) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_threat_entry_type()); + } + + // optional .mozilla.safebrowsing.PlatformType platform_type = 3; + if (cached_has_bits & 0x00000010u) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_platform_type()); + } + + // optional .mozilla.safebrowsing.FetchThreatListUpdatesResponse.ListUpdateResponse.ResponseType response_type = 4; + if (cached_has_bits & 0x00000020u) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_response_type()); + } + + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::_pbi::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void FetchThreatListUpdatesResponse_ListUpdateResponse::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::_pbi::DownCast<const FetchThreatListUpdatesResponse_ListUpdateResponse*>( + &from)); +} + +void FetchThreatListUpdatesResponse_ListUpdateResponse::MergeFrom(const FetchThreatListUpdatesResponse_ListUpdateResponse& from) { + FetchThreatListUpdatesResponse_ListUpdateResponse* const _this = this; + // @@protoc_insertion_point(class_specific_merge_from_start:mozilla.safebrowsing.FetchThreatListUpdatesResponse.ListUpdateResponse) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _this->_impl_.additions_.MergeFrom(from._impl_.additions_); + _this->_impl_.removals_.MergeFrom(from._impl_.removals_); + cached_has_bits = from._impl_._has_bits_[0]; + if (cached_has_bits & 0x0000003fu) { + if (cached_has_bits & 0x00000001u) { + _this->_internal_set_new_client_state(from._internal_new_client_state()); + } + if (cached_has_bits & 0x00000002u) { + _this->_internal_mutable_checksum()->::mozilla::safebrowsing::Checksum::MergeFrom( + from._internal_checksum()); + } + if (cached_has_bits & 0x00000004u) { + _this->_impl_.threat_type_ = from._impl_.threat_type_; + } + if (cached_has_bits & 0x00000008u) { + _this->_impl_.threat_entry_type_ = from._impl_.threat_entry_type_; + } + if (cached_has_bits & 0x00000010u) { + _this->_impl_.platform_type_ = from._impl_.platform_type_; + } + if (cached_has_bits & 0x00000020u) { + _this->_impl_.response_type_ = from._impl_.response_type_; + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + } + _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); +} + +void FetchThreatListUpdatesResponse_ListUpdateResponse::CopyFrom(const FetchThreatListUpdatesResponse_ListUpdateResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:mozilla.safebrowsing.FetchThreatListUpdatesResponse.ListUpdateResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool FetchThreatListUpdatesResponse_ListUpdateResponse::IsInitialized() const { + return true; +} + +void FetchThreatListUpdatesResponse_ListUpdateResponse::InternalSwap(FetchThreatListUpdatesResponse_ListUpdateResponse* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + _impl_.additions_.InternalSwap(&other->_impl_.additions_); + _impl_.removals_.InternalSwap(&other->_impl_.removals_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.new_client_state_, lhs_arena, + &other->_impl_.new_client_state_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(FetchThreatListUpdatesResponse_ListUpdateResponse, _impl_.response_type_) + + sizeof(FetchThreatListUpdatesResponse_ListUpdateResponse::_impl_.response_type_) + - PROTOBUF_FIELD_OFFSET(FetchThreatListUpdatesResponse_ListUpdateResponse, _impl_.checksum_)>( + reinterpret_cast<char*>(&_impl_.checksum_), + reinterpret_cast<char*>(&other->_impl_.checksum_)); +} + +std::string FetchThreatListUpdatesResponse_ListUpdateResponse::GetTypeName() const { + return "mozilla.safebrowsing.FetchThreatListUpdatesResponse.ListUpdateResponse"; +} + + +// =================================================================== + +class FetchThreatListUpdatesResponse::_Internal { + public: + using HasBits = decltype(std::declval<FetchThreatListUpdatesResponse>()._impl_._has_bits_); + static const ::mozilla::safebrowsing::Duration& minimum_wait_duration(const FetchThreatListUpdatesResponse* msg); + static void set_has_minimum_wait_duration(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } +}; + +const ::mozilla::safebrowsing::Duration& +FetchThreatListUpdatesResponse::_Internal::minimum_wait_duration(const FetchThreatListUpdatesResponse* msg) { + return *msg->_impl_.minimum_wait_duration_; +} +FetchThreatListUpdatesResponse::FetchThreatListUpdatesResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:mozilla.safebrowsing.FetchThreatListUpdatesResponse) +} +FetchThreatListUpdatesResponse::FetchThreatListUpdatesResponse(const FetchThreatListUpdatesResponse& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite() { + FetchThreatListUpdatesResponse* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_._has_bits_){from._impl_._has_bits_} + , /*decltype(_impl_._cached_size_)*/{} + , decltype(_impl_.list_update_responses_){from._impl_.list_update_responses_} + , decltype(_impl_.minimum_wait_duration_){nullptr}}; + + _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); + if (from._internal_has_minimum_wait_duration()) { + _this->_impl_.minimum_wait_duration_ = new ::mozilla::safebrowsing::Duration(*from._impl_.minimum_wait_duration_); + } + // @@protoc_insertion_point(copy_constructor:mozilla.safebrowsing.FetchThreatListUpdatesResponse) +} + +inline void FetchThreatListUpdatesResponse::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_._has_bits_){} + , /*decltype(_impl_._cached_size_)*/{} + , decltype(_impl_.list_update_responses_){arena} + , decltype(_impl_.minimum_wait_duration_){nullptr} + }; +} + +FetchThreatListUpdatesResponse::~FetchThreatListUpdatesResponse() { + // @@protoc_insertion_point(destructor:mozilla.safebrowsing.FetchThreatListUpdatesResponse) + if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void FetchThreatListUpdatesResponse::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.list_update_responses_.~RepeatedPtrField(); + if (this != internal_default_instance()) delete _impl_.minimum_wait_duration_; +} + +void FetchThreatListUpdatesResponse::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void FetchThreatListUpdatesResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:mozilla.safebrowsing.FetchThreatListUpdatesResponse) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.list_update_responses_.Clear(); + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + GOOGLE_DCHECK(_impl_.minimum_wait_duration_ != nullptr); + _impl_.minimum_wait_duration_->Clear(); + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<std::string>(); +} + +const char* FetchThreatListUpdatesResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // repeated .mozilla.safebrowsing.FetchThreatListUpdatesResponse.ListUpdateResponse list_update_responses = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_list_update_responses(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr)); + } else + goto handle_unusual; + continue; + // optional .mozilla.safebrowsing.Duration minimum_wait_duration = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) { + ptr = ctx->ParseMessage(_internal_mutable_minimum_wait_duration(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<std::string>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _impl_._has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* FetchThreatListUpdatesResponse::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:mozilla.safebrowsing.FetchThreatListUpdatesResponse) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // repeated .mozilla.safebrowsing.FetchThreatListUpdatesResponse.ListUpdateResponse list_update_responses = 1; + for (unsigned i = 0, + n = static_cast<unsigned>(this->_internal_list_update_responses_size()); i < n; i++) { + const auto& repfield = this->_internal_list_update_responses(i); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(1, repfield, repfield.GetCachedSize(), target, stream); + } + + cached_has_bits = _impl_._has_bits_[0]; + // optional .mozilla.safebrowsing.Duration minimum_wait_duration = 2; + if (cached_has_bits & 0x00000001u) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(2, _Internal::minimum_wait_duration(this), + _Internal::minimum_wait_duration(this).GetCachedSize(), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:mozilla.safebrowsing.FetchThreatListUpdatesResponse) + return target; +} + +size_t FetchThreatListUpdatesResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:mozilla.safebrowsing.FetchThreatListUpdatesResponse) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated .mozilla.safebrowsing.FetchThreatListUpdatesResponse.ListUpdateResponse list_update_responses = 1; + total_size += 1UL * this->_internal_list_update_responses_size(); + for (const auto& msg : this->_impl_.list_update_responses_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + // optional .mozilla.safebrowsing.Duration minimum_wait_duration = 2; + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.minimum_wait_duration_); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::_pbi::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void FetchThreatListUpdatesResponse::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::_pbi::DownCast<const FetchThreatListUpdatesResponse*>( + &from)); +} + +void FetchThreatListUpdatesResponse::MergeFrom(const FetchThreatListUpdatesResponse& from) { + FetchThreatListUpdatesResponse* const _this = this; + // @@protoc_insertion_point(class_specific_merge_from_start:mozilla.safebrowsing.FetchThreatListUpdatesResponse) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _this->_impl_.list_update_responses_.MergeFrom(from._impl_.list_update_responses_); + if (from._internal_has_minimum_wait_duration()) { + _this->_internal_mutable_minimum_wait_duration()->::mozilla::safebrowsing::Duration::MergeFrom( + from._internal_minimum_wait_duration()); + } + _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); +} + +void FetchThreatListUpdatesResponse::CopyFrom(const FetchThreatListUpdatesResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:mozilla.safebrowsing.FetchThreatListUpdatesResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool FetchThreatListUpdatesResponse::IsInitialized() const { + return true; +} + +void FetchThreatListUpdatesResponse::InternalSwap(FetchThreatListUpdatesResponse* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + _impl_.list_update_responses_.InternalSwap(&other->_impl_.list_update_responses_); + swap(_impl_.minimum_wait_duration_, other->_impl_.minimum_wait_duration_); +} + +std::string FetchThreatListUpdatesResponse::GetTypeName() const { + return "mozilla.safebrowsing.FetchThreatListUpdatesResponse"; +} + + +// =================================================================== + +class FindFullHashesRequest::_Internal { + public: + using HasBits = decltype(std::declval<FindFullHashesRequest>()._impl_._has_bits_); + static const ::mozilla::safebrowsing::ClientInfo& client(const FindFullHashesRequest* msg); + static void set_has_client(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static const ::mozilla::safebrowsing::ThreatInfo& threat_info(const FindFullHashesRequest* msg); + static void set_has_threat_info(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } +}; + +const ::mozilla::safebrowsing::ClientInfo& +FindFullHashesRequest::_Internal::client(const FindFullHashesRequest* msg) { + return *msg->_impl_.client_; +} +const ::mozilla::safebrowsing::ThreatInfo& +FindFullHashesRequest::_Internal::threat_info(const FindFullHashesRequest* msg) { + return *msg->_impl_.threat_info_; +} +FindFullHashesRequest::FindFullHashesRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:mozilla.safebrowsing.FindFullHashesRequest) +} +FindFullHashesRequest::FindFullHashesRequest(const FindFullHashesRequest& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite() { + FindFullHashesRequest* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_._has_bits_){from._impl_._has_bits_} + , /*decltype(_impl_._cached_size_)*/{} + , decltype(_impl_.client_states_){from._impl_.client_states_} + , decltype(_impl_.client_){nullptr} + , decltype(_impl_.threat_info_){nullptr}}; + + _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); + if (from._internal_has_client()) { + _this->_impl_.client_ = new ::mozilla::safebrowsing::ClientInfo(*from._impl_.client_); + } + if (from._internal_has_threat_info()) { + _this->_impl_.threat_info_ = new ::mozilla::safebrowsing::ThreatInfo(*from._impl_.threat_info_); + } + // @@protoc_insertion_point(copy_constructor:mozilla.safebrowsing.FindFullHashesRequest) +} + +inline void FindFullHashesRequest::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_._has_bits_){} + , /*decltype(_impl_._cached_size_)*/{} + , decltype(_impl_.client_states_){arena} + , decltype(_impl_.client_){nullptr} + , decltype(_impl_.threat_info_){nullptr} + }; +} + +FindFullHashesRequest::~FindFullHashesRequest() { + // @@protoc_insertion_point(destructor:mozilla.safebrowsing.FindFullHashesRequest) + if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void FindFullHashesRequest::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.client_states_.~RepeatedPtrField(); + if (this != internal_default_instance()) delete _impl_.client_; + if (this != internal_default_instance()) delete _impl_.threat_info_; +} + +void FindFullHashesRequest::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void FindFullHashesRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:mozilla.safebrowsing.FindFullHashesRequest) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.client_states_.Clear(); + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + GOOGLE_DCHECK(_impl_.client_ != nullptr); + _impl_.client_->Clear(); + } + if (cached_has_bits & 0x00000002u) { + GOOGLE_DCHECK(_impl_.threat_info_ != nullptr); + _impl_.threat_info_->Clear(); + } + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<std::string>(); +} + +const char* FindFullHashesRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional .mozilla.safebrowsing.ClientInfo client = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) { + ptr = ctx->ParseMessage(_internal_mutable_client(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // repeated bytes client_states = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) { + ptr -= 1; + do { + ptr += 1; + auto str = _internal_add_client_states(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr)); + } else + goto handle_unusual; + continue; + // optional .mozilla.safebrowsing.ThreatInfo threat_info = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) { + ptr = ctx->ParseMessage(_internal_mutable_threat_info(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<std::string>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _impl_._has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* FindFullHashesRequest::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:mozilla.safebrowsing.FindFullHashesRequest) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + // optional .mozilla.safebrowsing.ClientInfo client = 1; + if (cached_has_bits & 0x00000001u) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(1, _Internal::client(this), + _Internal::client(this).GetCachedSize(), target, stream); + } + + // repeated bytes client_states = 2; + for (int i = 0, n = this->_internal_client_states_size(); i < n; i++) { + const auto& s = this->_internal_client_states(i); + target = stream->WriteBytes(2, s, target); + } + + // optional .mozilla.safebrowsing.ThreatInfo threat_info = 3; + if (cached_has_bits & 0x00000002u) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(3, _Internal::threat_info(this), + _Internal::threat_info(this).GetCachedSize(), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:mozilla.safebrowsing.FindFullHashesRequest) + return target; +} + +size_t FindFullHashesRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:mozilla.safebrowsing.FindFullHashesRequest) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated bytes client_states = 2; + total_size += 1 * + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.client_states_.size()); + for (int i = 0, n = _impl_.client_states_.size(); i < n; i++) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + _impl_.client_states_.Get(i)); + } + + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + // optional .mozilla.safebrowsing.ClientInfo client = 1; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.client_); + } + + // optional .mozilla.safebrowsing.ThreatInfo threat_info = 3; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.threat_info_); + } + + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::_pbi::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void FindFullHashesRequest::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::_pbi::DownCast<const FindFullHashesRequest*>( + &from)); +} + +void FindFullHashesRequest::MergeFrom(const FindFullHashesRequest& from) { + FindFullHashesRequest* const _this = this; + // @@protoc_insertion_point(class_specific_merge_from_start:mozilla.safebrowsing.FindFullHashesRequest) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _this->_impl_.client_states_.MergeFrom(from._impl_.client_states_); + cached_has_bits = from._impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + _this->_internal_mutable_client()->::mozilla::safebrowsing::ClientInfo::MergeFrom( + from._internal_client()); + } + if (cached_has_bits & 0x00000002u) { + _this->_internal_mutable_threat_info()->::mozilla::safebrowsing::ThreatInfo::MergeFrom( + from._internal_threat_info()); + } + } + _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); +} + +void FindFullHashesRequest::CopyFrom(const FindFullHashesRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:mozilla.safebrowsing.FindFullHashesRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool FindFullHashesRequest::IsInitialized() const { + return true; +} + +void FindFullHashesRequest::InternalSwap(FindFullHashesRequest* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + _impl_.client_states_.InternalSwap(&other->_impl_.client_states_); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(FindFullHashesRequest, _impl_.threat_info_) + + sizeof(FindFullHashesRequest::_impl_.threat_info_) + - PROTOBUF_FIELD_OFFSET(FindFullHashesRequest, _impl_.client_)>( + reinterpret_cast<char*>(&_impl_.client_), + reinterpret_cast<char*>(&other->_impl_.client_)); +} + +std::string FindFullHashesRequest::GetTypeName() const { + return "mozilla.safebrowsing.FindFullHashesRequest"; +} + + +// =================================================================== + +class FindFullHashesResponse::_Internal { + public: + using HasBits = decltype(std::declval<FindFullHashesResponse>()._impl_._has_bits_); + static const ::mozilla::safebrowsing::Duration& minimum_wait_duration(const FindFullHashesResponse* msg); + static void set_has_minimum_wait_duration(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static const ::mozilla::safebrowsing::Duration& negative_cache_duration(const FindFullHashesResponse* msg); + static void set_has_negative_cache_duration(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } +}; + +const ::mozilla::safebrowsing::Duration& +FindFullHashesResponse::_Internal::minimum_wait_duration(const FindFullHashesResponse* msg) { + return *msg->_impl_.minimum_wait_duration_; +} +const ::mozilla::safebrowsing::Duration& +FindFullHashesResponse::_Internal::negative_cache_duration(const FindFullHashesResponse* msg) { + return *msg->_impl_.negative_cache_duration_; +} +FindFullHashesResponse::FindFullHashesResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:mozilla.safebrowsing.FindFullHashesResponse) +} +FindFullHashesResponse::FindFullHashesResponse(const FindFullHashesResponse& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite() { + FindFullHashesResponse* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_._has_bits_){from._impl_._has_bits_} + , /*decltype(_impl_._cached_size_)*/{} + , decltype(_impl_.matches_){from._impl_.matches_} + , decltype(_impl_.minimum_wait_duration_){nullptr} + , decltype(_impl_.negative_cache_duration_){nullptr}}; + + _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); + if (from._internal_has_minimum_wait_duration()) { + _this->_impl_.minimum_wait_duration_ = new ::mozilla::safebrowsing::Duration(*from._impl_.minimum_wait_duration_); + } + if (from._internal_has_negative_cache_duration()) { + _this->_impl_.negative_cache_duration_ = new ::mozilla::safebrowsing::Duration(*from._impl_.negative_cache_duration_); + } + // @@protoc_insertion_point(copy_constructor:mozilla.safebrowsing.FindFullHashesResponse) +} + +inline void FindFullHashesResponse::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_._has_bits_){} + , /*decltype(_impl_._cached_size_)*/{} + , decltype(_impl_.matches_){arena} + , decltype(_impl_.minimum_wait_duration_){nullptr} + , decltype(_impl_.negative_cache_duration_){nullptr} + }; +} + +FindFullHashesResponse::~FindFullHashesResponse() { + // @@protoc_insertion_point(destructor:mozilla.safebrowsing.FindFullHashesResponse) + if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void FindFullHashesResponse::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.matches_.~RepeatedPtrField(); + if (this != internal_default_instance()) delete _impl_.minimum_wait_duration_; + if (this != internal_default_instance()) delete _impl_.negative_cache_duration_; +} + +void FindFullHashesResponse::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void FindFullHashesResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:mozilla.safebrowsing.FindFullHashesResponse) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.matches_.Clear(); + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + GOOGLE_DCHECK(_impl_.minimum_wait_duration_ != nullptr); + _impl_.minimum_wait_duration_->Clear(); + } + if (cached_has_bits & 0x00000002u) { + GOOGLE_DCHECK(_impl_.negative_cache_duration_ != nullptr); + _impl_.negative_cache_duration_->Clear(); + } + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<std::string>(); +} + +const char* FindFullHashesResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // repeated .mozilla.safebrowsing.ThreatMatch matches = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_matches(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr)); + } else + goto handle_unusual; + continue; + // optional .mozilla.safebrowsing.Duration minimum_wait_duration = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) { + ptr = ctx->ParseMessage(_internal_mutable_minimum_wait_duration(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .mozilla.safebrowsing.Duration negative_cache_duration = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) { + ptr = ctx->ParseMessage(_internal_mutable_negative_cache_duration(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<std::string>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _impl_._has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* FindFullHashesResponse::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:mozilla.safebrowsing.FindFullHashesResponse) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // repeated .mozilla.safebrowsing.ThreatMatch matches = 1; + for (unsigned i = 0, + n = static_cast<unsigned>(this->_internal_matches_size()); i < n; i++) { + const auto& repfield = this->_internal_matches(i); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(1, repfield, repfield.GetCachedSize(), target, stream); + } + + cached_has_bits = _impl_._has_bits_[0]; + // optional .mozilla.safebrowsing.Duration minimum_wait_duration = 2; + if (cached_has_bits & 0x00000001u) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(2, _Internal::minimum_wait_duration(this), + _Internal::minimum_wait_duration(this).GetCachedSize(), target, stream); + } + + // optional .mozilla.safebrowsing.Duration negative_cache_duration = 3; + if (cached_has_bits & 0x00000002u) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(3, _Internal::negative_cache_duration(this), + _Internal::negative_cache_duration(this).GetCachedSize(), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:mozilla.safebrowsing.FindFullHashesResponse) + return target; +} + +size_t FindFullHashesResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:mozilla.safebrowsing.FindFullHashesResponse) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated .mozilla.safebrowsing.ThreatMatch matches = 1; + total_size += 1UL * this->_internal_matches_size(); + for (const auto& msg : this->_impl_.matches_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + // optional .mozilla.safebrowsing.Duration minimum_wait_duration = 2; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.minimum_wait_duration_); + } + + // optional .mozilla.safebrowsing.Duration negative_cache_duration = 3; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.negative_cache_duration_); + } + + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::_pbi::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void FindFullHashesResponse::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::_pbi::DownCast<const FindFullHashesResponse*>( + &from)); +} + +void FindFullHashesResponse::MergeFrom(const FindFullHashesResponse& from) { + FindFullHashesResponse* const _this = this; + // @@protoc_insertion_point(class_specific_merge_from_start:mozilla.safebrowsing.FindFullHashesResponse) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _this->_impl_.matches_.MergeFrom(from._impl_.matches_); + cached_has_bits = from._impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + _this->_internal_mutable_minimum_wait_duration()->::mozilla::safebrowsing::Duration::MergeFrom( + from._internal_minimum_wait_duration()); + } + if (cached_has_bits & 0x00000002u) { + _this->_internal_mutable_negative_cache_duration()->::mozilla::safebrowsing::Duration::MergeFrom( + from._internal_negative_cache_duration()); + } + } + _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); +} + +void FindFullHashesResponse::CopyFrom(const FindFullHashesResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:mozilla.safebrowsing.FindFullHashesResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool FindFullHashesResponse::IsInitialized() const { + return true; +} + +void FindFullHashesResponse::InternalSwap(FindFullHashesResponse* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + _impl_.matches_.InternalSwap(&other->_impl_.matches_); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(FindFullHashesResponse, _impl_.negative_cache_duration_) + + sizeof(FindFullHashesResponse::_impl_.negative_cache_duration_) + - PROTOBUF_FIELD_OFFSET(FindFullHashesResponse, _impl_.minimum_wait_duration_)>( + reinterpret_cast<char*>(&_impl_.minimum_wait_duration_), + reinterpret_cast<char*>(&other->_impl_.minimum_wait_duration_)); +} + +std::string FindFullHashesResponse::GetTypeName() const { + return "mozilla.safebrowsing.FindFullHashesResponse"; +} + + +// =================================================================== + +class ThreatHit_ThreatSource::_Internal { + public: + using HasBits = decltype(std::declval<ThreatHit_ThreatSource>()._impl_._has_bits_); + static void set_has_url(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_type(HasBits* has_bits) { + (*has_bits)[0] |= 8u; + } + static void set_has_remote_ip(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static void set_has_referrer(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } +}; + +ThreatHit_ThreatSource::ThreatHit_ThreatSource(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:mozilla.safebrowsing.ThreatHit.ThreatSource) +} +ThreatHit_ThreatSource::ThreatHit_ThreatSource(const ThreatHit_ThreatSource& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite() { + ThreatHit_ThreatSource* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_._has_bits_){from._impl_._has_bits_} + , /*decltype(_impl_._cached_size_)*/{} + , decltype(_impl_.url_){} + , decltype(_impl_.remote_ip_){} + , decltype(_impl_.referrer_){} + , decltype(_impl_.type_){}}; + + _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); + _impl_.url_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.url_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_url()) { + _this->_impl_.url_.Set(from._internal_url(), + _this->GetArenaForAllocation()); + } + _impl_.remote_ip_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.remote_ip_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_remote_ip()) { + _this->_impl_.remote_ip_.Set(from._internal_remote_ip(), + _this->GetArenaForAllocation()); + } + _impl_.referrer_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.referrer_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_referrer()) { + _this->_impl_.referrer_.Set(from._internal_referrer(), + _this->GetArenaForAllocation()); + } + _this->_impl_.type_ = from._impl_.type_; + // @@protoc_insertion_point(copy_constructor:mozilla.safebrowsing.ThreatHit.ThreatSource) +} + +inline void ThreatHit_ThreatSource::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_._has_bits_){} + , /*decltype(_impl_._cached_size_)*/{} + , decltype(_impl_.url_){} + , decltype(_impl_.remote_ip_){} + , decltype(_impl_.referrer_){} + , decltype(_impl_.type_){0} + }; + _impl_.url_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.url_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.remote_ip_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.remote_ip_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.referrer_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.referrer_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +ThreatHit_ThreatSource::~ThreatHit_ThreatSource() { + // @@protoc_insertion_point(destructor:mozilla.safebrowsing.ThreatHit.ThreatSource) + if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void ThreatHit_ThreatSource::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.url_.Destroy(); + _impl_.remote_ip_.Destroy(); + _impl_.referrer_.Destroy(); +} + +void ThreatHit_ThreatSource::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void ThreatHit_ThreatSource::Clear() { +// @@protoc_insertion_point(message_clear_start:mozilla.safebrowsing.ThreatHit.ThreatSource) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + if (cached_has_bits & 0x00000001u) { + _impl_.url_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000002u) { + _impl_.remote_ip_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000004u) { + _impl_.referrer_.ClearNonDefaultToEmpty(); + } + } + _impl_.type_ = 0; + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<std::string>(); +} + +const char* ThreatHit_ThreatSource::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional string url = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) { + auto str = _internal_mutable_url(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .mozilla.safebrowsing.ThreatHit.ThreatSourceType type = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::mozilla::safebrowsing::ThreatHit_ThreatSourceType_IsValid(val))) { + _internal_set_type(static_cast<::mozilla::safebrowsing::ThreatHit_ThreatSourceType>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(2, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // optional string remote_ip = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) { + auto str = _internal_mutable_remote_ip(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional string referrer = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) { + auto str = _internal_mutable_referrer(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<std::string>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _impl_._has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* ThreatHit_ThreatSource::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:mozilla.safebrowsing.ThreatHit.ThreatSource) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + // optional string url = 1; + if (cached_has_bits & 0x00000001u) { + target = stream->WriteStringMaybeAliased( + 1, this->_internal_url(), target); + } + + // optional .mozilla.safebrowsing.ThreatHit.ThreatSourceType type = 2; + if (cached_has_bits & 0x00000008u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 2, this->_internal_type(), target); + } + + // optional string remote_ip = 3; + if (cached_has_bits & 0x00000002u) { + target = stream->WriteStringMaybeAliased( + 3, this->_internal_remote_ip(), target); + } + + // optional string referrer = 4; + if (cached_has_bits & 0x00000004u) { + target = stream->WriteStringMaybeAliased( + 4, this->_internal_referrer(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:mozilla.safebrowsing.ThreatHit.ThreatSource) + return target; +} + +size_t ThreatHit_ThreatSource::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:mozilla.safebrowsing.ThreatHit.ThreatSource) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x0000000fu) { + // optional string url = 1; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_url()); + } + + // optional string remote_ip = 3; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_remote_ip()); + } + + // optional string referrer = 4; + if (cached_has_bits & 0x00000004u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_referrer()); + } + + // optional .mozilla.safebrowsing.ThreatHit.ThreatSourceType type = 2; + if (cached_has_bits & 0x00000008u) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_type()); + } + + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::_pbi::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void ThreatHit_ThreatSource::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::_pbi::DownCast<const ThreatHit_ThreatSource*>( + &from)); +} + +void ThreatHit_ThreatSource::MergeFrom(const ThreatHit_ThreatSource& from) { + ThreatHit_ThreatSource* const _this = this; + // @@protoc_insertion_point(class_specific_merge_from_start:mozilla.safebrowsing.ThreatHit.ThreatSource) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (cached_has_bits & 0x0000000fu) { + if (cached_has_bits & 0x00000001u) { + _this->_internal_set_url(from._internal_url()); + } + if (cached_has_bits & 0x00000002u) { + _this->_internal_set_remote_ip(from._internal_remote_ip()); + } + if (cached_has_bits & 0x00000004u) { + _this->_internal_set_referrer(from._internal_referrer()); + } + if (cached_has_bits & 0x00000008u) { + _this->_impl_.type_ = from._impl_.type_; + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + } + _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); +} + +void ThreatHit_ThreatSource::CopyFrom(const ThreatHit_ThreatSource& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:mozilla.safebrowsing.ThreatHit.ThreatSource) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ThreatHit_ThreatSource::IsInitialized() const { + return true; +} + +void ThreatHit_ThreatSource::InternalSwap(ThreatHit_ThreatSource* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.url_, lhs_arena, + &other->_impl_.url_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.remote_ip_, lhs_arena, + &other->_impl_.remote_ip_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.referrer_, lhs_arena, + &other->_impl_.referrer_, rhs_arena + ); + swap(_impl_.type_, other->_impl_.type_); +} + +std::string ThreatHit_ThreatSource::GetTypeName() const { + return "mozilla.safebrowsing.ThreatHit.ThreatSource"; +} + + +// =================================================================== + +class ThreatHit_UserInfo::_Internal { + public: + using HasBits = decltype(std::declval<ThreatHit_UserInfo>()._impl_._has_bits_); + static void set_has_region_code(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_user_id(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } +}; + +ThreatHit_UserInfo::ThreatHit_UserInfo(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:mozilla.safebrowsing.ThreatHit.UserInfo) +} +ThreatHit_UserInfo::ThreatHit_UserInfo(const ThreatHit_UserInfo& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite() { + ThreatHit_UserInfo* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_._has_bits_){from._impl_._has_bits_} + , /*decltype(_impl_._cached_size_)*/{} + , decltype(_impl_.region_code_){} + , decltype(_impl_.user_id_){}}; + + _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); + _impl_.region_code_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.region_code_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_region_code()) { + _this->_impl_.region_code_.Set(from._internal_region_code(), + _this->GetArenaForAllocation()); + } + _impl_.user_id_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.user_id_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_user_id()) { + _this->_impl_.user_id_.Set(from._internal_user_id(), + _this->GetArenaForAllocation()); + } + // @@protoc_insertion_point(copy_constructor:mozilla.safebrowsing.ThreatHit.UserInfo) +} + +inline void ThreatHit_UserInfo::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_._has_bits_){} + , /*decltype(_impl_._cached_size_)*/{} + , decltype(_impl_.region_code_){} + , decltype(_impl_.user_id_){} + }; + _impl_.region_code_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.region_code_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.user_id_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.user_id_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +ThreatHit_UserInfo::~ThreatHit_UserInfo() { + // @@protoc_insertion_point(destructor:mozilla.safebrowsing.ThreatHit.UserInfo) + if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void ThreatHit_UserInfo::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.region_code_.Destroy(); + _impl_.user_id_.Destroy(); +} + +void ThreatHit_UserInfo::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void ThreatHit_UserInfo::Clear() { +// @@protoc_insertion_point(message_clear_start:mozilla.safebrowsing.ThreatHit.UserInfo) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + _impl_.region_code_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000002u) { + _impl_.user_id_.ClearNonDefaultToEmpty(); + } + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<std::string>(); +} + +const char* ThreatHit_UserInfo::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional string region_code = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) { + auto str = _internal_mutable_region_code(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional bytes user_id = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) { + auto str = _internal_mutable_user_id(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<std::string>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _impl_._has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* ThreatHit_UserInfo::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:mozilla.safebrowsing.ThreatHit.UserInfo) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + // optional string region_code = 1; + if (cached_has_bits & 0x00000001u) { + target = stream->WriteStringMaybeAliased( + 1, this->_internal_region_code(), target); + } + + // optional bytes user_id = 2; + if (cached_has_bits & 0x00000002u) { + target = stream->WriteBytesMaybeAliased( + 2, this->_internal_user_id(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:mozilla.safebrowsing.ThreatHit.UserInfo) + return target; +} + +size_t ThreatHit_UserInfo::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:mozilla.safebrowsing.ThreatHit.UserInfo) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + // optional string region_code = 1; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_region_code()); + } + + // optional bytes user_id = 2; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_user_id()); + } + + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::_pbi::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void ThreatHit_UserInfo::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::_pbi::DownCast<const ThreatHit_UserInfo*>( + &from)); +} + +void ThreatHit_UserInfo::MergeFrom(const ThreatHit_UserInfo& from) { + ThreatHit_UserInfo* const _this = this; + // @@protoc_insertion_point(class_specific_merge_from_start:mozilla.safebrowsing.ThreatHit.UserInfo) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + _this->_internal_set_region_code(from._internal_region_code()); + } + if (cached_has_bits & 0x00000002u) { + _this->_internal_set_user_id(from._internal_user_id()); + } + } + _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); +} + +void ThreatHit_UserInfo::CopyFrom(const ThreatHit_UserInfo& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:mozilla.safebrowsing.ThreatHit.UserInfo) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ThreatHit_UserInfo::IsInitialized() const { + return true; +} + +void ThreatHit_UserInfo::InternalSwap(ThreatHit_UserInfo* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.region_code_, lhs_arena, + &other->_impl_.region_code_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.user_id_, lhs_arena, + &other->_impl_.user_id_, rhs_arena + ); +} + +std::string ThreatHit_UserInfo::GetTypeName() const { + return "mozilla.safebrowsing.ThreatHit.UserInfo"; +} + + +// =================================================================== + +class ThreatHit::_Internal { + public: + using HasBits = decltype(std::declval<ThreatHit>()._impl_._has_bits_); + static void set_has_threat_type(HasBits* has_bits) { + (*has_bits)[0] |= 8u; + } + static void set_has_platform_type(HasBits* has_bits) { + (*has_bits)[0] |= 16u; + } + static const ::mozilla::safebrowsing::ThreatEntry& entry(const ThreatHit* msg); + static void set_has_entry(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static const ::mozilla::safebrowsing::ClientInfo& client_info(const ThreatHit* msg); + static void set_has_client_info(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static const ::mozilla::safebrowsing::ThreatHit_UserInfo& user_info(const ThreatHit* msg); + static void set_has_user_info(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } +}; + +const ::mozilla::safebrowsing::ThreatEntry& +ThreatHit::_Internal::entry(const ThreatHit* msg) { + return *msg->_impl_.entry_; +} +const ::mozilla::safebrowsing::ClientInfo& +ThreatHit::_Internal::client_info(const ThreatHit* msg) { + return *msg->_impl_.client_info_; +} +const ::mozilla::safebrowsing::ThreatHit_UserInfo& +ThreatHit::_Internal::user_info(const ThreatHit* msg) { + return *msg->_impl_.user_info_; +} +ThreatHit::ThreatHit(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:mozilla.safebrowsing.ThreatHit) +} +ThreatHit::ThreatHit(const ThreatHit& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite() { + ThreatHit* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_._has_bits_){from._impl_._has_bits_} + , /*decltype(_impl_._cached_size_)*/{} + , decltype(_impl_.resources_){from._impl_.resources_} + , decltype(_impl_.entry_){nullptr} + , decltype(_impl_.client_info_){nullptr} + , decltype(_impl_.user_info_){nullptr} + , decltype(_impl_.threat_type_){} + , decltype(_impl_.platform_type_){}}; + + _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); + if (from._internal_has_entry()) { + _this->_impl_.entry_ = new ::mozilla::safebrowsing::ThreatEntry(*from._impl_.entry_); + } + if (from._internal_has_client_info()) { + _this->_impl_.client_info_ = new ::mozilla::safebrowsing::ClientInfo(*from._impl_.client_info_); + } + if (from._internal_has_user_info()) { + _this->_impl_.user_info_ = new ::mozilla::safebrowsing::ThreatHit_UserInfo(*from._impl_.user_info_); + } + ::memcpy(&_impl_.threat_type_, &from._impl_.threat_type_, + static_cast<size_t>(reinterpret_cast<char*>(&_impl_.platform_type_) - + reinterpret_cast<char*>(&_impl_.threat_type_)) + sizeof(_impl_.platform_type_)); + // @@protoc_insertion_point(copy_constructor:mozilla.safebrowsing.ThreatHit) +} + +inline void ThreatHit::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_._has_bits_){} + , /*decltype(_impl_._cached_size_)*/{} + , decltype(_impl_.resources_){arena} + , decltype(_impl_.entry_){nullptr} + , decltype(_impl_.client_info_){nullptr} + , decltype(_impl_.user_info_){nullptr} + , decltype(_impl_.threat_type_){0} + , decltype(_impl_.platform_type_){0} + }; +} + +ThreatHit::~ThreatHit() { + // @@protoc_insertion_point(destructor:mozilla.safebrowsing.ThreatHit) + if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void ThreatHit::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.resources_.~RepeatedPtrField(); + if (this != internal_default_instance()) delete _impl_.entry_; + if (this != internal_default_instance()) delete _impl_.client_info_; + if (this != internal_default_instance()) delete _impl_.user_info_; +} + +void ThreatHit::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void ThreatHit::Clear() { +// @@protoc_insertion_point(message_clear_start:mozilla.safebrowsing.ThreatHit) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.resources_.Clear(); + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + if (cached_has_bits & 0x00000001u) { + GOOGLE_DCHECK(_impl_.entry_ != nullptr); + _impl_.entry_->Clear(); + } + if (cached_has_bits & 0x00000002u) { + GOOGLE_DCHECK(_impl_.client_info_ != nullptr); + _impl_.client_info_->Clear(); + } + if (cached_has_bits & 0x00000004u) { + GOOGLE_DCHECK(_impl_.user_info_ != nullptr); + _impl_.user_info_->Clear(); + } + } + if (cached_has_bits & 0x00000018u) { + ::memset(&_impl_.threat_type_, 0, static_cast<size_t>( + reinterpret_cast<char*>(&_impl_.platform_type_) - + reinterpret_cast<char*>(&_impl_.threat_type_)) + sizeof(_impl_.platform_type_)); + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<std::string>(); +} + +const char* ThreatHit::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional .mozilla.safebrowsing.ThreatType threat_type = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::mozilla::safebrowsing::ThreatType_IsValid(val))) { + _internal_set_threat_type(static_cast<::mozilla::safebrowsing::ThreatType>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // optional .mozilla.safebrowsing.PlatformType platform_type = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::mozilla::safebrowsing::PlatformType_IsValid(val))) { + _internal_set_platform_type(static_cast<::mozilla::safebrowsing::PlatformType>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(2, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // optional .mozilla.safebrowsing.ThreatEntry entry = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) { + ptr = ctx->ParseMessage(_internal_mutable_entry(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // repeated .mozilla.safebrowsing.ThreatHit.ThreatSource resources = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_resources(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<34>(ptr)); + } else + goto handle_unusual; + continue; + // optional .mozilla.safebrowsing.ClientInfo client_info = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 42)) { + ptr = ctx->ParseMessage(_internal_mutable_client_info(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .mozilla.safebrowsing.ThreatHit.UserInfo user_info = 6; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 50)) { + ptr = ctx->ParseMessage(_internal_mutable_user_info(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<std::string>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _impl_._has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* ThreatHit::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:mozilla.safebrowsing.ThreatHit) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + // optional .mozilla.safebrowsing.ThreatType threat_type = 1; + if (cached_has_bits & 0x00000008u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 1, this->_internal_threat_type(), target); + } + + // optional .mozilla.safebrowsing.PlatformType platform_type = 2; + if (cached_has_bits & 0x00000010u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 2, this->_internal_platform_type(), target); + } + + // optional .mozilla.safebrowsing.ThreatEntry entry = 3; + if (cached_has_bits & 0x00000001u) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(3, _Internal::entry(this), + _Internal::entry(this).GetCachedSize(), target, stream); + } + + // repeated .mozilla.safebrowsing.ThreatHit.ThreatSource resources = 4; + for (unsigned i = 0, + n = static_cast<unsigned>(this->_internal_resources_size()); i < n; i++) { + const auto& repfield = this->_internal_resources(i); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(4, repfield, repfield.GetCachedSize(), target, stream); + } + + // optional .mozilla.safebrowsing.ClientInfo client_info = 5; + if (cached_has_bits & 0x00000002u) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(5, _Internal::client_info(this), + _Internal::client_info(this).GetCachedSize(), target, stream); + } + + // optional .mozilla.safebrowsing.ThreatHit.UserInfo user_info = 6; + if (cached_has_bits & 0x00000004u) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(6, _Internal::user_info(this), + _Internal::user_info(this).GetCachedSize(), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:mozilla.safebrowsing.ThreatHit) + return target; +} + +size_t ThreatHit::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:mozilla.safebrowsing.ThreatHit) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated .mozilla.safebrowsing.ThreatHit.ThreatSource resources = 4; + total_size += 1UL * this->_internal_resources_size(); + for (const auto& msg : this->_impl_.resources_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x0000001fu) { + // optional .mozilla.safebrowsing.ThreatEntry entry = 3; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.entry_); + } + + // optional .mozilla.safebrowsing.ClientInfo client_info = 5; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.client_info_); + } + + // optional .mozilla.safebrowsing.ThreatHit.UserInfo user_info = 6; + if (cached_has_bits & 0x00000004u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.user_info_); + } + + // optional .mozilla.safebrowsing.ThreatType threat_type = 1; + if (cached_has_bits & 0x00000008u) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_threat_type()); + } + + // optional .mozilla.safebrowsing.PlatformType platform_type = 2; + if (cached_has_bits & 0x00000010u) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_platform_type()); + } + + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::_pbi::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void ThreatHit::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::_pbi::DownCast<const ThreatHit*>( + &from)); +} + +void ThreatHit::MergeFrom(const ThreatHit& from) { + ThreatHit* const _this = this; + // @@protoc_insertion_point(class_specific_merge_from_start:mozilla.safebrowsing.ThreatHit) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _this->_impl_.resources_.MergeFrom(from._impl_.resources_); + cached_has_bits = from._impl_._has_bits_[0]; + if (cached_has_bits & 0x0000001fu) { + if (cached_has_bits & 0x00000001u) { + _this->_internal_mutable_entry()->::mozilla::safebrowsing::ThreatEntry::MergeFrom( + from._internal_entry()); + } + if (cached_has_bits & 0x00000002u) { + _this->_internal_mutable_client_info()->::mozilla::safebrowsing::ClientInfo::MergeFrom( + from._internal_client_info()); + } + if (cached_has_bits & 0x00000004u) { + _this->_internal_mutable_user_info()->::mozilla::safebrowsing::ThreatHit_UserInfo::MergeFrom( + from._internal_user_info()); + } + if (cached_has_bits & 0x00000008u) { + _this->_impl_.threat_type_ = from._impl_.threat_type_; + } + if (cached_has_bits & 0x00000010u) { + _this->_impl_.platform_type_ = from._impl_.platform_type_; + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + } + _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); +} + +void ThreatHit::CopyFrom(const ThreatHit& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:mozilla.safebrowsing.ThreatHit) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ThreatHit::IsInitialized() const { + return true; +} + +void ThreatHit::InternalSwap(ThreatHit* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + _impl_.resources_.InternalSwap(&other->_impl_.resources_); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(ThreatHit, _impl_.platform_type_) + + sizeof(ThreatHit::_impl_.platform_type_) + - PROTOBUF_FIELD_OFFSET(ThreatHit, _impl_.entry_)>( + reinterpret_cast<char*>(&_impl_.entry_), + reinterpret_cast<char*>(&other->_impl_.entry_)); +} + +std::string ThreatHit::GetTypeName() const { + return "mozilla.safebrowsing.ThreatHit"; +} + + +// =================================================================== + +class ClientInfo::_Internal { + public: + using HasBits = decltype(std::declval<ClientInfo>()._impl_._has_bits_); + static void set_has_client_id(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_client_version(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } +}; + +ClientInfo::ClientInfo(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:mozilla.safebrowsing.ClientInfo) +} +ClientInfo::ClientInfo(const ClientInfo& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite() { + ClientInfo* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_._has_bits_){from._impl_._has_bits_} + , /*decltype(_impl_._cached_size_)*/{} + , decltype(_impl_.client_id_){} + , decltype(_impl_.client_version_){}}; + + _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); + _impl_.client_id_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.client_id_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_client_id()) { + _this->_impl_.client_id_.Set(from._internal_client_id(), + _this->GetArenaForAllocation()); + } + _impl_.client_version_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.client_version_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_client_version()) { + _this->_impl_.client_version_.Set(from._internal_client_version(), + _this->GetArenaForAllocation()); + } + // @@protoc_insertion_point(copy_constructor:mozilla.safebrowsing.ClientInfo) +} + +inline void ClientInfo::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_._has_bits_){} + , /*decltype(_impl_._cached_size_)*/{} + , decltype(_impl_.client_id_){} + , decltype(_impl_.client_version_){} + }; + _impl_.client_id_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.client_id_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.client_version_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.client_version_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +ClientInfo::~ClientInfo() { + // @@protoc_insertion_point(destructor:mozilla.safebrowsing.ClientInfo) + if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void ClientInfo::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.client_id_.Destroy(); + _impl_.client_version_.Destroy(); +} + +void ClientInfo::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void ClientInfo::Clear() { +// @@protoc_insertion_point(message_clear_start:mozilla.safebrowsing.ClientInfo) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + _impl_.client_id_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000002u) { + _impl_.client_version_.ClearNonDefaultToEmpty(); + } + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<std::string>(); +} + +const char* ClientInfo::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional string client_id = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) { + auto str = _internal_mutable_client_id(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional string client_version = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) { + auto str = _internal_mutable_client_version(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<std::string>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _impl_._has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* ClientInfo::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:mozilla.safebrowsing.ClientInfo) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + // optional string client_id = 1; + if (cached_has_bits & 0x00000001u) { + target = stream->WriteStringMaybeAliased( + 1, this->_internal_client_id(), target); + } + + // optional string client_version = 2; + if (cached_has_bits & 0x00000002u) { + target = stream->WriteStringMaybeAliased( + 2, this->_internal_client_version(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:mozilla.safebrowsing.ClientInfo) + return target; +} + +size_t ClientInfo::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:mozilla.safebrowsing.ClientInfo) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + // optional string client_id = 1; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_client_id()); + } + + // optional string client_version = 2; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_client_version()); + } + + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::_pbi::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void ClientInfo::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::_pbi::DownCast<const ClientInfo*>( + &from)); +} + +void ClientInfo::MergeFrom(const ClientInfo& from) { + ClientInfo* const _this = this; + // @@protoc_insertion_point(class_specific_merge_from_start:mozilla.safebrowsing.ClientInfo) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + _this->_internal_set_client_id(from._internal_client_id()); + } + if (cached_has_bits & 0x00000002u) { + _this->_internal_set_client_version(from._internal_client_version()); + } + } + _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); +} + +void ClientInfo::CopyFrom(const ClientInfo& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:mozilla.safebrowsing.ClientInfo) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ClientInfo::IsInitialized() const { + return true; +} + +void ClientInfo::InternalSwap(ClientInfo* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.client_id_, lhs_arena, + &other->_impl_.client_id_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.client_version_, lhs_arena, + &other->_impl_.client_version_, rhs_arena + ); +} + +std::string ClientInfo::GetTypeName() const { + return "mozilla.safebrowsing.ClientInfo"; +} + + +// =================================================================== + +class ChromeClientInfo::_Internal { + public: + using HasBits = decltype(std::declval<ChromeClientInfo>()._impl_._has_bits_); + static void set_has_reporting_population(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } +}; + +ChromeClientInfo::ChromeClientInfo(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:mozilla.safebrowsing.ChromeClientInfo) +} +ChromeClientInfo::ChromeClientInfo(const ChromeClientInfo& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite() { + ChromeClientInfo* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_._has_bits_){from._impl_._has_bits_} + , /*decltype(_impl_._cached_size_)*/{} + , decltype(_impl_.reporting_population_){}}; + + _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); + _this->_impl_.reporting_population_ = from._impl_.reporting_population_; + // @@protoc_insertion_point(copy_constructor:mozilla.safebrowsing.ChromeClientInfo) +} + +inline void ChromeClientInfo::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_._has_bits_){} + , /*decltype(_impl_._cached_size_)*/{} + , decltype(_impl_.reporting_population_){0} + }; +} + +ChromeClientInfo::~ChromeClientInfo() { + // @@protoc_insertion_point(destructor:mozilla.safebrowsing.ChromeClientInfo) + if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void ChromeClientInfo::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); +} + +void ChromeClientInfo::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void ChromeClientInfo::Clear() { +// @@protoc_insertion_point(message_clear_start:mozilla.safebrowsing.ChromeClientInfo) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.reporting_population_ = 0; + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<std::string>(); +} + +const char* ChromeClientInfo::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional .mozilla.safebrowsing.ChromeClientInfo.SafeBrowsingReportingPopulation reporting_population = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::mozilla::safebrowsing::ChromeClientInfo_SafeBrowsingReportingPopulation_IsValid(val))) { + _internal_set_reporting_population(static_cast<::mozilla::safebrowsing::ChromeClientInfo_SafeBrowsingReportingPopulation>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<std::string>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _impl_._has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* ChromeClientInfo::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:mozilla.safebrowsing.ChromeClientInfo) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + // optional .mozilla.safebrowsing.ChromeClientInfo.SafeBrowsingReportingPopulation reporting_population = 1; + if (cached_has_bits & 0x00000001u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 1, this->_internal_reporting_population(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:mozilla.safebrowsing.ChromeClientInfo) + return target; +} + +size_t ChromeClientInfo::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:mozilla.safebrowsing.ChromeClientInfo) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // optional .mozilla.safebrowsing.ChromeClientInfo.SafeBrowsingReportingPopulation reporting_population = 1; + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_reporting_population()); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::_pbi::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void ChromeClientInfo::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::_pbi::DownCast<const ChromeClientInfo*>( + &from)); +} + +void ChromeClientInfo::MergeFrom(const ChromeClientInfo& from) { + ChromeClientInfo* const _this = this; + // @@protoc_insertion_point(class_specific_merge_from_start:mozilla.safebrowsing.ChromeClientInfo) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_has_reporting_population()) { + _this->_internal_set_reporting_population(from._internal_reporting_population()); + } + _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); +} + +void ChromeClientInfo::CopyFrom(const ChromeClientInfo& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:mozilla.safebrowsing.ChromeClientInfo) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ChromeClientInfo::IsInitialized() const { + return true; +} + +void ChromeClientInfo::InternalSwap(ChromeClientInfo* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + swap(_impl_.reporting_population_, other->_impl_.reporting_population_); +} + +std::string ChromeClientInfo::GetTypeName() const { + return "mozilla.safebrowsing.ChromeClientInfo"; +} + + +// =================================================================== + +class Checksum::_Internal { + public: + using HasBits = decltype(std::declval<Checksum>()._impl_._has_bits_); + static void set_has_sha256(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } +}; + +Checksum::Checksum(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:mozilla.safebrowsing.Checksum) +} +Checksum::Checksum(const Checksum& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite() { + Checksum* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_._has_bits_){from._impl_._has_bits_} + , /*decltype(_impl_._cached_size_)*/{} + , decltype(_impl_.sha256_){}}; + + _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); + _impl_.sha256_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.sha256_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_sha256()) { + _this->_impl_.sha256_.Set(from._internal_sha256(), + _this->GetArenaForAllocation()); + } + // @@protoc_insertion_point(copy_constructor:mozilla.safebrowsing.Checksum) +} + +inline void Checksum::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_._has_bits_){} + , /*decltype(_impl_._cached_size_)*/{} + , decltype(_impl_.sha256_){} + }; + _impl_.sha256_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.sha256_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +Checksum::~Checksum() { + // @@protoc_insertion_point(destructor:mozilla.safebrowsing.Checksum) + if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void Checksum::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.sha256_.Destroy(); +} + +void Checksum::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void Checksum::Clear() { +// @@protoc_insertion_point(message_clear_start:mozilla.safebrowsing.Checksum) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + _impl_.sha256_.ClearNonDefaultToEmpty(); + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<std::string>(); +} + +const char* Checksum::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional bytes sha256 = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) { + auto str = _internal_mutable_sha256(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<std::string>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _impl_._has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* Checksum::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:mozilla.safebrowsing.Checksum) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + // optional bytes sha256 = 1; + if (cached_has_bits & 0x00000001u) { + target = stream->WriteBytesMaybeAliased( + 1, this->_internal_sha256(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:mozilla.safebrowsing.Checksum) + return target; +} + +size_t Checksum::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:mozilla.safebrowsing.Checksum) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // optional bytes sha256 = 1; + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_sha256()); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::_pbi::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void Checksum::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::_pbi::DownCast<const Checksum*>( + &from)); +} + +void Checksum::MergeFrom(const Checksum& from) { + Checksum* const _this = this; + // @@protoc_insertion_point(class_specific_merge_from_start:mozilla.safebrowsing.Checksum) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_has_sha256()) { + _this->_internal_set_sha256(from._internal_sha256()); + } + _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); +} + +void Checksum::CopyFrom(const Checksum& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:mozilla.safebrowsing.Checksum) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Checksum::IsInitialized() const { + return true; +} + +void Checksum::InternalSwap(Checksum* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.sha256_, lhs_arena, + &other->_impl_.sha256_, rhs_arena + ); +} + +std::string Checksum::GetTypeName() const { + return "mozilla.safebrowsing.Checksum"; +} + + +// =================================================================== + +class ThreatEntry::_Internal { + public: + using HasBits = decltype(std::declval<ThreatEntry>()._impl_._has_bits_); + static void set_has_hash(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_url(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } +}; + +ThreatEntry::ThreatEntry(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:mozilla.safebrowsing.ThreatEntry) +} +ThreatEntry::ThreatEntry(const ThreatEntry& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite() { + ThreatEntry* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_._has_bits_){from._impl_._has_bits_} + , /*decltype(_impl_._cached_size_)*/{} + , decltype(_impl_.hash_){} + , decltype(_impl_.url_){}}; + + _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); + _impl_.hash_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.hash_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_hash()) { + _this->_impl_.hash_.Set(from._internal_hash(), + _this->GetArenaForAllocation()); + } + _impl_.url_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.url_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_url()) { + _this->_impl_.url_.Set(from._internal_url(), + _this->GetArenaForAllocation()); + } + // @@protoc_insertion_point(copy_constructor:mozilla.safebrowsing.ThreatEntry) +} + +inline void ThreatEntry::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_._has_bits_){} + , /*decltype(_impl_._cached_size_)*/{} + , decltype(_impl_.hash_){} + , decltype(_impl_.url_){} + }; + _impl_.hash_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.hash_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.url_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.url_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +ThreatEntry::~ThreatEntry() { + // @@protoc_insertion_point(destructor:mozilla.safebrowsing.ThreatEntry) + if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void ThreatEntry::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.hash_.Destroy(); + _impl_.url_.Destroy(); +} + +void ThreatEntry::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void ThreatEntry::Clear() { +// @@protoc_insertion_point(message_clear_start:mozilla.safebrowsing.ThreatEntry) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + _impl_.hash_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000002u) { + _impl_.url_.ClearNonDefaultToEmpty(); + } + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<std::string>(); +} + +const char* ThreatEntry::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional bytes hash = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) { + auto str = _internal_mutable_hash(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional string url = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) { + auto str = _internal_mutable_url(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<std::string>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _impl_._has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* ThreatEntry::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:mozilla.safebrowsing.ThreatEntry) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + // optional bytes hash = 1; + if (cached_has_bits & 0x00000001u) { + target = stream->WriteBytesMaybeAliased( + 1, this->_internal_hash(), target); + } + + // optional string url = 2; + if (cached_has_bits & 0x00000002u) { + target = stream->WriteStringMaybeAliased( + 2, this->_internal_url(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:mozilla.safebrowsing.ThreatEntry) + return target; +} + +size_t ThreatEntry::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:mozilla.safebrowsing.ThreatEntry) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + // optional bytes hash = 1; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_hash()); + } + + // optional string url = 2; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_url()); + } + + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::_pbi::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void ThreatEntry::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::_pbi::DownCast<const ThreatEntry*>( + &from)); +} + +void ThreatEntry::MergeFrom(const ThreatEntry& from) { + ThreatEntry* const _this = this; + // @@protoc_insertion_point(class_specific_merge_from_start:mozilla.safebrowsing.ThreatEntry) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + _this->_internal_set_hash(from._internal_hash()); + } + if (cached_has_bits & 0x00000002u) { + _this->_internal_set_url(from._internal_url()); + } + } + _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); +} + +void ThreatEntry::CopyFrom(const ThreatEntry& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:mozilla.safebrowsing.ThreatEntry) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ThreatEntry::IsInitialized() const { + return true; +} + +void ThreatEntry::InternalSwap(ThreatEntry* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.hash_, lhs_arena, + &other->_impl_.hash_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.url_, lhs_arena, + &other->_impl_.url_, rhs_arena + ); +} + +std::string ThreatEntry::GetTypeName() const { + return "mozilla.safebrowsing.ThreatEntry"; +} + + +// =================================================================== + +class ThreatEntrySet::_Internal { + public: + using HasBits = decltype(std::declval<ThreatEntrySet>()._impl_._has_bits_); + static void set_has_compression_type(HasBits* has_bits) { + (*has_bits)[0] |= 16u; + } + static const ::mozilla::safebrowsing::RawHashes& raw_hashes(const ThreatEntrySet* msg); + static void set_has_raw_hashes(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static const ::mozilla::safebrowsing::RawIndices& raw_indices(const ThreatEntrySet* msg); + static void set_has_raw_indices(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static const ::mozilla::safebrowsing::RiceDeltaEncoding& rice_hashes(const ThreatEntrySet* msg); + static void set_has_rice_hashes(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } + static const ::mozilla::safebrowsing::RiceDeltaEncoding& rice_indices(const ThreatEntrySet* msg); + static void set_has_rice_indices(HasBits* has_bits) { + (*has_bits)[0] |= 8u; + } +}; + +const ::mozilla::safebrowsing::RawHashes& +ThreatEntrySet::_Internal::raw_hashes(const ThreatEntrySet* msg) { + return *msg->_impl_.raw_hashes_; +} +const ::mozilla::safebrowsing::RawIndices& +ThreatEntrySet::_Internal::raw_indices(const ThreatEntrySet* msg) { + return *msg->_impl_.raw_indices_; +} +const ::mozilla::safebrowsing::RiceDeltaEncoding& +ThreatEntrySet::_Internal::rice_hashes(const ThreatEntrySet* msg) { + return *msg->_impl_.rice_hashes_; +} +const ::mozilla::safebrowsing::RiceDeltaEncoding& +ThreatEntrySet::_Internal::rice_indices(const ThreatEntrySet* msg) { + return *msg->_impl_.rice_indices_; +} +ThreatEntrySet::ThreatEntrySet(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:mozilla.safebrowsing.ThreatEntrySet) +} +ThreatEntrySet::ThreatEntrySet(const ThreatEntrySet& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite() { + ThreatEntrySet* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_._has_bits_){from._impl_._has_bits_} + , /*decltype(_impl_._cached_size_)*/{} + , decltype(_impl_.raw_hashes_){nullptr} + , decltype(_impl_.raw_indices_){nullptr} + , decltype(_impl_.rice_hashes_){nullptr} + , decltype(_impl_.rice_indices_){nullptr} + , decltype(_impl_.compression_type_){}}; + + _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); + if (from._internal_has_raw_hashes()) { + _this->_impl_.raw_hashes_ = new ::mozilla::safebrowsing::RawHashes(*from._impl_.raw_hashes_); + } + if (from._internal_has_raw_indices()) { + _this->_impl_.raw_indices_ = new ::mozilla::safebrowsing::RawIndices(*from._impl_.raw_indices_); + } + if (from._internal_has_rice_hashes()) { + _this->_impl_.rice_hashes_ = new ::mozilla::safebrowsing::RiceDeltaEncoding(*from._impl_.rice_hashes_); + } + if (from._internal_has_rice_indices()) { + _this->_impl_.rice_indices_ = new ::mozilla::safebrowsing::RiceDeltaEncoding(*from._impl_.rice_indices_); + } + _this->_impl_.compression_type_ = from._impl_.compression_type_; + // @@protoc_insertion_point(copy_constructor:mozilla.safebrowsing.ThreatEntrySet) +} + +inline void ThreatEntrySet::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_._has_bits_){} + , /*decltype(_impl_._cached_size_)*/{} + , decltype(_impl_.raw_hashes_){nullptr} + , decltype(_impl_.raw_indices_){nullptr} + , decltype(_impl_.rice_hashes_){nullptr} + , decltype(_impl_.rice_indices_){nullptr} + , decltype(_impl_.compression_type_){0} + }; +} + +ThreatEntrySet::~ThreatEntrySet() { + // @@protoc_insertion_point(destructor:mozilla.safebrowsing.ThreatEntrySet) + if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void ThreatEntrySet::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + if (this != internal_default_instance()) delete _impl_.raw_hashes_; + if (this != internal_default_instance()) delete _impl_.raw_indices_; + if (this != internal_default_instance()) delete _impl_.rice_hashes_; + if (this != internal_default_instance()) delete _impl_.rice_indices_; +} + +void ThreatEntrySet::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void ThreatEntrySet::Clear() { +// @@protoc_insertion_point(message_clear_start:mozilla.safebrowsing.ThreatEntrySet) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x0000000fu) { + if (cached_has_bits & 0x00000001u) { + GOOGLE_DCHECK(_impl_.raw_hashes_ != nullptr); + _impl_.raw_hashes_->Clear(); + } + if (cached_has_bits & 0x00000002u) { + GOOGLE_DCHECK(_impl_.raw_indices_ != nullptr); + _impl_.raw_indices_->Clear(); + } + if (cached_has_bits & 0x00000004u) { + GOOGLE_DCHECK(_impl_.rice_hashes_ != nullptr); + _impl_.rice_hashes_->Clear(); + } + if (cached_has_bits & 0x00000008u) { + GOOGLE_DCHECK(_impl_.rice_indices_ != nullptr); + _impl_.rice_indices_->Clear(); + } + } + _impl_.compression_type_ = 0; + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<std::string>(); +} + +const char* ThreatEntrySet::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional .mozilla.safebrowsing.CompressionType compression_type = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::mozilla::safebrowsing::CompressionType_IsValid(val))) { + _internal_set_compression_type(static_cast<::mozilla::safebrowsing::CompressionType>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // optional .mozilla.safebrowsing.RawHashes raw_hashes = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) { + ptr = ctx->ParseMessage(_internal_mutable_raw_hashes(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .mozilla.safebrowsing.RawIndices raw_indices = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) { + ptr = ctx->ParseMessage(_internal_mutable_raw_indices(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .mozilla.safebrowsing.RiceDeltaEncoding rice_hashes = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) { + ptr = ctx->ParseMessage(_internal_mutable_rice_hashes(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .mozilla.safebrowsing.RiceDeltaEncoding rice_indices = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 42)) { + ptr = ctx->ParseMessage(_internal_mutable_rice_indices(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<std::string>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _impl_._has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* ThreatEntrySet::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:mozilla.safebrowsing.ThreatEntrySet) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + // optional .mozilla.safebrowsing.CompressionType compression_type = 1; + if (cached_has_bits & 0x00000010u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 1, this->_internal_compression_type(), target); + } + + // optional .mozilla.safebrowsing.RawHashes raw_hashes = 2; + if (cached_has_bits & 0x00000001u) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(2, _Internal::raw_hashes(this), + _Internal::raw_hashes(this).GetCachedSize(), target, stream); + } + + // optional .mozilla.safebrowsing.RawIndices raw_indices = 3; + if (cached_has_bits & 0x00000002u) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(3, _Internal::raw_indices(this), + _Internal::raw_indices(this).GetCachedSize(), target, stream); + } + + // optional .mozilla.safebrowsing.RiceDeltaEncoding rice_hashes = 4; + if (cached_has_bits & 0x00000004u) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(4, _Internal::rice_hashes(this), + _Internal::rice_hashes(this).GetCachedSize(), target, stream); + } + + // optional .mozilla.safebrowsing.RiceDeltaEncoding rice_indices = 5; + if (cached_has_bits & 0x00000008u) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(5, _Internal::rice_indices(this), + _Internal::rice_indices(this).GetCachedSize(), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:mozilla.safebrowsing.ThreatEntrySet) + return target; +} + +size_t ThreatEntrySet::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:mozilla.safebrowsing.ThreatEntrySet) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x0000001fu) { + // optional .mozilla.safebrowsing.RawHashes raw_hashes = 2; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.raw_hashes_); + } + + // optional .mozilla.safebrowsing.RawIndices raw_indices = 3; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.raw_indices_); + } + + // optional .mozilla.safebrowsing.RiceDeltaEncoding rice_hashes = 4; + if (cached_has_bits & 0x00000004u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.rice_hashes_); + } + + // optional .mozilla.safebrowsing.RiceDeltaEncoding rice_indices = 5; + if (cached_has_bits & 0x00000008u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.rice_indices_); + } + + // optional .mozilla.safebrowsing.CompressionType compression_type = 1; + if (cached_has_bits & 0x00000010u) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_compression_type()); + } + + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::_pbi::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void ThreatEntrySet::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::_pbi::DownCast<const ThreatEntrySet*>( + &from)); +} + +void ThreatEntrySet::MergeFrom(const ThreatEntrySet& from) { + ThreatEntrySet* const _this = this; + // @@protoc_insertion_point(class_specific_merge_from_start:mozilla.safebrowsing.ThreatEntrySet) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (cached_has_bits & 0x0000001fu) { + if (cached_has_bits & 0x00000001u) { + _this->_internal_mutable_raw_hashes()->::mozilla::safebrowsing::RawHashes::MergeFrom( + from._internal_raw_hashes()); + } + if (cached_has_bits & 0x00000002u) { + _this->_internal_mutable_raw_indices()->::mozilla::safebrowsing::RawIndices::MergeFrom( + from._internal_raw_indices()); + } + if (cached_has_bits & 0x00000004u) { + _this->_internal_mutable_rice_hashes()->::mozilla::safebrowsing::RiceDeltaEncoding::MergeFrom( + from._internal_rice_hashes()); + } + if (cached_has_bits & 0x00000008u) { + _this->_internal_mutable_rice_indices()->::mozilla::safebrowsing::RiceDeltaEncoding::MergeFrom( + from._internal_rice_indices()); + } + if (cached_has_bits & 0x00000010u) { + _this->_impl_.compression_type_ = from._impl_.compression_type_; + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + } + _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); +} + +void ThreatEntrySet::CopyFrom(const ThreatEntrySet& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:mozilla.safebrowsing.ThreatEntrySet) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ThreatEntrySet::IsInitialized() const { + return true; +} + +void ThreatEntrySet::InternalSwap(ThreatEntrySet* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(ThreatEntrySet, _impl_.compression_type_) + + sizeof(ThreatEntrySet::_impl_.compression_type_) + - PROTOBUF_FIELD_OFFSET(ThreatEntrySet, _impl_.raw_hashes_)>( + reinterpret_cast<char*>(&_impl_.raw_hashes_), + reinterpret_cast<char*>(&other->_impl_.raw_hashes_)); +} + +std::string ThreatEntrySet::GetTypeName() const { + return "mozilla.safebrowsing.ThreatEntrySet"; +} + + +// =================================================================== + +class RawIndices::_Internal { + public: +}; + +RawIndices::RawIndices(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:mozilla.safebrowsing.RawIndices) +} +RawIndices::RawIndices(const RawIndices& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite() { + RawIndices* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.indices_){from._impl_.indices_} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); + // @@protoc_insertion_point(copy_constructor:mozilla.safebrowsing.RawIndices) +} + +inline void RawIndices::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.indices_){arena} + , /*decltype(_impl_._cached_size_)*/{} + }; +} + +RawIndices::~RawIndices() { + // @@protoc_insertion_point(destructor:mozilla.safebrowsing.RawIndices) + if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void RawIndices::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.indices_.~RepeatedField(); +} + +void RawIndices::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void RawIndices::Clear() { +// @@protoc_insertion_point(message_clear_start:mozilla.safebrowsing.RawIndices) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.indices_.Clear(); + _internal_metadata_.Clear<std::string>(); +} + +const char* RawIndices::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // repeated int32 indices = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) { + ptr -= 1; + do { + ptr += 1; + _internal_add_indices(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr)); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<8>(ptr)); + } else if (static_cast<uint8_t>(tag) == 10) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_indices(), ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<std::string>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* RawIndices::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:mozilla.safebrowsing.RawIndices) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // repeated int32 indices = 1; + for (int i = 0, n = this->_internal_indices_size(); i < n; i++) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt32ToArray(1, this->_internal_indices(i), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:mozilla.safebrowsing.RawIndices) + return target; +} + +size_t RawIndices::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:mozilla.safebrowsing.RawIndices) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated int32 indices = 1; + { + size_t data_size = ::_pbi::WireFormatLite:: + Int32Size(this->_impl_.indices_); + total_size += 1 * + ::_pbi::FromIntSize(this->_internal_indices_size()); + total_size += data_size; + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::_pbi::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void RawIndices::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::_pbi::DownCast<const RawIndices*>( + &from)); +} + +void RawIndices::MergeFrom(const RawIndices& from) { + RawIndices* const _this = this; + // @@protoc_insertion_point(class_specific_merge_from_start:mozilla.safebrowsing.RawIndices) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _this->_impl_.indices_.MergeFrom(from._impl_.indices_); + _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); +} + +void RawIndices::CopyFrom(const RawIndices& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:mozilla.safebrowsing.RawIndices) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool RawIndices::IsInitialized() const { + return true; +} + +void RawIndices::InternalSwap(RawIndices* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + _impl_.indices_.InternalSwap(&other->_impl_.indices_); +} + +std::string RawIndices::GetTypeName() const { + return "mozilla.safebrowsing.RawIndices"; +} + + +// =================================================================== + +class RawHashes::_Internal { + public: + using HasBits = decltype(std::declval<RawHashes>()._impl_._has_bits_); + static void set_has_prefix_size(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static void set_has_raw_hashes(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } +}; + +RawHashes::RawHashes(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:mozilla.safebrowsing.RawHashes) +} +RawHashes::RawHashes(const RawHashes& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite() { + RawHashes* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_._has_bits_){from._impl_._has_bits_} + , /*decltype(_impl_._cached_size_)*/{} + , decltype(_impl_.raw_hashes_){} + , decltype(_impl_.prefix_size_){}}; + + _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); + _impl_.raw_hashes_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.raw_hashes_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_raw_hashes()) { + _this->_impl_.raw_hashes_.Set(from._internal_raw_hashes(), + _this->GetArenaForAllocation()); + } + _this->_impl_.prefix_size_ = from._impl_.prefix_size_; + // @@protoc_insertion_point(copy_constructor:mozilla.safebrowsing.RawHashes) +} + +inline void RawHashes::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_._has_bits_){} + , /*decltype(_impl_._cached_size_)*/{} + , decltype(_impl_.raw_hashes_){} + , decltype(_impl_.prefix_size_){0} + }; + _impl_.raw_hashes_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.raw_hashes_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +RawHashes::~RawHashes() { + // @@protoc_insertion_point(destructor:mozilla.safebrowsing.RawHashes) + if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void RawHashes::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.raw_hashes_.Destroy(); +} + +void RawHashes::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void RawHashes::Clear() { +// @@protoc_insertion_point(message_clear_start:mozilla.safebrowsing.RawHashes) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + _impl_.raw_hashes_.ClearNonDefaultToEmpty(); + } + _impl_.prefix_size_ = 0; + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<std::string>(); +} + +const char* RawHashes::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional int32 prefix_size = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) { + _Internal::set_has_prefix_size(&has_bits); + _impl_.prefix_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional bytes raw_hashes = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) { + auto str = _internal_mutable_raw_hashes(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<std::string>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _impl_._has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* RawHashes::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:mozilla.safebrowsing.RawHashes) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + // optional int32 prefix_size = 1; + if (cached_has_bits & 0x00000002u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt32ToArray(1, this->_internal_prefix_size(), target); + } + + // optional bytes raw_hashes = 2; + if (cached_has_bits & 0x00000001u) { + target = stream->WriteBytesMaybeAliased( + 2, this->_internal_raw_hashes(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:mozilla.safebrowsing.RawHashes) + return target; +} + +size_t RawHashes::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:mozilla.safebrowsing.RawHashes) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + // optional bytes raw_hashes = 2; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_raw_hashes()); + } + + // optional int32 prefix_size = 1; + if (cached_has_bits & 0x00000002u) { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_prefix_size()); + } + + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::_pbi::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void RawHashes::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::_pbi::DownCast<const RawHashes*>( + &from)); +} + +void RawHashes::MergeFrom(const RawHashes& from) { + RawHashes* const _this = this; + // @@protoc_insertion_point(class_specific_merge_from_start:mozilla.safebrowsing.RawHashes) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + _this->_internal_set_raw_hashes(from._internal_raw_hashes()); + } + if (cached_has_bits & 0x00000002u) { + _this->_impl_.prefix_size_ = from._impl_.prefix_size_; + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + } + _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); +} + +void RawHashes::CopyFrom(const RawHashes& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:mozilla.safebrowsing.RawHashes) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool RawHashes::IsInitialized() const { + return true; +} + +void RawHashes::InternalSwap(RawHashes* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.raw_hashes_, lhs_arena, + &other->_impl_.raw_hashes_, rhs_arena + ); + swap(_impl_.prefix_size_, other->_impl_.prefix_size_); +} + +std::string RawHashes::GetTypeName() const { + return "mozilla.safebrowsing.RawHashes"; +} + + +// =================================================================== + +class RiceDeltaEncoding::_Internal { + public: + using HasBits = decltype(std::declval<RiceDeltaEncoding>()._impl_._has_bits_); + static void set_has_first_value(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static void set_has_rice_parameter(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } + static void set_has_num_entries(HasBits* has_bits) { + (*has_bits)[0] |= 8u; + } + static void set_has_encoded_data(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } +}; + +RiceDeltaEncoding::RiceDeltaEncoding(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:mozilla.safebrowsing.RiceDeltaEncoding) +} +RiceDeltaEncoding::RiceDeltaEncoding(const RiceDeltaEncoding& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite() { + RiceDeltaEncoding* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_._has_bits_){from._impl_._has_bits_} + , /*decltype(_impl_._cached_size_)*/{} + , decltype(_impl_.encoded_data_){} + , decltype(_impl_.first_value_){} + , decltype(_impl_.rice_parameter_){} + , decltype(_impl_.num_entries_){}}; + + _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); + _impl_.encoded_data_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.encoded_data_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_encoded_data()) { + _this->_impl_.encoded_data_.Set(from._internal_encoded_data(), + _this->GetArenaForAllocation()); + } + ::memcpy(&_impl_.first_value_, &from._impl_.first_value_, + static_cast<size_t>(reinterpret_cast<char*>(&_impl_.num_entries_) - + reinterpret_cast<char*>(&_impl_.first_value_)) + sizeof(_impl_.num_entries_)); + // @@protoc_insertion_point(copy_constructor:mozilla.safebrowsing.RiceDeltaEncoding) +} + +inline void RiceDeltaEncoding::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_._has_bits_){} + , /*decltype(_impl_._cached_size_)*/{} + , decltype(_impl_.encoded_data_){} + , decltype(_impl_.first_value_){int64_t{0}} + , decltype(_impl_.rice_parameter_){0} + , decltype(_impl_.num_entries_){0} + }; + _impl_.encoded_data_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.encoded_data_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +RiceDeltaEncoding::~RiceDeltaEncoding() { + // @@protoc_insertion_point(destructor:mozilla.safebrowsing.RiceDeltaEncoding) + if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void RiceDeltaEncoding::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.encoded_data_.Destroy(); +} + +void RiceDeltaEncoding::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void RiceDeltaEncoding::Clear() { +// @@protoc_insertion_point(message_clear_start:mozilla.safebrowsing.RiceDeltaEncoding) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + _impl_.encoded_data_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x0000000eu) { + ::memset(&_impl_.first_value_, 0, static_cast<size_t>( + reinterpret_cast<char*>(&_impl_.num_entries_) - + reinterpret_cast<char*>(&_impl_.first_value_)) + sizeof(_impl_.num_entries_)); + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<std::string>(); +} + +const char* RiceDeltaEncoding::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional int64 first_value = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) { + _Internal::set_has_first_value(&has_bits); + _impl_.first_value_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional int32 rice_parameter = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) { + _Internal::set_has_rice_parameter(&has_bits); + _impl_.rice_parameter_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional int32 num_entries = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) { + _Internal::set_has_num_entries(&has_bits); + _impl_.num_entries_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional bytes encoded_data = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) { + auto str = _internal_mutable_encoded_data(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<std::string>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _impl_._has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* RiceDeltaEncoding::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:mozilla.safebrowsing.RiceDeltaEncoding) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + // optional int64 first_value = 1; + if (cached_has_bits & 0x00000002u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt64ToArray(1, this->_internal_first_value(), target); + } + + // optional int32 rice_parameter = 2; + if (cached_has_bits & 0x00000004u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_rice_parameter(), target); + } + + // optional int32 num_entries = 3; + if (cached_has_bits & 0x00000008u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt32ToArray(3, this->_internal_num_entries(), target); + } + + // optional bytes encoded_data = 4; + if (cached_has_bits & 0x00000001u) { + target = stream->WriteBytesMaybeAliased( + 4, this->_internal_encoded_data(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:mozilla.safebrowsing.RiceDeltaEncoding) + return target; +} + +size_t RiceDeltaEncoding::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:mozilla.safebrowsing.RiceDeltaEncoding) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x0000000fu) { + // optional bytes encoded_data = 4; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_encoded_data()); + } + + // optional int64 first_value = 1; + if (cached_has_bits & 0x00000002u) { + total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_first_value()); + } + + // optional int32 rice_parameter = 2; + if (cached_has_bits & 0x00000004u) { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_rice_parameter()); + } + + // optional int32 num_entries = 3; + if (cached_has_bits & 0x00000008u) { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_num_entries()); + } + + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::_pbi::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void RiceDeltaEncoding::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::_pbi::DownCast<const RiceDeltaEncoding*>( + &from)); +} + +void RiceDeltaEncoding::MergeFrom(const RiceDeltaEncoding& from) { + RiceDeltaEncoding* const _this = this; + // @@protoc_insertion_point(class_specific_merge_from_start:mozilla.safebrowsing.RiceDeltaEncoding) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (cached_has_bits & 0x0000000fu) { + if (cached_has_bits & 0x00000001u) { + _this->_internal_set_encoded_data(from._internal_encoded_data()); + } + if (cached_has_bits & 0x00000002u) { + _this->_impl_.first_value_ = from._impl_.first_value_; + } + if (cached_has_bits & 0x00000004u) { + _this->_impl_.rice_parameter_ = from._impl_.rice_parameter_; + } + if (cached_has_bits & 0x00000008u) { + _this->_impl_.num_entries_ = from._impl_.num_entries_; + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + } + _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); +} + +void RiceDeltaEncoding::CopyFrom(const RiceDeltaEncoding& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:mozilla.safebrowsing.RiceDeltaEncoding) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool RiceDeltaEncoding::IsInitialized() const { + return true; +} + +void RiceDeltaEncoding::InternalSwap(RiceDeltaEncoding* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.encoded_data_, lhs_arena, + &other->_impl_.encoded_data_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(RiceDeltaEncoding, _impl_.num_entries_) + + sizeof(RiceDeltaEncoding::_impl_.num_entries_) + - PROTOBUF_FIELD_OFFSET(RiceDeltaEncoding, _impl_.first_value_)>( + reinterpret_cast<char*>(&_impl_.first_value_), + reinterpret_cast<char*>(&other->_impl_.first_value_)); +} + +std::string RiceDeltaEncoding::GetTypeName() const { + return "mozilla.safebrowsing.RiceDeltaEncoding"; +} + + +// =================================================================== + +class ThreatEntryMetadata_MetadataEntry::_Internal { + public: + using HasBits = decltype(std::declval<ThreatEntryMetadata_MetadataEntry>()._impl_._has_bits_); + static void set_has_key(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_value(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } +}; + +ThreatEntryMetadata_MetadataEntry::ThreatEntryMetadata_MetadataEntry(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:mozilla.safebrowsing.ThreatEntryMetadata.MetadataEntry) +} +ThreatEntryMetadata_MetadataEntry::ThreatEntryMetadata_MetadataEntry(const ThreatEntryMetadata_MetadataEntry& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite() { + ThreatEntryMetadata_MetadataEntry* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_._has_bits_){from._impl_._has_bits_} + , /*decltype(_impl_._cached_size_)*/{} + , decltype(_impl_.key_){} + , decltype(_impl_.value_){}}; + + _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); + _impl_.key_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.key_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_key()) { + _this->_impl_.key_.Set(from._internal_key(), + _this->GetArenaForAllocation()); + } + _impl_.value_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.value_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_value()) { + _this->_impl_.value_.Set(from._internal_value(), + _this->GetArenaForAllocation()); + } + // @@protoc_insertion_point(copy_constructor:mozilla.safebrowsing.ThreatEntryMetadata.MetadataEntry) +} + +inline void ThreatEntryMetadata_MetadataEntry::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_._has_bits_){} + , /*decltype(_impl_._cached_size_)*/{} + , decltype(_impl_.key_){} + , decltype(_impl_.value_){} + }; + _impl_.key_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.key_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.value_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.value_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +ThreatEntryMetadata_MetadataEntry::~ThreatEntryMetadata_MetadataEntry() { + // @@protoc_insertion_point(destructor:mozilla.safebrowsing.ThreatEntryMetadata.MetadataEntry) + if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void ThreatEntryMetadata_MetadataEntry::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.key_.Destroy(); + _impl_.value_.Destroy(); +} + +void ThreatEntryMetadata_MetadataEntry::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void ThreatEntryMetadata_MetadataEntry::Clear() { +// @@protoc_insertion_point(message_clear_start:mozilla.safebrowsing.ThreatEntryMetadata.MetadataEntry) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + _impl_.key_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000002u) { + _impl_.value_.ClearNonDefaultToEmpty(); + } + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<std::string>(); +} + +const char* ThreatEntryMetadata_MetadataEntry::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional bytes key = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) { + auto str = _internal_mutable_key(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional bytes value = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) { + auto str = _internal_mutable_value(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<std::string>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _impl_._has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* ThreatEntryMetadata_MetadataEntry::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:mozilla.safebrowsing.ThreatEntryMetadata.MetadataEntry) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + // optional bytes key = 1; + if (cached_has_bits & 0x00000001u) { + target = stream->WriteBytesMaybeAliased( + 1, this->_internal_key(), target); + } + + // optional bytes value = 2; + if (cached_has_bits & 0x00000002u) { + target = stream->WriteBytesMaybeAliased( + 2, this->_internal_value(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:mozilla.safebrowsing.ThreatEntryMetadata.MetadataEntry) + return target; +} + +size_t ThreatEntryMetadata_MetadataEntry::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:mozilla.safebrowsing.ThreatEntryMetadata.MetadataEntry) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + // optional bytes key = 1; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_key()); + } + + // optional bytes value = 2; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_value()); + } + + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::_pbi::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void ThreatEntryMetadata_MetadataEntry::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::_pbi::DownCast<const ThreatEntryMetadata_MetadataEntry*>( + &from)); +} + +void ThreatEntryMetadata_MetadataEntry::MergeFrom(const ThreatEntryMetadata_MetadataEntry& from) { + ThreatEntryMetadata_MetadataEntry* const _this = this; + // @@protoc_insertion_point(class_specific_merge_from_start:mozilla.safebrowsing.ThreatEntryMetadata.MetadataEntry) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + _this->_internal_set_key(from._internal_key()); + } + if (cached_has_bits & 0x00000002u) { + _this->_internal_set_value(from._internal_value()); + } + } + _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); +} + +void ThreatEntryMetadata_MetadataEntry::CopyFrom(const ThreatEntryMetadata_MetadataEntry& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:mozilla.safebrowsing.ThreatEntryMetadata.MetadataEntry) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ThreatEntryMetadata_MetadataEntry::IsInitialized() const { + return true; +} + +void ThreatEntryMetadata_MetadataEntry::InternalSwap(ThreatEntryMetadata_MetadataEntry* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.key_, lhs_arena, + &other->_impl_.key_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.value_, lhs_arena, + &other->_impl_.value_, rhs_arena + ); +} + +std::string ThreatEntryMetadata_MetadataEntry::GetTypeName() const { + return "mozilla.safebrowsing.ThreatEntryMetadata.MetadataEntry"; +} + + +// =================================================================== + +class ThreatEntryMetadata::_Internal { + public: +}; + +ThreatEntryMetadata::ThreatEntryMetadata(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:mozilla.safebrowsing.ThreatEntryMetadata) +} +ThreatEntryMetadata::ThreatEntryMetadata(const ThreatEntryMetadata& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite() { + ThreatEntryMetadata* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.entries_){from._impl_.entries_} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); + // @@protoc_insertion_point(copy_constructor:mozilla.safebrowsing.ThreatEntryMetadata) +} + +inline void ThreatEntryMetadata::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.entries_){arena} + , /*decltype(_impl_._cached_size_)*/{} + }; +} + +ThreatEntryMetadata::~ThreatEntryMetadata() { + // @@protoc_insertion_point(destructor:mozilla.safebrowsing.ThreatEntryMetadata) + if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void ThreatEntryMetadata::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.entries_.~RepeatedPtrField(); +} + +void ThreatEntryMetadata::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void ThreatEntryMetadata::Clear() { +// @@protoc_insertion_point(message_clear_start:mozilla.safebrowsing.ThreatEntryMetadata) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.entries_.Clear(); + _internal_metadata_.Clear<std::string>(); +} + +const char* ThreatEntryMetadata::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // repeated .mozilla.safebrowsing.ThreatEntryMetadata.MetadataEntry entries = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_entries(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr)); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<std::string>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* ThreatEntryMetadata::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:mozilla.safebrowsing.ThreatEntryMetadata) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // repeated .mozilla.safebrowsing.ThreatEntryMetadata.MetadataEntry entries = 1; + for (unsigned i = 0, + n = static_cast<unsigned>(this->_internal_entries_size()); i < n; i++) { + const auto& repfield = this->_internal_entries(i); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(1, repfield, repfield.GetCachedSize(), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:mozilla.safebrowsing.ThreatEntryMetadata) + return target; +} + +size_t ThreatEntryMetadata::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:mozilla.safebrowsing.ThreatEntryMetadata) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated .mozilla.safebrowsing.ThreatEntryMetadata.MetadataEntry entries = 1; + total_size += 1UL * this->_internal_entries_size(); + for (const auto& msg : this->_impl_.entries_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::_pbi::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void ThreatEntryMetadata::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::_pbi::DownCast<const ThreatEntryMetadata*>( + &from)); +} + +void ThreatEntryMetadata::MergeFrom(const ThreatEntryMetadata& from) { + ThreatEntryMetadata* const _this = this; + // @@protoc_insertion_point(class_specific_merge_from_start:mozilla.safebrowsing.ThreatEntryMetadata) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _this->_impl_.entries_.MergeFrom(from._impl_.entries_); + _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); +} + +void ThreatEntryMetadata::CopyFrom(const ThreatEntryMetadata& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:mozilla.safebrowsing.ThreatEntryMetadata) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ThreatEntryMetadata::IsInitialized() const { + return true; +} + +void ThreatEntryMetadata::InternalSwap(ThreatEntryMetadata* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + _impl_.entries_.InternalSwap(&other->_impl_.entries_); +} + +std::string ThreatEntryMetadata::GetTypeName() const { + return "mozilla.safebrowsing.ThreatEntryMetadata"; +} + + +// =================================================================== + +class ThreatListDescriptor::_Internal { + public: + using HasBits = decltype(std::declval<ThreatListDescriptor>()._impl_._has_bits_); + static void set_has_threat_type(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_platform_type(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static void set_has_threat_entry_type(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } +}; + +ThreatListDescriptor::ThreatListDescriptor(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:mozilla.safebrowsing.ThreatListDescriptor) +} +ThreatListDescriptor::ThreatListDescriptor(const ThreatListDescriptor& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite() { + ThreatListDescriptor* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_._has_bits_){from._impl_._has_bits_} + , /*decltype(_impl_._cached_size_)*/{} + , decltype(_impl_.threat_type_){} + , decltype(_impl_.platform_type_){} + , decltype(_impl_.threat_entry_type_){}}; + + _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); + ::memcpy(&_impl_.threat_type_, &from._impl_.threat_type_, + static_cast<size_t>(reinterpret_cast<char*>(&_impl_.threat_entry_type_) - + reinterpret_cast<char*>(&_impl_.threat_type_)) + sizeof(_impl_.threat_entry_type_)); + // @@protoc_insertion_point(copy_constructor:mozilla.safebrowsing.ThreatListDescriptor) +} + +inline void ThreatListDescriptor::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_._has_bits_){} + , /*decltype(_impl_._cached_size_)*/{} + , decltype(_impl_.threat_type_){0} + , decltype(_impl_.platform_type_){0} + , decltype(_impl_.threat_entry_type_){0} + }; +} + +ThreatListDescriptor::~ThreatListDescriptor() { + // @@protoc_insertion_point(destructor:mozilla.safebrowsing.ThreatListDescriptor) + if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void ThreatListDescriptor::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); +} + +void ThreatListDescriptor::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void ThreatListDescriptor::Clear() { +// @@protoc_insertion_point(message_clear_start:mozilla.safebrowsing.ThreatListDescriptor) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + ::memset(&_impl_.threat_type_, 0, static_cast<size_t>( + reinterpret_cast<char*>(&_impl_.threat_entry_type_) - + reinterpret_cast<char*>(&_impl_.threat_type_)) + sizeof(_impl_.threat_entry_type_)); + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<std::string>(); +} + +const char* ThreatListDescriptor::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional .mozilla.safebrowsing.ThreatType threat_type = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::mozilla::safebrowsing::ThreatType_IsValid(val))) { + _internal_set_threat_type(static_cast<::mozilla::safebrowsing::ThreatType>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // optional .mozilla.safebrowsing.PlatformType platform_type = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::mozilla::safebrowsing::PlatformType_IsValid(val))) { + _internal_set_platform_type(static_cast<::mozilla::safebrowsing::PlatformType>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(2, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // optional .mozilla.safebrowsing.ThreatEntryType threat_entry_type = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::mozilla::safebrowsing::ThreatEntryType_IsValid(val))) { + _internal_set_threat_entry_type(static_cast<::mozilla::safebrowsing::ThreatEntryType>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(3, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<std::string>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _impl_._has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* ThreatListDescriptor::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:mozilla.safebrowsing.ThreatListDescriptor) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + // optional .mozilla.safebrowsing.ThreatType threat_type = 1; + if (cached_has_bits & 0x00000001u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 1, this->_internal_threat_type(), target); + } + + // optional .mozilla.safebrowsing.PlatformType platform_type = 2; + if (cached_has_bits & 0x00000002u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 2, this->_internal_platform_type(), target); + } + + // optional .mozilla.safebrowsing.ThreatEntryType threat_entry_type = 3; + if (cached_has_bits & 0x00000004u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 3, this->_internal_threat_entry_type(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:mozilla.safebrowsing.ThreatListDescriptor) + return target; +} + +size_t ThreatListDescriptor::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:mozilla.safebrowsing.ThreatListDescriptor) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + // optional .mozilla.safebrowsing.ThreatType threat_type = 1; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_threat_type()); + } + + // optional .mozilla.safebrowsing.PlatformType platform_type = 2; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_platform_type()); + } + + // optional .mozilla.safebrowsing.ThreatEntryType threat_entry_type = 3; + if (cached_has_bits & 0x00000004u) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_threat_entry_type()); + } + + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::_pbi::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void ThreatListDescriptor::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::_pbi::DownCast<const ThreatListDescriptor*>( + &from)); +} + +void ThreatListDescriptor::MergeFrom(const ThreatListDescriptor& from) { + ThreatListDescriptor* const _this = this; + // @@protoc_insertion_point(class_specific_merge_from_start:mozilla.safebrowsing.ThreatListDescriptor) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + if (cached_has_bits & 0x00000001u) { + _this->_impl_.threat_type_ = from._impl_.threat_type_; + } + if (cached_has_bits & 0x00000002u) { + _this->_impl_.platform_type_ = from._impl_.platform_type_; + } + if (cached_has_bits & 0x00000004u) { + _this->_impl_.threat_entry_type_ = from._impl_.threat_entry_type_; + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + } + _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); +} + +void ThreatListDescriptor::CopyFrom(const ThreatListDescriptor& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:mozilla.safebrowsing.ThreatListDescriptor) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ThreatListDescriptor::IsInitialized() const { + return true; +} + +void ThreatListDescriptor::InternalSwap(ThreatListDescriptor* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(ThreatListDescriptor, _impl_.threat_entry_type_) + + sizeof(ThreatListDescriptor::_impl_.threat_entry_type_) + - PROTOBUF_FIELD_OFFSET(ThreatListDescriptor, _impl_.threat_type_)>( + reinterpret_cast<char*>(&_impl_.threat_type_), + reinterpret_cast<char*>(&other->_impl_.threat_type_)); +} + +std::string ThreatListDescriptor::GetTypeName() const { + return "mozilla.safebrowsing.ThreatListDescriptor"; +} + + +// =================================================================== + +class ListThreatListsResponse::_Internal { + public: +}; + +ListThreatListsResponse::ListThreatListsResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:mozilla.safebrowsing.ListThreatListsResponse) +} +ListThreatListsResponse::ListThreatListsResponse(const ListThreatListsResponse& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite() { + ListThreatListsResponse* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.threat_lists_){from._impl_.threat_lists_} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); + // @@protoc_insertion_point(copy_constructor:mozilla.safebrowsing.ListThreatListsResponse) +} + +inline void ListThreatListsResponse::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.threat_lists_){arena} + , /*decltype(_impl_._cached_size_)*/{} + }; +} + +ListThreatListsResponse::~ListThreatListsResponse() { + // @@protoc_insertion_point(destructor:mozilla.safebrowsing.ListThreatListsResponse) + if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void ListThreatListsResponse::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.threat_lists_.~RepeatedPtrField(); +} + +void ListThreatListsResponse::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void ListThreatListsResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:mozilla.safebrowsing.ListThreatListsResponse) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.threat_lists_.Clear(); + _internal_metadata_.Clear<std::string>(); +} + +const char* ListThreatListsResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // repeated .mozilla.safebrowsing.ThreatListDescriptor threat_lists = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_threat_lists(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr)); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<std::string>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* ListThreatListsResponse::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:mozilla.safebrowsing.ListThreatListsResponse) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // repeated .mozilla.safebrowsing.ThreatListDescriptor threat_lists = 1; + for (unsigned i = 0, + n = static_cast<unsigned>(this->_internal_threat_lists_size()); i < n; i++) { + const auto& repfield = this->_internal_threat_lists(i); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(1, repfield, repfield.GetCachedSize(), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:mozilla.safebrowsing.ListThreatListsResponse) + return target; +} + +size_t ListThreatListsResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:mozilla.safebrowsing.ListThreatListsResponse) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated .mozilla.safebrowsing.ThreatListDescriptor threat_lists = 1; + total_size += 1UL * this->_internal_threat_lists_size(); + for (const auto& msg : this->_impl_.threat_lists_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::_pbi::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void ListThreatListsResponse::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::_pbi::DownCast<const ListThreatListsResponse*>( + &from)); +} + +void ListThreatListsResponse::MergeFrom(const ListThreatListsResponse& from) { + ListThreatListsResponse* const _this = this; + // @@protoc_insertion_point(class_specific_merge_from_start:mozilla.safebrowsing.ListThreatListsResponse) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _this->_impl_.threat_lists_.MergeFrom(from._impl_.threat_lists_); + _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); +} + +void ListThreatListsResponse::CopyFrom(const ListThreatListsResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:mozilla.safebrowsing.ListThreatListsResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ListThreatListsResponse::IsInitialized() const { + return true; +} + +void ListThreatListsResponse::InternalSwap(ListThreatListsResponse* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + _impl_.threat_lists_.InternalSwap(&other->_impl_.threat_lists_); +} + +std::string ListThreatListsResponse::GetTypeName() const { + return "mozilla.safebrowsing.ListThreatListsResponse"; +} + + +// =================================================================== + +class Duration::_Internal { + public: + using HasBits = decltype(std::declval<Duration>()._impl_._has_bits_); + static void set_has_seconds(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_nanos(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } +}; + +Duration::Duration(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:mozilla.safebrowsing.Duration) +} +Duration::Duration(const Duration& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite() { + Duration* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_._has_bits_){from._impl_._has_bits_} + , /*decltype(_impl_._cached_size_)*/{} + , decltype(_impl_.seconds_){} + , decltype(_impl_.nanos_){}}; + + _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); + ::memcpy(&_impl_.seconds_, &from._impl_.seconds_, + static_cast<size_t>(reinterpret_cast<char*>(&_impl_.nanos_) - + reinterpret_cast<char*>(&_impl_.seconds_)) + sizeof(_impl_.nanos_)); + // @@protoc_insertion_point(copy_constructor:mozilla.safebrowsing.Duration) +} + +inline void Duration::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_._has_bits_){} + , /*decltype(_impl_._cached_size_)*/{} + , decltype(_impl_.seconds_){int64_t{0}} + , decltype(_impl_.nanos_){0} + }; +} + +Duration::~Duration() { + // @@protoc_insertion_point(destructor:mozilla.safebrowsing.Duration) + if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void Duration::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); +} + +void Duration::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void Duration::Clear() { +// @@protoc_insertion_point(message_clear_start:mozilla.safebrowsing.Duration) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + ::memset(&_impl_.seconds_, 0, static_cast<size_t>( + reinterpret_cast<char*>(&_impl_.nanos_) - + reinterpret_cast<char*>(&_impl_.seconds_)) + sizeof(_impl_.nanos_)); + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<std::string>(); +} + +const char* Duration::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional int64 seconds = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) { + _Internal::set_has_seconds(&has_bits); + _impl_.seconds_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional int32 nanos = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) { + _Internal::set_has_nanos(&has_bits); + _impl_.nanos_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<std::string>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _impl_._has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* Duration::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:mozilla.safebrowsing.Duration) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + // optional int64 seconds = 1; + if (cached_has_bits & 0x00000001u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt64ToArray(1, this->_internal_seconds(), target); + } + + // optional int32 nanos = 2; + if (cached_has_bits & 0x00000002u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_nanos(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:mozilla.safebrowsing.Duration) + return target; +} + +size_t Duration::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:mozilla.safebrowsing.Duration) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + // optional int64 seconds = 1; + if (cached_has_bits & 0x00000001u) { + total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_seconds()); + } + + // optional int32 nanos = 2; + if (cached_has_bits & 0x00000002u) { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_nanos()); + } + + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::_pbi::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void Duration::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::_pbi::DownCast<const Duration*>( + &from)); +} + +void Duration::MergeFrom(const Duration& from) { + Duration* const _this = this; + // @@protoc_insertion_point(class_specific_merge_from_start:mozilla.safebrowsing.Duration) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + _this->_impl_.seconds_ = from._impl_.seconds_; + } + if (cached_has_bits & 0x00000002u) { + _this->_impl_.nanos_ = from._impl_.nanos_; + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + } + _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_); +} + +void Duration::CopyFrom(const Duration& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:mozilla.safebrowsing.Duration) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Duration::IsInitialized() const { + return true; +} + +void Duration::InternalSwap(Duration* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(Duration, _impl_.nanos_) + + sizeof(Duration::_impl_.nanos_) + - PROTOBUF_FIELD_OFFSET(Duration, _impl_.seconds_)>( + reinterpret_cast<char*>(&_impl_.seconds_), + reinterpret_cast<char*>(&other->_impl_.seconds_)); +} + +std::string Duration::GetTypeName() const { + return "mozilla.safebrowsing.Duration"; +} + + +// @@protoc_insertion_point(namespace_scope) +} // namespace safebrowsing +} // namespace mozilla +PROTOBUF_NAMESPACE_OPEN +template<> PROTOBUF_NOINLINE ::mozilla::safebrowsing::ThreatInfo* +Arena::CreateMaybeMessage< ::mozilla::safebrowsing::ThreatInfo >(Arena* arena) { + return Arena::CreateMessageInternal< ::mozilla::safebrowsing::ThreatInfo >(arena); +} +template<> PROTOBUF_NOINLINE ::mozilla::safebrowsing::ThreatMatch* +Arena::CreateMaybeMessage< ::mozilla::safebrowsing::ThreatMatch >(Arena* arena) { + return Arena::CreateMessageInternal< ::mozilla::safebrowsing::ThreatMatch >(arena); +} +template<> PROTOBUF_NOINLINE ::mozilla::safebrowsing::FindThreatMatchesRequest* +Arena::CreateMaybeMessage< ::mozilla::safebrowsing::FindThreatMatchesRequest >(Arena* arena) { + return Arena::CreateMessageInternal< ::mozilla::safebrowsing::FindThreatMatchesRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::mozilla::safebrowsing::FindThreatMatchesResponse* +Arena::CreateMaybeMessage< ::mozilla::safebrowsing::FindThreatMatchesResponse >(Arena* arena) { + return Arena::CreateMessageInternal< ::mozilla::safebrowsing::FindThreatMatchesResponse >(arena); +} +template<> PROTOBUF_NOINLINE ::mozilla::safebrowsing::FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints* +Arena::CreateMaybeMessage< ::mozilla::safebrowsing::FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints >(Arena* arena) { + return Arena::CreateMessageInternal< ::mozilla::safebrowsing::FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints >(arena); +} +template<> PROTOBUF_NOINLINE ::mozilla::safebrowsing::FetchThreatListUpdatesRequest_ListUpdateRequest* +Arena::CreateMaybeMessage< ::mozilla::safebrowsing::FetchThreatListUpdatesRequest_ListUpdateRequest >(Arena* arena) { + return Arena::CreateMessageInternal< ::mozilla::safebrowsing::FetchThreatListUpdatesRequest_ListUpdateRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::mozilla::safebrowsing::FetchThreatListUpdatesRequest* +Arena::CreateMaybeMessage< ::mozilla::safebrowsing::FetchThreatListUpdatesRequest >(Arena* arena) { + return Arena::CreateMessageInternal< ::mozilla::safebrowsing::FetchThreatListUpdatesRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::mozilla::safebrowsing::FetchThreatListUpdatesResponse_ListUpdateResponse* +Arena::CreateMaybeMessage< ::mozilla::safebrowsing::FetchThreatListUpdatesResponse_ListUpdateResponse >(Arena* arena) { + return Arena::CreateMessageInternal< ::mozilla::safebrowsing::FetchThreatListUpdatesResponse_ListUpdateResponse >(arena); +} +template<> PROTOBUF_NOINLINE ::mozilla::safebrowsing::FetchThreatListUpdatesResponse* +Arena::CreateMaybeMessage< ::mozilla::safebrowsing::FetchThreatListUpdatesResponse >(Arena* arena) { + return Arena::CreateMessageInternal< ::mozilla::safebrowsing::FetchThreatListUpdatesResponse >(arena); +} +template<> PROTOBUF_NOINLINE ::mozilla::safebrowsing::FindFullHashesRequest* +Arena::CreateMaybeMessage< ::mozilla::safebrowsing::FindFullHashesRequest >(Arena* arena) { + return Arena::CreateMessageInternal< ::mozilla::safebrowsing::FindFullHashesRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::mozilla::safebrowsing::FindFullHashesResponse* +Arena::CreateMaybeMessage< ::mozilla::safebrowsing::FindFullHashesResponse >(Arena* arena) { + return Arena::CreateMessageInternal< ::mozilla::safebrowsing::FindFullHashesResponse >(arena); +} +template<> PROTOBUF_NOINLINE ::mozilla::safebrowsing::ThreatHit_ThreatSource* +Arena::CreateMaybeMessage< ::mozilla::safebrowsing::ThreatHit_ThreatSource >(Arena* arena) { + return Arena::CreateMessageInternal< ::mozilla::safebrowsing::ThreatHit_ThreatSource >(arena); +} +template<> PROTOBUF_NOINLINE ::mozilla::safebrowsing::ThreatHit_UserInfo* +Arena::CreateMaybeMessage< ::mozilla::safebrowsing::ThreatHit_UserInfo >(Arena* arena) { + return Arena::CreateMessageInternal< ::mozilla::safebrowsing::ThreatHit_UserInfo >(arena); +} +template<> PROTOBUF_NOINLINE ::mozilla::safebrowsing::ThreatHit* +Arena::CreateMaybeMessage< ::mozilla::safebrowsing::ThreatHit >(Arena* arena) { + return Arena::CreateMessageInternal< ::mozilla::safebrowsing::ThreatHit >(arena); +} +template<> PROTOBUF_NOINLINE ::mozilla::safebrowsing::ClientInfo* +Arena::CreateMaybeMessage< ::mozilla::safebrowsing::ClientInfo >(Arena* arena) { + return Arena::CreateMessageInternal< ::mozilla::safebrowsing::ClientInfo >(arena); +} +template<> PROTOBUF_NOINLINE ::mozilla::safebrowsing::ChromeClientInfo* +Arena::CreateMaybeMessage< ::mozilla::safebrowsing::ChromeClientInfo >(Arena* arena) { + return Arena::CreateMessageInternal< ::mozilla::safebrowsing::ChromeClientInfo >(arena); +} +template<> PROTOBUF_NOINLINE ::mozilla::safebrowsing::Checksum* +Arena::CreateMaybeMessage< ::mozilla::safebrowsing::Checksum >(Arena* arena) { + return Arena::CreateMessageInternal< ::mozilla::safebrowsing::Checksum >(arena); +} +template<> PROTOBUF_NOINLINE ::mozilla::safebrowsing::ThreatEntry* +Arena::CreateMaybeMessage< ::mozilla::safebrowsing::ThreatEntry >(Arena* arena) { + return Arena::CreateMessageInternal< ::mozilla::safebrowsing::ThreatEntry >(arena); +} +template<> PROTOBUF_NOINLINE ::mozilla::safebrowsing::ThreatEntrySet* +Arena::CreateMaybeMessage< ::mozilla::safebrowsing::ThreatEntrySet >(Arena* arena) { + return Arena::CreateMessageInternal< ::mozilla::safebrowsing::ThreatEntrySet >(arena); +} +template<> PROTOBUF_NOINLINE ::mozilla::safebrowsing::RawIndices* +Arena::CreateMaybeMessage< ::mozilla::safebrowsing::RawIndices >(Arena* arena) { + return Arena::CreateMessageInternal< ::mozilla::safebrowsing::RawIndices >(arena); +} +template<> PROTOBUF_NOINLINE ::mozilla::safebrowsing::RawHashes* +Arena::CreateMaybeMessage< ::mozilla::safebrowsing::RawHashes >(Arena* arena) { + return Arena::CreateMessageInternal< ::mozilla::safebrowsing::RawHashes >(arena); +} +template<> PROTOBUF_NOINLINE ::mozilla::safebrowsing::RiceDeltaEncoding* +Arena::CreateMaybeMessage< ::mozilla::safebrowsing::RiceDeltaEncoding >(Arena* arena) { + return Arena::CreateMessageInternal< ::mozilla::safebrowsing::RiceDeltaEncoding >(arena); +} +template<> PROTOBUF_NOINLINE ::mozilla::safebrowsing::ThreatEntryMetadata_MetadataEntry* +Arena::CreateMaybeMessage< ::mozilla::safebrowsing::ThreatEntryMetadata_MetadataEntry >(Arena* arena) { + return Arena::CreateMessageInternal< ::mozilla::safebrowsing::ThreatEntryMetadata_MetadataEntry >(arena); +} +template<> PROTOBUF_NOINLINE ::mozilla::safebrowsing::ThreatEntryMetadata* +Arena::CreateMaybeMessage< ::mozilla::safebrowsing::ThreatEntryMetadata >(Arena* arena) { + return Arena::CreateMessageInternal< ::mozilla::safebrowsing::ThreatEntryMetadata >(arena); +} +template<> PROTOBUF_NOINLINE ::mozilla::safebrowsing::ThreatListDescriptor* +Arena::CreateMaybeMessage< ::mozilla::safebrowsing::ThreatListDescriptor >(Arena* arena) { + return Arena::CreateMessageInternal< ::mozilla::safebrowsing::ThreatListDescriptor >(arena); +} +template<> PROTOBUF_NOINLINE ::mozilla::safebrowsing::ListThreatListsResponse* +Arena::CreateMaybeMessage< ::mozilla::safebrowsing::ListThreatListsResponse >(Arena* arena) { + return Arena::CreateMessageInternal< ::mozilla::safebrowsing::ListThreatListsResponse >(arena); +} +template<> PROTOBUF_NOINLINE ::mozilla::safebrowsing::Duration* +Arena::CreateMaybeMessage< ::mozilla::safebrowsing::Duration >(Arena* arena) { + return Arena::CreateMessageInternal< ::mozilla::safebrowsing::Duration >(arena); +} +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) +#include <google/protobuf/port_undef.inc> diff --git a/toolkit/components/url-classifier/chromium/safebrowsing.pb.h b/toolkit/components/url-classifier/chromium/safebrowsing.pb.h new file mode 100644 index 0000000000..194b2c410f --- /dev/null +++ b/toolkit/components/url-classifier/chromium/safebrowsing.pb.h @@ -0,0 +1,10010 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: safebrowsing.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_safebrowsing_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_safebrowsing_2eproto + +#include <limits> +#include <string> + +#include <google/protobuf/port_def.inc> +#if PROTOBUF_VERSION < 3021000 +#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 3021006 < 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 <google/protobuf/port_undef.inc> +#include <google/protobuf/io/coded_stream.h> +#include <google/protobuf/arena.h> +#include <google/protobuf/arenastring.h> +#include <google/protobuf/generated_message_util.h> +#include <google/protobuf/metadata_lite.h> +#include <google/protobuf/message_lite.h> +#include <google/protobuf/repeated_field.h> // IWYU pragma: export +#include <google/protobuf/extension_set.h> // IWYU pragma: export +#include <google/protobuf/generated_enum_util.h> +// @@protoc_insertion_point(includes) +#include <google/protobuf/port_def.inc> +#define PROTOBUF_INTERNAL_EXPORT_safebrowsing_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_safebrowsing_2eproto { + static const uint32_t offsets[]; +}; +namespace mozilla { +namespace safebrowsing { +class Checksum; +struct ChecksumDefaultTypeInternal; +extern ChecksumDefaultTypeInternal _Checksum_default_instance_; +class ChromeClientInfo; +struct ChromeClientInfoDefaultTypeInternal; +extern ChromeClientInfoDefaultTypeInternal _ChromeClientInfo_default_instance_; +class ClientInfo; +struct ClientInfoDefaultTypeInternal; +extern ClientInfoDefaultTypeInternal _ClientInfo_default_instance_; +class Duration; +struct DurationDefaultTypeInternal; +extern DurationDefaultTypeInternal _Duration_default_instance_; +class FetchThreatListUpdatesRequest; +struct FetchThreatListUpdatesRequestDefaultTypeInternal; +extern FetchThreatListUpdatesRequestDefaultTypeInternal _FetchThreatListUpdatesRequest_default_instance_; +class FetchThreatListUpdatesRequest_ListUpdateRequest; +struct FetchThreatListUpdatesRequest_ListUpdateRequestDefaultTypeInternal; +extern FetchThreatListUpdatesRequest_ListUpdateRequestDefaultTypeInternal _FetchThreatListUpdatesRequest_ListUpdateRequest_default_instance_; +class FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints; +struct FetchThreatListUpdatesRequest_ListUpdateRequest_ConstraintsDefaultTypeInternal; +extern FetchThreatListUpdatesRequest_ListUpdateRequest_ConstraintsDefaultTypeInternal _FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints_default_instance_; +class FetchThreatListUpdatesResponse; +struct FetchThreatListUpdatesResponseDefaultTypeInternal; +extern FetchThreatListUpdatesResponseDefaultTypeInternal _FetchThreatListUpdatesResponse_default_instance_; +class FetchThreatListUpdatesResponse_ListUpdateResponse; +struct FetchThreatListUpdatesResponse_ListUpdateResponseDefaultTypeInternal; +extern FetchThreatListUpdatesResponse_ListUpdateResponseDefaultTypeInternal _FetchThreatListUpdatesResponse_ListUpdateResponse_default_instance_; +class FindFullHashesRequest; +struct FindFullHashesRequestDefaultTypeInternal; +extern FindFullHashesRequestDefaultTypeInternal _FindFullHashesRequest_default_instance_; +class FindFullHashesResponse; +struct FindFullHashesResponseDefaultTypeInternal; +extern FindFullHashesResponseDefaultTypeInternal _FindFullHashesResponse_default_instance_; +class FindThreatMatchesRequest; +struct FindThreatMatchesRequestDefaultTypeInternal; +extern FindThreatMatchesRequestDefaultTypeInternal _FindThreatMatchesRequest_default_instance_; +class FindThreatMatchesResponse; +struct FindThreatMatchesResponseDefaultTypeInternal; +extern FindThreatMatchesResponseDefaultTypeInternal _FindThreatMatchesResponse_default_instance_; +class ListThreatListsResponse; +struct ListThreatListsResponseDefaultTypeInternal; +extern ListThreatListsResponseDefaultTypeInternal _ListThreatListsResponse_default_instance_; +class RawHashes; +struct RawHashesDefaultTypeInternal; +extern RawHashesDefaultTypeInternal _RawHashes_default_instance_; +class RawIndices; +struct RawIndicesDefaultTypeInternal; +extern RawIndicesDefaultTypeInternal _RawIndices_default_instance_; +class RiceDeltaEncoding; +struct RiceDeltaEncodingDefaultTypeInternal; +extern RiceDeltaEncodingDefaultTypeInternal _RiceDeltaEncoding_default_instance_; +class ThreatEntry; +struct ThreatEntryDefaultTypeInternal; +extern ThreatEntryDefaultTypeInternal _ThreatEntry_default_instance_; +class ThreatEntryMetadata; +struct ThreatEntryMetadataDefaultTypeInternal; +extern ThreatEntryMetadataDefaultTypeInternal _ThreatEntryMetadata_default_instance_; +class ThreatEntryMetadata_MetadataEntry; +struct ThreatEntryMetadata_MetadataEntryDefaultTypeInternal; +extern ThreatEntryMetadata_MetadataEntryDefaultTypeInternal _ThreatEntryMetadata_MetadataEntry_default_instance_; +class ThreatEntrySet; +struct ThreatEntrySetDefaultTypeInternal; +extern ThreatEntrySetDefaultTypeInternal _ThreatEntrySet_default_instance_; +class ThreatHit; +struct ThreatHitDefaultTypeInternal; +extern ThreatHitDefaultTypeInternal _ThreatHit_default_instance_; +class ThreatHit_ThreatSource; +struct ThreatHit_ThreatSourceDefaultTypeInternal; +extern ThreatHit_ThreatSourceDefaultTypeInternal _ThreatHit_ThreatSource_default_instance_; +class ThreatHit_UserInfo; +struct ThreatHit_UserInfoDefaultTypeInternal; +extern ThreatHit_UserInfoDefaultTypeInternal _ThreatHit_UserInfo_default_instance_; +class ThreatInfo; +struct ThreatInfoDefaultTypeInternal; +extern ThreatInfoDefaultTypeInternal _ThreatInfo_default_instance_; +class ThreatListDescriptor; +struct ThreatListDescriptorDefaultTypeInternal; +extern ThreatListDescriptorDefaultTypeInternal _ThreatListDescriptor_default_instance_; +class ThreatMatch; +struct ThreatMatchDefaultTypeInternal; +extern ThreatMatchDefaultTypeInternal _ThreatMatch_default_instance_; +} // namespace safebrowsing +} // namespace mozilla +PROTOBUF_NAMESPACE_OPEN +template<> ::mozilla::safebrowsing::Checksum* Arena::CreateMaybeMessage<::mozilla::safebrowsing::Checksum>(Arena*); +template<> ::mozilla::safebrowsing::ChromeClientInfo* Arena::CreateMaybeMessage<::mozilla::safebrowsing::ChromeClientInfo>(Arena*); +template<> ::mozilla::safebrowsing::ClientInfo* Arena::CreateMaybeMessage<::mozilla::safebrowsing::ClientInfo>(Arena*); +template<> ::mozilla::safebrowsing::Duration* Arena::CreateMaybeMessage<::mozilla::safebrowsing::Duration>(Arena*); +template<> ::mozilla::safebrowsing::FetchThreatListUpdatesRequest* Arena::CreateMaybeMessage<::mozilla::safebrowsing::FetchThreatListUpdatesRequest>(Arena*); +template<> ::mozilla::safebrowsing::FetchThreatListUpdatesRequest_ListUpdateRequest* Arena::CreateMaybeMessage<::mozilla::safebrowsing::FetchThreatListUpdatesRequest_ListUpdateRequest>(Arena*); +template<> ::mozilla::safebrowsing::FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints* Arena::CreateMaybeMessage<::mozilla::safebrowsing::FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints>(Arena*); +template<> ::mozilla::safebrowsing::FetchThreatListUpdatesResponse* Arena::CreateMaybeMessage<::mozilla::safebrowsing::FetchThreatListUpdatesResponse>(Arena*); +template<> ::mozilla::safebrowsing::FetchThreatListUpdatesResponse_ListUpdateResponse* Arena::CreateMaybeMessage<::mozilla::safebrowsing::FetchThreatListUpdatesResponse_ListUpdateResponse>(Arena*); +template<> ::mozilla::safebrowsing::FindFullHashesRequest* Arena::CreateMaybeMessage<::mozilla::safebrowsing::FindFullHashesRequest>(Arena*); +template<> ::mozilla::safebrowsing::FindFullHashesResponse* Arena::CreateMaybeMessage<::mozilla::safebrowsing::FindFullHashesResponse>(Arena*); +template<> ::mozilla::safebrowsing::FindThreatMatchesRequest* Arena::CreateMaybeMessage<::mozilla::safebrowsing::FindThreatMatchesRequest>(Arena*); +template<> ::mozilla::safebrowsing::FindThreatMatchesResponse* Arena::CreateMaybeMessage<::mozilla::safebrowsing::FindThreatMatchesResponse>(Arena*); +template<> ::mozilla::safebrowsing::ListThreatListsResponse* Arena::CreateMaybeMessage<::mozilla::safebrowsing::ListThreatListsResponse>(Arena*); +template<> ::mozilla::safebrowsing::RawHashes* Arena::CreateMaybeMessage<::mozilla::safebrowsing::RawHashes>(Arena*); +template<> ::mozilla::safebrowsing::RawIndices* Arena::CreateMaybeMessage<::mozilla::safebrowsing::RawIndices>(Arena*); +template<> ::mozilla::safebrowsing::RiceDeltaEncoding* Arena::CreateMaybeMessage<::mozilla::safebrowsing::RiceDeltaEncoding>(Arena*); +template<> ::mozilla::safebrowsing::ThreatEntry* Arena::CreateMaybeMessage<::mozilla::safebrowsing::ThreatEntry>(Arena*); +template<> ::mozilla::safebrowsing::ThreatEntryMetadata* Arena::CreateMaybeMessage<::mozilla::safebrowsing::ThreatEntryMetadata>(Arena*); +template<> ::mozilla::safebrowsing::ThreatEntryMetadata_MetadataEntry* Arena::CreateMaybeMessage<::mozilla::safebrowsing::ThreatEntryMetadata_MetadataEntry>(Arena*); +template<> ::mozilla::safebrowsing::ThreatEntrySet* Arena::CreateMaybeMessage<::mozilla::safebrowsing::ThreatEntrySet>(Arena*); +template<> ::mozilla::safebrowsing::ThreatHit* Arena::CreateMaybeMessage<::mozilla::safebrowsing::ThreatHit>(Arena*); +template<> ::mozilla::safebrowsing::ThreatHit_ThreatSource* Arena::CreateMaybeMessage<::mozilla::safebrowsing::ThreatHit_ThreatSource>(Arena*); +template<> ::mozilla::safebrowsing::ThreatHit_UserInfo* Arena::CreateMaybeMessage<::mozilla::safebrowsing::ThreatHit_UserInfo>(Arena*); +template<> ::mozilla::safebrowsing::ThreatInfo* Arena::CreateMaybeMessage<::mozilla::safebrowsing::ThreatInfo>(Arena*); +template<> ::mozilla::safebrowsing::ThreatListDescriptor* Arena::CreateMaybeMessage<::mozilla::safebrowsing::ThreatListDescriptor>(Arena*); +template<> ::mozilla::safebrowsing::ThreatMatch* Arena::CreateMaybeMessage<::mozilla::safebrowsing::ThreatMatch>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace mozilla { +namespace safebrowsing { + +enum FetchThreatListUpdatesResponse_ListUpdateResponse_ResponseType : int { + FetchThreatListUpdatesResponse_ListUpdateResponse_ResponseType_RESPONSE_TYPE_UNSPECIFIED = 0, + FetchThreatListUpdatesResponse_ListUpdateResponse_ResponseType_PARTIAL_UPDATE = 1, + FetchThreatListUpdatesResponse_ListUpdateResponse_ResponseType_FULL_UPDATE = 2 +}; +bool FetchThreatListUpdatesResponse_ListUpdateResponse_ResponseType_IsValid(int value); +constexpr FetchThreatListUpdatesResponse_ListUpdateResponse_ResponseType FetchThreatListUpdatesResponse_ListUpdateResponse_ResponseType_ResponseType_MIN = FetchThreatListUpdatesResponse_ListUpdateResponse_ResponseType_RESPONSE_TYPE_UNSPECIFIED; +constexpr FetchThreatListUpdatesResponse_ListUpdateResponse_ResponseType FetchThreatListUpdatesResponse_ListUpdateResponse_ResponseType_ResponseType_MAX = FetchThreatListUpdatesResponse_ListUpdateResponse_ResponseType_FULL_UPDATE; +constexpr int FetchThreatListUpdatesResponse_ListUpdateResponse_ResponseType_ResponseType_ARRAYSIZE = FetchThreatListUpdatesResponse_ListUpdateResponse_ResponseType_ResponseType_MAX + 1; + +const std::string& FetchThreatListUpdatesResponse_ListUpdateResponse_ResponseType_Name(FetchThreatListUpdatesResponse_ListUpdateResponse_ResponseType value); +template<typename T> +inline const std::string& FetchThreatListUpdatesResponse_ListUpdateResponse_ResponseType_Name(T enum_t_value) { + static_assert(::std::is_same<T, FetchThreatListUpdatesResponse_ListUpdateResponse_ResponseType>::value || + ::std::is_integral<T>::value, + "Incorrect type passed to function FetchThreatListUpdatesResponse_ListUpdateResponse_ResponseType_Name."); + return FetchThreatListUpdatesResponse_ListUpdateResponse_ResponseType_Name(static_cast<FetchThreatListUpdatesResponse_ListUpdateResponse_ResponseType>(enum_t_value)); +} +bool FetchThreatListUpdatesResponse_ListUpdateResponse_ResponseType_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, FetchThreatListUpdatesResponse_ListUpdateResponse_ResponseType* value); +enum ThreatHit_ThreatSourceType : int { + ThreatHit_ThreatSourceType_THREAT_SOURCE_TYPE_UNSPECIFIED = 0, + ThreatHit_ThreatSourceType_MATCHING_URL = 1, + ThreatHit_ThreatSourceType_TAB_URL = 2, + ThreatHit_ThreatSourceType_TAB_REDIRECT = 3, + ThreatHit_ThreatSourceType_TAB_RESOURCE = 4 +}; +bool ThreatHit_ThreatSourceType_IsValid(int value); +constexpr ThreatHit_ThreatSourceType ThreatHit_ThreatSourceType_ThreatSourceType_MIN = ThreatHit_ThreatSourceType_THREAT_SOURCE_TYPE_UNSPECIFIED; +constexpr ThreatHit_ThreatSourceType ThreatHit_ThreatSourceType_ThreatSourceType_MAX = ThreatHit_ThreatSourceType_TAB_RESOURCE; +constexpr int ThreatHit_ThreatSourceType_ThreatSourceType_ARRAYSIZE = ThreatHit_ThreatSourceType_ThreatSourceType_MAX + 1; + +const std::string& ThreatHit_ThreatSourceType_Name(ThreatHit_ThreatSourceType value); +template<typename T> +inline const std::string& ThreatHit_ThreatSourceType_Name(T enum_t_value) { + static_assert(::std::is_same<T, ThreatHit_ThreatSourceType>::value || + ::std::is_integral<T>::value, + "Incorrect type passed to function ThreatHit_ThreatSourceType_Name."); + return ThreatHit_ThreatSourceType_Name(static_cast<ThreatHit_ThreatSourceType>(enum_t_value)); +} +bool ThreatHit_ThreatSourceType_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, ThreatHit_ThreatSourceType* value); +enum ChromeClientInfo_SafeBrowsingReportingPopulation : int { + ChromeClientInfo_SafeBrowsingReportingPopulation_UNSPECIFIED = 0, + ChromeClientInfo_SafeBrowsingReportingPopulation_OPT_OUT = 1, + ChromeClientInfo_SafeBrowsingReportingPopulation_EXTENDED = 2, + ChromeClientInfo_SafeBrowsingReportingPopulation_SCOUT = 3 +}; +bool ChromeClientInfo_SafeBrowsingReportingPopulation_IsValid(int value); +constexpr ChromeClientInfo_SafeBrowsingReportingPopulation ChromeClientInfo_SafeBrowsingReportingPopulation_SafeBrowsingReportingPopulation_MIN = ChromeClientInfo_SafeBrowsingReportingPopulation_UNSPECIFIED; +constexpr ChromeClientInfo_SafeBrowsingReportingPopulation ChromeClientInfo_SafeBrowsingReportingPopulation_SafeBrowsingReportingPopulation_MAX = ChromeClientInfo_SafeBrowsingReportingPopulation_SCOUT; +constexpr int ChromeClientInfo_SafeBrowsingReportingPopulation_SafeBrowsingReportingPopulation_ARRAYSIZE = ChromeClientInfo_SafeBrowsingReportingPopulation_SafeBrowsingReportingPopulation_MAX + 1; + +const std::string& ChromeClientInfo_SafeBrowsingReportingPopulation_Name(ChromeClientInfo_SafeBrowsingReportingPopulation value); +template<typename T> +inline const std::string& ChromeClientInfo_SafeBrowsingReportingPopulation_Name(T enum_t_value) { + static_assert(::std::is_same<T, ChromeClientInfo_SafeBrowsingReportingPopulation>::value || + ::std::is_integral<T>::value, + "Incorrect type passed to function ChromeClientInfo_SafeBrowsingReportingPopulation_Name."); + return ChromeClientInfo_SafeBrowsingReportingPopulation_Name(static_cast<ChromeClientInfo_SafeBrowsingReportingPopulation>(enum_t_value)); +} +bool ChromeClientInfo_SafeBrowsingReportingPopulation_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, ChromeClientInfo_SafeBrowsingReportingPopulation* value); +enum ThreatType : int { + THREAT_TYPE_UNSPECIFIED = 0, + MALWARE_THREAT = 1, + SOCIAL_ENGINEERING_PUBLIC = 2, + UNWANTED_SOFTWARE = 3, + POTENTIALLY_HARMFUL_APPLICATION = 4, + SOCIAL_ENGINEERING = 5, + API_ABUSE = 6, + MALICIOUS_BINARY = 7, + CSD_WHITELIST = 8, + CSD_DOWNLOAD_WHITELIST = 9, + CLIENT_INCIDENT = 10, + SUBRESOURCE_FILTER = 13 +}; +bool ThreatType_IsValid(int value); +constexpr ThreatType ThreatType_MIN = THREAT_TYPE_UNSPECIFIED; +constexpr ThreatType ThreatType_MAX = SUBRESOURCE_FILTER; +constexpr int ThreatType_ARRAYSIZE = ThreatType_MAX + 1; + +const std::string& ThreatType_Name(ThreatType value); +template<typename T> +inline const std::string& ThreatType_Name(T enum_t_value) { + static_assert(::std::is_same<T, ThreatType>::value || + ::std::is_integral<T>::value, + "Incorrect type passed to function ThreatType_Name."); + return ThreatType_Name(static_cast<ThreatType>(enum_t_value)); +} +bool ThreatType_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, ThreatType* value); +enum PlatformType : int { + PLATFORM_TYPE_UNSPECIFIED = 0, + WINDOWS_PLATFORM = 1, + LINUX_PLATFORM = 2, + ANDROID_PLATFORM = 3, + OSX_PLATFORM = 4, + IOS_PLATFORM = 5, + ANY_PLATFORM = 6, + ALL_PLATFORMS = 7, + CHROME_PLATFORM = 8 +}; +bool PlatformType_IsValid(int value); +constexpr PlatformType PlatformType_MIN = PLATFORM_TYPE_UNSPECIFIED; +constexpr PlatformType PlatformType_MAX = CHROME_PLATFORM; +constexpr int PlatformType_ARRAYSIZE = PlatformType_MAX + 1; + +const std::string& PlatformType_Name(PlatformType value); +template<typename T> +inline const std::string& PlatformType_Name(T enum_t_value) { + static_assert(::std::is_same<T, PlatformType>::value || + ::std::is_integral<T>::value, + "Incorrect type passed to function PlatformType_Name."); + return PlatformType_Name(static_cast<PlatformType>(enum_t_value)); +} +bool PlatformType_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, PlatformType* value); +enum CompressionType : int { + COMPRESSION_TYPE_UNSPECIFIED = 0, + RAW = 1, + RICE = 2 +}; +bool CompressionType_IsValid(int value); +constexpr CompressionType CompressionType_MIN = COMPRESSION_TYPE_UNSPECIFIED; +constexpr CompressionType CompressionType_MAX = RICE; +constexpr int CompressionType_ARRAYSIZE = CompressionType_MAX + 1; + +const std::string& CompressionType_Name(CompressionType value); +template<typename T> +inline const std::string& CompressionType_Name(T enum_t_value) { + static_assert(::std::is_same<T, CompressionType>::value || + ::std::is_integral<T>::value, + "Incorrect type passed to function CompressionType_Name."); + return CompressionType_Name(static_cast<CompressionType>(enum_t_value)); +} +bool CompressionType_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, CompressionType* value); +enum ThreatEntryType : int { + THREAT_ENTRY_TYPE_UNSPECIFIED = 0, + URL = 1, + EXECUTABLE = 2, + IP_RANGE = 3, + CHROME_EXTENSION = 4, + FILENAME = 5, + CERT = 6 +}; +bool ThreatEntryType_IsValid(int value); +constexpr ThreatEntryType ThreatEntryType_MIN = THREAT_ENTRY_TYPE_UNSPECIFIED; +constexpr ThreatEntryType ThreatEntryType_MAX = CERT; +constexpr int ThreatEntryType_ARRAYSIZE = ThreatEntryType_MAX + 1; + +const std::string& ThreatEntryType_Name(ThreatEntryType value); +template<typename T> +inline const std::string& ThreatEntryType_Name(T enum_t_value) { + static_assert(::std::is_same<T, ThreatEntryType>::value || + ::std::is_integral<T>::value, + "Incorrect type passed to function ThreatEntryType_Name."); + return ThreatEntryType_Name(static_cast<ThreatEntryType>(enum_t_value)); +} +bool ThreatEntryType_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, ThreatEntryType* value); +// =================================================================== + +class ThreatInfo final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:mozilla.safebrowsing.ThreatInfo) */ { + public: + inline ThreatInfo() : ThreatInfo(nullptr) {} + ~ThreatInfo() override; + explicit PROTOBUF_CONSTEXPR ThreatInfo(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ThreatInfo(const ThreatInfo& from); + ThreatInfo(ThreatInfo&& from) noexcept + : ThreatInfo() { + *this = ::std::move(from); + } + + inline ThreatInfo& operator=(const ThreatInfo& from) { + CopyFrom(from); + return *this; + } + inline ThreatInfo& operator=(ThreatInfo&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const std::string& unknown_fields() const { + return _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields<std::string>(); + } + + static const ThreatInfo& default_instance() { + return *internal_default_instance(); + } + static inline const ThreatInfo* internal_default_instance() { + return reinterpret_cast<const ThreatInfo*>( + &_ThreatInfo_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(ThreatInfo& a, ThreatInfo& b) { + a.Swap(&b); + } + inline void Swap(ThreatInfo* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ThreatInfo* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ThreatInfo* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage<ThreatInfo>(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const ThreatInfo& from); + void MergeFrom(const ThreatInfo& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(ThreatInfo* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "mozilla.safebrowsing.ThreatInfo"; + } + protected: + explicit ThreatInfo(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kThreatTypesFieldNumber = 1, + kPlatformTypesFieldNumber = 2, + kThreatEntriesFieldNumber = 3, + kThreatEntryTypesFieldNumber = 4, + }; + // repeated .mozilla.safebrowsing.ThreatType threat_types = 1; + int threat_types_size() const; + private: + int _internal_threat_types_size() const; + public: + void clear_threat_types(); + private: + ::mozilla::safebrowsing::ThreatType _internal_threat_types(int index) const; + void _internal_add_threat_types(::mozilla::safebrowsing::ThreatType value); + ::PROTOBUF_NAMESPACE_ID::RepeatedField<int>* _internal_mutable_threat_types(); + public: + ::mozilla::safebrowsing::ThreatType threat_types(int index) const; + void set_threat_types(int index, ::mozilla::safebrowsing::ThreatType value); + void add_threat_types(::mozilla::safebrowsing::ThreatType value); + const ::PROTOBUF_NAMESPACE_ID::RepeatedField<int>& threat_types() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedField<int>* mutable_threat_types(); + + // repeated .mozilla.safebrowsing.PlatformType platform_types = 2; + int platform_types_size() const; + private: + int _internal_platform_types_size() const; + public: + void clear_platform_types(); + private: + ::mozilla::safebrowsing::PlatformType _internal_platform_types(int index) const; + void _internal_add_platform_types(::mozilla::safebrowsing::PlatformType value); + ::PROTOBUF_NAMESPACE_ID::RepeatedField<int>* _internal_mutable_platform_types(); + public: + ::mozilla::safebrowsing::PlatformType platform_types(int index) const; + void set_platform_types(int index, ::mozilla::safebrowsing::PlatformType value); + void add_platform_types(::mozilla::safebrowsing::PlatformType value); + const ::PROTOBUF_NAMESPACE_ID::RepeatedField<int>& platform_types() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedField<int>* mutable_platform_types(); + + // repeated .mozilla.safebrowsing.ThreatEntry threat_entries = 3; + int threat_entries_size() const; + private: + int _internal_threat_entries_size() const; + public: + void clear_threat_entries(); + ::mozilla::safebrowsing::ThreatEntry* mutable_threat_entries(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::mozilla::safebrowsing::ThreatEntry >* + mutable_threat_entries(); + private: + const ::mozilla::safebrowsing::ThreatEntry& _internal_threat_entries(int index) const; + ::mozilla::safebrowsing::ThreatEntry* _internal_add_threat_entries(); + public: + const ::mozilla::safebrowsing::ThreatEntry& threat_entries(int index) const; + ::mozilla::safebrowsing::ThreatEntry* add_threat_entries(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::mozilla::safebrowsing::ThreatEntry >& + threat_entries() const; + + // repeated .mozilla.safebrowsing.ThreatEntryType threat_entry_types = 4; + int threat_entry_types_size() const; + private: + int _internal_threat_entry_types_size() const; + public: + void clear_threat_entry_types(); + private: + ::mozilla::safebrowsing::ThreatEntryType _internal_threat_entry_types(int index) const; + void _internal_add_threat_entry_types(::mozilla::safebrowsing::ThreatEntryType value); + ::PROTOBUF_NAMESPACE_ID::RepeatedField<int>* _internal_mutable_threat_entry_types(); + public: + ::mozilla::safebrowsing::ThreatEntryType threat_entry_types(int index) const; + void set_threat_entry_types(int index, ::mozilla::safebrowsing::ThreatEntryType value); + void add_threat_entry_types(::mozilla::safebrowsing::ThreatEntryType value); + const ::PROTOBUF_NAMESPACE_ID::RepeatedField<int>& threat_entry_types() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedField<int>* mutable_threat_entry_types(); + + // @@protoc_insertion_point(class_scope:mozilla.safebrowsing.ThreatInfo) + private: + class _Internal; + + template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedField<int> threat_types_; + ::PROTOBUF_NAMESPACE_ID::RepeatedField<int> platform_types_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::mozilla::safebrowsing::ThreatEntry > threat_entries_; + ::PROTOBUF_NAMESPACE_ID::RepeatedField<int> threat_entry_types_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_safebrowsing_2eproto; +}; +// ------------------------------------------------------------------- + +class ThreatMatch final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:mozilla.safebrowsing.ThreatMatch) */ { + public: + inline ThreatMatch() : ThreatMatch(nullptr) {} + ~ThreatMatch() override; + explicit PROTOBUF_CONSTEXPR ThreatMatch(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ThreatMatch(const ThreatMatch& from); + ThreatMatch(ThreatMatch&& from) noexcept + : ThreatMatch() { + *this = ::std::move(from); + } + + inline ThreatMatch& operator=(const ThreatMatch& from) { + CopyFrom(from); + return *this; + } + inline ThreatMatch& operator=(ThreatMatch&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const std::string& unknown_fields() const { + return _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields<std::string>(); + } + + static const ThreatMatch& default_instance() { + return *internal_default_instance(); + } + static inline const ThreatMatch* internal_default_instance() { + return reinterpret_cast<const ThreatMatch*>( + &_ThreatMatch_default_instance_); + } + static constexpr int kIndexInFileMessages = + 1; + + friend void swap(ThreatMatch& a, ThreatMatch& b) { + a.Swap(&b); + } + inline void Swap(ThreatMatch* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ThreatMatch* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ThreatMatch* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage<ThreatMatch>(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const ThreatMatch& from); + void MergeFrom(const ThreatMatch& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(ThreatMatch* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "mozilla.safebrowsing.ThreatMatch"; + } + protected: + explicit ThreatMatch(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kThreatFieldNumber = 3, + kThreatEntryMetadataFieldNumber = 4, + kCacheDurationFieldNumber = 5, + kThreatTypeFieldNumber = 1, + kPlatformTypeFieldNumber = 2, + kThreatEntryTypeFieldNumber = 6, + }; + // optional .mozilla.safebrowsing.ThreatEntry threat = 3; + bool has_threat() const; + private: + bool _internal_has_threat() const; + public: + void clear_threat(); + const ::mozilla::safebrowsing::ThreatEntry& threat() const; + PROTOBUF_NODISCARD ::mozilla::safebrowsing::ThreatEntry* release_threat(); + ::mozilla::safebrowsing::ThreatEntry* mutable_threat(); + void set_allocated_threat(::mozilla::safebrowsing::ThreatEntry* threat); + private: + const ::mozilla::safebrowsing::ThreatEntry& _internal_threat() const; + ::mozilla::safebrowsing::ThreatEntry* _internal_mutable_threat(); + public: + void unsafe_arena_set_allocated_threat( + ::mozilla::safebrowsing::ThreatEntry* threat); + ::mozilla::safebrowsing::ThreatEntry* unsafe_arena_release_threat(); + + // optional .mozilla.safebrowsing.ThreatEntryMetadata threat_entry_metadata = 4; + bool has_threat_entry_metadata() const; + private: + bool _internal_has_threat_entry_metadata() const; + public: + void clear_threat_entry_metadata(); + const ::mozilla::safebrowsing::ThreatEntryMetadata& threat_entry_metadata() const; + PROTOBUF_NODISCARD ::mozilla::safebrowsing::ThreatEntryMetadata* release_threat_entry_metadata(); + ::mozilla::safebrowsing::ThreatEntryMetadata* mutable_threat_entry_metadata(); + void set_allocated_threat_entry_metadata(::mozilla::safebrowsing::ThreatEntryMetadata* threat_entry_metadata); + private: + const ::mozilla::safebrowsing::ThreatEntryMetadata& _internal_threat_entry_metadata() const; + ::mozilla::safebrowsing::ThreatEntryMetadata* _internal_mutable_threat_entry_metadata(); + public: + void unsafe_arena_set_allocated_threat_entry_metadata( + ::mozilla::safebrowsing::ThreatEntryMetadata* threat_entry_metadata); + ::mozilla::safebrowsing::ThreatEntryMetadata* unsafe_arena_release_threat_entry_metadata(); + + // optional .mozilla.safebrowsing.Duration cache_duration = 5; + bool has_cache_duration() const; + private: + bool _internal_has_cache_duration() const; + public: + void clear_cache_duration(); + const ::mozilla::safebrowsing::Duration& cache_duration() const; + PROTOBUF_NODISCARD ::mozilla::safebrowsing::Duration* release_cache_duration(); + ::mozilla::safebrowsing::Duration* mutable_cache_duration(); + void set_allocated_cache_duration(::mozilla::safebrowsing::Duration* cache_duration); + private: + const ::mozilla::safebrowsing::Duration& _internal_cache_duration() const; + ::mozilla::safebrowsing::Duration* _internal_mutable_cache_duration(); + public: + void unsafe_arena_set_allocated_cache_duration( + ::mozilla::safebrowsing::Duration* cache_duration); + ::mozilla::safebrowsing::Duration* unsafe_arena_release_cache_duration(); + + // optional .mozilla.safebrowsing.ThreatType threat_type = 1; + bool has_threat_type() const; + private: + bool _internal_has_threat_type() const; + public: + void clear_threat_type(); + ::mozilla::safebrowsing::ThreatType threat_type() const; + void set_threat_type(::mozilla::safebrowsing::ThreatType value); + private: + ::mozilla::safebrowsing::ThreatType _internal_threat_type() const; + void _internal_set_threat_type(::mozilla::safebrowsing::ThreatType value); + public: + + // optional .mozilla.safebrowsing.PlatformType platform_type = 2; + bool has_platform_type() const; + private: + bool _internal_has_platform_type() const; + public: + void clear_platform_type(); + ::mozilla::safebrowsing::PlatformType platform_type() const; + void set_platform_type(::mozilla::safebrowsing::PlatformType value); + private: + ::mozilla::safebrowsing::PlatformType _internal_platform_type() const; + void _internal_set_platform_type(::mozilla::safebrowsing::PlatformType value); + public: + + // optional .mozilla.safebrowsing.ThreatEntryType threat_entry_type = 6; + bool has_threat_entry_type() const; + private: + bool _internal_has_threat_entry_type() const; + public: + void clear_threat_entry_type(); + ::mozilla::safebrowsing::ThreatEntryType threat_entry_type() const; + void set_threat_entry_type(::mozilla::safebrowsing::ThreatEntryType value); + private: + ::mozilla::safebrowsing::ThreatEntryType _internal_threat_entry_type() const; + void _internal_set_threat_entry_type(::mozilla::safebrowsing::ThreatEntryType value); + public: + + // @@protoc_insertion_point(class_scope:mozilla.safebrowsing.ThreatMatch) + private: + class _Internal; + + template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::mozilla::safebrowsing::ThreatEntry* threat_; + ::mozilla::safebrowsing::ThreatEntryMetadata* threat_entry_metadata_; + ::mozilla::safebrowsing::Duration* cache_duration_; + int threat_type_; + int platform_type_; + int threat_entry_type_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_safebrowsing_2eproto; +}; +// ------------------------------------------------------------------- + +class FindThreatMatchesRequest final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:mozilla.safebrowsing.FindThreatMatchesRequest) */ { + public: + inline FindThreatMatchesRequest() : FindThreatMatchesRequest(nullptr) {} + ~FindThreatMatchesRequest() override; + explicit PROTOBUF_CONSTEXPR FindThreatMatchesRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + FindThreatMatchesRequest(const FindThreatMatchesRequest& from); + FindThreatMatchesRequest(FindThreatMatchesRequest&& from) noexcept + : FindThreatMatchesRequest() { + *this = ::std::move(from); + } + + inline FindThreatMatchesRequest& operator=(const FindThreatMatchesRequest& from) { + CopyFrom(from); + return *this; + } + inline FindThreatMatchesRequest& operator=(FindThreatMatchesRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const std::string& unknown_fields() const { + return _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields<std::string>(); + } + + static const FindThreatMatchesRequest& default_instance() { + return *internal_default_instance(); + } + static inline const FindThreatMatchesRequest* internal_default_instance() { + return reinterpret_cast<const FindThreatMatchesRequest*>( + &_FindThreatMatchesRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 2; + + friend void swap(FindThreatMatchesRequest& a, FindThreatMatchesRequest& b) { + a.Swap(&b); + } + inline void Swap(FindThreatMatchesRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(FindThreatMatchesRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + FindThreatMatchesRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage<FindThreatMatchesRequest>(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const FindThreatMatchesRequest& from); + void MergeFrom(const FindThreatMatchesRequest& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(FindThreatMatchesRequest* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "mozilla.safebrowsing.FindThreatMatchesRequest"; + } + protected: + explicit FindThreatMatchesRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kClientFieldNumber = 1, + kThreatInfoFieldNumber = 2, + }; + // optional .mozilla.safebrowsing.ClientInfo client = 1; + bool has_client() const; + private: + bool _internal_has_client() const; + public: + void clear_client(); + const ::mozilla::safebrowsing::ClientInfo& client() const; + PROTOBUF_NODISCARD ::mozilla::safebrowsing::ClientInfo* release_client(); + ::mozilla::safebrowsing::ClientInfo* mutable_client(); + void set_allocated_client(::mozilla::safebrowsing::ClientInfo* client); + private: + const ::mozilla::safebrowsing::ClientInfo& _internal_client() const; + ::mozilla::safebrowsing::ClientInfo* _internal_mutable_client(); + public: + void unsafe_arena_set_allocated_client( + ::mozilla::safebrowsing::ClientInfo* client); + ::mozilla::safebrowsing::ClientInfo* unsafe_arena_release_client(); + + // optional .mozilla.safebrowsing.ThreatInfo threat_info = 2; + bool has_threat_info() const; + private: + bool _internal_has_threat_info() const; + public: + void clear_threat_info(); + const ::mozilla::safebrowsing::ThreatInfo& threat_info() const; + PROTOBUF_NODISCARD ::mozilla::safebrowsing::ThreatInfo* release_threat_info(); + ::mozilla::safebrowsing::ThreatInfo* mutable_threat_info(); + void set_allocated_threat_info(::mozilla::safebrowsing::ThreatInfo* threat_info); + private: + const ::mozilla::safebrowsing::ThreatInfo& _internal_threat_info() const; + ::mozilla::safebrowsing::ThreatInfo* _internal_mutable_threat_info(); + public: + void unsafe_arena_set_allocated_threat_info( + ::mozilla::safebrowsing::ThreatInfo* threat_info); + ::mozilla::safebrowsing::ThreatInfo* unsafe_arena_release_threat_info(); + + // @@protoc_insertion_point(class_scope:mozilla.safebrowsing.FindThreatMatchesRequest) + private: + class _Internal; + + template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::mozilla::safebrowsing::ClientInfo* client_; + ::mozilla::safebrowsing::ThreatInfo* threat_info_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_safebrowsing_2eproto; +}; +// ------------------------------------------------------------------- + +class FindThreatMatchesResponse final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:mozilla.safebrowsing.FindThreatMatchesResponse) */ { + public: + inline FindThreatMatchesResponse() : FindThreatMatchesResponse(nullptr) {} + ~FindThreatMatchesResponse() override; + explicit PROTOBUF_CONSTEXPR FindThreatMatchesResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + FindThreatMatchesResponse(const FindThreatMatchesResponse& from); + FindThreatMatchesResponse(FindThreatMatchesResponse&& from) noexcept + : FindThreatMatchesResponse() { + *this = ::std::move(from); + } + + inline FindThreatMatchesResponse& operator=(const FindThreatMatchesResponse& from) { + CopyFrom(from); + return *this; + } + inline FindThreatMatchesResponse& operator=(FindThreatMatchesResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const std::string& unknown_fields() const { + return _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields<std::string>(); + } + + static const FindThreatMatchesResponse& default_instance() { + return *internal_default_instance(); + } + static inline const FindThreatMatchesResponse* internal_default_instance() { + return reinterpret_cast<const FindThreatMatchesResponse*>( + &_FindThreatMatchesResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 3; + + friend void swap(FindThreatMatchesResponse& a, FindThreatMatchesResponse& b) { + a.Swap(&b); + } + inline void Swap(FindThreatMatchesResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(FindThreatMatchesResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + FindThreatMatchesResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage<FindThreatMatchesResponse>(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const FindThreatMatchesResponse& from); + void MergeFrom(const FindThreatMatchesResponse& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(FindThreatMatchesResponse* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "mozilla.safebrowsing.FindThreatMatchesResponse"; + } + protected: + explicit FindThreatMatchesResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kMatchesFieldNumber = 1, + }; + // repeated .mozilla.safebrowsing.ThreatMatch matches = 1; + int matches_size() const; + private: + int _internal_matches_size() const; + public: + void clear_matches(); + ::mozilla::safebrowsing::ThreatMatch* mutable_matches(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::mozilla::safebrowsing::ThreatMatch >* + mutable_matches(); + private: + const ::mozilla::safebrowsing::ThreatMatch& _internal_matches(int index) const; + ::mozilla::safebrowsing::ThreatMatch* _internal_add_matches(); + public: + const ::mozilla::safebrowsing::ThreatMatch& matches(int index) const; + ::mozilla::safebrowsing::ThreatMatch* add_matches(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::mozilla::safebrowsing::ThreatMatch >& + matches() const; + + // @@protoc_insertion_point(class_scope:mozilla.safebrowsing.FindThreatMatchesResponse) + private: + class _Internal; + + template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::mozilla::safebrowsing::ThreatMatch > matches_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_safebrowsing_2eproto; +}; +// ------------------------------------------------------------------- + +class FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:mozilla.safebrowsing.FetchThreatListUpdatesRequest.ListUpdateRequest.Constraints) */ { + public: + inline FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints() : FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints(nullptr) {} + ~FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints() override; + explicit PROTOBUF_CONSTEXPR FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints(const FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints& from); + FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints(FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints&& from) noexcept + : FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints() { + *this = ::std::move(from); + } + + inline FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints& operator=(const FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints& from) { + CopyFrom(from); + return *this; + } + inline FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints& operator=(FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const std::string& unknown_fields() const { + return _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields<std::string>(); + } + + static const FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints& default_instance() { + return *internal_default_instance(); + } + static inline const FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints* internal_default_instance() { + return reinterpret_cast<const FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints*>( + &_FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints_default_instance_); + } + static constexpr int kIndexInFileMessages = + 4; + + friend void swap(FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints& a, FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints& b) { + a.Swap(&b); + } + inline void Swap(FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage<FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints>(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints& from); + void MergeFrom(const FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "mozilla.safebrowsing.FetchThreatListUpdatesRequest.ListUpdateRequest.Constraints"; + } + protected: + explicit FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kSupportedCompressionsFieldNumber = 4, + kRegionFieldNumber = 3, + kMaxUpdateEntriesFieldNumber = 1, + kMaxDatabaseEntriesFieldNumber = 2, + }; + // repeated .mozilla.safebrowsing.CompressionType supported_compressions = 4; + int supported_compressions_size() const; + private: + int _internal_supported_compressions_size() const; + public: + void clear_supported_compressions(); + private: + ::mozilla::safebrowsing::CompressionType _internal_supported_compressions(int index) const; + void _internal_add_supported_compressions(::mozilla::safebrowsing::CompressionType value); + ::PROTOBUF_NAMESPACE_ID::RepeatedField<int>* _internal_mutable_supported_compressions(); + public: + ::mozilla::safebrowsing::CompressionType supported_compressions(int index) const; + void set_supported_compressions(int index, ::mozilla::safebrowsing::CompressionType value); + void add_supported_compressions(::mozilla::safebrowsing::CompressionType value); + const ::PROTOBUF_NAMESPACE_ID::RepeatedField<int>& supported_compressions() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedField<int>* mutable_supported_compressions(); + + // optional string region = 3; + bool has_region() const; + private: + bool _internal_has_region() const; + public: + void clear_region(); + const std::string& region() const; + template <typename ArgT0 = const std::string&, typename... ArgT> + void set_region(ArgT0&& arg0, ArgT... args); + std::string* mutable_region(); + PROTOBUF_NODISCARD std::string* release_region(); + void set_allocated_region(std::string* region); + private: + const std::string& _internal_region() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_region(const std::string& value); + std::string* _internal_mutable_region(); + public: + + // optional int32 max_update_entries = 1; + bool has_max_update_entries() const; + private: + bool _internal_has_max_update_entries() const; + public: + void clear_max_update_entries(); + int32_t max_update_entries() const; + void set_max_update_entries(int32_t value); + private: + int32_t _internal_max_update_entries() const; + void _internal_set_max_update_entries(int32_t value); + public: + + // optional int32 max_database_entries = 2; + bool has_max_database_entries() const; + private: + bool _internal_has_max_database_entries() const; + public: + void clear_max_database_entries(); + int32_t max_database_entries() const; + void set_max_database_entries(int32_t value); + private: + int32_t _internal_max_database_entries() const; + void _internal_set_max_database_entries(int32_t value); + public: + + // @@protoc_insertion_point(class_scope:mozilla.safebrowsing.FetchThreatListUpdatesRequest.ListUpdateRequest.Constraints) + private: + class _Internal; + + template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::RepeatedField<int> supported_compressions_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr region_; + int32_t max_update_entries_; + int32_t max_database_entries_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_safebrowsing_2eproto; +}; +// ------------------------------------------------------------------- + +class FetchThreatListUpdatesRequest_ListUpdateRequest final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:mozilla.safebrowsing.FetchThreatListUpdatesRequest.ListUpdateRequest) */ { + public: + inline FetchThreatListUpdatesRequest_ListUpdateRequest() : FetchThreatListUpdatesRequest_ListUpdateRequest(nullptr) {} + ~FetchThreatListUpdatesRequest_ListUpdateRequest() override; + explicit PROTOBUF_CONSTEXPR FetchThreatListUpdatesRequest_ListUpdateRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + FetchThreatListUpdatesRequest_ListUpdateRequest(const FetchThreatListUpdatesRequest_ListUpdateRequest& from); + FetchThreatListUpdatesRequest_ListUpdateRequest(FetchThreatListUpdatesRequest_ListUpdateRequest&& from) noexcept + : FetchThreatListUpdatesRequest_ListUpdateRequest() { + *this = ::std::move(from); + } + + inline FetchThreatListUpdatesRequest_ListUpdateRequest& operator=(const FetchThreatListUpdatesRequest_ListUpdateRequest& from) { + CopyFrom(from); + return *this; + } + inline FetchThreatListUpdatesRequest_ListUpdateRequest& operator=(FetchThreatListUpdatesRequest_ListUpdateRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const std::string& unknown_fields() const { + return _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields<std::string>(); + } + + static const FetchThreatListUpdatesRequest_ListUpdateRequest& default_instance() { + return *internal_default_instance(); + } + static inline const FetchThreatListUpdatesRequest_ListUpdateRequest* internal_default_instance() { + return reinterpret_cast<const FetchThreatListUpdatesRequest_ListUpdateRequest*>( + &_FetchThreatListUpdatesRequest_ListUpdateRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 5; + + friend void swap(FetchThreatListUpdatesRequest_ListUpdateRequest& a, FetchThreatListUpdatesRequest_ListUpdateRequest& b) { + a.Swap(&b); + } + inline void Swap(FetchThreatListUpdatesRequest_ListUpdateRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(FetchThreatListUpdatesRequest_ListUpdateRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + FetchThreatListUpdatesRequest_ListUpdateRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage<FetchThreatListUpdatesRequest_ListUpdateRequest>(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const FetchThreatListUpdatesRequest_ListUpdateRequest& from); + void MergeFrom(const FetchThreatListUpdatesRequest_ListUpdateRequest& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(FetchThreatListUpdatesRequest_ListUpdateRequest* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "mozilla.safebrowsing.FetchThreatListUpdatesRequest.ListUpdateRequest"; + } + protected: + explicit FetchThreatListUpdatesRequest_ListUpdateRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + typedef FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints Constraints; + + // accessors ------------------------------------------------------- + + enum : int { + kStateFieldNumber = 3, + kConstraintsFieldNumber = 4, + kThreatTypeFieldNumber = 1, + kPlatformTypeFieldNumber = 2, + kThreatEntryTypeFieldNumber = 5, + }; + // optional bytes state = 3; + bool has_state() const; + private: + bool _internal_has_state() const; + public: + void clear_state(); + const std::string& state() const; + template <typename ArgT0 = const std::string&, typename... ArgT> + void set_state(ArgT0&& arg0, ArgT... args); + std::string* mutable_state(); + PROTOBUF_NODISCARD std::string* release_state(); + void set_allocated_state(std::string* state); + private: + const std::string& _internal_state() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_state(const std::string& value); + std::string* _internal_mutable_state(); + public: + + // optional .mozilla.safebrowsing.FetchThreatListUpdatesRequest.ListUpdateRequest.Constraints constraints = 4; + bool has_constraints() const; + private: + bool _internal_has_constraints() const; + public: + void clear_constraints(); + const ::mozilla::safebrowsing::FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints& constraints() const; + PROTOBUF_NODISCARD ::mozilla::safebrowsing::FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints* release_constraints(); + ::mozilla::safebrowsing::FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints* mutable_constraints(); + void set_allocated_constraints(::mozilla::safebrowsing::FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints* constraints); + private: + const ::mozilla::safebrowsing::FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints& _internal_constraints() const; + ::mozilla::safebrowsing::FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints* _internal_mutable_constraints(); + public: + void unsafe_arena_set_allocated_constraints( + ::mozilla::safebrowsing::FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints* constraints); + ::mozilla::safebrowsing::FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints* unsafe_arena_release_constraints(); + + // optional .mozilla.safebrowsing.ThreatType threat_type = 1; + bool has_threat_type() const; + private: + bool _internal_has_threat_type() const; + public: + void clear_threat_type(); + ::mozilla::safebrowsing::ThreatType threat_type() const; + void set_threat_type(::mozilla::safebrowsing::ThreatType value); + private: + ::mozilla::safebrowsing::ThreatType _internal_threat_type() const; + void _internal_set_threat_type(::mozilla::safebrowsing::ThreatType value); + public: + + // optional .mozilla.safebrowsing.PlatformType platform_type = 2; + bool has_platform_type() const; + private: + bool _internal_has_platform_type() const; + public: + void clear_platform_type(); + ::mozilla::safebrowsing::PlatformType platform_type() const; + void set_platform_type(::mozilla::safebrowsing::PlatformType value); + private: + ::mozilla::safebrowsing::PlatformType _internal_platform_type() const; + void _internal_set_platform_type(::mozilla::safebrowsing::PlatformType value); + public: + + // optional .mozilla.safebrowsing.ThreatEntryType threat_entry_type = 5; + bool has_threat_entry_type() const; + private: + bool _internal_has_threat_entry_type() const; + public: + void clear_threat_entry_type(); + ::mozilla::safebrowsing::ThreatEntryType threat_entry_type() const; + void set_threat_entry_type(::mozilla::safebrowsing::ThreatEntryType value); + private: + ::mozilla::safebrowsing::ThreatEntryType _internal_threat_entry_type() const; + void _internal_set_threat_entry_type(::mozilla::safebrowsing::ThreatEntryType value); + public: + + // @@protoc_insertion_point(class_scope:mozilla.safebrowsing.FetchThreatListUpdatesRequest.ListUpdateRequest) + private: + class _Internal; + + template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr state_; + ::mozilla::safebrowsing::FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints* constraints_; + int threat_type_; + int platform_type_; + int threat_entry_type_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_safebrowsing_2eproto; +}; +// ------------------------------------------------------------------- + +class FetchThreatListUpdatesRequest final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:mozilla.safebrowsing.FetchThreatListUpdatesRequest) */ { + public: + inline FetchThreatListUpdatesRequest() : FetchThreatListUpdatesRequest(nullptr) {} + ~FetchThreatListUpdatesRequest() override; + explicit PROTOBUF_CONSTEXPR FetchThreatListUpdatesRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + FetchThreatListUpdatesRequest(const FetchThreatListUpdatesRequest& from); + FetchThreatListUpdatesRequest(FetchThreatListUpdatesRequest&& from) noexcept + : FetchThreatListUpdatesRequest() { + *this = ::std::move(from); + } + + inline FetchThreatListUpdatesRequest& operator=(const FetchThreatListUpdatesRequest& from) { + CopyFrom(from); + return *this; + } + inline FetchThreatListUpdatesRequest& operator=(FetchThreatListUpdatesRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const std::string& unknown_fields() const { + return _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields<std::string>(); + } + + static const FetchThreatListUpdatesRequest& default_instance() { + return *internal_default_instance(); + } + static inline const FetchThreatListUpdatesRequest* internal_default_instance() { + return reinterpret_cast<const FetchThreatListUpdatesRequest*>( + &_FetchThreatListUpdatesRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 6; + + friend void swap(FetchThreatListUpdatesRequest& a, FetchThreatListUpdatesRequest& b) { + a.Swap(&b); + } + inline void Swap(FetchThreatListUpdatesRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(FetchThreatListUpdatesRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + FetchThreatListUpdatesRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage<FetchThreatListUpdatesRequest>(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const FetchThreatListUpdatesRequest& from); + void MergeFrom(const FetchThreatListUpdatesRequest& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(FetchThreatListUpdatesRequest* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "mozilla.safebrowsing.FetchThreatListUpdatesRequest"; + } + protected: + explicit FetchThreatListUpdatesRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + typedef FetchThreatListUpdatesRequest_ListUpdateRequest ListUpdateRequest; + + // accessors ------------------------------------------------------- + + enum : int { + kListUpdateRequestsFieldNumber = 3, + kClientFieldNumber = 1, + kChromeClientInfoFieldNumber = 4, + }; + // repeated .mozilla.safebrowsing.FetchThreatListUpdatesRequest.ListUpdateRequest list_update_requests = 3; + int list_update_requests_size() const; + private: + int _internal_list_update_requests_size() const; + public: + void clear_list_update_requests(); + ::mozilla::safebrowsing::FetchThreatListUpdatesRequest_ListUpdateRequest* mutable_list_update_requests(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::mozilla::safebrowsing::FetchThreatListUpdatesRequest_ListUpdateRequest >* + mutable_list_update_requests(); + private: + const ::mozilla::safebrowsing::FetchThreatListUpdatesRequest_ListUpdateRequest& _internal_list_update_requests(int index) const; + ::mozilla::safebrowsing::FetchThreatListUpdatesRequest_ListUpdateRequest* _internal_add_list_update_requests(); + public: + const ::mozilla::safebrowsing::FetchThreatListUpdatesRequest_ListUpdateRequest& list_update_requests(int index) const; + ::mozilla::safebrowsing::FetchThreatListUpdatesRequest_ListUpdateRequest* add_list_update_requests(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::mozilla::safebrowsing::FetchThreatListUpdatesRequest_ListUpdateRequest >& + list_update_requests() const; + + // optional .mozilla.safebrowsing.ClientInfo client = 1; + bool has_client() const; + private: + bool _internal_has_client() const; + public: + void clear_client(); + const ::mozilla::safebrowsing::ClientInfo& client() const; + PROTOBUF_NODISCARD ::mozilla::safebrowsing::ClientInfo* release_client(); + ::mozilla::safebrowsing::ClientInfo* mutable_client(); + void set_allocated_client(::mozilla::safebrowsing::ClientInfo* client); + private: + const ::mozilla::safebrowsing::ClientInfo& _internal_client() const; + ::mozilla::safebrowsing::ClientInfo* _internal_mutable_client(); + public: + void unsafe_arena_set_allocated_client( + ::mozilla::safebrowsing::ClientInfo* client); + ::mozilla::safebrowsing::ClientInfo* unsafe_arena_release_client(); + + // optional .mozilla.safebrowsing.ChromeClientInfo chrome_client_info = 4; + bool has_chrome_client_info() const; + private: + bool _internal_has_chrome_client_info() const; + public: + void clear_chrome_client_info(); + const ::mozilla::safebrowsing::ChromeClientInfo& chrome_client_info() const; + PROTOBUF_NODISCARD ::mozilla::safebrowsing::ChromeClientInfo* release_chrome_client_info(); + ::mozilla::safebrowsing::ChromeClientInfo* mutable_chrome_client_info(); + void set_allocated_chrome_client_info(::mozilla::safebrowsing::ChromeClientInfo* chrome_client_info); + private: + const ::mozilla::safebrowsing::ChromeClientInfo& _internal_chrome_client_info() const; + ::mozilla::safebrowsing::ChromeClientInfo* _internal_mutable_chrome_client_info(); + public: + void unsafe_arena_set_allocated_chrome_client_info( + ::mozilla::safebrowsing::ChromeClientInfo* chrome_client_info); + ::mozilla::safebrowsing::ChromeClientInfo* unsafe_arena_release_chrome_client_info(); + + // @@protoc_insertion_point(class_scope:mozilla.safebrowsing.FetchThreatListUpdatesRequest) + private: + class _Internal; + + template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::mozilla::safebrowsing::FetchThreatListUpdatesRequest_ListUpdateRequest > list_update_requests_; + ::mozilla::safebrowsing::ClientInfo* client_; + ::mozilla::safebrowsing::ChromeClientInfo* chrome_client_info_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_safebrowsing_2eproto; +}; +// ------------------------------------------------------------------- + +class FetchThreatListUpdatesResponse_ListUpdateResponse final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:mozilla.safebrowsing.FetchThreatListUpdatesResponse.ListUpdateResponse) */ { + public: + inline FetchThreatListUpdatesResponse_ListUpdateResponse() : FetchThreatListUpdatesResponse_ListUpdateResponse(nullptr) {} + ~FetchThreatListUpdatesResponse_ListUpdateResponse() override; + explicit PROTOBUF_CONSTEXPR FetchThreatListUpdatesResponse_ListUpdateResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + FetchThreatListUpdatesResponse_ListUpdateResponse(const FetchThreatListUpdatesResponse_ListUpdateResponse& from); + FetchThreatListUpdatesResponse_ListUpdateResponse(FetchThreatListUpdatesResponse_ListUpdateResponse&& from) noexcept + : FetchThreatListUpdatesResponse_ListUpdateResponse() { + *this = ::std::move(from); + } + + inline FetchThreatListUpdatesResponse_ListUpdateResponse& operator=(const FetchThreatListUpdatesResponse_ListUpdateResponse& from) { + CopyFrom(from); + return *this; + } + inline FetchThreatListUpdatesResponse_ListUpdateResponse& operator=(FetchThreatListUpdatesResponse_ListUpdateResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const std::string& unknown_fields() const { + return _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields<std::string>(); + } + + static const FetchThreatListUpdatesResponse_ListUpdateResponse& default_instance() { + return *internal_default_instance(); + } + static inline const FetchThreatListUpdatesResponse_ListUpdateResponse* internal_default_instance() { + return reinterpret_cast<const FetchThreatListUpdatesResponse_ListUpdateResponse*>( + &_FetchThreatListUpdatesResponse_ListUpdateResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 7; + + friend void swap(FetchThreatListUpdatesResponse_ListUpdateResponse& a, FetchThreatListUpdatesResponse_ListUpdateResponse& b) { + a.Swap(&b); + } + inline void Swap(FetchThreatListUpdatesResponse_ListUpdateResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(FetchThreatListUpdatesResponse_ListUpdateResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + FetchThreatListUpdatesResponse_ListUpdateResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage<FetchThreatListUpdatesResponse_ListUpdateResponse>(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const FetchThreatListUpdatesResponse_ListUpdateResponse& from); + void MergeFrom(const FetchThreatListUpdatesResponse_ListUpdateResponse& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(FetchThreatListUpdatesResponse_ListUpdateResponse* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "mozilla.safebrowsing.FetchThreatListUpdatesResponse.ListUpdateResponse"; + } + protected: + explicit FetchThreatListUpdatesResponse_ListUpdateResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + typedef FetchThreatListUpdatesResponse_ListUpdateResponse_ResponseType ResponseType; + static constexpr ResponseType RESPONSE_TYPE_UNSPECIFIED = + FetchThreatListUpdatesResponse_ListUpdateResponse_ResponseType_RESPONSE_TYPE_UNSPECIFIED; + static constexpr ResponseType PARTIAL_UPDATE = + FetchThreatListUpdatesResponse_ListUpdateResponse_ResponseType_PARTIAL_UPDATE; + static constexpr ResponseType FULL_UPDATE = + FetchThreatListUpdatesResponse_ListUpdateResponse_ResponseType_FULL_UPDATE; + static inline bool ResponseType_IsValid(int value) { + return FetchThreatListUpdatesResponse_ListUpdateResponse_ResponseType_IsValid(value); + } + static constexpr ResponseType ResponseType_MIN = + FetchThreatListUpdatesResponse_ListUpdateResponse_ResponseType_ResponseType_MIN; + static constexpr ResponseType ResponseType_MAX = + FetchThreatListUpdatesResponse_ListUpdateResponse_ResponseType_ResponseType_MAX; + static constexpr int ResponseType_ARRAYSIZE = + FetchThreatListUpdatesResponse_ListUpdateResponse_ResponseType_ResponseType_ARRAYSIZE; + template<typename T> + static inline const std::string& ResponseType_Name(T enum_t_value) { + static_assert(::std::is_same<T, ResponseType>::value || + ::std::is_integral<T>::value, + "Incorrect type passed to function ResponseType_Name."); + return FetchThreatListUpdatesResponse_ListUpdateResponse_ResponseType_Name(enum_t_value); + } + static inline bool ResponseType_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name, + ResponseType* value) { + return FetchThreatListUpdatesResponse_ListUpdateResponse_ResponseType_Parse(name, value); + } + + // accessors ------------------------------------------------------- + + enum : int { + kAdditionsFieldNumber = 5, + kRemovalsFieldNumber = 6, + kNewClientStateFieldNumber = 7, + kChecksumFieldNumber = 8, + kThreatTypeFieldNumber = 1, + kThreatEntryTypeFieldNumber = 2, + kPlatformTypeFieldNumber = 3, + kResponseTypeFieldNumber = 4, + }; + // repeated .mozilla.safebrowsing.ThreatEntrySet additions = 5; + int additions_size() const; + private: + int _internal_additions_size() const; + public: + void clear_additions(); + ::mozilla::safebrowsing::ThreatEntrySet* mutable_additions(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::mozilla::safebrowsing::ThreatEntrySet >* + mutable_additions(); + private: + const ::mozilla::safebrowsing::ThreatEntrySet& _internal_additions(int index) const; + ::mozilla::safebrowsing::ThreatEntrySet* _internal_add_additions(); + public: + const ::mozilla::safebrowsing::ThreatEntrySet& additions(int index) const; + ::mozilla::safebrowsing::ThreatEntrySet* add_additions(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::mozilla::safebrowsing::ThreatEntrySet >& + additions() const; + + // repeated .mozilla.safebrowsing.ThreatEntrySet removals = 6; + int removals_size() const; + private: + int _internal_removals_size() const; + public: + void clear_removals(); + ::mozilla::safebrowsing::ThreatEntrySet* mutable_removals(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::mozilla::safebrowsing::ThreatEntrySet >* + mutable_removals(); + private: + const ::mozilla::safebrowsing::ThreatEntrySet& _internal_removals(int index) const; + ::mozilla::safebrowsing::ThreatEntrySet* _internal_add_removals(); + public: + const ::mozilla::safebrowsing::ThreatEntrySet& removals(int index) const; + ::mozilla::safebrowsing::ThreatEntrySet* add_removals(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::mozilla::safebrowsing::ThreatEntrySet >& + removals() const; + + // optional bytes new_client_state = 7; + bool has_new_client_state() const; + private: + bool _internal_has_new_client_state() const; + public: + void clear_new_client_state(); + const std::string& new_client_state() const; + template <typename ArgT0 = const std::string&, typename... ArgT> + void set_new_client_state(ArgT0&& arg0, ArgT... args); + std::string* mutable_new_client_state(); + PROTOBUF_NODISCARD std::string* release_new_client_state(); + void set_allocated_new_client_state(std::string* new_client_state); + private: + const std::string& _internal_new_client_state() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_new_client_state(const std::string& value); + std::string* _internal_mutable_new_client_state(); + public: + + // optional .mozilla.safebrowsing.Checksum checksum = 8; + bool has_checksum() const; + private: + bool _internal_has_checksum() const; + public: + void clear_checksum(); + const ::mozilla::safebrowsing::Checksum& checksum() const; + PROTOBUF_NODISCARD ::mozilla::safebrowsing::Checksum* release_checksum(); + ::mozilla::safebrowsing::Checksum* mutable_checksum(); + void set_allocated_checksum(::mozilla::safebrowsing::Checksum* checksum); + private: + const ::mozilla::safebrowsing::Checksum& _internal_checksum() const; + ::mozilla::safebrowsing::Checksum* _internal_mutable_checksum(); + public: + void unsafe_arena_set_allocated_checksum( + ::mozilla::safebrowsing::Checksum* checksum); + ::mozilla::safebrowsing::Checksum* unsafe_arena_release_checksum(); + + // optional .mozilla.safebrowsing.ThreatType threat_type = 1; + bool has_threat_type() const; + private: + bool _internal_has_threat_type() const; + public: + void clear_threat_type(); + ::mozilla::safebrowsing::ThreatType threat_type() const; + void set_threat_type(::mozilla::safebrowsing::ThreatType value); + private: + ::mozilla::safebrowsing::ThreatType _internal_threat_type() const; + void _internal_set_threat_type(::mozilla::safebrowsing::ThreatType value); + public: + + // optional .mozilla.safebrowsing.ThreatEntryType threat_entry_type = 2; + bool has_threat_entry_type() const; + private: + bool _internal_has_threat_entry_type() const; + public: + void clear_threat_entry_type(); + ::mozilla::safebrowsing::ThreatEntryType threat_entry_type() const; + void set_threat_entry_type(::mozilla::safebrowsing::ThreatEntryType value); + private: + ::mozilla::safebrowsing::ThreatEntryType _internal_threat_entry_type() const; + void _internal_set_threat_entry_type(::mozilla::safebrowsing::ThreatEntryType value); + public: + + // optional .mozilla.safebrowsing.PlatformType platform_type = 3; + bool has_platform_type() const; + private: + bool _internal_has_platform_type() const; + public: + void clear_platform_type(); + ::mozilla::safebrowsing::PlatformType platform_type() const; + void set_platform_type(::mozilla::safebrowsing::PlatformType value); + private: + ::mozilla::safebrowsing::PlatformType _internal_platform_type() const; + void _internal_set_platform_type(::mozilla::safebrowsing::PlatformType value); + public: + + // optional .mozilla.safebrowsing.FetchThreatListUpdatesResponse.ListUpdateResponse.ResponseType response_type = 4; + bool has_response_type() const; + private: + bool _internal_has_response_type() const; + public: + void clear_response_type(); + ::mozilla::safebrowsing::FetchThreatListUpdatesResponse_ListUpdateResponse_ResponseType response_type() const; + void set_response_type(::mozilla::safebrowsing::FetchThreatListUpdatesResponse_ListUpdateResponse_ResponseType value); + private: + ::mozilla::safebrowsing::FetchThreatListUpdatesResponse_ListUpdateResponse_ResponseType _internal_response_type() const; + void _internal_set_response_type(::mozilla::safebrowsing::FetchThreatListUpdatesResponse_ListUpdateResponse_ResponseType value); + public: + + // @@protoc_insertion_point(class_scope:mozilla.safebrowsing.FetchThreatListUpdatesResponse.ListUpdateResponse) + private: + class _Internal; + + template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::mozilla::safebrowsing::ThreatEntrySet > additions_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::mozilla::safebrowsing::ThreatEntrySet > removals_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr new_client_state_; + ::mozilla::safebrowsing::Checksum* checksum_; + int threat_type_; + int threat_entry_type_; + int platform_type_; + int response_type_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_safebrowsing_2eproto; +}; +// ------------------------------------------------------------------- + +class FetchThreatListUpdatesResponse final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:mozilla.safebrowsing.FetchThreatListUpdatesResponse) */ { + public: + inline FetchThreatListUpdatesResponse() : FetchThreatListUpdatesResponse(nullptr) {} + ~FetchThreatListUpdatesResponse() override; + explicit PROTOBUF_CONSTEXPR FetchThreatListUpdatesResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + FetchThreatListUpdatesResponse(const FetchThreatListUpdatesResponse& from); + FetchThreatListUpdatesResponse(FetchThreatListUpdatesResponse&& from) noexcept + : FetchThreatListUpdatesResponse() { + *this = ::std::move(from); + } + + inline FetchThreatListUpdatesResponse& operator=(const FetchThreatListUpdatesResponse& from) { + CopyFrom(from); + return *this; + } + inline FetchThreatListUpdatesResponse& operator=(FetchThreatListUpdatesResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const std::string& unknown_fields() const { + return _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields<std::string>(); + } + + static const FetchThreatListUpdatesResponse& default_instance() { + return *internal_default_instance(); + } + static inline const FetchThreatListUpdatesResponse* internal_default_instance() { + return reinterpret_cast<const FetchThreatListUpdatesResponse*>( + &_FetchThreatListUpdatesResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 8; + + friend void swap(FetchThreatListUpdatesResponse& a, FetchThreatListUpdatesResponse& b) { + a.Swap(&b); + } + inline void Swap(FetchThreatListUpdatesResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(FetchThreatListUpdatesResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + FetchThreatListUpdatesResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage<FetchThreatListUpdatesResponse>(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const FetchThreatListUpdatesResponse& from); + void MergeFrom(const FetchThreatListUpdatesResponse& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(FetchThreatListUpdatesResponse* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "mozilla.safebrowsing.FetchThreatListUpdatesResponse"; + } + protected: + explicit FetchThreatListUpdatesResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + typedef FetchThreatListUpdatesResponse_ListUpdateResponse ListUpdateResponse; + + // accessors ------------------------------------------------------- + + enum : int { + kListUpdateResponsesFieldNumber = 1, + kMinimumWaitDurationFieldNumber = 2, + }; + // repeated .mozilla.safebrowsing.FetchThreatListUpdatesResponse.ListUpdateResponse list_update_responses = 1; + int list_update_responses_size() const; + private: + int _internal_list_update_responses_size() const; + public: + void clear_list_update_responses(); + ::mozilla::safebrowsing::FetchThreatListUpdatesResponse_ListUpdateResponse* mutable_list_update_responses(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::mozilla::safebrowsing::FetchThreatListUpdatesResponse_ListUpdateResponse >* + mutable_list_update_responses(); + private: + const ::mozilla::safebrowsing::FetchThreatListUpdatesResponse_ListUpdateResponse& _internal_list_update_responses(int index) const; + ::mozilla::safebrowsing::FetchThreatListUpdatesResponse_ListUpdateResponse* _internal_add_list_update_responses(); + public: + const ::mozilla::safebrowsing::FetchThreatListUpdatesResponse_ListUpdateResponse& list_update_responses(int index) const; + ::mozilla::safebrowsing::FetchThreatListUpdatesResponse_ListUpdateResponse* add_list_update_responses(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::mozilla::safebrowsing::FetchThreatListUpdatesResponse_ListUpdateResponse >& + list_update_responses() const; + + // optional .mozilla.safebrowsing.Duration minimum_wait_duration = 2; + bool has_minimum_wait_duration() const; + private: + bool _internal_has_minimum_wait_duration() const; + public: + void clear_minimum_wait_duration(); + const ::mozilla::safebrowsing::Duration& minimum_wait_duration() const; + PROTOBUF_NODISCARD ::mozilla::safebrowsing::Duration* release_minimum_wait_duration(); + ::mozilla::safebrowsing::Duration* mutable_minimum_wait_duration(); + void set_allocated_minimum_wait_duration(::mozilla::safebrowsing::Duration* minimum_wait_duration); + private: + const ::mozilla::safebrowsing::Duration& _internal_minimum_wait_duration() const; + ::mozilla::safebrowsing::Duration* _internal_mutable_minimum_wait_duration(); + public: + void unsafe_arena_set_allocated_minimum_wait_duration( + ::mozilla::safebrowsing::Duration* minimum_wait_duration); + ::mozilla::safebrowsing::Duration* unsafe_arena_release_minimum_wait_duration(); + + // @@protoc_insertion_point(class_scope:mozilla.safebrowsing.FetchThreatListUpdatesResponse) + private: + class _Internal; + + template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::mozilla::safebrowsing::FetchThreatListUpdatesResponse_ListUpdateResponse > list_update_responses_; + ::mozilla::safebrowsing::Duration* minimum_wait_duration_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_safebrowsing_2eproto; +}; +// ------------------------------------------------------------------- + +class FindFullHashesRequest final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:mozilla.safebrowsing.FindFullHashesRequest) */ { + public: + inline FindFullHashesRequest() : FindFullHashesRequest(nullptr) {} + ~FindFullHashesRequest() override; + explicit PROTOBUF_CONSTEXPR FindFullHashesRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + FindFullHashesRequest(const FindFullHashesRequest& from); + FindFullHashesRequest(FindFullHashesRequest&& from) noexcept + : FindFullHashesRequest() { + *this = ::std::move(from); + } + + inline FindFullHashesRequest& operator=(const FindFullHashesRequest& from) { + CopyFrom(from); + return *this; + } + inline FindFullHashesRequest& operator=(FindFullHashesRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const std::string& unknown_fields() const { + return _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields<std::string>(); + } + + static const FindFullHashesRequest& default_instance() { + return *internal_default_instance(); + } + static inline const FindFullHashesRequest* internal_default_instance() { + return reinterpret_cast<const FindFullHashesRequest*>( + &_FindFullHashesRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 9; + + friend void swap(FindFullHashesRequest& a, FindFullHashesRequest& b) { + a.Swap(&b); + } + inline void Swap(FindFullHashesRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(FindFullHashesRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + FindFullHashesRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage<FindFullHashesRequest>(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const FindFullHashesRequest& from); + void MergeFrom(const FindFullHashesRequest& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(FindFullHashesRequest* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "mozilla.safebrowsing.FindFullHashesRequest"; + } + protected: + explicit FindFullHashesRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kClientStatesFieldNumber = 2, + kClientFieldNumber = 1, + kThreatInfoFieldNumber = 3, + }; + // repeated bytes client_states = 2; + int client_states_size() const; + private: + int _internal_client_states_size() const; + public: + void clear_client_states(); + const std::string& client_states(int index) const; + std::string* mutable_client_states(int index); + void set_client_states(int index, const std::string& value); + void set_client_states(int index, std::string&& value); + void set_client_states(int index, const char* value); + void set_client_states(int index, const void* value, size_t size); + std::string* add_client_states(); + void add_client_states(const std::string& value); + void add_client_states(std::string&& value); + void add_client_states(const char* value); + void add_client_states(const void* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<std::string>& client_states() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<std::string>* mutable_client_states(); + private: + const std::string& _internal_client_states(int index) const; + std::string* _internal_add_client_states(); + public: + + // optional .mozilla.safebrowsing.ClientInfo client = 1; + bool has_client() const; + private: + bool _internal_has_client() const; + public: + void clear_client(); + const ::mozilla::safebrowsing::ClientInfo& client() const; + PROTOBUF_NODISCARD ::mozilla::safebrowsing::ClientInfo* release_client(); + ::mozilla::safebrowsing::ClientInfo* mutable_client(); + void set_allocated_client(::mozilla::safebrowsing::ClientInfo* client); + private: + const ::mozilla::safebrowsing::ClientInfo& _internal_client() const; + ::mozilla::safebrowsing::ClientInfo* _internal_mutable_client(); + public: + void unsafe_arena_set_allocated_client( + ::mozilla::safebrowsing::ClientInfo* client); + ::mozilla::safebrowsing::ClientInfo* unsafe_arena_release_client(); + + // optional .mozilla.safebrowsing.ThreatInfo threat_info = 3; + bool has_threat_info() const; + private: + bool _internal_has_threat_info() const; + public: + void clear_threat_info(); + const ::mozilla::safebrowsing::ThreatInfo& threat_info() const; + PROTOBUF_NODISCARD ::mozilla::safebrowsing::ThreatInfo* release_threat_info(); + ::mozilla::safebrowsing::ThreatInfo* mutable_threat_info(); + void set_allocated_threat_info(::mozilla::safebrowsing::ThreatInfo* threat_info); + private: + const ::mozilla::safebrowsing::ThreatInfo& _internal_threat_info() const; + ::mozilla::safebrowsing::ThreatInfo* _internal_mutable_threat_info(); + public: + void unsafe_arena_set_allocated_threat_info( + ::mozilla::safebrowsing::ThreatInfo* threat_info); + ::mozilla::safebrowsing::ThreatInfo* unsafe_arena_release_threat_info(); + + // @@protoc_insertion_point(class_scope:mozilla.safebrowsing.FindFullHashesRequest) + private: + class _Internal; + + template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<std::string> client_states_; + ::mozilla::safebrowsing::ClientInfo* client_; + ::mozilla::safebrowsing::ThreatInfo* threat_info_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_safebrowsing_2eproto; +}; +// ------------------------------------------------------------------- + +class FindFullHashesResponse final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:mozilla.safebrowsing.FindFullHashesResponse) */ { + public: + inline FindFullHashesResponse() : FindFullHashesResponse(nullptr) {} + ~FindFullHashesResponse() override; + explicit PROTOBUF_CONSTEXPR FindFullHashesResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + FindFullHashesResponse(const FindFullHashesResponse& from); + FindFullHashesResponse(FindFullHashesResponse&& from) noexcept + : FindFullHashesResponse() { + *this = ::std::move(from); + } + + inline FindFullHashesResponse& operator=(const FindFullHashesResponse& from) { + CopyFrom(from); + return *this; + } + inline FindFullHashesResponse& operator=(FindFullHashesResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const std::string& unknown_fields() const { + return _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields<std::string>(); + } + + static const FindFullHashesResponse& default_instance() { + return *internal_default_instance(); + } + static inline const FindFullHashesResponse* internal_default_instance() { + return reinterpret_cast<const FindFullHashesResponse*>( + &_FindFullHashesResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 10; + + friend void swap(FindFullHashesResponse& a, FindFullHashesResponse& b) { + a.Swap(&b); + } + inline void Swap(FindFullHashesResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(FindFullHashesResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + FindFullHashesResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage<FindFullHashesResponse>(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const FindFullHashesResponse& from); + void MergeFrom(const FindFullHashesResponse& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(FindFullHashesResponse* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "mozilla.safebrowsing.FindFullHashesResponse"; + } + protected: + explicit FindFullHashesResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kMatchesFieldNumber = 1, + kMinimumWaitDurationFieldNumber = 2, + kNegativeCacheDurationFieldNumber = 3, + }; + // repeated .mozilla.safebrowsing.ThreatMatch matches = 1; + int matches_size() const; + private: + int _internal_matches_size() const; + public: + void clear_matches(); + ::mozilla::safebrowsing::ThreatMatch* mutable_matches(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::mozilla::safebrowsing::ThreatMatch >* + mutable_matches(); + private: + const ::mozilla::safebrowsing::ThreatMatch& _internal_matches(int index) const; + ::mozilla::safebrowsing::ThreatMatch* _internal_add_matches(); + public: + const ::mozilla::safebrowsing::ThreatMatch& matches(int index) const; + ::mozilla::safebrowsing::ThreatMatch* add_matches(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::mozilla::safebrowsing::ThreatMatch >& + matches() const; + + // optional .mozilla.safebrowsing.Duration minimum_wait_duration = 2; + bool has_minimum_wait_duration() const; + private: + bool _internal_has_minimum_wait_duration() const; + public: + void clear_minimum_wait_duration(); + const ::mozilla::safebrowsing::Duration& minimum_wait_duration() const; + PROTOBUF_NODISCARD ::mozilla::safebrowsing::Duration* release_minimum_wait_duration(); + ::mozilla::safebrowsing::Duration* mutable_minimum_wait_duration(); + void set_allocated_minimum_wait_duration(::mozilla::safebrowsing::Duration* minimum_wait_duration); + private: + const ::mozilla::safebrowsing::Duration& _internal_minimum_wait_duration() const; + ::mozilla::safebrowsing::Duration* _internal_mutable_minimum_wait_duration(); + public: + void unsafe_arena_set_allocated_minimum_wait_duration( + ::mozilla::safebrowsing::Duration* minimum_wait_duration); + ::mozilla::safebrowsing::Duration* unsafe_arena_release_minimum_wait_duration(); + + // optional .mozilla.safebrowsing.Duration negative_cache_duration = 3; + bool has_negative_cache_duration() const; + private: + bool _internal_has_negative_cache_duration() const; + public: + void clear_negative_cache_duration(); + const ::mozilla::safebrowsing::Duration& negative_cache_duration() const; + PROTOBUF_NODISCARD ::mozilla::safebrowsing::Duration* release_negative_cache_duration(); + ::mozilla::safebrowsing::Duration* mutable_negative_cache_duration(); + void set_allocated_negative_cache_duration(::mozilla::safebrowsing::Duration* negative_cache_duration); + private: + const ::mozilla::safebrowsing::Duration& _internal_negative_cache_duration() const; + ::mozilla::safebrowsing::Duration* _internal_mutable_negative_cache_duration(); + public: + void unsafe_arena_set_allocated_negative_cache_duration( + ::mozilla::safebrowsing::Duration* negative_cache_duration); + ::mozilla::safebrowsing::Duration* unsafe_arena_release_negative_cache_duration(); + + // @@protoc_insertion_point(class_scope:mozilla.safebrowsing.FindFullHashesResponse) + private: + class _Internal; + + template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::mozilla::safebrowsing::ThreatMatch > matches_; + ::mozilla::safebrowsing::Duration* minimum_wait_duration_; + ::mozilla::safebrowsing::Duration* negative_cache_duration_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_safebrowsing_2eproto; +}; +// ------------------------------------------------------------------- + +class ThreatHit_ThreatSource final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:mozilla.safebrowsing.ThreatHit.ThreatSource) */ { + public: + inline ThreatHit_ThreatSource() : ThreatHit_ThreatSource(nullptr) {} + ~ThreatHit_ThreatSource() override; + explicit PROTOBUF_CONSTEXPR ThreatHit_ThreatSource(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ThreatHit_ThreatSource(const ThreatHit_ThreatSource& from); + ThreatHit_ThreatSource(ThreatHit_ThreatSource&& from) noexcept + : ThreatHit_ThreatSource() { + *this = ::std::move(from); + } + + inline ThreatHit_ThreatSource& operator=(const ThreatHit_ThreatSource& from) { + CopyFrom(from); + return *this; + } + inline ThreatHit_ThreatSource& operator=(ThreatHit_ThreatSource&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const std::string& unknown_fields() const { + return _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields<std::string>(); + } + + static const ThreatHit_ThreatSource& default_instance() { + return *internal_default_instance(); + } + static inline const ThreatHit_ThreatSource* internal_default_instance() { + return reinterpret_cast<const ThreatHit_ThreatSource*>( + &_ThreatHit_ThreatSource_default_instance_); + } + static constexpr int kIndexInFileMessages = + 11; + + friend void swap(ThreatHit_ThreatSource& a, ThreatHit_ThreatSource& b) { + a.Swap(&b); + } + inline void Swap(ThreatHit_ThreatSource* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ThreatHit_ThreatSource* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ThreatHit_ThreatSource* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage<ThreatHit_ThreatSource>(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const ThreatHit_ThreatSource& from); + void MergeFrom(const ThreatHit_ThreatSource& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(ThreatHit_ThreatSource* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "mozilla.safebrowsing.ThreatHit.ThreatSource"; + } + protected: + explicit ThreatHit_ThreatSource(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kUrlFieldNumber = 1, + kRemoteIpFieldNumber = 3, + kReferrerFieldNumber = 4, + kTypeFieldNumber = 2, + }; + // optional string url = 1; + bool has_url() const; + private: + bool _internal_has_url() const; + public: + void clear_url(); + const std::string& url() const; + template <typename ArgT0 = const std::string&, typename... ArgT> + void set_url(ArgT0&& arg0, ArgT... args); + std::string* mutable_url(); + PROTOBUF_NODISCARD std::string* release_url(); + void set_allocated_url(std::string* url); + private: + const std::string& _internal_url() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_url(const std::string& value); + std::string* _internal_mutable_url(); + public: + + // optional string remote_ip = 3; + bool has_remote_ip() const; + private: + bool _internal_has_remote_ip() const; + public: + void clear_remote_ip(); + const std::string& remote_ip() const; + template <typename ArgT0 = const std::string&, typename... ArgT> + void set_remote_ip(ArgT0&& arg0, ArgT... args); + std::string* mutable_remote_ip(); + PROTOBUF_NODISCARD std::string* release_remote_ip(); + void set_allocated_remote_ip(std::string* remote_ip); + private: + const std::string& _internal_remote_ip() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_remote_ip(const std::string& value); + std::string* _internal_mutable_remote_ip(); + public: + + // optional string referrer = 4; + bool has_referrer() const; + private: + bool _internal_has_referrer() const; + public: + void clear_referrer(); + const std::string& referrer() const; + template <typename ArgT0 = const std::string&, typename... ArgT> + void set_referrer(ArgT0&& arg0, ArgT... args); + std::string* mutable_referrer(); + PROTOBUF_NODISCARD std::string* release_referrer(); + void set_allocated_referrer(std::string* referrer); + private: + const std::string& _internal_referrer() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_referrer(const std::string& value); + std::string* _internal_mutable_referrer(); + public: + + // optional .mozilla.safebrowsing.ThreatHit.ThreatSourceType type = 2; + bool has_type() const; + private: + bool _internal_has_type() const; + public: + void clear_type(); + ::mozilla::safebrowsing::ThreatHit_ThreatSourceType type() const; + void set_type(::mozilla::safebrowsing::ThreatHit_ThreatSourceType value); + private: + ::mozilla::safebrowsing::ThreatHit_ThreatSourceType _internal_type() const; + void _internal_set_type(::mozilla::safebrowsing::ThreatHit_ThreatSourceType value); + public: + + // @@protoc_insertion_point(class_scope:mozilla.safebrowsing.ThreatHit.ThreatSource) + private: + class _Internal; + + template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr url_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr remote_ip_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr referrer_; + int type_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_safebrowsing_2eproto; +}; +// ------------------------------------------------------------------- + +class ThreatHit_UserInfo final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:mozilla.safebrowsing.ThreatHit.UserInfo) */ { + public: + inline ThreatHit_UserInfo() : ThreatHit_UserInfo(nullptr) {} + ~ThreatHit_UserInfo() override; + explicit PROTOBUF_CONSTEXPR ThreatHit_UserInfo(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ThreatHit_UserInfo(const ThreatHit_UserInfo& from); + ThreatHit_UserInfo(ThreatHit_UserInfo&& from) noexcept + : ThreatHit_UserInfo() { + *this = ::std::move(from); + } + + inline ThreatHit_UserInfo& operator=(const ThreatHit_UserInfo& from) { + CopyFrom(from); + return *this; + } + inline ThreatHit_UserInfo& operator=(ThreatHit_UserInfo&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const std::string& unknown_fields() const { + return _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields<std::string>(); + } + + static const ThreatHit_UserInfo& default_instance() { + return *internal_default_instance(); + } + static inline const ThreatHit_UserInfo* internal_default_instance() { + return reinterpret_cast<const ThreatHit_UserInfo*>( + &_ThreatHit_UserInfo_default_instance_); + } + static constexpr int kIndexInFileMessages = + 12; + + friend void swap(ThreatHit_UserInfo& a, ThreatHit_UserInfo& b) { + a.Swap(&b); + } + inline void Swap(ThreatHit_UserInfo* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ThreatHit_UserInfo* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ThreatHit_UserInfo* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage<ThreatHit_UserInfo>(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const ThreatHit_UserInfo& from); + void MergeFrom(const ThreatHit_UserInfo& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(ThreatHit_UserInfo* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "mozilla.safebrowsing.ThreatHit.UserInfo"; + } + protected: + explicit ThreatHit_UserInfo(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kRegionCodeFieldNumber = 1, + kUserIdFieldNumber = 2, + }; + // optional string region_code = 1; + bool has_region_code() const; + private: + bool _internal_has_region_code() const; + public: + void clear_region_code(); + const std::string& region_code() const; + template <typename ArgT0 = const std::string&, typename... ArgT> + void set_region_code(ArgT0&& arg0, ArgT... args); + std::string* mutable_region_code(); + PROTOBUF_NODISCARD std::string* release_region_code(); + void set_allocated_region_code(std::string* region_code); + private: + const std::string& _internal_region_code() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_region_code(const std::string& value); + std::string* _internal_mutable_region_code(); + public: + + // optional bytes user_id = 2; + bool has_user_id() const; + private: + bool _internal_has_user_id() const; + public: + void clear_user_id(); + const std::string& user_id() const; + template <typename ArgT0 = const std::string&, typename... ArgT> + void set_user_id(ArgT0&& arg0, ArgT... args); + std::string* mutable_user_id(); + PROTOBUF_NODISCARD std::string* release_user_id(); + void set_allocated_user_id(std::string* user_id); + private: + const std::string& _internal_user_id() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_user_id(const std::string& value); + std::string* _internal_mutable_user_id(); + public: + + // @@protoc_insertion_point(class_scope:mozilla.safebrowsing.ThreatHit.UserInfo) + private: + class _Internal; + + template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr region_code_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr user_id_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_safebrowsing_2eproto; +}; +// ------------------------------------------------------------------- + +class ThreatHit final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:mozilla.safebrowsing.ThreatHit) */ { + public: + inline ThreatHit() : ThreatHit(nullptr) {} + ~ThreatHit() override; + explicit PROTOBUF_CONSTEXPR ThreatHit(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ThreatHit(const ThreatHit& from); + ThreatHit(ThreatHit&& from) noexcept + : ThreatHit() { + *this = ::std::move(from); + } + + inline ThreatHit& operator=(const ThreatHit& from) { + CopyFrom(from); + return *this; + } + inline ThreatHit& operator=(ThreatHit&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const std::string& unknown_fields() const { + return _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields<std::string>(); + } + + static const ThreatHit& default_instance() { + return *internal_default_instance(); + } + static inline const ThreatHit* internal_default_instance() { + return reinterpret_cast<const ThreatHit*>( + &_ThreatHit_default_instance_); + } + static constexpr int kIndexInFileMessages = + 13; + + friend void swap(ThreatHit& a, ThreatHit& b) { + a.Swap(&b); + } + inline void Swap(ThreatHit* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ThreatHit* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ThreatHit* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage<ThreatHit>(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const ThreatHit& from); + void MergeFrom(const ThreatHit& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(ThreatHit* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "mozilla.safebrowsing.ThreatHit"; + } + protected: + explicit ThreatHit(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + typedef ThreatHit_ThreatSource ThreatSource; + typedef ThreatHit_UserInfo UserInfo; + + typedef ThreatHit_ThreatSourceType ThreatSourceType; + static constexpr ThreatSourceType THREAT_SOURCE_TYPE_UNSPECIFIED = + ThreatHit_ThreatSourceType_THREAT_SOURCE_TYPE_UNSPECIFIED; + static constexpr ThreatSourceType MATCHING_URL = + ThreatHit_ThreatSourceType_MATCHING_URL; + static constexpr ThreatSourceType TAB_URL = + ThreatHit_ThreatSourceType_TAB_URL; + static constexpr ThreatSourceType TAB_REDIRECT = + ThreatHit_ThreatSourceType_TAB_REDIRECT; + static constexpr ThreatSourceType TAB_RESOURCE = + ThreatHit_ThreatSourceType_TAB_RESOURCE; + static inline bool ThreatSourceType_IsValid(int value) { + return ThreatHit_ThreatSourceType_IsValid(value); + } + static constexpr ThreatSourceType ThreatSourceType_MIN = + ThreatHit_ThreatSourceType_ThreatSourceType_MIN; + static constexpr ThreatSourceType ThreatSourceType_MAX = + ThreatHit_ThreatSourceType_ThreatSourceType_MAX; + static constexpr int ThreatSourceType_ARRAYSIZE = + ThreatHit_ThreatSourceType_ThreatSourceType_ARRAYSIZE; + template<typename T> + static inline const std::string& ThreatSourceType_Name(T enum_t_value) { + static_assert(::std::is_same<T, ThreatSourceType>::value || + ::std::is_integral<T>::value, + "Incorrect type passed to function ThreatSourceType_Name."); + return ThreatHit_ThreatSourceType_Name(enum_t_value); + } + static inline bool ThreatSourceType_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name, + ThreatSourceType* value) { + return ThreatHit_ThreatSourceType_Parse(name, value); + } + + // accessors ------------------------------------------------------- + + enum : int { + kResourcesFieldNumber = 4, + kEntryFieldNumber = 3, + kClientInfoFieldNumber = 5, + kUserInfoFieldNumber = 6, + kThreatTypeFieldNumber = 1, + kPlatformTypeFieldNumber = 2, + }; + // repeated .mozilla.safebrowsing.ThreatHit.ThreatSource resources = 4; + int resources_size() const; + private: + int _internal_resources_size() const; + public: + void clear_resources(); + ::mozilla::safebrowsing::ThreatHit_ThreatSource* mutable_resources(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::mozilla::safebrowsing::ThreatHit_ThreatSource >* + mutable_resources(); + private: + const ::mozilla::safebrowsing::ThreatHit_ThreatSource& _internal_resources(int index) const; + ::mozilla::safebrowsing::ThreatHit_ThreatSource* _internal_add_resources(); + public: + const ::mozilla::safebrowsing::ThreatHit_ThreatSource& resources(int index) const; + ::mozilla::safebrowsing::ThreatHit_ThreatSource* add_resources(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::mozilla::safebrowsing::ThreatHit_ThreatSource >& + resources() const; + + // optional .mozilla.safebrowsing.ThreatEntry entry = 3; + bool has_entry() const; + private: + bool _internal_has_entry() const; + public: + void clear_entry(); + const ::mozilla::safebrowsing::ThreatEntry& entry() const; + PROTOBUF_NODISCARD ::mozilla::safebrowsing::ThreatEntry* release_entry(); + ::mozilla::safebrowsing::ThreatEntry* mutable_entry(); + void set_allocated_entry(::mozilla::safebrowsing::ThreatEntry* entry); + private: + const ::mozilla::safebrowsing::ThreatEntry& _internal_entry() const; + ::mozilla::safebrowsing::ThreatEntry* _internal_mutable_entry(); + public: + void unsafe_arena_set_allocated_entry( + ::mozilla::safebrowsing::ThreatEntry* entry); + ::mozilla::safebrowsing::ThreatEntry* unsafe_arena_release_entry(); + + // optional .mozilla.safebrowsing.ClientInfo client_info = 5; + bool has_client_info() const; + private: + bool _internal_has_client_info() const; + public: + void clear_client_info(); + const ::mozilla::safebrowsing::ClientInfo& client_info() const; + PROTOBUF_NODISCARD ::mozilla::safebrowsing::ClientInfo* release_client_info(); + ::mozilla::safebrowsing::ClientInfo* mutable_client_info(); + void set_allocated_client_info(::mozilla::safebrowsing::ClientInfo* client_info); + private: + const ::mozilla::safebrowsing::ClientInfo& _internal_client_info() const; + ::mozilla::safebrowsing::ClientInfo* _internal_mutable_client_info(); + public: + void unsafe_arena_set_allocated_client_info( + ::mozilla::safebrowsing::ClientInfo* client_info); + ::mozilla::safebrowsing::ClientInfo* unsafe_arena_release_client_info(); + + // optional .mozilla.safebrowsing.ThreatHit.UserInfo user_info = 6; + bool has_user_info() const; + private: + bool _internal_has_user_info() const; + public: + void clear_user_info(); + const ::mozilla::safebrowsing::ThreatHit_UserInfo& user_info() const; + PROTOBUF_NODISCARD ::mozilla::safebrowsing::ThreatHit_UserInfo* release_user_info(); + ::mozilla::safebrowsing::ThreatHit_UserInfo* mutable_user_info(); + void set_allocated_user_info(::mozilla::safebrowsing::ThreatHit_UserInfo* user_info); + private: + const ::mozilla::safebrowsing::ThreatHit_UserInfo& _internal_user_info() const; + ::mozilla::safebrowsing::ThreatHit_UserInfo* _internal_mutable_user_info(); + public: + void unsafe_arena_set_allocated_user_info( + ::mozilla::safebrowsing::ThreatHit_UserInfo* user_info); + ::mozilla::safebrowsing::ThreatHit_UserInfo* unsafe_arena_release_user_info(); + + // optional .mozilla.safebrowsing.ThreatType threat_type = 1; + bool has_threat_type() const; + private: + bool _internal_has_threat_type() const; + public: + void clear_threat_type(); + ::mozilla::safebrowsing::ThreatType threat_type() const; + void set_threat_type(::mozilla::safebrowsing::ThreatType value); + private: + ::mozilla::safebrowsing::ThreatType _internal_threat_type() const; + void _internal_set_threat_type(::mozilla::safebrowsing::ThreatType value); + public: + + // optional .mozilla.safebrowsing.PlatformType platform_type = 2; + bool has_platform_type() const; + private: + bool _internal_has_platform_type() const; + public: + void clear_platform_type(); + ::mozilla::safebrowsing::PlatformType platform_type() const; + void set_platform_type(::mozilla::safebrowsing::PlatformType value); + private: + ::mozilla::safebrowsing::PlatformType _internal_platform_type() const; + void _internal_set_platform_type(::mozilla::safebrowsing::PlatformType value); + public: + + // @@protoc_insertion_point(class_scope:mozilla.safebrowsing.ThreatHit) + private: + class _Internal; + + template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::mozilla::safebrowsing::ThreatHit_ThreatSource > resources_; + ::mozilla::safebrowsing::ThreatEntry* entry_; + ::mozilla::safebrowsing::ClientInfo* client_info_; + ::mozilla::safebrowsing::ThreatHit_UserInfo* user_info_; + int threat_type_; + int platform_type_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_safebrowsing_2eproto; +}; +// ------------------------------------------------------------------- + +class ClientInfo final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:mozilla.safebrowsing.ClientInfo) */ { + public: + inline ClientInfo() : ClientInfo(nullptr) {} + ~ClientInfo() override; + explicit PROTOBUF_CONSTEXPR ClientInfo(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ClientInfo(const ClientInfo& from); + ClientInfo(ClientInfo&& from) noexcept + : ClientInfo() { + *this = ::std::move(from); + } + + inline ClientInfo& operator=(const ClientInfo& from) { + CopyFrom(from); + return *this; + } + inline ClientInfo& operator=(ClientInfo&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const std::string& unknown_fields() const { + return _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields<std::string>(); + } + + static const ClientInfo& default_instance() { + return *internal_default_instance(); + } + static inline const ClientInfo* internal_default_instance() { + return reinterpret_cast<const ClientInfo*>( + &_ClientInfo_default_instance_); + } + static constexpr int kIndexInFileMessages = + 14; + + friend void swap(ClientInfo& a, ClientInfo& b) { + a.Swap(&b); + } + inline void Swap(ClientInfo* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ClientInfo* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ClientInfo* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage<ClientInfo>(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const ClientInfo& from); + void MergeFrom(const ClientInfo& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(ClientInfo* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "mozilla.safebrowsing.ClientInfo"; + } + protected: + explicit ClientInfo(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kClientIdFieldNumber = 1, + kClientVersionFieldNumber = 2, + }; + // optional string client_id = 1; + bool has_client_id() const; + private: + bool _internal_has_client_id() const; + public: + void clear_client_id(); + const std::string& client_id() const; + template <typename ArgT0 = const std::string&, typename... ArgT> + void set_client_id(ArgT0&& arg0, ArgT... args); + std::string* mutable_client_id(); + PROTOBUF_NODISCARD std::string* release_client_id(); + void set_allocated_client_id(std::string* client_id); + private: + const std::string& _internal_client_id() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_client_id(const std::string& value); + std::string* _internal_mutable_client_id(); + public: + + // optional string client_version = 2; + bool has_client_version() const; + private: + bool _internal_has_client_version() const; + public: + void clear_client_version(); + const std::string& client_version() const; + template <typename ArgT0 = const std::string&, typename... ArgT> + void set_client_version(ArgT0&& arg0, ArgT... args); + std::string* mutable_client_version(); + PROTOBUF_NODISCARD std::string* release_client_version(); + void set_allocated_client_version(std::string* client_version); + private: + const std::string& _internal_client_version() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_client_version(const std::string& value); + std::string* _internal_mutable_client_version(); + public: + + // @@protoc_insertion_point(class_scope:mozilla.safebrowsing.ClientInfo) + private: + class _Internal; + + template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr client_id_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr client_version_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_safebrowsing_2eproto; +}; +// ------------------------------------------------------------------- + +class ChromeClientInfo final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:mozilla.safebrowsing.ChromeClientInfo) */ { + public: + inline ChromeClientInfo() : ChromeClientInfo(nullptr) {} + ~ChromeClientInfo() override; + explicit PROTOBUF_CONSTEXPR ChromeClientInfo(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ChromeClientInfo(const ChromeClientInfo& from); + ChromeClientInfo(ChromeClientInfo&& from) noexcept + : ChromeClientInfo() { + *this = ::std::move(from); + } + + inline ChromeClientInfo& operator=(const ChromeClientInfo& from) { + CopyFrom(from); + return *this; + } + inline ChromeClientInfo& operator=(ChromeClientInfo&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const std::string& unknown_fields() const { + return _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields<std::string>(); + } + + static const ChromeClientInfo& default_instance() { + return *internal_default_instance(); + } + static inline const ChromeClientInfo* internal_default_instance() { + return reinterpret_cast<const ChromeClientInfo*>( + &_ChromeClientInfo_default_instance_); + } + static constexpr int kIndexInFileMessages = + 15; + + friend void swap(ChromeClientInfo& a, ChromeClientInfo& b) { + a.Swap(&b); + } + inline void Swap(ChromeClientInfo* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ChromeClientInfo* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ChromeClientInfo* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage<ChromeClientInfo>(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const ChromeClientInfo& from); + void MergeFrom(const ChromeClientInfo& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(ChromeClientInfo* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "mozilla.safebrowsing.ChromeClientInfo"; + } + protected: + explicit ChromeClientInfo(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + typedef ChromeClientInfo_SafeBrowsingReportingPopulation SafeBrowsingReportingPopulation; + static constexpr SafeBrowsingReportingPopulation UNSPECIFIED = + ChromeClientInfo_SafeBrowsingReportingPopulation_UNSPECIFIED; + static constexpr SafeBrowsingReportingPopulation OPT_OUT = + ChromeClientInfo_SafeBrowsingReportingPopulation_OPT_OUT; + static constexpr SafeBrowsingReportingPopulation EXTENDED = + ChromeClientInfo_SafeBrowsingReportingPopulation_EXTENDED; + static constexpr SafeBrowsingReportingPopulation SCOUT = + ChromeClientInfo_SafeBrowsingReportingPopulation_SCOUT; + static inline bool SafeBrowsingReportingPopulation_IsValid(int value) { + return ChromeClientInfo_SafeBrowsingReportingPopulation_IsValid(value); + } + static constexpr SafeBrowsingReportingPopulation SafeBrowsingReportingPopulation_MIN = + ChromeClientInfo_SafeBrowsingReportingPopulation_SafeBrowsingReportingPopulation_MIN; + static constexpr SafeBrowsingReportingPopulation SafeBrowsingReportingPopulation_MAX = + ChromeClientInfo_SafeBrowsingReportingPopulation_SafeBrowsingReportingPopulation_MAX; + static constexpr int SafeBrowsingReportingPopulation_ARRAYSIZE = + ChromeClientInfo_SafeBrowsingReportingPopulation_SafeBrowsingReportingPopulation_ARRAYSIZE; + template<typename T> + static inline const std::string& SafeBrowsingReportingPopulation_Name(T enum_t_value) { + static_assert(::std::is_same<T, SafeBrowsingReportingPopulation>::value || + ::std::is_integral<T>::value, + "Incorrect type passed to function SafeBrowsingReportingPopulation_Name."); + return ChromeClientInfo_SafeBrowsingReportingPopulation_Name(enum_t_value); + } + static inline bool SafeBrowsingReportingPopulation_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name, + SafeBrowsingReportingPopulation* value) { + return ChromeClientInfo_SafeBrowsingReportingPopulation_Parse(name, value); + } + + // accessors ------------------------------------------------------- + + enum : int { + kReportingPopulationFieldNumber = 1, + }; + // optional .mozilla.safebrowsing.ChromeClientInfo.SafeBrowsingReportingPopulation reporting_population = 1; + bool has_reporting_population() const; + private: + bool _internal_has_reporting_population() const; + public: + void clear_reporting_population(); + ::mozilla::safebrowsing::ChromeClientInfo_SafeBrowsingReportingPopulation reporting_population() const; + void set_reporting_population(::mozilla::safebrowsing::ChromeClientInfo_SafeBrowsingReportingPopulation value); + private: + ::mozilla::safebrowsing::ChromeClientInfo_SafeBrowsingReportingPopulation _internal_reporting_population() const; + void _internal_set_reporting_population(::mozilla::safebrowsing::ChromeClientInfo_SafeBrowsingReportingPopulation value); + public: + + // @@protoc_insertion_point(class_scope:mozilla.safebrowsing.ChromeClientInfo) + private: + class _Internal; + + template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + int reporting_population_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_safebrowsing_2eproto; +}; +// ------------------------------------------------------------------- + +class Checksum final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:mozilla.safebrowsing.Checksum) */ { + public: + inline Checksum() : Checksum(nullptr) {} + ~Checksum() override; + explicit PROTOBUF_CONSTEXPR Checksum(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + Checksum(const Checksum& from); + Checksum(Checksum&& from) noexcept + : Checksum() { + *this = ::std::move(from); + } + + inline Checksum& operator=(const Checksum& from) { + CopyFrom(from); + return *this; + } + inline Checksum& operator=(Checksum&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const std::string& unknown_fields() const { + return _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields<std::string>(); + } + + static const Checksum& default_instance() { + return *internal_default_instance(); + } + static inline const Checksum* internal_default_instance() { + return reinterpret_cast<const Checksum*>( + &_Checksum_default_instance_); + } + static constexpr int kIndexInFileMessages = + 16; + + friend void swap(Checksum& a, Checksum& b) { + a.Swap(&b); + } + inline void Swap(Checksum* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Checksum* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + Checksum* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage<Checksum>(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const Checksum& from); + void MergeFrom(const Checksum& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(Checksum* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "mozilla.safebrowsing.Checksum"; + } + protected: + explicit Checksum(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kSha256FieldNumber = 1, + }; + // optional bytes sha256 = 1; + bool has_sha256() const; + private: + bool _internal_has_sha256() const; + public: + void clear_sha256(); + const std::string& sha256() const; + template <typename ArgT0 = const std::string&, typename... ArgT> + void set_sha256(ArgT0&& arg0, ArgT... args); + std::string* mutable_sha256(); + PROTOBUF_NODISCARD std::string* release_sha256(); + void set_allocated_sha256(std::string* sha256); + private: + const std::string& _internal_sha256() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_sha256(const std::string& value); + std::string* _internal_mutable_sha256(); + public: + + // @@protoc_insertion_point(class_scope:mozilla.safebrowsing.Checksum) + private: + class _Internal; + + template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr sha256_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_safebrowsing_2eproto; +}; +// ------------------------------------------------------------------- + +class ThreatEntry final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:mozilla.safebrowsing.ThreatEntry) */ { + public: + inline ThreatEntry() : ThreatEntry(nullptr) {} + ~ThreatEntry() override; + explicit PROTOBUF_CONSTEXPR ThreatEntry(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ThreatEntry(const ThreatEntry& from); + ThreatEntry(ThreatEntry&& from) noexcept + : ThreatEntry() { + *this = ::std::move(from); + } + + inline ThreatEntry& operator=(const ThreatEntry& from) { + CopyFrom(from); + return *this; + } + inline ThreatEntry& operator=(ThreatEntry&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const std::string& unknown_fields() const { + return _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields<std::string>(); + } + + static const ThreatEntry& default_instance() { + return *internal_default_instance(); + } + static inline const ThreatEntry* internal_default_instance() { + return reinterpret_cast<const ThreatEntry*>( + &_ThreatEntry_default_instance_); + } + static constexpr int kIndexInFileMessages = + 17; + + friend void swap(ThreatEntry& a, ThreatEntry& b) { + a.Swap(&b); + } + inline void Swap(ThreatEntry* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ThreatEntry* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ThreatEntry* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage<ThreatEntry>(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const ThreatEntry& from); + void MergeFrom(const ThreatEntry& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(ThreatEntry* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "mozilla.safebrowsing.ThreatEntry"; + } + protected: + explicit ThreatEntry(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kHashFieldNumber = 1, + kUrlFieldNumber = 2, + }; + // optional bytes hash = 1; + bool has_hash() const; + private: + bool _internal_has_hash() const; + public: + void clear_hash(); + const std::string& hash() const; + template <typename ArgT0 = const std::string&, typename... ArgT> + void set_hash(ArgT0&& arg0, ArgT... args); + std::string* mutable_hash(); + PROTOBUF_NODISCARD std::string* release_hash(); + void set_allocated_hash(std::string* hash); + private: + const std::string& _internal_hash() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_hash(const std::string& value); + std::string* _internal_mutable_hash(); + public: + + // optional string url = 2; + bool has_url() const; + private: + bool _internal_has_url() const; + public: + void clear_url(); + const std::string& url() const; + template <typename ArgT0 = const std::string&, typename... ArgT> + void set_url(ArgT0&& arg0, ArgT... args); + std::string* mutable_url(); + PROTOBUF_NODISCARD std::string* release_url(); + void set_allocated_url(std::string* url); + private: + const std::string& _internal_url() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_url(const std::string& value); + std::string* _internal_mutable_url(); + public: + + // @@protoc_insertion_point(class_scope:mozilla.safebrowsing.ThreatEntry) + private: + class _Internal; + + template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr hash_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr url_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_safebrowsing_2eproto; +}; +// ------------------------------------------------------------------- + +class ThreatEntrySet final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:mozilla.safebrowsing.ThreatEntrySet) */ { + public: + inline ThreatEntrySet() : ThreatEntrySet(nullptr) {} + ~ThreatEntrySet() override; + explicit PROTOBUF_CONSTEXPR ThreatEntrySet(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ThreatEntrySet(const ThreatEntrySet& from); + ThreatEntrySet(ThreatEntrySet&& from) noexcept + : ThreatEntrySet() { + *this = ::std::move(from); + } + + inline ThreatEntrySet& operator=(const ThreatEntrySet& from) { + CopyFrom(from); + return *this; + } + inline ThreatEntrySet& operator=(ThreatEntrySet&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const std::string& unknown_fields() const { + return _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields<std::string>(); + } + + static const ThreatEntrySet& default_instance() { + return *internal_default_instance(); + } + static inline const ThreatEntrySet* internal_default_instance() { + return reinterpret_cast<const ThreatEntrySet*>( + &_ThreatEntrySet_default_instance_); + } + static constexpr int kIndexInFileMessages = + 18; + + friend void swap(ThreatEntrySet& a, ThreatEntrySet& b) { + a.Swap(&b); + } + inline void Swap(ThreatEntrySet* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ThreatEntrySet* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ThreatEntrySet* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage<ThreatEntrySet>(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const ThreatEntrySet& from); + void MergeFrom(const ThreatEntrySet& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(ThreatEntrySet* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "mozilla.safebrowsing.ThreatEntrySet"; + } + protected: + explicit ThreatEntrySet(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kRawHashesFieldNumber = 2, + kRawIndicesFieldNumber = 3, + kRiceHashesFieldNumber = 4, + kRiceIndicesFieldNumber = 5, + kCompressionTypeFieldNumber = 1, + }; + // optional .mozilla.safebrowsing.RawHashes raw_hashes = 2; + bool has_raw_hashes() const; + private: + bool _internal_has_raw_hashes() const; + public: + void clear_raw_hashes(); + const ::mozilla::safebrowsing::RawHashes& raw_hashes() const; + PROTOBUF_NODISCARD ::mozilla::safebrowsing::RawHashes* release_raw_hashes(); + ::mozilla::safebrowsing::RawHashes* mutable_raw_hashes(); + void set_allocated_raw_hashes(::mozilla::safebrowsing::RawHashes* raw_hashes); + private: + const ::mozilla::safebrowsing::RawHashes& _internal_raw_hashes() const; + ::mozilla::safebrowsing::RawHashes* _internal_mutable_raw_hashes(); + public: + void unsafe_arena_set_allocated_raw_hashes( + ::mozilla::safebrowsing::RawHashes* raw_hashes); + ::mozilla::safebrowsing::RawHashes* unsafe_arena_release_raw_hashes(); + + // optional .mozilla.safebrowsing.RawIndices raw_indices = 3; + bool has_raw_indices() const; + private: + bool _internal_has_raw_indices() const; + public: + void clear_raw_indices(); + const ::mozilla::safebrowsing::RawIndices& raw_indices() const; + PROTOBUF_NODISCARD ::mozilla::safebrowsing::RawIndices* release_raw_indices(); + ::mozilla::safebrowsing::RawIndices* mutable_raw_indices(); + void set_allocated_raw_indices(::mozilla::safebrowsing::RawIndices* raw_indices); + private: + const ::mozilla::safebrowsing::RawIndices& _internal_raw_indices() const; + ::mozilla::safebrowsing::RawIndices* _internal_mutable_raw_indices(); + public: + void unsafe_arena_set_allocated_raw_indices( + ::mozilla::safebrowsing::RawIndices* raw_indices); + ::mozilla::safebrowsing::RawIndices* unsafe_arena_release_raw_indices(); + + // optional .mozilla.safebrowsing.RiceDeltaEncoding rice_hashes = 4; + bool has_rice_hashes() const; + private: + bool _internal_has_rice_hashes() const; + public: + void clear_rice_hashes(); + const ::mozilla::safebrowsing::RiceDeltaEncoding& rice_hashes() const; + PROTOBUF_NODISCARD ::mozilla::safebrowsing::RiceDeltaEncoding* release_rice_hashes(); + ::mozilla::safebrowsing::RiceDeltaEncoding* mutable_rice_hashes(); + void set_allocated_rice_hashes(::mozilla::safebrowsing::RiceDeltaEncoding* rice_hashes); + private: + const ::mozilla::safebrowsing::RiceDeltaEncoding& _internal_rice_hashes() const; + ::mozilla::safebrowsing::RiceDeltaEncoding* _internal_mutable_rice_hashes(); + public: + void unsafe_arena_set_allocated_rice_hashes( + ::mozilla::safebrowsing::RiceDeltaEncoding* rice_hashes); + ::mozilla::safebrowsing::RiceDeltaEncoding* unsafe_arena_release_rice_hashes(); + + // optional .mozilla.safebrowsing.RiceDeltaEncoding rice_indices = 5; + bool has_rice_indices() const; + private: + bool _internal_has_rice_indices() const; + public: + void clear_rice_indices(); + const ::mozilla::safebrowsing::RiceDeltaEncoding& rice_indices() const; + PROTOBUF_NODISCARD ::mozilla::safebrowsing::RiceDeltaEncoding* release_rice_indices(); + ::mozilla::safebrowsing::RiceDeltaEncoding* mutable_rice_indices(); + void set_allocated_rice_indices(::mozilla::safebrowsing::RiceDeltaEncoding* rice_indices); + private: + const ::mozilla::safebrowsing::RiceDeltaEncoding& _internal_rice_indices() const; + ::mozilla::safebrowsing::RiceDeltaEncoding* _internal_mutable_rice_indices(); + public: + void unsafe_arena_set_allocated_rice_indices( + ::mozilla::safebrowsing::RiceDeltaEncoding* rice_indices); + ::mozilla::safebrowsing::RiceDeltaEncoding* unsafe_arena_release_rice_indices(); + + // optional .mozilla.safebrowsing.CompressionType compression_type = 1; + bool has_compression_type() const; + private: + bool _internal_has_compression_type() const; + public: + void clear_compression_type(); + ::mozilla::safebrowsing::CompressionType compression_type() const; + void set_compression_type(::mozilla::safebrowsing::CompressionType value); + private: + ::mozilla::safebrowsing::CompressionType _internal_compression_type() const; + void _internal_set_compression_type(::mozilla::safebrowsing::CompressionType value); + public: + + // @@protoc_insertion_point(class_scope:mozilla.safebrowsing.ThreatEntrySet) + private: + class _Internal; + + template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::mozilla::safebrowsing::RawHashes* raw_hashes_; + ::mozilla::safebrowsing::RawIndices* raw_indices_; + ::mozilla::safebrowsing::RiceDeltaEncoding* rice_hashes_; + ::mozilla::safebrowsing::RiceDeltaEncoding* rice_indices_; + int compression_type_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_safebrowsing_2eproto; +}; +// ------------------------------------------------------------------- + +class RawIndices final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:mozilla.safebrowsing.RawIndices) */ { + public: + inline RawIndices() : RawIndices(nullptr) {} + ~RawIndices() override; + explicit PROTOBUF_CONSTEXPR RawIndices(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + RawIndices(const RawIndices& from); + RawIndices(RawIndices&& from) noexcept + : RawIndices() { + *this = ::std::move(from); + } + + inline RawIndices& operator=(const RawIndices& from) { + CopyFrom(from); + return *this; + } + inline RawIndices& operator=(RawIndices&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const std::string& unknown_fields() const { + return _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields<std::string>(); + } + + static const RawIndices& default_instance() { + return *internal_default_instance(); + } + static inline const RawIndices* internal_default_instance() { + return reinterpret_cast<const RawIndices*>( + &_RawIndices_default_instance_); + } + static constexpr int kIndexInFileMessages = + 19; + + friend void swap(RawIndices& a, RawIndices& b) { + a.Swap(&b); + } + inline void Swap(RawIndices* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(RawIndices* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + RawIndices* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage<RawIndices>(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const RawIndices& from); + void MergeFrom(const RawIndices& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(RawIndices* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "mozilla.safebrowsing.RawIndices"; + } + protected: + explicit RawIndices(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kIndicesFieldNumber = 1, + }; + // repeated int32 indices = 1; + int indices_size() const; + private: + int _internal_indices_size() const; + public: + void clear_indices(); + private: + int32_t _internal_indices(int index) const; + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >& + _internal_indices() const; + void _internal_add_indices(int32_t value); + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >* + _internal_mutable_indices(); + public: + int32_t indices(int index) const; + void set_indices(int index, int32_t value); + void add_indices(int32_t value); + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >& + indices() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >* + mutable_indices(); + + // @@protoc_insertion_point(class_scope:mozilla.safebrowsing.RawIndices) + private: + class _Internal; + + template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t > indices_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_safebrowsing_2eproto; +}; +// ------------------------------------------------------------------- + +class RawHashes final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:mozilla.safebrowsing.RawHashes) */ { + public: + inline RawHashes() : RawHashes(nullptr) {} + ~RawHashes() override; + explicit PROTOBUF_CONSTEXPR RawHashes(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + RawHashes(const RawHashes& from); + RawHashes(RawHashes&& from) noexcept + : RawHashes() { + *this = ::std::move(from); + } + + inline RawHashes& operator=(const RawHashes& from) { + CopyFrom(from); + return *this; + } + inline RawHashes& operator=(RawHashes&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const std::string& unknown_fields() const { + return _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields<std::string>(); + } + + static const RawHashes& default_instance() { + return *internal_default_instance(); + } + static inline const RawHashes* internal_default_instance() { + return reinterpret_cast<const RawHashes*>( + &_RawHashes_default_instance_); + } + static constexpr int kIndexInFileMessages = + 20; + + friend void swap(RawHashes& a, RawHashes& b) { + a.Swap(&b); + } + inline void Swap(RawHashes* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(RawHashes* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + RawHashes* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage<RawHashes>(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const RawHashes& from); + void MergeFrom(const RawHashes& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(RawHashes* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "mozilla.safebrowsing.RawHashes"; + } + protected: + explicit RawHashes(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kRawHashesFieldNumber = 2, + kPrefixSizeFieldNumber = 1, + }; + // optional bytes raw_hashes = 2; + bool has_raw_hashes() const; + private: + bool _internal_has_raw_hashes() const; + public: + void clear_raw_hashes(); + const std::string& raw_hashes() const; + template <typename ArgT0 = const std::string&, typename... ArgT> + void set_raw_hashes(ArgT0&& arg0, ArgT... args); + std::string* mutable_raw_hashes(); + PROTOBUF_NODISCARD std::string* release_raw_hashes(); + void set_allocated_raw_hashes(std::string* raw_hashes); + private: + const std::string& _internal_raw_hashes() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_raw_hashes(const std::string& value); + std::string* _internal_mutable_raw_hashes(); + public: + + // optional int32 prefix_size = 1; + bool has_prefix_size() const; + private: + bool _internal_has_prefix_size() const; + public: + void clear_prefix_size(); + int32_t prefix_size() const; + void set_prefix_size(int32_t value); + private: + int32_t _internal_prefix_size() const; + void _internal_set_prefix_size(int32_t value); + public: + + // @@protoc_insertion_point(class_scope:mozilla.safebrowsing.RawHashes) + private: + class _Internal; + + template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr raw_hashes_; + int32_t prefix_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_safebrowsing_2eproto; +}; +// ------------------------------------------------------------------- + +class RiceDeltaEncoding final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:mozilla.safebrowsing.RiceDeltaEncoding) */ { + public: + inline RiceDeltaEncoding() : RiceDeltaEncoding(nullptr) {} + ~RiceDeltaEncoding() override; + explicit PROTOBUF_CONSTEXPR RiceDeltaEncoding(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + RiceDeltaEncoding(const RiceDeltaEncoding& from); + RiceDeltaEncoding(RiceDeltaEncoding&& from) noexcept + : RiceDeltaEncoding() { + *this = ::std::move(from); + } + + inline RiceDeltaEncoding& operator=(const RiceDeltaEncoding& from) { + CopyFrom(from); + return *this; + } + inline RiceDeltaEncoding& operator=(RiceDeltaEncoding&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const std::string& unknown_fields() const { + return _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields<std::string>(); + } + + static const RiceDeltaEncoding& default_instance() { + return *internal_default_instance(); + } + static inline const RiceDeltaEncoding* internal_default_instance() { + return reinterpret_cast<const RiceDeltaEncoding*>( + &_RiceDeltaEncoding_default_instance_); + } + static constexpr int kIndexInFileMessages = + 21; + + friend void swap(RiceDeltaEncoding& a, RiceDeltaEncoding& b) { + a.Swap(&b); + } + inline void Swap(RiceDeltaEncoding* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(RiceDeltaEncoding* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + RiceDeltaEncoding* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage<RiceDeltaEncoding>(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const RiceDeltaEncoding& from); + void MergeFrom(const RiceDeltaEncoding& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(RiceDeltaEncoding* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "mozilla.safebrowsing.RiceDeltaEncoding"; + } + protected: + explicit RiceDeltaEncoding(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kEncodedDataFieldNumber = 4, + kFirstValueFieldNumber = 1, + kRiceParameterFieldNumber = 2, + kNumEntriesFieldNumber = 3, + }; + // optional bytes encoded_data = 4; + bool has_encoded_data() const; + private: + bool _internal_has_encoded_data() const; + public: + void clear_encoded_data(); + const std::string& encoded_data() const; + template <typename ArgT0 = const std::string&, typename... ArgT> + void set_encoded_data(ArgT0&& arg0, ArgT... args); + std::string* mutable_encoded_data(); + PROTOBUF_NODISCARD std::string* release_encoded_data(); + void set_allocated_encoded_data(std::string* encoded_data); + private: + const std::string& _internal_encoded_data() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_encoded_data(const std::string& value); + std::string* _internal_mutable_encoded_data(); + public: + + // optional int64 first_value = 1; + bool has_first_value() const; + private: + bool _internal_has_first_value() const; + public: + void clear_first_value(); + int64_t first_value() const; + void set_first_value(int64_t value); + private: + int64_t _internal_first_value() const; + void _internal_set_first_value(int64_t value); + public: + + // optional int32 rice_parameter = 2; + bool has_rice_parameter() const; + private: + bool _internal_has_rice_parameter() const; + public: + void clear_rice_parameter(); + int32_t rice_parameter() const; + void set_rice_parameter(int32_t value); + private: + int32_t _internal_rice_parameter() const; + void _internal_set_rice_parameter(int32_t value); + public: + + // optional int32 num_entries = 3; + bool has_num_entries() const; + private: + bool _internal_has_num_entries() const; + public: + void clear_num_entries(); + int32_t num_entries() const; + void set_num_entries(int32_t value); + private: + int32_t _internal_num_entries() const; + void _internal_set_num_entries(int32_t value); + public: + + // @@protoc_insertion_point(class_scope:mozilla.safebrowsing.RiceDeltaEncoding) + private: + class _Internal; + + template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr encoded_data_; + int64_t first_value_; + int32_t rice_parameter_; + int32_t num_entries_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_safebrowsing_2eproto; +}; +// ------------------------------------------------------------------- + +class ThreatEntryMetadata_MetadataEntry final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:mozilla.safebrowsing.ThreatEntryMetadata.MetadataEntry) */ { + public: + inline ThreatEntryMetadata_MetadataEntry() : ThreatEntryMetadata_MetadataEntry(nullptr) {} + ~ThreatEntryMetadata_MetadataEntry() override; + explicit PROTOBUF_CONSTEXPR ThreatEntryMetadata_MetadataEntry(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ThreatEntryMetadata_MetadataEntry(const ThreatEntryMetadata_MetadataEntry& from); + ThreatEntryMetadata_MetadataEntry(ThreatEntryMetadata_MetadataEntry&& from) noexcept + : ThreatEntryMetadata_MetadataEntry() { + *this = ::std::move(from); + } + + inline ThreatEntryMetadata_MetadataEntry& operator=(const ThreatEntryMetadata_MetadataEntry& from) { + CopyFrom(from); + return *this; + } + inline ThreatEntryMetadata_MetadataEntry& operator=(ThreatEntryMetadata_MetadataEntry&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const std::string& unknown_fields() const { + return _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields<std::string>(); + } + + static const ThreatEntryMetadata_MetadataEntry& default_instance() { + return *internal_default_instance(); + } + static inline const ThreatEntryMetadata_MetadataEntry* internal_default_instance() { + return reinterpret_cast<const ThreatEntryMetadata_MetadataEntry*>( + &_ThreatEntryMetadata_MetadataEntry_default_instance_); + } + static constexpr int kIndexInFileMessages = + 22; + + friend void swap(ThreatEntryMetadata_MetadataEntry& a, ThreatEntryMetadata_MetadataEntry& b) { + a.Swap(&b); + } + inline void Swap(ThreatEntryMetadata_MetadataEntry* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ThreatEntryMetadata_MetadataEntry* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ThreatEntryMetadata_MetadataEntry* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage<ThreatEntryMetadata_MetadataEntry>(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const ThreatEntryMetadata_MetadataEntry& from); + void MergeFrom(const ThreatEntryMetadata_MetadataEntry& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(ThreatEntryMetadata_MetadataEntry* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "mozilla.safebrowsing.ThreatEntryMetadata.MetadataEntry"; + } + protected: + explicit ThreatEntryMetadata_MetadataEntry(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kKeyFieldNumber = 1, + kValueFieldNumber = 2, + }; + // optional bytes key = 1; + bool has_key() const; + private: + bool _internal_has_key() const; + public: + void clear_key(); + const std::string& key() const; + template <typename ArgT0 = const std::string&, typename... ArgT> + void set_key(ArgT0&& arg0, ArgT... args); + std::string* mutable_key(); + PROTOBUF_NODISCARD std::string* release_key(); + void set_allocated_key(std::string* key); + private: + const std::string& _internal_key() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_key(const std::string& value); + std::string* _internal_mutable_key(); + public: + + // optional bytes value = 2; + bool has_value() const; + private: + bool _internal_has_value() const; + public: + void clear_value(); + const std::string& value() const; + template <typename ArgT0 = const std::string&, typename... ArgT> + void set_value(ArgT0&& arg0, ArgT... args); + std::string* mutable_value(); + PROTOBUF_NODISCARD std::string* release_value(); + void set_allocated_value(std::string* value); + private: + const std::string& _internal_value() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_value(const std::string& value); + std::string* _internal_mutable_value(); + public: + + // @@protoc_insertion_point(class_scope:mozilla.safebrowsing.ThreatEntryMetadata.MetadataEntry) + private: + class _Internal; + + template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr key_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr value_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_safebrowsing_2eproto; +}; +// ------------------------------------------------------------------- + +class ThreatEntryMetadata final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:mozilla.safebrowsing.ThreatEntryMetadata) */ { + public: + inline ThreatEntryMetadata() : ThreatEntryMetadata(nullptr) {} + ~ThreatEntryMetadata() override; + explicit PROTOBUF_CONSTEXPR ThreatEntryMetadata(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ThreatEntryMetadata(const ThreatEntryMetadata& from); + ThreatEntryMetadata(ThreatEntryMetadata&& from) noexcept + : ThreatEntryMetadata() { + *this = ::std::move(from); + } + + inline ThreatEntryMetadata& operator=(const ThreatEntryMetadata& from) { + CopyFrom(from); + return *this; + } + inline ThreatEntryMetadata& operator=(ThreatEntryMetadata&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const std::string& unknown_fields() const { + return _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields<std::string>(); + } + + static const ThreatEntryMetadata& default_instance() { + return *internal_default_instance(); + } + static inline const ThreatEntryMetadata* internal_default_instance() { + return reinterpret_cast<const ThreatEntryMetadata*>( + &_ThreatEntryMetadata_default_instance_); + } + static constexpr int kIndexInFileMessages = + 23; + + friend void swap(ThreatEntryMetadata& a, ThreatEntryMetadata& b) { + a.Swap(&b); + } + inline void Swap(ThreatEntryMetadata* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ThreatEntryMetadata* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ThreatEntryMetadata* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage<ThreatEntryMetadata>(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const ThreatEntryMetadata& from); + void MergeFrom(const ThreatEntryMetadata& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(ThreatEntryMetadata* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "mozilla.safebrowsing.ThreatEntryMetadata"; + } + protected: + explicit ThreatEntryMetadata(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + typedef ThreatEntryMetadata_MetadataEntry MetadataEntry; + + // accessors ------------------------------------------------------- + + enum : int { + kEntriesFieldNumber = 1, + }; + // repeated .mozilla.safebrowsing.ThreatEntryMetadata.MetadataEntry entries = 1; + int entries_size() const; + private: + int _internal_entries_size() const; + public: + void clear_entries(); + ::mozilla::safebrowsing::ThreatEntryMetadata_MetadataEntry* mutable_entries(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::mozilla::safebrowsing::ThreatEntryMetadata_MetadataEntry >* + mutable_entries(); + private: + const ::mozilla::safebrowsing::ThreatEntryMetadata_MetadataEntry& _internal_entries(int index) const; + ::mozilla::safebrowsing::ThreatEntryMetadata_MetadataEntry* _internal_add_entries(); + public: + const ::mozilla::safebrowsing::ThreatEntryMetadata_MetadataEntry& entries(int index) const; + ::mozilla::safebrowsing::ThreatEntryMetadata_MetadataEntry* add_entries(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::mozilla::safebrowsing::ThreatEntryMetadata_MetadataEntry >& + entries() const; + + // @@protoc_insertion_point(class_scope:mozilla.safebrowsing.ThreatEntryMetadata) + private: + class _Internal; + + template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::mozilla::safebrowsing::ThreatEntryMetadata_MetadataEntry > entries_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_safebrowsing_2eproto; +}; +// ------------------------------------------------------------------- + +class ThreatListDescriptor final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:mozilla.safebrowsing.ThreatListDescriptor) */ { + public: + inline ThreatListDescriptor() : ThreatListDescriptor(nullptr) {} + ~ThreatListDescriptor() override; + explicit PROTOBUF_CONSTEXPR ThreatListDescriptor(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ThreatListDescriptor(const ThreatListDescriptor& from); + ThreatListDescriptor(ThreatListDescriptor&& from) noexcept + : ThreatListDescriptor() { + *this = ::std::move(from); + } + + inline ThreatListDescriptor& operator=(const ThreatListDescriptor& from) { + CopyFrom(from); + return *this; + } + inline ThreatListDescriptor& operator=(ThreatListDescriptor&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const std::string& unknown_fields() const { + return _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields<std::string>(); + } + + static const ThreatListDescriptor& default_instance() { + return *internal_default_instance(); + } + static inline const ThreatListDescriptor* internal_default_instance() { + return reinterpret_cast<const ThreatListDescriptor*>( + &_ThreatListDescriptor_default_instance_); + } + static constexpr int kIndexInFileMessages = + 24; + + friend void swap(ThreatListDescriptor& a, ThreatListDescriptor& b) { + a.Swap(&b); + } + inline void Swap(ThreatListDescriptor* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ThreatListDescriptor* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ThreatListDescriptor* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage<ThreatListDescriptor>(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const ThreatListDescriptor& from); + void MergeFrom(const ThreatListDescriptor& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(ThreatListDescriptor* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "mozilla.safebrowsing.ThreatListDescriptor"; + } + protected: + explicit ThreatListDescriptor(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kThreatTypeFieldNumber = 1, + kPlatformTypeFieldNumber = 2, + kThreatEntryTypeFieldNumber = 3, + }; + // optional .mozilla.safebrowsing.ThreatType threat_type = 1; + bool has_threat_type() const; + private: + bool _internal_has_threat_type() const; + public: + void clear_threat_type(); + ::mozilla::safebrowsing::ThreatType threat_type() const; + void set_threat_type(::mozilla::safebrowsing::ThreatType value); + private: + ::mozilla::safebrowsing::ThreatType _internal_threat_type() const; + void _internal_set_threat_type(::mozilla::safebrowsing::ThreatType value); + public: + + // optional .mozilla.safebrowsing.PlatformType platform_type = 2; + bool has_platform_type() const; + private: + bool _internal_has_platform_type() const; + public: + void clear_platform_type(); + ::mozilla::safebrowsing::PlatformType platform_type() const; + void set_platform_type(::mozilla::safebrowsing::PlatformType value); + private: + ::mozilla::safebrowsing::PlatformType _internal_platform_type() const; + void _internal_set_platform_type(::mozilla::safebrowsing::PlatformType value); + public: + + // optional .mozilla.safebrowsing.ThreatEntryType threat_entry_type = 3; + bool has_threat_entry_type() const; + private: + bool _internal_has_threat_entry_type() const; + public: + void clear_threat_entry_type(); + ::mozilla::safebrowsing::ThreatEntryType threat_entry_type() const; + void set_threat_entry_type(::mozilla::safebrowsing::ThreatEntryType value); + private: + ::mozilla::safebrowsing::ThreatEntryType _internal_threat_entry_type() const; + void _internal_set_threat_entry_type(::mozilla::safebrowsing::ThreatEntryType value); + public: + + // @@protoc_insertion_point(class_scope:mozilla.safebrowsing.ThreatListDescriptor) + private: + class _Internal; + + template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + int threat_type_; + int platform_type_; + int threat_entry_type_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_safebrowsing_2eproto; +}; +// ------------------------------------------------------------------- + +class ListThreatListsResponse final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:mozilla.safebrowsing.ListThreatListsResponse) */ { + public: + inline ListThreatListsResponse() : ListThreatListsResponse(nullptr) {} + ~ListThreatListsResponse() override; + explicit PROTOBUF_CONSTEXPR ListThreatListsResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ListThreatListsResponse(const ListThreatListsResponse& from); + ListThreatListsResponse(ListThreatListsResponse&& from) noexcept + : ListThreatListsResponse() { + *this = ::std::move(from); + } + + inline ListThreatListsResponse& operator=(const ListThreatListsResponse& from) { + CopyFrom(from); + return *this; + } + inline ListThreatListsResponse& operator=(ListThreatListsResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const std::string& unknown_fields() const { + return _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields<std::string>(); + } + + static const ListThreatListsResponse& default_instance() { + return *internal_default_instance(); + } + static inline const ListThreatListsResponse* internal_default_instance() { + return reinterpret_cast<const ListThreatListsResponse*>( + &_ListThreatListsResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 25; + + friend void swap(ListThreatListsResponse& a, ListThreatListsResponse& b) { + a.Swap(&b); + } + inline void Swap(ListThreatListsResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ListThreatListsResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ListThreatListsResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage<ListThreatListsResponse>(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const ListThreatListsResponse& from); + void MergeFrom(const ListThreatListsResponse& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(ListThreatListsResponse* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "mozilla.safebrowsing.ListThreatListsResponse"; + } + protected: + explicit ListThreatListsResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kThreatListsFieldNumber = 1, + }; + // repeated .mozilla.safebrowsing.ThreatListDescriptor threat_lists = 1; + int threat_lists_size() const; + private: + int _internal_threat_lists_size() const; + public: + void clear_threat_lists(); + ::mozilla::safebrowsing::ThreatListDescriptor* mutable_threat_lists(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::mozilla::safebrowsing::ThreatListDescriptor >* + mutable_threat_lists(); + private: + const ::mozilla::safebrowsing::ThreatListDescriptor& _internal_threat_lists(int index) const; + ::mozilla::safebrowsing::ThreatListDescriptor* _internal_add_threat_lists(); + public: + const ::mozilla::safebrowsing::ThreatListDescriptor& threat_lists(int index) const; + ::mozilla::safebrowsing::ThreatListDescriptor* add_threat_lists(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::mozilla::safebrowsing::ThreatListDescriptor >& + threat_lists() const; + + // @@protoc_insertion_point(class_scope:mozilla.safebrowsing.ListThreatListsResponse) + private: + class _Internal; + + template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::mozilla::safebrowsing::ThreatListDescriptor > threat_lists_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_safebrowsing_2eproto; +}; +// ------------------------------------------------------------------- + +class Duration final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:mozilla.safebrowsing.Duration) */ { + public: + inline Duration() : Duration(nullptr) {} + ~Duration() override; + explicit PROTOBUF_CONSTEXPR Duration(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + Duration(const Duration& from); + Duration(Duration&& from) noexcept + : Duration() { + *this = ::std::move(from); + } + + inline Duration& operator=(const Duration& from) { + CopyFrom(from); + return *this; + } + inline Duration& operator=(Duration&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const std::string& unknown_fields() const { + return _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields<std::string>(); + } + + static const Duration& default_instance() { + return *internal_default_instance(); + } + static inline const Duration* internal_default_instance() { + return reinterpret_cast<const Duration*>( + &_Duration_default_instance_); + } + static constexpr int kIndexInFileMessages = + 26; + + friend void swap(Duration& a, Duration& b) { + a.Swap(&b); + } + inline void Swap(Duration* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Duration* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + Duration* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage<Duration>(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const Duration& from); + void MergeFrom(const Duration& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(Duration* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "mozilla.safebrowsing.Duration"; + } + protected: + explicit Duration(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kSecondsFieldNumber = 1, + kNanosFieldNumber = 2, + }; + // optional int64 seconds = 1; + bool has_seconds() const; + private: + bool _internal_has_seconds() const; + public: + void clear_seconds(); + int64_t seconds() const; + void set_seconds(int64_t value); + private: + int64_t _internal_seconds() const; + void _internal_set_seconds(int64_t value); + public: + + // optional int32 nanos = 2; + bool has_nanos() const; + private: + bool _internal_has_nanos() const; + public: + void clear_nanos(); + int32_t nanos() const; + void set_nanos(int32_t value); + private: + int32_t _internal_nanos() const; + void _internal_set_nanos(int32_t value); + public: + + // @@protoc_insertion_point(class_scope:mozilla.safebrowsing.Duration) + private: + class _Internal; + + template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + int64_t seconds_; + int32_t nanos_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_safebrowsing_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// ThreatInfo + +// repeated .mozilla.safebrowsing.ThreatType threat_types = 1; +inline int ThreatInfo::_internal_threat_types_size() const { + return _impl_.threat_types_.size(); +} +inline int ThreatInfo::threat_types_size() const { + return _internal_threat_types_size(); +} +inline void ThreatInfo::clear_threat_types() { + _impl_.threat_types_.Clear(); +} +inline ::mozilla::safebrowsing::ThreatType ThreatInfo::_internal_threat_types(int index) const { + return static_cast< ::mozilla::safebrowsing::ThreatType >(_impl_.threat_types_.Get(index)); +} +inline ::mozilla::safebrowsing::ThreatType ThreatInfo::threat_types(int index) const { + // @@protoc_insertion_point(field_get:mozilla.safebrowsing.ThreatInfo.threat_types) + return _internal_threat_types(index); +} +inline void ThreatInfo::set_threat_types(int index, ::mozilla::safebrowsing::ThreatType value) { + assert(::mozilla::safebrowsing::ThreatType_IsValid(value)); + _impl_.threat_types_.Set(index, value); + // @@protoc_insertion_point(field_set:mozilla.safebrowsing.ThreatInfo.threat_types) +} +inline void ThreatInfo::_internal_add_threat_types(::mozilla::safebrowsing::ThreatType value) { + assert(::mozilla::safebrowsing::ThreatType_IsValid(value)); + _impl_.threat_types_.Add(value); +} +inline void ThreatInfo::add_threat_types(::mozilla::safebrowsing::ThreatType value) { + _internal_add_threat_types(value); + // @@protoc_insertion_point(field_add:mozilla.safebrowsing.ThreatInfo.threat_types) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField<int>& +ThreatInfo::threat_types() const { + // @@protoc_insertion_point(field_list:mozilla.safebrowsing.ThreatInfo.threat_types) + return _impl_.threat_types_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField<int>* +ThreatInfo::_internal_mutable_threat_types() { + return &_impl_.threat_types_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField<int>* +ThreatInfo::mutable_threat_types() { + // @@protoc_insertion_point(field_mutable_list:mozilla.safebrowsing.ThreatInfo.threat_types) + return _internal_mutable_threat_types(); +} + +// repeated .mozilla.safebrowsing.PlatformType platform_types = 2; +inline int ThreatInfo::_internal_platform_types_size() const { + return _impl_.platform_types_.size(); +} +inline int ThreatInfo::platform_types_size() const { + return _internal_platform_types_size(); +} +inline void ThreatInfo::clear_platform_types() { + _impl_.platform_types_.Clear(); +} +inline ::mozilla::safebrowsing::PlatformType ThreatInfo::_internal_platform_types(int index) const { + return static_cast< ::mozilla::safebrowsing::PlatformType >(_impl_.platform_types_.Get(index)); +} +inline ::mozilla::safebrowsing::PlatformType ThreatInfo::platform_types(int index) const { + // @@protoc_insertion_point(field_get:mozilla.safebrowsing.ThreatInfo.platform_types) + return _internal_platform_types(index); +} +inline void ThreatInfo::set_platform_types(int index, ::mozilla::safebrowsing::PlatformType value) { + assert(::mozilla::safebrowsing::PlatformType_IsValid(value)); + _impl_.platform_types_.Set(index, value); + // @@protoc_insertion_point(field_set:mozilla.safebrowsing.ThreatInfo.platform_types) +} +inline void ThreatInfo::_internal_add_platform_types(::mozilla::safebrowsing::PlatformType value) { + assert(::mozilla::safebrowsing::PlatformType_IsValid(value)); + _impl_.platform_types_.Add(value); +} +inline void ThreatInfo::add_platform_types(::mozilla::safebrowsing::PlatformType value) { + _internal_add_platform_types(value); + // @@protoc_insertion_point(field_add:mozilla.safebrowsing.ThreatInfo.platform_types) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField<int>& +ThreatInfo::platform_types() const { + // @@protoc_insertion_point(field_list:mozilla.safebrowsing.ThreatInfo.platform_types) + return _impl_.platform_types_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField<int>* +ThreatInfo::_internal_mutable_platform_types() { + return &_impl_.platform_types_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField<int>* +ThreatInfo::mutable_platform_types() { + // @@protoc_insertion_point(field_mutable_list:mozilla.safebrowsing.ThreatInfo.platform_types) + return _internal_mutable_platform_types(); +} + +// repeated .mozilla.safebrowsing.ThreatEntryType threat_entry_types = 4; +inline int ThreatInfo::_internal_threat_entry_types_size() const { + return _impl_.threat_entry_types_.size(); +} +inline int ThreatInfo::threat_entry_types_size() const { + return _internal_threat_entry_types_size(); +} +inline void ThreatInfo::clear_threat_entry_types() { + _impl_.threat_entry_types_.Clear(); +} +inline ::mozilla::safebrowsing::ThreatEntryType ThreatInfo::_internal_threat_entry_types(int index) const { + return static_cast< ::mozilla::safebrowsing::ThreatEntryType >(_impl_.threat_entry_types_.Get(index)); +} +inline ::mozilla::safebrowsing::ThreatEntryType ThreatInfo::threat_entry_types(int index) const { + // @@protoc_insertion_point(field_get:mozilla.safebrowsing.ThreatInfo.threat_entry_types) + return _internal_threat_entry_types(index); +} +inline void ThreatInfo::set_threat_entry_types(int index, ::mozilla::safebrowsing::ThreatEntryType value) { + assert(::mozilla::safebrowsing::ThreatEntryType_IsValid(value)); + _impl_.threat_entry_types_.Set(index, value); + // @@protoc_insertion_point(field_set:mozilla.safebrowsing.ThreatInfo.threat_entry_types) +} +inline void ThreatInfo::_internal_add_threat_entry_types(::mozilla::safebrowsing::ThreatEntryType value) { + assert(::mozilla::safebrowsing::ThreatEntryType_IsValid(value)); + _impl_.threat_entry_types_.Add(value); +} +inline void ThreatInfo::add_threat_entry_types(::mozilla::safebrowsing::ThreatEntryType value) { + _internal_add_threat_entry_types(value); + // @@protoc_insertion_point(field_add:mozilla.safebrowsing.ThreatInfo.threat_entry_types) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField<int>& +ThreatInfo::threat_entry_types() const { + // @@protoc_insertion_point(field_list:mozilla.safebrowsing.ThreatInfo.threat_entry_types) + return _impl_.threat_entry_types_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField<int>* +ThreatInfo::_internal_mutable_threat_entry_types() { + return &_impl_.threat_entry_types_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField<int>* +ThreatInfo::mutable_threat_entry_types() { + // @@protoc_insertion_point(field_mutable_list:mozilla.safebrowsing.ThreatInfo.threat_entry_types) + return _internal_mutable_threat_entry_types(); +} + +// repeated .mozilla.safebrowsing.ThreatEntry threat_entries = 3; +inline int ThreatInfo::_internal_threat_entries_size() const { + return _impl_.threat_entries_.size(); +} +inline int ThreatInfo::threat_entries_size() const { + return _internal_threat_entries_size(); +} +inline void ThreatInfo::clear_threat_entries() { + _impl_.threat_entries_.Clear(); +} +inline ::mozilla::safebrowsing::ThreatEntry* ThreatInfo::mutable_threat_entries(int index) { + // @@protoc_insertion_point(field_mutable:mozilla.safebrowsing.ThreatInfo.threat_entries) + return _impl_.threat_entries_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::mozilla::safebrowsing::ThreatEntry >* +ThreatInfo::mutable_threat_entries() { + // @@protoc_insertion_point(field_mutable_list:mozilla.safebrowsing.ThreatInfo.threat_entries) + return &_impl_.threat_entries_; +} +inline const ::mozilla::safebrowsing::ThreatEntry& ThreatInfo::_internal_threat_entries(int index) const { + return _impl_.threat_entries_.Get(index); +} +inline const ::mozilla::safebrowsing::ThreatEntry& ThreatInfo::threat_entries(int index) const { + // @@protoc_insertion_point(field_get:mozilla.safebrowsing.ThreatInfo.threat_entries) + return _internal_threat_entries(index); +} +inline ::mozilla::safebrowsing::ThreatEntry* ThreatInfo::_internal_add_threat_entries() { + return _impl_.threat_entries_.Add(); +} +inline ::mozilla::safebrowsing::ThreatEntry* ThreatInfo::add_threat_entries() { + ::mozilla::safebrowsing::ThreatEntry* _add = _internal_add_threat_entries(); + // @@protoc_insertion_point(field_add:mozilla.safebrowsing.ThreatInfo.threat_entries) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::mozilla::safebrowsing::ThreatEntry >& +ThreatInfo::threat_entries() const { + // @@protoc_insertion_point(field_list:mozilla.safebrowsing.ThreatInfo.threat_entries) + return _impl_.threat_entries_; +} + +// ------------------------------------------------------------------- + +// ThreatMatch + +// optional .mozilla.safebrowsing.ThreatType threat_type = 1; +inline bool ThreatMatch::_internal_has_threat_type() const { + bool value = (_impl_._has_bits_[0] & 0x00000008u) != 0; + return value; +} +inline bool ThreatMatch::has_threat_type() const { + return _internal_has_threat_type(); +} +inline void ThreatMatch::clear_threat_type() { + _impl_.threat_type_ = 0; + _impl_._has_bits_[0] &= ~0x00000008u; +} +inline ::mozilla::safebrowsing::ThreatType ThreatMatch::_internal_threat_type() const { + return static_cast< ::mozilla::safebrowsing::ThreatType >(_impl_.threat_type_); +} +inline ::mozilla::safebrowsing::ThreatType ThreatMatch::threat_type() const { + // @@protoc_insertion_point(field_get:mozilla.safebrowsing.ThreatMatch.threat_type) + return _internal_threat_type(); +} +inline void ThreatMatch::_internal_set_threat_type(::mozilla::safebrowsing::ThreatType value) { + assert(::mozilla::safebrowsing::ThreatType_IsValid(value)); + _impl_._has_bits_[0] |= 0x00000008u; + _impl_.threat_type_ = value; +} +inline void ThreatMatch::set_threat_type(::mozilla::safebrowsing::ThreatType value) { + _internal_set_threat_type(value); + // @@protoc_insertion_point(field_set:mozilla.safebrowsing.ThreatMatch.threat_type) +} + +// optional .mozilla.safebrowsing.PlatformType platform_type = 2; +inline bool ThreatMatch::_internal_has_platform_type() const { + bool value = (_impl_._has_bits_[0] & 0x00000010u) != 0; + return value; +} +inline bool ThreatMatch::has_platform_type() const { + return _internal_has_platform_type(); +} +inline void ThreatMatch::clear_platform_type() { + _impl_.platform_type_ = 0; + _impl_._has_bits_[0] &= ~0x00000010u; +} +inline ::mozilla::safebrowsing::PlatformType ThreatMatch::_internal_platform_type() const { + return static_cast< ::mozilla::safebrowsing::PlatformType >(_impl_.platform_type_); +} +inline ::mozilla::safebrowsing::PlatformType ThreatMatch::platform_type() const { + // @@protoc_insertion_point(field_get:mozilla.safebrowsing.ThreatMatch.platform_type) + return _internal_platform_type(); +} +inline void ThreatMatch::_internal_set_platform_type(::mozilla::safebrowsing::PlatformType value) { + assert(::mozilla::safebrowsing::PlatformType_IsValid(value)); + _impl_._has_bits_[0] |= 0x00000010u; + _impl_.platform_type_ = value; +} +inline void ThreatMatch::set_platform_type(::mozilla::safebrowsing::PlatformType value) { + _internal_set_platform_type(value); + // @@protoc_insertion_point(field_set:mozilla.safebrowsing.ThreatMatch.platform_type) +} + +// optional .mozilla.safebrowsing.ThreatEntryType threat_entry_type = 6; +inline bool ThreatMatch::_internal_has_threat_entry_type() const { + bool value = (_impl_._has_bits_[0] & 0x00000020u) != 0; + return value; +} +inline bool ThreatMatch::has_threat_entry_type() const { + return _internal_has_threat_entry_type(); +} +inline void ThreatMatch::clear_threat_entry_type() { + _impl_.threat_entry_type_ = 0; + _impl_._has_bits_[0] &= ~0x00000020u; +} +inline ::mozilla::safebrowsing::ThreatEntryType ThreatMatch::_internal_threat_entry_type() const { + return static_cast< ::mozilla::safebrowsing::ThreatEntryType >(_impl_.threat_entry_type_); +} +inline ::mozilla::safebrowsing::ThreatEntryType ThreatMatch::threat_entry_type() const { + // @@protoc_insertion_point(field_get:mozilla.safebrowsing.ThreatMatch.threat_entry_type) + return _internal_threat_entry_type(); +} +inline void ThreatMatch::_internal_set_threat_entry_type(::mozilla::safebrowsing::ThreatEntryType value) { + assert(::mozilla::safebrowsing::ThreatEntryType_IsValid(value)); + _impl_._has_bits_[0] |= 0x00000020u; + _impl_.threat_entry_type_ = value; +} +inline void ThreatMatch::set_threat_entry_type(::mozilla::safebrowsing::ThreatEntryType value) { + _internal_set_threat_entry_type(value); + // @@protoc_insertion_point(field_set:mozilla.safebrowsing.ThreatMatch.threat_entry_type) +} + +// optional .mozilla.safebrowsing.ThreatEntry threat = 3; +inline bool ThreatMatch::_internal_has_threat() const { + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + PROTOBUF_ASSUME(!value || _impl_.threat_ != nullptr); + return value; +} +inline bool ThreatMatch::has_threat() const { + return _internal_has_threat(); +} +inline void ThreatMatch::clear_threat() { + if (_impl_.threat_ != nullptr) _impl_.threat_->Clear(); + _impl_._has_bits_[0] &= ~0x00000001u; +} +inline const ::mozilla::safebrowsing::ThreatEntry& ThreatMatch::_internal_threat() const { + const ::mozilla::safebrowsing::ThreatEntry* p = _impl_.threat_; + return p != nullptr ? *p : reinterpret_cast<const ::mozilla::safebrowsing::ThreatEntry&>( + ::mozilla::safebrowsing::_ThreatEntry_default_instance_); +} +inline const ::mozilla::safebrowsing::ThreatEntry& ThreatMatch::threat() const { + // @@protoc_insertion_point(field_get:mozilla.safebrowsing.ThreatMatch.threat) + return _internal_threat(); +} +inline void ThreatMatch::unsafe_arena_set_allocated_threat( + ::mozilla::safebrowsing::ThreatEntry* threat) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.threat_); + } + _impl_.threat_ = threat; + if (threat) { + _impl_._has_bits_[0] |= 0x00000001u; + } else { + _impl_._has_bits_[0] &= ~0x00000001u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:mozilla.safebrowsing.ThreatMatch.threat) +} +inline ::mozilla::safebrowsing::ThreatEntry* ThreatMatch::release_threat() { + _impl_._has_bits_[0] &= ~0x00000001u; + ::mozilla::safebrowsing::ThreatEntry* temp = _impl_.threat_; + _impl_.threat_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::mozilla::safebrowsing::ThreatEntry* ThreatMatch::unsafe_arena_release_threat() { + // @@protoc_insertion_point(field_release:mozilla.safebrowsing.ThreatMatch.threat) + _impl_._has_bits_[0] &= ~0x00000001u; + ::mozilla::safebrowsing::ThreatEntry* temp = _impl_.threat_; + _impl_.threat_ = nullptr; + return temp; +} +inline ::mozilla::safebrowsing::ThreatEntry* ThreatMatch::_internal_mutable_threat() { + _impl_._has_bits_[0] |= 0x00000001u; + if (_impl_.threat_ == nullptr) { + auto* p = CreateMaybeMessage<::mozilla::safebrowsing::ThreatEntry>(GetArenaForAllocation()); + _impl_.threat_ = p; + } + return _impl_.threat_; +} +inline ::mozilla::safebrowsing::ThreatEntry* ThreatMatch::mutable_threat() { + ::mozilla::safebrowsing::ThreatEntry* _msg = _internal_mutable_threat(); + // @@protoc_insertion_point(field_mutable:mozilla.safebrowsing.ThreatMatch.threat) + return _msg; +} +inline void ThreatMatch::set_allocated_threat(::mozilla::safebrowsing::ThreatEntry* threat) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.threat_; + } + if (threat) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(threat); + if (message_arena != submessage_arena) { + threat = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, threat, submessage_arena); + } + _impl_._has_bits_[0] |= 0x00000001u; + } else { + _impl_._has_bits_[0] &= ~0x00000001u; + } + _impl_.threat_ = threat; + // @@protoc_insertion_point(field_set_allocated:mozilla.safebrowsing.ThreatMatch.threat) +} + +// optional .mozilla.safebrowsing.ThreatEntryMetadata threat_entry_metadata = 4; +inline bool ThreatMatch::_internal_has_threat_entry_metadata() const { + bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0; + PROTOBUF_ASSUME(!value || _impl_.threat_entry_metadata_ != nullptr); + return value; +} +inline bool ThreatMatch::has_threat_entry_metadata() const { + return _internal_has_threat_entry_metadata(); +} +inline void ThreatMatch::clear_threat_entry_metadata() { + if (_impl_.threat_entry_metadata_ != nullptr) _impl_.threat_entry_metadata_->Clear(); + _impl_._has_bits_[0] &= ~0x00000002u; +} +inline const ::mozilla::safebrowsing::ThreatEntryMetadata& ThreatMatch::_internal_threat_entry_metadata() const { + const ::mozilla::safebrowsing::ThreatEntryMetadata* p = _impl_.threat_entry_metadata_; + return p != nullptr ? *p : reinterpret_cast<const ::mozilla::safebrowsing::ThreatEntryMetadata&>( + ::mozilla::safebrowsing::_ThreatEntryMetadata_default_instance_); +} +inline const ::mozilla::safebrowsing::ThreatEntryMetadata& ThreatMatch::threat_entry_metadata() const { + // @@protoc_insertion_point(field_get:mozilla.safebrowsing.ThreatMatch.threat_entry_metadata) + return _internal_threat_entry_metadata(); +} +inline void ThreatMatch::unsafe_arena_set_allocated_threat_entry_metadata( + ::mozilla::safebrowsing::ThreatEntryMetadata* threat_entry_metadata) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.threat_entry_metadata_); + } + _impl_.threat_entry_metadata_ = threat_entry_metadata; + if (threat_entry_metadata) { + _impl_._has_bits_[0] |= 0x00000002u; + } else { + _impl_._has_bits_[0] &= ~0x00000002u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:mozilla.safebrowsing.ThreatMatch.threat_entry_metadata) +} +inline ::mozilla::safebrowsing::ThreatEntryMetadata* ThreatMatch::release_threat_entry_metadata() { + _impl_._has_bits_[0] &= ~0x00000002u; + ::mozilla::safebrowsing::ThreatEntryMetadata* temp = _impl_.threat_entry_metadata_; + _impl_.threat_entry_metadata_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::mozilla::safebrowsing::ThreatEntryMetadata* ThreatMatch::unsafe_arena_release_threat_entry_metadata() { + // @@protoc_insertion_point(field_release:mozilla.safebrowsing.ThreatMatch.threat_entry_metadata) + _impl_._has_bits_[0] &= ~0x00000002u; + ::mozilla::safebrowsing::ThreatEntryMetadata* temp = _impl_.threat_entry_metadata_; + _impl_.threat_entry_metadata_ = nullptr; + return temp; +} +inline ::mozilla::safebrowsing::ThreatEntryMetadata* ThreatMatch::_internal_mutable_threat_entry_metadata() { + _impl_._has_bits_[0] |= 0x00000002u; + if (_impl_.threat_entry_metadata_ == nullptr) { + auto* p = CreateMaybeMessage<::mozilla::safebrowsing::ThreatEntryMetadata>(GetArenaForAllocation()); + _impl_.threat_entry_metadata_ = p; + } + return _impl_.threat_entry_metadata_; +} +inline ::mozilla::safebrowsing::ThreatEntryMetadata* ThreatMatch::mutable_threat_entry_metadata() { + ::mozilla::safebrowsing::ThreatEntryMetadata* _msg = _internal_mutable_threat_entry_metadata(); + // @@protoc_insertion_point(field_mutable:mozilla.safebrowsing.ThreatMatch.threat_entry_metadata) + return _msg; +} +inline void ThreatMatch::set_allocated_threat_entry_metadata(::mozilla::safebrowsing::ThreatEntryMetadata* threat_entry_metadata) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.threat_entry_metadata_; + } + if (threat_entry_metadata) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(threat_entry_metadata); + if (message_arena != submessage_arena) { + threat_entry_metadata = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, threat_entry_metadata, submessage_arena); + } + _impl_._has_bits_[0] |= 0x00000002u; + } else { + _impl_._has_bits_[0] &= ~0x00000002u; + } + _impl_.threat_entry_metadata_ = threat_entry_metadata; + // @@protoc_insertion_point(field_set_allocated:mozilla.safebrowsing.ThreatMatch.threat_entry_metadata) +} + +// optional .mozilla.safebrowsing.Duration cache_duration = 5; +inline bool ThreatMatch::_internal_has_cache_duration() const { + bool value = (_impl_._has_bits_[0] & 0x00000004u) != 0; + PROTOBUF_ASSUME(!value || _impl_.cache_duration_ != nullptr); + return value; +} +inline bool ThreatMatch::has_cache_duration() const { + return _internal_has_cache_duration(); +} +inline void ThreatMatch::clear_cache_duration() { + if (_impl_.cache_duration_ != nullptr) _impl_.cache_duration_->Clear(); + _impl_._has_bits_[0] &= ~0x00000004u; +} +inline const ::mozilla::safebrowsing::Duration& ThreatMatch::_internal_cache_duration() const { + const ::mozilla::safebrowsing::Duration* p = _impl_.cache_duration_; + return p != nullptr ? *p : reinterpret_cast<const ::mozilla::safebrowsing::Duration&>( + ::mozilla::safebrowsing::_Duration_default_instance_); +} +inline const ::mozilla::safebrowsing::Duration& ThreatMatch::cache_duration() const { + // @@protoc_insertion_point(field_get:mozilla.safebrowsing.ThreatMatch.cache_duration) + return _internal_cache_duration(); +} +inline void ThreatMatch::unsafe_arena_set_allocated_cache_duration( + ::mozilla::safebrowsing::Duration* cache_duration) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.cache_duration_); + } + _impl_.cache_duration_ = cache_duration; + if (cache_duration) { + _impl_._has_bits_[0] |= 0x00000004u; + } else { + _impl_._has_bits_[0] &= ~0x00000004u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:mozilla.safebrowsing.ThreatMatch.cache_duration) +} +inline ::mozilla::safebrowsing::Duration* ThreatMatch::release_cache_duration() { + _impl_._has_bits_[0] &= ~0x00000004u; + ::mozilla::safebrowsing::Duration* temp = _impl_.cache_duration_; + _impl_.cache_duration_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::mozilla::safebrowsing::Duration* ThreatMatch::unsafe_arena_release_cache_duration() { + // @@protoc_insertion_point(field_release:mozilla.safebrowsing.ThreatMatch.cache_duration) + _impl_._has_bits_[0] &= ~0x00000004u; + ::mozilla::safebrowsing::Duration* temp = _impl_.cache_duration_; + _impl_.cache_duration_ = nullptr; + return temp; +} +inline ::mozilla::safebrowsing::Duration* ThreatMatch::_internal_mutable_cache_duration() { + _impl_._has_bits_[0] |= 0x00000004u; + if (_impl_.cache_duration_ == nullptr) { + auto* p = CreateMaybeMessage<::mozilla::safebrowsing::Duration>(GetArenaForAllocation()); + _impl_.cache_duration_ = p; + } + return _impl_.cache_duration_; +} +inline ::mozilla::safebrowsing::Duration* ThreatMatch::mutable_cache_duration() { + ::mozilla::safebrowsing::Duration* _msg = _internal_mutable_cache_duration(); + // @@protoc_insertion_point(field_mutable:mozilla.safebrowsing.ThreatMatch.cache_duration) + return _msg; +} +inline void ThreatMatch::set_allocated_cache_duration(::mozilla::safebrowsing::Duration* cache_duration) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.cache_duration_; + } + if (cache_duration) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(cache_duration); + if (message_arena != submessage_arena) { + cache_duration = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, cache_duration, submessage_arena); + } + _impl_._has_bits_[0] |= 0x00000004u; + } else { + _impl_._has_bits_[0] &= ~0x00000004u; + } + _impl_.cache_duration_ = cache_duration; + // @@protoc_insertion_point(field_set_allocated:mozilla.safebrowsing.ThreatMatch.cache_duration) +} + +// ------------------------------------------------------------------- + +// FindThreatMatchesRequest + +// optional .mozilla.safebrowsing.ClientInfo client = 1; +inline bool FindThreatMatchesRequest::_internal_has_client() const { + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + PROTOBUF_ASSUME(!value || _impl_.client_ != nullptr); + return value; +} +inline bool FindThreatMatchesRequest::has_client() const { + return _internal_has_client(); +} +inline void FindThreatMatchesRequest::clear_client() { + if (_impl_.client_ != nullptr) _impl_.client_->Clear(); + _impl_._has_bits_[0] &= ~0x00000001u; +} +inline const ::mozilla::safebrowsing::ClientInfo& FindThreatMatchesRequest::_internal_client() const { + const ::mozilla::safebrowsing::ClientInfo* p = _impl_.client_; + return p != nullptr ? *p : reinterpret_cast<const ::mozilla::safebrowsing::ClientInfo&>( + ::mozilla::safebrowsing::_ClientInfo_default_instance_); +} +inline const ::mozilla::safebrowsing::ClientInfo& FindThreatMatchesRequest::client() const { + // @@protoc_insertion_point(field_get:mozilla.safebrowsing.FindThreatMatchesRequest.client) + return _internal_client(); +} +inline void FindThreatMatchesRequest::unsafe_arena_set_allocated_client( + ::mozilla::safebrowsing::ClientInfo* client) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.client_); + } + _impl_.client_ = client; + if (client) { + _impl_._has_bits_[0] |= 0x00000001u; + } else { + _impl_._has_bits_[0] &= ~0x00000001u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:mozilla.safebrowsing.FindThreatMatchesRequest.client) +} +inline ::mozilla::safebrowsing::ClientInfo* FindThreatMatchesRequest::release_client() { + _impl_._has_bits_[0] &= ~0x00000001u; + ::mozilla::safebrowsing::ClientInfo* temp = _impl_.client_; + _impl_.client_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::mozilla::safebrowsing::ClientInfo* FindThreatMatchesRequest::unsafe_arena_release_client() { + // @@protoc_insertion_point(field_release:mozilla.safebrowsing.FindThreatMatchesRequest.client) + _impl_._has_bits_[0] &= ~0x00000001u; + ::mozilla::safebrowsing::ClientInfo* temp = _impl_.client_; + _impl_.client_ = nullptr; + return temp; +} +inline ::mozilla::safebrowsing::ClientInfo* FindThreatMatchesRequest::_internal_mutable_client() { + _impl_._has_bits_[0] |= 0x00000001u; + if (_impl_.client_ == nullptr) { + auto* p = CreateMaybeMessage<::mozilla::safebrowsing::ClientInfo>(GetArenaForAllocation()); + _impl_.client_ = p; + } + return _impl_.client_; +} +inline ::mozilla::safebrowsing::ClientInfo* FindThreatMatchesRequest::mutable_client() { + ::mozilla::safebrowsing::ClientInfo* _msg = _internal_mutable_client(); + // @@protoc_insertion_point(field_mutable:mozilla.safebrowsing.FindThreatMatchesRequest.client) + return _msg; +} +inline void FindThreatMatchesRequest::set_allocated_client(::mozilla::safebrowsing::ClientInfo* client) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.client_; + } + if (client) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(client); + if (message_arena != submessage_arena) { + client = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, client, submessage_arena); + } + _impl_._has_bits_[0] |= 0x00000001u; + } else { + _impl_._has_bits_[0] &= ~0x00000001u; + } + _impl_.client_ = client; + // @@protoc_insertion_point(field_set_allocated:mozilla.safebrowsing.FindThreatMatchesRequest.client) +} + +// optional .mozilla.safebrowsing.ThreatInfo threat_info = 2; +inline bool FindThreatMatchesRequest::_internal_has_threat_info() const { + bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0; + PROTOBUF_ASSUME(!value || _impl_.threat_info_ != nullptr); + return value; +} +inline bool FindThreatMatchesRequest::has_threat_info() const { + return _internal_has_threat_info(); +} +inline void FindThreatMatchesRequest::clear_threat_info() { + if (_impl_.threat_info_ != nullptr) _impl_.threat_info_->Clear(); + _impl_._has_bits_[0] &= ~0x00000002u; +} +inline const ::mozilla::safebrowsing::ThreatInfo& FindThreatMatchesRequest::_internal_threat_info() const { + const ::mozilla::safebrowsing::ThreatInfo* p = _impl_.threat_info_; + return p != nullptr ? *p : reinterpret_cast<const ::mozilla::safebrowsing::ThreatInfo&>( + ::mozilla::safebrowsing::_ThreatInfo_default_instance_); +} +inline const ::mozilla::safebrowsing::ThreatInfo& FindThreatMatchesRequest::threat_info() const { + // @@protoc_insertion_point(field_get:mozilla.safebrowsing.FindThreatMatchesRequest.threat_info) + return _internal_threat_info(); +} +inline void FindThreatMatchesRequest::unsafe_arena_set_allocated_threat_info( + ::mozilla::safebrowsing::ThreatInfo* threat_info) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.threat_info_); + } + _impl_.threat_info_ = threat_info; + if (threat_info) { + _impl_._has_bits_[0] |= 0x00000002u; + } else { + _impl_._has_bits_[0] &= ~0x00000002u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:mozilla.safebrowsing.FindThreatMatchesRequest.threat_info) +} +inline ::mozilla::safebrowsing::ThreatInfo* FindThreatMatchesRequest::release_threat_info() { + _impl_._has_bits_[0] &= ~0x00000002u; + ::mozilla::safebrowsing::ThreatInfo* temp = _impl_.threat_info_; + _impl_.threat_info_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::mozilla::safebrowsing::ThreatInfo* FindThreatMatchesRequest::unsafe_arena_release_threat_info() { + // @@protoc_insertion_point(field_release:mozilla.safebrowsing.FindThreatMatchesRequest.threat_info) + _impl_._has_bits_[0] &= ~0x00000002u; + ::mozilla::safebrowsing::ThreatInfo* temp = _impl_.threat_info_; + _impl_.threat_info_ = nullptr; + return temp; +} +inline ::mozilla::safebrowsing::ThreatInfo* FindThreatMatchesRequest::_internal_mutable_threat_info() { + _impl_._has_bits_[0] |= 0x00000002u; + if (_impl_.threat_info_ == nullptr) { + auto* p = CreateMaybeMessage<::mozilla::safebrowsing::ThreatInfo>(GetArenaForAllocation()); + _impl_.threat_info_ = p; + } + return _impl_.threat_info_; +} +inline ::mozilla::safebrowsing::ThreatInfo* FindThreatMatchesRequest::mutable_threat_info() { + ::mozilla::safebrowsing::ThreatInfo* _msg = _internal_mutable_threat_info(); + // @@protoc_insertion_point(field_mutable:mozilla.safebrowsing.FindThreatMatchesRequest.threat_info) + return _msg; +} +inline void FindThreatMatchesRequest::set_allocated_threat_info(::mozilla::safebrowsing::ThreatInfo* threat_info) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.threat_info_; + } + if (threat_info) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(threat_info); + if (message_arena != submessage_arena) { + threat_info = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, threat_info, submessage_arena); + } + _impl_._has_bits_[0] |= 0x00000002u; + } else { + _impl_._has_bits_[0] &= ~0x00000002u; + } + _impl_.threat_info_ = threat_info; + // @@protoc_insertion_point(field_set_allocated:mozilla.safebrowsing.FindThreatMatchesRequest.threat_info) +} + +// ------------------------------------------------------------------- + +// FindThreatMatchesResponse + +// repeated .mozilla.safebrowsing.ThreatMatch matches = 1; +inline int FindThreatMatchesResponse::_internal_matches_size() const { + return _impl_.matches_.size(); +} +inline int FindThreatMatchesResponse::matches_size() const { + return _internal_matches_size(); +} +inline void FindThreatMatchesResponse::clear_matches() { + _impl_.matches_.Clear(); +} +inline ::mozilla::safebrowsing::ThreatMatch* FindThreatMatchesResponse::mutable_matches(int index) { + // @@protoc_insertion_point(field_mutable:mozilla.safebrowsing.FindThreatMatchesResponse.matches) + return _impl_.matches_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::mozilla::safebrowsing::ThreatMatch >* +FindThreatMatchesResponse::mutable_matches() { + // @@protoc_insertion_point(field_mutable_list:mozilla.safebrowsing.FindThreatMatchesResponse.matches) + return &_impl_.matches_; +} +inline const ::mozilla::safebrowsing::ThreatMatch& FindThreatMatchesResponse::_internal_matches(int index) const { + return _impl_.matches_.Get(index); +} +inline const ::mozilla::safebrowsing::ThreatMatch& FindThreatMatchesResponse::matches(int index) const { + // @@protoc_insertion_point(field_get:mozilla.safebrowsing.FindThreatMatchesResponse.matches) + return _internal_matches(index); +} +inline ::mozilla::safebrowsing::ThreatMatch* FindThreatMatchesResponse::_internal_add_matches() { + return _impl_.matches_.Add(); +} +inline ::mozilla::safebrowsing::ThreatMatch* FindThreatMatchesResponse::add_matches() { + ::mozilla::safebrowsing::ThreatMatch* _add = _internal_add_matches(); + // @@protoc_insertion_point(field_add:mozilla.safebrowsing.FindThreatMatchesResponse.matches) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::mozilla::safebrowsing::ThreatMatch >& +FindThreatMatchesResponse::matches() const { + // @@protoc_insertion_point(field_list:mozilla.safebrowsing.FindThreatMatchesResponse.matches) + return _impl_.matches_; +} + +// ------------------------------------------------------------------- + +// FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints + +// optional int32 max_update_entries = 1; +inline bool FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints::_internal_has_max_update_entries() const { + bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints::has_max_update_entries() const { + return _internal_has_max_update_entries(); +} +inline void FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints::clear_max_update_entries() { + _impl_.max_update_entries_ = 0; + _impl_._has_bits_[0] &= ~0x00000002u; +} +inline int32_t FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints::_internal_max_update_entries() const { + return _impl_.max_update_entries_; +} +inline int32_t FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints::max_update_entries() const { + // @@protoc_insertion_point(field_get:mozilla.safebrowsing.FetchThreatListUpdatesRequest.ListUpdateRequest.Constraints.max_update_entries) + return _internal_max_update_entries(); +} +inline void FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints::_internal_set_max_update_entries(int32_t value) { + _impl_._has_bits_[0] |= 0x00000002u; + _impl_.max_update_entries_ = value; +} +inline void FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints::set_max_update_entries(int32_t value) { + _internal_set_max_update_entries(value); + // @@protoc_insertion_point(field_set:mozilla.safebrowsing.FetchThreatListUpdatesRequest.ListUpdateRequest.Constraints.max_update_entries) +} + +// optional int32 max_database_entries = 2; +inline bool FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints::_internal_has_max_database_entries() const { + bool value = (_impl_._has_bits_[0] & 0x00000004u) != 0; + return value; +} +inline bool FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints::has_max_database_entries() const { + return _internal_has_max_database_entries(); +} +inline void FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints::clear_max_database_entries() { + _impl_.max_database_entries_ = 0; + _impl_._has_bits_[0] &= ~0x00000004u; +} +inline int32_t FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints::_internal_max_database_entries() const { + return _impl_.max_database_entries_; +} +inline int32_t FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints::max_database_entries() const { + // @@protoc_insertion_point(field_get:mozilla.safebrowsing.FetchThreatListUpdatesRequest.ListUpdateRequest.Constraints.max_database_entries) + return _internal_max_database_entries(); +} +inline void FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints::_internal_set_max_database_entries(int32_t value) { + _impl_._has_bits_[0] |= 0x00000004u; + _impl_.max_database_entries_ = value; +} +inline void FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints::set_max_database_entries(int32_t value) { + _internal_set_max_database_entries(value); + // @@protoc_insertion_point(field_set:mozilla.safebrowsing.FetchThreatListUpdatesRequest.ListUpdateRequest.Constraints.max_database_entries) +} + +// optional string region = 3; +inline bool FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints::_internal_has_region() const { + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints::has_region() const { + return _internal_has_region(); +} +inline void FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints::clear_region() { + _impl_.region_.ClearToEmpty(); + _impl_._has_bits_[0] &= ~0x00000001u; +} +inline const std::string& FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints::region() const { + // @@protoc_insertion_point(field_get:mozilla.safebrowsing.FetchThreatListUpdatesRequest.ListUpdateRequest.Constraints.region) + return _internal_region(); +} +template <typename ArgT0, typename... ArgT> +inline PROTOBUF_ALWAYS_INLINE +void FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints::set_region(ArgT0&& arg0, ArgT... args) { + _impl_._has_bits_[0] |= 0x00000001u; + _impl_.region_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:mozilla.safebrowsing.FetchThreatListUpdatesRequest.ListUpdateRequest.Constraints.region) +} +inline std::string* FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints::mutable_region() { + std::string* _s = _internal_mutable_region(); + // @@protoc_insertion_point(field_mutable:mozilla.safebrowsing.FetchThreatListUpdatesRequest.ListUpdateRequest.Constraints.region) + return _s; +} +inline const std::string& FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints::_internal_region() const { + return _impl_.region_.Get(); +} +inline void FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints::_internal_set_region(const std::string& value) { + _impl_._has_bits_[0] |= 0x00000001u; + _impl_.region_.Set(value, GetArenaForAllocation()); +} +inline std::string* FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints::_internal_mutable_region() { + _impl_._has_bits_[0] |= 0x00000001u; + return _impl_.region_.Mutable(GetArenaForAllocation()); +} +inline std::string* FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints::release_region() { + // @@protoc_insertion_point(field_release:mozilla.safebrowsing.FetchThreatListUpdatesRequest.ListUpdateRequest.Constraints.region) + if (!_internal_has_region()) { + return nullptr; + } + _impl_._has_bits_[0] &= ~0x00000001u; + auto* p = _impl_.region_.Release(); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.region_.IsDefault()) { + _impl_.region_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints::set_allocated_region(std::string* region) { + if (region != nullptr) { + _impl_._has_bits_[0] |= 0x00000001u; + } else { + _impl_._has_bits_[0] &= ~0x00000001u; + } + _impl_.region_.SetAllocated(region, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.region_.IsDefault()) { + _impl_.region_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:mozilla.safebrowsing.FetchThreatListUpdatesRequest.ListUpdateRequest.Constraints.region) +} + +// repeated .mozilla.safebrowsing.CompressionType supported_compressions = 4; +inline int FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints::_internal_supported_compressions_size() const { + return _impl_.supported_compressions_.size(); +} +inline int FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints::supported_compressions_size() const { + return _internal_supported_compressions_size(); +} +inline void FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints::clear_supported_compressions() { + _impl_.supported_compressions_.Clear(); +} +inline ::mozilla::safebrowsing::CompressionType FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints::_internal_supported_compressions(int index) const { + return static_cast< ::mozilla::safebrowsing::CompressionType >(_impl_.supported_compressions_.Get(index)); +} +inline ::mozilla::safebrowsing::CompressionType FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints::supported_compressions(int index) const { + // @@protoc_insertion_point(field_get:mozilla.safebrowsing.FetchThreatListUpdatesRequest.ListUpdateRequest.Constraints.supported_compressions) + return _internal_supported_compressions(index); +} +inline void FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints::set_supported_compressions(int index, ::mozilla::safebrowsing::CompressionType value) { + assert(::mozilla::safebrowsing::CompressionType_IsValid(value)); + _impl_.supported_compressions_.Set(index, value); + // @@protoc_insertion_point(field_set:mozilla.safebrowsing.FetchThreatListUpdatesRequest.ListUpdateRequest.Constraints.supported_compressions) +} +inline void FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints::_internal_add_supported_compressions(::mozilla::safebrowsing::CompressionType value) { + assert(::mozilla::safebrowsing::CompressionType_IsValid(value)); + _impl_.supported_compressions_.Add(value); +} +inline void FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints::add_supported_compressions(::mozilla::safebrowsing::CompressionType value) { + _internal_add_supported_compressions(value); + // @@protoc_insertion_point(field_add:mozilla.safebrowsing.FetchThreatListUpdatesRequest.ListUpdateRequest.Constraints.supported_compressions) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField<int>& +FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints::supported_compressions() const { + // @@protoc_insertion_point(field_list:mozilla.safebrowsing.FetchThreatListUpdatesRequest.ListUpdateRequest.Constraints.supported_compressions) + return _impl_.supported_compressions_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField<int>* +FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints::_internal_mutable_supported_compressions() { + return &_impl_.supported_compressions_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField<int>* +FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints::mutable_supported_compressions() { + // @@protoc_insertion_point(field_mutable_list:mozilla.safebrowsing.FetchThreatListUpdatesRequest.ListUpdateRequest.Constraints.supported_compressions) + return _internal_mutable_supported_compressions(); +} + +// ------------------------------------------------------------------- + +// FetchThreatListUpdatesRequest_ListUpdateRequest + +// optional .mozilla.safebrowsing.ThreatType threat_type = 1; +inline bool FetchThreatListUpdatesRequest_ListUpdateRequest::_internal_has_threat_type() const { + bool value = (_impl_._has_bits_[0] & 0x00000004u) != 0; + return value; +} +inline bool FetchThreatListUpdatesRequest_ListUpdateRequest::has_threat_type() const { + return _internal_has_threat_type(); +} +inline void FetchThreatListUpdatesRequest_ListUpdateRequest::clear_threat_type() { + _impl_.threat_type_ = 0; + _impl_._has_bits_[0] &= ~0x00000004u; +} +inline ::mozilla::safebrowsing::ThreatType FetchThreatListUpdatesRequest_ListUpdateRequest::_internal_threat_type() const { + return static_cast< ::mozilla::safebrowsing::ThreatType >(_impl_.threat_type_); +} +inline ::mozilla::safebrowsing::ThreatType FetchThreatListUpdatesRequest_ListUpdateRequest::threat_type() const { + // @@protoc_insertion_point(field_get:mozilla.safebrowsing.FetchThreatListUpdatesRequest.ListUpdateRequest.threat_type) + return _internal_threat_type(); +} +inline void FetchThreatListUpdatesRequest_ListUpdateRequest::_internal_set_threat_type(::mozilla::safebrowsing::ThreatType value) { + assert(::mozilla::safebrowsing::ThreatType_IsValid(value)); + _impl_._has_bits_[0] |= 0x00000004u; + _impl_.threat_type_ = value; +} +inline void FetchThreatListUpdatesRequest_ListUpdateRequest::set_threat_type(::mozilla::safebrowsing::ThreatType value) { + _internal_set_threat_type(value); + // @@protoc_insertion_point(field_set:mozilla.safebrowsing.FetchThreatListUpdatesRequest.ListUpdateRequest.threat_type) +} + +// optional .mozilla.safebrowsing.PlatformType platform_type = 2; +inline bool FetchThreatListUpdatesRequest_ListUpdateRequest::_internal_has_platform_type() const { + bool value = (_impl_._has_bits_[0] & 0x00000008u) != 0; + return value; +} +inline bool FetchThreatListUpdatesRequest_ListUpdateRequest::has_platform_type() const { + return _internal_has_platform_type(); +} +inline void FetchThreatListUpdatesRequest_ListUpdateRequest::clear_platform_type() { + _impl_.platform_type_ = 0; + _impl_._has_bits_[0] &= ~0x00000008u; +} +inline ::mozilla::safebrowsing::PlatformType FetchThreatListUpdatesRequest_ListUpdateRequest::_internal_platform_type() const { + return static_cast< ::mozilla::safebrowsing::PlatformType >(_impl_.platform_type_); +} +inline ::mozilla::safebrowsing::PlatformType FetchThreatListUpdatesRequest_ListUpdateRequest::platform_type() const { + // @@protoc_insertion_point(field_get:mozilla.safebrowsing.FetchThreatListUpdatesRequest.ListUpdateRequest.platform_type) + return _internal_platform_type(); +} +inline void FetchThreatListUpdatesRequest_ListUpdateRequest::_internal_set_platform_type(::mozilla::safebrowsing::PlatformType value) { + assert(::mozilla::safebrowsing::PlatformType_IsValid(value)); + _impl_._has_bits_[0] |= 0x00000008u; + _impl_.platform_type_ = value; +} +inline void FetchThreatListUpdatesRequest_ListUpdateRequest::set_platform_type(::mozilla::safebrowsing::PlatformType value) { + _internal_set_platform_type(value); + // @@protoc_insertion_point(field_set:mozilla.safebrowsing.FetchThreatListUpdatesRequest.ListUpdateRequest.platform_type) +} + +// optional .mozilla.safebrowsing.ThreatEntryType threat_entry_type = 5; +inline bool FetchThreatListUpdatesRequest_ListUpdateRequest::_internal_has_threat_entry_type() const { + bool value = (_impl_._has_bits_[0] & 0x00000010u) != 0; + return value; +} +inline bool FetchThreatListUpdatesRequest_ListUpdateRequest::has_threat_entry_type() const { + return _internal_has_threat_entry_type(); +} +inline void FetchThreatListUpdatesRequest_ListUpdateRequest::clear_threat_entry_type() { + _impl_.threat_entry_type_ = 0; + _impl_._has_bits_[0] &= ~0x00000010u; +} +inline ::mozilla::safebrowsing::ThreatEntryType FetchThreatListUpdatesRequest_ListUpdateRequest::_internal_threat_entry_type() const { + return static_cast< ::mozilla::safebrowsing::ThreatEntryType >(_impl_.threat_entry_type_); +} +inline ::mozilla::safebrowsing::ThreatEntryType FetchThreatListUpdatesRequest_ListUpdateRequest::threat_entry_type() const { + // @@protoc_insertion_point(field_get:mozilla.safebrowsing.FetchThreatListUpdatesRequest.ListUpdateRequest.threat_entry_type) + return _internal_threat_entry_type(); +} +inline void FetchThreatListUpdatesRequest_ListUpdateRequest::_internal_set_threat_entry_type(::mozilla::safebrowsing::ThreatEntryType value) { + assert(::mozilla::safebrowsing::ThreatEntryType_IsValid(value)); + _impl_._has_bits_[0] |= 0x00000010u; + _impl_.threat_entry_type_ = value; +} +inline void FetchThreatListUpdatesRequest_ListUpdateRequest::set_threat_entry_type(::mozilla::safebrowsing::ThreatEntryType value) { + _internal_set_threat_entry_type(value); + // @@protoc_insertion_point(field_set:mozilla.safebrowsing.FetchThreatListUpdatesRequest.ListUpdateRequest.threat_entry_type) +} + +// optional bytes state = 3; +inline bool FetchThreatListUpdatesRequest_ListUpdateRequest::_internal_has_state() const { + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool FetchThreatListUpdatesRequest_ListUpdateRequest::has_state() const { + return _internal_has_state(); +} +inline void FetchThreatListUpdatesRequest_ListUpdateRequest::clear_state() { + _impl_.state_.ClearToEmpty(); + _impl_._has_bits_[0] &= ~0x00000001u; +} +inline const std::string& FetchThreatListUpdatesRequest_ListUpdateRequest::state() const { + // @@protoc_insertion_point(field_get:mozilla.safebrowsing.FetchThreatListUpdatesRequest.ListUpdateRequest.state) + return _internal_state(); +} +template <typename ArgT0, typename... ArgT> +inline PROTOBUF_ALWAYS_INLINE +void FetchThreatListUpdatesRequest_ListUpdateRequest::set_state(ArgT0&& arg0, ArgT... args) { + _impl_._has_bits_[0] |= 0x00000001u; + _impl_.state_.SetBytes(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:mozilla.safebrowsing.FetchThreatListUpdatesRequest.ListUpdateRequest.state) +} +inline std::string* FetchThreatListUpdatesRequest_ListUpdateRequest::mutable_state() { + std::string* _s = _internal_mutable_state(); + // @@protoc_insertion_point(field_mutable:mozilla.safebrowsing.FetchThreatListUpdatesRequest.ListUpdateRequest.state) + return _s; +} +inline const std::string& FetchThreatListUpdatesRequest_ListUpdateRequest::_internal_state() const { + return _impl_.state_.Get(); +} +inline void FetchThreatListUpdatesRequest_ListUpdateRequest::_internal_set_state(const std::string& value) { + _impl_._has_bits_[0] |= 0x00000001u; + _impl_.state_.Set(value, GetArenaForAllocation()); +} +inline std::string* FetchThreatListUpdatesRequest_ListUpdateRequest::_internal_mutable_state() { + _impl_._has_bits_[0] |= 0x00000001u; + return _impl_.state_.Mutable(GetArenaForAllocation()); +} +inline std::string* FetchThreatListUpdatesRequest_ListUpdateRequest::release_state() { + // @@protoc_insertion_point(field_release:mozilla.safebrowsing.FetchThreatListUpdatesRequest.ListUpdateRequest.state) + if (!_internal_has_state()) { + return nullptr; + } + _impl_._has_bits_[0] &= ~0x00000001u; + auto* p = _impl_.state_.Release(); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.state_.IsDefault()) { + _impl_.state_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void FetchThreatListUpdatesRequest_ListUpdateRequest::set_allocated_state(std::string* state) { + if (state != nullptr) { + _impl_._has_bits_[0] |= 0x00000001u; + } else { + _impl_._has_bits_[0] &= ~0x00000001u; + } + _impl_.state_.SetAllocated(state, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.state_.IsDefault()) { + _impl_.state_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:mozilla.safebrowsing.FetchThreatListUpdatesRequest.ListUpdateRequest.state) +} + +// optional .mozilla.safebrowsing.FetchThreatListUpdatesRequest.ListUpdateRequest.Constraints constraints = 4; +inline bool FetchThreatListUpdatesRequest_ListUpdateRequest::_internal_has_constraints() const { + bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0; + PROTOBUF_ASSUME(!value || _impl_.constraints_ != nullptr); + return value; +} +inline bool FetchThreatListUpdatesRequest_ListUpdateRequest::has_constraints() const { + return _internal_has_constraints(); +} +inline void FetchThreatListUpdatesRequest_ListUpdateRequest::clear_constraints() { + if (_impl_.constraints_ != nullptr) _impl_.constraints_->Clear(); + _impl_._has_bits_[0] &= ~0x00000002u; +} +inline const ::mozilla::safebrowsing::FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints& FetchThreatListUpdatesRequest_ListUpdateRequest::_internal_constraints() const { + const ::mozilla::safebrowsing::FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints* p = _impl_.constraints_; + return p != nullptr ? *p : reinterpret_cast<const ::mozilla::safebrowsing::FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints&>( + ::mozilla::safebrowsing::_FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints_default_instance_); +} +inline const ::mozilla::safebrowsing::FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints& FetchThreatListUpdatesRequest_ListUpdateRequest::constraints() const { + // @@protoc_insertion_point(field_get:mozilla.safebrowsing.FetchThreatListUpdatesRequest.ListUpdateRequest.constraints) + return _internal_constraints(); +} +inline void FetchThreatListUpdatesRequest_ListUpdateRequest::unsafe_arena_set_allocated_constraints( + ::mozilla::safebrowsing::FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints* constraints) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.constraints_); + } + _impl_.constraints_ = constraints; + if (constraints) { + _impl_._has_bits_[0] |= 0x00000002u; + } else { + _impl_._has_bits_[0] &= ~0x00000002u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:mozilla.safebrowsing.FetchThreatListUpdatesRequest.ListUpdateRequest.constraints) +} +inline ::mozilla::safebrowsing::FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints* FetchThreatListUpdatesRequest_ListUpdateRequest::release_constraints() { + _impl_._has_bits_[0] &= ~0x00000002u; + ::mozilla::safebrowsing::FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints* temp = _impl_.constraints_; + _impl_.constraints_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::mozilla::safebrowsing::FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints* FetchThreatListUpdatesRequest_ListUpdateRequest::unsafe_arena_release_constraints() { + // @@protoc_insertion_point(field_release:mozilla.safebrowsing.FetchThreatListUpdatesRequest.ListUpdateRequest.constraints) + _impl_._has_bits_[0] &= ~0x00000002u; + ::mozilla::safebrowsing::FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints* temp = _impl_.constraints_; + _impl_.constraints_ = nullptr; + return temp; +} +inline ::mozilla::safebrowsing::FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints* FetchThreatListUpdatesRequest_ListUpdateRequest::_internal_mutable_constraints() { + _impl_._has_bits_[0] |= 0x00000002u; + if (_impl_.constraints_ == nullptr) { + auto* p = CreateMaybeMessage<::mozilla::safebrowsing::FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints>(GetArenaForAllocation()); + _impl_.constraints_ = p; + } + return _impl_.constraints_; +} +inline ::mozilla::safebrowsing::FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints* FetchThreatListUpdatesRequest_ListUpdateRequest::mutable_constraints() { + ::mozilla::safebrowsing::FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints* _msg = _internal_mutable_constraints(); + // @@protoc_insertion_point(field_mutable:mozilla.safebrowsing.FetchThreatListUpdatesRequest.ListUpdateRequest.constraints) + return _msg; +} +inline void FetchThreatListUpdatesRequest_ListUpdateRequest::set_allocated_constraints(::mozilla::safebrowsing::FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints* constraints) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.constraints_; + } + if (constraints) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(constraints); + if (message_arena != submessage_arena) { + constraints = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, constraints, submessage_arena); + } + _impl_._has_bits_[0] |= 0x00000002u; + } else { + _impl_._has_bits_[0] &= ~0x00000002u; + } + _impl_.constraints_ = constraints; + // @@protoc_insertion_point(field_set_allocated:mozilla.safebrowsing.FetchThreatListUpdatesRequest.ListUpdateRequest.constraints) +} + +// ------------------------------------------------------------------- + +// FetchThreatListUpdatesRequest + +// optional .mozilla.safebrowsing.ClientInfo client = 1; +inline bool FetchThreatListUpdatesRequest::_internal_has_client() const { + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + PROTOBUF_ASSUME(!value || _impl_.client_ != nullptr); + return value; +} +inline bool FetchThreatListUpdatesRequest::has_client() const { + return _internal_has_client(); +} +inline void FetchThreatListUpdatesRequest::clear_client() { + if (_impl_.client_ != nullptr) _impl_.client_->Clear(); + _impl_._has_bits_[0] &= ~0x00000001u; +} +inline const ::mozilla::safebrowsing::ClientInfo& FetchThreatListUpdatesRequest::_internal_client() const { + const ::mozilla::safebrowsing::ClientInfo* p = _impl_.client_; + return p != nullptr ? *p : reinterpret_cast<const ::mozilla::safebrowsing::ClientInfo&>( + ::mozilla::safebrowsing::_ClientInfo_default_instance_); +} +inline const ::mozilla::safebrowsing::ClientInfo& FetchThreatListUpdatesRequest::client() const { + // @@protoc_insertion_point(field_get:mozilla.safebrowsing.FetchThreatListUpdatesRequest.client) + return _internal_client(); +} +inline void FetchThreatListUpdatesRequest::unsafe_arena_set_allocated_client( + ::mozilla::safebrowsing::ClientInfo* client) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.client_); + } + _impl_.client_ = client; + if (client) { + _impl_._has_bits_[0] |= 0x00000001u; + } else { + _impl_._has_bits_[0] &= ~0x00000001u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:mozilla.safebrowsing.FetchThreatListUpdatesRequest.client) +} +inline ::mozilla::safebrowsing::ClientInfo* FetchThreatListUpdatesRequest::release_client() { + _impl_._has_bits_[0] &= ~0x00000001u; + ::mozilla::safebrowsing::ClientInfo* temp = _impl_.client_; + _impl_.client_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::mozilla::safebrowsing::ClientInfo* FetchThreatListUpdatesRequest::unsafe_arena_release_client() { + // @@protoc_insertion_point(field_release:mozilla.safebrowsing.FetchThreatListUpdatesRequest.client) + _impl_._has_bits_[0] &= ~0x00000001u; + ::mozilla::safebrowsing::ClientInfo* temp = _impl_.client_; + _impl_.client_ = nullptr; + return temp; +} +inline ::mozilla::safebrowsing::ClientInfo* FetchThreatListUpdatesRequest::_internal_mutable_client() { + _impl_._has_bits_[0] |= 0x00000001u; + if (_impl_.client_ == nullptr) { + auto* p = CreateMaybeMessage<::mozilla::safebrowsing::ClientInfo>(GetArenaForAllocation()); + _impl_.client_ = p; + } + return _impl_.client_; +} +inline ::mozilla::safebrowsing::ClientInfo* FetchThreatListUpdatesRequest::mutable_client() { + ::mozilla::safebrowsing::ClientInfo* _msg = _internal_mutable_client(); + // @@protoc_insertion_point(field_mutable:mozilla.safebrowsing.FetchThreatListUpdatesRequest.client) + return _msg; +} +inline void FetchThreatListUpdatesRequest::set_allocated_client(::mozilla::safebrowsing::ClientInfo* client) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.client_; + } + if (client) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(client); + if (message_arena != submessage_arena) { + client = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, client, submessage_arena); + } + _impl_._has_bits_[0] |= 0x00000001u; + } else { + _impl_._has_bits_[0] &= ~0x00000001u; + } + _impl_.client_ = client; + // @@protoc_insertion_point(field_set_allocated:mozilla.safebrowsing.FetchThreatListUpdatesRequest.client) +} + +// repeated .mozilla.safebrowsing.FetchThreatListUpdatesRequest.ListUpdateRequest list_update_requests = 3; +inline int FetchThreatListUpdatesRequest::_internal_list_update_requests_size() const { + return _impl_.list_update_requests_.size(); +} +inline int FetchThreatListUpdatesRequest::list_update_requests_size() const { + return _internal_list_update_requests_size(); +} +inline void FetchThreatListUpdatesRequest::clear_list_update_requests() { + _impl_.list_update_requests_.Clear(); +} +inline ::mozilla::safebrowsing::FetchThreatListUpdatesRequest_ListUpdateRequest* FetchThreatListUpdatesRequest::mutable_list_update_requests(int index) { + // @@protoc_insertion_point(field_mutable:mozilla.safebrowsing.FetchThreatListUpdatesRequest.list_update_requests) + return _impl_.list_update_requests_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::mozilla::safebrowsing::FetchThreatListUpdatesRequest_ListUpdateRequest >* +FetchThreatListUpdatesRequest::mutable_list_update_requests() { + // @@protoc_insertion_point(field_mutable_list:mozilla.safebrowsing.FetchThreatListUpdatesRequest.list_update_requests) + return &_impl_.list_update_requests_; +} +inline const ::mozilla::safebrowsing::FetchThreatListUpdatesRequest_ListUpdateRequest& FetchThreatListUpdatesRequest::_internal_list_update_requests(int index) const { + return _impl_.list_update_requests_.Get(index); +} +inline const ::mozilla::safebrowsing::FetchThreatListUpdatesRequest_ListUpdateRequest& FetchThreatListUpdatesRequest::list_update_requests(int index) const { + // @@protoc_insertion_point(field_get:mozilla.safebrowsing.FetchThreatListUpdatesRequest.list_update_requests) + return _internal_list_update_requests(index); +} +inline ::mozilla::safebrowsing::FetchThreatListUpdatesRequest_ListUpdateRequest* FetchThreatListUpdatesRequest::_internal_add_list_update_requests() { + return _impl_.list_update_requests_.Add(); +} +inline ::mozilla::safebrowsing::FetchThreatListUpdatesRequest_ListUpdateRequest* FetchThreatListUpdatesRequest::add_list_update_requests() { + ::mozilla::safebrowsing::FetchThreatListUpdatesRequest_ListUpdateRequest* _add = _internal_add_list_update_requests(); + // @@protoc_insertion_point(field_add:mozilla.safebrowsing.FetchThreatListUpdatesRequest.list_update_requests) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::mozilla::safebrowsing::FetchThreatListUpdatesRequest_ListUpdateRequest >& +FetchThreatListUpdatesRequest::list_update_requests() const { + // @@protoc_insertion_point(field_list:mozilla.safebrowsing.FetchThreatListUpdatesRequest.list_update_requests) + return _impl_.list_update_requests_; +} + +// optional .mozilla.safebrowsing.ChromeClientInfo chrome_client_info = 4; +inline bool FetchThreatListUpdatesRequest::_internal_has_chrome_client_info() const { + bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0; + PROTOBUF_ASSUME(!value || _impl_.chrome_client_info_ != nullptr); + return value; +} +inline bool FetchThreatListUpdatesRequest::has_chrome_client_info() const { + return _internal_has_chrome_client_info(); +} +inline void FetchThreatListUpdatesRequest::clear_chrome_client_info() { + if (_impl_.chrome_client_info_ != nullptr) _impl_.chrome_client_info_->Clear(); + _impl_._has_bits_[0] &= ~0x00000002u; +} +inline const ::mozilla::safebrowsing::ChromeClientInfo& FetchThreatListUpdatesRequest::_internal_chrome_client_info() const { + const ::mozilla::safebrowsing::ChromeClientInfo* p = _impl_.chrome_client_info_; + return p != nullptr ? *p : reinterpret_cast<const ::mozilla::safebrowsing::ChromeClientInfo&>( + ::mozilla::safebrowsing::_ChromeClientInfo_default_instance_); +} +inline const ::mozilla::safebrowsing::ChromeClientInfo& FetchThreatListUpdatesRequest::chrome_client_info() const { + // @@protoc_insertion_point(field_get:mozilla.safebrowsing.FetchThreatListUpdatesRequest.chrome_client_info) + return _internal_chrome_client_info(); +} +inline void FetchThreatListUpdatesRequest::unsafe_arena_set_allocated_chrome_client_info( + ::mozilla::safebrowsing::ChromeClientInfo* chrome_client_info) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.chrome_client_info_); + } + _impl_.chrome_client_info_ = chrome_client_info; + if (chrome_client_info) { + _impl_._has_bits_[0] |= 0x00000002u; + } else { + _impl_._has_bits_[0] &= ~0x00000002u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:mozilla.safebrowsing.FetchThreatListUpdatesRequest.chrome_client_info) +} +inline ::mozilla::safebrowsing::ChromeClientInfo* FetchThreatListUpdatesRequest::release_chrome_client_info() { + _impl_._has_bits_[0] &= ~0x00000002u; + ::mozilla::safebrowsing::ChromeClientInfo* temp = _impl_.chrome_client_info_; + _impl_.chrome_client_info_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::mozilla::safebrowsing::ChromeClientInfo* FetchThreatListUpdatesRequest::unsafe_arena_release_chrome_client_info() { + // @@protoc_insertion_point(field_release:mozilla.safebrowsing.FetchThreatListUpdatesRequest.chrome_client_info) + _impl_._has_bits_[0] &= ~0x00000002u; + ::mozilla::safebrowsing::ChromeClientInfo* temp = _impl_.chrome_client_info_; + _impl_.chrome_client_info_ = nullptr; + return temp; +} +inline ::mozilla::safebrowsing::ChromeClientInfo* FetchThreatListUpdatesRequest::_internal_mutable_chrome_client_info() { + _impl_._has_bits_[0] |= 0x00000002u; + if (_impl_.chrome_client_info_ == nullptr) { + auto* p = CreateMaybeMessage<::mozilla::safebrowsing::ChromeClientInfo>(GetArenaForAllocation()); + _impl_.chrome_client_info_ = p; + } + return _impl_.chrome_client_info_; +} +inline ::mozilla::safebrowsing::ChromeClientInfo* FetchThreatListUpdatesRequest::mutable_chrome_client_info() { + ::mozilla::safebrowsing::ChromeClientInfo* _msg = _internal_mutable_chrome_client_info(); + // @@protoc_insertion_point(field_mutable:mozilla.safebrowsing.FetchThreatListUpdatesRequest.chrome_client_info) + return _msg; +} +inline void FetchThreatListUpdatesRequest::set_allocated_chrome_client_info(::mozilla::safebrowsing::ChromeClientInfo* chrome_client_info) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.chrome_client_info_; + } + if (chrome_client_info) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(chrome_client_info); + if (message_arena != submessage_arena) { + chrome_client_info = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, chrome_client_info, submessage_arena); + } + _impl_._has_bits_[0] |= 0x00000002u; + } else { + _impl_._has_bits_[0] &= ~0x00000002u; + } + _impl_.chrome_client_info_ = chrome_client_info; + // @@protoc_insertion_point(field_set_allocated:mozilla.safebrowsing.FetchThreatListUpdatesRequest.chrome_client_info) +} + +// ------------------------------------------------------------------- + +// FetchThreatListUpdatesResponse_ListUpdateResponse + +// optional .mozilla.safebrowsing.ThreatType threat_type = 1; +inline bool FetchThreatListUpdatesResponse_ListUpdateResponse::_internal_has_threat_type() const { + bool value = (_impl_._has_bits_[0] & 0x00000004u) != 0; + return value; +} +inline bool FetchThreatListUpdatesResponse_ListUpdateResponse::has_threat_type() const { + return _internal_has_threat_type(); +} +inline void FetchThreatListUpdatesResponse_ListUpdateResponse::clear_threat_type() { + _impl_.threat_type_ = 0; + _impl_._has_bits_[0] &= ~0x00000004u; +} +inline ::mozilla::safebrowsing::ThreatType FetchThreatListUpdatesResponse_ListUpdateResponse::_internal_threat_type() const { + return static_cast< ::mozilla::safebrowsing::ThreatType >(_impl_.threat_type_); +} +inline ::mozilla::safebrowsing::ThreatType FetchThreatListUpdatesResponse_ListUpdateResponse::threat_type() const { + // @@protoc_insertion_point(field_get:mozilla.safebrowsing.FetchThreatListUpdatesResponse.ListUpdateResponse.threat_type) + return _internal_threat_type(); +} +inline void FetchThreatListUpdatesResponse_ListUpdateResponse::_internal_set_threat_type(::mozilla::safebrowsing::ThreatType value) { + assert(::mozilla::safebrowsing::ThreatType_IsValid(value)); + _impl_._has_bits_[0] |= 0x00000004u; + _impl_.threat_type_ = value; +} +inline void FetchThreatListUpdatesResponse_ListUpdateResponse::set_threat_type(::mozilla::safebrowsing::ThreatType value) { + _internal_set_threat_type(value); + // @@protoc_insertion_point(field_set:mozilla.safebrowsing.FetchThreatListUpdatesResponse.ListUpdateResponse.threat_type) +} + +// optional .mozilla.safebrowsing.ThreatEntryType threat_entry_type = 2; +inline bool FetchThreatListUpdatesResponse_ListUpdateResponse::_internal_has_threat_entry_type() const { + bool value = (_impl_._has_bits_[0] & 0x00000008u) != 0; + return value; +} +inline bool FetchThreatListUpdatesResponse_ListUpdateResponse::has_threat_entry_type() const { + return _internal_has_threat_entry_type(); +} +inline void FetchThreatListUpdatesResponse_ListUpdateResponse::clear_threat_entry_type() { + _impl_.threat_entry_type_ = 0; + _impl_._has_bits_[0] &= ~0x00000008u; +} +inline ::mozilla::safebrowsing::ThreatEntryType FetchThreatListUpdatesResponse_ListUpdateResponse::_internal_threat_entry_type() const { + return static_cast< ::mozilla::safebrowsing::ThreatEntryType >(_impl_.threat_entry_type_); +} +inline ::mozilla::safebrowsing::ThreatEntryType FetchThreatListUpdatesResponse_ListUpdateResponse::threat_entry_type() const { + // @@protoc_insertion_point(field_get:mozilla.safebrowsing.FetchThreatListUpdatesResponse.ListUpdateResponse.threat_entry_type) + return _internal_threat_entry_type(); +} +inline void FetchThreatListUpdatesResponse_ListUpdateResponse::_internal_set_threat_entry_type(::mozilla::safebrowsing::ThreatEntryType value) { + assert(::mozilla::safebrowsing::ThreatEntryType_IsValid(value)); + _impl_._has_bits_[0] |= 0x00000008u; + _impl_.threat_entry_type_ = value; +} +inline void FetchThreatListUpdatesResponse_ListUpdateResponse::set_threat_entry_type(::mozilla::safebrowsing::ThreatEntryType value) { + _internal_set_threat_entry_type(value); + // @@protoc_insertion_point(field_set:mozilla.safebrowsing.FetchThreatListUpdatesResponse.ListUpdateResponse.threat_entry_type) +} + +// optional .mozilla.safebrowsing.PlatformType platform_type = 3; +inline bool FetchThreatListUpdatesResponse_ListUpdateResponse::_internal_has_platform_type() const { + bool value = (_impl_._has_bits_[0] & 0x00000010u) != 0; + return value; +} +inline bool FetchThreatListUpdatesResponse_ListUpdateResponse::has_platform_type() const { + return _internal_has_platform_type(); +} +inline void FetchThreatListUpdatesResponse_ListUpdateResponse::clear_platform_type() { + _impl_.platform_type_ = 0; + _impl_._has_bits_[0] &= ~0x00000010u; +} +inline ::mozilla::safebrowsing::PlatformType FetchThreatListUpdatesResponse_ListUpdateResponse::_internal_platform_type() const { + return static_cast< ::mozilla::safebrowsing::PlatformType >(_impl_.platform_type_); +} +inline ::mozilla::safebrowsing::PlatformType FetchThreatListUpdatesResponse_ListUpdateResponse::platform_type() const { + // @@protoc_insertion_point(field_get:mozilla.safebrowsing.FetchThreatListUpdatesResponse.ListUpdateResponse.platform_type) + return _internal_platform_type(); +} +inline void FetchThreatListUpdatesResponse_ListUpdateResponse::_internal_set_platform_type(::mozilla::safebrowsing::PlatformType value) { + assert(::mozilla::safebrowsing::PlatformType_IsValid(value)); + _impl_._has_bits_[0] |= 0x00000010u; + _impl_.platform_type_ = value; +} +inline void FetchThreatListUpdatesResponse_ListUpdateResponse::set_platform_type(::mozilla::safebrowsing::PlatformType value) { + _internal_set_platform_type(value); + // @@protoc_insertion_point(field_set:mozilla.safebrowsing.FetchThreatListUpdatesResponse.ListUpdateResponse.platform_type) +} + +// optional .mozilla.safebrowsing.FetchThreatListUpdatesResponse.ListUpdateResponse.ResponseType response_type = 4; +inline bool FetchThreatListUpdatesResponse_ListUpdateResponse::_internal_has_response_type() const { + bool value = (_impl_._has_bits_[0] & 0x00000020u) != 0; + return value; +} +inline bool FetchThreatListUpdatesResponse_ListUpdateResponse::has_response_type() const { + return _internal_has_response_type(); +} +inline void FetchThreatListUpdatesResponse_ListUpdateResponse::clear_response_type() { + _impl_.response_type_ = 0; + _impl_._has_bits_[0] &= ~0x00000020u; +} +inline ::mozilla::safebrowsing::FetchThreatListUpdatesResponse_ListUpdateResponse_ResponseType FetchThreatListUpdatesResponse_ListUpdateResponse::_internal_response_type() const { + return static_cast< ::mozilla::safebrowsing::FetchThreatListUpdatesResponse_ListUpdateResponse_ResponseType >(_impl_.response_type_); +} +inline ::mozilla::safebrowsing::FetchThreatListUpdatesResponse_ListUpdateResponse_ResponseType FetchThreatListUpdatesResponse_ListUpdateResponse::response_type() const { + // @@protoc_insertion_point(field_get:mozilla.safebrowsing.FetchThreatListUpdatesResponse.ListUpdateResponse.response_type) + return _internal_response_type(); +} +inline void FetchThreatListUpdatesResponse_ListUpdateResponse::_internal_set_response_type(::mozilla::safebrowsing::FetchThreatListUpdatesResponse_ListUpdateResponse_ResponseType value) { + assert(::mozilla::safebrowsing::FetchThreatListUpdatesResponse_ListUpdateResponse_ResponseType_IsValid(value)); + _impl_._has_bits_[0] |= 0x00000020u; + _impl_.response_type_ = value; +} +inline void FetchThreatListUpdatesResponse_ListUpdateResponse::set_response_type(::mozilla::safebrowsing::FetchThreatListUpdatesResponse_ListUpdateResponse_ResponseType value) { + _internal_set_response_type(value); + // @@protoc_insertion_point(field_set:mozilla.safebrowsing.FetchThreatListUpdatesResponse.ListUpdateResponse.response_type) +} + +// repeated .mozilla.safebrowsing.ThreatEntrySet additions = 5; +inline int FetchThreatListUpdatesResponse_ListUpdateResponse::_internal_additions_size() const { + return _impl_.additions_.size(); +} +inline int FetchThreatListUpdatesResponse_ListUpdateResponse::additions_size() const { + return _internal_additions_size(); +} +inline void FetchThreatListUpdatesResponse_ListUpdateResponse::clear_additions() { + _impl_.additions_.Clear(); +} +inline ::mozilla::safebrowsing::ThreatEntrySet* FetchThreatListUpdatesResponse_ListUpdateResponse::mutable_additions(int index) { + // @@protoc_insertion_point(field_mutable:mozilla.safebrowsing.FetchThreatListUpdatesResponse.ListUpdateResponse.additions) + return _impl_.additions_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::mozilla::safebrowsing::ThreatEntrySet >* +FetchThreatListUpdatesResponse_ListUpdateResponse::mutable_additions() { + // @@protoc_insertion_point(field_mutable_list:mozilla.safebrowsing.FetchThreatListUpdatesResponse.ListUpdateResponse.additions) + return &_impl_.additions_; +} +inline const ::mozilla::safebrowsing::ThreatEntrySet& FetchThreatListUpdatesResponse_ListUpdateResponse::_internal_additions(int index) const { + return _impl_.additions_.Get(index); +} +inline const ::mozilla::safebrowsing::ThreatEntrySet& FetchThreatListUpdatesResponse_ListUpdateResponse::additions(int index) const { + // @@protoc_insertion_point(field_get:mozilla.safebrowsing.FetchThreatListUpdatesResponse.ListUpdateResponse.additions) + return _internal_additions(index); +} +inline ::mozilla::safebrowsing::ThreatEntrySet* FetchThreatListUpdatesResponse_ListUpdateResponse::_internal_add_additions() { + return _impl_.additions_.Add(); +} +inline ::mozilla::safebrowsing::ThreatEntrySet* FetchThreatListUpdatesResponse_ListUpdateResponse::add_additions() { + ::mozilla::safebrowsing::ThreatEntrySet* _add = _internal_add_additions(); + // @@protoc_insertion_point(field_add:mozilla.safebrowsing.FetchThreatListUpdatesResponse.ListUpdateResponse.additions) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::mozilla::safebrowsing::ThreatEntrySet >& +FetchThreatListUpdatesResponse_ListUpdateResponse::additions() const { + // @@protoc_insertion_point(field_list:mozilla.safebrowsing.FetchThreatListUpdatesResponse.ListUpdateResponse.additions) + return _impl_.additions_; +} + +// repeated .mozilla.safebrowsing.ThreatEntrySet removals = 6; +inline int FetchThreatListUpdatesResponse_ListUpdateResponse::_internal_removals_size() const { + return _impl_.removals_.size(); +} +inline int FetchThreatListUpdatesResponse_ListUpdateResponse::removals_size() const { + return _internal_removals_size(); +} +inline void FetchThreatListUpdatesResponse_ListUpdateResponse::clear_removals() { + _impl_.removals_.Clear(); +} +inline ::mozilla::safebrowsing::ThreatEntrySet* FetchThreatListUpdatesResponse_ListUpdateResponse::mutable_removals(int index) { + // @@protoc_insertion_point(field_mutable:mozilla.safebrowsing.FetchThreatListUpdatesResponse.ListUpdateResponse.removals) + return _impl_.removals_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::mozilla::safebrowsing::ThreatEntrySet >* +FetchThreatListUpdatesResponse_ListUpdateResponse::mutable_removals() { + // @@protoc_insertion_point(field_mutable_list:mozilla.safebrowsing.FetchThreatListUpdatesResponse.ListUpdateResponse.removals) + return &_impl_.removals_; +} +inline const ::mozilla::safebrowsing::ThreatEntrySet& FetchThreatListUpdatesResponse_ListUpdateResponse::_internal_removals(int index) const { + return _impl_.removals_.Get(index); +} +inline const ::mozilla::safebrowsing::ThreatEntrySet& FetchThreatListUpdatesResponse_ListUpdateResponse::removals(int index) const { + // @@protoc_insertion_point(field_get:mozilla.safebrowsing.FetchThreatListUpdatesResponse.ListUpdateResponse.removals) + return _internal_removals(index); +} +inline ::mozilla::safebrowsing::ThreatEntrySet* FetchThreatListUpdatesResponse_ListUpdateResponse::_internal_add_removals() { + return _impl_.removals_.Add(); +} +inline ::mozilla::safebrowsing::ThreatEntrySet* FetchThreatListUpdatesResponse_ListUpdateResponse::add_removals() { + ::mozilla::safebrowsing::ThreatEntrySet* _add = _internal_add_removals(); + // @@protoc_insertion_point(field_add:mozilla.safebrowsing.FetchThreatListUpdatesResponse.ListUpdateResponse.removals) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::mozilla::safebrowsing::ThreatEntrySet >& +FetchThreatListUpdatesResponse_ListUpdateResponse::removals() const { + // @@protoc_insertion_point(field_list:mozilla.safebrowsing.FetchThreatListUpdatesResponse.ListUpdateResponse.removals) + return _impl_.removals_; +} + +// optional bytes new_client_state = 7; +inline bool FetchThreatListUpdatesResponse_ListUpdateResponse::_internal_has_new_client_state() const { + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool FetchThreatListUpdatesResponse_ListUpdateResponse::has_new_client_state() const { + return _internal_has_new_client_state(); +} +inline void FetchThreatListUpdatesResponse_ListUpdateResponse::clear_new_client_state() { + _impl_.new_client_state_.ClearToEmpty(); + _impl_._has_bits_[0] &= ~0x00000001u; +} +inline const std::string& FetchThreatListUpdatesResponse_ListUpdateResponse::new_client_state() const { + // @@protoc_insertion_point(field_get:mozilla.safebrowsing.FetchThreatListUpdatesResponse.ListUpdateResponse.new_client_state) + return _internal_new_client_state(); +} +template <typename ArgT0, typename... ArgT> +inline PROTOBUF_ALWAYS_INLINE +void FetchThreatListUpdatesResponse_ListUpdateResponse::set_new_client_state(ArgT0&& arg0, ArgT... args) { + _impl_._has_bits_[0] |= 0x00000001u; + _impl_.new_client_state_.SetBytes(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:mozilla.safebrowsing.FetchThreatListUpdatesResponse.ListUpdateResponse.new_client_state) +} +inline std::string* FetchThreatListUpdatesResponse_ListUpdateResponse::mutable_new_client_state() { + std::string* _s = _internal_mutable_new_client_state(); + // @@protoc_insertion_point(field_mutable:mozilla.safebrowsing.FetchThreatListUpdatesResponse.ListUpdateResponse.new_client_state) + return _s; +} +inline const std::string& FetchThreatListUpdatesResponse_ListUpdateResponse::_internal_new_client_state() const { + return _impl_.new_client_state_.Get(); +} +inline void FetchThreatListUpdatesResponse_ListUpdateResponse::_internal_set_new_client_state(const std::string& value) { + _impl_._has_bits_[0] |= 0x00000001u; + _impl_.new_client_state_.Set(value, GetArenaForAllocation()); +} +inline std::string* FetchThreatListUpdatesResponse_ListUpdateResponse::_internal_mutable_new_client_state() { + _impl_._has_bits_[0] |= 0x00000001u; + return _impl_.new_client_state_.Mutable(GetArenaForAllocation()); +} +inline std::string* FetchThreatListUpdatesResponse_ListUpdateResponse::release_new_client_state() { + // @@protoc_insertion_point(field_release:mozilla.safebrowsing.FetchThreatListUpdatesResponse.ListUpdateResponse.new_client_state) + if (!_internal_has_new_client_state()) { + return nullptr; + } + _impl_._has_bits_[0] &= ~0x00000001u; + auto* p = _impl_.new_client_state_.Release(); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.new_client_state_.IsDefault()) { + _impl_.new_client_state_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void FetchThreatListUpdatesResponse_ListUpdateResponse::set_allocated_new_client_state(std::string* new_client_state) { + if (new_client_state != nullptr) { + _impl_._has_bits_[0] |= 0x00000001u; + } else { + _impl_._has_bits_[0] &= ~0x00000001u; + } + _impl_.new_client_state_.SetAllocated(new_client_state, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.new_client_state_.IsDefault()) { + _impl_.new_client_state_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:mozilla.safebrowsing.FetchThreatListUpdatesResponse.ListUpdateResponse.new_client_state) +} + +// optional .mozilla.safebrowsing.Checksum checksum = 8; +inline bool FetchThreatListUpdatesResponse_ListUpdateResponse::_internal_has_checksum() const { + bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0; + PROTOBUF_ASSUME(!value || _impl_.checksum_ != nullptr); + return value; +} +inline bool FetchThreatListUpdatesResponse_ListUpdateResponse::has_checksum() const { + return _internal_has_checksum(); +} +inline void FetchThreatListUpdatesResponse_ListUpdateResponse::clear_checksum() { + if (_impl_.checksum_ != nullptr) _impl_.checksum_->Clear(); + _impl_._has_bits_[0] &= ~0x00000002u; +} +inline const ::mozilla::safebrowsing::Checksum& FetchThreatListUpdatesResponse_ListUpdateResponse::_internal_checksum() const { + const ::mozilla::safebrowsing::Checksum* p = _impl_.checksum_; + return p != nullptr ? *p : reinterpret_cast<const ::mozilla::safebrowsing::Checksum&>( + ::mozilla::safebrowsing::_Checksum_default_instance_); +} +inline const ::mozilla::safebrowsing::Checksum& FetchThreatListUpdatesResponse_ListUpdateResponse::checksum() const { + // @@protoc_insertion_point(field_get:mozilla.safebrowsing.FetchThreatListUpdatesResponse.ListUpdateResponse.checksum) + return _internal_checksum(); +} +inline void FetchThreatListUpdatesResponse_ListUpdateResponse::unsafe_arena_set_allocated_checksum( + ::mozilla::safebrowsing::Checksum* checksum) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.checksum_); + } + _impl_.checksum_ = checksum; + if (checksum) { + _impl_._has_bits_[0] |= 0x00000002u; + } else { + _impl_._has_bits_[0] &= ~0x00000002u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:mozilla.safebrowsing.FetchThreatListUpdatesResponse.ListUpdateResponse.checksum) +} +inline ::mozilla::safebrowsing::Checksum* FetchThreatListUpdatesResponse_ListUpdateResponse::release_checksum() { + _impl_._has_bits_[0] &= ~0x00000002u; + ::mozilla::safebrowsing::Checksum* temp = _impl_.checksum_; + _impl_.checksum_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::mozilla::safebrowsing::Checksum* FetchThreatListUpdatesResponse_ListUpdateResponse::unsafe_arena_release_checksum() { + // @@protoc_insertion_point(field_release:mozilla.safebrowsing.FetchThreatListUpdatesResponse.ListUpdateResponse.checksum) + _impl_._has_bits_[0] &= ~0x00000002u; + ::mozilla::safebrowsing::Checksum* temp = _impl_.checksum_; + _impl_.checksum_ = nullptr; + return temp; +} +inline ::mozilla::safebrowsing::Checksum* FetchThreatListUpdatesResponse_ListUpdateResponse::_internal_mutable_checksum() { + _impl_._has_bits_[0] |= 0x00000002u; + if (_impl_.checksum_ == nullptr) { + auto* p = CreateMaybeMessage<::mozilla::safebrowsing::Checksum>(GetArenaForAllocation()); + _impl_.checksum_ = p; + } + return _impl_.checksum_; +} +inline ::mozilla::safebrowsing::Checksum* FetchThreatListUpdatesResponse_ListUpdateResponse::mutable_checksum() { + ::mozilla::safebrowsing::Checksum* _msg = _internal_mutable_checksum(); + // @@protoc_insertion_point(field_mutable:mozilla.safebrowsing.FetchThreatListUpdatesResponse.ListUpdateResponse.checksum) + return _msg; +} +inline void FetchThreatListUpdatesResponse_ListUpdateResponse::set_allocated_checksum(::mozilla::safebrowsing::Checksum* checksum) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.checksum_; + } + if (checksum) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(checksum); + if (message_arena != submessage_arena) { + checksum = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, checksum, submessage_arena); + } + _impl_._has_bits_[0] |= 0x00000002u; + } else { + _impl_._has_bits_[0] &= ~0x00000002u; + } + _impl_.checksum_ = checksum; + // @@protoc_insertion_point(field_set_allocated:mozilla.safebrowsing.FetchThreatListUpdatesResponse.ListUpdateResponse.checksum) +} + +// ------------------------------------------------------------------- + +// FetchThreatListUpdatesResponse + +// repeated .mozilla.safebrowsing.FetchThreatListUpdatesResponse.ListUpdateResponse list_update_responses = 1; +inline int FetchThreatListUpdatesResponse::_internal_list_update_responses_size() const { + return _impl_.list_update_responses_.size(); +} +inline int FetchThreatListUpdatesResponse::list_update_responses_size() const { + return _internal_list_update_responses_size(); +} +inline void FetchThreatListUpdatesResponse::clear_list_update_responses() { + _impl_.list_update_responses_.Clear(); +} +inline ::mozilla::safebrowsing::FetchThreatListUpdatesResponse_ListUpdateResponse* FetchThreatListUpdatesResponse::mutable_list_update_responses(int index) { + // @@protoc_insertion_point(field_mutable:mozilla.safebrowsing.FetchThreatListUpdatesResponse.list_update_responses) + return _impl_.list_update_responses_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::mozilla::safebrowsing::FetchThreatListUpdatesResponse_ListUpdateResponse >* +FetchThreatListUpdatesResponse::mutable_list_update_responses() { + // @@protoc_insertion_point(field_mutable_list:mozilla.safebrowsing.FetchThreatListUpdatesResponse.list_update_responses) + return &_impl_.list_update_responses_; +} +inline const ::mozilla::safebrowsing::FetchThreatListUpdatesResponse_ListUpdateResponse& FetchThreatListUpdatesResponse::_internal_list_update_responses(int index) const { + return _impl_.list_update_responses_.Get(index); +} +inline const ::mozilla::safebrowsing::FetchThreatListUpdatesResponse_ListUpdateResponse& FetchThreatListUpdatesResponse::list_update_responses(int index) const { + // @@protoc_insertion_point(field_get:mozilla.safebrowsing.FetchThreatListUpdatesResponse.list_update_responses) + return _internal_list_update_responses(index); +} +inline ::mozilla::safebrowsing::FetchThreatListUpdatesResponse_ListUpdateResponse* FetchThreatListUpdatesResponse::_internal_add_list_update_responses() { + return _impl_.list_update_responses_.Add(); +} +inline ::mozilla::safebrowsing::FetchThreatListUpdatesResponse_ListUpdateResponse* FetchThreatListUpdatesResponse::add_list_update_responses() { + ::mozilla::safebrowsing::FetchThreatListUpdatesResponse_ListUpdateResponse* _add = _internal_add_list_update_responses(); + // @@protoc_insertion_point(field_add:mozilla.safebrowsing.FetchThreatListUpdatesResponse.list_update_responses) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::mozilla::safebrowsing::FetchThreatListUpdatesResponse_ListUpdateResponse >& +FetchThreatListUpdatesResponse::list_update_responses() const { + // @@protoc_insertion_point(field_list:mozilla.safebrowsing.FetchThreatListUpdatesResponse.list_update_responses) + return _impl_.list_update_responses_; +} + +// optional .mozilla.safebrowsing.Duration minimum_wait_duration = 2; +inline bool FetchThreatListUpdatesResponse::_internal_has_minimum_wait_duration() const { + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + PROTOBUF_ASSUME(!value || _impl_.minimum_wait_duration_ != nullptr); + return value; +} +inline bool FetchThreatListUpdatesResponse::has_minimum_wait_duration() const { + return _internal_has_minimum_wait_duration(); +} +inline void FetchThreatListUpdatesResponse::clear_minimum_wait_duration() { + if (_impl_.minimum_wait_duration_ != nullptr) _impl_.minimum_wait_duration_->Clear(); + _impl_._has_bits_[0] &= ~0x00000001u; +} +inline const ::mozilla::safebrowsing::Duration& FetchThreatListUpdatesResponse::_internal_minimum_wait_duration() const { + const ::mozilla::safebrowsing::Duration* p = _impl_.minimum_wait_duration_; + return p != nullptr ? *p : reinterpret_cast<const ::mozilla::safebrowsing::Duration&>( + ::mozilla::safebrowsing::_Duration_default_instance_); +} +inline const ::mozilla::safebrowsing::Duration& FetchThreatListUpdatesResponse::minimum_wait_duration() const { + // @@protoc_insertion_point(field_get:mozilla.safebrowsing.FetchThreatListUpdatesResponse.minimum_wait_duration) + return _internal_minimum_wait_duration(); +} +inline void FetchThreatListUpdatesResponse::unsafe_arena_set_allocated_minimum_wait_duration( + ::mozilla::safebrowsing::Duration* minimum_wait_duration) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.minimum_wait_duration_); + } + _impl_.minimum_wait_duration_ = minimum_wait_duration; + if (minimum_wait_duration) { + _impl_._has_bits_[0] |= 0x00000001u; + } else { + _impl_._has_bits_[0] &= ~0x00000001u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:mozilla.safebrowsing.FetchThreatListUpdatesResponse.minimum_wait_duration) +} +inline ::mozilla::safebrowsing::Duration* FetchThreatListUpdatesResponse::release_minimum_wait_duration() { + _impl_._has_bits_[0] &= ~0x00000001u; + ::mozilla::safebrowsing::Duration* temp = _impl_.minimum_wait_duration_; + _impl_.minimum_wait_duration_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::mozilla::safebrowsing::Duration* FetchThreatListUpdatesResponse::unsafe_arena_release_minimum_wait_duration() { + // @@protoc_insertion_point(field_release:mozilla.safebrowsing.FetchThreatListUpdatesResponse.minimum_wait_duration) + _impl_._has_bits_[0] &= ~0x00000001u; + ::mozilla::safebrowsing::Duration* temp = _impl_.minimum_wait_duration_; + _impl_.minimum_wait_duration_ = nullptr; + return temp; +} +inline ::mozilla::safebrowsing::Duration* FetchThreatListUpdatesResponse::_internal_mutable_minimum_wait_duration() { + _impl_._has_bits_[0] |= 0x00000001u; + if (_impl_.minimum_wait_duration_ == nullptr) { + auto* p = CreateMaybeMessage<::mozilla::safebrowsing::Duration>(GetArenaForAllocation()); + _impl_.minimum_wait_duration_ = p; + } + return _impl_.minimum_wait_duration_; +} +inline ::mozilla::safebrowsing::Duration* FetchThreatListUpdatesResponse::mutable_minimum_wait_duration() { + ::mozilla::safebrowsing::Duration* _msg = _internal_mutable_minimum_wait_duration(); + // @@protoc_insertion_point(field_mutable:mozilla.safebrowsing.FetchThreatListUpdatesResponse.minimum_wait_duration) + return _msg; +} +inline void FetchThreatListUpdatesResponse::set_allocated_minimum_wait_duration(::mozilla::safebrowsing::Duration* minimum_wait_duration) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.minimum_wait_duration_; + } + if (minimum_wait_duration) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(minimum_wait_duration); + if (message_arena != submessage_arena) { + minimum_wait_duration = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, minimum_wait_duration, submessage_arena); + } + _impl_._has_bits_[0] |= 0x00000001u; + } else { + _impl_._has_bits_[0] &= ~0x00000001u; + } + _impl_.minimum_wait_duration_ = minimum_wait_duration; + // @@protoc_insertion_point(field_set_allocated:mozilla.safebrowsing.FetchThreatListUpdatesResponse.minimum_wait_duration) +} + +// ------------------------------------------------------------------- + +// FindFullHashesRequest + +// optional .mozilla.safebrowsing.ClientInfo client = 1; +inline bool FindFullHashesRequest::_internal_has_client() const { + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + PROTOBUF_ASSUME(!value || _impl_.client_ != nullptr); + return value; +} +inline bool FindFullHashesRequest::has_client() const { + return _internal_has_client(); +} +inline void FindFullHashesRequest::clear_client() { + if (_impl_.client_ != nullptr) _impl_.client_->Clear(); + _impl_._has_bits_[0] &= ~0x00000001u; +} +inline const ::mozilla::safebrowsing::ClientInfo& FindFullHashesRequest::_internal_client() const { + const ::mozilla::safebrowsing::ClientInfo* p = _impl_.client_; + return p != nullptr ? *p : reinterpret_cast<const ::mozilla::safebrowsing::ClientInfo&>( + ::mozilla::safebrowsing::_ClientInfo_default_instance_); +} +inline const ::mozilla::safebrowsing::ClientInfo& FindFullHashesRequest::client() const { + // @@protoc_insertion_point(field_get:mozilla.safebrowsing.FindFullHashesRequest.client) + return _internal_client(); +} +inline void FindFullHashesRequest::unsafe_arena_set_allocated_client( + ::mozilla::safebrowsing::ClientInfo* client) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.client_); + } + _impl_.client_ = client; + if (client) { + _impl_._has_bits_[0] |= 0x00000001u; + } else { + _impl_._has_bits_[0] &= ~0x00000001u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:mozilla.safebrowsing.FindFullHashesRequest.client) +} +inline ::mozilla::safebrowsing::ClientInfo* FindFullHashesRequest::release_client() { + _impl_._has_bits_[0] &= ~0x00000001u; + ::mozilla::safebrowsing::ClientInfo* temp = _impl_.client_; + _impl_.client_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::mozilla::safebrowsing::ClientInfo* FindFullHashesRequest::unsafe_arena_release_client() { + // @@protoc_insertion_point(field_release:mozilla.safebrowsing.FindFullHashesRequest.client) + _impl_._has_bits_[0] &= ~0x00000001u; + ::mozilla::safebrowsing::ClientInfo* temp = _impl_.client_; + _impl_.client_ = nullptr; + return temp; +} +inline ::mozilla::safebrowsing::ClientInfo* FindFullHashesRequest::_internal_mutable_client() { + _impl_._has_bits_[0] |= 0x00000001u; + if (_impl_.client_ == nullptr) { + auto* p = CreateMaybeMessage<::mozilla::safebrowsing::ClientInfo>(GetArenaForAllocation()); + _impl_.client_ = p; + } + return _impl_.client_; +} +inline ::mozilla::safebrowsing::ClientInfo* FindFullHashesRequest::mutable_client() { + ::mozilla::safebrowsing::ClientInfo* _msg = _internal_mutable_client(); + // @@protoc_insertion_point(field_mutable:mozilla.safebrowsing.FindFullHashesRequest.client) + return _msg; +} +inline void FindFullHashesRequest::set_allocated_client(::mozilla::safebrowsing::ClientInfo* client) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.client_; + } + if (client) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(client); + if (message_arena != submessage_arena) { + client = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, client, submessage_arena); + } + _impl_._has_bits_[0] |= 0x00000001u; + } else { + _impl_._has_bits_[0] &= ~0x00000001u; + } + _impl_.client_ = client; + // @@protoc_insertion_point(field_set_allocated:mozilla.safebrowsing.FindFullHashesRequest.client) +} + +// repeated bytes client_states = 2; +inline int FindFullHashesRequest::_internal_client_states_size() const { + return _impl_.client_states_.size(); +} +inline int FindFullHashesRequest::client_states_size() const { + return _internal_client_states_size(); +} +inline void FindFullHashesRequest::clear_client_states() { + _impl_.client_states_.Clear(); +} +inline std::string* FindFullHashesRequest::add_client_states() { + std::string* _s = _internal_add_client_states(); + // @@protoc_insertion_point(field_add_mutable:mozilla.safebrowsing.FindFullHashesRequest.client_states) + return _s; +} +inline const std::string& FindFullHashesRequest::_internal_client_states(int index) const { + return _impl_.client_states_.Get(index); +} +inline const std::string& FindFullHashesRequest::client_states(int index) const { + // @@protoc_insertion_point(field_get:mozilla.safebrowsing.FindFullHashesRequest.client_states) + return _internal_client_states(index); +} +inline std::string* FindFullHashesRequest::mutable_client_states(int index) { + // @@protoc_insertion_point(field_mutable:mozilla.safebrowsing.FindFullHashesRequest.client_states) + return _impl_.client_states_.Mutable(index); +} +inline void FindFullHashesRequest::set_client_states(int index, const std::string& value) { + _impl_.client_states_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set:mozilla.safebrowsing.FindFullHashesRequest.client_states) +} +inline void FindFullHashesRequest::set_client_states(int index, std::string&& value) { + _impl_.client_states_.Mutable(index)->assign(std::move(value)); + // @@protoc_insertion_point(field_set:mozilla.safebrowsing.FindFullHashesRequest.client_states) +} +inline void FindFullHashesRequest::set_client_states(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.client_states_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:mozilla.safebrowsing.FindFullHashesRequest.client_states) +} +inline void FindFullHashesRequest::set_client_states(int index, const void* value, size_t size) { + _impl_.client_states_.Mutable(index)->assign( + reinterpret_cast<const char*>(value), size); + // @@protoc_insertion_point(field_set_pointer:mozilla.safebrowsing.FindFullHashesRequest.client_states) +} +inline std::string* FindFullHashesRequest::_internal_add_client_states() { + return _impl_.client_states_.Add(); +} +inline void FindFullHashesRequest::add_client_states(const std::string& value) { + _impl_.client_states_.Add()->assign(value); + // @@protoc_insertion_point(field_add:mozilla.safebrowsing.FindFullHashesRequest.client_states) +} +inline void FindFullHashesRequest::add_client_states(std::string&& value) { + _impl_.client_states_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:mozilla.safebrowsing.FindFullHashesRequest.client_states) +} +inline void FindFullHashesRequest::add_client_states(const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.client_states_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:mozilla.safebrowsing.FindFullHashesRequest.client_states) +} +inline void FindFullHashesRequest::add_client_states(const void* value, size_t size) { + _impl_.client_states_.Add()->assign(reinterpret_cast<const char*>(value), size); + // @@protoc_insertion_point(field_add_pointer:mozilla.safebrowsing.FindFullHashesRequest.client_states) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<std::string>& +FindFullHashesRequest::client_states() const { + // @@protoc_insertion_point(field_list:mozilla.safebrowsing.FindFullHashesRequest.client_states) + return _impl_.client_states_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<std::string>* +FindFullHashesRequest::mutable_client_states() { + // @@protoc_insertion_point(field_mutable_list:mozilla.safebrowsing.FindFullHashesRequest.client_states) + return &_impl_.client_states_; +} + +// optional .mozilla.safebrowsing.ThreatInfo threat_info = 3; +inline bool FindFullHashesRequest::_internal_has_threat_info() const { + bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0; + PROTOBUF_ASSUME(!value || _impl_.threat_info_ != nullptr); + return value; +} +inline bool FindFullHashesRequest::has_threat_info() const { + return _internal_has_threat_info(); +} +inline void FindFullHashesRequest::clear_threat_info() { + if (_impl_.threat_info_ != nullptr) _impl_.threat_info_->Clear(); + _impl_._has_bits_[0] &= ~0x00000002u; +} +inline const ::mozilla::safebrowsing::ThreatInfo& FindFullHashesRequest::_internal_threat_info() const { + const ::mozilla::safebrowsing::ThreatInfo* p = _impl_.threat_info_; + return p != nullptr ? *p : reinterpret_cast<const ::mozilla::safebrowsing::ThreatInfo&>( + ::mozilla::safebrowsing::_ThreatInfo_default_instance_); +} +inline const ::mozilla::safebrowsing::ThreatInfo& FindFullHashesRequest::threat_info() const { + // @@protoc_insertion_point(field_get:mozilla.safebrowsing.FindFullHashesRequest.threat_info) + return _internal_threat_info(); +} +inline void FindFullHashesRequest::unsafe_arena_set_allocated_threat_info( + ::mozilla::safebrowsing::ThreatInfo* threat_info) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.threat_info_); + } + _impl_.threat_info_ = threat_info; + if (threat_info) { + _impl_._has_bits_[0] |= 0x00000002u; + } else { + _impl_._has_bits_[0] &= ~0x00000002u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:mozilla.safebrowsing.FindFullHashesRequest.threat_info) +} +inline ::mozilla::safebrowsing::ThreatInfo* FindFullHashesRequest::release_threat_info() { + _impl_._has_bits_[0] &= ~0x00000002u; + ::mozilla::safebrowsing::ThreatInfo* temp = _impl_.threat_info_; + _impl_.threat_info_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::mozilla::safebrowsing::ThreatInfo* FindFullHashesRequest::unsafe_arena_release_threat_info() { + // @@protoc_insertion_point(field_release:mozilla.safebrowsing.FindFullHashesRequest.threat_info) + _impl_._has_bits_[0] &= ~0x00000002u; + ::mozilla::safebrowsing::ThreatInfo* temp = _impl_.threat_info_; + _impl_.threat_info_ = nullptr; + return temp; +} +inline ::mozilla::safebrowsing::ThreatInfo* FindFullHashesRequest::_internal_mutable_threat_info() { + _impl_._has_bits_[0] |= 0x00000002u; + if (_impl_.threat_info_ == nullptr) { + auto* p = CreateMaybeMessage<::mozilla::safebrowsing::ThreatInfo>(GetArenaForAllocation()); + _impl_.threat_info_ = p; + } + return _impl_.threat_info_; +} +inline ::mozilla::safebrowsing::ThreatInfo* FindFullHashesRequest::mutable_threat_info() { + ::mozilla::safebrowsing::ThreatInfo* _msg = _internal_mutable_threat_info(); + // @@protoc_insertion_point(field_mutable:mozilla.safebrowsing.FindFullHashesRequest.threat_info) + return _msg; +} +inline void FindFullHashesRequest::set_allocated_threat_info(::mozilla::safebrowsing::ThreatInfo* threat_info) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.threat_info_; + } + if (threat_info) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(threat_info); + if (message_arena != submessage_arena) { + threat_info = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, threat_info, submessage_arena); + } + _impl_._has_bits_[0] |= 0x00000002u; + } else { + _impl_._has_bits_[0] &= ~0x00000002u; + } + _impl_.threat_info_ = threat_info; + // @@protoc_insertion_point(field_set_allocated:mozilla.safebrowsing.FindFullHashesRequest.threat_info) +} + +// ------------------------------------------------------------------- + +// FindFullHashesResponse + +// repeated .mozilla.safebrowsing.ThreatMatch matches = 1; +inline int FindFullHashesResponse::_internal_matches_size() const { + return _impl_.matches_.size(); +} +inline int FindFullHashesResponse::matches_size() const { + return _internal_matches_size(); +} +inline void FindFullHashesResponse::clear_matches() { + _impl_.matches_.Clear(); +} +inline ::mozilla::safebrowsing::ThreatMatch* FindFullHashesResponse::mutable_matches(int index) { + // @@protoc_insertion_point(field_mutable:mozilla.safebrowsing.FindFullHashesResponse.matches) + return _impl_.matches_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::mozilla::safebrowsing::ThreatMatch >* +FindFullHashesResponse::mutable_matches() { + // @@protoc_insertion_point(field_mutable_list:mozilla.safebrowsing.FindFullHashesResponse.matches) + return &_impl_.matches_; +} +inline const ::mozilla::safebrowsing::ThreatMatch& FindFullHashesResponse::_internal_matches(int index) const { + return _impl_.matches_.Get(index); +} +inline const ::mozilla::safebrowsing::ThreatMatch& FindFullHashesResponse::matches(int index) const { + // @@protoc_insertion_point(field_get:mozilla.safebrowsing.FindFullHashesResponse.matches) + return _internal_matches(index); +} +inline ::mozilla::safebrowsing::ThreatMatch* FindFullHashesResponse::_internal_add_matches() { + return _impl_.matches_.Add(); +} +inline ::mozilla::safebrowsing::ThreatMatch* FindFullHashesResponse::add_matches() { + ::mozilla::safebrowsing::ThreatMatch* _add = _internal_add_matches(); + // @@protoc_insertion_point(field_add:mozilla.safebrowsing.FindFullHashesResponse.matches) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::mozilla::safebrowsing::ThreatMatch >& +FindFullHashesResponse::matches() const { + // @@protoc_insertion_point(field_list:mozilla.safebrowsing.FindFullHashesResponse.matches) + return _impl_.matches_; +} + +// optional .mozilla.safebrowsing.Duration minimum_wait_duration = 2; +inline bool FindFullHashesResponse::_internal_has_minimum_wait_duration() const { + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + PROTOBUF_ASSUME(!value || _impl_.minimum_wait_duration_ != nullptr); + return value; +} +inline bool FindFullHashesResponse::has_minimum_wait_duration() const { + return _internal_has_minimum_wait_duration(); +} +inline void FindFullHashesResponse::clear_minimum_wait_duration() { + if (_impl_.minimum_wait_duration_ != nullptr) _impl_.minimum_wait_duration_->Clear(); + _impl_._has_bits_[0] &= ~0x00000001u; +} +inline const ::mozilla::safebrowsing::Duration& FindFullHashesResponse::_internal_minimum_wait_duration() const { + const ::mozilla::safebrowsing::Duration* p = _impl_.minimum_wait_duration_; + return p != nullptr ? *p : reinterpret_cast<const ::mozilla::safebrowsing::Duration&>( + ::mozilla::safebrowsing::_Duration_default_instance_); +} +inline const ::mozilla::safebrowsing::Duration& FindFullHashesResponse::minimum_wait_duration() const { + // @@protoc_insertion_point(field_get:mozilla.safebrowsing.FindFullHashesResponse.minimum_wait_duration) + return _internal_minimum_wait_duration(); +} +inline void FindFullHashesResponse::unsafe_arena_set_allocated_minimum_wait_duration( + ::mozilla::safebrowsing::Duration* minimum_wait_duration) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.minimum_wait_duration_); + } + _impl_.minimum_wait_duration_ = minimum_wait_duration; + if (minimum_wait_duration) { + _impl_._has_bits_[0] |= 0x00000001u; + } else { + _impl_._has_bits_[0] &= ~0x00000001u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:mozilla.safebrowsing.FindFullHashesResponse.minimum_wait_duration) +} +inline ::mozilla::safebrowsing::Duration* FindFullHashesResponse::release_minimum_wait_duration() { + _impl_._has_bits_[0] &= ~0x00000001u; + ::mozilla::safebrowsing::Duration* temp = _impl_.minimum_wait_duration_; + _impl_.minimum_wait_duration_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::mozilla::safebrowsing::Duration* FindFullHashesResponse::unsafe_arena_release_minimum_wait_duration() { + // @@protoc_insertion_point(field_release:mozilla.safebrowsing.FindFullHashesResponse.minimum_wait_duration) + _impl_._has_bits_[0] &= ~0x00000001u; + ::mozilla::safebrowsing::Duration* temp = _impl_.minimum_wait_duration_; + _impl_.minimum_wait_duration_ = nullptr; + return temp; +} +inline ::mozilla::safebrowsing::Duration* FindFullHashesResponse::_internal_mutable_minimum_wait_duration() { + _impl_._has_bits_[0] |= 0x00000001u; + if (_impl_.minimum_wait_duration_ == nullptr) { + auto* p = CreateMaybeMessage<::mozilla::safebrowsing::Duration>(GetArenaForAllocation()); + _impl_.minimum_wait_duration_ = p; + } + return _impl_.minimum_wait_duration_; +} +inline ::mozilla::safebrowsing::Duration* FindFullHashesResponse::mutable_minimum_wait_duration() { + ::mozilla::safebrowsing::Duration* _msg = _internal_mutable_minimum_wait_duration(); + // @@protoc_insertion_point(field_mutable:mozilla.safebrowsing.FindFullHashesResponse.minimum_wait_duration) + return _msg; +} +inline void FindFullHashesResponse::set_allocated_minimum_wait_duration(::mozilla::safebrowsing::Duration* minimum_wait_duration) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.minimum_wait_duration_; + } + if (minimum_wait_duration) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(minimum_wait_duration); + if (message_arena != submessage_arena) { + minimum_wait_duration = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, minimum_wait_duration, submessage_arena); + } + _impl_._has_bits_[0] |= 0x00000001u; + } else { + _impl_._has_bits_[0] &= ~0x00000001u; + } + _impl_.minimum_wait_duration_ = minimum_wait_duration; + // @@protoc_insertion_point(field_set_allocated:mozilla.safebrowsing.FindFullHashesResponse.minimum_wait_duration) +} + +// optional .mozilla.safebrowsing.Duration negative_cache_duration = 3; +inline bool FindFullHashesResponse::_internal_has_negative_cache_duration() const { + bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0; + PROTOBUF_ASSUME(!value || _impl_.negative_cache_duration_ != nullptr); + return value; +} +inline bool FindFullHashesResponse::has_negative_cache_duration() const { + return _internal_has_negative_cache_duration(); +} +inline void FindFullHashesResponse::clear_negative_cache_duration() { + if (_impl_.negative_cache_duration_ != nullptr) _impl_.negative_cache_duration_->Clear(); + _impl_._has_bits_[0] &= ~0x00000002u; +} +inline const ::mozilla::safebrowsing::Duration& FindFullHashesResponse::_internal_negative_cache_duration() const { + const ::mozilla::safebrowsing::Duration* p = _impl_.negative_cache_duration_; + return p != nullptr ? *p : reinterpret_cast<const ::mozilla::safebrowsing::Duration&>( + ::mozilla::safebrowsing::_Duration_default_instance_); +} +inline const ::mozilla::safebrowsing::Duration& FindFullHashesResponse::negative_cache_duration() const { + // @@protoc_insertion_point(field_get:mozilla.safebrowsing.FindFullHashesResponse.negative_cache_duration) + return _internal_negative_cache_duration(); +} +inline void FindFullHashesResponse::unsafe_arena_set_allocated_negative_cache_duration( + ::mozilla::safebrowsing::Duration* negative_cache_duration) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.negative_cache_duration_); + } + _impl_.negative_cache_duration_ = negative_cache_duration; + if (negative_cache_duration) { + _impl_._has_bits_[0] |= 0x00000002u; + } else { + _impl_._has_bits_[0] &= ~0x00000002u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:mozilla.safebrowsing.FindFullHashesResponse.negative_cache_duration) +} +inline ::mozilla::safebrowsing::Duration* FindFullHashesResponse::release_negative_cache_duration() { + _impl_._has_bits_[0] &= ~0x00000002u; + ::mozilla::safebrowsing::Duration* temp = _impl_.negative_cache_duration_; + _impl_.negative_cache_duration_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::mozilla::safebrowsing::Duration* FindFullHashesResponse::unsafe_arena_release_negative_cache_duration() { + // @@protoc_insertion_point(field_release:mozilla.safebrowsing.FindFullHashesResponse.negative_cache_duration) + _impl_._has_bits_[0] &= ~0x00000002u; + ::mozilla::safebrowsing::Duration* temp = _impl_.negative_cache_duration_; + _impl_.negative_cache_duration_ = nullptr; + return temp; +} +inline ::mozilla::safebrowsing::Duration* FindFullHashesResponse::_internal_mutable_negative_cache_duration() { + _impl_._has_bits_[0] |= 0x00000002u; + if (_impl_.negative_cache_duration_ == nullptr) { + auto* p = CreateMaybeMessage<::mozilla::safebrowsing::Duration>(GetArenaForAllocation()); + _impl_.negative_cache_duration_ = p; + } + return _impl_.negative_cache_duration_; +} +inline ::mozilla::safebrowsing::Duration* FindFullHashesResponse::mutable_negative_cache_duration() { + ::mozilla::safebrowsing::Duration* _msg = _internal_mutable_negative_cache_duration(); + // @@protoc_insertion_point(field_mutable:mozilla.safebrowsing.FindFullHashesResponse.negative_cache_duration) + return _msg; +} +inline void FindFullHashesResponse::set_allocated_negative_cache_duration(::mozilla::safebrowsing::Duration* negative_cache_duration) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.negative_cache_duration_; + } + if (negative_cache_duration) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(negative_cache_duration); + if (message_arena != submessage_arena) { + negative_cache_duration = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, negative_cache_duration, submessage_arena); + } + _impl_._has_bits_[0] |= 0x00000002u; + } else { + _impl_._has_bits_[0] &= ~0x00000002u; + } + _impl_.negative_cache_duration_ = negative_cache_duration; + // @@protoc_insertion_point(field_set_allocated:mozilla.safebrowsing.FindFullHashesResponse.negative_cache_duration) +} + +// ------------------------------------------------------------------- + +// ThreatHit_ThreatSource + +// optional string url = 1; +inline bool ThreatHit_ThreatSource::_internal_has_url() const { + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool ThreatHit_ThreatSource::has_url() const { + return _internal_has_url(); +} +inline void ThreatHit_ThreatSource::clear_url() { + _impl_.url_.ClearToEmpty(); + _impl_._has_bits_[0] &= ~0x00000001u; +} +inline const std::string& ThreatHit_ThreatSource::url() const { + // @@protoc_insertion_point(field_get:mozilla.safebrowsing.ThreatHit.ThreatSource.url) + return _internal_url(); +} +template <typename ArgT0, typename... ArgT> +inline PROTOBUF_ALWAYS_INLINE +void ThreatHit_ThreatSource::set_url(ArgT0&& arg0, ArgT... args) { + _impl_._has_bits_[0] |= 0x00000001u; + _impl_.url_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:mozilla.safebrowsing.ThreatHit.ThreatSource.url) +} +inline std::string* ThreatHit_ThreatSource::mutable_url() { + std::string* _s = _internal_mutable_url(); + // @@protoc_insertion_point(field_mutable:mozilla.safebrowsing.ThreatHit.ThreatSource.url) + return _s; +} +inline const std::string& ThreatHit_ThreatSource::_internal_url() const { + return _impl_.url_.Get(); +} +inline void ThreatHit_ThreatSource::_internal_set_url(const std::string& value) { + _impl_._has_bits_[0] |= 0x00000001u; + _impl_.url_.Set(value, GetArenaForAllocation()); +} +inline std::string* ThreatHit_ThreatSource::_internal_mutable_url() { + _impl_._has_bits_[0] |= 0x00000001u; + return _impl_.url_.Mutable(GetArenaForAllocation()); +} +inline std::string* ThreatHit_ThreatSource::release_url() { + // @@protoc_insertion_point(field_release:mozilla.safebrowsing.ThreatHit.ThreatSource.url) + if (!_internal_has_url()) { + return nullptr; + } + _impl_._has_bits_[0] &= ~0x00000001u; + auto* p = _impl_.url_.Release(); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.url_.IsDefault()) { + _impl_.url_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void ThreatHit_ThreatSource::set_allocated_url(std::string* url) { + if (url != nullptr) { + _impl_._has_bits_[0] |= 0x00000001u; + } else { + _impl_._has_bits_[0] &= ~0x00000001u; + } + _impl_.url_.SetAllocated(url, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.url_.IsDefault()) { + _impl_.url_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:mozilla.safebrowsing.ThreatHit.ThreatSource.url) +} + +// optional .mozilla.safebrowsing.ThreatHit.ThreatSourceType type = 2; +inline bool ThreatHit_ThreatSource::_internal_has_type() const { + bool value = (_impl_._has_bits_[0] & 0x00000008u) != 0; + return value; +} +inline bool ThreatHit_ThreatSource::has_type() const { + return _internal_has_type(); +} +inline void ThreatHit_ThreatSource::clear_type() { + _impl_.type_ = 0; + _impl_._has_bits_[0] &= ~0x00000008u; +} +inline ::mozilla::safebrowsing::ThreatHit_ThreatSourceType ThreatHit_ThreatSource::_internal_type() const { + return static_cast< ::mozilla::safebrowsing::ThreatHit_ThreatSourceType >(_impl_.type_); +} +inline ::mozilla::safebrowsing::ThreatHit_ThreatSourceType ThreatHit_ThreatSource::type() const { + // @@protoc_insertion_point(field_get:mozilla.safebrowsing.ThreatHit.ThreatSource.type) + return _internal_type(); +} +inline void ThreatHit_ThreatSource::_internal_set_type(::mozilla::safebrowsing::ThreatHit_ThreatSourceType value) { + assert(::mozilla::safebrowsing::ThreatHit_ThreatSourceType_IsValid(value)); + _impl_._has_bits_[0] |= 0x00000008u; + _impl_.type_ = value; +} +inline void ThreatHit_ThreatSource::set_type(::mozilla::safebrowsing::ThreatHit_ThreatSourceType value) { + _internal_set_type(value); + // @@protoc_insertion_point(field_set:mozilla.safebrowsing.ThreatHit.ThreatSource.type) +} + +// optional string remote_ip = 3; +inline bool ThreatHit_ThreatSource::_internal_has_remote_ip() const { + bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool ThreatHit_ThreatSource::has_remote_ip() const { + return _internal_has_remote_ip(); +} +inline void ThreatHit_ThreatSource::clear_remote_ip() { + _impl_.remote_ip_.ClearToEmpty(); + _impl_._has_bits_[0] &= ~0x00000002u; +} +inline const std::string& ThreatHit_ThreatSource::remote_ip() const { + // @@protoc_insertion_point(field_get:mozilla.safebrowsing.ThreatHit.ThreatSource.remote_ip) + return _internal_remote_ip(); +} +template <typename ArgT0, typename... ArgT> +inline PROTOBUF_ALWAYS_INLINE +void ThreatHit_ThreatSource::set_remote_ip(ArgT0&& arg0, ArgT... args) { + _impl_._has_bits_[0] |= 0x00000002u; + _impl_.remote_ip_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:mozilla.safebrowsing.ThreatHit.ThreatSource.remote_ip) +} +inline std::string* ThreatHit_ThreatSource::mutable_remote_ip() { + std::string* _s = _internal_mutable_remote_ip(); + // @@protoc_insertion_point(field_mutable:mozilla.safebrowsing.ThreatHit.ThreatSource.remote_ip) + return _s; +} +inline const std::string& ThreatHit_ThreatSource::_internal_remote_ip() const { + return _impl_.remote_ip_.Get(); +} +inline void ThreatHit_ThreatSource::_internal_set_remote_ip(const std::string& value) { + _impl_._has_bits_[0] |= 0x00000002u; + _impl_.remote_ip_.Set(value, GetArenaForAllocation()); +} +inline std::string* ThreatHit_ThreatSource::_internal_mutable_remote_ip() { + _impl_._has_bits_[0] |= 0x00000002u; + return _impl_.remote_ip_.Mutable(GetArenaForAllocation()); +} +inline std::string* ThreatHit_ThreatSource::release_remote_ip() { + // @@protoc_insertion_point(field_release:mozilla.safebrowsing.ThreatHit.ThreatSource.remote_ip) + if (!_internal_has_remote_ip()) { + return nullptr; + } + _impl_._has_bits_[0] &= ~0x00000002u; + auto* p = _impl_.remote_ip_.Release(); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.remote_ip_.IsDefault()) { + _impl_.remote_ip_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void ThreatHit_ThreatSource::set_allocated_remote_ip(std::string* remote_ip) { + if (remote_ip != nullptr) { + _impl_._has_bits_[0] |= 0x00000002u; + } else { + _impl_._has_bits_[0] &= ~0x00000002u; + } + _impl_.remote_ip_.SetAllocated(remote_ip, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.remote_ip_.IsDefault()) { + _impl_.remote_ip_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:mozilla.safebrowsing.ThreatHit.ThreatSource.remote_ip) +} + +// optional string referrer = 4; +inline bool ThreatHit_ThreatSource::_internal_has_referrer() const { + bool value = (_impl_._has_bits_[0] & 0x00000004u) != 0; + return value; +} +inline bool ThreatHit_ThreatSource::has_referrer() const { + return _internal_has_referrer(); +} +inline void ThreatHit_ThreatSource::clear_referrer() { + _impl_.referrer_.ClearToEmpty(); + _impl_._has_bits_[0] &= ~0x00000004u; +} +inline const std::string& ThreatHit_ThreatSource::referrer() const { + // @@protoc_insertion_point(field_get:mozilla.safebrowsing.ThreatHit.ThreatSource.referrer) + return _internal_referrer(); +} +template <typename ArgT0, typename... ArgT> +inline PROTOBUF_ALWAYS_INLINE +void ThreatHit_ThreatSource::set_referrer(ArgT0&& arg0, ArgT... args) { + _impl_._has_bits_[0] |= 0x00000004u; + _impl_.referrer_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:mozilla.safebrowsing.ThreatHit.ThreatSource.referrer) +} +inline std::string* ThreatHit_ThreatSource::mutable_referrer() { + std::string* _s = _internal_mutable_referrer(); + // @@protoc_insertion_point(field_mutable:mozilla.safebrowsing.ThreatHit.ThreatSource.referrer) + return _s; +} +inline const std::string& ThreatHit_ThreatSource::_internal_referrer() const { + return _impl_.referrer_.Get(); +} +inline void ThreatHit_ThreatSource::_internal_set_referrer(const std::string& value) { + _impl_._has_bits_[0] |= 0x00000004u; + _impl_.referrer_.Set(value, GetArenaForAllocation()); +} +inline std::string* ThreatHit_ThreatSource::_internal_mutable_referrer() { + _impl_._has_bits_[0] |= 0x00000004u; + return _impl_.referrer_.Mutable(GetArenaForAllocation()); +} +inline std::string* ThreatHit_ThreatSource::release_referrer() { + // @@protoc_insertion_point(field_release:mozilla.safebrowsing.ThreatHit.ThreatSource.referrer) + if (!_internal_has_referrer()) { + return nullptr; + } + _impl_._has_bits_[0] &= ~0x00000004u; + auto* p = _impl_.referrer_.Release(); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.referrer_.IsDefault()) { + _impl_.referrer_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void ThreatHit_ThreatSource::set_allocated_referrer(std::string* referrer) { + if (referrer != nullptr) { + _impl_._has_bits_[0] |= 0x00000004u; + } else { + _impl_._has_bits_[0] &= ~0x00000004u; + } + _impl_.referrer_.SetAllocated(referrer, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.referrer_.IsDefault()) { + _impl_.referrer_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:mozilla.safebrowsing.ThreatHit.ThreatSource.referrer) +} + +// ------------------------------------------------------------------- + +// ThreatHit_UserInfo + +// optional string region_code = 1; +inline bool ThreatHit_UserInfo::_internal_has_region_code() const { + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool ThreatHit_UserInfo::has_region_code() const { + return _internal_has_region_code(); +} +inline void ThreatHit_UserInfo::clear_region_code() { + _impl_.region_code_.ClearToEmpty(); + _impl_._has_bits_[0] &= ~0x00000001u; +} +inline const std::string& ThreatHit_UserInfo::region_code() const { + // @@protoc_insertion_point(field_get:mozilla.safebrowsing.ThreatHit.UserInfo.region_code) + return _internal_region_code(); +} +template <typename ArgT0, typename... ArgT> +inline PROTOBUF_ALWAYS_INLINE +void ThreatHit_UserInfo::set_region_code(ArgT0&& arg0, ArgT... args) { + _impl_._has_bits_[0] |= 0x00000001u; + _impl_.region_code_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:mozilla.safebrowsing.ThreatHit.UserInfo.region_code) +} +inline std::string* ThreatHit_UserInfo::mutable_region_code() { + std::string* _s = _internal_mutable_region_code(); + // @@protoc_insertion_point(field_mutable:mozilla.safebrowsing.ThreatHit.UserInfo.region_code) + return _s; +} +inline const std::string& ThreatHit_UserInfo::_internal_region_code() const { + return _impl_.region_code_.Get(); +} +inline void ThreatHit_UserInfo::_internal_set_region_code(const std::string& value) { + _impl_._has_bits_[0] |= 0x00000001u; + _impl_.region_code_.Set(value, GetArenaForAllocation()); +} +inline std::string* ThreatHit_UserInfo::_internal_mutable_region_code() { + _impl_._has_bits_[0] |= 0x00000001u; + return _impl_.region_code_.Mutable(GetArenaForAllocation()); +} +inline std::string* ThreatHit_UserInfo::release_region_code() { + // @@protoc_insertion_point(field_release:mozilla.safebrowsing.ThreatHit.UserInfo.region_code) + if (!_internal_has_region_code()) { + return nullptr; + } + _impl_._has_bits_[0] &= ~0x00000001u; + auto* p = _impl_.region_code_.Release(); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.region_code_.IsDefault()) { + _impl_.region_code_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void ThreatHit_UserInfo::set_allocated_region_code(std::string* region_code) { + if (region_code != nullptr) { + _impl_._has_bits_[0] |= 0x00000001u; + } else { + _impl_._has_bits_[0] &= ~0x00000001u; + } + _impl_.region_code_.SetAllocated(region_code, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.region_code_.IsDefault()) { + _impl_.region_code_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:mozilla.safebrowsing.ThreatHit.UserInfo.region_code) +} + +// optional bytes user_id = 2; +inline bool ThreatHit_UserInfo::_internal_has_user_id() const { + bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool ThreatHit_UserInfo::has_user_id() const { + return _internal_has_user_id(); +} +inline void ThreatHit_UserInfo::clear_user_id() { + _impl_.user_id_.ClearToEmpty(); + _impl_._has_bits_[0] &= ~0x00000002u; +} +inline const std::string& ThreatHit_UserInfo::user_id() const { + // @@protoc_insertion_point(field_get:mozilla.safebrowsing.ThreatHit.UserInfo.user_id) + return _internal_user_id(); +} +template <typename ArgT0, typename... ArgT> +inline PROTOBUF_ALWAYS_INLINE +void ThreatHit_UserInfo::set_user_id(ArgT0&& arg0, ArgT... args) { + _impl_._has_bits_[0] |= 0x00000002u; + _impl_.user_id_.SetBytes(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:mozilla.safebrowsing.ThreatHit.UserInfo.user_id) +} +inline std::string* ThreatHit_UserInfo::mutable_user_id() { + std::string* _s = _internal_mutable_user_id(); + // @@protoc_insertion_point(field_mutable:mozilla.safebrowsing.ThreatHit.UserInfo.user_id) + return _s; +} +inline const std::string& ThreatHit_UserInfo::_internal_user_id() const { + return _impl_.user_id_.Get(); +} +inline void ThreatHit_UserInfo::_internal_set_user_id(const std::string& value) { + _impl_._has_bits_[0] |= 0x00000002u; + _impl_.user_id_.Set(value, GetArenaForAllocation()); +} +inline std::string* ThreatHit_UserInfo::_internal_mutable_user_id() { + _impl_._has_bits_[0] |= 0x00000002u; + return _impl_.user_id_.Mutable(GetArenaForAllocation()); +} +inline std::string* ThreatHit_UserInfo::release_user_id() { + // @@protoc_insertion_point(field_release:mozilla.safebrowsing.ThreatHit.UserInfo.user_id) + if (!_internal_has_user_id()) { + return nullptr; + } + _impl_._has_bits_[0] &= ~0x00000002u; + auto* p = _impl_.user_id_.Release(); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.user_id_.IsDefault()) { + _impl_.user_id_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void ThreatHit_UserInfo::set_allocated_user_id(std::string* user_id) { + if (user_id != nullptr) { + _impl_._has_bits_[0] |= 0x00000002u; + } else { + _impl_._has_bits_[0] &= ~0x00000002u; + } + _impl_.user_id_.SetAllocated(user_id, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.user_id_.IsDefault()) { + _impl_.user_id_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:mozilla.safebrowsing.ThreatHit.UserInfo.user_id) +} + +// ------------------------------------------------------------------- + +// ThreatHit + +// optional .mozilla.safebrowsing.ThreatType threat_type = 1; +inline bool ThreatHit::_internal_has_threat_type() const { + bool value = (_impl_._has_bits_[0] & 0x00000008u) != 0; + return value; +} +inline bool ThreatHit::has_threat_type() const { + return _internal_has_threat_type(); +} +inline void ThreatHit::clear_threat_type() { + _impl_.threat_type_ = 0; + _impl_._has_bits_[0] &= ~0x00000008u; +} +inline ::mozilla::safebrowsing::ThreatType ThreatHit::_internal_threat_type() const { + return static_cast< ::mozilla::safebrowsing::ThreatType >(_impl_.threat_type_); +} +inline ::mozilla::safebrowsing::ThreatType ThreatHit::threat_type() const { + // @@protoc_insertion_point(field_get:mozilla.safebrowsing.ThreatHit.threat_type) + return _internal_threat_type(); +} +inline void ThreatHit::_internal_set_threat_type(::mozilla::safebrowsing::ThreatType value) { + assert(::mozilla::safebrowsing::ThreatType_IsValid(value)); + _impl_._has_bits_[0] |= 0x00000008u; + _impl_.threat_type_ = value; +} +inline void ThreatHit::set_threat_type(::mozilla::safebrowsing::ThreatType value) { + _internal_set_threat_type(value); + // @@protoc_insertion_point(field_set:mozilla.safebrowsing.ThreatHit.threat_type) +} + +// optional .mozilla.safebrowsing.PlatformType platform_type = 2; +inline bool ThreatHit::_internal_has_platform_type() const { + bool value = (_impl_._has_bits_[0] & 0x00000010u) != 0; + return value; +} +inline bool ThreatHit::has_platform_type() const { + return _internal_has_platform_type(); +} +inline void ThreatHit::clear_platform_type() { + _impl_.platform_type_ = 0; + _impl_._has_bits_[0] &= ~0x00000010u; +} +inline ::mozilla::safebrowsing::PlatformType ThreatHit::_internal_platform_type() const { + return static_cast< ::mozilla::safebrowsing::PlatformType >(_impl_.platform_type_); +} +inline ::mozilla::safebrowsing::PlatformType ThreatHit::platform_type() const { + // @@protoc_insertion_point(field_get:mozilla.safebrowsing.ThreatHit.platform_type) + return _internal_platform_type(); +} +inline void ThreatHit::_internal_set_platform_type(::mozilla::safebrowsing::PlatformType value) { + assert(::mozilla::safebrowsing::PlatformType_IsValid(value)); + _impl_._has_bits_[0] |= 0x00000010u; + _impl_.platform_type_ = value; +} +inline void ThreatHit::set_platform_type(::mozilla::safebrowsing::PlatformType value) { + _internal_set_platform_type(value); + // @@protoc_insertion_point(field_set:mozilla.safebrowsing.ThreatHit.platform_type) +} + +// optional .mozilla.safebrowsing.ThreatEntry entry = 3; +inline bool ThreatHit::_internal_has_entry() const { + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + PROTOBUF_ASSUME(!value || _impl_.entry_ != nullptr); + return value; +} +inline bool ThreatHit::has_entry() const { + return _internal_has_entry(); +} +inline void ThreatHit::clear_entry() { + if (_impl_.entry_ != nullptr) _impl_.entry_->Clear(); + _impl_._has_bits_[0] &= ~0x00000001u; +} +inline const ::mozilla::safebrowsing::ThreatEntry& ThreatHit::_internal_entry() const { + const ::mozilla::safebrowsing::ThreatEntry* p = _impl_.entry_; + return p != nullptr ? *p : reinterpret_cast<const ::mozilla::safebrowsing::ThreatEntry&>( + ::mozilla::safebrowsing::_ThreatEntry_default_instance_); +} +inline const ::mozilla::safebrowsing::ThreatEntry& ThreatHit::entry() const { + // @@protoc_insertion_point(field_get:mozilla.safebrowsing.ThreatHit.entry) + return _internal_entry(); +} +inline void ThreatHit::unsafe_arena_set_allocated_entry( + ::mozilla::safebrowsing::ThreatEntry* entry) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.entry_); + } + _impl_.entry_ = entry; + if (entry) { + _impl_._has_bits_[0] |= 0x00000001u; + } else { + _impl_._has_bits_[0] &= ~0x00000001u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:mozilla.safebrowsing.ThreatHit.entry) +} +inline ::mozilla::safebrowsing::ThreatEntry* ThreatHit::release_entry() { + _impl_._has_bits_[0] &= ~0x00000001u; + ::mozilla::safebrowsing::ThreatEntry* temp = _impl_.entry_; + _impl_.entry_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::mozilla::safebrowsing::ThreatEntry* ThreatHit::unsafe_arena_release_entry() { + // @@protoc_insertion_point(field_release:mozilla.safebrowsing.ThreatHit.entry) + _impl_._has_bits_[0] &= ~0x00000001u; + ::mozilla::safebrowsing::ThreatEntry* temp = _impl_.entry_; + _impl_.entry_ = nullptr; + return temp; +} +inline ::mozilla::safebrowsing::ThreatEntry* ThreatHit::_internal_mutable_entry() { + _impl_._has_bits_[0] |= 0x00000001u; + if (_impl_.entry_ == nullptr) { + auto* p = CreateMaybeMessage<::mozilla::safebrowsing::ThreatEntry>(GetArenaForAllocation()); + _impl_.entry_ = p; + } + return _impl_.entry_; +} +inline ::mozilla::safebrowsing::ThreatEntry* ThreatHit::mutable_entry() { + ::mozilla::safebrowsing::ThreatEntry* _msg = _internal_mutable_entry(); + // @@protoc_insertion_point(field_mutable:mozilla.safebrowsing.ThreatHit.entry) + return _msg; +} +inline void ThreatHit::set_allocated_entry(::mozilla::safebrowsing::ThreatEntry* entry) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.entry_; + } + if (entry) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(entry); + if (message_arena != submessage_arena) { + entry = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, entry, submessage_arena); + } + _impl_._has_bits_[0] |= 0x00000001u; + } else { + _impl_._has_bits_[0] &= ~0x00000001u; + } + _impl_.entry_ = entry; + // @@protoc_insertion_point(field_set_allocated:mozilla.safebrowsing.ThreatHit.entry) +} + +// repeated .mozilla.safebrowsing.ThreatHit.ThreatSource resources = 4; +inline int ThreatHit::_internal_resources_size() const { + return _impl_.resources_.size(); +} +inline int ThreatHit::resources_size() const { + return _internal_resources_size(); +} +inline void ThreatHit::clear_resources() { + _impl_.resources_.Clear(); +} +inline ::mozilla::safebrowsing::ThreatHit_ThreatSource* ThreatHit::mutable_resources(int index) { + // @@protoc_insertion_point(field_mutable:mozilla.safebrowsing.ThreatHit.resources) + return _impl_.resources_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::mozilla::safebrowsing::ThreatHit_ThreatSource >* +ThreatHit::mutable_resources() { + // @@protoc_insertion_point(field_mutable_list:mozilla.safebrowsing.ThreatHit.resources) + return &_impl_.resources_; +} +inline const ::mozilla::safebrowsing::ThreatHit_ThreatSource& ThreatHit::_internal_resources(int index) const { + return _impl_.resources_.Get(index); +} +inline const ::mozilla::safebrowsing::ThreatHit_ThreatSource& ThreatHit::resources(int index) const { + // @@protoc_insertion_point(field_get:mozilla.safebrowsing.ThreatHit.resources) + return _internal_resources(index); +} +inline ::mozilla::safebrowsing::ThreatHit_ThreatSource* ThreatHit::_internal_add_resources() { + return _impl_.resources_.Add(); +} +inline ::mozilla::safebrowsing::ThreatHit_ThreatSource* ThreatHit::add_resources() { + ::mozilla::safebrowsing::ThreatHit_ThreatSource* _add = _internal_add_resources(); + // @@protoc_insertion_point(field_add:mozilla.safebrowsing.ThreatHit.resources) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::mozilla::safebrowsing::ThreatHit_ThreatSource >& +ThreatHit::resources() const { + // @@protoc_insertion_point(field_list:mozilla.safebrowsing.ThreatHit.resources) + return _impl_.resources_; +} + +// optional .mozilla.safebrowsing.ClientInfo client_info = 5; +inline bool ThreatHit::_internal_has_client_info() const { + bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0; + PROTOBUF_ASSUME(!value || _impl_.client_info_ != nullptr); + return value; +} +inline bool ThreatHit::has_client_info() const { + return _internal_has_client_info(); +} +inline void ThreatHit::clear_client_info() { + if (_impl_.client_info_ != nullptr) _impl_.client_info_->Clear(); + _impl_._has_bits_[0] &= ~0x00000002u; +} +inline const ::mozilla::safebrowsing::ClientInfo& ThreatHit::_internal_client_info() const { + const ::mozilla::safebrowsing::ClientInfo* p = _impl_.client_info_; + return p != nullptr ? *p : reinterpret_cast<const ::mozilla::safebrowsing::ClientInfo&>( + ::mozilla::safebrowsing::_ClientInfo_default_instance_); +} +inline const ::mozilla::safebrowsing::ClientInfo& ThreatHit::client_info() const { + // @@protoc_insertion_point(field_get:mozilla.safebrowsing.ThreatHit.client_info) + return _internal_client_info(); +} +inline void ThreatHit::unsafe_arena_set_allocated_client_info( + ::mozilla::safebrowsing::ClientInfo* client_info) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.client_info_); + } + _impl_.client_info_ = client_info; + if (client_info) { + _impl_._has_bits_[0] |= 0x00000002u; + } else { + _impl_._has_bits_[0] &= ~0x00000002u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:mozilla.safebrowsing.ThreatHit.client_info) +} +inline ::mozilla::safebrowsing::ClientInfo* ThreatHit::release_client_info() { + _impl_._has_bits_[0] &= ~0x00000002u; + ::mozilla::safebrowsing::ClientInfo* temp = _impl_.client_info_; + _impl_.client_info_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::mozilla::safebrowsing::ClientInfo* ThreatHit::unsafe_arena_release_client_info() { + // @@protoc_insertion_point(field_release:mozilla.safebrowsing.ThreatHit.client_info) + _impl_._has_bits_[0] &= ~0x00000002u; + ::mozilla::safebrowsing::ClientInfo* temp = _impl_.client_info_; + _impl_.client_info_ = nullptr; + return temp; +} +inline ::mozilla::safebrowsing::ClientInfo* ThreatHit::_internal_mutable_client_info() { + _impl_._has_bits_[0] |= 0x00000002u; + if (_impl_.client_info_ == nullptr) { + auto* p = CreateMaybeMessage<::mozilla::safebrowsing::ClientInfo>(GetArenaForAllocation()); + _impl_.client_info_ = p; + } + return _impl_.client_info_; +} +inline ::mozilla::safebrowsing::ClientInfo* ThreatHit::mutable_client_info() { + ::mozilla::safebrowsing::ClientInfo* _msg = _internal_mutable_client_info(); + // @@protoc_insertion_point(field_mutable:mozilla.safebrowsing.ThreatHit.client_info) + return _msg; +} +inline void ThreatHit::set_allocated_client_info(::mozilla::safebrowsing::ClientInfo* client_info) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.client_info_; + } + if (client_info) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(client_info); + if (message_arena != submessage_arena) { + client_info = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, client_info, submessage_arena); + } + _impl_._has_bits_[0] |= 0x00000002u; + } else { + _impl_._has_bits_[0] &= ~0x00000002u; + } + _impl_.client_info_ = client_info; + // @@protoc_insertion_point(field_set_allocated:mozilla.safebrowsing.ThreatHit.client_info) +} + +// optional .mozilla.safebrowsing.ThreatHit.UserInfo user_info = 6; +inline bool ThreatHit::_internal_has_user_info() const { + bool value = (_impl_._has_bits_[0] & 0x00000004u) != 0; + PROTOBUF_ASSUME(!value || _impl_.user_info_ != nullptr); + return value; +} +inline bool ThreatHit::has_user_info() const { + return _internal_has_user_info(); +} +inline void ThreatHit::clear_user_info() { + if (_impl_.user_info_ != nullptr) _impl_.user_info_->Clear(); + _impl_._has_bits_[0] &= ~0x00000004u; +} +inline const ::mozilla::safebrowsing::ThreatHit_UserInfo& ThreatHit::_internal_user_info() const { + const ::mozilla::safebrowsing::ThreatHit_UserInfo* p = _impl_.user_info_; + return p != nullptr ? *p : reinterpret_cast<const ::mozilla::safebrowsing::ThreatHit_UserInfo&>( + ::mozilla::safebrowsing::_ThreatHit_UserInfo_default_instance_); +} +inline const ::mozilla::safebrowsing::ThreatHit_UserInfo& ThreatHit::user_info() const { + // @@protoc_insertion_point(field_get:mozilla.safebrowsing.ThreatHit.user_info) + return _internal_user_info(); +} +inline void ThreatHit::unsafe_arena_set_allocated_user_info( + ::mozilla::safebrowsing::ThreatHit_UserInfo* user_info) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.user_info_); + } + _impl_.user_info_ = user_info; + if (user_info) { + _impl_._has_bits_[0] |= 0x00000004u; + } else { + _impl_._has_bits_[0] &= ~0x00000004u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:mozilla.safebrowsing.ThreatHit.user_info) +} +inline ::mozilla::safebrowsing::ThreatHit_UserInfo* ThreatHit::release_user_info() { + _impl_._has_bits_[0] &= ~0x00000004u; + ::mozilla::safebrowsing::ThreatHit_UserInfo* temp = _impl_.user_info_; + _impl_.user_info_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::mozilla::safebrowsing::ThreatHit_UserInfo* ThreatHit::unsafe_arena_release_user_info() { + // @@protoc_insertion_point(field_release:mozilla.safebrowsing.ThreatHit.user_info) + _impl_._has_bits_[0] &= ~0x00000004u; + ::mozilla::safebrowsing::ThreatHit_UserInfo* temp = _impl_.user_info_; + _impl_.user_info_ = nullptr; + return temp; +} +inline ::mozilla::safebrowsing::ThreatHit_UserInfo* ThreatHit::_internal_mutable_user_info() { + _impl_._has_bits_[0] |= 0x00000004u; + if (_impl_.user_info_ == nullptr) { + auto* p = CreateMaybeMessage<::mozilla::safebrowsing::ThreatHit_UserInfo>(GetArenaForAllocation()); + _impl_.user_info_ = p; + } + return _impl_.user_info_; +} +inline ::mozilla::safebrowsing::ThreatHit_UserInfo* ThreatHit::mutable_user_info() { + ::mozilla::safebrowsing::ThreatHit_UserInfo* _msg = _internal_mutable_user_info(); + // @@protoc_insertion_point(field_mutable:mozilla.safebrowsing.ThreatHit.user_info) + return _msg; +} +inline void ThreatHit::set_allocated_user_info(::mozilla::safebrowsing::ThreatHit_UserInfo* user_info) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.user_info_; + } + if (user_info) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(user_info); + if (message_arena != submessage_arena) { + user_info = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, user_info, submessage_arena); + } + _impl_._has_bits_[0] |= 0x00000004u; + } else { + _impl_._has_bits_[0] &= ~0x00000004u; + } + _impl_.user_info_ = user_info; + // @@protoc_insertion_point(field_set_allocated:mozilla.safebrowsing.ThreatHit.user_info) +} + +// ------------------------------------------------------------------- + +// ClientInfo + +// optional string client_id = 1; +inline bool ClientInfo::_internal_has_client_id() const { + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool ClientInfo::has_client_id() const { + return _internal_has_client_id(); +} +inline void ClientInfo::clear_client_id() { + _impl_.client_id_.ClearToEmpty(); + _impl_._has_bits_[0] &= ~0x00000001u; +} +inline const std::string& ClientInfo::client_id() const { + // @@protoc_insertion_point(field_get:mozilla.safebrowsing.ClientInfo.client_id) + return _internal_client_id(); +} +template <typename ArgT0, typename... ArgT> +inline PROTOBUF_ALWAYS_INLINE +void ClientInfo::set_client_id(ArgT0&& arg0, ArgT... args) { + _impl_._has_bits_[0] |= 0x00000001u; + _impl_.client_id_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:mozilla.safebrowsing.ClientInfo.client_id) +} +inline std::string* ClientInfo::mutable_client_id() { + std::string* _s = _internal_mutable_client_id(); + // @@protoc_insertion_point(field_mutable:mozilla.safebrowsing.ClientInfo.client_id) + return _s; +} +inline const std::string& ClientInfo::_internal_client_id() const { + return _impl_.client_id_.Get(); +} +inline void ClientInfo::_internal_set_client_id(const std::string& value) { + _impl_._has_bits_[0] |= 0x00000001u; + _impl_.client_id_.Set(value, GetArenaForAllocation()); +} +inline std::string* ClientInfo::_internal_mutable_client_id() { + _impl_._has_bits_[0] |= 0x00000001u; + return _impl_.client_id_.Mutable(GetArenaForAllocation()); +} +inline std::string* ClientInfo::release_client_id() { + // @@protoc_insertion_point(field_release:mozilla.safebrowsing.ClientInfo.client_id) + if (!_internal_has_client_id()) { + return nullptr; + } + _impl_._has_bits_[0] &= ~0x00000001u; + auto* p = _impl_.client_id_.Release(); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.client_id_.IsDefault()) { + _impl_.client_id_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void ClientInfo::set_allocated_client_id(std::string* client_id) { + if (client_id != nullptr) { + _impl_._has_bits_[0] |= 0x00000001u; + } else { + _impl_._has_bits_[0] &= ~0x00000001u; + } + _impl_.client_id_.SetAllocated(client_id, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.client_id_.IsDefault()) { + _impl_.client_id_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:mozilla.safebrowsing.ClientInfo.client_id) +} + +// optional string client_version = 2; +inline bool ClientInfo::_internal_has_client_version() const { + bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool ClientInfo::has_client_version() const { + return _internal_has_client_version(); +} +inline void ClientInfo::clear_client_version() { + _impl_.client_version_.ClearToEmpty(); + _impl_._has_bits_[0] &= ~0x00000002u; +} +inline const std::string& ClientInfo::client_version() const { + // @@protoc_insertion_point(field_get:mozilla.safebrowsing.ClientInfo.client_version) + return _internal_client_version(); +} +template <typename ArgT0, typename... ArgT> +inline PROTOBUF_ALWAYS_INLINE +void ClientInfo::set_client_version(ArgT0&& arg0, ArgT... args) { + _impl_._has_bits_[0] |= 0x00000002u; + _impl_.client_version_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:mozilla.safebrowsing.ClientInfo.client_version) +} +inline std::string* ClientInfo::mutable_client_version() { + std::string* _s = _internal_mutable_client_version(); + // @@protoc_insertion_point(field_mutable:mozilla.safebrowsing.ClientInfo.client_version) + return _s; +} +inline const std::string& ClientInfo::_internal_client_version() const { + return _impl_.client_version_.Get(); +} +inline void ClientInfo::_internal_set_client_version(const std::string& value) { + _impl_._has_bits_[0] |= 0x00000002u; + _impl_.client_version_.Set(value, GetArenaForAllocation()); +} +inline std::string* ClientInfo::_internal_mutable_client_version() { + _impl_._has_bits_[0] |= 0x00000002u; + return _impl_.client_version_.Mutable(GetArenaForAllocation()); +} +inline std::string* ClientInfo::release_client_version() { + // @@protoc_insertion_point(field_release:mozilla.safebrowsing.ClientInfo.client_version) + if (!_internal_has_client_version()) { + return nullptr; + } + _impl_._has_bits_[0] &= ~0x00000002u; + auto* p = _impl_.client_version_.Release(); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.client_version_.IsDefault()) { + _impl_.client_version_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void ClientInfo::set_allocated_client_version(std::string* client_version) { + if (client_version != nullptr) { + _impl_._has_bits_[0] |= 0x00000002u; + } else { + _impl_._has_bits_[0] &= ~0x00000002u; + } + _impl_.client_version_.SetAllocated(client_version, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.client_version_.IsDefault()) { + _impl_.client_version_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:mozilla.safebrowsing.ClientInfo.client_version) +} + +// ------------------------------------------------------------------- + +// ChromeClientInfo + +// optional .mozilla.safebrowsing.ChromeClientInfo.SafeBrowsingReportingPopulation reporting_population = 1; +inline bool ChromeClientInfo::_internal_has_reporting_population() const { + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool ChromeClientInfo::has_reporting_population() const { + return _internal_has_reporting_population(); +} +inline void ChromeClientInfo::clear_reporting_population() { + _impl_.reporting_population_ = 0; + _impl_._has_bits_[0] &= ~0x00000001u; +} +inline ::mozilla::safebrowsing::ChromeClientInfo_SafeBrowsingReportingPopulation ChromeClientInfo::_internal_reporting_population() const { + return static_cast< ::mozilla::safebrowsing::ChromeClientInfo_SafeBrowsingReportingPopulation >(_impl_.reporting_population_); +} +inline ::mozilla::safebrowsing::ChromeClientInfo_SafeBrowsingReportingPopulation ChromeClientInfo::reporting_population() const { + // @@protoc_insertion_point(field_get:mozilla.safebrowsing.ChromeClientInfo.reporting_population) + return _internal_reporting_population(); +} +inline void ChromeClientInfo::_internal_set_reporting_population(::mozilla::safebrowsing::ChromeClientInfo_SafeBrowsingReportingPopulation value) { + assert(::mozilla::safebrowsing::ChromeClientInfo_SafeBrowsingReportingPopulation_IsValid(value)); + _impl_._has_bits_[0] |= 0x00000001u; + _impl_.reporting_population_ = value; +} +inline void ChromeClientInfo::set_reporting_population(::mozilla::safebrowsing::ChromeClientInfo_SafeBrowsingReportingPopulation value) { + _internal_set_reporting_population(value); + // @@protoc_insertion_point(field_set:mozilla.safebrowsing.ChromeClientInfo.reporting_population) +} + +// ------------------------------------------------------------------- + +// Checksum + +// optional bytes sha256 = 1; +inline bool Checksum::_internal_has_sha256() const { + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool Checksum::has_sha256() const { + return _internal_has_sha256(); +} +inline void Checksum::clear_sha256() { + _impl_.sha256_.ClearToEmpty(); + _impl_._has_bits_[0] &= ~0x00000001u; +} +inline const std::string& Checksum::sha256() const { + // @@protoc_insertion_point(field_get:mozilla.safebrowsing.Checksum.sha256) + return _internal_sha256(); +} +template <typename ArgT0, typename... ArgT> +inline PROTOBUF_ALWAYS_INLINE +void Checksum::set_sha256(ArgT0&& arg0, ArgT... args) { + _impl_._has_bits_[0] |= 0x00000001u; + _impl_.sha256_.SetBytes(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:mozilla.safebrowsing.Checksum.sha256) +} +inline std::string* Checksum::mutable_sha256() { + std::string* _s = _internal_mutable_sha256(); + // @@protoc_insertion_point(field_mutable:mozilla.safebrowsing.Checksum.sha256) + return _s; +} +inline const std::string& Checksum::_internal_sha256() const { + return _impl_.sha256_.Get(); +} +inline void Checksum::_internal_set_sha256(const std::string& value) { + _impl_._has_bits_[0] |= 0x00000001u; + _impl_.sha256_.Set(value, GetArenaForAllocation()); +} +inline std::string* Checksum::_internal_mutable_sha256() { + _impl_._has_bits_[0] |= 0x00000001u; + return _impl_.sha256_.Mutable(GetArenaForAllocation()); +} +inline std::string* Checksum::release_sha256() { + // @@protoc_insertion_point(field_release:mozilla.safebrowsing.Checksum.sha256) + if (!_internal_has_sha256()) { + return nullptr; + } + _impl_._has_bits_[0] &= ~0x00000001u; + auto* p = _impl_.sha256_.Release(); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.sha256_.IsDefault()) { + _impl_.sha256_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void Checksum::set_allocated_sha256(std::string* sha256) { + if (sha256 != nullptr) { + _impl_._has_bits_[0] |= 0x00000001u; + } else { + _impl_._has_bits_[0] &= ~0x00000001u; + } + _impl_.sha256_.SetAllocated(sha256, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.sha256_.IsDefault()) { + _impl_.sha256_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:mozilla.safebrowsing.Checksum.sha256) +} + +// ------------------------------------------------------------------- + +// ThreatEntry + +// optional bytes hash = 1; +inline bool ThreatEntry::_internal_has_hash() const { + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool ThreatEntry::has_hash() const { + return _internal_has_hash(); +} +inline void ThreatEntry::clear_hash() { + _impl_.hash_.ClearToEmpty(); + _impl_._has_bits_[0] &= ~0x00000001u; +} +inline const std::string& ThreatEntry::hash() const { + // @@protoc_insertion_point(field_get:mozilla.safebrowsing.ThreatEntry.hash) + return _internal_hash(); +} +template <typename ArgT0, typename... ArgT> +inline PROTOBUF_ALWAYS_INLINE +void ThreatEntry::set_hash(ArgT0&& arg0, ArgT... args) { + _impl_._has_bits_[0] |= 0x00000001u; + _impl_.hash_.SetBytes(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:mozilla.safebrowsing.ThreatEntry.hash) +} +inline std::string* ThreatEntry::mutable_hash() { + std::string* _s = _internal_mutable_hash(); + // @@protoc_insertion_point(field_mutable:mozilla.safebrowsing.ThreatEntry.hash) + return _s; +} +inline const std::string& ThreatEntry::_internal_hash() const { + return _impl_.hash_.Get(); +} +inline void ThreatEntry::_internal_set_hash(const std::string& value) { + _impl_._has_bits_[0] |= 0x00000001u; + _impl_.hash_.Set(value, GetArenaForAllocation()); +} +inline std::string* ThreatEntry::_internal_mutable_hash() { + _impl_._has_bits_[0] |= 0x00000001u; + return _impl_.hash_.Mutable(GetArenaForAllocation()); +} +inline std::string* ThreatEntry::release_hash() { + // @@protoc_insertion_point(field_release:mozilla.safebrowsing.ThreatEntry.hash) + if (!_internal_has_hash()) { + return nullptr; + } + _impl_._has_bits_[0] &= ~0x00000001u; + auto* p = _impl_.hash_.Release(); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.hash_.IsDefault()) { + _impl_.hash_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void ThreatEntry::set_allocated_hash(std::string* hash) { + if (hash != nullptr) { + _impl_._has_bits_[0] |= 0x00000001u; + } else { + _impl_._has_bits_[0] &= ~0x00000001u; + } + _impl_.hash_.SetAllocated(hash, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.hash_.IsDefault()) { + _impl_.hash_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:mozilla.safebrowsing.ThreatEntry.hash) +} + +// optional string url = 2; +inline bool ThreatEntry::_internal_has_url() const { + bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool ThreatEntry::has_url() const { + return _internal_has_url(); +} +inline void ThreatEntry::clear_url() { + _impl_.url_.ClearToEmpty(); + _impl_._has_bits_[0] &= ~0x00000002u; +} +inline const std::string& ThreatEntry::url() const { + // @@protoc_insertion_point(field_get:mozilla.safebrowsing.ThreatEntry.url) + return _internal_url(); +} +template <typename ArgT0, typename... ArgT> +inline PROTOBUF_ALWAYS_INLINE +void ThreatEntry::set_url(ArgT0&& arg0, ArgT... args) { + _impl_._has_bits_[0] |= 0x00000002u; + _impl_.url_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:mozilla.safebrowsing.ThreatEntry.url) +} +inline std::string* ThreatEntry::mutable_url() { + std::string* _s = _internal_mutable_url(); + // @@protoc_insertion_point(field_mutable:mozilla.safebrowsing.ThreatEntry.url) + return _s; +} +inline const std::string& ThreatEntry::_internal_url() const { + return _impl_.url_.Get(); +} +inline void ThreatEntry::_internal_set_url(const std::string& value) { + _impl_._has_bits_[0] |= 0x00000002u; + _impl_.url_.Set(value, GetArenaForAllocation()); +} +inline std::string* ThreatEntry::_internal_mutable_url() { + _impl_._has_bits_[0] |= 0x00000002u; + return _impl_.url_.Mutable(GetArenaForAllocation()); +} +inline std::string* ThreatEntry::release_url() { + // @@protoc_insertion_point(field_release:mozilla.safebrowsing.ThreatEntry.url) + if (!_internal_has_url()) { + return nullptr; + } + _impl_._has_bits_[0] &= ~0x00000002u; + auto* p = _impl_.url_.Release(); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.url_.IsDefault()) { + _impl_.url_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void ThreatEntry::set_allocated_url(std::string* url) { + if (url != nullptr) { + _impl_._has_bits_[0] |= 0x00000002u; + } else { + _impl_._has_bits_[0] &= ~0x00000002u; + } + _impl_.url_.SetAllocated(url, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.url_.IsDefault()) { + _impl_.url_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:mozilla.safebrowsing.ThreatEntry.url) +} + +// ------------------------------------------------------------------- + +// ThreatEntrySet + +// optional .mozilla.safebrowsing.CompressionType compression_type = 1; +inline bool ThreatEntrySet::_internal_has_compression_type() const { + bool value = (_impl_._has_bits_[0] & 0x00000010u) != 0; + return value; +} +inline bool ThreatEntrySet::has_compression_type() const { + return _internal_has_compression_type(); +} +inline void ThreatEntrySet::clear_compression_type() { + _impl_.compression_type_ = 0; + _impl_._has_bits_[0] &= ~0x00000010u; +} +inline ::mozilla::safebrowsing::CompressionType ThreatEntrySet::_internal_compression_type() const { + return static_cast< ::mozilla::safebrowsing::CompressionType >(_impl_.compression_type_); +} +inline ::mozilla::safebrowsing::CompressionType ThreatEntrySet::compression_type() const { + // @@protoc_insertion_point(field_get:mozilla.safebrowsing.ThreatEntrySet.compression_type) + return _internal_compression_type(); +} +inline void ThreatEntrySet::_internal_set_compression_type(::mozilla::safebrowsing::CompressionType value) { + assert(::mozilla::safebrowsing::CompressionType_IsValid(value)); + _impl_._has_bits_[0] |= 0x00000010u; + _impl_.compression_type_ = value; +} +inline void ThreatEntrySet::set_compression_type(::mozilla::safebrowsing::CompressionType value) { + _internal_set_compression_type(value); + // @@protoc_insertion_point(field_set:mozilla.safebrowsing.ThreatEntrySet.compression_type) +} + +// optional .mozilla.safebrowsing.RawHashes raw_hashes = 2; +inline bool ThreatEntrySet::_internal_has_raw_hashes() const { + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + PROTOBUF_ASSUME(!value || _impl_.raw_hashes_ != nullptr); + return value; +} +inline bool ThreatEntrySet::has_raw_hashes() const { + return _internal_has_raw_hashes(); +} +inline void ThreatEntrySet::clear_raw_hashes() { + if (_impl_.raw_hashes_ != nullptr) _impl_.raw_hashes_->Clear(); + _impl_._has_bits_[0] &= ~0x00000001u; +} +inline const ::mozilla::safebrowsing::RawHashes& ThreatEntrySet::_internal_raw_hashes() const { + const ::mozilla::safebrowsing::RawHashes* p = _impl_.raw_hashes_; + return p != nullptr ? *p : reinterpret_cast<const ::mozilla::safebrowsing::RawHashes&>( + ::mozilla::safebrowsing::_RawHashes_default_instance_); +} +inline const ::mozilla::safebrowsing::RawHashes& ThreatEntrySet::raw_hashes() const { + // @@protoc_insertion_point(field_get:mozilla.safebrowsing.ThreatEntrySet.raw_hashes) + return _internal_raw_hashes(); +} +inline void ThreatEntrySet::unsafe_arena_set_allocated_raw_hashes( + ::mozilla::safebrowsing::RawHashes* raw_hashes) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.raw_hashes_); + } + _impl_.raw_hashes_ = raw_hashes; + if (raw_hashes) { + _impl_._has_bits_[0] |= 0x00000001u; + } else { + _impl_._has_bits_[0] &= ~0x00000001u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:mozilla.safebrowsing.ThreatEntrySet.raw_hashes) +} +inline ::mozilla::safebrowsing::RawHashes* ThreatEntrySet::release_raw_hashes() { + _impl_._has_bits_[0] &= ~0x00000001u; + ::mozilla::safebrowsing::RawHashes* temp = _impl_.raw_hashes_; + _impl_.raw_hashes_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::mozilla::safebrowsing::RawHashes* ThreatEntrySet::unsafe_arena_release_raw_hashes() { + // @@protoc_insertion_point(field_release:mozilla.safebrowsing.ThreatEntrySet.raw_hashes) + _impl_._has_bits_[0] &= ~0x00000001u; + ::mozilla::safebrowsing::RawHashes* temp = _impl_.raw_hashes_; + _impl_.raw_hashes_ = nullptr; + return temp; +} +inline ::mozilla::safebrowsing::RawHashes* ThreatEntrySet::_internal_mutable_raw_hashes() { + _impl_._has_bits_[0] |= 0x00000001u; + if (_impl_.raw_hashes_ == nullptr) { + auto* p = CreateMaybeMessage<::mozilla::safebrowsing::RawHashes>(GetArenaForAllocation()); + _impl_.raw_hashes_ = p; + } + return _impl_.raw_hashes_; +} +inline ::mozilla::safebrowsing::RawHashes* ThreatEntrySet::mutable_raw_hashes() { + ::mozilla::safebrowsing::RawHashes* _msg = _internal_mutable_raw_hashes(); + // @@protoc_insertion_point(field_mutable:mozilla.safebrowsing.ThreatEntrySet.raw_hashes) + return _msg; +} +inline void ThreatEntrySet::set_allocated_raw_hashes(::mozilla::safebrowsing::RawHashes* raw_hashes) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.raw_hashes_; + } + if (raw_hashes) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(raw_hashes); + if (message_arena != submessage_arena) { + raw_hashes = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, raw_hashes, submessage_arena); + } + _impl_._has_bits_[0] |= 0x00000001u; + } else { + _impl_._has_bits_[0] &= ~0x00000001u; + } + _impl_.raw_hashes_ = raw_hashes; + // @@protoc_insertion_point(field_set_allocated:mozilla.safebrowsing.ThreatEntrySet.raw_hashes) +} + +// optional .mozilla.safebrowsing.RawIndices raw_indices = 3; +inline bool ThreatEntrySet::_internal_has_raw_indices() const { + bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0; + PROTOBUF_ASSUME(!value || _impl_.raw_indices_ != nullptr); + return value; +} +inline bool ThreatEntrySet::has_raw_indices() const { + return _internal_has_raw_indices(); +} +inline void ThreatEntrySet::clear_raw_indices() { + if (_impl_.raw_indices_ != nullptr) _impl_.raw_indices_->Clear(); + _impl_._has_bits_[0] &= ~0x00000002u; +} +inline const ::mozilla::safebrowsing::RawIndices& ThreatEntrySet::_internal_raw_indices() const { + const ::mozilla::safebrowsing::RawIndices* p = _impl_.raw_indices_; + return p != nullptr ? *p : reinterpret_cast<const ::mozilla::safebrowsing::RawIndices&>( + ::mozilla::safebrowsing::_RawIndices_default_instance_); +} +inline const ::mozilla::safebrowsing::RawIndices& ThreatEntrySet::raw_indices() const { + // @@protoc_insertion_point(field_get:mozilla.safebrowsing.ThreatEntrySet.raw_indices) + return _internal_raw_indices(); +} +inline void ThreatEntrySet::unsafe_arena_set_allocated_raw_indices( + ::mozilla::safebrowsing::RawIndices* raw_indices) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.raw_indices_); + } + _impl_.raw_indices_ = raw_indices; + if (raw_indices) { + _impl_._has_bits_[0] |= 0x00000002u; + } else { + _impl_._has_bits_[0] &= ~0x00000002u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:mozilla.safebrowsing.ThreatEntrySet.raw_indices) +} +inline ::mozilla::safebrowsing::RawIndices* ThreatEntrySet::release_raw_indices() { + _impl_._has_bits_[0] &= ~0x00000002u; + ::mozilla::safebrowsing::RawIndices* temp = _impl_.raw_indices_; + _impl_.raw_indices_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::mozilla::safebrowsing::RawIndices* ThreatEntrySet::unsafe_arena_release_raw_indices() { + // @@protoc_insertion_point(field_release:mozilla.safebrowsing.ThreatEntrySet.raw_indices) + _impl_._has_bits_[0] &= ~0x00000002u; + ::mozilla::safebrowsing::RawIndices* temp = _impl_.raw_indices_; + _impl_.raw_indices_ = nullptr; + return temp; +} +inline ::mozilla::safebrowsing::RawIndices* ThreatEntrySet::_internal_mutable_raw_indices() { + _impl_._has_bits_[0] |= 0x00000002u; + if (_impl_.raw_indices_ == nullptr) { + auto* p = CreateMaybeMessage<::mozilla::safebrowsing::RawIndices>(GetArenaForAllocation()); + _impl_.raw_indices_ = p; + } + return _impl_.raw_indices_; +} +inline ::mozilla::safebrowsing::RawIndices* ThreatEntrySet::mutable_raw_indices() { + ::mozilla::safebrowsing::RawIndices* _msg = _internal_mutable_raw_indices(); + // @@protoc_insertion_point(field_mutable:mozilla.safebrowsing.ThreatEntrySet.raw_indices) + return _msg; +} +inline void ThreatEntrySet::set_allocated_raw_indices(::mozilla::safebrowsing::RawIndices* raw_indices) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.raw_indices_; + } + if (raw_indices) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(raw_indices); + if (message_arena != submessage_arena) { + raw_indices = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, raw_indices, submessage_arena); + } + _impl_._has_bits_[0] |= 0x00000002u; + } else { + _impl_._has_bits_[0] &= ~0x00000002u; + } + _impl_.raw_indices_ = raw_indices; + // @@protoc_insertion_point(field_set_allocated:mozilla.safebrowsing.ThreatEntrySet.raw_indices) +} + +// optional .mozilla.safebrowsing.RiceDeltaEncoding rice_hashes = 4; +inline bool ThreatEntrySet::_internal_has_rice_hashes() const { + bool value = (_impl_._has_bits_[0] & 0x00000004u) != 0; + PROTOBUF_ASSUME(!value || _impl_.rice_hashes_ != nullptr); + return value; +} +inline bool ThreatEntrySet::has_rice_hashes() const { + return _internal_has_rice_hashes(); +} +inline void ThreatEntrySet::clear_rice_hashes() { + if (_impl_.rice_hashes_ != nullptr) _impl_.rice_hashes_->Clear(); + _impl_._has_bits_[0] &= ~0x00000004u; +} +inline const ::mozilla::safebrowsing::RiceDeltaEncoding& ThreatEntrySet::_internal_rice_hashes() const { + const ::mozilla::safebrowsing::RiceDeltaEncoding* p = _impl_.rice_hashes_; + return p != nullptr ? *p : reinterpret_cast<const ::mozilla::safebrowsing::RiceDeltaEncoding&>( + ::mozilla::safebrowsing::_RiceDeltaEncoding_default_instance_); +} +inline const ::mozilla::safebrowsing::RiceDeltaEncoding& ThreatEntrySet::rice_hashes() const { + // @@protoc_insertion_point(field_get:mozilla.safebrowsing.ThreatEntrySet.rice_hashes) + return _internal_rice_hashes(); +} +inline void ThreatEntrySet::unsafe_arena_set_allocated_rice_hashes( + ::mozilla::safebrowsing::RiceDeltaEncoding* rice_hashes) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.rice_hashes_); + } + _impl_.rice_hashes_ = rice_hashes; + if (rice_hashes) { + _impl_._has_bits_[0] |= 0x00000004u; + } else { + _impl_._has_bits_[0] &= ~0x00000004u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:mozilla.safebrowsing.ThreatEntrySet.rice_hashes) +} +inline ::mozilla::safebrowsing::RiceDeltaEncoding* ThreatEntrySet::release_rice_hashes() { + _impl_._has_bits_[0] &= ~0x00000004u; + ::mozilla::safebrowsing::RiceDeltaEncoding* temp = _impl_.rice_hashes_; + _impl_.rice_hashes_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::mozilla::safebrowsing::RiceDeltaEncoding* ThreatEntrySet::unsafe_arena_release_rice_hashes() { + // @@protoc_insertion_point(field_release:mozilla.safebrowsing.ThreatEntrySet.rice_hashes) + _impl_._has_bits_[0] &= ~0x00000004u; + ::mozilla::safebrowsing::RiceDeltaEncoding* temp = _impl_.rice_hashes_; + _impl_.rice_hashes_ = nullptr; + return temp; +} +inline ::mozilla::safebrowsing::RiceDeltaEncoding* ThreatEntrySet::_internal_mutable_rice_hashes() { + _impl_._has_bits_[0] |= 0x00000004u; + if (_impl_.rice_hashes_ == nullptr) { + auto* p = CreateMaybeMessage<::mozilla::safebrowsing::RiceDeltaEncoding>(GetArenaForAllocation()); + _impl_.rice_hashes_ = p; + } + return _impl_.rice_hashes_; +} +inline ::mozilla::safebrowsing::RiceDeltaEncoding* ThreatEntrySet::mutable_rice_hashes() { + ::mozilla::safebrowsing::RiceDeltaEncoding* _msg = _internal_mutable_rice_hashes(); + // @@protoc_insertion_point(field_mutable:mozilla.safebrowsing.ThreatEntrySet.rice_hashes) + return _msg; +} +inline void ThreatEntrySet::set_allocated_rice_hashes(::mozilla::safebrowsing::RiceDeltaEncoding* rice_hashes) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.rice_hashes_; + } + if (rice_hashes) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(rice_hashes); + if (message_arena != submessage_arena) { + rice_hashes = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, rice_hashes, submessage_arena); + } + _impl_._has_bits_[0] |= 0x00000004u; + } else { + _impl_._has_bits_[0] &= ~0x00000004u; + } + _impl_.rice_hashes_ = rice_hashes; + // @@protoc_insertion_point(field_set_allocated:mozilla.safebrowsing.ThreatEntrySet.rice_hashes) +} + +// optional .mozilla.safebrowsing.RiceDeltaEncoding rice_indices = 5; +inline bool ThreatEntrySet::_internal_has_rice_indices() const { + bool value = (_impl_._has_bits_[0] & 0x00000008u) != 0; + PROTOBUF_ASSUME(!value || _impl_.rice_indices_ != nullptr); + return value; +} +inline bool ThreatEntrySet::has_rice_indices() const { + return _internal_has_rice_indices(); +} +inline void ThreatEntrySet::clear_rice_indices() { + if (_impl_.rice_indices_ != nullptr) _impl_.rice_indices_->Clear(); + _impl_._has_bits_[0] &= ~0x00000008u; +} +inline const ::mozilla::safebrowsing::RiceDeltaEncoding& ThreatEntrySet::_internal_rice_indices() const { + const ::mozilla::safebrowsing::RiceDeltaEncoding* p = _impl_.rice_indices_; + return p != nullptr ? *p : reinterpret_cast<const ::mozilla::safebrowsing::RiceDeltaEncoding&>( + ::mozilla::safebrowsing::_RiceDeltaEncoding_default_instance_); +} +inline const ::mozilla::safebrowsing::RiceDeltaEncoding& ThreatEntrySet::rice_indices() const { + // @@protoc_insertion_point(field_get:mozilla.safebrowsing.ThreatEntrySet.rice_indices) + return _internal_rice_indices(); +} +inline void ThreatEntrySet::unsafe_arena_set_allocated_rice_indices( + ::mozilla::safebrowsing::RiceDeltaEncoding* rice_indices) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.rice_indices_); + } + _impl_.rice_indices_ = rice_indices; + if (rice_indices) { + _impl_._has_bits_[0] |= 0x00000008u; + } else { + _impl_._has_bits_[0] &= ~0x00000008u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:mozilla.safebrowsing.ThreatEntrySet.rice_indices) +} +inline ::mozilla::safebrowsing::RiceDeltaEncoding* ThreatEntrySet::release_rice_indices() { + _impl_._has_bits_[0] &= ~0x00000008u; + ::mozilla::safebrowsing::RiceDeltaEncoding* temp = _impl_.rice_indices_; + _impl_.rice_indices_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::mozilla::safebrowsing::RiceDeltaEncoding* ThreatEntrySet::unsafe_arena_release_rice_indices() { + // @@protoc_insertion_point(field_release:mozilla.safebrowsing.ThreatEntrySet.rice_indices) + _impl_._has_bits_[0] &= ~0x00000008u; + ::mozilla::safebrowsing::RiceDeltaEncoding* temp = _impl_.rice_indices_; + _impl_.rice_indices_ = nullptr; + return temp; +} +inline ::mozilla::safebrowsing::RiceDeltaEncoding* ThreatEntrySet::_internal_mutable_rice_indices() { + _impl_._has_bits_[0] |= 0x00000008u; + if (_impl_.rice_indices_ == nullptr) { + auto* p = CreateMaybeMessage<::mozilla::safebrowsing::RiceDeltaEncoding>(GetArenaForAllocation()); + _impl_.rice_indices_ = p; + } + return _impl_.rice_indices_; +} +inline ::mozilla::safebrowsing::RiceDeltaEncoding* ThreatEntrySet::mutable_rice_indices() { + ::mozilla::safebrowsing::RiceDeltaEncoding* _msg = _internal_mutable_rice_indices(); + // @@protoc_insertion_point(field_mutable:mozilla.safebrowsing.ThreatEntrySet.rice_indices) + return _msg; +} +inline void ThreatEntrySet::set_allocated_rice_indices(::mozilla::safebrowsing::RiceDeltaEncoding* rice_indices) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.rice_indices_; + } + if (rice_indices) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(rice_indices); + if (message_arena != submessage_arena) { + rice_indices = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, rice_indices, submessage_arena); + } + _impl_._has_bits_[0] |= 0x00000008u; + } else { + _impl_._has_bits_[0] &= ~0x00000008u; + } + _impl_.rice_indices_ = rice_indices; + // @@protoc_insertion_point(field_set_allocated:mozilla.safebrowsing.ThreatEntrySet.rice_indices) +} + +// ------------------------------------------------------------------- + +// RawIndices + +// repeated int32 indices = 1; +inline int RawIndices::_internal_indices_size() const { + return _impl_.indices_.size(); +} +inline int RawIndices::indices_size() const { + return _internal_indices_size(); +} +inline void RawIndices::clear_indices() { + _impl_.indices_.Clear(); +} +inline int32_t RawIndices::_internal_indices(int index) const { + return _impl_.indices_.Get(index); +} +inline int32_t RawIndices::indices(int index) const { + // @@protoc_insertion_point(field_get:mozilla.safebrowsing.RawIndices.indices) + return _internal_indices(index); +} +inline void RawIndices::set_indices(int index, int32_t value) { + _impl_.indices_.Set(index, value); + // @@protoc_insertion_point(field_set:mozilla.safebrowsing.RawIndices.indices) +} +inline void RawIndices::_internal_add_indices(int32_t value) { + _impl_.indices_.Add(value); +} +inline void RawIndices::add_indices(int32_t value) { + _internal_add_indices(value); + // @@protoc_insertion_point(field_add:mozilla.safebrowsing.RawIndices.indices) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >& +RawIndices::_internal_indices() const { + return _impl_.indices_; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >& +RawIndices::indices() const { + // @@protoc_insertion_point(field_list:mozilla.safebrowsing.RawIndices.indices) + return _internal_indices(); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >* +RawIndices::_internal_mutable_indices() { + return &_impl_.indices_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >* +RawIndices::mutable_indices() { + // @@protoc_insertion_point(field_mutable_list:mozilla.safebrowsing.RawIndices.indices) + return _internal_mutable_indices(); +} + +// ------------------------------------------------------------------- + +// RawHashes + +// optional int32 prefix_size = 1; +inline bool RawHashes::_internal_has_prefix_size() const { + bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool RawHashes::has_prefix_size() const { + return _internal_has_prefix_size(); +} +inline void RawHashes::clear_prefix_size() { + _impl_.prefix_size_ = 0; + _impl_._has_bits_[0] &= ~0x00000002u; +} +inline int32_t RawHashes::_internal_prefix_size() const { + return _impl_.prefix_size_; +} +inline int32_t RawHashes::prefix_size() const { + // @@protoc_insertion_point(field_get:mozilla.safebrowsing.RawHashes.prefix_size) + return _internal_prefix_size(); +} +inline void RawHashes::_internal_set_prefix_size(int32_t value) { + _impl_._has_bits_[0] |= 0x00000002u; + _impl_.prefix_size_ = value; +} +inline void RawHashes::set_prefix_size(int32_t value) { + _internal_set_prefix_size(value); + // @@protoc_insertion_point(field_set:mozilla.safebrowsing.RawHashes.prefix_size) +} + +// optional bytes raw_hashes = 2; +inline bool RawHashes::_internal_has_raw_hashes() const { + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool RawHashes::has_raw_hashes() const { + return _internal_has_raw_hashes(); +} +inline void RawHashes::clear_raw_hashes() { + _impl_.raw_hashes_.ClearToEmpty(); + _impl_._has_bits_[0] &= ~0x00000001u; +} +inline const std::string& RawHashes::raw_hashes() const { + // @@protoc_insertion_point(field_get:mozilla.safebrowsing.RawHashes.raw_hashes) + return _internal_raw_hashes(); +} +template <typename ArgT0, typename... ArgT> +inline PROTOBUF_ALWAYS_INLINE +void RawHashes::set_raw_hashes(ArgT0&& arg0, ArgT... args) { + _impl_._has_bits_[0] |= 0x00000001u; + _impl_.raw_hashes_.SetBytes(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:mozilla.safebrowsing.RawHashes.raw_hashes) +} +inline std::string* RawHashes::mutable_raw_hashes() { + std::string* _s = _internal_mutable_raw_hashes(); + // @@protoc_insertion_point(field_mutable:mozilla.safebrowsing.RawHashes.raw_hashes) + return _s; +} +inline const std::string& RawHashes::_internal_raw_hashes() const { + return _impl_.raw_hashes_.Get(); +} +inline void RawHashes::_internal_set_raw_hashes(const std::string& value) { + _impl_._has_bits_[0] |= 0x00000001u; + _impl_.raw_hashes_.Set(value, GetArenaForAllocation()); +} +inline std::string* RawHashes::_internal_mutable_raw_hashes() { + _impl_._has_bits_[0] |= 0x00000001u; + return _impl_.raw_hashes_.Mutable(GetArenaForAllocation()); +} +inline std::string* RawHashes::release_raw_hashes() { + // @@protoc_insertion_point(field_release:mozilla.safebrowsing.RawHashes.raw_hashes) + if (!_internal_has_raw_hashes()) { + return nullptr; + } + _impl_._has_bits_[0] &= ~0x00000001u; + auto* p = _impl_.raw_hashes_.Release(); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.raw_hashes_.IsDefault()) { + _impl_.raw_hashes_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void RawHashes::set_allocated_raw_hashes(std::string* raw_hashes) { + if (raw_hashes != nullptr) { + _impl_._has_bits_[0] |= 0x00000001u; + } else { + _impl_._has_bits_[0] &= ~0x00000001u; + } + _impl_.raw_hashes_.SetAllocated(raw_hashes, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.raw_hashes_.IsDefault()) { + _impl_.raw_hashes_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:mozilla.safebrowsing.RawHashes.raw_hashes) +} + +// ------------------------------------------------------------------- + +// RiceDeltaEncoding + +// optional int64 first_value = 1; +inline bool RiceDeltaEncoding::_internal_has_first_value() const { + bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool RiceDeltaEncoding::has_first_value() const { + return _internal_has_first_value(); +} +inline void RiceDeltaEncoding::clear_first_value() { + _impl_.first_value_ = int64_t{0}; + _impl_._has_bits_[0] &= ~0x00000002u; +} +inline int64_t RiceDeltaEncoding::_internal_first_value() const { + return _impl_.first_value_; +} +inline int64_t RiceDeltaEncoding::first_value() const { + // @@protoc_insertion_point(field_get:mozilla.safebrowsing.RiceDeltaEncoding.first_value) + return _internal_first_value(); +} +inline void RiceDeltaEncoding::_internal_set_first_value(int64_t value) { + _impl_._has_bits_[0] |= 0x00000002u; + _impl_.first_value_ = value; +} +inline void RiceDeltaEncoding::set_first_value(int64_t value) { + _internal_set_first_value(value); + // @@protoc_insertion_point(field_set:mozilla.safebrowsing.RiceDeltaEncoding.first_value) +} + +// optional int32 rice_parameter = 2; +inline bool RiceDeltaEncoding::_internal_has_rice_parameter() const { + bool value = (_impl_._has_bits_[0] & 0x00000004u) != 0; + return value; +} +inline bool RiceDeltaEncoding::has_rice_parameter() const { + return _internal_has_rice_parameter(); +} +inline void RiceDeltaEncoding::clear_rice_parameter() { + _impl_.rice_parameter_ = 0; + _impl_._has_bits_[0] &= ~0x00000004u; +} +inline int32_t RiceDeltaEncoding::_internal_rice_parameter() const { + return _impl_.rice_parameter_; +} +inline int32_t RiceDeltaEncoding::rice_parameter() const { + // @@protoc_insertion_point(field_get:mozilla.safebrowsing.RiceDeltaEncoding.rice_parameter) + return _internal_rice_parameter(); +} +inline void RiceDeltaEncoding::_internal_set_rice_parameter(int32_t value) { + _impl_._has_bits_[0] |= 0x00000004u; + _impl_.rice_parameter_ = value; +} +inline void RiceDeltaEncoding::set_rice_parameter(int32_t value) { + _internal_set_rice_parameter(value); + // @@protoc_insertion_point(field_set:mozilla.safebrowsing.RiceDeltaEncoding.rice_parameter) +} + +// optional int32 num_entries = 3; +inline bool RiceDeltaEncoding::_internal_has_num_entries() const { + bool value = (_impl_._has_bits_[0] & 0x00000008u) != 0; + return value; +} +inline bool RiceDeltaEncoding::has_num_entries() const { + return _internal_has_num_entries(); +} +inline void RiceDeltaEncoding::clear_num_entries() { + _impl_.num_entries_ = 0; + _impl_._has_bits_[0] &= ~0x00000008u; +} +inline int32_t RiceDeltaEncoding::_internal_num_entries() const { + return _impl_.num_entries_; +} +inline int32_t RiceDeltaEncoding::num_entries() const { + // @@protoc_insertion_point(field_get:mozilla.safebrowsing.RiceDeltaEncoding.num_entries) + return _internal_num_entries(); +} +inline void RiceDeltaEncoding::_internal_set_num_entries(int32_t value) { + _impl_._has_bits_[0] |= 0x00000008u; + _impl_.num_entries_ = value; +} +inline void RiceDeltaEncoding::set_num_entries(int32_t value) { + _internal_set_num_entries(value); + // @@protoc_insertion_point(field_set:mozilla.safebrowsing.RiceDeltaEncoding.num_entries) +} + +// optional bytes encoded_data = 4; +inline bool RiceDeltaEncoding::_internal_has_encoded_data() const { + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool RiceDeltaEncoding::has_encoded_data() const { + return _internal_has_encoded_data(); +} +inline void RiceDeltaEncoding::clear_encoded_data() { + _impl_.encoded_data_.ClearToEmpty(); + _impl_._has_bits_[0] &= ~0x00000001u; +} +inline const std::string& RiceDeltaEncoding::encoded_data() const { + // @@protoc_insertion_point(field_get:mozilla.safebrowsing.RiceDeltaEncoding.encoded_data) + return _internal_encoded_data(); +} +template <typename ArgT0, typename... ArgT> +inline PROTOBUF_ALWAYS_INLINE +void RiceDeltaEncoding::set_encoded_data(ArgT0&& arg0, ArgT... args) { + _impl_._has_bits_[0] |= 0x00000001u; + _impl_.encoded_data_.SetBytes(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:mozilla.safebrowsing.RiceDeltaEncoding.encoded_data) +} +inline std::string* RiceDeltaEncoding::mutable_encoded_data() { + std::string* _s = _internal_mutable_encoded_data(); + // @@protoc_insertion_point(field_mutable:mozilla.safebrowsing.RiceDeltaEncoding.encoded_data) + return _s; +} +inline const std::string& RiceDeltaEncoding::_internal_encoded_data() const { + return _impl_.encoded_data_.Get(); +} +inline void RiceDeltaEncoding::_internal_set_encoded_data(const std::string& value) { + _impl_._has_bits_[0] |= 0x00000001u; + _impl_.encoded_data_.Set(value, GetArenaForAllocation()); +} +inline std::string* RiceDeltaEncoding::_internal_mutable_encoded_data() { + _impl_._has_bits_[0] |= 0x00000001u; + return _impl_.encoded_data_.Mutable(GetArenaForAllocation()); +} +inline std::string* RiceDeltaEncoding::release_encoded_data() { + // @@protoc_insertion_point(field_release:mozilla.safebrowsing.RiceDeltaEncoding.encoded_data) + if (!_internal_has_encoded_data()) { + return nullptr; + } + _impl_._has_bits_[0] &= ~0x00000001u; + auto* p = _impl_.encoded_data_.Release(); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.encoded_data_.IsDefault()) { + _impl_.encoded_data_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void RiceDeltaEncoding::set_allocated_encoded_data(std::string* encoded_data) { + if (encoded_data != nullptr) { + _impl_._has_bits_[0] |= 0x00000001u; + } else { + _impl_._has_bits_[0] &= ~0x00000001u; + } + _impl_.encoded_data_.SetAllocated(encoded_data, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.encoded_data_.IsDefault()) { + _impl_.encoded_data_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:mozilla.safebrowsing.RiceDeltaEncoding.encoded_data) +} + +// ------------------------------------------------------------------- + +// ThreatEntryMetadata_MetadataEntry + +// optional bytes key = 1; +inline bool ThreatEntryMetadata_MetadataEntry::_internal_has_key() const { + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool ThreatEntryMetadata_MetadataEntry::has_key() const { + return _internal_has_key(); +} +inline void ThreatEntryMetadata_MetadataEntry::clear_key() { + _impl_.key_.ClearToEmpty(); + _impl_._has_bits_[0] &= ~0x00000001u; +} +inline const std::string& ThreatEntryMetadata_MetadataEntry::key() const { + // @@protoc_insertion_point(field_get:mozilla.safebrowsing.ThreatEntryMetadata.MetadataEntry.key) + return _internal_key(); +} +template <typename ArgT0, typename... ArgT> +inline PROTOBUF_ALWAYS_INLINE +void ThreatEntryMetadata_MetadataEntry::set_key(ArgT0&& arg0, ArgT... args) { + _impl_._has_bits_[0] |= 0x00000001u; + _impl_.key_.SetBytes(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:mozilla.safebrowsing.ThreatEntryMetadata.MetadataEntry.key) +} +inline std::string* ThreatEntryMetadata_MetadataEntry::mutable_key() { + std::string* _s = _internal_mutable_key(); + // @@protoc_insertion_point(field_mutable:mozilla.safebrowsing.ThreatEntryMetadata.MetadataEntry.key) + return _s; +} +inline const std::string& ThreatEntryMetadata_MetadataEntry::_internal_key() const { + return _impl_.key_.Get(); +} +inline void ThreatEntryMetadata_MetadataEntry::_internal_set_key(const std::string& value) { + _impl_._has_bits_[0] |= 0x00000001u; + _impl_.key_.Set(value, GetArenaForAllocation()); +} +inline std::string* ThreatEntryMetadata_MetadataEntry::_internal_mutable_key() { + _impl_._has_bits_[0] |= 0x00000001u; + return _impl_.key_.Mutable(GetArenaForAllocation()); +} +inline std::string* ThreatEntryMetadata_MetadataEntry::release_key() { + // @@protoc_insertion_point(field_release:mozilla.safebrowsing.ThreatEntryMetadata.MetadataEntry.key) + if (!_internal_has_key()) { + return nullptr; + } + _impl_._has_bits_[0] &= ~0x00000001u; + auto* p = _impl_.key_.Release(); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.key_.IsDefault()) { + _impl_.key_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void ThreatEntryMetadata_MetadataEntry::set_allocated_key(std::string* key) { + if (key != nullptr) { + _impl_._has_bits_[0] |= 0x00000001u; + } else { + _impl_._has_bits_[0] &= ~0x00000001u; + } + _impl_.key_.SetAllocated(key, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.key_.IsDefault()) { + _impl_.key_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:mozilla.safebrowsing.ThreatEntryMetadata.MetadataEntry.key) +} + +// optional bytes value = 2; +inline bool ThreatEntryMetadata_MetadataEntry::_internal_has_value() const { + bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool ThreatEntryMetadata_MetadataEntry::has_value() const { + return _internal_has_value(); +} +inline void ThreatEntryMetadata_MetadataEntry::clear_value() { + _impl_.value_.ClearToEmpty(); + _impl_._has_bits_[0] &= ~0x00000002u; +} +inline const std::string& ThreatEntryMetadata_MetadataEntry::value() const { + // @@protoc_insertion_point(field_get:mozilla.safebrowsing.ThreatEntryMetadata.MetadataEntry.value) + return _internal_value(); +} +template <typename ArgT0, typename... ArgT> +inline PROTOBUF_ALWAYS_INLINE +void ThreatEntryMetadata_MetadataEntry::set_value(ArgT0&& arg0, ArgT... args) { + _impl_._has_bits_[0] |= 0x00000002u; + _impl_.value_.SetBytes(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:mozilla.safebrowsing.ThreatEntryMetadata.MetadataEntry.value) +} +inline std::string* ThreatEntryMetadata_MetadataEntry::mutable_value() { + std::string* _s = _internal_mutable_value(); + // @@protoc_insertion_point(field_mutable:mozilla.safebrowsing.ThreatEntryMetadata.MetadataEntry.value) + return _s; +} +inline const std::string& ThreatEntryMetadata_MetadataEntry::_internal_value() const { + return _impl_.value_.Get(); +} +inline void ThreatEntryMetadata_MetadataEntry::_internal_set_value(const std::string& value) { + _impl_._has_bits_[0] |= 0x00000002u; + _impl_.value_.Set(value, GetArenaForAllocation()); +} +inline std::string* ThreatEntryMetadata_MetadataEntry::_internal_mutable_value() { + _impl_._has_bits_[0] |= 0x00000002u; + return _impl_.value_.Mutable(GetArenaForAllocation()); +} +inline std::string* ThreatEntryMetadata_MetadataEntry::release_value() { + // @@protoc_insertion_point(field_release:mozilla.safebrowsing.ThreatEntryMetadata.MetadataEntry.value) + if (!_internal_has_value()) { + return nullptr; + } + _impl_._has_bits_[0] &= ~0x00000002u; + auto* p = _impl_.value_.Release(); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.value_.IsDefault()) { + _impl_.value_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void ThreatEntryMetadata_MetadataEntry::set_allocated_value(std::string* value) { + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000002u; + } else { + _impl_._has_bits_[0] &= ~0x00000002u; + } + _impl_.value_.SetAllocated(value, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.value_.IsDefault()) { + _impl_.value_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:mozilla.safebrowsing.ThreatEntryMetadata.MetadataEntry.value) +} + +// ------------------------------------------------------------------- + +// ThreatEntryMetadata + +// repeated .mozilla.safebrowsing.ThreatEntryMetadata.MetadataEntry entries = 1; +inline int ThreatEntryMetadata::_internal_entries_size() const { + return _impl_.entries_.size(); +} +inline int ThreatEntryMetadata::entries_size() const { + return _internal_entries_size(); +} +inline void ThreatEntryMetadata::clear_entries() { + _impl_.entries_.Clear(); +} +inline ::mozilla::safebrowsing::ThreatEntryMetadata_MetadataEntry* ThreatEntryMetadata::mutable_entries(int index) { + // @@protoc_insertion_point(field_mutable:mozilla.safebrowsing.ThreatEntryMetadata.entries) + return _impl_.entries_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::mozilla::safebrowsing::ThreatEntryMetadata_MetadataEntry >* +ThreatEntryMetadata::mutable_entries() { + // @@protoc_insertion_point(field_mutable_list:mozilla.safebrowsing.ThreatEntryMetadata.entries) + return &_impl_.entries_; +} +inline const ::mozilla::safebrowsing::ThreatEntryMetadata_MetadataEntry& ThreatEntryMetadata::_internal_entries(int index) const { + return _impl_.entries_.Get(index); +} +inline const ::mozilla::safebrowsing::ThreatEntryMetadata_MetadataEntry& ThreatEntryMetadata::entries(int index) const { + // @@protoc_insertion_point(field_get:mozilla.safebrowsing.ThreatEntryMetadata.entries) + return _internal_entries(index); +} +inline ::mozilla::safebrowsing::ThreatEntryMetadata_MetadataEntry* ThreatEntryMetadata::_internal_add_entries() { + return _impl_.entries_.Add(); +} +inline ::mozilla::safebrowsing::ThreatEntryMetadata_MetadataEntry* ThreatEntryMetadata::add_entries() { + ::mozilla::safebrowsing::ThreatEntryMetadata_MetadataEntry* _add = _internal_add_entries(); + // @@protoc_insertion_point(field_add:mozilla.safebrowsing.ThreatEntryMetadata.entries) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::mozilla::safebrowsing::ThreatEntryMetadata_MetadataEntry >& +ThreatEntryMetadata::entries() const { + // @@protoc_insertion_point(field_list:mozilla.safebrowsing.ThreatEntryMetadata.entries) + return _impl_.entries_; +} + +// ------------------------------------------------------------------- + +// ThreatListDescriptor + +// optional .mozilla.safebrowsing.ThreatType threat_type = 1; +inline bool ThreatListDescriptor::_internal_has_threat_type() const { + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool ThreatListDescriptor::has_threat_type() const { + return _internal_has_threat_type(); +} +inline void ThreatListDescriptor::clear_threat_type() { + _impl_.threat_type_ = 0; + _impl_._has_bits_[0] &= ~0x00000001u; +} +inline ::mozilla::safebrowsing::ThreatType ThreatListDescriptor::_internal_threat_type() const { + return static_cast< ::mozilla::safebrowsing::ThreatType >(_impl_.threat_type_); +} +inline ::mozilla::safebrowsing::ThreatType ThreatListDescriptor::threat_type() const { + // @@protoc_insertion_point(field_get:mozilla.safebrowsing.ThreatListDescriptor.threat_type) + return _internal_threat_type(); +} +inline void ThreatListDescriptor::_internal_set_threat_type(::mozilla::safebrowsing::ThreatType value) { + assert(::mozilla::safebrowsing::ThreatType_IsValid(value)); + _impl_._has_bits_[0] |= 0x00000001u; + _impl_.threat_type_ = value; +} +inline void ThreatListDescriptor::set_threat_type(::mozilla::safebrowsing::ThreatType value) { + _internal_set_threat_type(value); + // @@protoc_insertion_point(field_set:mozilla.safebrowsing.ThreatListDescriptor.threat_type) +} + +// optional .mozilla.safebrowsing.PlatformType platform_type = 2; +inline bool ThreatListDescriptor::_internal_has_platform_type() const { + bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool ThreatListDescriptor::has_platform_type() const { + return _internal_has_platform_type(); +} +inline void ThreatListDescriptor::clear_platform_type() { + _impl_.platform_type_ = 0; + _impl_._has_bits_[0] &= ~0x00000002u; +} +inline ::mozilla::safebrowsing::PlatformType ThreatListDescriptor::_internal_platform_type() const { + return static_cast< ::mozilla::safebrowsing::PlatformType >(_impl_.platform_type_); +} +inline ::mozilla::safebrowsing::PlatformType ThreatListDescriptor::platform_type() const { + // @@protoc_insertion_point(field_get:mozilla.safebrowsing.ThreatListDescriptor.platform_type) + return _internal_platform_type(); +} +inline void ThreatListDescriptor::_internal_set_platform_type(::mozilla::safebrowsing::PlatformType value) { + assert(::mozilla::safebrowsing::PlatformType_IsValid(value)); + _impl_._has_bits_[0] |= 0x00000002u; + _impl_.platform_type_ = value; +} +inline void ThreatListDescriptor::set_platform_type(::mozilla::safebrowsing::PlatformType value) { + _internal_set_platform_type(value); + // @@protoc_insertion_point(field_set:mozilla.safebrowsing.ThreatListDescriptor.platform_type) +} + +// optional .mozilla.safebrowsing.ThreatEntryType threat_entry_type = 3; +inline bool ThreatListDescriptor::_internal_has_threat_entry_type() const { + bool value = (_impl_._has_bits_[0] & 0x00000004u) != 0; + return value; +} +inline bool ThreatListDescriptor::has_threat_entry_type() const { + return _internal_has_threat_entry_type(); +} +inline void ThreatListDescriptor::clear_threat_entry_type() { + _impl_.threat_entry_type_ = 0; + _impl_._has_bits_[0] &= ~0x00000004u; +} +inline ::mozilla::safebrowsing::ThreatEntryType ThreatListDescriptor::_internal_threat_entry_type() const { + return static_cast< ::mozilla::safebrowsing::ThreatEntryType >(_impl_.threat_entry_type_); +} +inline ::mozilla::safebrowsing::ThreatEntryType ThreatListDescriptor::threat_entry_type() const { + // @@protoc_insertion_point(field_get:mozilla.safebrowsing.ThreatListDescriptor.threat_entry_type) + return _internal_threat_entry_type(); +} +inline void ThreatListDescriptor::_internal_set_threat_entry_type(::mozilla::safebrowsing::ThreatEntryType value) { + assert(::mozilla::safebrowsing::ThreatEntryType_IsValid(value)); + _impl_._has_bits_[0] |= 0x00000004u; + _impl_.threat_entry_type_ = value; +} +inline void ThreatListDescriptor::set_threat_entry_type(::mozilla::safebrowsing::ThreatEntryType value) { + _internal_set_threat_entry_type(value); + // @@protoc_insertion_point(field_set:mozilla.safebrowsing.ThreatListDescriptor.threat_entry_type) +} + +// ------------------------------------------------------------------- + +// ListThreatListsResponse + +// repeated .mozilla.safebrowsing.ThreatListDescriptor threat_lists = 1; +inline int ListThreatListsResponse::_internal_threat_lists_size() const { + return _impl_.threat_lists_.size(); +} +inline int ListThreatListsResponse::threat_lists_size() const { + return _internal_threat_lists_size(); +} +inline void ListThreatListsResponse::clear_threat_lists() { + _impl_.threat_lists_.Clear(); +} +inline ::mozilla::safebrowsing::ThreatListDescriptor* ListThreatListsResponse::mutable_threat_lists(int index) { + // @@protoc_insertion_point(field_mutable:mozilla.safebrowsing.ListThreatListsResponse.threat_lists) + return _impl_.threat_lists_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::mozilla::safebrowsing::ThreatListDescriptor >* +ListThreatListsResponse::mutable_threat_lists() { + // @@protoc_insertion_point(field_mutable_list:mozilla.safebrowsing.ListThreatListsResponse.threat_lists) + return &_impl_.threat_lists_; +} +inline const ::mozilla::safebrowsing::ThreatListDescriptor& ListThreatListsResponse::_internal_threat_lists(int index) const { + return _impl_.threat_lists_.Get(index); +} +inline const ::mozilla::safebrowsing::ThreatListDescriptor& ListThreatListsResponse::threat_lists(int index) const { + // @@protoc_insertion_point(field_get:mozilla.safebrowsing.ListThreatListsResponse.threat_lists) + return _internal_threat_lists(index); +} +inline ::mozilla::safebrowsing::ThreatListDescriptor* ListThreatListsResponse::_internal_add_threat_lists() { + return _impl_.threat_lists_.Add(); +} +inline ::mozilla::safebrowsing::ThreatListDescriptor* ListThreatListsResponse::add_threat_lists() { + ::mozilla::safebrowsing::ThreatListDescriptor* _add = _internal_add_threat_lists(); + // @@protoc_insertion_point(field_add:mozilla.safebrowsing.ListThreatListsResponse.threat_lists) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::mozilla::safebrowsing::ThreatListDescriptor >& +ListThreatListsResponse::threat_lists() const { + // @@protoc_insertion_point(field_list:mozilla.safebrowsing.ListThreatListsResponse.threat_lists) + return _impl_.threat_lists_; +} + +// ------------------------------------------------------------------- + +// Duration + +// optional int64 seconds = 1; +inline bool Duration::_internal_has_seconds() const { + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool Duration::has_seconds() const { + return _internal_has_seconds(); +} +inline void Duration::clear_seconds() { + _impl_.seconds_ = int64_t{0}; + _impl_._has_bits_[0] &= ~0x00000001u; +} +inline int64_t Duration::_internal_seconds() const { + return _impl_.seconds_; +} +inline int64_t Duration::seconds() const { + // @@protoc_insertion_point(field_get:mozilla.safebrowsing.Duration.seconds) + return _internal_seconds(); +} +inline void Duration::_internal_set_seconds(int64_t value) { + _impl_._has_bits_[0] |= 0x00000001u; + _impl_.seconds_ = value; +} +inline void Duration::set_seconds(int64_t value) { + _internal_set_seconds(value); + // @@protoc_insertion_point(field_set:mozilla.safebrowsing.Duration.seconds) +} + +// optional int32 nanos = 2; +inline bool Duration::_internal_has_nanos() const { + bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool Duration::has_nanos() const { + return _internal_has_nanos(); +} +inline void Duration::clear_nanos() { + _impl_.nanos_ = 0; + _impl_._has_bits_[0] &= ~0x00000002u; +} +inline int32_t Duration::_internal_nanos() const { + return _impl_.nanos_; +} +inline int32_t Duration::nanos() const { + // @@protoc_insertion_point(field_get:mozilla.safebrowsing.Duration.nanos) + return _internal_nanos(); +} +inline void Duration::_internal_set_nanos(int32_t value) { + _impl_._has_bits_[0] |= 0x00000002u; + _impl_.nanos_ = value; +} +inline void Duration::set_nanos(int32_t value) { + _internal_set_nanos(value); + // @@protoc_insertion_point(field_set:mozilla.safebrowsing.Duration.nanos) +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace safebrowsing +} // namespace mozilla + +PROTOBUF_NAMESPACE_OPEN + +template <> struct is_proto_enum< ::mozilla::safebrowsing::FetchThreatListUpdatesResponse_ListUpdateResponse_ResponseType> : ::std::true_type {}; +template <> struct is_proto_enum< ::mozilla::safebrowsing::ThreatHit_ThreatSourceType> : ::std::true_type {}; +template <> struct is_proto_enum< ::mozilla::safebrowsing::ChromeClientInfo_SafeBrowsingReportingPopulation> : ::std::true_type {}; +template <> struct is_proto_enum< ::mozilla::safebrowsing::ThreatType> : ::std::true_type {}; +template <> struct is_proto_enum< ::mozilla::safebrowsing::PlatformType> : ::std::true_type {}; +template <> struct is_proto_enum< ::mozilla::safebrowsing::CompressionType> : ::std::true_type {}; +template <> struct is_proto_enum< ::mozilla::safebrowsing::ThreatEntryType> : ::std::true_type {}; + +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) + +#include <google/protobuf/port_undef.inc> +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_safebrowsing_2eproto diff --git a/toolkit/components/url-classifier/chromium/safebrowsing.proto b/toolkit/components/url-classifier/chromium/safebrowsing.proto new file mode 100644 index 0000000000..207429bbd6 --- /dev/null +++ b/toolkit/components/url-classifier/chromium/safebrowsing.proto @@ -0,0 +1,540 @@ +// Copyright 2015 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. +// +// This file includes Safe Browsing V4 API blacklist request and response +// protocol buffers. They should be kept in sync with the server implementation. + +syntax = "proto2"; + +option optimize_for = LITE_RUNTIME; + +package mozilla.safebrowsing; + +message ThreatInfo { + // The threat types to be checked. + repeated ThreatType threat_types = 1; + + // The platform types to be checked. + repeated PlatformType platform_types = 2; + + // The entry types to be checked. + repeated ThreatEntryType threat_entry_types = 4; + + // The threat entries to be checked. + repeated ThreatEntry threat_entries = 3; +} + +// A match when checking a threat entry in the Safe Browsing threat lists. +message ThreatMatch { + // The threat type matching this threat. + optional ThreatType threat_type = 1; + + // The platform type matching this threat. + optional PlatformType platform_type = 2; + + // The threat entry type matching this threat. + optional ThreatEntryType threat_entry_type = 6; + + // The threat matching this threat. + optional ThreatEntry threat = 3; + + // Optional metadata associated with this threat. + optional ThreatEntryMetadata threat_entry_metadata = 4; + + // The cache lifetime for the returned match. Clients must not cache this + // response for more than this duration to avoid false positives. + optional Duration cache_duration = 5; +} + +// Request to check entries against lists. +message FindThreatMatchesRequest { + // The client metadata. + optional ClientInfo client = 1; + + // The lists and entries to be checked for matches. + optional ThreatInfo threat_info = 2; +} + +// Response type for requests to find threat matches. +message FindThreatMatchesResponse { + // The threat list matches. + repeated ThreatMatch matches = 1; +} + +// Describes a Safe Browsing API update request. Clients can request updates for +// multiple lists in a single request. +message FetchThreatListUpdatesRequest { + // The client metadata. + optional ClientInfo client = 1; + + // A single list update request. + message ListUpdateRequest { + // The type of threat posed by entries present in the list. + optional ThreatType threat_type = 1; + + // The type of platform at risk by entries present in the list. + optional PlatformType platform_type = 2; + + // The types of entries present in the list. + optional ThreatEntryType threat_entry_type = 5; + + // The current state of the client for the requested list (the encrypted + // ClientState that was sent to the client from the previous update + // request). + optional bytes state = 3; + + // The constraints for this update. + message Constraints { + // The maximum size in number of entries. The update will not contain more + // entries than this value. This should be a power of 2 between 2**10 and + // 2**20. If zero, no update size limit is set. + optional int32 max_update_entries = 1; + + // Sets the maxmimum number of entries that the client is willing to have + // in the local database. This should be a power of 2 between 2**10 and + // 2**20. If zero, no database size limit is set. + optional int32 max_database_entries = 2; + + // Requests the list for a specific geographic location. If not set the + // server may pick that value based on the user's IP address. Expects ISO + // 3166-1 alpha-2 format. + optional string region = 3; + + // The compression types supported by the client. + repeated CompressionType supported_compressions = 4; + } + + // The constraints associated with this request. + optional Constraints constraints = 4; + } + + // The requested threat list updates. + repeated ListUpdateRequest list_update_requests = 3; + + // Chrome-specific client information. + optional ChromeClientInfo chrome_client_info = 4; +} + +// Response type for threat list update requests. +message FetchThreatListUpdatesResponse { + // An update to an individual list. + message ListUpdateResponse { + // The threat type for which data is returned. + optional ThreatType threat_type = 1; + + // The format of the threats. + optional ThreatEntryType threat_entry_type = 2; + + // The platform type for which data is returned. + optional PlatformType platform_type = 3; + + // The type of response sent to the client. + enum ResponseType { + // Unknown. + RESPONSE_TYPE_UNSPECIFIED = 0; + + // Partial updates are applied to the client's existing local database. + PARTIAL_UPDATE = 1; + + // Full updates replace the client's entire local database. This means + // that either the client was seriously out-of-date or the client is + // believed to be corrupt. + FULL_UPDATE = 2; + } + + // The type of response. This may indicate that an action is required by the + // client when the response is received. + optional ResponseType response_type = 4; + + // A set of entries to add to a local threat type's list. Repeated to allow + // for a combination of compressed and raw data to be sent in a single + // response. + repeated ThreatEntrySet additions = 5; + + // A set of entries to remove from a local threat type's list. In practice, + // this field is empty or contains exactly one ThreatEntrySet. + repeated ThreatEntrySet removals = 6; + + // The new client state, in encrypted format. Opaque to clients. + optional bytes new_client_state = 7; + + // The expected SHA256 hash of the client state; that is, of the sorted list + // of all hashes present in the database after applying the provided update. + // If the client state doesn't match the expected state, the client must + // disregard this update and retry later. + optional Checksum checksum = 8; + } + + // The list updates requested by the clients. + repeated ListUpdateResponse list_update_responses = 1; + + // The minimum duration the client must wait before issuing any update + // request. If this field is not set clients may update as soon as they want. + optional Duration minimum_wait_duration = 2; +} + +// Request to return full hashes matched by the provided hash prefixes. +message FindFullHashesRequest { + // The client metadata. + optional ClientInfo client = 1; + + // The current client states for each of the client's local threat lists. + repeated bytes client_states = 2; + + // The lists and hashes to be checked. + optional ThreatInfo threat_info = 3; +} + +// Response type for requests to find full hashes. +message FindFullHashesResponse { + // The full hashes that matched the requested prefixes. + repeated ThreatMatch matches = 1; + + // The minimum duration the client must wait before issuing any find hashes + // request. If this field is not set, clients can issue a request as soon as + // they want. + optional Duration minimum_wait_duration = 2; + + // For requested entities that did not match the threat list, how long to + // cache the response. + optional Duration negative_cache_duration = 3; +} + +// A hit comprised of multiple resources; one is the threat list entry that was +// encountered by the client, while others give context as to how the client +// arrived at the unsafe entry. +message ThreatHit { + // The threat type reported. + optional ThreatType threat_type = 1; + + // The platform type reported. + optional PlatformType platform_type = 2; + + // The threat entry responsible for the hit. Full hash should be reported for + // hash-based hits. + optional ThreatEntry entry = 3; + + // Types of resources reported by the client as part of a single hit. + enum ThreatSourceType { + // Unknown. + THREAT_SOURCE_TYPE_UNSPECIFIED = 0; + // The URL that matched the threat list (for which GetFullHash returned a + // valid hash). + MATCHING_URL = 1; + // The final top-level URL of the tab that the client was browsing when the + // match occurred. + TAB_URL = 2; + // A redirect URL that was fetched before hitting the final TAB_URL. + TAB_REDIRECT = 3; + // A resource loaded within the final TAB_URL. + TAB_RESOURCE = 4; + } + + // A single resource related to a threat hit. + message ThreatSource { + // The URL of the resource. + optional string url = 1; + + // The type of source reported. + optional ThreatSourceType type = 2; + + // The remote IP of the resource in ASCII format. Either IPv4 or IPv6. + optional string remote_ip = 3; + + // Referrer of the resource. Only set if the referrer is available. + optional string referrer = 4; + } + + // The resources related to the threat hit. + repeated ThreatSource resources = 4; + + // Client-reported identification. + optional ClientInfo client_info = 5; + + // Details about the user that encountered the threat. + message UserInfo { + // The UN M.49 region code associated with the user's location. + optional string region_code = 1; + + // Unique ID stable over a week or two + optional bytes user_id = 2; + } + + // Details about the user that encountered the threat. + optional UserInfo user_info = 6; +} + +// Types of threats. +enum ThreatType { + // Unknown. + THREAT_TYPE_UNSPECIFIED = 0; + + // Malware threat type. + MALWARE_THREAT = 1; + + // Social engineering threat type. + SOCIAL_ENGINEERING_PUBLIC = 2; + + // Unwanted software threat type. + UNWANTED_SOFTWARE = 3; + + // Potentially harmful application threat type. + POTENTIALLY_HARMFUL_APPLICATION = 4; + + // Social engineering threat type for internal use. + SOCIAL_ENGINEERING = 5; + + // API abuse threat type. + API_ABUSE = 6; + + // Malicious binary threat type. + MALICIOUS_BINARY = 7; + + // Client side detection whitelist threat type. + CSD_WHITELIST = 8; + + // Client side download detection whitelist threat type. + CSD_DOWNLOAD_WHITELIST = 9; + + // Client incident threat type. + CLIENT_INCIDENT = 10; + + // Patterns to be used for activating the subresource filter. Interstitial + // will not be shown for patterns from this list. + SUBRESOURCE_FILTER = 13; +} + +// Types of platforms. +enum PlatformType { + // Unknown platform. + PLATFORM_TYPE_UNSPECIFIED = 0; + + // Threat posed to Windows. + WINDOWS_PLATFORM = 1; + + // Threat posed to Linux. + LINUX_PLATFORM = 2; + + // Threat posed to Android. + // This cannot be ANDROID because that symbol is defined for android builds + // here: build/config/android/BUILD.gn line21. + ANDROID_PLATFORM = 3; + + // Threat posed to OSX. + OSX_PLATFORM = 4; + + // Threat posed to iOS. + IOS_PLATFORM = 5; + + // Threat posed to at least one of the defined platforms. + ANY_PLATFORM = 6; + + // Threat posed to all defined platforms. + ALL_PLATFORMS = 7; + + // Threat posed to Chrome. + CHROME_PLATFORM = 8; +} + +// The client metadata associated with Safe Browsing API requests. +message ClientInfo { + // A client ID that (hopefully) uniquely identifies the client implementation + // of the Safe Browsing API. + optional string client_id = 1; + + // The version of the client implementation. + optional string client_version = 2; +} + +// The client metadata associated with Safe Browsing API requests specific to +// users of Chrome. +message ChromeClientInfo { + // Safe Browsing reporting populations in Chrome. + enum SafeBrowsingReportingPopulation { + // Unspecified reporting verbosity. + UNSPECIFIED = 0; + + // Client is opted out of reporting. + OPT_OUT = 1; + + // Legacy extended reporting population. + EXTENDED = 2; + + // Scout reporting population. + SCOUT = 3; + } + + // The reporting population of the user. + optional SafeBrowsingReportingPopulation reporting_population = 1; +} + +// The expected state of a client's local database. +message Checksum { + // The SHA256 hash of the client state; that is, of the sorted list of all + // hashes present in the database. + optional bytes sha256 = 1; +} + +// The ways in which threat entry sets can be compressed. +enum CompressionType { + // Unknown. + COMPRESSION_TYPE_UNSPECIFIED = 0; + + // Raw, uncompressed data. + RAW = 1; + + // Rice-Golomb encoded data. + RICE = 2; +} + +// An individual threat; for example, a malicious URL or its hash +// representation. Only one of these fields should be set. +message ThreatEntry { + // A variable-length SHA256 hash with size between 4 and 32 bytes inclusive. + optional bytes hash = 1; + + // A URL. + optional string url = 2; +} + +// Types of entries that pose threats. Threat lists are collections of entries +// of a single type. +enum ThreatEntryType { + // Unspecified. + THREAT_ENTRY_TYPE_UNSPECIFIED = 0; + + // A host-suffix/path-prefix URL expression; for example, "foo.bar.com/baz/". + URL = 1; + + // An executable program. + EXECUTABLE = 2; + + // An IP range. + IP_RANGE = 3; + + // Chrome extension. + CHROME_EXTENSION = 4; + + // Filename. + FILENAME = 5; + + // CERT. + CERT = 6; +} + +// A set of threats that should be added or removed from a client's local +// database. +message ThreatEntrySet { + // The compression type for the entries in this set. + optional CompressionType compression_type = 1; + + // At most one of the following fields should be set. + + // The raw SHA256-formatted entries. + optional RawHashes raw_hashes = 2; + + // The raw removal indices for a local list. + optional RawIndices raw_indices = 3; + + // The encoded 4-byte prefixes of SHA256-formatted entries, using a + // Golomb-Rice encoding. + optional RiceDeltaEncoding rice_hashes = 4; + + // The encoded local, lexicographically-sorted list indices, using a + // Golomb-Rice encoding. Used for sending compressed removal indicies. + optional RiceDeltaEncoding rice_indices = 5; +} + +// A set of raw indicies to remove from a local list. +message RawIndices { + // The indicies to remove from a lexicographically-sorted local list. + repeated int32 indices = 1; +} + +// The uncompressed threat entries in hash format of a particular prefix length. +// Hashes can be anywhere from 4 to 32 bytes in size. A large majority are 4 +// bytes, but some hashes are lengthened if they collide with the hash of a +// popular URL. +// +// Used for sending ThreatEntrySet to clients that do not support compression, +// or when sending non-4-byte hashes to clients that do support compression. +message RawHashes { + // The number of bytes for each prefix encoded below. This field can be + // anywhere from 4 (shortest prefix) to 32 (full SHA256 hash). + optional int32 prefix_size = 1; + + // The hashes, all concatenated into one long string. Each hash has a prefix + // size of |prefix_size| above. Hashes are sorted in lexicographic order. + optional bytes raw_hashes = 2; +} + +// The Rice-Golomb encoded data. Used for sending compressed 4-byte hashes or +// compressed removal indices. +message RiceDeltaEncoding { + // The offset of the first entry in the encoded data, or, if only a single + // integer was encoded, that single integer's value. + optional int64 first_value = 1; + + // The Golomb-Rice parameter which is a number between 2 and 28. This field + // is missing (that is, zero) if num_entries is zero. + optional int32 rice_parameter = 2; + + // The number of entries that are delta encoded in the encoded data. If only a + // single integer was encoded, this will be zero and the single value will be + // stored in first_value. + optional int32 num_entries = 3; + + // The encoded deltas that are encoded using the Golomb-Rice coder. + optional bytes encoded_data = 4; +} + +// The metadata associated with a specific threat entry. The client is expected +// to know the metadata key/value pairs associated with each threat type. +message ThreatEntryMetadata { + // A single metadata entry. + message MetadataEntry { + // The metadata entry key. + optional bytes key = 1; + + // The metadata entry value. + optional bytes value = 2; + } + + // The metadata entries. + repeated MetadataEntry entries = 1; +} + +// Describes an individual threat list. A list is defined by three parameters: +// the type of threat posed, the type of platform targeted by the threat, and +// the type of entries in the list. +message ThreatListDescriptor { + // The threat type posed by the list's entries. + optional ThreatType threat_type = 1; + + // The platform type targeted by the list's entries. + optional PlatformType platform_type = 2; + + // The entry types contained in the list. + optional ThreatEntryType threat_entry_type = 3; +} + +// A collection of lists available for download. +message ListThreatListsResponse { + // The lists available for download. + repeated ThreatListDescriptor threat_lists = 1; +} + +message Duration { + // Signed seconds of the span of time. Must be from -315,576,000,000 + // to +315,576,000,000 inclusive. + optional int64 seconds = 1; + + // Signed fractions of a second at nanosecond resolution of the span + // of time. Durations less than one second are represented with a 0 + // `seconds` field and a positive or negative `nanos` field. For durations + // of one second or more, a non-zero value for the `nanos` field must be + // of the same sign as the `seconds` field. Must be from -999,999,999 + // to +999,999,999 inclusive. + optional int32 nanos = 2; +} |