From 7001cac45ea60269932e737d42e3464e7ecb933e Mon Sep 17 00:00:00 2001 From: deling-google <99381034+deling-google@users.noreply.github.com> Date: Thu, 31 Mar 2022 12:04:31 -0700 Subject: [PATCH 01/17] Update .gitmodules Delete submodule ukey2 --- .gitmodules | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.gitmodules b/.gitmodules index 906d7c62..e28f3669 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,7 +1,3 @@ -[submodule "third_party/ukey2"] - path = third_party/ukey2 - url = https://github.com/google/ukey2 - branch = master [submodule "third_party/protobuf"] path = third_party/protobuf url = https://github.com/protocolbuffers/protobuf From 6bb367801e3026d6b76cd342d3bfda5dcd231424 Mon Sep 17 00:00:00 2001 From: deling-google <99381034+deling-google@users.noreply.github.com> Date: Thu, 31 Mar 2022 12:06:07 -0700 Subject: [PATCH 02/17] Remove ukey2 folder --- third_party/ukey2 | 1 - 1 file changed, 1 deletion(-) delete mode 160000 third_party/ukey2 diff --git a/third_party/ukey2 b/third_party/ukey2 deleted file mode 160000 index c2436e55..00000000 --- a/third_party/ukey2 +++ /dev/null @@ -1 +0,0 @@ -Subproject commit c2436e55116964d88532080784f6ed496b0d11f9 From 7baeae44d061ecf8d91139a6316d767c3995971b Mon Sep 17 00:00:00 2001 From: deling-google <99381034+deling-google@users.noreply.github.com> Date: Thu, 31 Mar 2022 12:09:10 -0700 Subject: [PATCH 03/17] Add ukey2 submodule --- .gitmodules | 4 ++++ third_party/ukey2/ukey2 | 1 + 2 files changed, 5 insertions(+) create mode 160000 third_party/ukey2/ukey2 diff --git a/.gitmodules b/.gitmodules index e28f3669..f1abd72b 100644 --- a/.gitmodules +++ b/.gitmodules @@ -18,3 +18,7 @@ path = third_party/depot_tools url = https://chromium.googlesource.com/chromium/tools/depot_tools.git branch = main +[submodule "third_party/ukey2/ukey2"] + path = third_party/ukey2/ukey2 + url = https://github.com/google/ukey2 + branch = master diff --git a/third_party/ukey2/ukey2 b/third_party/ukey2/ukey2 new file mode 160000 index 00000000..c2436e55 --- /dev/null +++ b/third_party/ukey2/ukey2 @@ -0,0 +1 @@ +Subproject commit c2436e55116964d88532080784f6ed496b0d11f9 From 69a27ac968d0632cfc2682eec13e859b8432c438 Mon Sep 17 00:00:00 2001 From: deling-google <99381034+deling-google@users.noreply.github.com> Date: Thu, 31 Mar 2022 12:16:50 -0700 Subject: [PATCH 04/17] Remove smhasher --- .gitmodules | 4 ---- third_party/smhasher | 1 - 2 files changed, 5 deletions(-) delete mode 160000 third_party/smhasher diff --git a/.gitmodules b/.gitmodules index f1abd72b..ad870766 100644 --- a/.gitmodules +++ b/.gitmodules @@ -10,10 +10,6 @@ path = third_party/absl url = https://github.com/abseil/abseil-cpp branch = master -[submodule "third_party/smhasher"] - path = third_party/smhasher - url = https://github.com/aappleby/smhasher - branch = master [submodule "third_party/depot_tools"] path = third_party/depot_tools url = https://chromium.googlesource.com/chromium/tools/depot_tools.git diff --git a/third_party/smhasher b/third_party/smhasher deleted file mode 160000 index 61a0530f..00000000 --- a/third_party/smhasher +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 61a0530f28277f2e850bfc39600ce61d02b518de From 1049f653248f4811acdf7a42e9bd2864baec6b7c Mon Sep 17 00:00:00 2001 From: deling-google <99381034+deling-google@users.noreply.github.com> Date: Thu, 31 Mar 2022 12:22:52 -0700 Subject: [PATCH 05/17] Add smhasher --- .gitmodules | 5 ++++- third_party/smhasher/smhasher | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) create mode 160000 third_party/smhasher/smhasher diff --git a/.gitmodules b/.gitmodules index ad870766..fcf2e23c 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,7 +1,7 @@ [submodule "third_party/protobuf"] path = third_party/protobuf url = https://github.com/protocolbuffers/protobuf - branch = master + branch = 3.19.x [submodule "third_party/gtest"] path = third_party/gtest url = https://github.com/google/googletest @@ -18,3 +18,6 @@ path = third_party/ukey2/ukey2 url = https://github.com/google/ukey2 branch = master +[submodule "third_party/smhasher/smhasher"] + path = third_party/smhasher/smhasher + url = https://github.com/aappleby/smhasher diff --git a/third_party/smhasher/smhasher b/third_party/smhasher/smhasher new file mode 160000 index 00000000..61a0530f --- /dev/null +++ b/third_party/smhasher/smhasher @@ -0,0 +1 @@ +Subproject commit 61a0530f28277f2e850bfc39600ce61d02b518de From 8d14a286e31c4d032b087af72d10d2e0b550a31d Mon Sep 17 00:00:00 2001 From: deling-google <99381034+deling-google@users.noreply.github.com> Date: Thu, 31 Mar 2022 12:28:12 -0700 Subject: [PATCH 06/17] Add two submodules --- .gitmodules | 6 ++++++ third_party/google-toolbox-for-mac/google-toolbox-for-mac | 1 + third_party/securemessage/securemessage | 1 + 3 files changed, 8 insertions(+) create mode 160000 third_party/google-toolbox-for-mac/google-toolbox-for-mac create mode 160000 third_party/securemessage/securemessage diff --git a/.gitmodules b/.gitmodules index fcf2e23c..006eb480 100644 --- a/.gitmodules +++ b/.gitmodules @@ -21,3 +21,9 @@ [submodule "third_party/smhasher/smhasher"] path = third_party/smhasher/smhasher url = https://github.com/aappleby/smhasher +[submodule "third_party/securemessage/securemessage"] + path = third_party/securemessage/securemessage + url = https://github.com/google/securemessage.git +[submodule "third_party/google-toolbox-for-mac/google-toolbox-for-mac"] + path = third_party/google-toolbox-for-mac/google-toolbox-for-mac + url = https://github.com/google/google-toolbox-for-mac.git diff --git a/third_party/google-toolbox-for-mac/google-toolbox-for-mac b/third_party/google-toolbox-for-mac/google-toolbox-for-mac new file mode 160000 index 00000000..33941504 --- /dev/null +++ b/third_party/google-toolbox-for-mac/google-toolbox-for-mac @@ -0,0 +1 @@ +Subproject commit 339415048005a9eba957357a02459a977a2e3007 diff --git a/third_party/securemessage/securemessage b/third_party/securemessage/securemessage new file mode 160000 index 00000000..69a02984 --- /dev/null +++ b/third_party/securemessage/securemessage @@ -0,0 +1 @@ +Subproject commit 69a02984d4563c6c21132ee882d1d3df1981f5a1 From e6a57b7fc13ccb5f457ce846bd826c61199f7b54 Mon Sep 17 00:00:00 2001 From: deling-google <99381034+deling-google@users.noreply.github.com> Date: Thu, 31 Mar 2022 12:33:58 -0700 Subject: [PATCH 07/17] Change google-toolbox-for-mac folder name --- Package.swift | 164 +++++++++++++++++++++++++------------------------- 1 file changed, 82 insertions(+), 82 deletions(-) diff --git a/Package.swift b/Package.swift index 2743d1bb..d8854de3 100644 --- a/Package.swift +++ b/Package.swift @@ -28,93 +28,93 @@ let package = Package( // Targets are the basic building blocks of a package. A target can define a module or a test suite. // Targets can depend on other targets in this package, and on products in packages this package depends on. .target( - name: "google_toolbox_for_mac", - path: "third_party/google_toolbox_for_mac", + name: "google-toolbox-for-mac", + path: "third_party/google-toolbox-for-mac", exclude: [ - "google_toolbox_for_mac/Foundation/GTMNSString+HTMLTest.m", - "google_toolbox_for_mac/Foundation/GTMSystemVersionTest.m", - "google_toolbox_for_mac/Foundation/GTMNSFileHandle+UniqueName.m", - "google_toolbox_for_mac/Foundation/GTMLoggerRingBufferWriterTest.m", - "google_toolbox_for_mac/Foundation/GTMNSData+zlib.m", - "google_toolbox_for_mac/Foundation/GTMNSNumber+64BitTest.m", - "google_toolbox_for_mac/Foundation/GTMScriptRunnerTest.m", - "google_toolbox_for_mac/Foundation/GTMSystemVersion.m", - "google_toolbox_for_mac/Foundation/GTMFileSystemKQueueTest.m", - "google_toolbox_for_mac/Foundation/GTMFileSystemKQueue.m", - "google_toolbox_for_mac/Foundation/GTMGeometryUtilsTest.m", - "google_toolbox_for_mac/Foundation/GTMLocalizedStringTest.m", - "google_toolbox_for_mac/Foundation/BUILD", - "google_toolbox_for_mac/Foundation/GTMSQLite.m", - "google_toolbox_for_mac/Foundation/GTMLoggerRingBufferWriter.m", - "google_toolbox_for_mac/Foundation/GTMStringEncoding.m", - "google_toolbox_for_mac/Foundation/GTMNSFileHandle+UniqueNameTest.m", - "google_toolbox_for_mac/Foundation/GTMLogger+ASLTest.m", - "google_toolbox_for_mac/Foundation/GTMNSObject+KeyValueObservingTest.m", - "google_toolbox_for_mac/Foundation/GTMNSString+XMLTest.m", - "google_toolbox_for_mac/Foundation/GTMNSThread+BlocksTest.m", - "google_toolbox_for_mac/Foundation/GTMNSString+HTML.m", - "google_toolbox_for_mac/Foundation/GTMSignalHandlerTest.m", - "google_toolbox_for_mac/Foundation/GTMURLBuilderTest.m", - "google_toolbox_for_mac/Foundation/GTMLoggerTest.m", - "google_toolbox_for_mac/Foundation/GTMServiceManagementTestingHarness.c", - "google_toolbox_for_mac/Foundation/GTMSQLiteTest.m", - "google_toolbox_for_mac/Foundation/GTMTimeUtilsTest.m", - "google_toolbox_for_mac/Foundation/GTMNSFileManager+PathTest.m", - "google_toolbox_for_mac/Foundation/GTMServiceManagement.c", - "google_toolbox_for_mac/Foundation/GTMNSString+URLArgumentsTest.m", - "google_toolbox_for_mac/Foundation/GTMRegexTest.m", - "google_toolbox_for_mac/Foundation/GTMNSThread+Blocks.m", - "google_toolbox_for_mac/Foundation/GTMNSScanner+JSONTest.m", - "google_toolbox_for_mac/Foundation/GTMNSData+zlibTest.m", - "google_toolbox_for_mac/Foundation/GTMNSDictionary+URLArgumentsTest.m", - "google_toolbox_for_mac/Foundation/GTMLogger+ASL.m", - "google_toolbox_for_mac/Foundation/GTMServiceManagementTest.m", - "google_toolbox_for_mac/Foundation/GTMNSString+URLArguments.m", - "google_toolbox_for_mac/Foundation/GTMNSNumber+64Bit.m", - "google_toolbox_for_mac/Foundation/GTMNSScanner+JSON.m", - "google_toolbox_for_mac/Foundation/GTMGeometryUtils.m", - "google_toolbox_for_mac/Foundation/GTMRegex.m", - "google_toolbox_for_mac/Foundation/GTMScriptRunner.m", - "google_toolbox_for_mac/Foundation/GTMStackTrace.m", - "google_toolbox_for_mac/Foundation/GTMURLBuilder.m", - "google_toolbox_for_mac/Foundation/GTMNSString+FindFolderTest.m", - "google_toolbox_for_mac/Foundation/GTMObjC2Runtime.m", - "google_toolbox_for_mac/Foundation/GTMNSString+FindFolder.m", - "google_toolbox_for_mac/Foundation/GTMNSDictionary+URLArguments.m", - "google_toolbox_for_mac/Foundation/GTMStackTraceTest.m", - "google_toolbox_for_mac/Foundation/GTMLightweightProxyTest.m", - "google_toolbox_for_mac/Foundation/GTMNSFileManager+Path.m", - "google_toolbox_for_mac/Foundation/GTMStringEncodingTest.m", - "google_toolbox_for_mac/Foundation/GTMNSObject+KeyValueObserving.m", - "google_toolbox_for_mac/Foundation/GTMTimeUtils.m", - "google_toolbox_for_mac/Foundation/GTMSignalHandler.m", - "google_toolbox_for_mac/Foundation/GTMNSString+XML.m", - "google_toolbox_for_mac/Foundation/GTMLightweightProxy.m", - "google_toolbox_for_mac/AppKit", - "google_toolbox_for_mac/DebugUtils", - "google_toolbox_for_mac/LICENSE", - "google_toolbox_for_mac/WORKSPACE", - "google_toolbox_for_mac/BUILD", - "google_toolbox_for_mac/GTMiPhone-Info.plist", - "google_toolbox_for_mac/README.md", - "google_toolbox_for_mac/XcodeConfig", - "google_toolbox_for_mac/BuildingAndUsing.txt", - "google_toolbox_for_mac/GTM-Info.plist", - "google_toolbox_for_mac/GTMiPhone.xcodeproj", - "google_toolbox_for_mac/UnitTest-Info.plist", - "google_toolbox_for_mac/bazel_support", - "google_toolbox_for_mac/CONTRIBUTING.md", - "google_toolbox_for_mac/GTM.xcodeproj", - "google_toolbox_for_mac/GoogleToolboxForMac.podspec", - "google_toolbox_for_mac/UnitTesting", - "google_toolbox_for_mac/iPhone", + "google-toolbox-for-mac/Foundation/GTMNSString+HTMLTest.m", + "google-toolbox-for-mac/Foundation/GTMSystemVersionTest.m", + "google-toolbox-for-mac/Foundation/GTMNSFileHandle+UniqueName.m", + "google-toolbox-for-mac/Foundation/GTMLoggerRingBufferWriterTest.m", + "google-toolbox-for-mac/Foundation/GTMNSData+zlib.m", + "google-toolbox-for-mac/Foundation/GTMNSNumber+64BitTest.m", + "google-toolbox-for-mac/Foundation/GTMScriptRunnerTest.m", + "google-toolbox-for-mac/Foundation/GTMSystemVersion.m", + "google-toolbox-for-mac/Foundation/GTMFileSystemKQueueTest.m", + "google-toolbox-for-mac/Foundation/GTMFileSystemKQueue.m", + "google-toolbox-for-mac/Foundation/GTMGeometryUtilsTest.m", + "google-toolbox-for-mac/Foundation/GTMLocalizedStringTest.m", + "google-toolbox-for-mac/Foundation/BUILD", + "google-toolbox-for-mac/Foundation/GTMSQLite.m", + "google-toolbox-for-mac/Foundation/GTMLoggerRingBufferWriter.m", + "google-toolbox-for-mac/Foundation/GTMStringEncoding.m", + "google-toolbox-for-mac/Foundation/GTMNSFileHandle+UniqueNameTest.m", + "google-toolbox-for-mac/Foundation/GTMLogger+ASLTest.m", + "google-toolbox-for-mac/Foundation/GTMNSObject+KeyValueObservingTest.m", + "google-toolbox-for-mac/Foundation/GTMNSString+XMLTest.m", + "google-toolbox-for-mac/Foundation/GTMNSThread+BlocksTest.m", + "google-toolbox-for-mac/Foundation/GTMNSString+HTML.m", + "google-toolbox-for-mac/Foundation/GTMSignalHandlerTest.m", + "google-toolbox-for-mac/Foundation/GTMURLBuilderTest.m", + "google-toolbox-for-mac/Foundation/GTMLoggerTest.m", + "google-toolbox-for-mac/Foundation/GTMServiceManagementTestingHarness.c", + "google-toolbox-for-mac/Foundation/GTMSQLiteTest.m", + "google-toolbox-for-mac/Foundation/GTMTimeUtilsTest.m", + "google-toolbox-for-mac/Foundation/GTMNSFileManager+PathTest.m", + "google-toolbox-for-mac/Foundation/GTMServiceManagement.c", + "google-toolbox-for-mac/Foundation/GTMNSString+URLArgumentsTest.m", + "google-toolbox-for-mac/Foundation/GTMRegexTest.m", + "google-toolbox-for-mac/Foundation/GTMNSThread+Blocks.m", + "google-toolbox-for-mac/Foundation/GTMNSScanner+JSONTest.m", + "google-toolbox-for-mac/Foundation/GTMNSData+zlibTest.m", + "google-toolbox-for-mac/Foundation/GTMNSDictionary+URLArgumentsTest.m", + "google-toolbox-for-mac/Foundation/GTMLogger+ASL.m", + "google-toolbox-for-mac/Foundation/GTMServiceManagementTest.m", + "google-toolbox-for-mac/Foundation/GTMNSString+URLArguments.m", + "google-toolbox-for-mac/Foundation/GTMNSNumber+64Bit.m", + "google-toolbox-for-mac/Foundation/GTMNSScanner+JSON.m", + "google-toolbox-for-mac/Foundation/GTMGeometryUtils.m", + "google-toolbox-for-mac/Foundation/GTMRegex.m", + "google-toolbox-for-mac/Foundation/GTMScriptRunner.m", + "google-toolbox-for-mac/Foundation/GTMStackTrace.m", + "google-toolbox-for-mac/Foundation/GTMURLBuilder.m", + "google-toolbox-for-mac/Foundation/GTMNSString+FindFolderTest.m", + "google-toolbox-for-mac/Foundation/GTMObjC2Runtime.m", + "google-toolbox-for-mac/Foundation/GTMNSString+FindFolder.m", + "google-toolbox-for-mac/Foundation/GTMNSDictionary+URLArguments.m", + "google-toolbox-for-mac/Foundation/GTMStackTraceTest.m", + "google-toolbox-for-mac/Foundation/GTMLightweightProxyTest.m", + "google-toolbox-for-mac/Foundation/GTMNSFileManager+Path.m", + "google-toolbox-for-mac/Foundation/GTMStringEncodingTest.m", + "google-toolbox-for-mac/Foundation/GTMNSObject+KeyValueObserving.m", + "google-toolbox-for-mac/Foundation/GTMTimeUtils.m", + "google-toolbox-for-mac/Foundation/GTMSignalHandler.m", + "google-toolbox-for-mac/Foundation/GTMNSString+XML.m", + "google-toolbox-for-mac/Foundation/GTMLightweightProxy.m", + "google-toolbox-for-mac/AppKit", + "google-toolbox-for-mac/DebugUtils", + "google-toolbox-for-mac/LICENSE", + "google-toolbox-for-mac/WORKSPACE", + "google-toolbox-for-mac/BUILD", + "google-toolbox-for-mac/GTMiPhone-Info.plist", + "google-toolbox-for-mac/README.md", + "google-toolbox-for-mac/XcodeConfig", + "google-toolbox-for-mac/BuildingAndUsing.txt", + "google-toolbox-for-mac/GTM-Info.plist", + "google-toolbox-for-mac/GTMiPhone.xcodeproj", + "google-toolbox-for-mac/UnitTest-Info.plist", + "google-toolbox-for-mac/bazel_support", + "google-toolbox-for-mac/CONTRIBUTING.md", + "google-toolbox-for-mac/GTM.xcodeproj", + "google-toolbox-for-mac/GoogleToolboxForMac.podspec", + "google-toolbox-for-mac/UnitTesting", + "google-toolbox-for-mac/iPhone", ], sources: [ - "google_toolbox_for_mac/Foundation/GTMLogger.m" + "google-toolbox-for-mac/Foundation/GTMLogger.m" ], publicHeadersPath: "include", cSettings: [ - .headerSearchPath("google_toolbox_for_mac/"), + .headerSearchPath("google-toolbox-for-mac/"), .unsafeFlags(["-fno-objc-arc"]), ] ), @@ -361,7 +361,7 @@ let package = Package( .target( name: "NearbyConnections", dependencies: [ - "google_toolbox_for_mac", + "google-toolbox-for-mac", "smhasher", "ukey2", "protobuf", From 1f7ad3b55318e1b3aa3d5d8d0ac784893baf8420 Mon Sep 17 00:00:00 2001 From: deling-google <99381034+deling-google@users.noreply.github.com> Date: Thu, 31 Mar 2022 12:44:50 -0700 Subject: [PATCH 08/17] Add protos and headers --- .../proto/offline_wire_formats.pb.cc | 9857 +++++++++++++ .../proto/offline_wire_formats.pb.h | 11796 ++++++++++++++++ .../proto/analytics/connections_log.pb.cc | 7261 ++++++++++ internal/proto/analytics/connections_log.pb.h | 8625 +++++++++++ proto/connections_enums.pb.cc | 1348 ++ proto/connections_enums.pb.h | 542 + proto/errorcode/error_code_enums.pb.cc | 1601 +++ proto/errorcode/error_code_enums.pb.h | 569 + proto/mediums/ble_frames.pb.cc | 1271 ++ proto/mediums/ble_frames.pb.h | 1438 ++ proto/mediums/nfc_frames.pb.cc | 646 + proto/mediums/nfc_frames.pb.h | 802 ++ proto/mediums/web_rtc_signaling_frames.pb.cc | 2192 +++ proto/mediums/web_rtc_signaling_frames.pb.h | 2477 ++++ proto/sharing_enums.pb.cc | 1875 +++ proto/sharing_enums.pb.h | 739 + .../include/GTMDefines.h | 380 + .../include/GoogleToolboxForMac/GTMLogger.h | 526 + .../compiled_proto/proto/securemessage.pb.cc | 2773 ++++ .../compiled_proto/proto/securemessage.pb.h | 3069 ++++ .../include/securemessage/byte_buffer.h | 140 + .../include/securemessage/common.h | 26 + .../include/securemessage/crypto_ops.h | 503 + .../securemessage/proto/securemessage.pb.h | 3069 ++++ .../securemessage/public_key_proto_util.h | 68 + .../securemessage/raw_secure_message_parser.h | 90 + .../securemessage/secure_message_builder.h | 177 + .../securemessage/secure_message_parser.h | 99 + .../securemessage/secure_message_wrapper.h | 103 + .../include/securemessage/util.h | 60 + .../smhasher/include/src/MurmurHash3.h | 37 + .../proto/device_to_device_messages.pb.cc | 1586 +++ .../proto/device_to_device_messages.pb.h | 1776 +++ .../proto/passwordless_auth_payloads.pb.cc | 328 + .../proto/passwordless_auth_payloads.pb.h | 387 + .../proto/proximity_payloads.pb.cc | 716 + .../proto/proximity_payloads.pb.h | 882 ++ .../compiled_proto/proto/securegcm.pb.cc | 3021 ++++ .../ukey2/compiled_proto/proto/securegcm.pb.h | 3756 +++++ .../compiled_proto/proto/securemessage.pb.cc | 2773 ++++ .../compiled_proto/proto/securemessage.pb.h | 3069 ++++ .../ukey2/compiled_proto/proto/ukey.pb.cc | 1990 +++ .../ukey2/compiled_proto/proto/ukey.pb.h | 2085 +++ third_party/ukey2/include/proto/ukey.pb.h | 2085 +++ .../securegcm/d2d_connection_context_v1.h | 89 + .../ukey2/include/securegcm/d2d_crypto_ops.h | 78 + .../ukey2/include/securegcm/java_util.h | 57 + .../ukey2/include/securegcm/ukey2_handshake.h | 263 + 48 files changed, 89100 insertions(+) create mode 100644 connections/implementation/proto/offline_wire_formats.pb.cc create mode 100644 connections/implementation/proto/offline_wire_formats.pb.h create mode 100644 internal/proto/analytics/connections_log.pb.cc create mode 100644 internal/proto/analytics/connections_log.pb.h create mode 100644 proto/connections_enums.pb.cc create mode 100644 proto/connections_enums.pb.h create mode 100644 proto/errorcode/error_code_enums.pb.cc create mode 100644 proto/errorcode/error_code_enums.pb.h create mode 100644 proto/mediums/ble_frames.pb.cc create mode 100644 proto/mediums/ble_frames.pb.h create mode 100644 proto/mediums/nfc_frames.pb.cc create mode 100644 proto/mediums/nfc_frames.pb.h create mode 100644 proto/mediums/web_rtc_signaling_frames.pb.cc create mode 100644 proto/mediums/web_rtc_signaling_frames.pb.h create mode 100644 proto/sharing_enums.pb.cc create mode 100644 proto/sharing_enums.pb.h create mode 100644 third_party/google-toolbox-for-mac/include/GTMDefines.h create mode 100644 third_party/google-toolbox-for-mac/include/GoogleToolboxForMac/GTMLogger.h create mode 100644 third_party/securemessage/compiled_proto/proto/securemessage.pb.cc create mode 100644 third_party/securemessage/compiled_proto/proto/securemessage.pb.h create mode 100644 third_party/securemessage/include/securemessage/byte_buffer.h create mode 100644 third_party/securemessage/include/securemessage/common.h create mode 100644 third_party/securemessage/include/securemessage/crypto_ops.h create mode 100644 third_party/securemessage/include/securemessage/proto/securemessage.pb.h create mode 100644 third_party/securemessage/include/securemessage/public_key_proto_util.h create mode 100644 third_party/securemessage/include/securemessage/raw_secure_message_parser.h create mode 100644 third_party/securemessage/include/securemessage/secure_message_builder.h create mode 100644 third_party/securemessage/include/securemessage/secure_message_parser.h create mode 100644 third_party/securemessage/include/securemessage/secure_message_wrapper.h create mode 100644 third_party/securemessage/include/securemessage/util.h create mode 100644 third_party/smhasher/include/src/MurmurHash3.h create mode 100644 third_party/ukey2/compiled_proto/proto/device_to_device_messages.pb.cc create mode 100644 third_party/ukey2/compiled_proto/proto/device_to_device_messages.pb.h create mode 100644 third_party/ukey2/compiled_proto/proto/passwordless_auth_payloads.pb.cc create mode 100644 third_party/ukey2/compiled_proto/proto/passwordless_auth_payloads.pb.h create mode 100644 third_party/ukey2/compiled_proto/proto/proximity_payloads.pb.cc create mode 100644 third_party/ukey2/compiled_proto/proto/proximity_payloads.pb.h create mode 100644 third_party/ukey2/compiled_proto/proto/securegcm.pb.cc create mode 100644 third_party/ukey2/compiled_proto/proto/securegcm.pb.h create mode 100644 third_party/ukey2/compiled_proto/proto/securemessage.pb.cc create mode 100644 third_party/ukey2/compiled_proto/proto/securemessage.pb.h create mode 100644 third_party/ukey2/compiled_proto/proto/ukey.pb.cc create mode 100644 third_party/ukey2/compiled_proto/proto/ukey.pb.h create mode 100644 third_party/ukey2/include/proto/ukey.pb.h create mode 100644 third_party/ukey2/include/securegcm/d2d_connection_context_v1.h create mode 100644 third_party/ukey2/include/securegcm/d2d_crypto_ops.h create mode 100644 third_party/ukey2/include/securegcm/java_util.h create mode 100644 third_party/ukey2/include/securegcm/ukey2_handshake.h diff --git a/connections/implementation/proto/offline_wire_formats.pb.cc b/connections/implementation/proto/offline_wire_formats.pb.cc new file mode 100644 index 00000000..694c1c92 --- /dev/null +++ b/connections/implementation/proto/offline_wire_formats.pb.cc @@ -0,0 +1,9857 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: connections/implementation/proto/offline_wire_formats.proto + +#include "connections/implementation/proto/offline_wire_formats.pb.h" + +#include + +#include +#include +#include +#include +// @@protoc_insertion_point(includes) +#include + +PROTOBUF_PRAGMA_INIT_SEG +namespace location { +namespace nearby { +namespace connections { +constexpr OfflineFrame::OfflineFrame( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : v1_(nullptr) + , version_(0) +{} +struct OfflineFrameDefaultTypeInternal { + constexpr OfflineFrameDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~OfflineFrameDefaultTypeInternal() {} + union { + OfflineFrame _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OfflineFrameDefaultTypeInternal _OfflineFrame_default_instance_; +constexpr V1Frame::V1Frame( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : connection_request_(nullptr) + , connection_response_(nullptr) + , payload_transfer_(nullptr) + , bandwidth_upgrade_negotiation_(nullptr) + , keep_alive_(nullptr) + , disconnection_(nullptr) + , paired_key_encryption_(nullptr) + , type_(0) +{} +struct V1FrameDefaultTypeInternal { + constexpr V1FrameDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~V1FrameDefaultTypeInternal() {} + union { + V1Frame _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT V1FrameDefaultTypeInternal _V1Frame_default_instance_; +constexpr ConnectionRequestFrame::ConnectionRequestFrame( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : mediums_() + , endpoint_id_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , endpoint_name_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , handshake_data_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , endpoint_info_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , device_info_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , medium_metadata_(nullptr) + , nonce_(0) + , keep_alive_interval_millis_(0) + , keep_alive_timeout_millis_(0) + , device_type_(0){} +struct ConnectionRequestFrameDefaultTypeInternal { + constexpr ConnectionRequestFrameDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~ConnectionRequestFrameDefaultTypeInternal() {} + union { + ConnectionRequestFrame _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ConnectionRequestFrameDefaultTypeInternal _ConnectionRequestFrame_default_instance_; +constexpr ConnectionResponseFrame::ConnectionResponseFrame( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : handshake_data_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , status_(0) + , response_(0) +{} +struct ConnectionResponseFrameDefaultTypeInternal { + constexpr ConnectionResponseFrameDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~ConnectionResponseFrameDefaultTypeInternal() {} + union { + ConnectionResponseFrame _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ConnectionResponseFrameDefaultTypeInternal _ConnectionResponseFrame_default_instance_; +constexpr PayloadTransferFrame_PayloadHeader::PayloadTransferFrame_PayloadHeader( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : file_name_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , parent_folder_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , id_(int64_t{0}) + , total_size_(int64_t{0}) + , type_(0) + + , is_sensitive_(false){} +struct PayloadTransferFrame_PayloadHeaderDefaultTypeInternal { + constexpr PayloadTransferFrame_PayloadHeaderDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~PayloadTransferFrame_PayloadHeaderDefaultTypeInternal() {} + union { + PayloadTransferFrame_PayloadHeader _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PayloadTransferFrame_PayloadHeaderDefaultTypeInternal _PayloadTransferFrame_PayloadHeader_default_instance_; +constexpr PayloadTransferFrame_PayloadChunk::PayloadTransferFrame_PayloadChunk( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : body_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , offset_(int64_t{0}) + , flags_(0){} +struct PayloadTransferFrame_PayloadChunkDefaultTypeInternal { + constexpr PayloadTransferFrame_PayloadChunkDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~PayloadTransferFrame_PayloadChunkDefaultTypeInternal() {} + union { + PayloadTransferFrame_PayloadChunk _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PayloadTransferFrame_PayloadChunkDefaultTypeInternal _PayloadTransferFrame_PayloadChunk_default_instance_; +constexpr PayloadTransferFrame_ControlMessage::PayloadTransferFrame_ControlMessage( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : offset_(int64_t{0}) + , event_(0) +{} +struct PayloadTransferFrame_ControlMessageDefaultTypeInternal { + constexpr PayloadTransferFrame_ControlMessageDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~PayloadTransferFrame_ControlMessageDefaultTypeInternal() {} + union { + PayloadTransferFrame_ControlMessage _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PayloadTransferFrame_ControlMessageDefaultTypeInternal _PayloadTransferFrame_ControlMessage_default_instance_; +constexpr PayloadTransferFrame::PayloadTransferFrame( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : payload_header_(nullptr) + , payload_chunk_(nullptr) + , control_message_(nullptr) + , packet_type_(0) +{} +struct PayloadTransferFrameDefaultTypeInternal { + constexpr PayloadTransferFrameDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~PayloadTransferFrameDefaultTypeInternal() {} + union { + PayloadTransferFrame _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PayloadTransferFrameDefaultTypeInternal _PayloadTransferFrame_default_instance_; +constexpr BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : ssid_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , password_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , gateway_(nullptr) + , port_(0) + , frequency_(-1){} +struct BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentialsDefaultTypeInternal { + constexpr BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentialsDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentialsDefaultTypeInternal() {} + union { + BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentialsDefaultTypeInternal _BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials_default_instance_; +constexpr BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : ip_address_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , wifi_port_(0){} +struct BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocketDefaultTypeInternal { + constexpr BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocketDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocketDefaultTypeInternal() {} + union { + BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocketDefaultTypeInternal _BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket_default_instance_; +constexpr BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : service_name_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , mac_address_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){} +struct BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentialsDefaultTypeInternal { + constexpr BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentialsDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentialsDefaultTypeInternal() {} + union { + BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentialsDefaultTypeInternal _BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials_default_instance_; +constexpr BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : service_id_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , service_info_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , password_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){} +struct BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentialsDefaultTypeInternal { + constexpr BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentialsDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentialsDefaultTypeInternal() {} + union { + BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentialsDefaultTypeInternal _BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials_default_instance_; +constexpr BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : ssid_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , password_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , port_(0) + , frequency_(0){} +struct BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentialsDefaultTypeInternal { + constexpr BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentialsDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentialsDefaultTypeInternal() {} + union { + BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentialsDefaultTypeInternal _BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials_default_instance_; +constexpr BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : peer_id_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , location_hint_(nullptr){} +struct BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentialsDefaultTypeInternal { + constexpr BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentialsDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentialsDefaultTypeInternal() {} + union { + BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentialsDefaultTypeInternal _BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials_default_instance_; +constexpr BandwidthUpgradeNegotiationFrame_UpgradePathInfo::BandwidthUpgradeNegotiationFrame_UpgradePathInfo( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : wifi_hotspot_credentials_(nullptr) + , wifi_lan_socket_(nullptr) + , bluetooth_credentials_(nullptr) + , wifi_aware_credentials_(nullptr) + , wifi_direct_credentials_(nullptr) + , web_rtc_credentials_(nullptr) + , medium_(0) + + , supports_disabling_encryption_(false) + , supports_client_introduction_ack_(false){} +struct BandwidthUpgradeNegotiationFrame_UpgradePathInfoDefaultTypeInternal { + constexpr BandwidthUpgradeNegotiationFrame_UpgradePathInfoDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~BandwidthUpgradeNegotiationFrame_UpgradePathInfoDefaultTypeInternal() {} + union { + BandwidthUpgradeNegotiationFrame_UpgradePathInfo _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT BandwidthUpgradeNegotiationFrame_UpgradePathInfoDefaultTypeInternal _BandwidthUpgradeNegotiationFrame_UpgradePathInfo_default_instance_; +constexpr BandwidthUpgradeNegotiationFrame_ClientIntroduction::BandwidthUpgradeNegotiationFrame_ClientIntroduction( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : endpoint_id_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , supports_disabling_encryption_(false){} +struct BandwidthUpgradeNegotiationFrame_ClientIntroductionDefaultTypeInternal { + constexpr BandwidthUpgradeNegotiationFrame_ClientIntroductionDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~BandwidthUpgradeNegotiationFrame_ClientIntroductionDefaultTypeInternal() {} + union { + BandwidthUpgradeNegotiationFrame_ClientIntroduction _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT BandwidthUpgradeNegotiationFrame_ClientIntroductionDefaultTypeInternal _BandwidthUpgradeNegotiationFrame_ClientIntroduction_default_instance_; +constexpr BandwidthUpgradeNegotiationFrame_ClientIntroductionAck::BandwidthUpgradeNegotiationFrame_ClientIntroductionAck( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized){} +struct BandwidthUpgradeNegotiationFrame_ClientIntroductionAckDefaultTypeInternal { + constexpr BandwidthUpgradeNegotiationFrame_ClientIntroductionAckDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~BandwidthUpgradeNegotiationFrame_ClientIntroductionAckDefaultTypeInternal() {} + union { + BandwidthUpgradeNegotiationFrame_ClientIntroductionAck _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT BandwidthUpgradeNegotiationFrame_ClientIntroductionAckDefaultTypeInternal _BandwidthUpgradeNegotiationFrame_ClientIntroductionAck_default_instance_; +constexpr BandwidthUpgradeNegotiationFrame::BandwidthUpgradeNegotiationFrame( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : upgrade_path_info_(nullptr) + , client_introduction_(nullptr) + , client_introduction_ack_(nullptr) + , event_type_(0) +{} +struct BandwidthUpgradeNegotiationFrameDefaultTypeInternal { + constexpr BandwidthUpgradeNegotiationFrameDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~BandwidthUpgradeNegotiationFrameDefaultTypeInternal() {} + union { + BandwidthUpgradeNegotiationFrame _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT BandwidthUpgradeNegotiationFrameDefaultTypeInternal _BandwidthUpgradeNegotiationFrame_default_instance_; +constexpr KeepAliveFrame::KeepAliveFrame( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : ack_(false){} +struct KeepAliveFrameDefaultTypeInternal { + constexpr KeepAliveFrameDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~KeepAliveFrameDefaultTypeInternal() {} + union { + KeepAliveFrame _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT KeepAliveFrameDefaultTypeInternal _KeepAliveFrame_default_instance_; +constexpr DisconnectionFrame::DisconnectionFrame( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized){} +struct DisconnectionFrameDefaultTypeInternal { + constexpr DisconnectionFrameDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~DisconnectionFrameDefaultTypeInternal() {} + union { + DisconnectionFrame _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT DisconnectionFrameDefaultTypeInternal _DisconnectionFrame_default_instance_; +constexpr PairedKeyEncryptionFrame::PairedKeyEncryptionFrame( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : signed_data_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){} +struct PairedKeyEncryptionFrameDefaultTypeInternal { + constexpr PairedKeyEncryptionFrameDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~PairedKeyEncryptionFrameDefaultTypeInternal() {} + union { + PairedKeyEncryptionFrame _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PairedKeyEncryptionFrameDefaultTypeInternal _PairedKeyEncryptionFrame_default_instance_; +constexpr MediumMetadata::MediumMetadata( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : bssid_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , ip_address_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , available_channels_(nullptr) + , wifi_direct_cli_usable_channels_(nullptr) + , wifi_lan_usable_channels_(nullptr) + , wifi_aware_usable_channels_(nullptr) + , wifi_hotspot_sta_usable_channels_(nullptr) + , supports_5_ghz_(false) + , supports_6_ghz_(false) + , mobile_radio_(false) + , ap_frequency_(-1){} +struct MediumMetadataDefaultTypeInternal { + constexpr MediumMetadataDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~MediumMetadataDefaultTypeInternal() {} + union { + MediumMetadata _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT MediumMetadataDefaultTypeInternal _MediumMetadata_default_instance_; +constexpr AvailableChannels::AvailableChannels( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : channels_() + , _channels_cached_byte_size_(0){} +struct AvailableChannelsDefaultTypeInternal { + constexpr AvailableChannelsDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~AvailableChannelsDefaultTypeInternal() {} + union { + AvailableChannels _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT AvailableChannelsDefaultTypeInternal _AvailableChannels_default_instance_; +constexpr WifiDirectCliUsableChannels::WifiDirectCliUsableChannels( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : channels_() + , _channels_cached_byte_size_(0){} +struct WifiDirectCliUsableChannelsDefaultTypeInternal { + constexpr WifiDirectCliUsableChannelsDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~WifiDirectCliUsableChannelsDefaultTypeInternal() {} + union { + WifiDirectCliUsableChannels _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT WifiDirectCliUsableChannelsDefaultTypeInternal _WifiDirectCliUsableChannels_default_instance_; +constexpr WifiLanUsableChannels::WifiLanUsableChannels( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : channels_() + , _channels_cached_byte_size_(0){} +struct WifiLanUsableChannelsDefaultTypeInternal { + constexpr WifiLanUsableChannelsDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~WifiLanUsableChannelsDefaultTypeInternal() {} + union { + WifiLanUsableChannels _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT WifiLanUsableChannelsDefaultTypeInternal _WifiLanUsableChannels_default_instance_; +constexpr WifiAwareUsableChannels::WifiAwareUsableChannels( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : channels_() + , _channels_cached_byte_size_(0){} +struct WifiAwareUsableChannelsDefaultTypeInternal { + constexpr WifiAwareUsableChannelsDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~WifiAwareUsableChannelsDefaultTypeInternal() {} + union { + WifiAwareUsableChannels _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT WifiAwareUsableChannelsDefaultTypeInternal _WifiAwareUsableChannels_default_instance_; +constexpr WifiHotspotStaUsableChannels::WifiHotspotStaUsableChannels( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : channels_() + , _channels_cached_byte_size_(0){} +struct WifiHotspotStaUsableChannelsDefaultTypeInternal { + constexpr WifiHotspotStaUsableChannelsDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~WifiHotspotStaUsableChannelsDefaultTypeInternal() {} + union { + WifiHotspotStaUsableChannels _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT WifiHotspotStaUsableChannelsDefaultTypeInternal _WifiHotspotStaUsableChannels_default_instance_; +constexpr LocationHint::LocationHint( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : location_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , format_(0) +{} +struct LocationHintDefaultTypeInternal { + constexpr LocationHintDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~LocationHintDefaultTypeInternal() {} + union { + LocationHint _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT LocationHintDefaultTypeInternal _LocationHint_default_instance_; +constexpr LocationStandard::LocationStandard( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized){} +struct LocationStandardDefaultTypeInternal { + constexpr LocationStandardDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~LocationStandardDefaultTypeInternal() {} + union { + LocationStandard _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT LocationStandardDefaultTypeInternal _LocationStandard_default_instance_; +} // namespace connections +} // namespace nearby +} // namespace location +namespace location { +namespace nearby { +namespace connections { +bool OfflineFrame_Version_IsValid(int value) { + switch (value) { + case 0: + case 1: + return true; + default: + return false; + } +} + +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed OfflineFrame_Version_strings[2] = {}; + +static const char OfflineFrame_Version_names[] = + "UNKNOWN_VERSION" + "V1"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry OfflineFrame_Version_entries[] = { + { {OfflineFrame_Version_names + 0, 15}, 0 }, + { {OfflineFrame_Version_names + 15, 2}, 1 }, +}; + +static const int OfflineFrame_Version_entries_by_number[] = { + 0, // 0 -> UNKNOWN_VERSION + 1, // 1 -> V1 +}; + +const std::string& OfflineFrame_Version_Name( + OfflineFrame_Version value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + OfflineFrame_Version_entries, + OfflineFrame_Version_entries_by_number, + 2, OfflineFrame_Version_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + OfflineFrame_Version_entries, + OfflineFrame_Version_entries_by_number, + 2, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + OfflineFrame_Version_strings[idx].get(); +} +bool OfflineFrame_Version_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, OfflineFrame_Version* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + OfflineFrame_Version_entries, 2, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} +#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) +constexpr OfflineFrame_Version OfflineFrame::UNKNOWN_VERSION; +constexpr OfflineFrame_Version OfflineFrame::V1; +constexpr OfflineFrame_Version OfflineFrame::Version_MIN; +constexpr OfflineFrame_Version OfflineFrame::Version_MAX; +constexpr int OfflineFrame::Version_ARRAYSIZE; +#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) +bool V1Frame_FrameType_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + return true; + default: + return false; + } +} + +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed V1Frame_FrameType_strings[8] = {}; + +static const char V1Frame_FrameType_names[] = + "BANDWIDTH_UPGRADE_NEGOTIATION" + "CONNECTION_REQUEST" + "CONNECTION_RESPONSE" + "DISCONNECTION" + "KEEP_ALIVE" + "PAIRED_KEY_ENCRYPTION" + "PAYLOAD_TRANSFER" + "UNKNOWN_FRAME_TYPE"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry V1Frame_FrameType_entries[] = { + { {V1Frame_FrameType_names + 0, 29}, 4 }, + { {V1Frame_FrameType_names + 29, 18}, 1 }, + { {V1Frame_FrameType_names + 47, 19}, 2 }, + { {V1Frame_FrameType_names + 66, 13}, 6 }, + { {V1Frame_FrameType_names + 79, 10}, 5 }, + { {V1Frame_FrameType_names + 89, 21}, 7 }, + { {V1Frame_FrameType_names + 110, 16}, 3 }, + { {V1Frame_FrameType_names + 126, 18}, 0 }, +}; + +static const int V1Frame_FrameType_entries_by_number[] = { + 7, // 0 -> UNKNOWN_FRAME_TYPE + 1, // 1 -> CONNECTION_REQUEST + 2, // 2 -> CONNECTION_RESPONSE + 6, // 3 -> PAYLOAD_TRANSFER + 0, // 4 -> BANDWIDTH_UPGRADE_NEGOTIATION + 4, // 5 -> KEEP_ALIVE + 3, // 6 -> DISCONNECTION + 5, // 7 -> PAIRED_KEY_ENCRYPTION +}; + +const std::string& V1Frame_FrameType_Name( + V1Frame_FrameType value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + V1Frame_FrameType_entries, + V1Frame_FrameType_entries_by_number, + 8, V1Frame_FrameType_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + V1Frame_FrameType_entries, + V1Frame_FrameType_entries_by_number, + 8, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + V1Frame_FrameType_strings[idx].get(); +} +bool V1Frame_FrameType_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, V1Frame_FrameType* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + V1Frame_FrameType_entries, 8, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} +#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) +constexpr V1Frame_FrameType V1Frame::UNKNOWN_FRAME_TYPE; +constexpr V1Frame_FrameType V1Frame::CONNECTION_REQUEST; +constexpr V1Frame_FrameType V1Frame::CONNECTION_RESPONSE; +constexpr V1Frame_FrameType V1Frame::PAYLOAD_TRANSFER; +constexpr V1Frame_FrameType V1Frame::BANDWIDTH_UPGRADE_NEGOTIATION; +constexpr V1Frame_FrameType V1Frame::KEEP_ALIVE; +constexpr V1Frame_FrameType V1Frame::DISCONNECTION; +constexpr V1Frame_FrameType V1Frame::PAIRED_KEY_ENCRYPTION; +constexpr V1Frame_FrameType V1Frame::FrameType_MIN; +constexpr V1Frame_FrameType V1Frame::FrameType_MAX; +constexpr int V1Frame::FrameType_ARRAYSIZE; +#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) +bool ConnectionRequestFrame_Medium_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: + return true; + default: + return false; + } +} + +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed ConnectionRequestFrame_Medium_strings[11] = {}; + +static const char ConnectionRequestFrame_Medium_names[] = + "BLE" + "BLE_L2CAP" + "BLUETOOTH" + "MDNS" + "NFC" + "UNKNOWN_MEDIUM" + "WEB_RTC" + "WIFI_AWARE" + "WIFI_DIRECT" + "WIFI_HOTSPOT" + "WIFI_LAN"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry ConnectionRequestFrame_Medium_entries[] = { + { {ConnectionRequestFrame_Medium_names + 0, 3}, 4 }, + { {ConnectionRequestFrame_Medium_names + 3, 9}, 10 }, + { {ConnectionRequestFrame_Medium_names + 12, 9}, 2 }, + { {ConnectionRequestFrame_Medium_names + 21, 4}, 1 }, + { {ConnectionRequestFrame_Medium_names + 25, 3}, 7 }, + { {ConnectionRequestFrame_Medium_names + 28, 14}, 0 }, + { {ConnectionRequestFrame_Medium_names + 42, 7}, 9 }, + { {ConnectionRequestFrame_Medium_names + 49, 10}, 6 }, + { {ConnectionRequestFrame_Medium_names + 59, 11}, 8 }, + { {ConnectionRequestFrame_Medium_names + 70, 12}, 3 }, + { {ConnectionRequestFrame_Medium_names + 82, 8}, 5 }, +}; + +static const int ConnectionRequestFrame_Medium_entries_by_number[] = { + 5, // 0 -> UNKNOWN_MEDIUM + 3, // 1 -> MDNS + 2, // 2 -> BLUETOOTH + 9, // 3 -> WIFI_HOTSPOT + 0, // 4 -> BLE + 10, // 5 -> WIFI_LAN + 7, // 6 -> WIFI_AWARE + 4, // 7 -> NFC + 8, // 8 -> WIFI_DIRECT + 6, // 9 -> WEB_RTC + 1, // 10 -> BLE_L2CAP +}; + +const std::string& ConnectionRequestFrame_Medium_Name( + ConnectionRequestFrame_Medium value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + ConnectionRequestFrame_Medium_entries, + ConnectionRequestFrame_Medium_entries_by_number, + 11, ConnectionRequestFrame_Medium_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + ConnectionRequestFrame_Medium_entries, + ConnectionRequestFrame_Medium_entries_by_number, + 11, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + ConnectionRequestFrame_Medium_strings[idx].get(); +} +bool ConnectionRequestFrame_Medium_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, ConnectionRequestFrame_Medium* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + ConnectionRequestFrame_Medium_entries, 11, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} +#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) +constexpr ConnectionRequestFrame_Medium ConnectionRequestFrame::UNKNOWN_MEDIUM; +constexpr ConnectionRequestFrame_Medium ConnectionRequestFrame::MDNS; +constexpr ConnectionRequestFrame_Medium ConnectionRequestFrame::BLUETOOTH; +constexpr ConnectionRequestFrame_Medium ConnectionRequestFrame::WIFI_HOTSPOT; +constexpr ConnectionRequestFrame_Medium ConnectionRequestFrame::BLE; +constexpr ConnectionRequestFrame_Medium ConnectionRequestFrame::WIFI_LAN; +constexpr ConnectionRequestFrame_Medium ConnectionRequestFrame::WIFI_AWARE; +constexpr ConnectionRequestFrame_Medium ConnectionRequestFrame::NFC; +constexpr ConnectionRequestFrame_Medium ConnectionRequestFrame::WIFI_DIRECT; +constexpr ConnectionRequestFrame_Medium ConnectionRequestFrame::WEB_RTC; +constexpr ConnectionRequestFrame_Medium ConnectionRequestFrame::BLE_L2CAP; +constexpr ConnectionRequestFrame_Medium ConnectionRequestFrame::Medium_MIN; +constexpr ConnectionRequestFrame_Medium ConnectionRequestFrame::Medium_MAX; +constexpr int ConnectionRequestFrame::Medium_ARRAYSIZE; +#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) +bool ConnectionResponseFrame_ResponseStatus_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + return true; + default: + return false; + } +} + +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed ConnectionResponseFrame_ResponseStatus_strings[3] = {}; + +static const char ConnectionResponseFrame_ResponseStatus_names[] = + "ACCEPT" + "REJECT" + "UNKNOWN_RESPONSE_STATUS"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry ConnectionResponseFrame_ResponseStatus_entries[] = { + { {ConnectionResponseFrame_ResponseStatus_names + 0, 6}, 1 }, + { {ConnectionResponseFrame_ResponseStatus_names + 6, 6}, 2 }, + { {ConnectionResponseFrame_ResponseStatus_names + 12, 23}, 0 }, +}; + +static const int ConnectionResponseFrame_ResponseStatus_entries_by_number[] = { + 2, // 0 -> UNKNOWN_RESPONSE_STATUS + 0, // 1 -> ACCEPT + 1, // 2 -> REJECT +}; + +const std::string& ConnectionResponseFrame_ResponseStatus_Name( + ConnectionResponseFrame_ResponseStatus value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + ConnectionResponseFrame_ResponseStatus_entries, + ConnectionResponseFrame_ResponseStatus_entries_by_number, + 3, ConnectionResponseFrame_ResponseStatus_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + ConnectionResponseFrame_ResponseStatus_entries, + ConnectionResponseFrame_ResponseStatus_entries_by_number, + 3, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + ConnectionResponseFrame_ResponseStatus_strings[idx].get(); +} +bool ConnectionResponseFrame_ResponseStatus_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, ConnectionResponseFrame_ResponseStatus* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + ConnectionResponseFrame_ResponseStatus_entries, 3, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} +#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) +constexpr ConnectionResponseFrame_ResponseStatus ConnectionResponseFrame::UNKNOWN_RESPONSE_STATUS; +constexpr ConnectionResponseFrame_ResponseStatus ConnectionResponseFrame::ACCEPT; +constexpr ConnectionResponseFrame_ResponseStatus ConnectionResponseFrame::REJECT; +constexpr ConnectionResponseFrame_ResponseStatus ConnectionResponseFrame::ResponseStatus_MIN; +constexpr ConnectionResponseFrame_ResponseStatus ConnectionResponseFrame::ResponseStatus_MAX; +constexpr int ConnectionResponseFrame::ResponseStatus_ARRAYSIZE; +#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) +bool PayloadTransferFrame_PayloadHeader_PayloadType_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + case 3: + return true; + default: + return false; + } +} + +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed PayloadTransferFrame_PayloadHeader_PayloadType_strings[4] = {}; + +static const char PayloadTransferFrame_PayloadHeader_PayloadType_names[] = + "BYTES" + "FILE" + "STREAM" + "UNKNOWN_PAYLOAD_TYPE"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry PayloadTransferFrame_PayloadHeader_PayloadType_entries[] = { + { {PayloadTransferFrame_PayloadHeader_PayloadType_names + 0, 5}, 1 }, + { {PayloadTransferFrame_PayloadHeader_PayloadType_names + 5, 4}, 2 }, + { {PayloadTransferFrame_PayloadHeader_PayloadType_names + 9, 6}, 3 }, + { {PayloadTransferFrame_PayloadHeader_PayloadType_names + 15, 20}, 0 }, +}; + +static const int PayloadTransferFrame_PayloadHeader_PayloadType_entries_by_number[] = { + 3, // 0 -> UNKNOWN_PAYLOAD_TYPE + 0, // 1 -> BYTES + 1, // 2 -> FILE + 2, // 3 -> STREAM +}; + +const std::string& PayloadTransferFrame_PayloadHeader_PayloadType_Name( + PayloadTransferFrame_PayloadHeader_PayloadType value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + PayloadTransferFrame_PayloadHeader_PayloadType_entries, + PayloadTransferFrame_PayloadHeader_PayloadType_entries_by_number, + 4, PayloadTransferFrame_PayloadHeader_PayloadType_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + PayloadTransferFrame_PayloadHeader_PayloadType_entries, + PayloadTransferFrame_PayloadHeader_PayloadType_entries_by_number, + 4, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + PayloadTransferFrame_PayloadHeader_PayloadType_strings[idx].get(); +} +bool PayloadTransferFrame_PayloadHeader_PayloadType_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, PayloadTransferFrame_PayloadHeader_PayloadType* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + PayloadTransferFrame_PayloadHeader_PayloadType_entries, 4, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} +#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) +constexpr PayloadTransferFrame_PayloadHeader_PayloadType PayloadTransferFrame_PayloadHeader::UNKNOWN_PAYLOAD_TYPE; +constexpr PayloadTransferFrame_PayloadHeader_PayloadType PayloadTransferFrame_PayloadHeader::BYTES; +constexpr PayloadTransferFrame_PayloadHeader_PayloadType PayloadTransferFrame_PayloadHeader::FILE; +constexpr PayloadTransferFrame_PayloadHeader_PayloadType PayloadTransferFrame_PayloadHeader::STREAM; +constexpr PayloadTransferFrame_PayloadHeader_PayloadType PayloadTransferFrame_PayloadHeader::PayloadType_MIN; +constexpr PayloadTransferFrame_PayloadHeader_PayloadType PayloadTransferFrame_PayloadHeader::PayloadType_MAX; +constexpr int PayloadTransferFrame_PayloadHeader::PayloadType_ARRAYSIZE; +#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) +bool PayloadTransferFrame_PayloadChunk_Flags_IsValid(int value) { + switch (value) { + case 1: + return true; + default: + return false; + } +} + +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed PayloadTransferFrame_PayloadChunk_Flags_strings[1] = {}; + +static const char PayloadTransferFrame_PayloadChunk_Flags_names[] = + "LAST_CHUNK"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry PayloadTransferFrame_PayloadChunk_Flags_entries[] = { + { {PayloadTransferFrame_PayloadChunk_Flags_names + 0, 10}, 1 }, +}; + +static const int PayloadTransferFrame_PayloadChunk_Flags_entries_by_number[] = { + 0, // 1 -> LAST_CHUNK +}; + +const std::string& PayloadTransferFrame_PayloadChunk_Flags_Name( + PayloadTransferFrame_PayloadChunk_Flags value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + PayloadTransferFrame_PayloadChunk_Flags_entries, + PayloadTransferFrame_PayloadChunk_Flags_entries_by_number, + 1, PayloadTransferFrame_PayloadChunk_Flags_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + PayloadTransferFrame_PayloadChunk_Flags_entries, + PayloadTransferFrame_PayloadChunk_Flags_entries_by_number, + 1, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + PayloadTransferFrame_PayloadChunk_Flags_strings[idx].get(); +} +bool PayloadTransferFrame_PayloadChunk_Flags_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, PayloadTransferFrame_PayloadChunk_Flags* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + PayloadTransferFrame_PayloadChunk_Flags_entries, 1, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} +#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) +constexpr PayloadTransferFrame_PayloadChunk_Flags PayloadTransferFrame_PayloadChunk::LAST_CHUNK; +constexpr PayloadTransferFrame_PayloadChunk_Flags PayloadTransferFrame_PayloadChunk::Flags_MIN; +constexpr PayloadTransferFrame_PayloadChunk_Flags PayloadTransferFrame_PayloadChunk::Flags_MAX; +constexpr int PayloadTransferFrame_PayloadChunk::Flags_ARRAYSIZE; +#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) +bool PayloadTransferFrame_ControlMessage_EventType_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + return true; + default: + return false; + } +} + +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed PayloadTransferFrame_ControlMessage_EventType_strings[3] = {}; + +static const char PayloadTransferFrame_ControlMessage_EventType_names[] = + "PAYLOAD_CANCELED" + "PAYLOAD_ERROR" + "UNKNOWN_EVENT_TYPE"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry PayloadTransferFrame_ControlMessage_EventType_entries[] = { + { {PayloadTransferFrame_ControlMessage_EventType_names + 0, 16}, 2 }, + { {PayloadTransferFrame_ControlMessage_EventType_names + 16, 13}, 1 }, + { {PayloadTransferFrame_ControlMessage_EventType_names + 29, 18}, 0 }, +}; + +static const int PayloadTransferFrame_ControlMessage_EventType_entries_by_number[] = { + 2, // 0 -> UNKNOWN_EVENT_TYPE + 1, // 1 -> PAYLOAD_ERROR + 0, // 2 -> PAYLOAD_CANCELED +}; + +const std::string& PayloadTransferFrame_ControlMessage_EventType_Name( + PayloadTransferFrame_ControlMessage_EventType value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + PayloadTransferFrame_ControlMessage_EventType_entries, + PayloadTransferFrame_ControlMessage_EventType_entries_by_number, + 3, PayloadTransferFrame_ControlMessage_EventType_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + PayloadTransferFrame_ControlMessage_EventType_entries, + PayloadTransferFrame_ControlMessage_EventType_entries_by_number, + 3, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + PayloadTransferFrame_ControlMessage_EventType_strings[idx].get(); +} +bool PayloadTransferFrame_ControlMessage_EventType_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, PayloadTransferFrame_ControlMessage_EventType* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + PayloadTransferFrame_ControlMessage_EventType_entries, 3, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} +#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) +constexpr PayloadTransferFrame_ControlMessage_EventType PayloadTransferFrame_ControlMessage::UNKNOWN_EVENT_TYPE; +constexpr PayloadTransferFrame_ControlMessage_EventType PayloadTransferFrame_ControlMessage::PAYLOAD_ERROR; +constexpr PayloadTransferFrame_ControlMessage_EventType PayloadTransferFrame_ControlMessage::PAYLOAD_CANCELED; +constexpr PayloadTransferFrame_ControlMessage_EventType PayloadTransferFrame_ControlMessage::EventType_MIN; +constexpr PayloadTransferFrame_ControlMessage_EventType PayloadTransferFrame_ControlMessage::EventType_MAX; +constexpr int PayloadTransferFrame_ControlMessage::EventType_ARRAYSIZE; +#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) +bool PayloadTransferFrame_PacketType_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + return true; + default: + return false; + } +} + +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed PayloadTransferFrame_PacketType_strings[3] = {}; + +static const char PayloadTransferFrame_PacketType_names[] = + "CONTROL" + "DATA" + "UNKNOWN_PACKET_TYPE"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry PayloadTransferFrame_PacketType_entries[] = { + { {PayloadTransferFrame_PacketType_names + 0, 7}, 2 }, + { {PayloadTransferFrame_PacketType_names + 7, 4}, 1 }, + { {PayloadTransferFrame_PacketType_names + 11, 19}, 0 }, +}; + +static const int PayloadTransferFrame_PacketType_entries_by_number[] = { + 2, // 0 -> UNKNOWN_PACKET_TYPE + 1, // 1 -> DATA + 0, // 2 -> CONTROL +}; + +const std::string& PayloadTransferFrame_PacketType_Name( + PayloadTransferFrame_PacketType value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + PayloadTransferFrame_PacketType_entries, + PayloadTransferFrame_PacketType_entries_by_number, + 3, PayloadTransferFrame_PacketType_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + PayloadTransferFrame_PacketType_entries, + PayloadTransferFrame_PacketType_entries_by_number, + 3, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + PayloadTransferFrame_PacketType_strings[idx].get(); +} +bool PayloadTransferFrame_PacketType_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, PayloadTransferFrame_PacketType* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + PayloadTransferFrame_PacketType_entries, 3, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} +#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) +constexpr PayloadTransferFrame_PacketType PayloadTransferFrame::UNKNOWN_PACKET_TYPE; +constexpr PayloadTransferFrame_PacketType PayloadTransferFrame::DATA; +constexpr PayloadTransferFrame_PacketType PayloadTransferFrame::CONTROL; +constexpr PayloadTransferFrame_PacketType PayloadTransferFrame::PacketType_MIN; +constexpr PayloadTransferFrame_PacketType PayloadTransferFrame::PacketType_MAX; +constexpr int PayloadTransferFrame::PacketType_ARRAYSIZE; +#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) +bool BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium_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: + return true; + default: + return false; + } +} + +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium_strings[10] = {}; + +static const char BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium_names[] = + "BLE" + "BLUETOOTH" + "MDNS" + "NFC" + "UNKNOWN_MEDIUM" + "WEB_RTC" + "WIFI_AWARE" + "WIFI_DIRECT" + "WIFI_HOTSPOT" + "WIFI_LAN"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium_entries[] = { + { {BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium_names + 0, 3}, 4 }, + { {BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium_names + 3, 9}, 2 }, + { {BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium_names + 12, 4}, 1 }, + { {BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium_names + 16, 3}, 7 }, + { {BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium_names + 19, 14}, 0 }, + { {BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium_names + 33, 7}, 9 }, + { {BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium_names + 40, 10}, 6 }, + { {BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium_names + 50, 11}, 8 }, + { {BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium_names + 61, 12}, 3 }, + { {BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium_names + 73, 8}, 5 }, +}; + +static const int BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium_entries_by_number[] = { + 4, // 0 -> UNKNOWN_MEDIUM + 2, // 1 -> MDNS + 1, // 2 -> BLUETOOTH + 8, // 3 -> WIFI_HOTSPOT + 0, // 4 -> BLE + 9, // 5 -> WIFI_LAN + 6, // 6 -> WIFI_AWARE + 3, // 7 -> NFC + 7, // 8 -> WIFI_DIRECT + 5, // 9 -> WEB_RTC +}; + +const std::string& BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium_Name( + BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium_entries, + BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium_entries_by_number, + 10, BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium_entries, + BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium_entries_by_number, + 10, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium_strings[idx].get(); +} +bool BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium_entries, 10, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} +#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) +constexpr BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium BandwidthUpgradeNegotiationFrame_UpgradePathInfo::UNKNOWN_MEDIUM; +constexpr BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium BandwidthUpgradeNegotiationFrame_UpgradePathInfo::MDNS; +constexpr BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium BandwidthUpgradeNegotiationFrame_UpgradePathInfo::BLUETOOTH; +constexpr BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium BandwidthUpgradeNegotiationFrame_UpgradePathInfo::WIFI_HOTSPOT; +constexpr BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium BandwidthUpgradeNegotiationFrame_UpgradePathInfo::BLE; +constexpr BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium BandwidthUpgradeNegotiationFrame_UpgradePathInfo::WIFI_LAN; +constexpr BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium BandwidthUpgradeNegotiationFrame_UpgradePathInfo::WIFI_AWARE; +constexpr BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium BandwidthUpgradeNegotiationFrame_UpgradePathInfo::NFC; +constexpr BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium BandwidthUpgradeNegotiationFrame_UpgradePathInfo::WIFI_DIRECT; +constexpr BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium BandwidthUpgradeNegotiationFrame_UpgradePathInfo::WEB_RTC; +constexpr BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium BandwidthUpgradeNegotiationFrame_UpgradePathInfo::Medium_MIN; +constexpr BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium BandwidthUpgradeNegotiationFrame_UpgradePathInfo::Medium_MAX; +constexpr int BandwidthUpgradeNegotiationFrame_UpgradePathInfo::Medium_ARRAYSIZE; +#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) +bool BandwidthUpgradeNegotiationFrame_EventType_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 BandwidthUpgradeNegotiationFrame_EventType_strings[7] = {}; + +static const char BandwidthUpgradeNegotiationFrame_EventType_names[] = + "CLIENT_INTRODUCTION" + "CLIENT_INTRODUCTION_ACK" + "LAST_WRITE_TO_PRIOR_CHANNEL" + "SAFE_TO_CLOSE_PRIOR_CHANNEL" + "UNKNOWN_EVENT_TYPE" + "UPGRADE_FAILURE" + "UPGRADE_PATH_AVAILABLE"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry BandwidthUpgradeNegotiationFrame_EventType_entries[] = { + { {BandwidthUpgradeNegotiationFrame_EventType_names + 0, 19}, 4 }, + { {BandwidthUpgradeNegotiationFrame_EventType_names + 19, 23}, 6 }, + { {BandwidthUpgradeNegotiationFrame_EventType_names + 42, 27}, 2 }, + { {BandwidthUpgradeNegotiationFrame_EventType_names + 69, 27}, 3 }, + { {BandwidthUpgradeNegotiationFrame_EventType_names + 96, 18}, 0 }, + { {BandwidthUpgradeNegotiationFrame_EventType_names + 114, 15}, 5 }, + { {BandwidthUpgradeNegotiationFrame_EventType_names + 129, 22}, 1 }, +}; + +static const int BandwidthUpgradeNegotiationFrame_EventType_entries_by_number[] = { + 4, // 0 -> UNKNOWN_EVENT_TYPE + 6, // 1 -> UPGRADE_PATH_AVAILABLE + 2, // 2 -> LAST_WRITE_TO_PRIOR_CHANNEL + 3, // 3 -> SAFE_TO_CLOSE_PRIOR_CHANNEL + 0, // 4 -> CLIENT_INTRODUCTION + 5, // 5 -> UPGRADE_FAILURE + 1, // 6 -> CLIENT_INTRODUCTION_ACK +}; + +const std::string& BandwidthUpgradeNegotiationFrame_EventType_Name( + BandwidthUpgradeNegotiationFrame_EventType value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + BandwidthUpgradeNegotiationFrame_EventType_entries, + BandwidthUpgradeNegotiationFrame_EventType_entries_by_number, + 7, BandwidthUpgradeNegotiationFrame_EventType_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + BandwidthUpgradeNegotiationFrame_EventType_entries, + BandwidthUpgradeNegotiationFrame_EventType_entries_by_number, + 7, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + BandwidthUpgradeNegotiationFrame_EventType_strings[idx].get(); +} +bool BandwidthUpgradeNegotiationFrame_EventType_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, BandwidthUpgradeNegotiationFrame_EventType* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + BandwidthUpgradeNegotiationFrame_EventType_entries, 7, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} +#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) +constexpr BandwidthUpgradeNegotiationFrame_EventType BandwidthUpgradeNegotiationFrame::UNKNOWN_EVENT_TYPE; +constexpr BandwidthUpgradeNegotiationFrame_EventType BandwidthUpgradeNegotiationFrame::UPGRADE_PATH_AVAILABLE; +constexpr BandwidthUpgradeNegotiationFrame_EventType BandwidthUpgradeNegotiationFrame::LAST_WRITE_TO_PRIOR_CHANNEL; +constexpr BandwidthUpgradeNegotiationFrame_EventType BandwidthUpgradeNegotiationFrame::SAFE_TO_CLOSE_PRIOR_CHANNEL; +constexpr BandwidthUpgradeNegotiationFrame_EventType BandwidthUpgradeNegotiationFrame::CLIENT_INTRODUCTION; +constexpr BandwidthUpgradeNegotiationFrame_EventType BandwidthUpgradeNegotiationFrame::UPGRADE_FAILURE; +constexpr BandwidthUpgradeNegotiationFrame_EventType BandwidthUpgradeNegotiationFrame::CLIENT_INTRODUCTION_ACK; +constexpr BandwidthUpgradeNegotiationFrame_EventType BandwidthUpgradeNegotiationFrame::EventType_MIN; +constexpr BandwidthUpgradeNegotiationFrame_EventType BandwidthUpgradeNegotiationFrame::EventType_MAX; +constexpr int BandwidthUpgradeNegotiationFrame::EventType_ARRAYSIZE; +#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) +bool LocationStandard_Format_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + return true; + default: + return false; + } +} + +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed LocationStandard_Format_strings[3] = {}; + +static const char LocationStandard_Format_names[] = + "E164_CALLING" + "ISO_3166_1_ALPHA_2" + "UNKNOWN"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry LocationStandard_Format_entries[] = { + { {LocationStandard_Format_names + 0, 12}, 1 }, + { {LocationStandard_Format_names + 12, 18}, 2 }, + { {LocationStandard_Format_names + 30, 7}, 0 }, +}; + +static const int LocationStandard_Format_entries_by_number[] = { + 2, // 0 -> UNKNOWN + 0, // 1 -> E164_CALLING + 1, // 2 -> ISO_3166_1_ALPHA_2 +}; + +const std::string& LocationStandard_Format_Name( + LocationStandard_Format value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + LocationStandard_Format_entries, + LocationStandard_Format_entries_by_number, + 3, LocationStandard_Format_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + LocationStandard_Format_entries, + LocationStandard_Format_entries_by_number, + 3, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + LocationStandard_Format_strings[idx].get(); +} +bool LocationStandard_Format_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, LocationStandard_Format* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + LocationStandard_Format_entries, 3, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} +#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) +constexpr LocationStandard_Format LocationStandard::UNKNOWN; +constexpr LocationStandard_Format LocationStandard::E164_CALLING; +constexpr LocationStandard_Format LocationStandard::ISO_3166_1_ALPHA_2; +constexpr LocationStandard_Format LocationStandard::Format_MIN; +constexpr LocationStandard_Format LocationStandard::Format_MAX; +constexpr int LocationStandard::Format_ARRAYSIZE; +#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) + +// =================================================================== + +class OfflineFrame::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_version(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static const ::location::nearby::connections::V1Frame& v1(const OfflineFrame* msg); + static void set_has_v1(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } +}; + +const ::location::nearby::connections::V1Frame& +OfflineFrame::_Internal::v1(const OfflineFrame* msg) { + return *msg->v1_; +} +OfflineFrame::OfflineFrame(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:location.nearby.connections.OfflineFrame) +} +OfflineFrame::OfflineFrame(const OfflineFrame& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + if (from._internal_has_v1()) { + v1_ = new ::location::nearby::connections::V1Frame(*from.v1_); + } else { + v1_ = nullptr; + } + version_ = from.version_; + // @@protoc_insertion_point(copy_constructor:location.nearby.connections.OfflineFrame) +} + +inline void OfflineFrame::SharedCtor() { +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&v1_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&version_) - + reinterpret_cast(&v1_)) + sizeof(version_)); +} + +OfflineFrame::~OfflineFrame() { + // @@protoc_insertion_point(destructor:location.nearby.connections.OfflineFrame) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void OfflineFrame::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + if (this != internal_default_instance()) delete v1_; +} + +void OfflineFrame::ArenaDtor(void* object) { + OfflineFrame* _this = reinterpret_cast< OfflineFrame* >(object); + (void)_this; +} +void OfflineFrame::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void OfflineFrame::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void OfflineFrame::Clear() { +// @@protoc_insertion_point(message_clear_start:location.nearby.connections.OfflineFrame) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + GOOGLE_DCHECK(v1_ != nullptr); + v1_->Clear(); + } + version_ = 0; + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* OfflineFrame::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional .location.nearby.connections.OfflineFrame.Version version = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::location::nearby::connections::OfflineFrame_Version_IsValid(val))) { + _internal_set_version(static_cast<::location::nearby::connections::OfflineFrame_Version>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // optional .location.nearby.connections.V1Frame v1 = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + ptr = ctx->ParseMessage(_internal_mutable_v1(), 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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* OfflineFrame::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:location.nearby.connections.OfflineFrame) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional .location.nearby.connections.OfflineFrame.Version version = 1; + if (cached_has_bits & 0x00000002u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 1, this->_internal_version(), target); + } + + // optional .location.nearby.connections.V1Frame v1 = 2; + if (cached_has_bits & 0x00000001u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 2, _Internal::v1(this), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:location.nearby.connections.OfflineFrame) + return target; +} + +size_t OfflineFrame::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:location.nearby.connections.OfflineFrame) + 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 = _has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + // optional .location.nearby.connections.V1Frame v1 = 2; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *v1_); + } + + // optional .location.nearby.connections.OfflineFrame.Version version = 1; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_version()); + } + + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void OfflineFrame::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void OfflineFrame::MergeFrom(const OfflineFrame& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:location.nearby.connections.OfflineFrame) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + _internal_mutable_v1()->::location::nearby::connections::V1Frame::MergeFrom(from._internal_v1()); + } + if (cached_has_bits & 0x00000002u) { + version_ = from.version_; + } + _has_bits_[0] |= cached_has_bits; + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void OfflineFrame::CopyFrom(const OfflineFrame& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:location.nearby.connections.OfflineFrame) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool OfflineFrame::IsInitialized() const { + return true; +} + +void OfflineFrame::InternalSwap(OfflineFrame* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(OfflineFrame, version_) + + sizeof(OfflineFrame::version_) + - PROTOBUF_FIELD_OFFSET(OfflineFrame, v1_)>( + reinterpret_cast(&v1_), + reinterpret_cast(&other->v1_)); +} + +std::string OfflineFrame::GetTypeName() const { + return "location.nearby.connections.OfflineFrame"; +} + + +// =================================================================== + +class V1Frame::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_type(HasBits* has_bits) { + (*has_bits)[0] |= 128u; + } + static const ::location::nearby::connections::ConnectionRequestFrame& connection_request(const V1Frame* msg); + static void set_has_connection_request(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static const ::location::nearby::connections::ConnectionResponseFrame& connection_response(const V1Frame* msg); + static void set_has_connection_response(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static const ::location::nearby::connections::PayloadTransferFrame& payload_transfer(const V1Frame* msg); + static void set_has_payload_transfer(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } + static const ::location::nearby::connections::BandwidthUpgradeNegotiationFrame& bandwidth_upgrade_negotiation(const V1Frame* msg); + static void set_has_bandwidth_upgrade_negotiation(HasBits* has_bits) { + (*has_bits)[0] |= 8u; + } + static const ::location::nearby::connections::KeepAliveFrame& keep_alive(const V1Frame* msg); + static void set_has_keep_alive(HasBits* has_bits) { + (*has_bits)[0] |= 16u; + } + static const ::location::nearby::connections::DisconnectionFrame& disconnection(const V1Frame* msg); + static void set_has_disconnection(HasBits* has_bits) { + (*has_bits)[0] |= 32u; + } + static const ::location::nearby::connections::PairedKeyEncryptionFrame& paired_key_encryption(const V1Frame* msg); + static void set_has_paired_key_encryption(HasBits* has_bits) { + (*has_bits)[0] |= 64u; + } +}; + +const ::location::nearby::connections::ConnectionRequestFrame& +V1Frame::_Internal::connection_request(const V1Frame* msg) { + return *msg->connection_request_; +} +const ::location::nearby::connections::ConnectionResponseFrame& +V1Frame::_Internal::connection_response(const V1Frame* msg) { + return *msg->connection_response_; +} +const ::location::nearby::connections::PayloadTransferFrame& +V1Frame::_Internal::payload_transfer(const V1Frame* msg) { + return *msg->payload_transfer_; +} +const ::location::nearby::connections::BandwidthUpgradeNegotiationFrame& +V1Frame::_Internal::bandwidth_upgrade_negotiation(const V1Frame* msg) { + return *msg->bandwidth_upgrade_negotiation_; +} +const ::location::nearby::connections::KeepAliveFrame& +V1Frame::_Internal::keep_alive(const V1Frame* msg) { + return *msg->keep_alive_; +} +const ::location::nearby::connections::DisconnectionFrame& +V1Frame::_Internal::disconnection(const V1Frame* msg) { + return *msg->disconnection_; +} +const ::location::nearby::connections::PairedKeyEncryptionFrame& +V1Frame::_Internal::paired_key_encryption(const V1Frame* msg) { + return *msg->paired_key_encryption_; +} +V1Frame::V1Frame(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:location.nearby.connections.V1Frame) +} +V1Frame::V1Frame(const V1Frame& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + if (from._internal_has_connection_request()) { + connection_request_ = new ::location::nearby::connections::ConnectionRequestFrame(*from.connection_request_); + } else { + connection_request_ = nullptr; + } + if (from._internal_has_connection_response()) { + connection_response_ = new ::location::nearby::connections::ConnectionResponseFrame(*from.connection_response_); + } else { + connection_response_ = nullptr; + } + if (from._internal_has_payload_transfer()) { + payload_transfer_ = new ::location::nearby::connections::PayloadTransferFrame(*from.payload_transfer_); + } else { + payload_transfer_ = nullptr; + } + if (from._internal_has_bandwidth_upgrade_negotiation()) { + bandwidth_upgrade_negotiation_ = new ::location::nearby::connections::BandwidthUpgradeNegotiationFrame(*from.bandwidth_upgrade_negotiation_); + } else { + bandwidth_upgrade_negotiation_ = nullptr; + } + if (from._internal_has_keep_alive()) { + keep_alive_ = new ::location::nearby::connections::KeepAliveFrame(*from.keep_alive_); + } else { + keep_alive_ = nullptr; + } + if (from._internal_has_disconnection()) { + disconnection_ = new ::location::nearby::connections::DisconnectionFrame(*from.disconnection_); + } else { + disconnection_ = nullptr; + } + if (from._internal_has_paired_key_encryption()) { + paired_key_encryption_ = new ::location::nearby::connections::PairedKeyEncryptionFrame(*from.paired_key_encryption_); + } else { + paired_key_encryption_ = nullptr; + } + type_ = from.type_; + // @@protoc_insertion_point(copy_constructor:location.nearby.connections.V1Frame) +} + +inline void V1Frame::SharedCtor() { +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&connection_request_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&type_) - + reinterpret_cast(&connection_request_)) + sizeof(type_)); +} + +V1Frame::~V1Frame() { + // @@protoc_insertion_point(destructor:location.nearby.connections.V1Frame) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void V1Frame::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + if (this != internal_default_instance()) delete connection_request_; + if (this != internal_default_instance()) delete connection_response_; + if (this != internal_default_instance()) delete payload_transfer_; + if (this != internal_default_instance()) delete bandwidth_upgrade_negotiation_; + if (this != internal_default_instance()) delete keep_alive_; + if (this != internal_default_instance()) delete disconnection_; + if (this != internal_default_instance()) delete paired_key_encryption_; +} + +void V1Frame::ArenaDtor(void* object) { + V1Frame* _this = reinterpret_cast< V1Frame* >(object); + (void)_this; +} +void V1Frame::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void V1Frame::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void V1Frame::Clear() { +// @@protoc_insertion_point(message_clear_start:location.nearby.connections.V1Frame) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x0000007fu) { + if (cached_has_bits & 0x00000001u) { + GOOGLE_DCHECK(connection_request_ != nullptr); + connection_request_->Clear(); + } + if (cached_has_bits & 0x00000002u) { + GOOGLE_DCHECK(connection_response_ != nullptr); + connection_response_->Clear(); + } + if (cached_has_bits & 0x00000004u) { + GOOGLE_DCHECK(payload_transfer_ != nullptr); + payload_transfer_->Clear(); + } + if (cached_has_bits & 0x00000008u) { + GOOGLE_DCHECK(bandwidth_upgrade_negotiation_ != nullptr); + bandwidth_upgrade_negotiation_->Clear(); + } + if (cached_has_bits & 0x00000010u) { + GOOGLE_DCHECK(keep_alive_ != nullptr); + keep_alive_->Clear(); + } + if (cached_has_bits & 0x00000020u) { + GOOGLE_DCHECK(disconnection_ != nullptr); + disconnection_->Clear(); + } + if (cached_has_bits & 0x00000040u) { + GOOGLE_DCHECK(paired_key_encryption_ != nullptr); + paired_key_encryption_->Clear(); + } + } + type_ = 0; + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* V1Frame::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional .location.nearby.connections.V1Frame.FrameType type = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::location::nearby::connections::V1Frame_FrameType_IsValid(val))) { + _internal_set_type(static_cast<::location::nearby::connections::V1Frame_FrameType>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // optional .location.nearby.connections.ConnectionRequestFrame connection_request = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + ptr = ctx->ParseMessage(_internal_mutable_connection_request(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .location.nearby.connections.ConnectionResponseFrame connection_response = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { + ptr = ctx->ParseMessage(_internal_mutable_connection_response(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .location.nearby.connections.PayloadTransferFrame payload_transfer = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { + ptr = ctx->ParseMessage(_internal_mutable_payload_transfer(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .location.nearby.connections.BandwidthUpgradeNegotiationFrame bandwidth_upgrade_negotiation = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 42)) { + ptr = ctx->ParseMessage(_internal_mutable_bandwidth_upgrade_negotiation(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .location.nearby.connections.KeepAliveFrame keep_alive = 6; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 50)) { + ptr = ctx->ParseMessage(_internal_mutable_keep_alive(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .location.nearby.connections.DisconnectionFrame disconnection = 7; + case 7: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 58)) { + ptr = ctx->ParseMessage(_internal_mutable_disconnection(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .location.nearby.connections.PairedKeyEncryptionFrame paired_key_encryption = 8; + case 8: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 66)) { + ptr = ctx->ParseMessage(_internal_mutable_paired_key_encryption(), 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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* V1Frame::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:location.nearby.connections.V1Frame) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional .location.nearby.connections.V1Frame.FrameType type = 1; + if (cached_has_bits & 0x00000080u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 1, this->_internal_type(), target); + } + + // optional .location.nearby.connections.ConnectionRequestFrame connection_request = 2; + if (cached_has_bits & 0x00000001u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 2, _Internal::connection_request(this), target, stream); + } + + // optional .location.nearby.connections.ConnectionResponseFrame connection_response = 3; + if (cached_has_bits & 0x00000002u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 3, _Internal::connection_response(this), target, stream); + } + + // optional .location.nearby.connections.PayloadTransferFrame payload_transfer = 4; + if (cached_has_bits & 0x00000004u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 4, _Internal::payload_transfer(this), target, stream); + } + + // optional .location.nearby.connections.BandwidthUpgradeNegotiationFrame bandwidth_upgrade_negotiation = 5; + if (cached_has_bits & 0x00000008u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 5, _Internal::bandwidth_upgrade_negotiation(this), target, stream); + } + + // optional .location.nearby.connections.KeepAliveFrame keep_alive = 6; + if (cached_has_bits & 0x00000010u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 6, _Internal::keep_alive(this), target, stream); + } + + // optional .location.nearby.connections.DisconnectionFrame disconnection = 7; + if (cached_has_bits & 0x00000020u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 7, _Internal::disconnection(this), target, stream); + } + + // optional .location.nearby.connections.PairedKeyEncryptionFrame paired_key_encryption = 8; + if (cached_has_bits & 0x00000040u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 8, _Internal::paired_key_encryption(this), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:location.nearby.connections.V1Frame) + return target; +} + +size_t V1Frame::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:location.nearby.connections.V1Frame) + 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 = _has_bits_[0]; + if (cached_has_bits & 0x000000ffu) { + // optional .location.nearby.connections.ConnectionRequestFrame connection_request = 2; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *connection_request_); + } + + // optional .location.nearby.connections.ConnectionResponseFrame connection_response = 3; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *connection_response_); + } + + // optional .location.nearby.connections.PayloadTransferFrame payload_transfer = 4; + if (cached_has_bits & 0x00000004u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *payload_transfer_); + } + + // optional .location.nearby.connections.BandwidthUpgradeNegotiationFrame bandwidth_upgrade_negotiation = 5; + if (cached_has_bits & 0x00000008u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *bandwidth_upgrade_negotiation_); + } + + // optional .location.nearby.connections.KeepAliveFrame keep_alive = 6; + if (cached_has_bits & 0x00000010u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *keep_alive_); + } + + // optional .location.nearby.connections.DisconnectionFrame disconnection = 7; + if (cached_has_bits & 0x00000020u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *disconnection_); + } + + // optional .location.nearby.connections.PairedKeyEncryptionFrame paired_key_encryption = 8; + if (cached_has_bits & 0x00000040u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *paired_key_encryption_); + } + + // optional .location.nearby.connections.V1Frame.FrameType type = 1; + if (cached_has_bits & 0x00000080u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_type()); + } + + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void V1Frame::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void V1Frame::MergeFrom(const V1Frame& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:location.nearby.connections.V1Frame) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x000000ffu) { + if (cached_has_bits & 0x00000001u) { + _internal_mutable_connection_request()->::location::nearby::connections::ConnectionRequestFrame::MergeFrom(from._internal_connection_request()); + } + if (cached_has_bits & 0x00000002u) { + _internal_mutable_connection_response()->::location::nearby::connections::ConnectionResponseFrame::MergeFrom(from._internal_connection_response()); + } + if (cached_has_bits & 0x00000004u) { + _internal_mutable_payload_transfer()->::location::nearby::connections::PayloadTransferFrame::MergeFrom(from._internal_payload_transfer()); + } + if (cached_has_bits & 0x00000008u) { + _internal_mutable_bandwidth_upgrade_negotiation()->::location::nearby::connections::BandwidthUpgradeNegotiationFrame::MergeFrom(from._internal_bandwidth_upgrade_negotiation()); + } + if (cached_has_bits & 0x00000010u) { + _internal_mutable_keep_alive()->::location::nearby::connections::KeepAliveFrame::MergeFrom(from._internal_keep_alive()); + } + if (cached_has_bits & 0x00000020u) { + _internal_mutable_disconnection()->::location::nearby::connections::DisconnectionFrame::MergeFrom(from._internal_disconnection()); + } + if (cached_has_bits & 0x00000040u) { + _internal_mutable_paired_key_encryption()->::location::nearby::connections::PairedKeyEncryptionFrame::MergeFrom(from._internal_paired_key_encryption()); + } + if (cached_has_bits & 0x00000080u) { + type_ = from.type_; + } + _has_bits_[0] |= cached_has_bits; + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void V1Frame::CopyFrom(const V1Frame& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:location.nearby.connections.V1Frame) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool V1Frame::IsInitialized() const { + return true; +} + +void V1Frame::InternalSwap(V1Frame* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(V1Frame, type_) + + sizeof(V1Frame::type_) + - PROTOBUF_FIELD_OFFSET(V1Frame, connection_request_)>( + reinterpret_cast(&connection_request_), + reinterpret_cast(&other->connection_request_)); +} + +std::string V1Frame::GetTypeName() const { + return "location.nearby.connections.V1Frame"; +} + + +// =================================================================== + +class ConnectionRequestFrame::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_endpoint_id(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_endpoint_name(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static void set_has_handshake_data(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } + static void set_has_nonce(HasBits* has_bits) { + (*has_bits)[0] |= 64u; + } + static void set_has_endpoint_info(HasBits* has_bits) { + (*has_bits)[0] |= 8u; + } + static const ::location::nearby::connections::MediumMetadata& medium_metadata(const ConnectionRequestFrame* msg); + static void set_has_medium_metadata(HasBits* has_bits) { + (*has_bits)[0] |= 32u; + } + static void set_has_keep_alive_interval_millis(HasBits* has_bits) { + (*has_bits)[0] |= 128u; + } + static void set_has_keep_alive_timeout_millis(HasBits* has_bits) { + (*has_bits)[0] |= 256u; + } + static void set_has_device_type(HasBits* has_bits) { + (*has_bits)[0] |= 512u; + } + static void set_has_device_info(HasBits* has_bits) { + (*has_bits)[0] |= 16u; + } +}; + +const ::location::nearby::connections::MediumMetadata& +ConnectionRequestFrame::_Internal::medium_metadata(const ConnectionRequestFrame* msg) { + return *msg->medium_metadata_; +} +ConnectionRequestFrame::ConnectionRequestFrame(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned), + mediums_(arena) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:location.nearby.connections.ConnectionRequestFrame) +} +ConnectionRequestFrame::ConnectionRequestFrame(const ConnectionRequestFrame& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_), + mediums_(from.mediums_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + endpoint_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + endpoint_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_endpoint_id()) { + endpoint_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_endpoint_id(), + GetArenaForAllocation()); + } + endpoint_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + endpoint_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_endpoint_name()) { + endpoint_name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_endpoint_name(), + GetArenaForAllocation()); + } + handshake_data_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + handshake_data_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_handshake_data()) { + handshake_data_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_handshake_data(), + GetArenaForAllocation()); + } + endpoint_info_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + endpoint_info_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_endpoint_info()) { + endpoint_info_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_endpoint_info(), + GetArenaForAllocation()); + } + device_info_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + device_info_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_device_info()) { + device_info_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_device_info(), + GetArenaForAllocation()); + } + if (from._internal_has_medium_metadata()) { + medium_metadata_ = new ::location::nearby::connections::MediumMetadata(*from.medium_metadata_); + } else { + medium_metadata_ = nullptr; + } + ::memcpy(&nonce_, &from.nonce_, + static_cast(reinterpret_cast(&device_type_) - + reinterpret_cast(&nonce_)) + sizeof(device_type_)); + // @@protoc_insertion_point(copy_constructor:location.nearby.connections.ConnectionRequestFrame) +} + +inline void ConnectionRequestFrame::SharedCtor() { +endpoint_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + endpoint_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +endpoint_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + endpoint_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +handshake_data_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + handshake_data_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +endpoint_info_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + endpoint_info_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +device_info_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + device_info_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&medium_metadata_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&device_type_) - + reinterpret_cast(&medium_metadata_)) + sizeof(device_type_)); +} + +ConnectionRequestFrame::~ConnectionRequestFrame() { + // @@protoc_insertion_point(destructor:location.nearby.connections.ConnectionRequestFrame) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void ConnectionRequestFrame::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + endpoint_id_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + endpoint_name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + handshake_data_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + endpoint_info_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + device_info_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (this != internal_default_instance()) delete medium_metadata_; +} + +void ConnectionRequestFrame::ArenaDtor(void* object) { + ConnectionRequestFrame* _this = reinterpret_cast< ConnectionRequestFrame* >(object); + (void)_this; +} +void ConnectionRequestFrame::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void ConnectionRequestFrame::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void ConnectionRequestFrame::Clear() { +// @@protoc_insertion_point(message_clear_start:location.nearby.connections.ConnectionRequestFrame) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + mediums_.Clear(); + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x0000003fu) { + if (cached_has_bits & 0x00000001u) { + endpoint_id_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000002u) { + endpoint_name_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000004u) { + handshake_data_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000008u) { + endpoint_info_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000010u) { + device_info_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000020u) { + GOOGLE_DCHECK(medium_metadata_ != nullptr); + medium_metadata_->Clear(); + } + } + if (cached_has_bits & 0x000000c0u) { + ::memset(&nonce_, 0, static_cast( + reinterpret_cast(&keep_alive_interval_millis_) - + reinterpret_cast(&nonce_)) + sizeof(keep_alive_interval_millis_)); + } + if (cached_has_bits & 0x00000300u) { + ::memset(&keep_alive_timeout_millis_, 0, static_cast( + reinterpret_cast(&device_type_) - + reinterpret_cast(&keep_alive_timeout_millis_)) + sizeof(device_type_)); + } + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* ConnectionRequestFrame::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional string endpoint_id = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_endpoint_id(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional string endpoint_name = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + auto str = _internal_mutable_endpoint_name(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional bytes handshake_data = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { + auto str = _internal_mutable_handshake_data(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional int32 nonce = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 32)) { + _Internal::set_has_nonce(&has_bits); + nonce_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // repeated .location.nearby.connections.ConnectionRequestFrame.Medium mediums = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 40)) { + ptr -= 1; + do { + ptr += 1; + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::location::nearby::connections::ConnectionRequestFrame_Medium_IsValid(val))) { + _internal_add_mediums(static_cast<::location::nearby::connections::ConnectionRequestFrame_Medium>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(5, val, mutable_unknown_fields()); + } + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<40>(ptr)); + } else if (static_cast(tag) == 42) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedEnumParser(_internal_mutable_mediums(), ptr, ctx, ::location::nearby::connections::ConnectionRequestFrame_Medium_IsValid, &_internal_metadata_, 5); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional bytes endpoint_info = 6; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 50)) { + auto str = _internal_mutable_endpoint_info(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .location.nearby.connections.MediumMetadata medium_metadata = 7; + case 7: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 58)) { + ptr = ctx->ParseMessage(_internal_mutable_medium_metadata(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional int32 keep_alive_interval_millis = 8; + case 8: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 64)) { + _Internal::set_has_keep_alive_interval_millis(&has_bits); + keep_alive_interval_millis_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional int32 keep_alive_timeout_millis = 9; + case 9: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 72)) { + _Internal::set_has_keep_alive_timeout_millis(&has_bits); + keep_alive_timeout_millis_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional int32 device_type = 10 [default = 0]; + case 10: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 80)) { + _Internal::set_has_device_type(&has_bits); + device_type_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional bytes device_info = 11; + case 11: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 90)) { + auto str = _internal_mutable_device_info(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* ConnectionRequestFrame::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:location.nearby.connections.ConnectionRequestFrame) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional string endpoint_id = 1; + if (cached_has_bits & 0x00000001u) { + target = stream->WriteStringMaybeAliased( + 1, this->_internal_endpoint_id(), target); + } + + // optional string endpoint_name = 2; + if (cached_has_bits & 0x00000002u) { + target = stream->WriteStringMaybeAliased( + 2, this->_internal_endpoint_name(), target); + } + + // optional bytes handshake_data = 3; + if (cached_has_bits & 0x00000004u) { + target = stream->WriteBytesMaybeAliased( + 3, this->_internal_handshake_data(), target); + } + + // optional int32 nonce = 4; + if (cached_has_bits & 0x00000040u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(4, this->_internal_nonce(), target); + } + + // repeated .location.nearby.connections.ConnectionRequestFrame.Medium mediums = 5; + for (int i = 0, n = this->_internal_mediums_size(); i < n; i++) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 5, this->_internal_mediums(i), target); + } + + // optional bytes endpoint_info = 6; + if (cached_has_bits & 0x00000008u) { + target = stream->WriteBytesMaybeAliased( + 6, this->_internal_endpoint_info(), target); + } + + // optional .location.nearby.connections.MediumMetadata medium_metadata = 7; + if (cached_has_bits & 0x00000020u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 7, _Internal::medium_metadata(this), target, stream); + } + + // optional int32 keep_alive_interval_millis = 8; + if (cached_has_bits & 0x00000080u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(8, this->_internal_keep_alive_interval_millis(), target); + } + + // optional int32 keep_alive_timeout_millis = 9; + if (cached_has_bits & 0x00000100u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(9, this->_internal_keep_alive_timeout_millis(), target); + } + + // optional int32 device_type = 10 [default = 0]; + if (cached_has_bits & 0x00000200u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(10, this->_internal_device_type(), target); + } + + // optional bytes device_info = 11; + if (cached_has_bits & 0x00000010u) { + target = stream->WriteBytesMaybeAliased( + 11, this->_internal_device_info(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:location.nearby.connections.ConnectionRequestFrame) + return target; +} + +size_t ConnectionRequestFrame::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:location.nearby.connections.ConnectionRequestFrame) + 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 .location.nearby.connections.ConnectionRequestFrame.Medium mediums = 5; + { + size_t data_size = 0; + unsigned int count = static_cast(this->_internal_mediums_size());for (unsigned int i = 0; i < count; i++) { + data_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize( + this->_internal_mediums(static_cast(i))); + } + total_size += (1UL * count) + data_size; + } + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x000000ffu) { + // optional string endpoint_id = 1; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_endpoint_id()); + } + + // optional string endpoint_name = 2; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_endpoint_name()); + } + + // optional bytes handshake_data = 3; + if (cached_has_bits & 0x00000004u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_handshake_data()); + } + + // optional bytes endpoint_info = 6; + if (cached_has_bits & 0x00000008u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_endpoint_info()); + } + + // optional bytes device_info = 11; + if (cached_has_bits & 0x00000010u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_device_info()); + } + + // optional .location.nearby.connections.MediumMetadata medium_metadata = 7; + if (cached_has_bits & 0x00000020u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *medium_metadata_); + } + + // optional int32 nonce = 4; + if (cached_has_bits & 0x00000040u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_nonce()); + } + + // optional int32 keep_alive_interval_millis = 8; + if (cached_has_bits & 0x00000080u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_keep_alive_interval_millis()); + } + + } + if (cached_has_bits & 0x00000300u) { + // optional int32 keep_alive_timeout_millis = 9; + if (cached_has_bits & 0x00000100u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_keep_alive_timeout_millis()); + } + + // optional int32 device_type = 10 [default = 0]; + if (cached_has_bits & 0x00000200u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_device_type()); + } + + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void ConnectionRequestFrame::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void ConnectionRequestFrame::MergeFrom(const ConnectionRequestFrame& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:location.nearby.connections.ConnectionRequestFrame) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + mediums_.MergeFrom(from.mediums_); + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x000000ffu) { + if (cached_has_bits & 0x00000001u) { + _internal_set_endpoint_id(from._internal_endpoint_id()); + } + if (cached_has_bits & 0x00000002u) { + _internal_set_endpoint_name(from._internal_endpoint_name()); + } + if (cached_has_bits & 0x00000004u) { + _internal_set_handshake_data(from._internal_handshake_data()); + } + if (cached_has_bits & 0x00000008u) { + _internal_set_endpoint_info(from._internal_endpoint_info()); + } + if (cached_has_bits & 0x00000010u) { + _internal_set_device_info(from._internal_device_info()); + } + if (cached_has_bits & 0x00000020u) { + _internal_mutable_medium_metadata()->::location::nearby::connections::MediumMetadata::MergeFrom(from._internal_medium_metadata()); + } + if (cached_has_bits & 0x00000040u) { + nonce_ = from.nonce_; + } + if (cached_has_bits & 0x00000080u) { + keep_alive_interval_millis_ = from.keep_alive_interval_millis_; + } + _has_bits_[0] |= cached_has_bits; + } + if (cached_has_bits & 0x00000300u) { + if (cached_has_bits & 0x00000100u) { + keep_alive_timeout_millis_ = from.keep_alive_timeout_millis_; + } + if (cached_has_bits & 0x00000200u) { + device_type_ = from.device_type_; + } + _has_bits_[0] |= cached_has_bits; + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void ConnectionRequestFrame::CopyFrom(const ConnectionRequestFrame& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:location.nearby.connections.ConnectionRequestFrame) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ConnectionRequestFrame::IsInitialized() const { + return true; +} + +void ConnectionRequestFrame::InternalSwap(ConnectionRequestFrame* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + mediums_.InternalSwap(&other->mediums_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &endpoint_id_, lhs_arena, + &other->endpoint_id_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &endpoint_name_, lhs_arena, + &other->endpoint_name_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &handshake_data_, lhs_arena, + &other->handshake_data_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &endpoint_info_, lhs_arena, + &other->endpoint_info_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &device_info_, lhs_arena, + &other->device_info_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(ConnectionRequestFrame, device_type_) + + sizeof(ConnectionRequestFrame::device_type_) + - PROTOBUF_FIELD_OFFSET(ConnectionRequestFrame, medium_metadata_)>( + reinterpret_cast(&medium_metadata_), + reinterpret_cast(&other->medium_metadata_)); +} + +std::string ConnectionRequestFrame::GetTypeName() const { + return "location.nearby.connections.ConnectionRequestFrame"; +} + + +// =================================================================== + +class ConnectionResponseFrame::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_status(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static void set_has_handshake_data(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_response(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } +}; + +ConnectionResponseFrame::ConnectionResponseFrame(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:location.nearby.connections.ConnectionResponseFrame) +} +ConnectionResponseFrame::ConnectionResponseFrame(const ConnectionResponseFrame& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + handshake_data_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + handshake_data_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_handshake_data()) { + handshake_data_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_handshake_data(), + GetArenaForAllocation()); + } + ::memcpy(&status_, &from.status_, + static_cast(reinterpret_cast(&response_) - + reinterpret_cast(&status_)) + sizeof(response_)); + // @@protoc_insertion_point(copy_constructor:location.nearby.connections.ConnectionResponseFrame) +} + +inline void ConnectionResponseFrame::SharedCtor() { +handshake_data_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + handshake_data_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&status_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&response_) - + reinterpret_cast(&status_)) + sizeof(response_)); +} + +ConnectionResponseFrame::~ConnectionResponseFrame() { + // @@protoc_insertion_point(destructor:location.nearby.connections.ConnectionResponseFrame) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void ConnectionResponseFrame::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + handshake_data_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void ConnectionResponseFrame::ArenaDtor(void* object) { + ConnectionResponseFrame* _this = reinterpret_cast< ConnectionResponseFrame* >(object); + (void)_this; +} +void ConnectionResponseFrame::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void ConnectionResponseFrame::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void ConnectionResponseFrame::Clear() { +// @@protoc_insertion_point(message_clear_start:location.nearby.connections.ConnectionResponseFrame) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + handshake_data_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000006u) { + ::memset(&status_, 0, static_cast( + reinterpret_cast(&response_) - + reinterpret_cast(&status_)) + sizeof(response_)); + } + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* ConnectionResponseFrame::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional int32 status = 1 [deprecated = true]; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + _Internal::set_has_status(&has_bits); + status_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional bytes handshake_data = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + auto str = _internal_mutable_handshake_data(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .location.nearby.connections.ConnectionResponseFrame.ResponseStatus response = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::location::nearby::connections::ConnectionResponseFrame_ResponseStatus_IsValid(val))) { + _internal_set_response(static_cast<::location::nearby::connections::ConnectionResponseFrame_ResponseStatus>(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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* ConnectionResponseFrame::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:location.nearby.connections.ConnectionResponseFrame) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional int32 status = 1 [deprecated = true]; + if (cached_has_bits & 0x00000002u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_status(), target); + } + + // optional bytes handshake_data = 2; + if (cached_has_bits & 0x00000001u) { + target = stream->WriteBytesMaybeAliased( + 2, this->_internal_handshake_data(), target); + } + + // optional .location.nearby.connections.ConnectionResponseFrame.ResponseStatus response = 3; + if (cached_has_bits & 0x00000004u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 3, this->_internal_response(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:location.nearby.connections.ConnectionResponseFrame) + return target; +} + +size_t ConnectionResponseFrame::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:location.nearby.connections.ConnectionResponseFrame) + 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 = _has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + // optional bytes handshake_data = 2; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_handshake_data()); + } + + // optional int32 status = 1 [deprecated = true]; + if (cached_has_bits & 0x00000002u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_status()); + } + + // optional .location.nearby.connections.ConnectionResponseFrame.ResponseStatus response = 3; + if (cached_has_bits & 0x00000004u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_response()); + } + + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void ConnectionResponseFrame::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void ConnectionResponseFrame::MergeFrom(const ConnectionResponseFrame& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:location.nearby.connections.ConnectionResponseFrame) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + if (cached_has_bits & 0x00000001u) { + _internal_set_handshake_data(from._internal_handshake_data()); + } + if (cached_has_bits & 0x00000002u) { + status_ = from.status_; + } + if (cached_has_bits & 0x00000004u) { + response_ = from.response_; + } + _has_bits_[0] |= cached_has_bits; + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void ConnectionResponseFrame::CopyFrom(const ConnectionResponseFrame& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:location.nearby.connections.ConnectionResponseFrame) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ConnectionResponseFrame::IsInitialized() const { + return true; +} + +void ConnectionResponseFrame::InternalSwap(ConnectionResponseFrame* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &handshake_data_, lhs_arena, + &other->handshake_data_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(ConnectionResponseFrame, response_) + + sizeof(ConnectionResponseFrame::response_) + - PROTOBUF_FIELD_OFFSET(ConnectionResponseFrame, status_)>( + reinterpret_cast(&status_), + reinterpret_cast(&other->status_)); +} + +std::string ConnectionResponseFrame::GetTypeName() const { + return "location.nearby.connections.ConnectionResponseFrame"; +} + + +// =================================================================== + +class PayloadTransferFrame_PayloadHeader::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_id(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } + static void set_has_type(HasBits* has_bits) { + (*has_bits)[0] |= 16u; + } + static void set_has_total_size(HasBits* has_bits) { + (*has_bits)[0] |= 8u; + } + static void set_has_is_sensitive(HasBits* has_bits) { + (*has_bits)[0] |= 32u; + } + static void set_has_file_name(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_parent_folder(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } +}; + +PayloadTransferFrame_PayloadHeader::PayloadTransferFrame_PayloadHeader(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:location.nearby.connections.PayloadTransferFrame.PayloadHeader) +} +PayloadTransferFrame_PayloadHeader::PayloadTransferFrame_PayloadHeader(const PayloadTransferFrame_PayloadHeader& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + file_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + file_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_file_name()) { + file_name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_file_name(), + GetArenaForAllocation()); + } + parent_folder_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + parent_folder_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_parent_folder()) { + parent_folder_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_parent_folder(), + GetArenaForAllocation()); + } + ::memcpy(&id_, &from.id_, + static_cast(reinterpret_cast(&is_sensitive_) - + reinterpret_cast(&id_)) + sizeof(is_sensitive_)); + // @@protoc_insertion_point(copy_constructor:location.nearby.connections.PayloadTransferFrame.PayloadHeader) +} + +inline void PayloadTransferFrame_PayloadHeader::SharedCtor() { +file_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + file_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +parent_folder_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + parent_folder_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&id_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&is_sensitive_) - + reinterpret_cast(&id_)) + sizeof(is_sensitive_)); +} + +PayloadTransferFrame_PayloadHeader::~PayloadTransferFrame_PayloadHeader() { + // @@protoc_insertion_point(destructor:location.nearby.connections.PayloadTransferFrame.PayloadHeader) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void PayloadTransferFrame_PayloadHeader::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + file_name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + parent_folder_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void PayloadTransferFrame_PayloadHeader::ArenaDtor(void* object) { + PayloadTransferFrame_PayloadHeader* _this = reinterpret_cast< PayloadTransferFrame_PayloadHeader* >(object); + (void)_this; +} +void PayloadTransferFrame_PayloadHeader::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void PayloadTransferFrame_PayloadHeader::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void PayloadTransferFrame_PayloadHeader::Clear() { +// @@protoc_insertion_point(message_clear_start:location.nearby.connections.PayloadTransferFrame.PayloadHeader) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + file_name_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000002u) { + parent_folder_.ClearNonDefaultToEmpty(); + } + } + if (cached_has_bits & 0x0000003cu) { + ::memset(&id_, 0, static_cast( + reinterpret_cast(&is_sensitive_) - + reinterpret_cast(&id_)) + sizeof(is_sensitive_)); + } + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* PayloadTransferFrame_PayloadHeader::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional int64 id = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + _Internal::set_has_id(&has_bits); + id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .location.nearby.connections.PayloadTransferFrame.PayloadHeader.PayloadType type = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::location::nearby::connections::PayloadTransferFrame_PayloadHeader_PayloadType_IsValid(val))) { + _internal_set_type(static_cast<::location::nearby::connections::PayloadTransferFrame_PayloadHeader_PayloadType>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(2, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // optional int64 total_size = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { + _Internal::set_has_total_size(&has_bits); + total_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional bool is_sensitive = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 32)) { + _Internal::set_has_is_sensitive(&has_bits); + is_sensitive_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional string file_name = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 42)) { + auto str = _internal_mutable_file_name(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional string parent_folder = 6; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 50)) { + auto str = _internal_mutable_parent_folder(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* PayloadTransferFrame_PayloadHeader::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:location.nearby.connections.PayloadTransferFrame.PayloadHeader) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional int64 id = 1; + if (cached_has_bits & 0x00000004u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(1, this->_internal_id(), target); + } + + // optional .location.nearby.connections.PayloadTransferFrame.PayloadHeader.PayloadType type = 2; + if (cached_has_bits & 0x00000010u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 2, this->_internal_type(), target); + } + + // optional int64 total_size = 3; + if (cached_has_bits & 0x00000008u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(3, this->_internal_total_size(), target); + } + + // optional bool is_sensitive = 4; + if (cached_has_bits & 0x00000020u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(4, this->_internal_is_sensitive(), target); + } + + // optional string file_name = 5; + if (cached_has_bits & 0x00000001u) { + target = stream->WriteStringMaybeAliased( + 5, this->_internal_file_name(), target); + } + + // optional string parent_folder = 6; + if (cached_has_bits & 0x00000002u) { + target = stream->WriteStringMaybeAliased( + 6, this->_internal_parent_folder(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:location.nearby.connections.PayloadTransferFrame.PayloadHeader) + return target; +} + +size_t PayloadTransferFrame_PayloadHeader::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:location.nearby.connections.PayloadTransferFrame.PayloadHeader) + 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 = _has_bits_[0]; + if (cached_has_bits & 0x0000003fu) { + // optional string file_name = 5; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_file_name()); + } + + // optional string parent_folder = 6; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_parent_folder()); + } + + // optional int64 id = 1; + if (cached_has_bits & 0x00000004u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_id()); + } + + // optional int64 total_size = 3; + if (cached_has_bits & 0x00000008u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_total_size()); + } + + // optional .location.nearby.connections.PayloadTransferFrame.PayloadHeader.PayloadType type = 2; + if (cached_has_bits & 0x00000010u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_type()); + } + + // optional bool is_sensitive = 4; + if (cached_has_bits & 0x00000020u) { + total_size += 1 + 1; + } + + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void PayloadTransferFrame_PayloadHeader::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void PayloadTransferFrame_PayloadHeader::MergeFrom(const PayloadTransferFrame_PayloadHeader& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:location.nearby.connections.PayloadTransferFrame.PayloadHeader) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x0000003fu) { + if (cached_has_bits & 0x00000001u) { + _internal_set_file_name(from._internal_file_name()); + } + if (cached_has_bits & 0x00000002u) { + _internal_set_parent_folder(from._internal_parent_folder()); + } + if (cached_has_bits & 0x00000004u) { + id_ = from.id_; + } + if (cached_has_bits & 0x00000008u) { + total_size_ = from.total_size_; + } + if (cached_has_bits & 0x00000010u) { + type_ = from.type_; + } + if (cached_has_bits & 0x00000020u) { + is_sensitive_ = from.is_sensitive_; + } + _has_bits_[0] |= cached_has_bits; + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void PayloadTransferFrame_PayloadHeader::CopyFrom(const PayloadTransferFrame_PayloadHeader& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:location.nearby.connections.PayloadTransferFrame.PayloadHeader) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool PayloadTransferFrame_PayloadHeader::IsInitialized() const { + return true; +} + +void PayloadTransferFrame_PayloadHeader::InternalSwap(PayloadTransferFrame_PayloadHeader* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &file_name_, lhs_arena, + &other->file_name_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &parent_folder_, lhs_arena, + &other->parent_folder_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(PayloadTransferFrame_PayloadHeader, is_sensitive_) + + sizeof(PayloadTransferFrame_PayloadHeader::is_sensitive_) + - PROTOBUF_FIELD_OFFSET(PayloadTransferFrame_PayloadHeader, id_)>( + reinterpret_cast(&id_), + reinterpret_cast(&other->id_)); +} + +std::string PayloadTransferFrame_PayloadHeader::GetTypeName() const { + return "location.nearby.connections.PayloadTransferFrame.PayloadHeader"; +} + + +// =================================================================== + +class PayloadTransferFrame_PayloadChunk::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_flags(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } + static void set_has_offset(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static void set_has_body(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } +}; + +PayloadTransferFrame_PayloadChunk::PayloadTransferFrame_PayloadChunk(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:location.nearby.connections.PayloadTransferFrame.PayloadChunk) +} +PayloadTransferFrame_PayloadChunk::PayloadTransferFrame_PayloadChunk(const PayloadTransferFrame_PayloadChunk& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + body_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + body_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_body()) { + body_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_body(), + GetArenaForAllocation()); + } + ::memcpy(&offset_, &from.offset_, + static_cast(reinterpret_cast(&flags_) - + reinterpret_cast(&offset_)) + sizeof(flags_)); + // @@protoc_insertion_point(copy_constructor:location.nearby.connections.PayloadTransferFrame.PayloadChunk) +} + +inline void PayloadTransferFrame_PayloadChunk::SharedCtor() { +body_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + body_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&offset_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&flags_) - + reinterpret_cast(&offset_)) + sizeof(flags_)); +} + +PayloadTransferFrame_PayloadChunk::~PayloadTransferFrame_PayloadChunk() { + // @@protoc_insertion_point(destructor:location.nearby.connections.PayloadTransferFrame.PayloadChunk) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void PayloadTransferFrame_PayloadChunk::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + body_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void PayloadTransferFrame_PayloadChunk::ArenaDtor(void* object) { + PayloadTransferFrame_PayloadChunk* _this = reinterpret_cast< PayloadTransferFrame_PayloadChunk* >(object); + (void)_this; +} +void PayloadTransferFrame_PayloadChunk::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void PayloadTransferFrame_PayloadChunk::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void PayloadTransferFrame_PayloadChunk::Clear() { +// @@protoc_insertion_point(message_clear_start:location.nearby.connections.PayloadTransferFrame.PayloadChunk) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + body_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000006u) { + ::memset(&offset_, 0, static_cast( + reinterpret_cast(&flags_) - + reinterpret_cast(&offset_)) + sizeof(flags_)); + } + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* PayloadTransferFrame_PayloadChunk::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional int32 flags = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + _Internal::set_has_flags(&has_bits); + flags_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional int64 offset = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { + _Internal::set_has_offset(&has_bits); + offset_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional bytes body = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { + auto str = _internal_mutable_body(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* PayloadTransferFrame_PayloadChunk::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:location.nearby.connections.PayloadTransferFrame.PayloadChunk) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional int32 flags = 1; + if (cached_has_bits & 0x00000004u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_flags(), target); + } + + // optional int64 offset = 2; + if (cached_has_bits & 0x00000002u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(2, this->_internal_offset(), target); + } + + // optional bytes body = 3; + if (cached_has_bits & 0x00000001u) { + target = stream->WriteBytesMaybeAliased( + 3, this->_internal_body(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:location.nearby.connections.PayloadTransferFrame.PayloadChunk) + return target; +} + +size_t PayloadTransferFrame_PayloadChunk::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:location.nearby.connections.PayloadTransferFrame.PayloadChunk) + 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 = _has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + // optional bytes body = 3; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_body()); + } + + // optional int64 offset = 2; + if (cached_has_bits & 0x00000002u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_offset()); + } + + // optional int32 flags = 1; + if (cached_has_bits & 0x00000004u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_flags()); + } + + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void PayloadTransferFrame_PayloadChunk::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void PayloadTransferFrame_PayloadChunk::MergeFrom(const PayloadTransferFrame_PayloadChunk& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:location.nearby.connections.PayloadTransferFrame.PayloadChunk) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + if (cached_has_bits & 0x00000001u) { + _internal_set_body(from._internal_body()); + } + if (cached_has_bits & 0x00000002u) { + offset_ = from.offset_; + } + if (cached_has_bits & 0x00000004u) { + flags_ = from.flags_; + } + _has_bits_[0] |= cached_has_bits; + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void PayloadTransferFrame_PayloadChunk::CopyFrom(const PayloadTransferFrame_PayloadChunk& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:location.nearby.connections.PayloadTransferFrame.PayloadChunk) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool PayloadTransferFrame_PayloadChunk::IsInitialized() const { + return true; +} + +void PayloadTransferFrame_PayloadChunk::InternalSwap(PayloadTransferFrame_PayloadChunk* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &body_, lhs_arena, + &other->body_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(PayloadTransferFrame_PayloadChunk, flags_) + + sizeof(PayloadTransferFrame_PayloadChunk::flags_) + - PROTOBUF_FIELD_OFFSET(PayloadTransferFrame_PayloadChunk, offset_)>( + reinterpret_cast(&offset_), + reinterpret_cast(&other->offset_)); +} + +std::string PayloadTransferFrame_PayloadChunk::GetTypeName() const { + return "location.nearby.connections.PayloadTransferFrame.PayloadChunk"; +} + + +// =================================================================== + +class PayloadTransferFrame_ControlMessage::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_event(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static void set_has_offset(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } +}; + +PayloadTransferFrame_ControlMessage::PayloadTransferFrame_ControlMessage(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:location.nearby.connections.PayloadTransferFrame.ControlMessage) +} +PayloadTransferFrame_ControlMessage::PayloadTransferFrame_ControlMessage(const PayloadTransferFrame_ControlMessage& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::memcpy(&offset_, &from.offset_, + static_cast(reinterpret_cast(&event_) - + reinterpret_cast(&offset_)) + sizeof(event_)); + // @@protoc_insertion_point(copy_constructor:location.nearby.connections.PayloadTransferFrame.ControlMessage) +} + +inline void PayloadTransferFrame_ControlMessage::SharedCtor() { +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&offset_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&event_) - + reinterpret_cast(&offset_)) + sizeof(event_)); +} + +PayloadTransferFrame_ControlMessage::~PayloadTransferFrame_ControlMessage() { + // @@protoc_insertion_point(destructor:location.nearby.connections.PayloadTransferFrame.ControlMessage) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void PayloadTransferFrame_ControlMessage::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); +} + +void PayloadTransferFrame_ControlMessage::ArenaDtor(void* object) { + PayloadTransferFrame_ControlMessage* _this = reinterpret_cast< PayloadTransferFrame_ControlMessage* >(object); + (void)_this; +} +void PayloadTransferFrame_ControlMessage::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void PayloadTransferFrame_ControlMessage::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void PayloadTransferFrame_ControlMessage::Clear() { +// @@protoc_insertion_point(message_clear_start:location.nearby.connections.PayloadTransferFrame.ControlMessage) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + ::memset(&offset_, 0, static_cast( + reinterpret_cast(&event_) - + reinterpret_cast(&offset_)) + sizeof(event_)); + } + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* PayloadTransferFrame_ControlMessage::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional .location.nearby.connections.PayloadTransferFrame.ControlMessage.EventType event = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::location::nearby::connections::PayloadTransferFrame_ControlMessage_EventType_IsValid(val))) { + _internal_set_event(static_cast<::location::nearby::connections::PayloadTransferFrame_ControlMessage_EventType>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // optional int64 offset = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { + _Internal::set_has_offset(&has_bits); + offset_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* PayloadTransferFrame_ControlMessage::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:location.nearby.connections.PayloadTransferFrame.ControlMessage) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional .location.nearby.connections.PayloadTransferFrame.ControlMessage.EventType event = 1; + if (cached_has_bits & 0x00000002u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 1, this->_internal_event(), target); + } + + // optional int64 offset = 2; + if (cached_has_bits & 0x00000001u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(2, this->_internal_offset(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:location.nearby.connections.PayloadTransferFrame.ControlMessage) + return target; +} + +size_t PayloadTransferFrame_ControlMessage::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:location.nearby.connections.PayloadTransferFrame.ControlMessage) + 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 = _has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + // optional int64 offset = 2; + if (cached_has_bits & 0x00000001u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_offset()); + } + + // optional .location.nearby.connections.PayloadTransferFrame.ControlMessage.EventType event = 1; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_event()); + } + + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void PayloadTransferFrame_ControlMessage::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void PayloadTransferFrame_ControlMessage::MergeFrom(const PayloadTransferFrame_ControlMessage& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:location.nearby.connections.PayloadTransferFrame.ControlMessage) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + offset_ = from.offset_; + } + if (cached_has_bits & 0x00000002u) { + event_ = from.event_; + } + _has_bits_[0] |= cached_has_bits; + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void PayloadTransferFrame_ControlMessage::CopyFrom(const PayloadTransferFrame_ControlMessage& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:location.nearby.connections.PayloadTransferFrame.ControlMessage) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool PayloadTransferFrame_ControlMessage::IsInitialized() const { + return true; +} + +void PayloadTransferFrame_ControlMessage::InternalSwap(PayloadTransferFrame_ControlMessage* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(PayloadTransferFrame_ControlMessage, event_) + + sizeof(PayloadTransferFrame_ControlMessage::event_) + - PROTOBUF_FIELD_OFFSET(PayloadTransferFrame_ControlMessage, offset_)>( + reinterpret_cast(&offset_), + reinterpret_cast(&other->offset_)); +} + +std::string PayloadTransferFrame_ControlMessage::GetTypeName() const { + return "location.nearby.connections.PayloadTransferFrame.ControlMessage"; +} + + +// =================================================================== + +class PayloadTransferFrame::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_packet_type(HasBits* has_bits) { + (*has_bits)[0] |= 8u; + } + static const ::location::nearby::connections::PayloadTransferFrame_PayloadHeader& payload_header(const PayloadTransferFrame* msg); + static void set_has_payload_header(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static const ::location::nearby::connections::PayloadTransferFrame_PayloadChunk& payload_chunk(const PayloadTransferFrame* msg); + static void set_has_payload_chunk(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static const ::location::nearby::connections::PayloadTransferFrame_ControlMessage& control_message(const PayloadTransferFrame* msg); + static void set_has_control_message(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } +}; + +const ::location::nearby::connections::PayloadTransferFrame_PayloadHeader& +PayloadTransferFrame::_Internal::payload_header(const PayloadTransferFrame* msg) { + return *msg->payload_header_; +} +const ::location::nearby::connections::PayloadTransferFrame_PayloadChunk& +PayloadTransferFrame::_Internal::payload_chunk(const PayloadTransferFrame* msg) { + return *msg->payload_chunk_; +} +const ::location::nearby::connections::PayloadTransferFrame_ControlMessage& +PayloadTransferFrame::_Internal::control_message(const PayloadTransferFrame* msg) { + return *msg->control_message_; +} +PayloadTransferFrame::PayloadTransferFrame(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:location.nearby.connections.PayloadTransferFrame) +} +PayloadTransferFrame::PayloadTransferFrame(const PayloadTransferFrame& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + if (from._internal_has_payload_header()) { + payload_header_ = new ::location::nearby::connections::PayloadTransferFrame_PayloadHeader(*from.payload_header_); + } else { + payload_header_ = nullptr; + } + if (from._internal_has_payload_chunk()) { + payload_chunk_ = new ::location::nearby::connections::PayloadTransferFrame_PayloadChunk(*from.payload_chunk_); + } else { + payload_chunk_ = nullptr; + } + if (from._internal_has_control_message()) { + control_message_ = new ::location::nearby::connections::PayloadTransferFrame_ControlMessage(*from.control_message_); + } else { + control_message_ = nullptr; + } + packet_type_ = from.packet_type_; + // @@protoc_insertion_point(copy_constructor:location.nearby.connections.PayloadTransferFrame) +} + +inline void PayloadTransferFrame::SharedCtor() { +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&payload_header_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&packet_type_) - + reinterpret_cast(&payload_header_)) + sizeof(packet_type_)); +} + +PayloadTransferFrame::~PayloadTransferFrame() { + // @@protoc_insertion_point(destructor:location.nearby.connections.PayloadTransferFrame) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void PayloadTransferFrame::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + if (this != internal_default_instance()) delete payload_header_; + if (this != internal_default_instance()) delete payload_chunk_; + if (this != internal_default_instance()) delete control_message_; +} + +void PayloadTransferFrame::ArenaDtor(void* object) { + PayloadTransferFrame* _this = reinterpret_cast< PayloadTransferFrame* >(object); + (void)_this; +} +void PayloadTransferFrame::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void PayloadTransferFrame::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void PayloadTransferFrame::Clear() { +// @@protoc_insertion_point(message_clear_start:location.nearby.connections.PayloadTransferFrame) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + if (cached_has_bits & 0x00000001u) { + GOOGLE_DCHECK(payload_header_ != nullptr); + payload_header_->Clear(); + } + if (cached_has_bits & 0x00000002u) { + GOOGLE_DCHECK(payload_chunk_ != nullptr); + payload_chunk_->Clear(); + } + if (cached_has_bits & 0x00000004u) { + GOOGLE_DCHECK(control_message_ != nullptr); + control_message_->Clear(); + } + } + packet_type_ = 0; + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* PayloadTransferFrame::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional .location.nearby.connections.PayloadTransferFrame.PacketType packet_type = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::location::nearby::connections::PayloadTransferFrame_PacketType_IsValid(val))) { + _internal_set_packet_type(static_cast<::location::nearby::connections::PayloadTransferFrame_PacketType>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // optional .location.nearby.connections.PayloadTransferFrame.PayloadHeader payload_header = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + ptr = ctx->ParseMessage(_internal_mutable_payload_header(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .location.nearby.connections.PayloadTransferFrame.PayloadChunk payload_chunk = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { + ptr = ctx->ParseMessage(_internal_mutable_payload_chunk(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .location.nearby.connections.PayloadTransferFrame.ControlMessage control_message = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { + ptr = ctx->ParseMessage(_internal_mutable_control_message(), 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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* PayloadTransferFrame::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:location.nearby.connections.PayloadTransferFrame) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional .location.nearby.connections.PayloadTransferFrame.PacketType packet_type = 1; + if (cached_has_bits & 0x00000008u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 1, this->_internal_packet_type(), target); + } + + // optional .location.nearby.connections.PayloadTransferFrame.PayloadHeader payload_header = 2; + if (cached_has_bits & 0x00000001u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 2, _Internal::payload_header(this), target, stream); + } + + // optional .location.nearby.connections.PayloadTransferFrame.PayloadChunk payload_chunk = 3; + if (cached_has_bits & 0x00000002u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 3, _Internal::payload_chunk(this), target, stream); + } + + // optional .location.nearby.connections.PayloadTransferFrame.ControlMessage control_message = 4; + if (cached_has_bits & 0x00000004u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 4, _Internal::control_message(this), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:location.nearby.connections.PayloadTransferFrame) + return target; +} + +size_t PayloadTransferFrame::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:location.nearby.connections.PayloadTransferFrame) + 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 = _has_bits_[0]; + if (cached_has_bits & 0x0000000fu) { + // optional .location.nearby.connections.PayloadTransferFrame.PayloadHeader payload_header = 2; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *payload_header_); + } + + // optional .location.nearby.connections.PayloadTransferFrame.PayloadChunk payload_chunk = 3; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *payload_chunk_); + } + + // optional .location.nearby.connections.PayloadTransferFrame.ControlMessage control_message = 4; + if (cached_has_bits & 0x00000004u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *control_message_); + } + + // optional .location.nearby.connections.PayloadTransferFrame.PacketType packet_type = 1; + if (cached_has_bits & 0x00000008u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_packet_type()); + } + + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void PayloadTransferFrame::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void PayloadTransferFrame::MergeFrom(const PayloadTransferFrame& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:location.nearby.connections.PayloadTransferFrame) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x0000000fu) { + if (cached_has_bits & 0x00000001u) { + _internal_mutable_payload_header()->::location::nearby::connections::PayloadTransferFrame_PayloadHeader::MergeFrom(from._internal_payload_header()); + } + if (cached_has_bits & 0x00000002u) { + _internal_mutable_payload_chunk()->::location::nearby::connections::PayloadTransferFrame_PayloadChunk::MergeFrom(from._internal_payload_chunk()); + } + if (cached_has_bits & 0x00000004u) { + _internal_mutable_control_message()->::location::nearby::connections::PayloadTransferFrame_ControlMessage::MergeFrom(from._internal_control_message()); + } + if (cached_has_bits & 0x00000008u) { + packet_type_ = from.packet_type_; + } + _has_bits_[0] |= cached_has_bits; + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void PayloadTransferFrame::CopyFrom(const PayloadTransferFrame& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:location.nearby.connections.PayloadTransferFrame) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool PayloadTransferFrame::IsInitialized() const { + return true; +} + +void PayloadTransferFrame::InternalSwap(PayloadTransferFrame* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(PayloadTransferFrame, packet_type_) + + sizeof(PayloadTransferFrame::packet_type_) + - PROTOBUF_FIELD_OFFSET(PayloadTransferFrame, payload_header_)>( + reinterpret_cast(&payload_header_), + reinterpret_cast(&other->payload_header_)); +} + +std::string PayloadTransferFrame::GetTypeName() const { + return "location.nearby.connections.PayloadTransferFrame"; +} + + +// =================================================================== + +class BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_ssid(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_password(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static void set_has_port(HasBits* has_bits) { + (*has_bits)[0] |= 8u; + } + static void set_has_gateway(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } + static void set_has_frequency(HasBits* has_bits) { + (*has_bits)[0] |= 16u; + } +}; + +const ::PROTOBUF_NAMESPACE_ID::internal::LazyString BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials::_i_give_permission_to_break_this_code_default_gateway_{{{"0.0.0.0", 7}}, {nullptr}}; +BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiHotspotCredentials) +} +BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials(const BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + ssid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + ssid_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_ssid()) { + ssid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_ssid(), + GetArenaForAllocation()); + } + password_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + password_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_password()) { + password_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_password(), + GetArenaForAllocation()); + } + gateway_.UnsafeSetDefault(nullptr); + if (from._internal_has_gateway()) { + gateway_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::NonEmptyDefault{}, from._internal_gateway(), + GetArenaForAllocation()); + } + ::memcpy(&port_, &from.port_, + static_cast(reinterpret_cast(&frequency_) - + reinterpret_cast(&port_)) + sizeof(frequency_)); + // @@protoc_insertion_point(copy_constructor:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiHotspotCredentials) +} + +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials::SharedCtor() { +ssid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + ssid_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +password_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + password_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +gateway_.UnsafeSetDefault(nullptr); +port_ = 0; +frequency_ = -1; +} + +BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials::~BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials() { + // @@protoc_insertion_point(destructor:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiHotspotCredentials) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + ssid_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + password_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + gateway_.DestroyNoArena(nullptr); +} + +void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials::ArenaDtor(void* object) { + BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials* _this = reinterpret_cast< BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials* >(object); + (void)_this; +} +void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials::Clear() { +// @@protoc_insertion_point(message_clear_start:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiHotspotCredentials) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + if (cached_has_bits & 0x00000001u) { + ssid_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000002u) { + password_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000004u) { + gateway_.ClearToDefault(::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials::_i_give_permission_to_break_this_code_default_gateway_, GetArenaForAllocation()); + } + } + if (cached_has_bits & 0x00000018u) { + port_ = 0; + frequency_ = -1; + } + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional string ssid = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_ssid(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional string password = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + auto str = _internal_mutable_password(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional int32 port = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { + _Internal::set_has_port(&has_bits); + port_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional string gateway = 4 [default = "0.0.0.0"]; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { + auto str = _internal_mutable_gateway(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional int32 frequency = 5 [default = -1]; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 40)) { + _Internal::set_has_frequency(&has_bits); + frequency_ = ::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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiHotspotCredentials) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional string ssid = 1; + if (cached_has_bits & 0x00000001u) { + target = stream->WriteStringMaybeAliased( + 1, this->_internal_ssid(), target); + } + + // optional string password = 2; + if (cached_has_bits & 0x00000002u) { + target = stream->WriteStringMaybeAliased( + 2, this->_internal_password(), target); + } + + // optional int32 port = 3; + if (cached_has_bits & 0x00000008u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(3, this->_internal_port(), target); + } + + // optional string gateway = 4 [default = "0.0.0.0"]; + if (cached_has_bits & 0x00000004u) { + target = stream->WriteStringMaybeAliased( + 4, this->_internal_gateway(), target); + } + + // optional int32 frequency = 5 [default = -1]; + if (cached_has_bits & 0x00000010u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(5, this->_internal_frequency(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiHotspotCredentials) + return target; +} + +size_t BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiHotspotCredentials) + 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 = _has_bits_[0]; + if (cached_has_bits & 0x0000001fu) { + // optional string ssid = 1; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_ssid()); + } + + // optional string password = 2; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_password()); + } + + // optional string gateway = 4 [default = "0.0.0.0"]; + if (cached_has_bits & 0x00000004u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_gateway()); + } + + // optional int32 port = 3; + if (cached_has_bits & 0x00000008u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_port()); + } + + // optional int32 frequency = 5 [default = -1]; + if (cached_has_bits & 0x00000010u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_frequency()); + } + + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials::MergeFrom(const BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiHotspotCredentials) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x0000001fu) { + if (cached_has_bits & 0x00000001u) { + _internal_set_ssid(from._internal_ssid()); + } + if (cached_has_bits & 0x00000002u) { + _internal_set_password(from._internal_password()); + } + if (cached_has_bits & 0x00000004u) { + _internal_set_gateway(from._internal_gateway()); + } + if (cached_has_bits & 0x00000008u) { + port_ = from.port_; + } + if (cached_has_bits & 0x00000010u) { + frequency_ = from.frequency_; + } + _has_bits_[0] |= cached_has_bits; + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials::CopyFrom(const BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiHotspotCredentials) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials::IsInitialized() const { + return true; +} + +void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials::InternalSwap(BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &ssid_, lhs_arena, + &other->ssid_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &password_, lhs_arena, + &other->password_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + nullptr, + &gateway_, lhs_arena, + &other->gateway_, rhs_arena + ); + swap(port_, other->port_); + swap(frequency_, other->frequency_); +} + +std::string BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials::GetTypeName() const { + return "location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiHotspotCredentials"; +} + + +// =================================================================== + +class BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_ip_address(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_wifi_port(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } +}; + +BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiLanSocket) +} +BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket(const BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + ip_address_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + ip_address_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_ip_address()) { + ip_address_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_ip_address(), + GetArenaForAllocation()); + } + wifi_port_ = from.wifi_port_; + // @@protoc_insertion_point(copy_constructor:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiLanSocket) +} + +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket::SharedCtor() { +ip_address_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + ip_address_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +wifi_port_ = 0; +} + +BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket::~BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket() { + // @@protoc_insertion_point(destructor:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiLanSocket) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + ip_address_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket::ArenaDtor(void* object) { + BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket* _this = reinterpret_cast< BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket* >(object); + (void)_this; +} +void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket::Clear() { +// @@protoc_insertion_point(message_clear_start:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiLanSocket) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + ip_address_.ClearNonDefaultToEmpty(); + } + wifi_port_ = 0; + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional bytes ip_address = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_ip_address(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional int32 wifi_port = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { + _Internal::set_has_wifi_port(&has_bits); + wifi_port_ = ::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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiLanSocket) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional bytes ip_address = 1; + if (cached_has_bits & 0x00000001u) { + target = stream->WriteBytesMaybeAliased( + 1, this->_internal_ip_address(), target); + } + + // optional int32 wifi_port = 2; + if (cached_has_bits & 0x00000002u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_wifi_port(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiLanSocket) + return target; +} + +size_t BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiLanSocket) + 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 = _has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + // optional bytes ip_address = 1; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_ip_address()); + } + + // optional int32 wifi_port = 2; + if (cached_has_bits & 0x00000002u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_wifi_port()); + } + + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket::MergeFrom(const BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiLanSocket) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + _internal_set_ip_address(from._internal_ip_address()); + } + if (cached_has_bits & 0x00000002u) { + wifi_port_ = from.wifi_port_; + } + _has_bits_[0] |= cached_has_bits; + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket::CopyFrom(const BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiLanSocket) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket::IsInitialized() const { + return true; +} + +void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket::InternalSwap(BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &ip_address_, lhs_arena, + &other->ip_address_, rhs_arena + ); + swap(wifi_port_, other->wifi_port_); +} + +std::string BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket::GetTypeName() const { + return "location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiLanSocket"; +} + + +// =================================================================== + +class BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_service_name(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_mac_address(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } +}; + +BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.BluetoothCredentials) +} +BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials(const BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + service_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + service_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_service_name()) { + service_name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_service_name(), + GetArenaForAllocation()); + } + mac_address_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + mac_address_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_mac_address()) { + mac_address_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_mac_address(), + GetArenaForAllocation()); + } + // @@protoc_insertion_point(copy_constructor:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.BluetoothCredentials) +} + +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials::SharedCtor() { +service_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + service_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +mac_address_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + mac_address_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials::~BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials() { + // @@protoc_insertion_point(destructor:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.BluetoothCredentials) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + service_name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + mac_address_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials::ArenaDtor(void* object) { + BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials* _this = reinterpret_cast< BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials* >(object); + (void)_this; +} +void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials::Clear() { +// @@protoc_insertion_point(message_clear_start:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.BluetoothCredentials) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + service_name_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000002u) { + mac_address_.ClearNonDefaultToEmpty(); + } + } + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional string service_name = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_service_name(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional string mac_address = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + auto str = _internal_mutable_mac_address(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.BluetoothCredentials) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional string service_name = 1; + if (cached_has_bits & 0x00000001u) { + target = stream->WriteStringMaybeAliased( + 1, this->_internal_service_name(), target); + } + + // optional string mac_address = 2; + if (cached_has_bits & 0x00000002u) { + target = stream->WriteStringMaybeAliased( + 2, this->_internal_mac_address(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.BluetoothCredentials) + return target; +} + +size_t BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.BluetoothCredentials) + 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 = _has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + // optional string service_name = 1; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_service_name()); + } + + // optional string mac_address = 2; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_mac_address()); + } + + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials::MergeFrom(const BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.BluetoothCredentials) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + _internal_set_service_name(from._internal_service_name()); + } + if (cached_has_bits & 0x00000002u) { + _internal_set_mac_address(from._internal_mac_address()); + } + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials::CopyFrom(const BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.BluetoothCredentials) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials::IsInitialized() const { + return true; +} + +void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials::InternalSwap(BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &service_name_, lhs_arena, + &other->service_name_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &mac_address_, lhs_arena, + &other->mac_address_, rhs_arena + ); +} + +std::string BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials::GetTypeName() const { + return "location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.BluetoothCredentials"; +} + + +// =================================================================== + +class BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_service_id(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_service_info(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static void set_has_password(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } +}; + +BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiAwareCredentials) +} +BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials(const BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + service_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + service_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_service_id()) { + service_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_service_id(), + GetArenaForAllocation()); + } + service_info_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + service_info_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_service_info()) { + service_info_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_service_info(), + GetArenaForAllocation()); + } + password_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + password_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_password()) { + password_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_password(), + GetArenaForAllocation()); + } + // @@protoc_insertion_point(copy_constructor:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiAwareCredentials) +} + +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials::SharedCtor() { +service_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + service_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +service_info_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + service_info_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +password_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + password_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials::~BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials() { + // @@protoc_insertion_point(destructor:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiAwareCredentials) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + service_id_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + service_info_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + password_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials::ArenaDtor(void* object) { + BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials* _this = reinterpret_cast< BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials* >(object); + (void)_this; +} +void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials::Clear() { +// @@protoc_insertion_point(message_clear_start:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiAwareCredentials) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + if (cached_has_bits & 0x00000001u) { + service_id_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000002u) { + service_info_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000004u) { + password_.ClearNonDefaultToEmpty(); + } + } + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional string service_id = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_service_id(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional bytes service_info = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + auto str = _internal_mutable_service_info(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional string password = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { + auto str = _internal_mutable_password(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiAwareCredentials) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional string service_id = 1; + if (cached_has_bits & 0x00000001u) { + target = stream->WriteStringMaybeAliased( + 1, this->_internal_service_id(), target); + } + + // optional bytes service_info = 2; + if (cached_has_bits & 0x00000002u) { + target = stream->WriteBytesMaybeAliased( + 2, this->_internal_service_info(), target); + } + + // optional string password = 3; + if (cached_has_bits & 0x00000004u) { + target = stream->WriteStringMaybeAliased( + 3, this->_internal_password(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiAwareCredentials) + return target; +} + +size_t BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiAwareCredentials) + 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 = _has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + // optional string service_id = 1; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_service_id()); + } + + // optional bytes service_info = 2; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_service_info()); + } + + // optional string password = 3; + if (cached_has_bits & 0x00000004u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_password()); + } + + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials::MergeFrom(const BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiAwareCredentials) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + if (cached_has_bits & 0x00000001u) { + _internal_set_service_id(from._internal_service_id()); + } + if (cached_has_bits & 0x00000002u) { + _internal_set_service_info(from._internal_service_info()); + } + if (cached_has_bits & 0x00000004u) { + _internal_set_password(from._internal_password()); + } + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials::CopyFrom(const BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiAwareCredentials) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials::IsInitialized() const { + return true; +} + +void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials::InternalSwap(BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &service_id_, lhs_arena, + &other->service_id_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &service_info_, lhs_arena, + &other->service_info_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &password_, lhs_arena, + &other->password_, rhs_arena + ); +} + +std::string BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials::GetTypeName() const { + return "location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiAwareCredentials"; +} + + +// =================================================================== + +class BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_ssid(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_password(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static void set_has_port(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } + static void set_has_frequency(HasBits* has_bits) { + (*has_bits)[0] |= 8u; + } +}; + +BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiDirectCredentials) +} +BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials(const BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + ssid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + ssid_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_ssid()) { + ssid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_ssid(), + GetArenaForAllocation()); + } + password_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + password_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_password()) { + password_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_password(), + GetArenaForAllocation()); + } + ::memcpy(&port_, &from.port_, + static_cast(reinterpret_cast(&frequency_) - + reinterpret_cast(&port_)) + sizeof(frequency_)); + // @@protoc_insertion_point(copy_constructor:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiDirectCredentials) +} + +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials::SharedCtor() { +ssid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + ssid_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +password_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + password_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&port_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&frequency_) - + reinterpret_cast(&port_)) + sizeof(frequency_)); +} + +BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials::~BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials() { + // @@protoc_insertion_point(destructor:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiDirectCredentials) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + ssid_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + password_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials::ArenaDtor(void* object) { + BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials* _this = reinterpret_cast< BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials* >(object); + (void)_this; +} +void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials::Clear() { +// @@protoc_insertion_point(message_clear_start:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiDirectCredentials) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + ssid_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000002u) { + password_.ClearNonDefaultToEmpty(); + } + } + if (cached_has_bits & 0x0000000cu) { + ::memset(&port_, 0, static_cast( + reinterpret_cast(&frequency_) - + reinterpret_cast(&port_)) + sizeof(frequency_)); + } + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional string ssid = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_ssid(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional string password = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + auto str = _internal_mutable_password(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional int32 port = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { + _Internal::set_has_port(&has_bits); + port_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional int32 frequency = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 32)) { + _Internal::set_has_frequency(&has_bits); + frequency_ = ::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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiDirectCredentials) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional string ssid = 1; + if (cached_has_bits & 0x00000001u) { + target = stream->WriteStringMaybeAliased( + 1, this->_internal_ssid(), target); + } + + // optional string password = 2; + if (cached_has_bits & 0x00000002u) { + target = stream->WriteStringMaybeAliased( + 2, this->_internal_password(), target); + } + + // optional int32 port = 3; + if (cached_has_bits & 0x00000004u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(3, this->_internal_port(), target); + } + + // optional int32 frequency = 4; + if (cached_has_bits & 0x00000008u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(4, this->_internal_frequency(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiDirectCredentials) + return target; +} + +size_t BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiDirectCredentials) + 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 = _has_bits_[0]; + if (cached_has_bits & 0x0000000fu) { + // optional string ssid = 1; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_ssid()); + } + + // optional string password = 2; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_password()); + } + + // optional int32 port = 3; + if (cached_has_bits & 0x00000004u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_port()); + } + + // optional int32 frequency = 4; + if (cached_has_bits & 0x00000008u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_frequency()); + } + + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials::MergeFrom(const BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiDirectCredentials) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x0000000fu) { + if (cached_has_bits & 0x00000001u) { + _internal_set_ssid(from._internal_ssid()); + } + if (cached_has_bits & 0x00000002u) { + _internal_set_password(from._internal_password()); + } + if (cached_has_bits & 0x00000004u) { + port_ = from.port_; + } + if (cached_has_bits & 0x00000008u) { + frequency_ = from.frequency_; + } + _has_bits_[0] |= cached_has_bits; + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials::CopyFrom(const BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiDirectCredentials) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials::IsInitialized() const { + return true; +} + +void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials::InternalSwap(BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &ssid_, lhs_arena, + &other->ssid_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &password_, lhs_arena, + &other->password_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials, frequency_) + + sizeof(BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials::frequency_) + - PROTOBUF_FIELD_OFFSET(BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials, port_)>( + reinterpret_cast(&port_), + reinterpret_cast(&other->port_)); +} + +std::string BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials::GetTypeName() const { + return "location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiDirectCredentials"; +} + + +// =================================================================== + +class BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_peer_id(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static const ::location::nearby::connections::LocationHint& location_hint(const BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials* msg); + static void set_has_location_hint(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } +}; + +const ::location::nearby::connections::LocationHint& +BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials::_Internal::location_hint(const BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials* msg) { + return *msg->location_hint_; +} +BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WebRtcCredentials) +} +BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials(const BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + peer_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + peer_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_peer_id()) { + peer_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_peer_id(), + GetArenaForAllocation()); + } + if (from._internal_has_location_hint()) { + location_hint_ = new ::location::nearby::connections::LocationHint(*from.location_hint_); + } else { + location_hint_ = nullptr; + } + // @@protoc_insertion_point(copy_constructor:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WebRtcCredentials) +} + +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials::SharedCtor() { +peer_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + peer_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +location_hint_ = nullptr; +} + +BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials::~BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials() { + // @@protoc_insertion_point(destructor:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WebRtcCredentials) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + peer_id_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (this != internal_default_instance()) delete location_hint_; +} + +void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials::ArenaDtor(void* object) { + BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials* _this = reinterpret_cast< BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials* >(object); + (void)_this; +} +void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials::Clear() { +// @@protoc_insertion_point(message_clear_start:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WebRtcCredentials) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + peer_id_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000002u) { + GOOGLE_DCHECK(location_hint_ != nullptr); + location_hint_->Clear(); + } + } + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional string peer_id = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_peer_id(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .location.nearby.connections.LocationHint location_hint = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + ptr = ctx->ParseMessage(_internal_mutable_location_hint(), 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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WebRtcCredentials) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional string peer_id = 1; + if (cached_has_bits & 0x00000001u) { + target = stream->WriteStringMaybeAliased( + 1, this->_internal_peer_id(), target); + } + + // optional .location.nearby.connections.LocationHint location_hint = 2; + if (cached_has_bits & 0x00000002u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 2, _Internal::location_hint(this), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WebRtcCredentials) + return target; +} + +size_t BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WebRtcCredentials) + 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 = _has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + // optional string peer_id = 1; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_peer_id()); + } + + // optional .location.nearby.connections.LocationHint location_hint = 2; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *location_hint_); + } + + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials::MergeFrom(const BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WebRtcCredentials) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + _internal_set_peer_id(from._internal_peer_id()); + } + if (cached_has_bits & 0x00000002u) { + _internal_mutable_location_hint()->::location::nearby::connections::LocationHint::MergeFrom(from._internal_location_hint()); + } + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials::CopyFrom(const BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WebRtcCredentials) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials::IsInitialized() const { + return true; +} + +void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials::InternalSwap(BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &peer_id_, lhs_arena, + &other->peer_id_, rhs_arena + ); + swap(location_hint_, other->location_hint_); +} + +std::string BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials::GetTypeName() const { + return "location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WebRtcCredentials"; +} + + +// =================================================================== + +class BandwidthUpgradeNegotiationFrame_UpgradePathInfo::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_medium(HasBits* has_bits) { + (*has_bits)[0] |= 64u; + } + static const ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials& wifi_hotspot_credentials(const BandwidthUpgradeNegotiationFrame_UpgradePathInfo* msg); + static void set_has_wifi_hotspot_credentials(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static const ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket& wifi_lan_socket(const BandwidthUpgradeNegotiationFrame_UpgradePathInfo* msg); + static void set_has_wifi_lan_socket(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static const ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials& bluetooth_credentials(const BandwidthUpgradeNegotiationFrame_UpgradePathInfo* msg); + static void set_has_bluetooth_credentials(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } + static const ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials& wifi_aware_credentials(const BandwidthUpgradeNegotiationFrame_UpgradePathInfo* msg); + static void set_has_wifi_aware_credentials(HasBits* has_bits) { + (*has_bits)[0] |= 8u; + } + static const ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials& wifi_direct_credentials(const BandwidthUpgradeNegotiationFrame_UpgradePathInfo* msg); + static void set_has_wifi_direct_credentials(HasBits* has_bits) { + (*has_bits)[0] |= 16u; + } + static const ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials& web_rtc_credentials(const BandwidthUpgradeNegotiationFrame_UpgradePathInfo* msg); + static void set_has_web_rtc_credentials(HasBits* has_bits) { + (*has_bits)[0] |= 32u; + } + static void set_has_supports_disabling_encryption(HasBits* has_bits) { + (*has_bits)[0] |= 128u; + } + static void set_has_supports_client_introduction_ack(HasBits* has_bits) { + (*has_bits)[0] |= 256u; + } +}; + +const ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials& +BandwidthUpgradeNegotiationFrame_UpgradePathInfo::_Internal::wifi_hotspot_credentials(const BandwidthUpgradeNegotiationFrame_UpgradePathInfo* msg) { + return *msg->wifi_hotspot_credentials_; +} +const ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket& +BandwidthUpgradeNegotiationFrame_UpgradePathInfo::_Internal::wifi_lan_socket(const BandwidthUpgradeNegotiationFrame_UpgradePathInfo* msg) { + return *msg->wifi_lan_socket_; +} +const ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials& +BandwidthUpgradeNegotiationFrame_UpgradePathInfo::_Internal::bluetooth_credentials(const BandwidthUpgradeNegotiationFrame_UpgradePathInfo* msg) { + return *msg->bluetooth_credentials_; +} +const ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials& +BandwidthUpgradeNegotiationFrame_UpgradePathInfo::_Internal::wifi_aware_credentials(const BandwidthUpgradeNegotiationFrame_UpgradePathInfo* msg) { + return *msg->wifi_aware_credentials_; +} +const ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials& +BandwidthUpgradeNegotiationFrame_UpgradePathInfo::_Internal::wifi_direct_credentials(const BandwidthUpgradeNegotiationFrame_UpgradePathInfo* msg) { + return *msg->wifi_direct_credentials_; +} +const ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials& +BandwidthUpgradeNegotiationFrame_UpgradePathInfo::_Internal::web_rtc_credentials(const BandwidthUpgradeNegotiationFrame_UpgradePathInfo* msg) { + return *msg->web_rtc_credentials_; +} +BandwidthUpgradeNegotiationFrame_UpgradePathInfo::BandwidthUpgradeNegotiationFrame_UpgradePathInfo(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo) +} +BandwidthUpgradeNegotiationFrame_UpgradePathInfo::BandwidthUpgradeNegotiationFrame_UpgradePathInfo(const BandwidthUpgradeNegotiationFrame_UpgradePathInfo& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + if (from._internal_has_wifi_hotspot_credentials()) { + wifi_hotspot_credentials_ = new ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials(*from.wifi_hotspot_credentials_); + } else { + wifi_hotspot_credentials_ = nullptr; + } + if (from._internal_has_wifi_lan_socket()) { + wifi_lan_socket_ = new ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket(*from.wifi_lan_socket_); + } else { + wifi_lan_socket_ = nullptr; + } + if (from._internal_has_bluetooth_credentials()) { + bluetooth_credentials_ = new ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials(*from.bluetooth_credentials_); + } else { + bluetooth_credentials_ = nullptr; + } + if (from._internal_has_wifi_aware_credentials()) { + wifi_aware_credentials_ = new ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials(*from.wifi_aware_credentials_); + } else { + wifi_aware_credentials_ = nullptr; + } + if (from._internal_has_wifi_direct_credentials()) { + wifi_direct_credentials_ = new ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials(*from.wifi_direct_credentials_); + } else { + wifi_direct_credentials_ = nullptr; + } + if (from._internal_has_web_rtc_credentials()) { + web_rtc_credentials_ = new ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials(*from.web_rtc_credentials_); + } else { + web_rtc_credentials_ = nullptr; + } + ::memcpy(&medium_, &from.medium_, + static_cast(reinterpret_cast(&supports_client_introduction_ack_) - + reinterpret_cast(&medium_)) + sizeof(supports_client_introduction_ack_)); + // @@protoc_insertion_point(copy_constructor:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo) +} + +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo::SharedCtor() { +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&wifi_hotspot_credentials_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&supports_client_introduction_ack_) - + reinterpret_cast(&wifi_hotspot_credentials_)) + sizeof(supports_client_introduction_ack_)); +} + +BandwidthUpgradeNegotiationFrame_UpgradePathInfo::~BandwidthUpgradeNegotiationFrame_UpgradePathInfo() { + // @@protoc_insertion_point(destructor:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + if (this != internal_default_instance()) delete wifi_hotspot_credentials_; + if (this != internal_default_instance()) delete wifi_lan_socket_; + if (this != internal_default_instance()) delete bluetooth_credentials_; + if (this != internal_default_instance()) delete wifi_aware_credentials_; + if (this != internal_default_instance()) delete wifi_direct_credentials_; + if (this != internal_default_instance()) delete web_rtc_credentials_; +} + +void BandwidthUpgradeNegotiationFrame_UpgradePathInfo::ArenaDtor(void* object) { + BandwidthUpgradeNegotiationFrame_UpgradePathInfo* _this = reinterpret_cast< BandwidthUpgradeNegotiationFrame_UpgradePathInfo* >(object); + (void)_this; +} +void BandwidthUpgradeNegotiationFrame_UpgradePathInfo::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void BandwidthUpgradeNegotiationFrame_UpgradePathInfo::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void BandwidthUpgradeNegotiationFrame_UpgradePathInfo::Clear() { +// @@protoc_insertion_point(message_clear_start:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x0000003fu) { + if (cached_has_bits & 0x00000001u) { + GOOGLE_DCHECK(wifi_hotspot_credentials_ != nullptr); + wifi_hotspot_credentials_->Clear(); + } + if (cached_has_bits & 0x00000002u) { + GOOGLE_DCHECK(wifi_lan_socket_ != nullptr); + wifi_lan_socket_->Clear(); + } + if (cached_has_bits & 0x00000004u) { + GOOGLE_DCHECK(bluetooth_credentials_ != nullptr); + bluetooth_credentials_->Clear(); + } + if (cached_has_bits & 0x00000008u) { + GOOGLE_DCHECK(wifi_aware_credentials_ != nullptr); + wifi_aware_credentials_->Clear(); + } + if (cached_has_bits & 0x00000010u) { + GOOGLE_DCHECK(wifi_direct_credentials_ != nullptr); + wifi_direct_credentials_->Clear(); + } + if (cached_has_bits & 0x00000020u) { + GOOGLE_DCHECK(web_rtc_credentials_ != nullptr); + web_rtc_credentials_->Clear(); + } + } + if (cached_has_bits & 0x000000c0u) { + ::memset(&medium_, 0, static_cast( + reinterpret_cast(&supports_disabling_encryption_) - + reinterpret_cast(&medium_)) + sizeof(supports_disabling_encryption_)); + } + supports_client_introduction_ack_ = false; + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* BandwidthUpgradeNegotiationFrame_UpgradePathInfo::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional .location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.Medium medium = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium_IsValid(val))) { + _internal_set_medium(static_cast<::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // optional .location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiHotspotCredentials wifi_hotspot_credentials = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + ptr = ctx->ParseMessage(_internal_mutable_wifi_hotspot_credentials(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiLanSocket wifi_lan_socket = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { + ptr = ctx->ParseMessage(_internal_mutable_wifi_lan_socket(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.BluetoothCredentials bluetooth_credentials = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { + ptr = ctx->ParseMessage(_internal_mutable_bluetooth_credentials(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiAwareCredentials wifi_aware_credentials = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 42)) { + ptr = ctx->ParseMessage(_internal_mutable_wifi_aware_credentials(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiDirectCredentials wifi_direct_credentials = 6; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 50)) { + ptr = ctx->ParseMessage(_internal_mutable_wifi_direct_credentials(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional bool supports_disabling_encryption = 7; + case 7: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 56)) { + _Internal::set_has_supports_disabling_encryption(&has_bits); + supports_disabling_encryption_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WebRtcCredentials web_rtc_credentials = 8; + case 8: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 66)) { + ptr = ctx->ParseMessage(_internal_mutable_web_rtc_credentials(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional bool supports_client_introduction_ack = 9; + case 9: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 72)) { + _Internal::set_has_supports_client_introduction_ack(&has_bits); + supports_client_introduction_ack_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* BandwidthUpgradeNegotiationFrame_UpgradePathInfo::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional .location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.Medium medium = 1; + if (cached_has_bits & 0x00000040u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 1, this->_internal_medium(), target); + } + + // optional .location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiHotspotCredentials wifi_hotspot_credentials = 2; + if (cached_has_bits & 0x00000001u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 2, _Internal::wifi_hotspot_credentials(this), target, stream); + } + + // optional .location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiLanSocket wifi_lan_socket = 3; + if (cached_has_bits & 0x00000002u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 3, _Internal::wifi_lan_socket(this), target, stream); + } + + // optional .location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.BluetoothCredentials bluetooth_credentials = 4; + if (cached_has_bits & 0x00000004u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 4, _Internal::bluetooth_credentials(this), target, stream); + } + + // optional .location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiAwareCredentials wifi_aware_credentials = 5; + if (cached_has_bits & 0x00000008u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 5, _Internal::wifi_aware_credentials(this), target, stream); + } + + // optional .location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiDirectCredentials wifi_direct_credentials = 6; + if (cached_has_bits & 0x00000010u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 6, _Internal::wifi_direct_credentials(this), target, stream); + } + + // optional bool supports_disabling_encryption = 7; + if (cached_has_bits & 0x00000080u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(7, this->_internal_supports_disabling_encryption(), target); + } + + // optional .location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WebRtcCredentials web_rtc_credentials = 8; + if (cached_has_bits & 0x00000020u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 8, _Internal::web_rtc_credentials(this), target, stream); + } + + // optional bool supports_client_introduction_ack = 9; + if (cached_has_bits & 0x00000100u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(9, this->_internal_supports_client_introduction_ack(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo) + return target; +} + +size_t BandwidthUpgradeNegotiationFrame_UpgradePathInfo::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo) + 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 = _has_bits_[0]; + if (cached_has_bits & 0x000000ffu) { + // optional .location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiHotspotCredentials wifi_hotspot_credentials = 2; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *wifi_hotspot_credentials_); + } + + // optional .location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiLanSocket wifi_lan_socket = 3; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *wifi_lan_socket_); + } + + // optional .location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.BluetoothCredentials bluetooth_credentials = 4; + if (cached_has_bits & 0x00000004u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *bluetooth_credentials_); + } + + // optional .location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiAwareCredentials wifi_aware_credentials = 5; + if (cached_has_bits & 0x00000008u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *wifi_aware_credentials_); + } + + // optional .location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiDirectCredentials wifi_direct_credentials = 6; + if (cached_has_bits & 0x00000010u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *wifi_direct_credentials_); + } + + // optional .location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WebRtcCredentials web_rtc_credentials = 8; + if (cached_has_bits & 0x00000020u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *web_rtc_credentials_); + } + + // optional .location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.Medium medium = 1; + if (cached_has_bits & 0x00000040u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_medium()); + } + + // optional bool supports_disabling_encryption = 7; + if (cached_has_bits & 0x00000080u) { + total_size += 1 + 1; + } + + } + // optional bool supports_client_introduction_ack = 9; + if (cached_has_bits & 0x00000100u) { + total_size += 1 + 1; + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void BandwidthUpgradeNegotiationFrame_UpgradePathInfo::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void BandwidthUpgradeNegotiationFrame_UpgradePathInfo::MergeFrom(const BandwidthUpgradeNegotiationFrame_UpgradePathInfo& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x000000ffu) { + if (cached_has_bits & 0x00000001u) { + _internal_mutable_wifi_hotspot_credentials()->::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials::MergeFrom(from._internal_wifi_hotspot_credentials()); + } + if (cached_has_bits & 0x00000002u) { + _internal_mutable_wifi_lan_socket()->::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket::MergeFrom(from._internal_wifi_lan_socket()); + } + if (cached_has_bits & 0x00000004u) { + _internal_mutable_bluetooth_credentials()->::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials::MergeFrom(from._internal_bluetooth_credentials()); + } + if (cached_has_bits & 0x00000008u) { + _internal_mutable_wifi_aware_credentials()->::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials::MergeFrom(from._internal_wifi_aware_credentials()); + } + if (cached_has_bits & 0x00000010u) { + _internal_mutable_wifi_direct_credentials()->::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials::MergeFrom(from._internal_wifi_direct_credentials()); + } + if (cached_has_bits & 0x00000020u) { + _internal_mutable_web_rtc_credentials()->::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials::MergeFrom(from._internal_web_rtc_credentials()); + } + if (cached_has_bits & 0x00000040u) { + medium_ = from.medium_; + } + if (cached_has_bits & 0x00000080u) { + supports_disabling_encryption_ = from.supports_disabling_encryption_; + } + _has_bits_[0] |= cached_has_bits; + } + if (cached_has_bits & 0x00000100u) { + _internal_set_supports_client_introduction_ack(from._internal_supports_client_introduction_ack()); + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void BandwidthUpgradeNegotiationFrame_UpgradePathInfo::CopyFrom(const BandwidthUpgradeNegotiationFrame_UpgradePathInfo& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool BandwidthUpgradeNegotiationFrame_UpgradePathInfo::IsInitialized() const { + return true; +} + +void BandwidthUpgradeNegotiationFrame_UpgradePathInfo::InternalSwap(BandwidthUpgradeNegotiationFrame_UpgradePathInfo* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(BandwidthUpgradeNegotiationFrame_UpgradePathInfo, supports_client_introduction_ack_) + + sizeof(BandwidthUpgradeNegotiationFrame_UpgradePathInfo::supports_client_introduction_ack_) + - PROTOBUF_FIELD_OFFSET(BandwidthUpgradeNegotiationFrame_UpgradePathInfo, wifi_hotspot_credentials_)>( + reinterpret_cast(&wifi_hotspot_credentials_), + reinterpret_cast(&other->wifi_hotspot_credentials_)); +} + +std::string BandwidthUpgradeNegotiationFrame_UpgradePathInfo::GetTypeName() const { + return "location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo"; +} + + +// =================================================================== + +class BandwidthUpgradeNegotiationFrame_ClientIntroduction::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_endpoint_id(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_supports_disabling_encryption(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } +}; + +BandwidthUpgradeNegotiationFrame_ClientIntroduction::BandwidthUpgradeNegotiationFrame_ClientIntroduction(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:location.nearby.connections.BandwidthUpgradeNegotiationFrame.ClientIntroduction) +} +BandwidthUpgradeNegotiationFrame_ClientIntroduction::BandwidthUpgradeNegotiationFrame_ClientIntroduction(const BandwidthUpgradeNegotiationFrame_ClientIntroduction& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + endpoint_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + endpoint_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_endpoint_id()) { + endpoint_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_endpoint_id(), + GetArenaForAllocation()); + } + supports_disabling_encryption_ = from.supports_disabling_encryption_; + // @@protoc_insertion_point(copy_constructor:location.nearby.connections.BandwidthUpgradeNegotiationFrame.ClientIntroduction) +} + +inline void BandwidthUpgradeNegotiationFrame_ClientIntroduction::SharedCtor() { +endpoint_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + endpoint_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +supports_disabling_encryption_ = false; +} + +BandwidthUpgradeNegotiationFrame_ClientIntroduction::~BandwidthUpgradeNegotiationFrame_ClientIntroduction() { + // @@protoc_insertion_point(destructor:location.nearby.connections.BandwidthUpgradeNegotiationFrame.ClientIntroduction) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void BandwidthUpgradeNegotiationFrame_ClientIntroduction::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + endpoint_id_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void BandwidthUpgradeNegotiationFrame_ClientIntroduction::ArenaDtor(void* object) { + BandwidthUpgradeNegotiationFrame_ClientIntroduction* _this = reinterpret_cast< BandwidthUpgradeNegotiationFrame_ClientIntroduction* >(object); + (void)_this; +} +void BandwidthUpgradeNegotiationFrame_ClientIntroduction::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void BandwidthUpgradeNegotiationFrame_ClientIntroduction::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void BandwidthUpgradeNegotiationFrame_ClientIntroduction::Clear() { +// @@protoc_insertion_point(message_clear_start:location.nearby.connections.BandwidthUpgradeNegotiationFrame.ClientIntroduction) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + endpoint_id_.ClearNonDefaultToEmpty(); + } + supports_disabling_encryption_ = false; + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* BandwidthUpgradeNegotiationFrame_ClientIntroduction::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional string endpoint_id = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_endpoint_id(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional bool supports_disabling_encryption = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { + _Internal::set_has_supports_disabling_encryption(&has_bits); + supports_disabling_encryption_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* BandwidthUpgradeNegotiationFrame_ClientIntroduction::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:location.nearby.connections.BandwidthUpgradeNegotiationFrame.ClientIntroduction) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional string endpoint_id = 1; + if (cached_has_bits & 0x00000001u) { + target = stream->WriteStringMaybeAliased( + 1, this->_internal_endpoint_id(), target); + } + + // optional bool supports_disabling_encryption = 2; + if (cached_has_bits & 0x00000002u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(2, this->_internal_supports_disabling_encryption(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:location.nearby.connections.BandwidthUpgradeNegotiationFrame.ClientIntroduction) + return target; +} + +size_t BandwidthUpgradeNegotiationFrame_ClientIntroduction::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:location.nearby.connections.BandwidthUpgradeNegotiationFrame.ClientIntroduction) + 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 = _has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + // optional string endpoint_id = 1; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_endpoint_id()); + } + + // optional bool supports_disabling_encryption = 2; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + 1; + } + + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void BandwidthUpgradeNegotiationFrame_ClientIntroduction::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void BandwidthUpgradeNegotiationFrame_ClientIntroduction::MergeFrom(const BandwidthUpgradeNegotiationFrame_ClientIntroduction& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:location.nearby.connections.BandwidthUpgradeNegotiationFrame.ClientIntroduction) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + _internal_set_endpoint_id(from._internal_endpoint_id()); + } + if (cached_has_bits & 0x00000002u) { + supports_disabling_encryption_ = from.supports_disabling_encryption_; + } + _has_bits_[0] |= cached_has_bits; + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void BandwidthUpgradeNegotiationFrame_ClientIntroduction::CopyFrom(const BandwidthUpgradeNegotiationFrame_ClientIntroduction& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:location.nearby.connections.BandwidthUpgradeNegotiationFrame.ClientIntroduction) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool BandwidthUpgradeNegotiationFrame_ClientIntroduction::IsInitialized() const { + return true; +} + +void BandwidthUpgradeNegotiationFrame_ClientIntroduction::InternalSwap(BandwidthUpgradeNegotiationFrame_ClientIntroduction* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &endpoint_id_, lhs_arena, + &other->endpoint_id_, rhs_arena + ); + swap(supports_disabling_encryption_, other->supports_disabling_encryption_); +} + +std::string BandwidthUpgradeNegotiationFrame_ClientIntroduction::GetTypeName() const { + return "location.nearby.connections.BandwidthUpgradeNegotiationFrame.ClientIntroduction"; +} + + +// =================================================================== + +class BandwidthUpgradeNegotiationFrame_ClientIntroductionAck::_Internal { + public: +}; + +BandwidthUpgradeNegotiationFrame_ClientIntroductionAck::BandwidthUpgradeNegotiationFrame_ClientIntroductionAck(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:location.nearby.connections.BandwidthUpgradeNegotiationFrame.ClientIntroductionAck) +} +BandwidthUpgradeNegotiationFrame_ClientIntroductionAck::BandwidthUpgradeNegotiationFrame_ClientIntroductionAck(const BandwidthUpgradeNegotiationFrame_ClientIntroductionAck& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite() { + _internal_metadata_.MergeFrom(from._internal_metadata_); + // @@protoc_insertion_point(copy_constructor:location.nearby.connections.BandwidthUpgradeNegotiationFrame.ClientIntroductionAck) +} + +inline void BandwidthUpgradeNegotiationFrame_ClientIntroductionAck::SharedCtor() { +} + +BandwidthUpgradeNegotiationFrame_ClientIntroductionAck::~BandwidthUpgradeNegotiationFrame_ClientIntroductionAck() { + // @@protoc_insertion_point(destructor:location.nearby.connections.BandwidthUpgradeNegotiationFrame.ClientIntroductionAck) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void BandwidthUpgradeNegotiationFrame_ClientIntroductionAck::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); +} + +void BandwidthUpgradeNegotiationFrame_ClientIntroductionAck::ArenaDtor(void* object) { + BandwidthUpgradeNegotiationFrame_ClientIntroductionAck* _this = reinterpret_cast< BandwidthUpgradeNegotiationFrame_ClientIntroductionAck* >(object); + (void)_this; +} +void BandwidthUpgradeNegotiationFrame_ClientIntroductionAck::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void BandwidthUpgradeNegotiationFrame_ClientIntroductionAck::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void BandwidthUpgradeNegotiationFrame_ClientIntroductionAck::Clear() { +// @@protoc_insertion_point(message_clear_start:location.nearby.connections.BandwidthUpgradeNegotiationFrame.ClientIntroductionAck) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _internal_metadata_.Clear(); +} + +const char* BandwidthUpgradeNegotiationFrame_ClientIntroductionAck::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* BandwidthUpgradeNegotiationFrame_ClientIntroductionAck::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:location.nearby.connections.BandwidthUpgradeNegotiationFrame.ClientIntroductionAck) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:location.nearby.connections.BandwidthUpgradeNegotiationFrame.ClientIntroductionAck) + return target; +} + +size_t BandwidthUpgradeNegotiationFrame_ClientIntroductionAck::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:location.nearby.connections.BandwidthUpgradeNegotiationFrame.ClientIntroductionAck) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void BandwidthUpgradeNegotiationFrame_ClientIntroductionAck::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void BandwidthUpgradeNegotiationFrame_ClientIntroductionAck::MergeFrom(const BandwidthUpgradeNegotiationFrame_ClientIntroductionAck& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:location.nearby.connections.BandwidthUpgradeNegotiationFrame.ClientIntroductionAck) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void BandwidthUpgradeNegotiationFrame_ClientIntroductionAck::CopyFrom(const BandwidthUpgradeNegotiationFrame_ClientIntroductionAck& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:location.nearby.connections.BandwidthUpgradeNegotiationFrame.ClientIntroductionAck) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool BandwidthUpgradeNegotiationFrame_ClientIntroductionAck::IsInitialized() const { + return true; +} + +void BandwidthUpgradeNegotiationFrame_ClientIntroductionAck::InternalSwap(BandwidthUpgradeNegotiationFrame_ClientIntroductionAck* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); +} + +std::string BandwidthUpgradeNegotiationFrame_ClientIntroductionAck::GetTypeName() const { + return "location.nearby.connections.BandwidthUpgradeNegotiationFrame.ClientIntroductionAck"; +} + + +// =================================================================== + +class BandwidthUpgradeNegotiationFrame::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_event_type(HasBits* has_bits) { + (*has_bits)[0] |= 8u; + } + static const ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo& upgrade_path_info(const BandwidthUpgradeNegotiationFrame* msg); + static void set_has_upgrade_path_info(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static const ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_ClientIntroduction& client_introduction(const BandwidthUpgradeNegotiationFrame* msg); + static void set_has_client_introduction(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static const ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_ClientIntroductionAck& client_introduction_ack(const BandwidthUpgradeNegotiationFrame* msg); + static void set_has_client_introduction_ack(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } +}; + +const ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo& +BandwidthUpgradeNegotiationFrame::_Internal::upgrade_path_info(const BandwidthUpgradeNegotiationFrame* msg) { + return *msg->upgrade_path_info_; +} +const ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_ClientIntroduction& +BandwidthUpgradeNegotiationFrame::_Internal::client_introduction(const BandwidthUpgradeNegotiationFrame* msg) { + return *msg->client_introduction_; +} +const ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_ClientIntroductionAck& +BandwidthUpgradeNegotiationFrame::_Internal::client_introduction_ack(const BandwidthUpgradeNegotiationFrame* msg) { + return *msg->client_introduction_ack_; +} +BandwidthUpgradeNegotiationFrame::BandwidthUpgradeNegotiationFrame(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:location.nearby.connections.BandwidthUpgradeNegotiationFrame) +} +BandwidthUpgradeNegotiationFrame::BandwidthUpgradeNegotiationFrame(const BandwidthUpgradeNegotiationFrame& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + if (from._internal_has_upgrade_path_info()) { + upgrade_path_info_ = new ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo(*from.upgrade_path_info_); + } else { + upgrade_path_info_ = nullptr; + } + if (from._internal_has_client_introduction()) { + client_introduction_ = new ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_ClientIntroduction(*from.client_introduction_); + } else { + client_introduction_ = nullptr; + } + if (from._internal_has_client_introduction_ack()) { + client_introduction_ack_ = new ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_ClientIntroductionAck(*from.client_introduction_ack_); + } else { + client_introduction_ack_ = nullptr; + } + event_type_ = from.event_type_; + // @@protoc_insertion_point(copy_constructor:location.nearby.connections.BandwidthUpgradeNegotiationFrame) +} + +inline void BandwidthUpgradeNegotiationFrame::SharedCtor() { +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&upgrade_path_info_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&event_type_) - + reinterpret_cast(&upgrade_path_info_)) + sizeof(event_type_)); +} + +BandwidthUpgradeNegotiationFrame::~BandwidthUpgradeNegotiationFrame() { + // @@protoc_insertion_point(destructor:location.nearby.connections.BandwidthUpgradeNegotiationFrame) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void BandwidthUpgradeNegotiationFrame::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + if (this != internal_default_instance()) delete upgrade_path_info_; + if (this != internal_default_instance()) delete client_introduction_; + if (this != internal_default_instance()) delete client_introduction_ack_; +} + +void BandwidthUpgradeNegotiationFrame::ArenaDtor(void* object) { + BandwidthUpgradeNegotiationFrame* _this = reinterpret_cast< BandwidthUpgradeNegotiationFrame* >(object); + (void)_this; +} +void BandwidthUpgradeNegotiationFrame::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void BandwidthUpgradeNegotiationFrame::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void BandwidthUpgradeNegotiationFrame::Clear() { +// @@protoc_insertion_point(message_clear_start:location.nearby.connections.BandwidthUpgradeNegotiationFrame) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + if (cached_has_bits & 0x00000001u) { + GOOGLE_DCHECK(upgrade_path_info_ != nullptr); + upgrade_path_info_->Clear(); + } + if (cached_has_bits & 0x00000002u) { + GOOGLE_DCHECK(client_introduction_ != nullptr); + client_introduction_->Clear(); + } + if (cached_has_bits & 0x00000004u) { + GOOGLE_DCHECK(client_introduction_ack_ != nullptr); + client_introduction_ack_->Clear(); + } + } + event_type_ = 0; + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* BandwidthUpgradeNegotiationFrame::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional .location.nearby.connections.BandwidthUpgradeNegotiationFrame.EventType event_type = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::location::nearby::connections::BandwidthUpgradeNegotiationFrame_EventType_IsValid(val))) { + _internal_set_event_type(static_cast<::location::nearby::connections::BandwidthUpgradeNegotiationFrame_EventType>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // optional .location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo upgrade_path_info = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + ptr = ctx->ParseMessage(_internal_mutable_upgrade_path_info(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .location.nearby.connections.BandwidthUpgradeNegotiationFrame.ClientIntroduction client_introduction = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { + ptr = ctx->ParseMessage(_internal_mutable_client_introduction(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .location.nearby.connections.BandwidthUpgradeNegotiationFrame.ClientIntroductionAck client_introduction_ack = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { + ptr = ctx->ParseMessage(_internal_mutable_client_introduction_ack(), 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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* BandwidthUpgradeNegotiationFrame::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:location.nearby.connections.BandwidthUpgradeNegotiationFrame) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional .location.nearby.connections.BandwidthUpgradeNegotiationFrame.EventType event_type = 1; + if (cached_has_bits & 0x00000008u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 1, this->_internal_event_type(), target); + } + + // optional .location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo upgrade_path_info = 2; + if (cached_has_bits & 0x00000001u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 2, _Internal::upgrade_path_info(this), target, stream); + } + + // optional .location.nearby.connections.BandwidthUpgradeNegotiationFrame.ClientIntroduction client_introduction = 3; + if (cached_has_bits & 0x00000002u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 3, _Internal::client_introduction(this), target, stream); + } + + // optional .location.nearby.connections.BandwidthUpgradeNegotiationFrame.ClientIntroductionAck client_introduction_ack = 4; + if (cached_has_bits & 0x00000004u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 4, _Internal::client_introduction_ack(this), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:location.nearby.connections.BandwidthUpgradeNegotiationFrame) + return target; +} + +size_t BandwidthUpgradeNegotiationFrame::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:location.nearby.connections.BandwidthUpgradeNegotiationFrame) + 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 = _has_bits_[0]; + if (cached_has_bits & 0x0000000fu) { + // optional .location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo upgrade_path_info = 2; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *upgrade_path_info_); + } + + // optional .location.nearby.connections.BandwidthUpgradeNegotiationFrame.ClientIntroduction client_introduction = 3; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *client_introduction_); + } + + // optional .location.nearby.connections.BandwidthUpgradeNegotiationFrame.ClientIntroductionAck client_introduction_ack = 4; + if (cached_has_bits & 0x00000004u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *client_introduction_ack_); + } + + // optional .location.nearby.connections.BandwidthUpgradeNegotiationFrame.EventType event_type = 1; + if (cached_has_bits & 0x00000008u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_event_type()); + } + + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void BandwidthUpgradeNegotiationFrame::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void BandwidthUpgradeNegotiationFrame::MergeFrom(const BandwidthUpgradeNegotiationFrame& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:location.nearby.connections.BandwidthUpgradeNegotiationFrame) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x0000000fu) { + if (cached_has_bits & 0x00000001u) { + _internal_mutable_upgrade_path_info()->::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo::MergeFrom(from._internal_upgrade_path_info()); + } + if (cached_has_bits & 0x00000002u) { + _internal_mutable_client_introduction()->::location::nearby::connections::BandwidthUpgradeNegotiationFrame_ClientIntroduction::MergeFrom(from._internal_client_introduction()); + } + if (cached_has_bits & 0x00000004u) { + _internal_mutable_client_introduction_ack()->::location::nearby::connections::BandwidthUpgradeNegotiationFrame_ClientIntroductionAck::MergeFrom(from._internal_client_introduction_ack()); + } + if (cached_has_bits & 0x00000008u) { + event_type_ = from.event_type_; + } + _has_bits_[0] |= cached_has_bits; + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void BandwidthUpgradeNegotiationFrame::CopyFrom(const BandwidthUpgradeNegotiationFrame& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:location.nearby.connections.BandwidthUpgradeNegotiationFrame) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool BandwidthUpgradeNegotiationFrame::IsInitialized() const { + return true; +} + +void BandwidthUpgradeNegotiationFrame::InternalSwap(BandwidthUpgradeNegotiationFrame* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(BandwidthUpgradeNegotiationFrame, event_type_) + + sizeof(BandwidthUpgradeNegotiationFrame::event_type_) + - PROTOBUF_FIELD_OFFSET(BandwidthUpgradeNegotiationFrame, upgrade_path_info_)>( + reinterpret_cast(&upgrade_path_info_), + reinterpret_cast(&other->upgrade_path_info_)); +} + +std::string BandwidthUpgradeNegotiationFrame::GetTypeName() const { + return "location.nearby.connections.BandwidthUpgradeNegotiationFrame"; +} + + +// =================================================================== + +class KeepAliveFrame::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_ack(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } +}; + +KeepAliveFrame::KeepAliveFrame(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:location.nearby.connections.KeepAliveFrame) +} +KeepAliveFrame::KeepAliveFrame(const KeepAliveFrame& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + ack_ = from.ack_; + // @@protoc_insertion_point(copy_constructor:location.nearby.connections.KeepAliveFrame) +} + +inline void KeepAliveFrame::SharedCtor() { +ack_ = false; +} + +KeepAliveFrame::~KeepAliveFrame() { + // @@protoc_insertion_point(destructor:location.nearby.connections.KeepAliveFrame) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void KeepAliveFrame::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); +} + +void KeepAliveFrame::ArenaDtor(void* object) { + KeepAliveFrame* _this = reinterpret_cast< KeepAliveFrame* >(object); + (void)_this; +} +void KeepAliveFrame::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void KeepAliveFrame::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void KeepAliveFrame::Clear() { +// @@protoc_insertion_point(message_clear_start:location.nearby.connections.KeepAliveFrame) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + ack_ = false; + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* KeepAliveFrame::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional bool ack = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + _Internal::set_has_ack(&has_bits); + ack_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* KeepAliveFrame::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:location.nearby.connections.KeepAliveFrame) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional bool ack = 1; + if (cached_has_bits & 0x00000001u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(1, this->_internal_ack(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:location.nearby.connections.KeepAliveFrame) + return target; +} + +size_t KeepAliveFrame::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:location.nearby.connections.KeepAliveFrame) + 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 bool ack = 1; + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + 1; + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void KeepAliveFrame::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void KeepAliveFrame::MergeFrom(const KeepAliveFrame& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:location.nearby.connections.KeepAliveFrame) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_has_ack()) { + _internal_set_ack(from._internal_ack()); + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void KeepAliveFrame::CopyFrom(const KeepAliveFrame& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:location.nearby.connections.KeepAliveFrame) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool KeepAliveFrame::IsInitialized() const { + return true; +} + +void KeepAliveFrame::InternalSwap(KeepAliveFrame* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + swap(ack_, other->ack_); +} + +std::string KeepAliveFrame::GetTypeName() const { + return "location.nearby.connections.KeepAliveFrame"; +} + + +// =================================================================== + +class DisconnectionFrame::_Internal { + public: +}; + +DisconnectionFrame::DisconnectionFrame(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:location.nearby.connections.DisconnectionFrame) +} +DisconnectionFrame::DisconnectionFrame(const DisconnectionFrame& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite() { + _internal_metadata_.MergeFrom(from._internal_metadata_); + // @@protoc_insertion_point(copy_constructor:location.nearby.connections.DisconnectionFrame) +} + +inline void DisconnectionFrame::SharedCtor() { +} + +DisconnectionFrame::~DisconnectionFrame() { + // @@protoc_insertion_point(destructor:location.nearby.connections.DisconnectionFrame) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void DisconnectionFrame::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); +} + +void DisconnectionFrame::ArenaDtor(void* object) { + DisconnectionFrame* _this = reinterpret_cast< DisconnectionFrame* >(object); + (void)_this; +} +void DisconnectionFrame::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void DisconnectionFrame::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void DisconnectionFrame::Clear() { +// @@protoc_insertion_point(message_clear_start:location.nearby.connections.DisconnectionFrame) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _internal_metadata_.Clear(); +} + +const char* DisconnectionFrame::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* DisconnectionFrame::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:location.nearby.connections.DisconnectionFrame) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:location.nearby.connections.DisconnectionFrame) + return target; +} + +size_t DisconnectionFrame::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:location.nearby.connections.DisconnectionFrame) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void DisconnectionFrame::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void DisconnectionFrame::MergeFrom(const DisconnectionFrame& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:location.nearby.connections.DisconnectionFrame) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void DisconnectionFrame::CopyFrom(const DisconnectionFrame& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:location.nearby.connections.DisconnectionFrame) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool DisconnectionFrame::IsInitialized() const { + return true; +} + +void DisconnectionFrame::InternalSwap(DisconnectionFrame* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); +} + +std::string DisconnectionFrame::GetTypeName() const { + return "location.nearby.connections.DisconnectionFrame"; +} + + +// =================================================================== + +class PairedKeyEncryptionFrame::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_signed_data(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } +}; + +PairedKeyEncryptionFrame::PairedKeyEncryptionFrame(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:location.nearby.connections.PairedKeyEncryptionFrame) +} +PairedKeyEncryptionFrame::PairedKeyEncryptionFrame(const PairedKeyEncryptionFrame& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + signed_data_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + signed_data_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_signed_data()) { + signed_data_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_signed_data(), + GetArenaForAllocation()); + } + // @@protoc_insertion_point(copy_constructor:location.nearby.connections.PairedKeyEncryptionFrame) +} + +inline void PairedKeyEncryptionFrame::SharedCtor() { +signed_data_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + signed_data_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +PairedKeyEncryptionFrame::~PairedKeyEncryptionFrame() { + // @@protoc_insertion_point(destructor:location.nearby.connections.PairedKeyEncryptionFrame) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void PairedKeyEncryptionFrame::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + signed_data_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void PairedKeyEncryptionFrame::ArenaDtor(void* object) { + PairedKeyEncryptionFrame* _this = reinterpret_cast< PairedKeyEncryptionFrame* >(object); + (void)_this; +} +void PairedKeyEncryptionFrame::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void PairedKeyEncryptionFrame::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void PairedKeyEncryptionFrame::Clear() { +// @@protoc_insertion_point(message_clear_start:location.nearby.connections.PairedKeyEncryptionFrame) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + signed_data_.ClearNonDefaultToEmpty(); + } + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* PairedKeyEncryptionFrame::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional bytes signed_data = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_signed_data(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* PairedKeyEncryptionFrame::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:location.nearby.connections.PairedKeyEncryptionFrame) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional bytes signed_data = 1; + if (cached_has_bits & 0x00000001u) { + target = stream->WriteBytesMaybeAliased( + 1, this->_internal_signed_data(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:location.nearby.connections.PairedKeyEncryptionFrame) + return target; +} + +size_t PairedKeyEncryptionFrame::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:location.nearby.connections.PairedKeyEncryptionFrame) + 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 signed_data = 1; + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_signed_data()); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void PairedKeyEncryptionFrame::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void PairedKeyEncryptionFrame::MergeFrom(const PairedKeyEncryptionFrame& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:location.nearby.connections.PairedKeyEncryptionFrame) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_has_signed_data()) { + _internal_set_signed_data(from._internal_signed_data()); + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void PairedKeyEncryptionFrame::CopyFrom(const PairedKeyEncryptionFrame& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:location.nearby.connections.PairedKeyEncryptionFrame) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool PairedKeyEncryptionFrame::IsInitialized() const { + return true; +} + +void PairedKeyEncryptionFrame::InternalSwap(PairedKeyEncryptionFrame* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &signed_data_, lhs_arena, + &other->signed_data_, rhs_arena + ); +} + +std::string PairedKeyEncryptionFrame::GetTypeName() const { + return "location.nearby.connections.PairedKeyEncryptionFrame"; +} + + +// =================================================================== + +class MediumMetadata::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_supports_5_ghz(HasBits* has_bits) { + (*has_bits)[0] |= 128u; + } + static void set_has_bssid(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_ip_address(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static void set_has_supports_6_ghz(HasBits* has_bits) { + (*has_bits)[0] |= 256u; + } + static void set_has_mobile_radio(HasBits* has_bits) { + (*has_bits)[0] |= 512u; + } + static void set_has_ap_frequency(HasBits* has_bits) { + (*has_bits)[0] |= 1024u; + } + static const ::location::nearby::connections::AvailableChannels& available_channels(const MediumMetadata* msg); + static void set_has_available_channels(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } + static const ::location::nearby::connections::WifiDirectCliUsableChannels& wifi_direct_cli_usable_channels(const MediumMetadata* msg); + static void set_has_wifi_direct_cli_usable_channels(HasBits* has_bits) { + (*has_bits)[0] |= 8u; + } + static const ::location::nearby::connections::WifiLanUsableChannels& wifi_lan_usable_channels(const MediumMetadata* msg); + static void set_has_wifi_lan_usable_channels(HasBits* has_bits) { + (*has_bits)[0] |= 16u; + } + static const ::location::nearby::connections::WifiAwareUsableChannels& wifi_aware_usable_channels(const MediumMetadata* msg); + static void set_has_wifi_aware_usable_channels(HasBits* has_bits) { + (*has_bits)[0] |= 32u; + } + static const ::location::nearby::connections::WifiHotspotStaUsableChannels& wifi_hotspot_sta_usable_channels(const MediumMetadata* msg); + static void set_has_wifi_hotspot_sta_usable_channels(HasBits* has_bits) { + (*has_bits)[0] |= 64u; + } +}; + +const ::location::nearby::connections::AvailableChannels& +MediumMetadata::_Internal::available_channels(const MediumMetadata* msg) { + return *msg->available_channels_; +} +const ::location::nearby::connections::WifiDirectCliUsableChannels& +MediumMetadata::_Internal::wifi_direct_cli_usable_channels(const MediumMetadata* msg) { + return *msg->wifi_direct_cli_usable_channels_; +} +const ::location::nearby::connections::WifiLanUsableChannels& +MediumMetadata::_Internal::wifi_lan_usable_channels(const MediumMetadata* msg) { + return *msg->wifi_lan_usable_channels_; +} +const ::location::nearby::connections::WifiAwareUsableChannels& +MediumMetadata::_Internal::wifi_aware_usable_channels(const MediumMetadata* msg) { + return *msg->wifi_aware_usable_channels_; +} +const ::location::nearby::connections::WifiHotspotStaUsableChannels& +MediumMetadata::_Internal::wifi_hotspot_sta_usable_channels(const MediumMetadata* msg) { + return *msg->wifi_hotspot_sta_usable_channels_; +} +MediumMetadata::MediumMetadata(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:location.nearby.connections.MediumMetadata) +} +MediumMetadata::MediumMetadata(const MediumMetadata& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + bssid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + bssid_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_bssid()) { + bssid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_bssid(), + GetArenaForAllocation()); + } + ip_address_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + ip_address_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_ip_address()) { + ip_address_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_ip_address(), + GetArenaForAllocation()); + } + if (from._internal_has_available_channels()) { + available_channels_ = new ::location::nearby::connections::AvailableChannels(*from.available_channels_); + } else { + available_channels_ = nullptr; + } + if (from._internal_has_wifi_direct_cli_usable_channels()) { + wifi_direct_cli_usable_channels_ = new ::location::nearby::connections::WifiDirectCliUsableChannels(*from.wifi_direct_cli_usable_channels_); + } else { + wifi_direct_cli_usable_channels_ = nullptr; + } + if (from._internal_has_wifi_lan_usable_channels()) { + wifi_lan_usable_channels_ = new ::location::nearby::connections::WifiLanUsableChannels(*from.wifi_lan_usable_channels_); + } else { + wifi_lan_usable_channels_ = nullptr; + } + if (from._internal_has_wifi_aware_usable_channels()) { + wifi_aware_usable_channels_ = new ::location::nearby::connections::WifiAwareUsableChannels(*from.wifi_aware_usable_channels_); + } else { + wifi_aware_usable_channels_ = nullptr; + } + if (from._internal_has_wifi_hotspot_sta_usable_channels()) { + wifi_hotspot_sta_usable_channels_ = new ::location::nearby::connections::WifiHotspotStaUsableChannels(*from.wifi_hotspot_sta_usable_channels_); + } else { + wifi_hotspot_sta_usable_channels_ = nullptr; + } + ::memcpy(&supports_5_ghz_, &from.supports_5_ghz_, + static_cast(reinterpret_cast(&ap_frequency_) - + reinterpret_cast(&supports_5_ghz_)) + sizeof(ap_frequency_)); + // @@protoc_insertion_point(copy_constructor:location.nearby.connections.MediumMetadata) +} + +inline void MediumMetadata::SharedCtor() { +bssid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + bssid_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +ip_address_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + ip_address_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&available_channels_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&mobile_radio_) - + reinterpret_cast(&available_channels_)) + sizeof(mobile_radio_)); +ap_frequency_ = -1; +} + +MediumMetadata::~MediumMetadata() { + // @@protoc_insertion_point(destructor:location.nearby.connections.MediumMetadata) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void MediumMetadata::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + bssid_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + ip_address_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (this != internal_default_instance()) delete available_channels_; + if (this != internal_default_instance()) delete wifi_direct_cli_usable_channels_; + if (this != internal_default_instance()) delete wifi_lan_usable_channels_; + if (this != internal_default_instance()) delete wifi_aware_usable_channels_; + if (this != internal_default_instance()) delete wifi_hotspot_sta_usable_channels_; +} + +void MediumMetadata::ArenaDtor(void* object) { + MediumMetadata* _this = reinterpret_cast< MediumMetadata* >(object); + (void)_this; +} +void MediumMetadata::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void MediumMetadata::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void MediumMetadata::Clear() { +// @@protoc_insertion_point(message_clear_start:location.nearby.connections.MediumMetadata) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x0000007fu) { + if (cached_has_bits & 0x00000001u) { + bssid_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000002u) { + ip_address_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000004u) { + GOOGLE_DCHECK(available_channels_ != nullptr); + available_channels_->Clear(); + } + if (cached_has_bits & 0x00000008u) { + GOOGLE_DCHECK(wifi_direct_cli_usable_channels_ != nullptr); + wifi_direct_cli_usable_channels_->Clear(); + } + if (cached_has_bits & 0x00000010u) { + GOOGLE_DCHECK(wifi_lan_usable_channels_ != nullptr); + wifi_lan_usable_channels_->Clear(); + } + if (cached_has_bits & 0x00000020u) { + GOOGLE_DCHECK(wifi_aware_usable_channels_ != nullptr); + wifi_aware_usable_channels_->Clear(); + } + if (cached_has_bits & 0x00000040u) { + GOOGLE_DCHECK(wifi_hotspot_sta_usable_channels_ != nullptr); + wifi_hotspot_sta_usable_channels_->Clear(); + } + } + supports_5_ghz_ = false; + ::memset(&supports_6_ghz_, 0, static_cast( + reinterpret_cast(&mobile_radio_) - + reinterpret_cast(&supports_6_ghz_)) + sizeof(mobile_radio_)); + ap_frequency_ = -1; + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* MediumMetadata::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional bool supports_5_ghz = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + _Internal::set_has_supports_5_ghz(&has_bits); + supports_5_ghz_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional string bssid = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + auto str = _internal_mutable_bssid(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional bytes ip_address = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { + auto str = _internal_mutable_ip_address(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional bool supports_6_ghz = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 32)) { + _Internal::set_has_supports_6_ghz(&has_bits); + supports_6_ghz_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional bool mobile_radio = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 40)) { + _Internal::set_has_mobile_radio(&has_bits); + mobile_radio_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional int32 ap_frequency = 6 [default = -1]; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 48)) { + _Internal::set_has_ap_frequency(&has_bits); + ap_frequency_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .location.nearby.connections.AvailableChannels available_channels = 7; + case 7: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 58)) { + ptr = ctx->ParseMessage(_internal_mutable_available_channels(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .location.nearby.connections.WifiDirectCliUsableChannels wifi_direct_cli_usable_channels = 8; + case 8: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 66)) { + ptr = ctx->ParseMessage(_internal_mutable_wifi_direct_cli_usable_channels(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .location.nearby.connections.WifiLanUsableChannels wifi_lan_usable_channels = 9; + case 9: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 74)) { + ptr = ctx->ParseMessage(_internal_mutable_wifi_lan_usable_channels(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .location.nearby.connections.WifiAwareUsableChannels wifi_aware_usable_channels = 10; + case 10: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 82)) { + ptr = ctx->ParseMessage(_internal_mutable_wifi_aware_usable_channels(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .location.nearby.connections.WifiHotspotStaUsableChannels wifi_hotspot_sta_usable_channels = 11; + case 11: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 90)) { + ptr = ctx->ParseMessage(_internal_mutable_wifi_hotspot_sta_usable_channels(), 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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* MediumMetadata::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:location.nearby.connections.MediumMetadata) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional bool supports_5_ghz = 1; + if (cached_has_bits & 0x00000080u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(1, this->_internal_supports_5_ghz(), target); + } + + // optional string bssid = 2; + if (cached_has_bits & 0x00000001u) { + target = stream->WriteStringMaybeAliased( + 2, this->_internal_bssid(), target); + } + + // optional bytes ip_address = 3; + if (cached_has_bits & 0x00000002u) { + target = stream->WriteBytesMaybeAliased( + 3, this->_internal_ip_address(), target); + } + + // optional bool supports_6_ghz = 4; + if (cached_has_bits & 0x00000100u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(4, this->_internal_supports_6_ghz(), target); + } + + // optional bool mobile_radio = 5; + if (cached_has_bits & 0x00000200u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(5, this->_internal_mobile_radio(), target); + } + + // optional int32 ap_frequency = 6 [default = -1]; + if (cached_has_bits & 0x00000400u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(6, this->_internal_ap_frequency(), target); + } + + // optional .location.nearby.connections.AvailableChannels available_channels = 7; + if (cached_has_bits & 0x00000004u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 7, _Internal::available_channels(this), target, stream); + } + + // optional .location.nearby.connections.WifiDirectCliUsableChannels wifi_direct_cli_usable_channels = 8; + if (cached_has_bits & 0x00000008u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 8, _Internal::wifi_direct_cli_usable_channels(this), target, stream); + } + + // optional .location.nearby.connections.WifiLanUsableChannels wifi_lan_usable_channels = 9; + if (cached_has_bits & 0x00000010u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 9, _Internal::wifi_lan_usable_channels(this), target, stream); + } + + // optional .location.nearby.connections.WifiAwareUsableChannels wifi_aware_usable_channels = 10; + if (cached_has_bits & 0x00000020u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 10, _Internal::wifi_aware_usable_channels(this), target, stream); + } + + // optional .location.nearby.connections.WifiHotspotStaUsableChannels wifi_hotspot_sta_usable_channels = 11; + if (cached_has_bits & 0x00000040u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 11, _Internal::wifi_hotspot_sta_usable_channels(this), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:location.nearby.connections.MediumMetadata) + return target; +} + +size_t MediumMetadata::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:location.nearby.connections.MediumMetadata) + 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 = _has_bits_[0]; + if (cached_has_bits & 0x000000ffu) { + // optional string bssid = 2; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_bssid()); + } + + // optional bytes ip_address = 3; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_ip_address()); + } + + // optional .location.nearby.connections.AvailableChannels available_channels = 7; + if (cached_has_bits & 0x00000004u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *available_channels_); + } + + // optional .location.nearby.connections.WifiDirectCliUsableChannels wifi_direct_cli_usable_channels = 8; + if (cached_has_bits & 0x00000008u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *wifi_direct_cli_usable_channels_); + } + + // optional .location.nearby.connections.WifiLanUsableChannels wifi_lan_usable_channels = 9; + if (cached_has_bits & 0x00000010u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *wifi_lan_usable_channels_); + } + + // optional .location.nearby.connections.WifiAwareUsableChannels wifi_aware_usable_channels = 10; + if (cached_has_bits & 0x00000020u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *wifi_aware_usable_channels_); + } + + // optional .location.nearby.connections.WifiHotspotStaUsableChannels wifi_hotspot_sta_usable_channels = 11; + if (cached_has_bits & 0x00000040u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *wifi_hotspot_sta_usable_channels_); + } + + // optional bool supports_5_ghz = 1; + if (cached_has_bits & 0x00000080u) { + total_size += 1 + 1; + } + + } + if (cached_has_bits & 0x00000700u) { + // optional bool supports_6_ghz = 4; + if (cached_has_bits & 0x00000100u) { + total_size += 1 + 1; + } + + // optional bool mobile_radio = 5; + if (cached_has_bits & 0x00000200u) { + total_size += 1 + 1; + } + + // optional int32 ap_frequency = 6 [default = -1]; + if (cached_has_bits & 0x00000400u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_ap_frequency()); + } + + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void MediumMetadata::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void MediumMetadata::MergeFrom(const MediumMetadata& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:location.nearby.connections.MediumMetadata) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x000000ffu) { + if (cached_has_bits & 0x00000001u) { + _internal_set_bssid(from._internal_bssid()); + } + if (cached_has_bits & 0x00000002u) { + _internal_set_ip_address(from._internal_ip_address()); + } + if (cached_has_bits & 0x00000004u) { + _internal_mutable_available_channels()->::location::nearby::connections::AvailableChannels::MergeFrom(from._internal_available_channels()); + } + if (cached_has_bits & 0x00000008u) { + _internal_mutable_wifi_direct_cli_usable_channels()->::location::nearby::connections::WifiDirectCliUsableChannels::MergeFrom(from._internal_wifi_direct_cli_usable_channels()); + } + if (cached_has_bits & 0x00000010u) { + _internal_mutable_wifi_lan_usable_channels()->::location::nearby::connections::WifiLanUsableChannels::MergeFrom(from._internal_wifi_lan_usable_channels()); + } + if (cached_has_bits & 0x00000020u) { + _internal_mutable_wifi_aware_usable_channels()->::location::nearby::connections::WifiAwareUsableChannels::MergeFrom(from._internal_wifi_aware_usable_channels()); + } + if (cached_has_bits & 0x00000040u) { + _internal_mutable_wifi_hotspot_sta_usable_channels()->::location::nearby::connections::WifiHotspotStaUsableChannels::MergeFrom(from._internal_wifi_hotspot_sta_usable_channels()); + } + if (cached_has_bits & 0x00000080u) { + supports_5_ghz_ = from.supports_5_ghz_; + } + _has_bits_[0] |= cached_has_bits; + } + if (cached_has_bits & 0x00000700u) { + if (cached_has_bits & 0x00000100u) { + supports_6_ghz_ = from.supports_6_ghz_; + } + if (cached_has_bits & 0x00000200u) { + mobile_radio_ = from.mobile_radio_; + } + if (cached_has_bits & 0x00000400u) { + ap_frequency_ = from.ap_frequency_; + } + _has_bits_[0] |= cached_has_bits; + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void MediumMetadata::CopyFrom(const MediumMetadata& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:location.nearby.connections.MediumMetadata) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool MediumMetadata::IsInitialized() const { + return true; +} + +void MediumMetadata::InternalSwap(MediumMetadata* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &bssid_, lhs_arena, + &other->bssid_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &ip_address_, lhs_arena, + &other->ip_address_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(MediumMetadata, mobile_radio_) + + sizeof(MediumMetadata::mobile_radio_) + - PROTOBUF_FIELD_OFFSET(MediumMetadata, available_channels_)>( + reinterpret_cast(&available_channels_), + reinterpret_cast(&other->available_channels_)); + swap(ap_frequency_, other->ap_frequency_); +} + +std::string MediumMetadata::GetTypeName() const { + return "location.nearby.connections.MediumMetadata"; +} + + +// =================================================================== + +class AvailableChannels::_Internal { + public: +}; + +AvailableChannels::AvailableChannels(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned), + channels_(arena) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:location.nearby.connections.AvailableChannels) +} +AvailableChannels::AvailableChannels(const AvailableChannels& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + channels_(from.channels_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + // @@protoc_insertion_point(copy_constructor:location.nearby.connections.AvailableChannels) +} + +inline void AvailableChannels::SharedCtor() { +} + +AvailableChannels::~AvailableChannels() { + // @@protoc_insertion_point(destructor:location.nearby.connections.AvailableChannels) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void AvailableChannels::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); +} + +void AvailableChannels::ArenaDtor(void* object) { + AvailableChannels* _this = reinterpret_cast< AvailableChannels* >(object); + (void)_this; +} +void AvailableChannels::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void AvailableChannels::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void AvailableChannels::Clear() { +// @@protoc_insertion_point(message_clear_start:location.nearby.connections.AvailableChannels) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + channels_.Clear(); + _internal_metadata_.Clear(); +} + +const char* AvailableChannels::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // repeated int32 channels = 1 [packed = true]; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_channels(), ptr, ctx); + CHK_(ptr); + } else if (static_cast(tag) == 8) { + _internal_add_channels(::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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* AvailableChannels::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:location.nearby.connections.AvailableChannels) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // repeated int32 channels = 1 [packed = true]; + { + int byte_size = _channels_cached_byte_size_.load(std::memory_order_relaxed); + if (byte_size > 0) { + target = stream->WriteInt32Packed( + 1, _internal_channels(), byte_size, target); + } + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:location.nearby.connections.AvailableChannels) + return target; +} + +size_t AvailableChannels::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:location.nearby.connections.AvailableChannels) + 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 channels = 1 [packed = true]; + { + size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + Int32Size(this->channels_); + if (data_size > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( + static_cast(data_size)); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(data_size); + _channels_cached_byte_size_.store(cached_size, + std::memory_order_relaxed); + total_size += data_size; + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void AvailableChannels::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void AvailableChannels::MergeFrom(const AvailableChannels& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:location.nearby.connections.AvailableChannels) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + channels_.MergeFrom(from.channels_); + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void AvailableChannels::CopyFrom(const AvailableChannels& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:location.nearby.connections.AvailableChannels) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool AvailableChannels::IsInitialized() const { + return true; +} + +void AvailableChannels::InternalSwap(AvailableChannels* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + channels_.InternalSwap(&other->channels_); +} + +std::string AvailableChannels::GetTypeName() const { + return "location.nearby.connections.AvailableChannels"; +} + + +// =================================================================== + +class WifiDirectCliUsableChannels::_Internal { + public: +}; + +WifiDirectCliUsableChannels::WifiDirectCliUsableChannels(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned), + channels_(arena) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:location.nearby.connections.WifiDirectCliUsableChannels) +} +WifiDirectCliUsableChannels::WifiDirectCliUsableChannels(const WifiDirectCliUsableChannels& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + channels_(from.channels_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + // @@protoc_insertion_point(copy_constructor:location.nearby.connections.WifiDirectCliUsableChannels) +} + +inline void WifiDirectCliUsableChannels::SharedCtor() { +} + +WifiDirectCliUsableChannels::~WifiDirectCliUsableChannels() { + // @@protoc_insertion_point(destructor:location.nearby.connections.WifiDirectCliUsableChannels) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void WifiDirectCliUsableChannels::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); +} + +void WifiDirectCliUsableChannels::ArenaDtor(void* object) { + WifiDirectCliUsableChannels* _this = reinterpret_cast< WifiDirectCliUsableChannels* >(object); + (void)_this; +} +void WifiDirectCliUsableChannels::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void WifiDirectCliUsableChannels::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void WifiDirectCliUsableChannels::Clear() { +// @@protoc_insertion_point(message_clear_start:location.nearby.connections.WifiDirectCliUsableChannels) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + channels_.Clear(); + _internal_metadata_.Clear(); +} + +const char* WifiDirectCliUsableChannels::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // repeated int32 channels = 1 [packed = true]; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_channels(), ptr, ctx); + CHK_(ptr); + } else if (static_cast(tag) == 8) { + _internal_add_channels(::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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* WifiDirectCliUsableChannels::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:location.nearby.connections.WifiDirectCliUsableChannels) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // repeated int32 channels = 1 [packed = true]; + { + int byte_size = _channels_cached_byte_size_.load(std::memory_order_relaxed); + if (byte_size > 0) { + target = stream->WriteInt32Packed( + 1, _internal_channels(), byte_size, target); + } + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:location.nearby.connections.WifiDirectCliUsableChannels) + return target; +} + +size_t WifiDirectCliUsableChannels::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:location.nearby.connections.WifiDirectCliUsableChannels) + 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 channels = 1 [packed = true]; + { + size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + Int32Size(this->channels_); + if (data_size > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( + static_cast(data_size)); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(data_size); + _channels_cached_byte_size_.store(cached_size, + std::memory_order_relaxed); + total_size += data_size; + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void WifiDirectCliUsableChannels::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void WifiDirectCliUsableChannels::MergeFrom(const WifiDirectCliUsableChannels& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:location.nearby.connections.WifiDirectCliUsableChannels) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + channels_.MergeFrom(from.channels_); + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void WifiDirectCliUsableChannels::CopyFrom(const WifiDirectCliUsableChannels& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:location.nearby.connections.WifiDirectCliUsableChannels) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool WifiDirectCliUsableChannels::IsInitialized() const { + return true; +} + +void WifiDirectCliUsableChannels::InternalSwap(WifiDirectCliUsableChannels* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + channels_.InternalSwap(&other->channels_); +} + +std::string WifiDirectCliUsableChannels::GetTypeName() const { + return "location.nearby.connections.WifiDirectCliUsableChannels"; +} + + +// =================================================================== + +class WifiLanUsableChannels::_Internal { + public: +}; + +WifiLanUsableChannels::WifiLanUsableChannels(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned), + channels_(arena) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:location.nearby.connections.WifiLanUsableChannels) +} +WifiLanUsableChannels::WifiLanUsableChannels(const WifiLanUsableChannels& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + channels_(from.channels_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + // @@protoc_insertion_point(copy_constructor:location.nearby.connections.WifiLanUsableChannels) +} + +inline void WifiLanUsableChannels::SharedCtor() { +} + +WifiLanUsableChannels::~WifiLanUsableChannels() { + // @@protoc_insertion_point(destructor:location.nearby.connections.WifiLanUsableChannels) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void WifiLanUsableChannels::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); +} + +void WifiLanUsableChannels::ArenaDtor(void* object) { + WifiLanUsableChannels* _this = reinterpret_cast< WifiLanUsableChannels* >(object); + (void)_this; +} +void WifiLanUsableChannels::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void WifiLanUsableChannels::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void WifiLanUsableChannels::Clear() { +// @@protoc_insertion_point(message_clear_start:location.nearby.connections.WifiLanUsableChannels) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + channels_.Clear(); + _internal_metadata_.Clear(); +} + +const char* WifiLanUsableChannels::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // repeated int32 channels = 1 [packed = true]; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_channels(), ptr, ctx); + CHK_(ptr); + } else if (static_cast(tag) == 8) { + _internal_add_channels(::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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* WifiLanUsableChannels::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:location.nearby.connections.WifiLanUsableChannels) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // repeated int32 channels = 1 [packed = true]; + { + int byte_size = _channels_cached_byte_size_.load(std::memory_order_relaxed); + if (byte_size > 0) { + target = stream->WriteInt32Packed( + 1, _internal_channels(), byte_size, target); + } + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:location.nearby.connections.WifiLanUsableChannels) + return target; +} + +size_t WifiLanUsableChannels::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:location.nearby.connections.WifiLanUsableChannels) + 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 channels = 1 [packed = true]; + { + size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + Int32Size(this->channels_); + if (data_size > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( + static_cast(data_size)); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(data_size); + _channels_cached_byte_size_.store(cached_size, + std::memory_order_relaxed); + total_size += data_size; + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void WifiLanUsableChannels::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void WifiLanUsableChannels::MergeFrom(const WifiLanUsableChannels& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:location.nearby.connections.WifiLanUsableChannels) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + channels_.MergeFrom(from.channels_); + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void WifiLanUsableChannels::CopyFrom(const WifiLanUsableChannels& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:location.nearby.connections.WifiLanUsableChannels) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool WifiLanUsableChannels::IsInitialized() const { + return true; +} + +void WifiLanUsableChannels::InternalSwap(WifiLanUsableChannels* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + channels_.InternalSwap(&other->channels_); +} + +std::string WifiLanUsableChannels::GetTypeName() const { + return "location.nearby.connections.WifiLanUsableChannels"; +} + + +// =================================================================== + +class WifiAwareUsableChannels::_Internal { + public: +}; + +WifiAwareUsableChannels::WifiAwareUsableChannels(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned), + channels_(arena) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:location.nearby.connections.WifiAwareUsableChannels) +} +WifiAwareUsableChannels::WifiAwareUsableChannels(const WifiAwareUsableChannels& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + channels_(from.channels_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + // @@protoc_insertion_point(copy_constructor:location.nearby.connections.WifiAwareUsableChannels) +} + +inline void WifiAwareUsableChannels::SharedCtor() { +} + +WifiAwareUsableChannels::~WifiAwareUsableChannels() { + // @@protoc_insertion_point(destructor:location.nearby.connections.WifiAwareUsableChannels) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void WifiAwareUsableChannels::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); +} + +void WifiAwareUsableChannels::ArenaDtor(void* object) { + WifiAwareUsableChannels* _this = reinterpret_cast< WifiAwareUsableChannels* >(object); + (void)_this; +} +void WifiAwareUsableChannels::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void WifiAwareUsableChannels::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void WifiAwareUsableChannels::Clear() { +// @@protoc_insertion_point(message_clear_start:location.nearby.connections.WifiAwareUsableChannels) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + channels_.Clear(); + _internal_metadata_.Clear(); +} + +const char* WifiAwareUsableChannels::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // repeated int32 channels = 1 [packed = true]; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_channels(), ptr, ctx); + CHK_(ptr); + } else if (static_cast(tag) == 8) { + _internal_add_channels(::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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* WifiAwareUsableChannels::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:location.nearby.connections.WifiAwareUsableChannels) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // repeated int32 channels = 1 [packed = true]; + { + int byte_size = _channels_cached_byte_size_.load(std::memory_order_relaxed); + if (byte_size > 0) { + target = stream->WriteInt32Packed( + 1, _internal_channels(), byte_size, target); + } + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:location.nearby.connections.WifiAwareUsableChannels) + return target; +} + +size_t WifiAwareUsableChannels::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:location.nearby.connections.WifiAwareUsableChannels) + 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 channels = 1 [packed = true]; + { + size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + Int32Size(this->channels_); + if (data_size > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( + static_cast(data_size)); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(data_size); + _channels_cached_byte_size_.store(cached_size, + std::memory_order_relaxed); + total_size += data_size; + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void WifiAwareUsableChannels::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void WifiAwareUsableChannels::MergeFrom(const WifiAwareUsableChannels& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:location.nearby.connections.WifiAwareUsableChannels) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + channels_.MergeFrom(from.channels_); + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void WifiAwareUsableChannels::CopyFrom(const WifiAwareUsableChannels& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:location.nearby.connections.WifiAwareUsableChannels) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool WifiAwareUsableChannels::IsInitialized() const { + return true; +} + +void WifiAwareUsableChannels::InternalSwap(WifiAwareUsableChannels* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + channels_.InternalSwap(&other->channels_); +} + +std::string WifiAwareUsableChannels::GetTypeName() const { + return "location.nearby.connections.WifiAwareUsableChannels"; +} + + +// =================================================================== + +class WifiHotspotStaUsableChannels::_Internal { + public: +}; + +WifiHotspotStaUsableChannels::WifiHotspotStaUsableChannels(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned), + channels_(arena) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:location.nearby.connections.WifiHotspotStaUsableChannels) +} +WifiHotspotStaUsableChannels::WifiHotspotStaUsableChannels(const WifiHotspotStaUsableChannels& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + channels_(from.channels_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + // @@protoc_insertion_point(copy_constructor:location.nearby.connections.WifiHotspotStaUsableChannels) +} + +inline void WifiHotspotStaUsableChannels::SharedCtor() { +} + +WifiHotspotStaUsableChannels::~WifiHotspotStaUsableChannels() { + // @@protoc_insertion_point(destructor:location.nearby.connections.WifiHotspotStaUsableChannels) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void WifiHotspotStaUsableChannels::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); +} + +void WifiHotspotStaUsableChannels::ArenaDtor(void* object) { + WifiHotspotStaUsableChannels* _this = reinterpret_cast< WifiHotspotStaUsableChannels* >(object); + (void)_this; +} +void WifiHotspotStaUsableChannels::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void WifiHotspotStaUsableChannels::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void WifiHotspotStaUsableChannels::Clear() { +// @@protoc_insertion_point(message_clear_start:location.nearby.connections.WifiHotspotStaUsableChannels) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + channels_.Clear(); + _internal_metadata_.Clear(); +} + +const char* WifiHotspotStaUsableChannels::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // repeated int32 channels = 1 [packed = true]; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_channels(), ptr, ctx); + CHK_(ptr); + } else if (static_cast(tag) == 8) { + _internal_add_channels(::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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* WifiHotspotStaUsableChannels::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:location.nearby.connections.WifiHotspotStaUsableChannels) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // repeated int32 channels = 1 [packed = true]; + { + int byte_size = _channels_cached_byte_size_.load(std::memory_order_relaxed); + if (byte_size > 0) { + target = stream->WriteInt32Packed( + 1, _internal_channels(), byte_size, target); + } + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:location.nearby.connections.WifiHotspotStaUsableChannels) + return target; +} + +size_t WifiHotspotStaUsableChannels::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:location.nearby.connections.WifiHotspotStaUsableChannels) + 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 channels = 1 [packed = true]; + { + size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + Int32Size(this->channels_); + if (data_size > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( + static_cast(data_size)); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(data_size); + _channels_cached_byte_size_.store(cached_size, + std::memory_order_relaxed); + total_size += data_size; + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void WifiHotspotStaUsableChannels::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void WifiHotspotStaUsableChannels::MergeFrom(const WifiHotspotStaUsableChannels& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:location.nearby.connections.WifiHotspotStaUsableChannels) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + channels_.MergeFrom(from.channels_); + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void WifiHotspotStaUsableChannels::CopyFrom(const WifiHotspotStaUsableChannels& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:location.nearby.connections.WifiHotspotStaUsableChannels) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool WifiHotspotStaUsableChannels::IsInitialized() const { + return true; +} + +void WifiHotspotStaUsableChannels::InternalSwap(WifiHotspotStaUsableChannels* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + channels_.InternalSwap(&other->channels_); +} + +std::string WifiHotspotStaUsableChannels::GetTypeName() const { + return "location.nearby.connections.WifiHotspotStaUsableChannels"; +} + + +// =================================================================== + +class LocationHint::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_location(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_format(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } +}; + +LocationHint::LocationHint(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:location.nearby.connections.LocationHint) +} +LocationHint::LocationHint(const LocationHint& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + location_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + location_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_location()) { + location_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_location(), + GetArenaForAllocation()); + } + format_ = from.format_; + // @@protoc_insertion_point(copy_constructor:location.nearby.connections.LocationHint) +} + +inline void LocationHint::SharedCtor() { +location_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + location_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +format_ = 0; +} + +LocationHint::~LocationHint() { + // @@protoc_insertion_point(destructor:location.nearby.connections.LocationHint) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void LocationHint::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + location_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void LocationHint::ArenaDtor(void* object) { + LocationHint* _this = reinterpret_cast< LocationHint* >(object); + (void)_this; +} +void LocationHint::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void LocationHint::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void LocationHint::Clear() { +// @@protoc_insertion_point(message_clear_start:location.nearby.connections.LocationHint) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + location_.ClearNonDefaultToEmpty(); + } + format_ = 0; + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* LocationHint::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional string location = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_location(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .location.nearby.connections.LocationStandard.Format format = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::location::nearby::connections::LocationStandard_Format_IsValid(val))) { + _internal_set_format(static_cast<::location::nearby::connections::LocationStandard_Format>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(2, 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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* LocationHint::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:location.nearby.connections.LocationHint) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional string location = 1; + if (cached_has_bits & 0x00000001u) { + target = stream->WriteStringMaybeAliased( + 1, this->_internal_location(), target); + } + + // optional .location.nearby.connections.LocationStandard.Format format = 2; + if (cached_has_bits & 0x00000002u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 2, this->_internal_format(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:location.nearby.connections.LocationHint) + return target; +} + +size_t LocationHint::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:location.nearby.connections.LocationHint) + 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 = _has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + // optional string location = 1; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_location()); + } + + // optional .location.nearby.connections.LocationStandard.Format format = 2; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_format()); + } + + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void LocationHint::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void LocationHint::MergeFrom(const LocationHint& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:location.nearby.connections.LocationHint) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + _internal_set_location(from._internal_location()); + } + if (cached_has_bits & 0x00000002u) { + format_ = from.format_; + } + _has_bits_[0] |= cached_has_bits; + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void LocationHint::CopyFrom(const LocationHint& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:location.nearby.connections.LocationHint) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool LocationHint::IsInitialized() const { + return true; +} + +void LocationHint::InternalSwap(LocationHint* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &location_, lhs_arena, + &other->location_, rhs_arena + ); + swap(format_, other->format_); +} + +std::string LocationHint::GetTypeName() const { + return "location.nearby.connections.LocationHint"; +} + + +// =================================================================== + +class LocationStandard::_Internal { + public: +}; + +LocationStandard::LocationStandard(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:location.nearby.connections.LocationStandard) +} +LocationStandard::LocationStandard(const LocationStandard& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite() { + _internal_metadata_.MergeFrom(from._internal_metadata_); + // @@protoc_insertion_point(copy_constructor:location.nearby.connections.LocationStandard) +} + +inline void LocationStandard::SharedCtor() { +} + +LocationStandard::~LocationStandard() { + // @@protoc_insertion_point(destructor:location.nearby.connections.LocationStandard) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void LocationStandard::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); +} + +void LocationStandard::ArenaDtor(void* object) { + LocationStandard* _this = reinterpret_cast< LocationStandard* >(object); + (void)_this; +} +void LocationStandard::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void LocationStandard::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void LocationStandard::Clear() { +// @@protoc_insertion_point(message_clear_start:location.nearby.connections.LocationStandard) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _internal_metadata_.Clear(); +} + +const char* LocationStandard::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* LocationStandard::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:location.nearby.connections.LocationStandard) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:location.nearby.connections.LocationStandard) + return target; +} + +size_t LocationStandard::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:location.nearby.connections.LocationStandard) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void LocationStandard::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void LocationStandard::MergeFrom(const LocationStandard& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:location.nearby.connections.LocationStandard) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void LocationStandard::CopyFrom(const LocationStandard& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:location.nearby.connections.LocationStandard) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool LocationStandard::IsInitialized() const { + return true; +} + +void LocationStandard::InternalSwap(LocationStandard* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); +} + +std::string LocationStandard::GetTypeName() const { + return "location.nearby.connections.LocationStandard"; +} + + +// @@protoc_insertion_point(namespace_scope) +} // namespace connections +} // namespace nearby +} // namespace location +PROTOBUF_NAMESPACE_OPEN +template<> PROTOBUF_NOINLINE ::location::nearby::connections::OfflineFrame* Arena::CreateMaybeMessage< ::location::nearby::connections::OfflineFrame >(Arena* arena) { + return Arena::CreateMessageInternal< ::location::nearby::connections::OfflineFrame >(arena); +} +template<> PROTOBUF_NOINLINE ::location::nearby::connections::V1Frame* Arena::CreateMaybeMessage< ::location::nearby::connections::V1Frame >(Arena* arena) { + return Arena::CreateMessageInternal< ::location::nearby::connections::V1Frame >(arena); +} +template<> PROTOBUF_NOINLINE ::location::nearby::connections::ConnectionRequestFrame* Arena::CreateMaybeMessage< ::location::nearby::connections::ConnectionRequestFrame >(Arena* arena) { + return Arena::CreateMessageInternal< ::location::nearby::connections::ConnectionRequestFrame >(arena); +} +template<> PROTOBUF_NOINLINE ::location::nearby::connections::ConnectionResponseFrame* Arena::CreateMaybeMessage< ::location::nearby::connections::ConnectionResponseFrame >(Arena* arena) { + return Arena::CreateMessageInternal< ::location::nearby::connections::ConnectionResponseFrame >(arena); +} +template<> PROTOBUF_NOINLINE ::location::nearby::connections::PayloadTransferFrame_PayloadHeader* Arena::CreateMaybeMessage< ::location::nearby::connections::PayloadTransferFrame_PayloadHeader >(Arena* arena) { + return Arena::CreateMessageInternal< ::location::nearby::connections::PayloadTransferFrame_PayloadHeader >(arena); +} +template<> PROTOBUF_NOINLINE ::location::nearby::connections::PayloadTransferFrame_PayloadChunk* Arena::CreateMaybeMessage< ::location::nearby::connections::PayloadTransferFrame_PayloadChunk >(Arena* arena) { + return Arena::CreateMessageInternal< ::location::nearby::connections::PayloadTransferFrame_PayloadChunk >(arena); +} +template<> PROTOBUF_NOINLINE ::location::nearby::connections::PayloadTransferFrame_ControlMessage* Arena::CreateMaybeMessage< ::location::nearby::connections::PayloadTransferFrame_ControlMessage >(Arena* arena) { + return Arena::CreateMessageInternal< ::location::nearby::connections::PayloadTransferFrame_ControlMessage >(arena); +} +template<> PROTOBUF_NOINLINE ::location::nearby::connections::PayloadTransferFrame* Arena::CreateMaybeMessage< ::location::nearby::connections::PayloadTransferFrame >(Arena* arena) { + return Arena::CreateMessageInternal< ::location::nearby::connections::PayloadTransferFrame >(arena); +} +template<> PROTOBUF_NOINLINE ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials* Arena::CreateMaybeMessage< ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials >(Arena* arena) { + return Arena::CreateMessageInternal< ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials >(arena); +} +template<> PROTOBUF_NOINLINE ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket* Arena::CreateMaybeMessage< ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket >(Arena* arena) { + return Arena::CreateMessageInternal< ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket >(arena); +} +template<> PROTOBUF_NOINLINE ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials* Arena::CreateMaybeMessage< ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials >(Arena* arena) { + return Arena::CreateMessageInternal< ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials >(arena); +} +template<> PROTOBUF_NOINLINE ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials* Arena::CreateMaybeMessage< ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials >(Arena* arena) { + return Arena::CreateMessageInternal< ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials >(arena); +} +template<> PROTOBUF_NOINLINE ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials* Arena::CreateMaybeMessage< ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials >(Arena* arena) { + return Arena::CreateMessageInternal< ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials >(arena); +} +template<> PROTOBUF_NOINLINE ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials* Arena::CreateMaybeMessage< ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials >(Arena* arena) { + return Arena::CreateMessageInternal< ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials >(arena); +} +template<> PROTOBUF_NOINLINE ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo* Arena::CreateMaybeMessage< ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo >(Arena* arena) { + return Arena::CreateMessageInternal< ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo >(arena); +} +template<> PROTOBUF_NOINLINE ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_ClientIntroduction* Arena::CreateMaybeMessage< ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_ClientIntroduction >(Arena* arena) { + return Arena::CreateMessageInternal< ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_ClientIntroduction >(arena); +} +template<> PROTOBUF_NOINLINE ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_ClientIntroductionAck* Arena::CreateMaybeMessage< ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_ClientIntroductionAck >(Arena* arena) { + return Arena::CreateMessageInternal< ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_ClientIntroductionAck >(arena); +} +template<> PROTOBUF_NOINLINE ::location::nearby::connections::BandwidthUpgradeNegotiationFrame* Arena::CreateMaybeMessage< ::location::nearby::connections::BandwidthUpgradeNegotiationFrame >(Arena* arena) { + return Arena::CreateMessageInternal< ::location::nearby::connections::BandwidthUpgradeNegotiationFrame >(arena); +} +template<> PROTOBUF_NOINLINE ::location::nearby::connections::KeepAliveFrame* Arena::CreateMaybeMessage< ::location::nearby::connections::KeepAliveFrame >(Arena* arena) { + return Arena::CreateMessageInternal< ::location::nearby::connections::KeepAliveFrame >(arena); +} +template<> PROTOBUF_NOINLINE ::location::nearby::connections::DisconnectionFrame* Arena::CreateMaybeMessage< ::location::nearby::connections::DisconnectionFrame >(Arena* arena) { + return Arena::CreateMessageInternal< ::location::nearby::connections::DisconnectionFrame >(arena); +} +template<> PROTOBUF_NOINLINE ::location::nearby::connections::PairedKeyEncryptionFrame* Arena::CreateMaybeMessage< ::location::nearby::connections::PairedKeyEncryptionFrame >(Arena* arena) { + return Arena::CreateMessageInternal< ::location::nearby::connections::PairedKeyEncryptionFrame >(arena); +} +template<> PROTOBUF_NOINLINE ::location::nearby::connections::MediumMetadata* Arena::CreateMaybeMessage< ::location::nearby::connections::MediumMetadata >(Arena* arena) { + return Arena::CreateMessageInternal< ::location::nearby::connections::MediumMetadata >(arena); +} +template<> PROTOBUF_NOINLINE ::location::nearby::connections::AvailableChannels* Arena::CreateMaybeMessage< ::location::nearby::connections::AvailableChannels >(Arena* arena) { + return Arena::CreateMessageInternal< ::location::nearby::connections::AvailableChannels >(arena); +} +template<> PROTOBUF_NOINLINE ::location::nearby::connections::WifiDirectCliUsableChannels* Arena::CreateMaybeMessage< ::location::nearby::connections::WifiDirectCliUsableChannels >(Arena* arena) { + return Arena::CreateMessageInternal< ::location::nearby::connections::WifiDirectCliUsableChannels >(arena); +} +template<> PROTOBUF_NOINLINE ::location::nearby::connections::WifiLanUsableChannels* Arena::CreateMaybeMessage< ::location::nearby::connections::WifiLanUsableChannels >(Arena* arena) { + return Arena::CreateMessageInternal< ::location::nearby::connections::WifiLanUsableChannels >(arena); +} +template<> PROTOBUF_NOINLINE ::location::nearby::connections::WifiAwareUsableChannels* Arena::CreateMaybeMessage< ::location::nearby::connections::WifiAwareUsableChannels >(Arena* arena) { + return Arena::CreateMessageInternal< ::location::nearby::connections::WifiAwareUsableChannels >(arena); +} +template<> PROTOBUF_NOINLINE ::location::nearby::connections::WifiHotspotStaUsableChannels* Arena::CreateMaybeMessage< ::location::nearby::connections::WifiHotspotStaUsableChannels >(Arena* arena) { + return Arena::CreateMessageInternal< ::location::nearby::connections::WifiHotspotStaUsableChannels >(arena); +} +template<> PROTOBUF_NOINLINE ::location::nearby::connections::LocationHint* Arena::CreateMaybeMessage< ::location::nearby::connections::LocationHint >(Arena* arena) { + return Arena::CreateMessageInternal< ::location::nearby::connections::LocationHint >(arena); +} +template<> PROTOBUF_NOINLINE ::location::nearby::connections::LocationStandard* Arena::CreateMaybeMessage< ::location::nearby::connections::LocationStandard >(Arena* arena) { + return Arena::CreateMessageInternal< ::location::nearby::connections::LocationStandard >(arena); +} +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) +#include diff --git a/connections/implementation/proto/offline_wire_formats.pb.h b/connections/implementation/proto/offline_wire_formats.pb.h new file mode 100644 index 00000000..f56e0594 --- /dev/null +++ b/connections/implementation/proto/offline_wire_formats.pb.h @@ -0,0 +1,11796 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: connections/implementation/proto/offline_wire_formats.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_connections_2fimplementation_2fproto_2foffline_5fwire_5fformats_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_connections_2fimplementation_2fproto_2foffline_5fwire_5fformats_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3019000 +#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 3019004 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_connections_2fimplementation_2fproto_2foffline_5fwire_5fformats_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_connections_2fimplementation_2fproto_2foffline_5fwire_5fformats_2eproto { + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::AuxiliaryParseTableField aux[] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[29] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[]; + static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[]; + static const uint32_t offsets[]; +}; +namespace location { +namespace nearby { +namespace connections { +class AvailableChannels; +struct AvailableChannelsDefaultTypeInternal; +extern AvailableChannelsDefaultTypeInternal _AvailableChannels_default_instance_; +class BandwidthUpgradeNegotiationFrame; +struct BandwidthUpgradeNegotiationFrameDefaultTypeInternal; +extern BandwidthUpgradeNegotiationFrameDefaultTypeInternal _BandwidthUpgradeNegotiationFrame_default_instance_; +class BandwidthUpgradeNegotiationFrame_ClientIntroduction; +struct BandwidthUpgradeNegotiationFrame_ClientIntroductionDefaultTypeInternal; +extern BandwidthUpgradeNegotiationFrame_ClientIntroductionDefaultTypeInternal _BandwidthUpgradeNegotiationFrame_ClientIntroduction_default_instance_; +class BandwidthUpgradeNegotiationFrame_ClientIntroductionAck; +struct BandwidthUpgradeNegotiationFrame_ClientIntroductionAckDefaultTypeInternal; +extern BandwidthUpgradeNegotiationFrame_ClientIntroductionAckDefaultTypeInternal _BandwidthUpgradeNegotiationFrame_ClientIntroductionAck_default_instance_; +class BandwidthUpgradeNegotiationFrame_UpgradePathInfo; +struct BandwidthUpgradeNegotiationFrame_UpgradePathInfoDefaultTypeInternal; +extern BandwidthUpgradeNegotiationFrame_UpgradePathInfoDefaultTypeInternal _BandwidthUpgradeNegotiationFrame_UpgradePathInfo_default_instance_; +class BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials; +struct BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentialsDefaultTypeInternal; +extern BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentialsDefaultTypeInternal _BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials_default_instance_; +class BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials; +struct BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentialsDefaultTypeInternal; +extern BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentialsDefaultTypeInternal _BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials_default_instance_; +class BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials; +struct BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentialsDefaultTypeInternal; +extern BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentialsDefaultTypeInternal _BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials_default_instance_; +class BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials; +struct BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentialsDefaultTypeInternal; +extern BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentialsDefaultTypeInternal _BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials_default_instance_; +class BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials; +struct BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentialsDefaultTypeInternal; +extern BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentialsDefaultTypeInternal _BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials_default_instance_; +class BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket; +struct BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocketDefaultTypeInternal; +extern BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocketDefaultTypeInternal _BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket_default_instance_; +class ConnectionRequestFrame; +struct ConnectionRequestFrameDefaultTypeInternal; +extern ConnectionRequestFrameDefaultTypeInternal _ConnectionRequestFrame_default_instance_; +class ConnectionResponseFrame; +struct ConnectionResponseFrameDefaultTypeInternal; +extern ConnectionResponseFrameDefaultTypeInternal _ConnectionResponseFrame_default_instance_; +class DisconnectionFrame; +struct DisconnectionFrameDefaultTypeInternal; +extern DisconnectionFrameDefaultTypeInternal _DisconnectionFrame_default_instance_; +class KeepAliveFrame; +struct KeepAliveFrameDefaultTypeInternal; +extern KeepAliveFrameDefaultTypeInternal _KeepAliveFrame_default_instance_; +class LocationHint; +struct LocationHintDefaultTypeInternal; +extern LocationHintDefaultTypeInternal _LocationHint_default_instance_; +class LocationStandard; +struct LocationStandardDefaultTypeInternal; +extern LocationStandardDefaultTypeInternal _LocationStandard_default_instance_; +class MediumMetadata; +struct MediumMetadataDefaultTypeInternal; +extern MediumMetadataDefaultTypeInternal _MediumMetadata_default_instance_; +class OfflineFrame; +struct OfflineFrameDefaultTypeInternal; +extern OfflineFrameDefaultTypeInternal _OfflineFrame_default_instance_; +class PairedKeyEncryptionFrame; +struct PairedKeyEncryptionFrameDefaultTypeInternal; +extern PairedKeyEncryptionFrameDefaultTypeInternal _PairedKeyEncryptionFrame_default_instance_; +class PayloadTransferFrame; +struct PayloadTransferFrameDefaultTypeInternal; +extern PayloadTransferFrameDefaultTypeInternal _PayloadTransferFrame_default_instance_; +class PayloadTransferFrame_ControlMessage; +struct PayloadTransferFrame_ControlMessageDefaultTypeInternal; +extern PayloadTransferFrame_ControlMessageDefaultTypeInternal _PayloadTransferFrame_ControlMessage_default_instance_; +class PayloadTransferFrame_PayloadChunk; +struct PayloadTransferFrame_PayloadChunkDefaultTypeInternal; +extern PayloadTransferFrame_PayloadChunkDefaultTypeInternal _PayloadTransferFrame_PayloadChunk_default_instance_; +class PayloadTransferFrame_PayloadHeader; +struct PayloadTransferFrame_PayloadHeaderDefaultTypeInternal; +extern PayloadTransferFrame_PayloadHeaderDefaultTypeInternal _PayloadTransferFrame_PayloadHeader_default_instance_; +class V1Frame; +struct V1FrameDefaultTypeInternal; +extern V1FrameDefaultTypeInternal _V1Frame_default_instance_; +class WifiAwareUsableChannels; +struct WifiAwareUsableChannelsDefaultTypeInternal; +extern WifiAwareUsableChannelsDefaultTypeInternal _WifiAwareUsableChannels_default_instance_; +class WifiDirectCliUsableChannels; +struct WifiDirectCliUsableChannelsDefaultTypeInternal; +extern WifiDirectCliUsableChannelsDefaultTypeInternal _WifiDirectCliUsableChannels_default_instance_; +class WifiHotspotStaUsableChannels; +struct WifiHotspotStaUsableChannelsDefaultTypeInternal; +extern WifiHotspotStaUsableChannelsDefaultTypeInternal _WifiHotspotStaUsableChannels_default_instance_; +class WifiLanUsableChannels; +struct WifiLanUsableChannelsDefaultTypeInternal; +extern WifiLanUsableChannelsDefaultTypeInternal _WifiLanUsableChannels_default_instance_; +} // namespace connections +} // namespace nearby +} // namespace location +PROTOBUF_NAMESPACE_OPEN +template<> ::location::nearby::connections::AvailableChannels* Arena::CreateMaybeMessage<::location::nearby::connections::AvailableChannels>(Arena*); +template<> ::location::nearby::connections::BandwidthUpgradeNegotiationFrame* Arena::CreateMaybeMessage<::location::nearby::connections::BandwidthUpgradeNegotiationFrame>(Arena*); +template<> ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_ClientIntroduction* Arena::CreateMaybeMessage<::location::nearby::connections::BandwidthUpgradeNegotiationFrame_ClientIntroduction>(Arena*); +template<> ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_ClientIntroductionAck* Arena::CreateMaybeMessage<::location::nearby::connections::BandwidthUpgradeNegotiationFrame_ClientIntroductionAck>(Arena*); +template<> ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo* Arena::CreateMaybeMessage<::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo>(Arena*); +template<> ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials* Arena::CreateMaybeMessage<::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials>(Arena*); +template<> ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials* Arena::CreateMaybeMessage<::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials>(Arena*); +template<> ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials* Arena::CreateMaybeMessage<::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials>(Arena*); +template<> ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials* Arena::CreateMaybeMessage<::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials>(Arena*); +template<> ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials* Arena::CreateMaybeMessage<::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials>(Arena*); +template<> ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket* Arena::CreateMaybeMessage<::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket>(Arena*); +template<> ::location::nearby::connections::ConnectionRequestFrame* Arena::CreateMaybeMessage<::location::nearby::connections::ConnectionRequestFrame>(Arena*); +template<> ::location::nearby::connections::ConnectionResponseFrame* Arena::CreateMaybeMessage<::location::nearby::connections::ConnectionResponseFrame>(Arena*); +template<> ::location::nearby::connections::DisconnectionFrame* Arena::CreateMaybeMessage<::location::nearby::connections::DisconnectionFrame>(Arena*); +template<> ::location::nearby::connections::KeepAliveFrame* Arena::CreateMaybeMessage<::location::nearby::connections::KeepAliveFrame>(Arena*); +template<> ::location::nearby::connections::LocationHint* Arena::CreateMaybeMessage<::location::nearby::connections::LocationHint>(Arena*); +template<> ::location::nearby::connections::LocationStandard* Arena::CreateMaybeMessage<::location::nearby::connections::LocationStandard>(Arena*); +template<> ::location::nearby::connections::MediumMetadata* Arena::CreateMaybeMessage<::location::nearby::connections::MediumMetadata>(Arena*); +template<> ::location::nearby::connections::OfflineFrame* Arena::CreateMaybeMessage<::location::nearby::connections::OfflineFrame>(Arena*); +template<> ::location::nearby::connections::PairedKeyEncryptionFrame* Arena::CreateMaybeMessage<::location::nearby::connections::PairedKeyEncryptionFrame>(Arena*); +template<> ::location::nearby::connections::PayloadTransferFrame* Arena::CreateMaybeMessage<::location::nearby::connections::PayloadTransferFrame>(Arena*); +template<> ::location::nearby::connections::PayloadTransferFrame_ControlMessage* Arena::CreateMaybeMessage<::location::nearby::connections::PayloadTransferFrame_ControlMessage>(Arena*); +template<> ::location::nearby::connections::PayloadTransferFrame_PayloadChunk* Arena::CreateMaybeMessage<::location::nearby::connections::PayloadTransferFrame_PayloadChunk>(Arena*); +template<> ::location::nearby::connections::PayloadTransferFrame_PayloadHeader* Arena::CreateMaybeMessage<::location::nearby::connections::PayloadTransferFrame_PayloadHeader>(Arena*); +template<> ::location::nearby::connections::V1Frame* Arena::CreateMaybeMessage<::location::nearby::connections::V1Frame>(Arena*); +template<> ::location::nearby::connections::WifiAwareUsableChannels* Arena::CreateMaybeMessage<::location::nearby::connections::WifiAwareUsableChannels>(Arena*); +template<> ::location::nearby::connections::WifiDirectCliUsableChannels* Arena::CreateMaybeMessage<::location::nearby::connections::WifiDirectCliUsableChannels>(Arena*); +template<> ::location::nearby::connections::WifiHotspotStaUsableChannels* Arena::CreateMaybeMessage<::location::nearby::connections::WifiHotspotStaUsableChannels>(Arena*); +template<> ::location::nearby::connections::WifiLanUsableChannels* Arena::CreateMaybeMessage<::location::nearby::connections::WifiLanUsableChannels>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace location { +namespace nearby { +namespace connections { + +enum OfflineFrame_Version : int { + OfflineFrame_Version_UNKNOWN_VERSION = 0, + OfflineFrame_Version_V1 = 1 +}; +bool OfflineFrame_Version_IsValid(int value); +constexpr OfflineFrame_Version OfflineFrame_Version_Version_MIN = OfflineFrame_Version_UNKNOWN_VERSION; +constexpr OfflineFrame_Version OfflineFrame_Version_Version_MAX = OfflineFrame_Version_V1; +constexpr int OfflineFrame_Version_Version_ARRAYSIZE = OfflineFrame_Version_Version_MAX + 1; + +const std::string& OfflineFrame_Version_Name(OfflineFrame_Version value); +template +inline const std::string& OfflineFrame_Version_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function OfflineFrame_Version_Name."); + return OfflineFrame_Version_Name(static_cast(enum_t_value)); +} +bool OfflineFrame_Version_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, OfflineFrame_Version* value); +enum V1Frame_FrameType : int { + V1Frame_FrameType_UNKNOWN_FRAME_TYPE = 0, + V1Frame_FrameType_CONNECTION_REQUEST = 1, + V1Frame_FrameType_CONNECTION_RESPONSE = 2, + V1Frame_FrameType_PAYLOAD_TRANSFER = 3, + V1Frame_FrameType_BANDWIDTH_UPGRADE_NEGOTIATION = 4, + V1Frame_FrameType_KEEP_ALIVE = 5, + V1Frame_FrameType_DISCONNECTION = 6, + V1Frame_FrameType_PAIRED_KEY_ENCRYPTION = 7 +}; +bool V1Frame_FrameType_IsValid(int value); +constexpr V1Frame_FrameType V1Frame_FrameType_FrameType_MIN = V1Frame_FrameType_UNKNOWN_FRAME_TYPE; +constexpr V1Frame_FrameType V1Frame_FrameType_FrameType_MAX = V1Frame_FrameType_PAIRED_KEY_ENCRYPTION; +constexpr int V1Frame_FrameType_FrameType_ARRAYSIZE = V1Frame_FrameType_FrameType_MAX + 1; + +const std::string& V1Frame_FrameType_Name(V1Frame_FrameType value); +template +inline const std::string& V1Frame_FrameType_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function V1Frame_FrameType_Name."); + return V1Frame_FrameType_Name(static_cast(enum_t_value)); +} +bool V1Frame_FrameType_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, V1Frame_FrameType* value); +enum ConnectionRequestFrame_Medium : int { + ConnectionRequestFrame_Medium_UNKNOWN_MEDIUM = 0, + ConnectionRequestFrame_Medium_MDNS PROTOBUF_DEPRECATED_ENUM = 1, + ConnectionRequestFrame_Medium_BLUETOOTH = 2, + ConnectionRequestFrame_Medium_WIFI_HOTSPOT = 3, + ConnectionRequestFrame_Medium_BLE = 4, + ConnectionRequestFrame_Medium_WIFI_LAN = 5, + ConnectionRequestFrame_Medium_WIFI_AWARE = 6, + ConnectionRequestFrame_Medium_NFC = 7, + ConnectionRequestFrame_Medium_WIFI_DIRECT = 8, + ConnectionRequestFrame_Medium_WEB_RTC = 9, + ConnectionRequestFrame_Medium_BLE_L2CAP = 10 +}; +bool ConnectionRequestFrame_Medium_IsValid(int value); +constexpr ConnectionRequestFrame_Medium ConnectionRequestFrame_Medium_Medium_MIN = ConnectionRequestFrame_Medium_UNKNOWN_MEDIUM; +constexpr ConnectionRequestFrame_Medium ConnectionRequestFrame_Medium_Medium_MAX = ConnectionRequestFrame_Medium_BLE_L2CAP; +constexpr int ConnectionRequestFrame_Medium_Medium_ARRAYSIZE = ConnectionRequestFrame_Medium_Medium_MAX + 1; + +const std::string& ConnectionRequestFrame_Medium_Name(ConnectionRequestFrame_Medium value); +template +inline const std::string& ConnectionRequestFrame_Medium_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function ConnectionRequestFrame_Medium_Name."); + return ConnectionRequestFrame_Medium_Name(static_cast(enum_t_value)); +} +bool ConnectionRequestFrame_Medium_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, ConnectionRequestFrame_Medium* value); +enum ConnectionResponseFrame_ResponseStatus : int { + ConnectionResponseFrame_ResponseStatus_UNKNOWN_RESPONSE_STATUS = 0, + ConnectionResponseFrame_ResponseStatus_ACCEPT = 1, + ConnectionResponseFrame_ResponseStatus_REJECT = 2 +}; +bool ConnectionResponseFrame_ResponseStatus_IsValid(int value); +constexpr ConnectionResponseFrame_ResponseStatus ConnectionResponseFrame_ResponseStatus_ResponseStatus_MIN = ConnectionResponseFrame_ResponseStatus_UNKNOWN_RESPONSE_STATUS; +constexpr ConnectionResponseFrame_ResponseStatus ConnectionResponseFrame_ResponseStatus_ResponseStatus_MAX = ConnectionResponseFrame_ResponseStatus_REJECT; +constexpr int ConnectionResponseFrame_ResponseStatus_ResponseStatus_ARRAYSIZE = ConnectionResponseFrame_ResponseStatus_ResponseStatus_MAX + 1; + +const std::string& ConnectionResponseFrame_ResponseStatus_Name(ConnectionResponseFrame_ResponseStatus value); +template +inline const std::string& ConnectionResponseFrame_ResponseStatus_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function ConnectionResponseFrame_ResponseStatus_Name."); + return ConnectionResponseFrame_ResponseStatus_Name(static_cast(enum_t_value)); +} +bool ConnectionResponseFrame_ResponseStatus_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, ConnectionResponseFrame_ResponseStatus* value); +enum PayloadTransferFrame_PayloadHeader_PayloadType : int { + PayloadTransferFrame_PayloadHeader_PayloadType_UNKNOWN_PAYLOAD_TYPE = 0, + PayloadTransferFrame_PayloadHeader_PayloadType_BYTES = 1, + PayloadTransferFrame_PayloadHeader_PayloadType_FILE = 2, + PayloadTransferFrame_PayloadHeader_PayloadType_STREAM = 3 +}; +bool PayloadTransferFrame_PayloadHeader_PayloadType_IsValid(int value); +constexpr PayloadTransferFrame_PayloadHeader_PayloadType PayloadTransferFrame_PayloadHeader_PayloadType_PayloadType_MIN = PayloadTransferFrame_PayloadHeader_PayloadType_UNKNOWN_PAYLOAD_TYPE; +constexpr PayloadTransferFrame_PayloadHeader_PayloadType PayloadTransferFrame_PayloadHeader_PayloadType_PayloadType_MAX = PayloadTransferFrame_PayloadHeader_PayloadType_STREAM; +constexpr int PayloadTransferFrame_PayloadHeader_PayloadType_PayloadType_ARRAYSIZE = PayloadTransferFrame_PayloadHeader_PayloadType_PayloadType_MAX + 1; + +const std::string& PayloadTransferFrame_PayloadHeader_PayloadType_Name(PayloadTransferFrame_PayloadHeader_PayloadType value); +template +inline const std::string& PayloadTransferFrame_PayloadHeader_PayloadType_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function PayloadTransferFrame_PayloadHeader_PayloadType_Name."); + return PayloadTransferFrame_PayloadHeader_PayloadType_Name(static_cast(enum_t_value)); +} +bool PayloadTransferFrame_PayloadHeader_PayloadType_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, PayloadTransferFrame_PayloadHeader_PayloadType* value); +enum PayloadTransferFrame_PayloadChunk_Flags : int { + PayloadTransferFrame_PayloadChunk_Flags_LAST_CHUNK = 1 +}; +bool PayloadTransferFrame_PayloadChunk_Flags_IsValid(int value); +constexpr PayloadTransferFrame_PayloadChunk_Flags PayloadTransferFrame_PayloadChunk_Flags_Flags_MIN = PayloadTransferFrame_PayloadChunk_Flags_LAST_CHUNK; +constexpr PayloadTransferFrame_PayloadChunk_Flags PayloadTransferFrame_PayloadChunk_Flags_Flags_MAX = PayloadTransferFrame_PayloadChunk_Flags_LAST_CHUNK; +constexpr int PayloadTransferFrame_PayloadChunk_Flags_Flags_ARRAYSIZE = PayloadTransferFrame_PayloadChunk_Flags_Flags_MAX + 1; + +const std::string& PayloadTransferFrame_PayloadChunk_Flags_Name(PayloadTransferFrame_PayloadChunk_Flags value); +template +inline const std::string& PayloadTransferFrame_PayloadChunk_Flags_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function PayloadTransferFrame_PayloadChunk_Flags_Name."); + return PayloadTransferFrame_PayloadChunk_Flags_Name(static_cast(enum_t_value)); +} +bool PayloadTransferFrame_PayloadChunk_Flags_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, PayloadTransferFrame_PayloadChunk_Flags* value); +enum PayloadTransferFrame_ControlMessage_EventType : int { + PayloadTransferFrame_ControlMessage_EventType_UNKNOWN_EVENT_TYPE = 0, + PayloadTransferFrame_ControlMessage_EventType_PAYLOAD_ERROR = 1, + PayloadTransferFrame_ControlMessage_EventType_PAYLOAD_CANCELED = 2 +}; +bool PayloadTransferFrame_ControlMessage_EventType_IsValid(int value); +constexpr PayloadTransferFrame_ControlMessage_EventType PayloadTransferFrame_ControlMessage_EventType_EventType_MIN = PayloadTransferFrame_ControlMessage_EventType_UNKNOWN_EVENT_TYPE; +constexpr PayloadTransferFrame_ControlMessage_EventType PayloadTransferFrame_ControlMessage_EventType_EventType_MAX = PayloadTransferFrame_ControlMessage_EventType_PAYLOAD_CANCELED; +constexpr int PayloadTransferFrame_ControlMessage_EventType_EventType_ARRAYSIZE = PayloadTransferFrame_ControlMessage_EventType_EventType_MAX + 1; + +const std::string& PayloadTransferFrame_ControlMessage_EventType_Name(PayloadTransferFrame_ControlMessage_EventType value); +template +inline const std::string& PayloadTransferFrame_ControlMessage_EventType_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function PayloadTransferFrame_ControlMessage_EventType_Name."); + return PayloadTransferFrame_ControlMessage_EventType_Name(static_cast(enum_t_value)); +} +bool PayloadTransferFrame_ControlMessage_EventType_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, PayloadTransferFrame_ControlMessage_EventType* value); +enum PayloadTransferFrame_PacketType : int { + PayloadTransferFrame_PacketType_UNKNOWN_PACKET_TYPE = 0, + PayloadTransferFrame_PacketType_DATA = 1, + PayloadTransferFrame_PacketType_CONTROL = 2 +}; +bool PayloadTransferFrame_PacketType_IsValid(int value); +constexpr PayloadTransferFrame_PacketType PayloadTransferFrame_PacketType_PacketType_MIN = PayloadTransferFrame_PacketType_UNKNOWN_PACKET_TYPE; +constexpr PayloadTransferFrame_PacketType PayloadTransferFrame_PacketType_PacketType_MAX = PayloadTransferFrame_PacketType_CONTROL; +constexpr int PayloadTransferFrame_PacketType_PacketType_ARRAYSIZE = PayloadTransferFrame_PacketType_PacketType_MAX + 1; + +const std::string& PayloadTransferFrame_PacketType_Name(PayloadTransferFrame_PacketType value); +template +inline const std::string& PayloadTransferFrame_PacketType_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function PayloadTransferFrame_PacketType_Name."); + return PayloadTransferFrame_PacketType_Name(static_cast(enum_t_value)); +} +bool PayloadTransferFrame_PacketType_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, PayloadTransferFrame_PacketType* value); +enum BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium : int { + BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium_UNKNOWN_MEDIUM = 0, + BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium_MDNS PROTOBUF_DEPRECATED_ENUM = 1, + BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium_BLUETOOTH = 2, + BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium_WIFI_HOTSPOT = 3, + BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium_BLE = 4, + BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium_WIFI_LAN = 5, + BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium_WIFI_AWARE = 6, + BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium_NFC = 7, + BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium_WIFI_DIRECT = 8, + BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium_WEB_RTC = 9 +}; +bool BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium_IsValid(int value); +constexpr BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium_Medium_MIN = BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium_UNKNOWN_MEDIUM; +constexpr BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium_Medium_MAX = BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium_WEB_RTC; +constexpr int BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium_Medium_ARRAYSIZE = BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium_Medium_MAX + 1; + +const std::string& BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium_Name(BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium value); +template +inline const std::string& BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium_Name."); + return BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium_Name(static_cast(enum_t_value)); +} +bool BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium* value); +enum BandwidthUpgradeNegotiationFrame_EventType : int { + BandwidthUpgradeNegotiationFrame_EventType_UNKNOWN_EVENT_TYPE = 0, + BandwidthUpgradeNegotiationFrame_EventType_UPGRADE_PATH_AVAILABLE = 1, + BandwidthUpgradeNegotiationFrame_EventType_LAST_WRITE_TO_PRIOR_CHANNEL = 2, + BandwidthUpgradeNegotiationFrame_EventType_SAFE_TO_CLOSE_PRIOR_CHANNEL = 3, + BandwidthUpgradeNegotiationFrame_EventType_CLIENT_INTRODUCTION = 4, + BandwidthUpgradeNegotiationFrame_EventType_UPGRADE_FAILURE = 5, + BandwidthUpgradeNegotiationFrame_EventType_CLIENT_INTRODUCTION_ACK = 6 +}; +bool BandwidthUpgradeNegotiationFrame_EventType_IsValid(int value); +constexpr BandwidthUpgradeNegotiationFrame_EventType BandwidthUpgradeNegotiationFrame_EventType_EventType_MIN = BandwidthUpgradeNegotiationFrame_EventType_UNKNOWN_EVENT_TYPE; +constexpr BandwidthUpgradeNegotiationFrame_EventType BandwidthUpgradeNegotiationFrame_EventType_EventType_MAX = BandwidthUpgradeNegotiationFrame_EventType_CLIENT_INTRODUCTION_ACK; +constexpr int BandwidthUpgradeNegotiationFrame_EventType_EventType_ARRAYSIZE = BandwidthUpgradeNegotiationFrame_EventType_EventType_MAX + 1; + +const std::string& BandwidthUpgradeNegotiationFrame_EventType_Name(BandwidthUpgradeNegotiationFrame_EventType value); +template +inline const std::string& BandwidthUpgradeNegotiationFrame_EventType_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function BandwidthUpgradeNegotiationFrame_EventType_Name."); + return BandwidthUpgradeNegotiationFrame_EventType_Name(static_cast(enum_t_value)); +} +bool BandwidthUpgradeNegotiationFrame_EventType_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, BandwidthUpgradeNegotiationFrame_EventType* value); +enum LocationStandard_Format : int { + LocationStandard_Format_UNKNOWN = 0, + LocationStandard_Format_E164_CALLING = 1, + LocationStandard_Format_ISO_3166_1_ALPHA_2 = 2 +}; +bool LocationStandard_Format_IsValid(int value); +constexpr LocationStandard_Format LocationStandard_Format_Format_MIN = LocationStandard_Format_UNKNOWN; +constexpr LocationStandard_Format LocationStandard_Format_Format_MAX = LocationStandard_Format_ISO_3166_1_ALPHA_2; +constexpr int LocationStandard_Format_Format_ARRAYSIZE = LocationStandard_Format_Format_MAX + 1; + +const std::string& LocationStandard_Format_Name(LocationStandard_Format value); +template +inline const std::string& LocationStandard_Format_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function LocationStandard_Format_Name."); + return LocationStandard_Format_Name(static_cast(enum_t_value)); +} +bool LocationStandard_Format_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, LocationStandard_Format* value); +// =================================================================== + +class OfflineFrame final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:location.nearby.connections.OfflineFrame) */ { + public: + inline OfflineFrame() : OfflineFrame(nullptr) {} + ~OfflineFrame() override; + explicit constexpr OfflineFrame(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + OfflineFrame(const OfflineFrame& from); + OfflineFrame(OfflineFrame&& from) noexcept + : OfflineFrame() { + *this = ::std::move(from); + } + + inline OfflineFrame& operator=(const OfflineFrame& from) { + CopyFrom(from); + return *this; + } + inline OfflineFrame& operator=(OfflineFrame&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const OfflineFrame& default_instance() { + return *internal_default_instance(); + } + static inline const OfflineFrame* internal_default_instance() { + return reinterpret_cast( + &_OfflineFrame_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(OfflineFrame& a, OfflineFrame& b) { + a.Swap(&b); + } + inline void Swap(OfflineFrame* 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(OfflineFrame* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + OfflineFrame* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const OfflineFrame& from); + void MergeFrom(const OfflineFrame& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(OfflineFrame* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "location.nearby.connections.OfflineFrame"; + } + protected: + explicit OfflineFrame(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + typedef OfflineFrame_Version Version; + static constexpr Version UNKNOWN_VERSION = + OfflineFrame_Version_UNKNOWN_VERSION; + static constexpr Version V1 = + OfflineFrame_Version_V1; + static inline bool Version_IsValid(int value) { + return OfflineFrame_Version_IsValid(value); + } + static constexpr Version Version_MIN = + OfflineFrame_Version_Version_MIN; + static constexpr Version Version_MAX = + OfflineFrame_Version_Version_MAX; + static constexpr int Version_ARRAYSIZE = + OfflineFrame_Version_Version_ARRAYSIZE; + template + static inline const std::string& Version_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function Version_Name."); + return OfflineFrame_Version_Name(enum_t_value); + } + static inline bool Version_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name, + Version* value) { + return OfflineFrame_Version_Parse(name, value); + } + + // accessors ------------------------------------------------------- + + enum : int { + kV1FieldNumber = 2, + kVersionFieldNumber = 1, + }; + // optional .location.nearby.connections.V1Frame v1 = 2; + bool has_v1() const; + private: + bool _internal_has_v1() const; + public: + void clear_v1(); + const ::location::nearby::connections::V1Frame& v1() const; + PROTOBUF_NODISCARD ::location::nearby::connections::V1Frame* release_v1(); + ::location::nearby::connections::V1Frame* mutable_v1(); + void set_allocated_v1(::location::nearby::connections::V1Frame* v1); + private: + const ::location::nearby::connections::V1Frame& _internal_v1() const; + ::location::nearby::connections::V1Frame* _internal_mutable_v1(); + public: + void unsafe_arena_set_allocated_v1( + ::location::nearby::connections::V1Frame* v1); + ::location::nearby::connections::V1Frame* unsafe_arena_release_v1(); + + // optional .location.nearby.connections.OfflineFrame.Version version = 1; + bool has_version() const; + private: + bool _internal_has_version() const; + public: + void clear_version(); + ::location::nearby::connections::OfflineFrame_Version version() const; + void set_version(::location::nearby::connections::OfflineFrame_Version value); + private: + ::location::nearby::connections::OfflineFrame_Version _internal_version() const; + void _internal_set_version(::location::nearby::connections::OfflineFrame_Version value); + public: + + // @@protoc_insertion_point(class_scope:location.nearby.connections.OfflineFrame) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::location::nearby::connections::V1Frame* v1_; + int version_; + friend struct ::TableStruct_connections_2fimplementation_2fproto_2foffline_5fwire_5fformats_2eproto; +}; +// ------------------------------------------------------------------- + +class V1Frame final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:location.nearby.connections.V1Frame) */ { + public: + inline V1Frame() : V1Frame(nullptr) {} + ~V1Frame() override; + explicit constexpr V1Frame(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + V1Frame(const V1Frame& from); + V1Frame(V1Frame&& from) noexcept + : V1Frame() { + *this = ::std::move(from); + } + + inline V1Frame& operator=(const V1Frame& from) { + CopyFrom(from); + return *this; + } + inline V1Frame& operator=(V1Frame&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const V1Frame& default_instance() { + return *internal_default_instance(); + } + static inline const V1Frame* internal_default_instance() { + return reinterpret_cast( + &_V1Frame_default_instance_); + } + static constexpr int kIndexInFileMessages = + 1; + + friend void swap(V1Frame& a, V1Frame& b) { + a.Swap(&b); + } + inline void Swap(V1Frame* 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(V1Frame* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + V1Frame* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const V1Frame& from); + void MergeFrom(const V1Frame& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(V1Frame* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "location.nearby.connections.V1Frame"; + } + protected: + explicit V1Frame(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + typedef V1Frame_FrameType FrameType; + static constexpr FrameType UNKNOWN_FRAME_TYPE = + V1Frame_FrameType_UNKNOWN_FRAME_TYPE; + static constexpr FrameType CONNECTION_REQUEST = + V1Frame_FrameType_CONNECTION_REQUEST; + static constexpr FrameType CONNECTION_RESPONSE = + V1Frame_FrameType_CONNECTION_RESPONSE; + static constexpr FrameType PAYLOAD_TRANSFER = + V1Frame_FrameType_PAYLOAD_TRANSFER; + static constexpr FrameType BANDWIDTH_UPGRADE_NEGOTIATION = + V1Frame_FrameType_BANDWIDTH_UPGRADE_NEGOTIATION; + static constexpr FrameType KEEP_ALIVE = + V1Frame_FrameType_KEEP_ALIVE; + static constexpr FrameType DISCONNECTION = + V1Frame_FrameType_DISCONNECTION; + static constexpr FrameType PAIRED_KEY_ENCRYPTION = + V1Frame_FrameType_PAIRED_KEY_ENCRYPTION; + static inline bool FrameType_IsValid(int value) { + return V1Frame_FrameType_IsValid(value); + } + static constexpr FrameType FrameType_MIN = + V1Frame_FrameType_FrameType_MIN; + static constexpr FrameType FrameType_MAX = + V1Frame_FrameType_FrameType_MAX; + static constexpr int FrameType_ARRAYSIZE = + V1Frame_FrameType_FrameType_ARRAYSIZE; + template + static inline const std::string& FrameType_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function FrameType_Name."); + return V1Frame_FrameType_Name(enum_t_value); + } + static inline bool FrameType_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name, + FrameType* value) { + return V1Frame_FrameType_Parse(name, value); + } + + // accessors ------------------------------------------------------- + + enum : int { + kConnectionRequestFieldNumber = 2, + kConnectionResponseFieldNumber = 3, + kPayloadTransferFieldNumber = 4, + kBandwidthUpgradeNegotiationFieldNumber = 5, + kKeepAliveFieldNumber = 6, + kDisconnectionFieldNumber = 7, + kPairedKeyEncryptionFieldNumber = 8, + kTypeFieldNumber = 1, + }; + // optional .location.nearby.connections.ConnectionRequestFrame connection_request = 2; + bool has_connection_request() const; + private: + bool _internal_has_connection_request() const; + public: + void clear_connection_request(); + const ::location::nearby::connections::ConnectionRequestFrame& connection_request() const; + PROTOBUF_NODISCARD ::location::nearby::connections::ConnectionRequestFrame* release_connection_request(); + ::location::nearby::connections::ConnectionRequestFrame* mutable_connection_request(); + void set_allocated_connection_request(::location::nearby::connections::ConnectionRequestFrame* connection_request); + private: + const ::location::nearby::connections::ConnectionRequestFrame& _internal_connection_request() const; + ::location::nearby::connections::ConnectionRequestFrame* _internal_mutable_connection_request(); + public: + void unsafe_arena_set_allocated_connection_request( + ::location::nearby::connections::ConnectionRequestFrame* connection_request); + ::location::nearby::connections::ConnectionRequestFrame* unsafe_arena_release_connection_request(); + + // optional .location.nearby.connections.ConnectionResponseFrame connection_response = 3; + bool has_connection_response() const; + private: + bool _internal_has_connection_response() const; + public: + void clear_connection_response(); + const ::location::nearby::connections::ConnectionResponseFrame& connection_response() const; + PROTOBUF_NODISCARD ::location::nearby::connections::ConnectionResponseFrame* release_connection_response(); + ::location::nearby::connections::ConnectionResponseFrame* mutable_connection_response(); + void set_allocated_connection_response(::location::nearby::connections::ConnectionResponseFrame* connection_response); + private: + const ::location::nearby::connections::ConnectionResponseFrame& _internal_connection_response() const; + ::location::nearby::connections::ConnectionResponseFrame* _internal_mutable_connection_response(); + public: + void unsafe_arena_set_allocated_connection_response( + ::location::nearby::connections::ConnectionResponseFrame* connection_response); + ::location::nearby::connections::ConnectionResponseFrame* unsafe_arena_release_connection_response(); + + // optional .location.nearby.connections.PayloadTransferFrame payload_transfer = 4; + bool has_payload_transfer() const; + private: + bool _internal_has_payload_transfer() const; + public: + void clear_payload_transfer(); + const ::location::nearby::connections::PayloadTransferFrame& payload_transfer() const; + PROTOBUF_NODISCARD ::location::nearby::connections::PayloadTransferFrame* release_payload_transfer(); + ::location::nearby::connections::PayloadTransferFrame* mutable_payload_transfer(); + void set_allocated_payload_transfer(::location::nearby::connections::PayloadTransferFrame* payload_transfer); + private: + const ::location::nearby::connections::PayloadTransferFrame& _internal_payload_transfer() const; + ::location::nearby::connections::PayloadTransferFrame* _internal_mutable_payload_transfer(); + public: + void unsafe_arena_set_allocated_payload_transfer( + ::location::nearby::connections::PayloadTransferFrame* payload_transfer); + ::location::nearby::connections::PayloadTransferFrame* unsafe_arena_release_payload_transfer(); + + // optional .location.nearby.connections.BandwidthUpgradeNegotiationFrame bandwidth_upgrade_negotiation = 5; + bool has_bandwidth_upgrade_negotiation() const; + private: + bool _internal_has_bandwidth_upgrade_negotiation() const; + public: + void clear_bandwidth_upgrade_negotiation(); + const ::location::nearby::connections::BandwidthUpgradeNegotiationFrame& bandwidth_upgrade_negotiation() const; + PROTOBUF_NODISCARD ::location::nearby::connections::BandwidthUpgradeNegotiationFrame* release_bandwidth_upgrade_negotiation(); + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame* mutable_bandwidth_upgrade_negotiation(); + void set_allocated_bandwidth_upgrade_negotiation(::location::nearby::connections::BandwidthUpgradeNegotiationFrame* bandwidth_upgrade_negotiation); + private: + const ::location::nearby::connections::BandwidthUpgradeNegotiationFrame& _internal_bandwidth_upgrade_negotiation() const; + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame* _internal_mutable_bandwidth_upgrade_negotiation(); + public: + void unsafe_arena_set_allocated_bandwidth_upgrade_negotiation( + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame* bandwidth_upgrade_negotiation); + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame* unsafe_arena_release_bandwidth_upgrade_negotiation(); + + // optional .location.nearby.connections.KeepAliveFrame keep_alive = 6; + bool has_keep_alive() const; + private: + bool _internal_has_keep_alive() const; + public: + void clear_keep_alive(); + const ::location::nearby::connections::KeepAliveFrame& keep_alive() const; + PROTOBUF_NODISCARD ::location::nearby::connections::KeepAliveFrame* release_keep_alive(); + ::location::nearby::connections::KeepAliveFrame* mutable_keep_alive(); + void set_allocated_keep_alive(::location::nearby::connections::KeepAliveFrame* keep_alive); + private: + const ::location::nearby::connections::KeepAliveFrame& _internal_keep_alive() const; + ::location::nearby::connections::KeepAliveFrame* _internal_mutable_keep_alive(); + public: + void unsafe_arena_set_allocated_keep_alive( + ::location::nearby::connections::KeepAliveFrame* keep_alive); + ::location::nearby::connections::KeepAliveFrame* unsafe_arena_release_keep_alive(); + + // optional .location.nearby.connections.DisconnectionFrame disconnection = 7; + bool has_disconnection() const; + private: + bool _internal_has_disconnection() const; + public: + void clear_disconnection(); + const ::location::nearby::connections::DisconnectionFrame& disconnection() const; + PROTOBUF_NODISCARD ::location::nearby::connections::DisconnectionFrame* release_disconnection(); + ::location::nearby::connections::DisconnectionFrame* mutable_disconnection(); + void set_allocated_disconnection(::location::nearby::connections::DisconnectionFrame* disconnection); + private: + const ::location::nearby::connections::DisconnectionFrame& _internal_disconnection() const; + ::location::nearby::connections::DisconnectionFrame* _internal_mutable_disconnection(); + public: + void unsafe_arena_set_allocated_disconnection( + ::location::nearby::connections::DisconnectionFrame* disconnection); + ::location::nearby::connections::DisconnectionFrame* unsafe_arena_release_disconnection(); + + // optional .location.nearby.connections.PairedKeyEncryptionFrame paired_key_encryption = 8; + bool has_paired_key_encryption() const; + private: + bool _internal_has_paired_key_encryption() const; + public: + void clear_paired_key_encryption(); + const ::location::nearby::connections::PairedKeyEncryptionFrame& paired_key_encryption() const; + PROTOBUF_NODISCARD ::location::nearby::connections::PairedKeyEncryptionFrame* release_paired_key_encryption(); + ::location::nearby::connections::PairedKeyEncryptionFrame* mutable_paired_key_encryption(); + void set_allocated_paired_key_encryption(::location::nearby::connections::PairedKeyEncryptionFrame* paired_key_encryption); + private: + const ::location::nearby::connections::PairedKeyEncryptionFrame& _internal_paired_key_encryption() const; + ::location::nearby::connections::PairedKeyEncryptionFrame* _internal_mutable_paired_key_encryption(); + public: + void unsafe_arena_set_allocated_paired_key_encryption( + ::location::nearby::connections::PairedKeyEncryptionFrame* paired_key_encryption); + ::location::nearby::connections::PairedKeyEncryptionFrame* unsafe_arena_release_paired_key_encryption(); + + // optional .location.nearby.connections.V1Frame.FrameType type = 1; + bool has_type() const; + private: + bool _internal_has_type() const; + public: + void clear_type(); + ::location::nearby::connections::V1Frame_FrameType type() const; + void set_type(::location::nearby::connections::V1Frame_FrameType value); + private: + ::location::nearby::connections::V1Frame_FrameType _internal_type() const; + void _internal_set_type(::location::nearby::connections::V1Frame_FrameType value); + public: + + // @@protoc_insertion_point(class_scope:location.nearby.connections.V1Frame) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::location::nearby::connections::ConnectionRequestFrame* connection_request_; + ::location::nearby::connections::ConnectionResponseFrame* connection_response_; + ::location::nearby::connections::PayloadTransferFrame* payload_transfer_; + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame* bandwidth_upgrade_negotiation_; + ::location::nearby::connections::KeepAliveFrame* keep_alive_; + ::location::nearby::connections::DisconnectionFrame* disconnection_; + ::location::nearby::connections::PairedKeyEncryptionFrame* paired_key_encryption_; + int type_; + friend struct ::TableStruct_connections_2fimplementation_2fproto_2foffline_5fwire_5fformats_2eproto; +}; +// ------------------------------------------------------------------- + +class ConnectionRequestFrame final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:location.nearby.connections.ConnectionRequestFrame) */ { + public: + inline ConnectionRequestFrame() : ConnectionRequestFrame(nullptr) {} + ~ConnectionRequestFrame() override; + explicit constexpr ConnectionRequestFrame(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ConnectionRequestFrame(const ConnectionRequestFrame& from); + ConnectionRequestFrame(ConnectionRequestFrame&& from) noexcept + : ConnectionRequestFrame() { + *this = ::std::move(from); + } + + inline ConnectionRequestFrame& operator=(const ConnectionRequestFrame& from) { + CopyFrom(from); + return *this; + } + inline ConnectionRequestFrame& operator=(ConnectionRequestFrame&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const ConnectionRequestFrame& default_instance() { + return *internal_default_instance(); + } + static inline const ConnectionRequestFrame* internal_default_instance() { + return reinterpret_cast( + &_ConnectionRequestFrame_default_instance_); + } + static constexpr int kIndexInFileMessages = + 2; + + friend void swap(ConnectionRequestFrame& a, ConnectionRequestFrame& b) { + a.Swap(&b); + } + inline void Swap(ConnectionRequestFrame* 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(ConnectionRequestFrame* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ConnectionRequestFrame* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const ConnectionRequestFrame& from); + void MergeFrom(const ConnectionRequestFrame& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(ConnectionRequestFrame* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "location.nearby.connections.ConnectionRequestFrame"; + } + protected: + explicit ConnectionRequestFrame(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + typedef ConnectionRequestFrame_Medium Medium; + static constexpr Medium UNKNOWN_MEDIUM = + ConnectionRequestFrame_Medium_UNKNOWN_MEDIUM; + PROTOBUF_DEPRECATED_ENUM static constexpr Medium MDNS = + ConnectionRequestFrame_Medium_MDNS; + static constexpr Medium BLUETOOTH = + ConnectionRequestFrame_Medium_BLUETOOTH; + static constexpr Medium WIFI_HOTSPOT = + ConnectionRequestFrame_Medium_WIFI_HOTSPOT; + static constexpr Medium BLE = + ConnectionRequestFrame_Medium_BLE; + static constexpr Medium WIFI_LAN = + ConnectionRequestFrame_Medium_WIFI_LAN; + static constexpr Medium WIFI_AWARE = + ConnectionRequestFrame_Medium_WIFI_AWARE; + static constexpr Medium NFC = + ConnectionRequestFrame_Medium_NFC; + static constexpr Medium WIFI_DIRECT = + ConnectionRequestFrame_Medium_WIFI_DIRECT; + static constexpr Medium WEB_RTC = + ConnectionRequestFrame_Medium_WEB_RTC; + static constexpr Medium BLE_L2CAP = + ConnectionRequestFrame_Medium_BLE_L2CAP; + static inline bool Medium_IsValid(int value) { + return ConnectionRequestFrame_Medium_IsValid(value); + } + static constexpr Medium Medium_MIN = + ConnectionRequestFrame_Medium_Medium_MIN; + static constexpr Medium Medium_MAX = + ConnectionRequestFrame_Medium_Medium_MAX; + static constexpr int Medium_ARRAYSIZE = + ConnectionRequestFrame_Medium_Medium_ARRAYSIZE; + template + static inline const std::string& Medium_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function Medium_Name."); + return ConnectionRequestFrame_Medium_Name(enum_t_value); + } + static inline bool Medium_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name, + Medium* value) { + return ConnectionRequestFrame_Medium_Parse(name, value); + } + + // accessors ------------------------------------------------------- + + enum : int { + kMediumsFieldNumber = 5, + kEndpointIdFieldNumber = 1, + kEndpointNameFieldNumber = 2, + kHandshakeDataFieldNumber = 3, + kEndpointInfoFieldNumber = 6, + kDeviceInfoFieldNumber = 11, + kMediumMetadataFieldNumber = 7, + kNonceFieldNumber = 4, + kKeepAliveIntervalMillisFieldNumber = 8, + kKeepAliveTimeoutMillisFieldNumber = 9, + kDeviceTypeFieldNumber = 10, + }; + // repeated .location.nearby.connections.ConnectionRequestFrame.Medium mediums = 5; + int mediums_size() const; + private: + int _internal_mediums_size() const; + public: + void clear_mediums(); + private: + ::location::nearby::connections::ConnectionRequestFrame_Medium _internal_mediums(int index) const; + void _internal_add_mediums(::location::nearby::connections::ConnectionRequestFrame_Medium value); + ::PROTOBUF_NAMESPACE_ID::RepeatedField* _internal_mutable_mediums(); + public: + ::location::nearby::connections::ConnectionRequestFrame_Medium mediums(int index) const; + void set_mediums(int index, ::location::nearby::connections::ConnectionRequestFrame_Medium value); + void add_mediums(::location::nearby::connections::ConnectionRequestFrame_Medium value); + const ::PROTOBUF_NAMESPACE_ID::RepeatedField& mediums() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedField* mutable_mediums(); + + // optional string endpoint_id = 1; + bool has_endpoint_id() const; + private: + bool _internal_has_endpoint_id() const; + public: + void clear_endpoint_id(); + const std::string& endpoint_id() const; + template + void set_endpoint_id(ArgT0&& arg0, ArgT... args); + std::string* mutable_endpoint_id(); + PROTOBUF_NODISCARD std::string* release_endpoint_id(); + void set_allocated_endpoint_id(std::string* endpoint_id); + private: + const std::string& _internal_endpoint_id() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_endpoint_id(const std::string& value); + std::string* _internal_mutable_endpoint_id(); + public: + + // optional string endpoint_name = 2; + bool has_endpoint_name() const; + private: + bool _internal_has_endpoint_name() const; + public: + void clear_endpoint_name(); + const std::string& endpoint_name() const; + template + void set_endpoint_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_endpoint_name(); + PROTOBUF_NODISCARD std::string* release_endpoint_name(); + void set_allocated_endpoint_name(std::string* endpoint_name); + private: + const std::string& _internal_endpoint_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_endpoint_name(const std::string& value); + std::string* _internal_mutable_endpoint_name(); + public: + + // optional bytes handshake_data = 3; + bool has_handshake_data() const; + private: + bool _internal_has_handshake_data() const; + public: + void clear_handshake_data(); + const std::string& handshake_data() const; + template + void set_handshake_data(ArgT0&& arg0, ArgT... args); + std::string* mutable_handshake_data(); + PROTOBUF_NODISCARD std::string* release_handshake_data(); + void set_allocated_handshake_data(std::string* handshake_data); + private: + const std::string& _internal_handshake_data() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_handshake_data(const std::string& value); + std::string* _internal_mutable_handshake_data(); + public: + + // optional bytes endpoint_info = 6; + bool has_endpoint_info() const; + private: + bool _internal_has_endpoint_info() const; + public: + void clear_endpoint_info(); + const std::string& endpoint_info() const; + template + void set_endpoint_info(ArgT0&& arg0, ArgT... args); + std::string* mutable_endpoint_info(); + PROTOBUF_NODISCARD std::string* release_endpoint_info(); + void set_allocated_endpoint_info(std::string* endpoint_info); + private: + const std::string& _internal_endpoint_info() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_endpoint_info(const std::string& value); + std::string* _internal_mutable_endpoint_info(); + public: + + // optional bytes device_info = 11; + bool has_device_info() const; + private: + bool _internal_has_device_info() const; + public: + void clear_device_info(); + const std::string& device_info() const; + template + void set_device_info(ArgT0&& arg0, ArgT... args); + std::string* mutable_device_info(); + PROTOBUF_NODISCARD std::string* release_device_info(); + void set_allocated_device_info(std::string* device_info); + private: + const std::string& _internal_device_info() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_device_info(const std::string& value); + std::string* _internal_mutable_device_info(); + public: + + // optional .location.nearby.connections.MediumMetadata medium_metadata = 7; + bool has_medium_metadata() const; + private: + bool _internal_has_medium_metadata() const; + public: + void clear_medium_metadata(); + const ::location::nearby::connections::MediumMetadata& medium_metadata() const; + PROTOBUF_NODISCARD ::location::nearby::connections::MediumMetadata* release_medium_metadata(); + ::location::nearby::connections::MediumMetadata* mutable_medium_metadata(); + void set_allocated_medium_metadata(::location::nearby::connections::MediumMetadata* medium_metadata); + private: + const ::location::nearby::connections::MediumMetadata& _internal_medium_metadata() const; + ::location::nearby::connections::MediumMetadata* _internal_mutable_medium_metadata(); + public: + void unsafe_arena_set_allocated_medium_metadata( + ::location::nearby::connections::MediumMetadata* medium_metadata); + ::location::nearby::connections::MediumMetadata* unsafe_arena_release_medium_metadata(); + + // optional int32 nonce = 4; + bool has_nonce() const; + private: + bool _internal_has_nonce() const; + public: + void clear_nonce(); + int32_t nonce() const; + void set_nonce(int32_t value); + private: + int32_t _internal_nonce() const; + void _internal_set_nonce(int32_t value); + public: + + // optional int32 keep_alive_interval_millis = 8; + bool has_keep_alive_interval_millis() const; + private: + bool _internal_has_keep_alive_interval_millis() const; + public: + void clear_keep_alive_interval_millis(); + int32_t keep_alive_interval_millis() const; + void set_keep_alive_interval_millis(int32_t value); + private: + int32_t _internal_keep_alive_interval_millis() const; + void _internal_set_keep_alive_interval_millis(int32_t value); + public: + + // optional int32 keep_alive_timeout_millis = 9; + bool has_keep_alive_timeout_millis() const; + private: + bool _internal_has_keep_alive_timeout_millis() const; + public: + void clear_keep_alive_timeout_millis(); + int32_t keep_alive_timeout_millis() const; + void set_keep_alive_timeout_millis(int32_t value); + private: + int32_t _internal_keep_alive_timeout_millis() const; + void _internal_set_keep_alive_timeout_millis(int32_t value); + public: + + // optional int32 device_type = 10 [default = 0]; + bool has_device_type() const; + private: + bool _internal_has_device_type() const; + public: + void clear_device_type(); + int32_t device_type() const; + void set_device_type(int32_t value); + private: + int32_t _internal_device_type() const; + void _internal_set_device_type(int32_t value); + public: + + // @@protoc_insertion_point(class_scope:location.nearby.connections.ConnectionRequestFrame) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::RepeatedField mediums_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr endpoint_id_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr endpoint_name_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr handshake_data_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr endpoint_info_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr device_info_; + ::location::nearby::connections::MediumMetadata* medium_metadata_; + int32_t nonce_; + int32_t keep_alive_interval_millis_; + int32_t keep_alive_timeout_millis_; + int32_t device_type_; + friend struct ::TableStruct_connections_2fimplementation_2fproto_2foffline_5fwire_5fformats_2eproto; +}; +// ------------------------------------------------------------------- + +class ConnectionResponseFrame final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:location.nearby.connections.ConnectionResponseFrame) */ { + public: + inline ConnectionResponseFrame() : ConnectionResponseFrame(nullptr) {} + ~ConnectionResponseFrame() override; + explicit constexpr ConnectionResponseFrame(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ConnectionResponseFrame(const ConnectionResponseFrame& from); + ConnectionResponseFrame(ConnectionResponseFrame&& from) noexcept + : ConnectionResponseFrame() { + *this = ::std::move(from); + } + + inline ConnectionResponseFrame& operator=(const ConnectionResponseFrame& from) { + CopyFrom(from); + return *this; + } + inline ConnectionResponseFrame& operator=(ConnectionResponseFrame&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const ConnectionResponseFrame& default_instance() { + return *internal_default_instance(); + } + static inline const ConnectionResponseFrame* internal_default_instance() { + return reinterpret_cast( + &_ConnectionResponseFrame_default_instance_); + } + static constexpr int kIndexInFileMessages = + 3; + + friend void swap(ConnectionResponseFrame& a, ConnectionResponseFrame& b) { + a.Swap(&b); + } + inline void Swap(ConnectionResponseFrame* 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(ConnectionResponseFrame* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ConnectionResponseFrame* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const ConnectionResponseFrame& from); + void MergeFrom(const ConnectionResponseFrame& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(ConnectionResponseFrame* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "location.nearby.connections.ConnectionResponseFrame"; + } + protected: + explicit ConnectionResponseFrame(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + typedef ConnectionResponseFrame_ResponseStatus ResponseStatus; + static constexpr ResponseStatus UNKNOWN_RESPONSE_STATUS = + ConnectionResponseFrame_ResponseStatus_UNKNOWN_RESPONSE_STATUS; + static constexpr ResponseStatus ACCEPT = + ConnectionResponseFrame_ResponseStatus_ACCEPT; + static constexpr ResponseStatus REJECT = + ConnectionResponseFrame_ResponseStatus_REJECT; + static inline bool ResponseStatus_IsValid(int value) { + return ConnectionResponseFrame_ResponseStatus_IsValid(value); + } + static constexpr ResponseStatus ResponseStatus_MIN = + ConnectionResponseFrame_ResponseStatus_ResponseStatus_MIN; + static constexpr ResponseStatus ResponseStatus_MAX = + ConnectionResponseFrame_ResponseStatus_ResponseStatus_MAX; + static constexpr int ResponseStatus_ARRAYSIZE = + ConnectionResponseFrame_ResponseStatus_ResponseStatus_ARRAYSIZE; + template + static inline const std::string& ResponseStatus_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function ResponseStatus_Name."); + return ConnectionResponseFrame_ResponseStatus_Name(enum_t_value); + } + static inline bool ResponseStatus_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name, + ResponseStatus* value) { + return ConnectionResponseFrame_ResponseStatus_Parse(name, value); + } + + // accessors ------------------------------------------------------- + + enum : int { + kHandshakeDataFieldNumber = 2, + kStatusFieldNumber = 1, + kResponseFieldNumber = 3, + }; + // optional bytes handshake_data = 2; + bool has_handshake_data() const; + private: + bool _internal_has_handshake_data() const; + public: + void clear_handshake_data(); + const std::string& handshake_data() const; + template + void set_handshake_data(ArgT0&& arg0, ArgT... args); + std::string* mutable_handshake_data(); + PROTOBUF_NODISCARD std::string* release_handshake_data(); + void set_allocated_handshake_data(std::string* handshake_data); + private: + const std::string& _internal_handshake_data() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_handshake_data(const std::string& value); + std::string* _internal_mutable_handshake_data(); + public: + + // optional int32 status = 1 [deprecated = true]; + PROTOBUF_DEPRECATED bool has_status() const; + private: + bool _internal_has_status() const; + public: + PROTOBUF_DEPRECATED void clear_status(); + PROTOBUF_DEPRECATED int32_t status() const; + PROTOBUF_DEPRECATED void set_status(int32_t value); + private: + int32_t _internal_status() const; + void _internal_set_status(int32_t value); + public: + + // optional .location.nearby.connections.ConnectionResponseFrame.ResponseStatus response = 3; + bool has_response() const; + private: + bool _internal_has_response() const; + public: + void clear_response(); + ::location::nearby::connections::ConnectionResponseFrame_ResponseStatus response() const; + void set_response(::location::nearby::connections::ConnectionResponseFrame_ResponseStatus value); + private: + ::location::nearby::connections::ConnectionResponseFrame_ResponseStatus _internal_response() const; + void _internal_set_response(::location::nearby::connections::ConnectionResponseFrame_ResponseStatus value); + public: + + // @@protoc_insertion_point(class_scope:location.nearby.connections.ConnectionResponseFrame) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr handshake_data_; + int32_t status_; + int response_; + friend struct ::TableStruct_connections_2fimplementation_2fproto_2foffline_5fwire_5fformats_2eproto; +}; +// ------------------------------------------------------------------- + +class PayloadTransferFrame_PayloadHeader final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:location.nearby.connections.PayloadTransferFrame.PayloadHeader) */ { + public: + inline PayloadTransferFrame_PayloadHeader() : PayloadTransferFrame_PayloadHeader(nullptr) {} + ~PayloadTransferFrame_PayloadHeader() override; + explicit constexpr PayloadTransferFrame_PayloadHeader(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + PayloadTransferFrame_PayloadHeader(const PayloadTransferFrame_PayloadHeader& from); + PayloadTransferFrame_PayloadHeader(PayloadTransferFrame_PayloadHeader&& from) noexcept + : PayloadTransferFrame_PayloadHeader() { + *this = ::std::move(from); + } + + inline PayloadTransferFrame_PayloadHeader& operator=(const PayloadTransferFrame_PayloadHeader& from) { + CopyFrom(from); + return *this; + } + inline PayloadTransferFrame_PayloadHeader& operator=(PayloadTransferFrame_PayloadHeader&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const PayloadTransferFrame_PayloadHeader& default_instance() { + return *internal_default_instance(); + } + static inline const PayloadTransferFrame_PayloadHeader* internal_default_instance() { + return reinterpret_cast( + &_PayloadTransferFrame_PayloadHeader_default_instance_); + } + static constexpr int kIndexInFileMessages = + 4; + + friend void swap(PayloadTransferFrame_PayloadHeader& a, PayloadTransferFrame_PayloadHeader& b) { + a.Swap(&b); + } + inline void Swap(PayloadTransferFrame_PayloadHeader* 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(PayloadTransferFrame_PayloadHeader* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + PayloadTransferFrame_PayloadHeader* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const PayloadTransferFrame_PayloadHeader& from); + void MergeFrom(const PayloadTransferFrame_PayloadHeader& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(PayloadTransferFrame_PayloadHeader* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "location.nearby.connections.PayloadTransferFrame.PayloadHeader"; + } + protected: + explicit PayloadTransferFrame_PayloadHeader(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + typedef PayloadTransferFrame_PayloadHeader_PayloadType PayloadType; + static constexpr PayloadType UNKNOWN_PAYLOAD_TYPE = + PayloadTransferFrame_PayloadHeader_PayloadType_UNKNOWN_PAYLOAD_TYPE; + static constexpr PayloadType BYTES = + PayloadTransferFrame_PayloadHeader_PayloadType_BYTES; + static constexpr PayloadType FILE = + PayloadTransferFrame_PayloadHeader_PayloadType_FILE; + static constexpr PayloadType STREAM = + PayloadTransferFrame_PayloadHeader_PayloadType_STREAM; + static inline bool PayloadType_IsValid(int value) { + return PayloadTransferFrame_PayloadHeader_PayloadType_IsValid(value); + } + static constexpr PayloadType PayloadType_MIN = + PayloadTransferFrame_PayloadHeader_PayloadType_PayloadType_MIN; + static constexpr PayloadType PayloadType_MAX = + PayloadTransferFrame_PayloadHeader_PayloadType_PayloadType_MAX; + static constexpr int PayloadType_ARRAYSIZE = + PayloadTransferFrame_PayloadHeader_PayloadType_PayloadType_ARRAYSIZE; + template + static inline const std::string& PayloadType_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function PayloadType_Name."); + return PayloadTransferFrame_PayloadHeader_PayloadType_Name(enum_t_value); + } + static inline bool PayloadType_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name, + PayloadType* value) { + return PayloadTransferFrame_PayloadHeader_PayloadType_Parse(name, value); + } + + // accessors ------------------------------------------------------- + + enum : int { + kFileNameFieldNumber = 5, + kParentFolderFieldNumber = 6, + kIdFieldNumber = 1, + kTotalSizeFieldNumber = 3, + kTypeFieldNumber = 2, + kIsSensitiveFieldNumber = 4, + }; + // optional string file_name = 5; + bool has_file_name() const; + private: + bool _internal_has_file_name() const; + public: + void clear_file_name(); + const std::string& file_name() const; + template + void set_file_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_file_name(); + PROTOBUF_NODISCARD std::string* release_file_name(); + void set_allocated_file_name(std::string* file_name); + private: + const std::string& _internal_file_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_file_name(const std::string& value); + std::string* _internal_mutable_file_name(); + public: + + // optional string parent_folder = 6; + bool has_parent_folder() const; + private: + bool _internal_has_parent_folder() const; + public: + void clear_parent_folder(); + const std::string& parent_folder() const; + template + void set_parent_folder(ArgT0&& arg0, ArgT... args); + std::string* mutable_parent_folder(); + PROTOBUF_NODISCARD std::string* release_parent_folder(); + void set_allocated_parent_folder(std::string* parent_folder); + private: + const std::string& _internal_parent_folder() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_parent_folder(const std::string& value); + std::string* _internal_mutable_parent_folder(); + public: + + // optional int64 id = 1; + bool has_id() const; + private: + bool _internal_has_id() const; + public: + void clear_id(); + int64_t id() const; + void set_id(int64_t value); + private: + int64_t _internal_id() const; + void _internal_set_id(int64_t value); + public: + + // optional int64 total_size = 3; + bool has_total_size() const; + private: + bool _internal_has_total_size() const; + public: + void clear_total_size(); + int64_t total_size() const; + void set_total_size(int64_t value); + private: + int64_t _internal_total_size() const; + void _internal_set_total_size(int64_t value); + public: + + // optional .location.nearby.connections.PayloadTransferFrame.PayloadHeader.PayloadType type = 2; + bool has_type() const; + private: + bool _internal_has_type() const; + public: + void clear_type(); + ::location::nearby::connections::PayloadTransferFrame_PayloadHeader_PayloadType type() const; + void set_type(::location::nearby::connections::PayloadTransferFrame_PayloadHeader_PayloadType value); + private: + ::location::nearby::connections::PayloadTransferFrame_PayloadHeader_PayloadType _internal_type() const; + void _internal_set_type(::location::nearby::connections::PayloadTransferFrame_PayloadHeader_PayloadType value); + public: + + // optional bool is_sensitive = 4; + bool has_is_sensitive() const; + private: + bool _internal_has_is_sensitive() const; + public: + void clear_is_sensitive(); + bool is_sensitive() const; + void set_is_sensitive(bool value); + private: + bool _internal_is_sensitive() const; + void _internal_set_is_sensitive(bool value); + public: + + // @@protoc_insertion_point(class_scope:location.nearby.connections.PayloadTransferFrame.PayloadHeader) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr file_name_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr parent_folder_; + int64_t id_; + int64_t total_size_; + int type_; + bool is_sensitive_; + friend struct ::TableStruct_connections_2fimplementation_2fproto_2foffline_5fwire_5fformats_2eproto; +}; +// ------------------------------------------------------------------- + +class PayloadTransferFrame_PayloadChunk final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:location.nearby.connections.PayloadTransferFrame.PayloadChunk) */ { + public: + inline PayloadTransferFrame_PayloadChunk() : PayloadTransferFrame_PayloadChunk(nullptr) {} + ~PayloadTransferFrame_PayloadChunk() override; + explicit constexpr PayloadTransferFrame_PayloadChunk(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + PayloadTransferFrame_PayloadChunk(const PayloadTransferFrame_PayloadChunk& from); + PayloadTransferFrame_PayloadChunk(PayloadTransferFrame_PayloadChunk&& from) noexcept + : PayloadTransferFrame_PayloadChunk() { + *this = ::std::move(from); + } + + inline PayloadTransferFrame_PayloadChunk& operator=(const PayloadTransferFrame_PayloadChunk& from) { + CopyFrom(from); + return *this; + } + inline PayloadTransferFrame_PayloadChunk& operator=(PayloadTransferFrame_PayloadChunk&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const PayloadTransferFrame_PayloadChunk& default_instance() { + return *internal_default_instance(); + } + static inline const PayloadTransferFrame_PayloadChunk* internal_default_instance() { + return reinterpret_cast( + &_PayloadTransferFrame_PayloadChunk_default_instance_); + } + static constexpr int kIndexInFileMessages = + 5; + + friend void swap(PayloadTransferFrame_PayloadChunk& a, PayloadTransferFrame_PayloadChunk& b) { + a.Swap(&b); + } + inline void Swap(PayloadTransferFrame_PayloadChunk* 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(PayloadTransferFrame_PayloadChunk* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + PayloadTransferFrame_PayloadChunk* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const PayloadTransferFrame_PayloadChunk& from); + void MergeFrom(const PayloadTransferFrame_PayloadChunk& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(PayloadTransferFrame_PayloadChunk* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "location.nearby.connections.PayloadTransferFrame.PayloadChunk"; + } + protected: + explicit PayloadTransferFrame_PayloadChunk(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + typedef PayloadTransferFrame_PayloadChunk_Flags Flags; + static constexpr Flags LAST_CHUNK = + PayloadTransferFrame_PayloadChunk_Flags_LAST_CHUNK; + static inline bool Flags_IsValid(int value) { + return PayloadTransferFrame_PayloadChunk_Flags_IsValid(value); + } + static constexpr Flags Flags_MIN = + PayloadTransferFrame_PayloadChunk_Flags_Flags_MIN; + static constexpr Flags Flags_MAX = + PayloadTransferFrame_PayloadChunk_Flags_Flags_MAX; + static constexpr int Flags_ARRAYSIZE = + PayloadTransferFrame_PayloadChunk_Flags_Flags_ARRAYSIZE; + template + static inline const std::string& Flags_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function Flags_Name."); + return PayloadTransferFrame_PayloadChunk_Flags_Name(enum_t_value); + } + static inline bool Flags_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name, + Flags* value) { + return PayloadTransferFrame_PayloadChunk_Flags_Parse(name, value); + } + + // accessors ------------------------------------------------------- + + enum : int { + kBodyFieldNumber = 3, + kOffsetFieldNumber = 2, + kFlagsFieldNumber = 1, + }; + // optional bytes body = 3; + bool has_body() const; + private: + bool _internal_has_body() const; + public: + void clear_body(); + const std::string& body() const; + template + void set_body(ArgT0&& arg0, ArgT... args); + std::string* mutable_body(); + PROTOBUF_NODISCARD std::string* release_body(); + void set_allocated_body(std::string* body); + private: + const std::string& _internal_body() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_body(const std::string& value); + std::string* _internal_mutable_body(); + public: + + // optional int64 offset = 2; + bool has_offset() const; + private: + bool _internal_has_offset() const; + public: + void clear_offset(); + int64_t offset() const; + void set_offset(int64_t value); + private: + int64_t _internal_offset() const; + void _internal_set_offset(int64_t value); + public: + + // optional int32 flags = 1; + bool has_flags() const; + private: + bool _internal_has_flags() const; + public: + void clear_flags(); + int32_t flags() const; + void set_flags(int32_t value); + private: + int32_t _internal_flags() const; + void _internal_set_flags(int32_t value); + public: + + // @@protoc_insertion_point(class_scope:location.nearby.connections.PayloadTransferFrame.PayloadChunk) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr body_; + int64_t offset_; + int32_t flags_; + friend struct ::TableStruct_connections_2fimplementation_2fproto_2foffline_5fwire_5fformats_2eproto; +}; +// ------------------------------------------------------------------- + +class PayloadTransferFrame_ControlMessage final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:location.nearby.connections.PayloadTransferFrame.ControlMessage) */ { + public: + inline PayloadTransferFrame_ControlMessage() : PayloadTransferFrame_ControlMessage(nullptr) {} + ~PayloadTransferFrame_ControlMessage() override; + explicit constexpr PayloadTransferFrame_ControlMessage(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + PayloadTransferFrame_ControlMessage(const PayloadTransferFrame_ControlMessage& from); + PayloadTransferFrame_ControlMessage(PayloadTransferFrame_ControlMessage&& from) noexcept + : PayloadTransferFrame_ControlMessage() { + *this = ::std::move(from); + } + + inline PayloadTransferFrame_ControlMessage& operator=(const PayloadTransferFrame_ControlMessage& from) { + CopyFrom(from); + return *this; + } + inline PayloadTransferFrame_ControlMessage& operator=(PayloadTransferFrame_ControlMessage&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const PayloadTransferFrame_ControlMessage& default_instance() { + return *internal_default_instance(); + } + static inline const PayloadTransferFrame_ControlMessage* internal_default_instance() { + return reinterpret_cast( + &_PayloadTransferFrame_ControlMessage_default_instance_); + } + static constexpr int kIndexInFileMessages = + 6; + + friend void swap(PayloadTransferFrame_ControlMessage& a, PayloadTransferFrame_ControlMessage& b) { + a.Swap(&b); + } + inline void Swap(PayloadTransferFrame_ControlMessage* 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(PayloadTransferFrame_ControlMessage* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + PayloadTransferFrame_ControlMessage* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const PayloadTransferFrame_ControlMessage& from); + void MergeFrom(const PayloadTransferFrame_ControlMessage& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(PayloadTransferFrame_ControlMessage* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "location.nearby.connections.PayloadTransferFrame.ControlMessage"; + } + protected: + explicit PayloadTransferFrame_ControlMessage(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + typedef PayloadTransferFrame_ControlMessage_EventType EventType; + static constexpr EventType UNKNOWN_EVENT_TYPE = + PayloadTransferFrame_ControlMessage_EventType_UNKNOWN_EVENT_TYPE; + static constexpr EventType PAYLOAD_ERROR = + PayloadTransferFrame_ControlMessage_EventType_PAYLOAD_ERROR; + static constexpr EventType PAYLOAD_CANCELED = + PayloadTransferFrame_ControlMessage_EventType_PAYLOAD_CANCELED; + static inline bool EventType_IsValid(int value) { + return PayloadTransferFrame_ControlMessage_EventType_IsValid(value); + } + static constexpr EventType EventType_MIN = + PayloadTransferFrame_ControlMessage_EventType_EventType_MIN; + static constexpr EventType EventType_MAX = + PayloadTransferFrame_ControlMessage_EventType_EventType_MAX; + static constexpr int EventType_ARRAYSIZE = + PayloadTransferFrame_ControlMessage_EventType_EventType_ARRAYSIZE; + template + static inline const std::string& EventType_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function EventType_Name."); + return PayloadTransferFrame_ControlMessage_EventType_Name(enum_t_value); + } + static inline bool EventType_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name, + EventType* value) { + return PayloadTransferFrame_ControlMessage_EventType_Parse(name, value); + } + + // accessors ------------------------------------------------------- + + enum : int { + kOffsetFieldNumber = 2, + kEventFieldNumber = 1, + }; + // optional int64 offset = 2; + bool has_offset() const; + private: + bool _internal_has_offset() const; + public: + void clear_offset(); + int64_t offset() const; + void set_offset(int64_t value); + private: + int64_t _internal_offset() const; + void _internal_set_offset(int64_t value); + public: + + // optional .location.nearby.connections.PayloadTransferFrame.ControlMessage.EventType event = 1; + bool has_event() const; + private: + bool _internal_has_event() const; + public: + void clear_event(); + ::location::nearby::connections::PayloadTransferFrame_ControlMessage_EventType event() const; + void set_event(::location::nearby::connections::PayloadTransferFrame_ControlMessage_EventType value); + private: + ::location::nearby::connections::PayloadTransferFrame_ControlMessage_EventType _internal_event() const; + void _internal_set_event(::location::nearby::connections::PayloadTransferFrame_ControlMessage_EventType value); + public: + + // @@protoc_insertion_point(class_scope:location.nearby.connections.PayloadTransferFrame.ControlMessage) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + int64_t offset_; + int event_; + friend struct ::TableStruct_connections_2fimplementation_2fproto_2foffline_5fwire_5fformats_2eproto; +}; +// ------------------------------------------------------------------- + +class PayloadTransferFrame final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:location.nearby.connections.PayloadTransferFrame) */ { + public: + inline PayloadTransferFrame() : PayloadTransferFrame(nullptr) {} + ~PayloadTransferFrame() override; + explicit constexpr PayloadTransferFrame(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + PayloadTransferFrame(const PayloadTransferFrame& from); + PayloadTransferFrame(PayloadTransferFrame&& from) noexcept + : PayloadTransferFrame() { + *this = ::std::move(from); + } + + inline PayloadTransferFrame& operator=(const PayloadTransferFrame& from) { + CopyFrom(from); + return *this; + } + inline PayloadTransferFrame& operator=(PayloadTransferFrame&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const PayloadTransferFrame& default_instance() { + return *internal_default_instance(); + } + static inline const PayloadTransferFrame* internal_default_instance() { + return reinterpret_cast( + &_PayloadTransferFrame_default_instance_); + } + static constexpr int kIndexInFileMessages = + 7; + + friend void swap(PayloadTransferFrame& a, PayloadTransferFrame& b) { + a.Swap(&b); + } + inline void Swap(PayloadTransferFrame* 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(PayloadTransferFrame* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + PayloadTransferFrame* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const PayloadTransferFrame& from); + void MergeFrom(const PayloadTransferFrame& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(PayloadTransferFrame* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "location.nearby.connections.PayloadTransferFrame"; + } + protected: + explicit PayloadTransferFrame(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + typedef PayloadTransferFrame_PayloadHeader PayloadHeader; + typedef PayloadTransferFrame_PayloadChunk PayloadChunk; + typedef PayloadTransferFrame_ControlMessage ControlMessage; + + typedef PayloadTransferFrame_PacketType PacketType; + static constexpr PacketType UNKNOWN_PACKET_TYPE = + PayloadTransferFrame_PacketType_UNKNOWN_PACKET_TYPE; + static constexpr PacketType DATA = + PayloadTransferFrame_PacketType_DATA; + static constexpr PacketType CONTROL = + PayloadTransferFrame_PacketType_CONTROL; + static inline bool PacketType_IsValid(int value) { + return PayloadTransferFrame_PacketType_IsValid(value); + } + static constexpr PacketType PacketType_MIN = + PayloadTransferFrame_PacketType_PacketType_MIN; + static constexpr PacketType PacketType_MAX = + PayloadTransferFrame_PacketType_PacketType_MAX; + static constexpr int PacketType_ARRAYSIZE = + PayloadTransferFrame_PacketType_PacketType_ARRAYSIZE; + template + static inline const std::string& PacketType_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function PacketType_Name."); + return PayloadTransferFrame_PacketType_Name(enum_t_value); + } + static inline bool PacketType_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name, + PacketType* value) { + return PayloadTransferFrame_PacketType_Parse(name, value); + } + + // accessors ------------------------------------------------------- + + enum : int { + kPayloadHeaderFieldNumber = 2, + kPayloadChunkFieldNumber = 3, + kControlMessageFieldNumber = 4, + kPacketTypeFieldNumber = 1, + }; + // optional .location.nearby.connections.PayloadTransferFrame.PayloadHeader payload_header = 2; + bool has_payload_header() const; + private: + bool _internal_has_payload_header() const; + public: + void clear_payload_header(); + const ::location::nearby::connections::PayloadTransferFrame_PayloadHeader& payload_header() const; + PROTOBUF_NODISCARD ::location::nearby::connections::PayloadTransferFrame_PayloadHeader* release_payload_header(); + ::location::nearby::connections::PayloadTransferFrame_PayloadHeader* mutable_payload_header(); + void set_allocated_payload_header(::location::nearby::connections::PayloadTransferFrame_PayloadHeader* payload_header); + private: + const ::location::nearby::connections::PayloadTransferFrame_PayloadHeader& _internal_payload_header() const; + ::location::nearby::connections::PayloadTransferFrame_PayloadHeader* _internal_mutable_payload_header(); + public: + void unsafe_arena_set_allocated_payload_header( + ::location::nearby::connections::PayloadTransferFrame_PayloadHeader* payload_header); + ::location::nearby::connections::PayloadTransferFrame_PayloadHeader* unsafe_arena_release_payload_header(); + + // optional .location.nearby.connections.PayloadTransferFrame.PayloadChunk payload_chunk = 3; + bool has_payload_chunk() const; + private: + bool _internal_has_payload_chunk() const; + public: + void clear_payload_chunk(); + const ::location::nearby::connections::PayloadTransferFrame_PayloadChunk& payload_chunk() const; + PROTOBUF_NODISCARD ::location::nearby::connections::PayloadTransferFrame_PayloadChunk* release_payload_chunk(); + ::location::nearby::connections::PayloadTransferFrame_PayloadChunk* mutable_payload_chunk(); + void set_allocated_payload_chunk(::location::nearby::connections::PayloadTransferFrame_PayloadChunk* payload_chunk); + private: + const ::location::nearby::connections::PayloadTransferFrame_PayloadChunk& _internal_payload_chunk() const; + ::location::nearby::connections::PayloadTransferFrame_PayloadChunk* _internal_mutable_payload_chunk(); + public: + void unsafe_arena_set_allocated_payload_chunk( + ::location::nearby::connections::PayloadTransferFrame_PayloadChunk* payload_chunk); + ::location::nearby::connections::PayloadTransferFrame_PayloadChunk* unsafe_arena_release_payload_chunk(); + + // optional .location.nearby.connections.PayloadTransferFrame.ControlMessage control_message = 4; + bool has_control_message() const; + private: + bool _internal_has_control_message() const; + public: + void clear_control_message(); + const ::location::nearby::connections::PayloadTransferFrame_ControlMessage& control_message() const; + PROTOBUF_NODISCARD ::location::nearby::connections::PayloadTransferFrame_ControlMessage* release_control_message(); + ::location::nearby::connections::PayloadTransferFrame_ControlMessage* mutable_control_message(); + void set_allocated_control_message(::location::nearby::connections::PayloadTransferFrame_ControlMessage* control_message); + private: + const ::location::nearby::connections::PayloadTransferFrame_ControlMessage& _internal_control_message() const; + ::location::nearby::connections::PayloadTransferFrame_ControlMessage* _internal_mutable_control_message(); + public: + void unsafe_arena_set_allocated_control_message( + ::location::nearby::connections::PayloadTransferFrame_ControlMessage* control_message); + ::location::nearby::connections::PayloadTransferFrame_ControlMessage* unsafe_arena_release_control_message(); + + // optional .location.nearby.connections.PayloadTransferFrame.PacketType packet_type = 1; + bool has_packet_type() const; + private: + bool _internal_has_packet_type() const; + public: + void clear_packet_type(); + ::location::nearby::connections::PayloadTransferFrame_PacketType packet_type() const; + void set_packet_type(::location::nearby::connections::PayloadTransferFrame_PacketType value); + private: + ::location::nearby::connections::PayloadTransferFrame_PacketType _internal_packet_type() const; + void _internal_set_packet_type(::location::nearby::connections::PayloadTransferFrame_PacketType value); + public: + + // @@protoc_insertion_point(class_scope:location.nearby.connections.PayloadTransferFrame) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::location::nearby::connections::PayloadTransferFrame_PayloadHeader* payload_header_; + ::location::nearby::connections::PayloadTransferFrame_PayloadChunk* payload_chunk_; + ::location::nearby::connections::PayloadTransferFrame_ControlMessage* control_message_; + int packet_type_; + friend struct ::TableStruct_connections_2fimplementation_2fproto_2foffline_5fwire_5fformats_2eproto; +}; +// ------------------------------------------------------------------- + +class BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiHotspotCredentials) */ { + public: + inline BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials() : BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials(nullptr) {} + ~BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials() override; + explicit constexpr BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials(const BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials& from); + BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials(BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials&& from) noexcept + : BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials() { + *this = ::std::move(from); + } + + inline BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials& operator=(const BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials& from) { + CopyFrom(from); + return *this; + } + inline BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials& operator=(BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials& default_instance() { + return *internal_default_instance(); + } + static inline const BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials* internal_default_instance() { + return reinterpret_cast( + &_BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials_default_instance_); + } + static constexpr int kIndexInFileMessages = + 8; + + friend void swap(BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials& a, BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials& b) { + a.Swap(&b); + } + inline void Swap(BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials* 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(BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials& from); + void MergeFrom(const BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiHotspotCredentials"; + } + protected: + explicit BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kSsidFieldNumber = 1, + kPasswordFieldNumber = 2, + kGatewayFieldNumber = 4, + kPortFieldNumber = 3, + kFrequencyFieldNumber = 5, + }; + // optional string ssid = 1; + bool has_ssid() const; + private: + bool _internal_has_ssid() const; + public: + void clear_ssid(); + const std::string& ssid() const; + template + void set_ssid(ArgT0&& arg0, ArgT... args); + std::string* mutable_ssid(); + PROTOBUF_NODISCARD std::string* release_ssid(); + void set_allocated_ssid(std::string* ssid); + private: + const std::string& _internal_ssid() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_ssid(const std::string& value); + std::string* _internal_mutable_ssid(); + public: + + // optional string password = 2; + bool has_password() const; + private: + bool _internal_has_password() const; + public: + void clear_password(); + const std::string& password() const; + template + void set_password(ArgT0&& arg0, ArgT... args); + std::string* mutable_password(); + PROTOBUF_NODISCARD std::string* release_password(); + void set_allocated_password(std::string* password); + private: + const std::string& _internal_password() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_password(const std::string& value); + std::string* _internal_mutable_password(); + public: + + // optional string gateway = 4 [default = "0.0.0.0"]; + bool has_gateway() const; + private: + bool _internal_has_gateway() const; + public: + void clear_gateway(); + const std::string& gateway() const; + template + void set_gateway(ArgT0&& arg0, ArgT... args); + std::string* mutable_gateway(); + PROTOBUF_NODISCARD std::string* release_gateway(); + void set_allocated_gateway(std::string* gateway); + private: + const std::string& _internal_gateway() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_gateway(const std::string& value); + std::string* _internal_mutable_gateway(); + public: + + // optional int32 port = 3; + bool has_port() const; + private: + bool _internal_has_port() const; + public: + void clear_port(); + int32_t port() const; + void set_port(int32_t value); + private: + int32_t _internal_port() const; + void _internal_set_port(int32_t value); + public: + + // optional int32 frequency = 5 [default = -1]; + bool has_frequency() const; + private: + bool _internal_has_frequency() const; + public: + void clear_frequency(); + int32_t frequency() const; + void set_frequency(int32_t value); + private: + int32_t _internal_frequency() const; + void _internal_set_frequency(int32_t value); + public: + + // @@protoc_insertion_point(class_scope:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiHotspotCredentials) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr ssid_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr password_; + static const ::PROTOBUF_NAMESPACE_ID::internal::LazyString _i_give_permission_to_break_this_code_default_gateway_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr gateway_; + int32_t port_; + int32_t frequency_; + friend struct ::TableStruct_connections_2fimplementation_2fproto_2foffline_5fwire_5fformats_2eproto; +}; +// ------------------------------------------------------------------- + +class BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiLanSocket) */ { + public: + inline BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket() : BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket(nullptr) {} + ~BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket() override; + explicit constexpr BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket(const BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket& from); + BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket(BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket&& from) noexcept + : BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket() { + *this = ::std::move(from); + } + + inline BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket& operator=(const BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket& from) { + CopyFrom(from); + return *this; + } + inline BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket& operator=(BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket& default_instance() { + return *internal_default_instance(); + } + static inline const BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket* internal_default_instance() { + return reinterpret_cast( + &_BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket_default_instance_); + } + static constexpr int kIndexInFileMessages = + 9; + + friend void swap(BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket& a, BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket& b) { + a.Swap(&b); + } + inline void Swap(BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket* 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(BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket& from); + void MergeFrom(const BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiLanSocket"; + } + protected: + explicit BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kIpAddressFieldNumber = 1, + kWifiPortFieldNumber = 2, + }; + // optional bytes ip_address = 1; + bool has_ip_address() const; + private: + bool _internal_has_ip_address() const; + public: + void clear_ip_address(); + const std::string& ip_address() const; + template + void set_ip_address(ArgT0&& arg0, ArgT... args); + std::string* mutable_ip_address(); + PROTOBUF_NODISCARD std::string* release_ip_address(); + void set_allocated_ip_address(std::string* ip_address); + private: + const std::string& _internal_ip_address() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_ip_address(const std::string& value); + std::string* _internal_mutable_ip_address(); + public: + + // optional int32 wifi_port = 2; + bool has_wifi_port() const; + private: + bool _internal_has_wifi_port() const; + public: + void clear_wifi_port(); + int32_t wifi_port() const; + void set_wifi_port(int32_t value); + private: + int32_t _internal_wifi_port() const; + void _internal_set_wifi_port(int32_t value); + public: + + // @@protoc_insertion_point(class_scope:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiLanSocket) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr ip_address_; + int32_t wifi_port_; + friend struct ::TableStruct_connections_2fimplementation_2fproto_2foffline_5fwire_5fformats_2eproto; +}; +// ------------------------------------------------------------------- + +class BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.BluetoothCredentials) */ { + public: + inline BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials() : BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials(nullptr) {} + ~BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials() override; + explicit constexpr BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials(const BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials& from); + BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials(BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials&& from) noexcept + : BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials() { + *this = ::std::move(from); + } + + inline BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials& operator=(const BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials& from) { + CopyFrom(from); + return *this; + } + inline BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials& operator=(BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials& default_instance() { + return *internal_default_instance(); + } + static inline const BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials* internal_default_instance() { + return reinterpret_cast( + &_BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials_default_instance_); + } + static constexpr int kIndexInFileMessages = + 10; + + friend void swap(BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials& a, BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials& b) { + a.Swap(&b); + } + inline void Swap(BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials* 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(BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials& from); + void MergeFrom(const BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.BluetoothCredentials"; + } + protected: + explicit BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kServiceNameFieldNumber = 1, + kMacAddressFieldNumber = 2, + }; + // optional string service_name = 1; + bool has_service_name() const; + private: + bool _internal_has_service_name() const; + public: + void clear_service_name(); + const std::string& service_name() const; + template + void set_service_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_service_name(); + PROTOBUF_NODISCARD std::string* release_service_name(); + void set_allocated_service_name(std::string* service_name); + private: + const std::string& _internal_service_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_service_name(const std::string& value); + std::string* _internal_mutable_service_name(); + public: + + // optional string mac_address = 2; + bool has_mac_address() const; + private: + bool _internal_has_mac_address() const; + public: + void clear_mac_address(); + const std::string& mac_address() const; + template + void set_mac_address(ArgT0&& arg0, ArgT... args); + std::string* mutable_mac_address(); + PROTOBUF_NODISCARD std::string* release_mac_address(); + void set_allocated_mac_address(std::string* mac_address); + private: + const std::string& _internal_mac_address() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_mac_address(const std::string& value); + std::string* _internal_mutable_mac_address(); + public: + + // @@protoc_insertion_point(class_scope:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.BluetoothCredentials) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr service_name_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr mac_address_; + friend struct ::TableStruct_connections_2fimplementation_2fproto_2foffline_5fwire_5fformats_2eproto; +}; +// ------------------------------------------------------------------- + +class BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiAwareCredentials) */ { + public: + inline BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials() : BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials(nullptr) {} + ~BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials() override; + explicit constexpr BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials(const BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials& from); + BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials(BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials&& from) noexcept + : BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials() { + *this = ::std::move(from); + } + + inline BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials& operator=(const BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials& from) { + CopyFrom(from); + return *this; + } + inline BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials& operator=(BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials& default_instance() { + return *internal_default_instance(); + } + static inline const BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials* internal_default_instance() { + return reinterpret_cast( + &_BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials_default_instance_); + } + static constexpr int kIndexInFileMessages = + 11; + + friend void swap(BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials& a, BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials& b) { + a.Swap(&b); + } + inline void Swap(BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials* 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(BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials& from); + void MergeFrom(const BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiAwareCredentials"; + } + protected: + explicit BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kServiceIdFieldNumber = 1, + kServiceInfoFieldNumber = 2, + kPasswordFieldNumber = 3, + }; + // optional string service_id = 1; + bool has_service_id() const; + private: + bool _internal_has_service_id() const; + public: + void clear_service_id(); + const std::string& service_id() const; + template + void set_service_id(ArgT0&& arg0, ArgT... args); + std::string* mutable_service_id(); + PROTOBUF_NODISCARD std::string* release_service_id(); + void set_allocated_service_id(std::string* service_id); + private: + const std::string& _internal_service_id() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_service_id(const std::string& value); + std::string* _internal_mutable_service_id(); + public: + + // optional bytes service_info = 2; + bool has_service_info() const; + private: + bool _internal_has_service_info() const; + public: + void clear_service_info(); + const std::string& service_info() const; + template + void set_service_info(ArgT0&& arg0, ArgT... args); + std::string* mutable_service_info(); + PROTOBUF_NODISCARD std::string* release_service_info(); + void set_allocated_service_info(std::string* service_info); + private: + const std::string& _internal_service_info() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_service_info(const std::string& value); + std::string* _internal_mutable_service_info(); + public: + + // optional string password = 3; + bool has_password() const; + private: + bool _internal_has_password() const; + public: + void clear_password(); + const std::string& password() const; + template + void set_password(ArgT0&& arg0, ArgT... args); + std::string* mutable_password(); + PROTOBUF_NODISCARD std::string* release_password(); + void set_allocated_password(std::string* password); + private: + const std::string& _internal_password() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_password(const std::string& value); + std::string* _internal_mutable_password(); + public: + + // @@protoc_insertion_point(class_scope:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiAwareCredentials) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr service_id_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr service_info_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr password_; + friend struct ::TableStruct_connections_2fimplementation_2fproto_2foffline_5fwire_5fformats_2eproto; +}; +// ------------------------------------------------------------------- + +class BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiDirectCredentials) */ { + public: + inline BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials() : BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials(nullptr) {} + ~BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials() override; + explicit constexpr BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials(const BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials& from); + BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials(BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials&& from) noexcept + : BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials() { + *this = ::std::move(from); + } + + inline BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials& operator=(const BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials& from) { + CopyFrom(from); + return *this; + } + inline BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials& operator=(BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials& default_instance() { + return *internal_default_instance(); + } + static inline const BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials* internal_default_instance() { + return reinterpret_cast( + &_BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials_default_instance_); + } + static constexpr int kIndexInFileMessages = + 12; + + friend void swap(BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials& a, BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials& b) { + a.Swap(&b); + } + inline void Swap(BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials* 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(BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials& from); + void MergeFrom(const BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiDirectCredentials"; + } + protected: + explicit BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kSsidFieldNumber = 1, + kPasswordFieldNumber = 2, + kPortFieldNumber = 3, + kFrequencyFieldNumber = 4, + }; + // optional string ssid = 1; + bool has_ssid() const; + private: + bool _internal_has_ssid() const; + public: + void clear_ssid(); + const std::string& ssid() const; + template + void set_ssid(ArgT0&& arg0, ArgT... args); + std::string* mutable_ssid(); + PROTOBUF_NODISCARD std::string* release_ssid(); + void set_allocated_ssid(std::string* ssid); + private: + const std::string& _internal_ssid() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_ssid(const std::string& value); + std::string* _internal_mutable_ssid(); + public: + + // optional string password = 2; + bool has_password() const; + private: + bool _internal_has_password() const; + public: + void clear_password(); + const std::string& password() const; + template + void set_password(ArgT0&& arg0, ArgT... args); + std::string* mutable_password(); + PROTOBUF_NODISCARD std::string* release_password(); + void set_allocated_password(std::string* password); + private: + const std::string& _internal_password() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_password(const std::string& value); + std::string* _internal_mutable_password(); + public: + + // optional int32 port = 3; + bool has_port() const; + private: + bool _internal_has_port() const; + public: + void clear_port(); + int32_t port() const; + void set_port(int32_t value); + private: + int32_t _internal_port() const; + void _internal_set_port(int32_t value); + public: + + // optional int32 frequency = 4; + bool has_frequency() const; + private: + bool _internal_has_frequency() const; + public: + void clear_frequency(); + int32_t frequency() const; + void set_frequency(int32_t value); + private: + int32_t _internal_frequency() const; + void _internal_set_frequency(int32_t value); + public: + + // @@protoc_insertion_point(class_scope:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiDirectCredentials) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr ssid_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr password_; + int32_t port_; + int32_t frequency_; + friend struct ::TableStruct_connections_2fimplementation_2fproto_2foffline_5fwire_5fformats_2eproto; +}; +// ------------------------------------------------------------------- + +class BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WebRtcCredentials) */ { + public: + inline BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials() : BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials(nullptr) {} + ~BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials() override; + explicit constexpr BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials(const BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials& from); + BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials(BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials&& from) noexcept + : BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials() { + *this = ::std::move(from); + } + + inline BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials& operator=(const BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials& from) { + CopyFrom(from); + return *this; + } + inline BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials& operator=(BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials& default_instance() { + return *internal_default_instance(); + } + static inline const BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials* internal_default_instance() { + return reinterpret_cast( + &_BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials_default_instance_); + } + static constexpr int kIndexInFileMessages = + 13; + + friend void swap(BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials& a, BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials& b) { + a.Swap(&b); + } + inline void Swap(BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials* 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(BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials& from); + void MergeFrom(const BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WebRtcCredentials"; + } + protected: + explicit BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kPeerIdFieldNumber = 1, + kLocationHintFieldNumber = 2, + }; + // optional string peer_id = 1; + bool has_peer_id() const; + private: + bool _internal_has_peer_id() const; + public: + void clear_peer_id(); + const std::string& peer_id() const; + template + void set_peer_id(ArgT0&& arg0, ArgT... args); + std::string* mutable_peer_id(); + PROTOBUF_NODISCARD std::string* release_peer_id(); + void set_allocated_peer_id(std::string* peer_id); + private: + const std::string& _internal_peer_id() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_peer_id(const std::string& value); + std::string* _internal_mutable_peer_id(); + public: + + // optional .location.nearby.connections.LocationHint location_hint = 2; + bool has_location_hint() const; + private: + bool _internal_has_location_hint() const; + public: + void clear_location_hint(); + const ::location::nearby::connections::LocationHint& location_hint() const; + PROTOBUF_NODISCARD ::location::nearby::connections::LocationHint* release_location_hint(); + ::location::nearby::connections::LocationHint* mutable_location_hint(); + void set_allocated_location_hint(::location::nearby::connections::LocationHint* location_hint); + private: + const ::location::nearby::connections::LocationHint& _internal_location_hint() const; + ::location::nearby::connections::LocationHint* _internal_mutable_location_hint(); + public: + void unsafe_arena_set_allocated_location_hint( + ::location::nearby::connections::LocationHint* location_hint); + ::location::nearby::connections::LocationHint* unsafe_arena_release_location_hint(); + + // @@protoc_insertion_point(class_scope:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WebRtcCredentials) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr peer_id_; + ::location::nearby::connections::LocationHint* location_hint_; + friend struct ::TableStruct_connections_2fimplementation_2fproto_2foffline_5fwire_5fformats_2eproto; +}; +// ------------------------------------------------------------------- + +class BandwidthUpgradeNegotiationFrame_UpgradePathInfo final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo) */ { + public: + inline BandwidthUpgradeNegotiationFrame_UpgradePathInfo() : BandwidthUpgradeNegotiationFrame_UpgradePathInfo(nullptr) {} + ~BandwidthUpgradeNegotiationFrame_UpgradePathInfo() override; + explicit constexpr BandwidthUpgradeNegotiationFrame_UpgradePathInfo(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + BandwidthUpgradeNegotiationFrame_UpgradePathInfo(const BandwidthUpgradeNegotiationFrame_UpgradePathInfo& from); + BandwidthUpgradeNegotiationFrame_UpgradePathInfo(BandwidthUpgradeNegotiationFrame_UpgradePathInfo&& from) noexcept + : BandwidthUpgradeNegotiationFrame_UpgradePathInfo() { + *this = ::std::move(from); + } + + inline BandwidthUpgradeNegotiationFrame_UpgradePathInfo& operator=(const BandwidthUpgradeNegotiationFrame_UpgradePathInfo& from) { + CopyFrom(from); + return *this; + } + inline BandwidthUpgradeNegotiationFrame_UpgradePathInfo& operator=(BandwidthUpgradeNegotiationFrame_UpgradePathInfo&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const BandwidthUpgradeNegotiationFrame_UpgradePathInfo& default_instance() { + return *internal_default_instance(); + } + static inline const BandwidthUpgradeNegotiationFrame_UpgradePathInfo* internal_default_instance() { + return reinterpret_cast( + &_BandwidthUpgradeNegotiationFrame_UpgradePathInfo_default_instance_); + } + static constexpr int kIndexInFileMessages = + 14; + + friend void swap(BandwidthUpgradeNegotiationFrame_UpgradePathInfo& a, BandwidthUpgradeNegotiationFrame_UpgradePathInfo& b) { + a.Swap(&b); + } + inline void Swap(BandwidthUpgradeNegotiationFrame_UpgradePathInfo* 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(BandwidthUpgradeNegotiationFrame_UpgradePathInfo* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + BandwidthUpgradeNegotiationFrame_UpgradePathInfo* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const BandwidthUpgradeNegotiationFrame_UpgradePathInfo& from); + void MergeFrom(const BandwidthUpgradeNegotiationFrame_UpgradePathInfo& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(BandwidthUpgradeNegotiationFrame_UpgradePathInfo* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo"; + } + protected: + explicit BandwidthUpgradeNegotiationFrame_UpgradePathInfo(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + typedef BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials WifiHotspotCredentials; + typedef BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket WifiLanSocket; + typedef BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials BluetoothCredentials; + typedef BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials WifiAwareCredentials; + typedef BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials WifiDirectCredentials; + typedef BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials WebRtcCredentials; + + typedef BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium Medium; + static constexpr Medium UNKNOWN_MEDIUM = + BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium_UNKNOWN_MEDIUM; + PROTOBUF_DEPRECATED_ENUM static constexpr Medium MDNS = + BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium_MDNS; + static constexpr Medium BLUETOOTH = + BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium_BLUETOOTH; + static constexpr Medium WIFI_HOTSPOT = + BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium_WIFI_HOTSPOT; + static constexpr Medium BLE = + BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium_BLE; + static constexpr Medium WIFI_LAN = + BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium_WIFI_LAN; + static constexpr Medium WIFI_AWARE = + BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium_WIFI_AWARE; + static constexpr Medium NFC = + BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium_NFC; + static constexpr Medium WIFI_DIRECT = + BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium_WIFI_DIRECT; + static constexpr Medium WEB_RTC = + BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium_WEB_RTC; + static inline bool Medium_IsValid(int value) { + return BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium_IsValid(value); + } + static constexpr Medium Medium_MIN = + BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium_Medium_MIN; + static constexpr Medium Medium_MAX = + BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium_Medium_MAX; + static constexpr int Medium_ARRAYSIZE = + BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium_Medium_ARRAYSIZE; + template + static inline const std::string& Medium_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function Medium_Name."); + return BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium_Name(enum_t_value); + } + static inline bool Medium_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name, + Medium* value) { + return BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium_Parse(name, value); + } + + // accessors ------------------------------------------------------- + + enum : int { + kWifiHotspotCredentialsFieldNumber = 2, + kWifiLanSocketFieldNumber = 3, + kBluetoothCredentialsFieldNumber = 4, + kWifiAwareCredentialsFieldNumber = 5, + kWifiDirectCredentialsFieldNumber = 6, + kWebRtcCredentialsFieldNumber = 8, + kMediumFieldNumber = 1, + kSupportsDisablingEncryptionFieldNumber = 7, + kSupportsClientIntroductionAckFieldNumber = 9, + }; + // optional .location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiHotspotCredentials wifi_hotspot_credentials = 2; + bool has_wifi_hotspot_credentials() const; + private: + bool _internal_has_wifi_hotspot_credentials() const; + public: + void clear_wifi_hotspot_credentials(); + const ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials& wifi_hotspot_credentials() const; + PROTOBUF_NODISCARD ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials* release_wifi_hotspot_credentials(); + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials* mutable_wifi_hotspot_credentials(); + void set_allocated_wifi_hotspot_credentials(::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials* wifi_hotspot_credentials); + private: + const ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials& _internal_wifi_hotspot_credentials() const; + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials* _internal_mutable_wifi_hotspot_credentials(); + public: + void unsafe_arena_set_allocated_wifi_hotspot_credentials( + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials* wifi_hotspot_credentials); + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials* unsafe_arena_release_wifi_hotspot_credentials(); + + // optional .location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiLanSocket wifi_lan_socket = 3; + bool has_wifi_lan_socket() const; + private: + bool _internal_has_wifi_lan_socket() const; + public: + void clear_wifi_lan_socket(); + const ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket& wifi_lan_socket() const; + PROTOBUF_NODISCARD ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket* release_wifi_lan_socket(); + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket* mutable_wifi_lan_socket(); + void set_allocated_wifi_lan_socket(::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket* wifi_lan_socket); + private: + const ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket& _internal_wifi_lan_socket() const; + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket* _internal_mutable_wifi_lan_socket(); + public: + void unsafe_arena_set_allocated_wifi_lan_socket( + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket* wifi_lan_socket); + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket* unsafe_arena_release_wifi_lan_socket(); + + // optional .location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.BluetoothCredentials bluetooth_credentials = 4; + bool has_bluetooth_credentials() const; + private: + bool _internal_has_bluetooth_credentials() const; + public: + void clear_bluetooth_credentials(); + const ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials& bluetooth_credentials() const; + PROTOBUF_NODISCARD ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials* release_bluetooth_credentials(); + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials* mutable_bluetooth_credentials(); + void set_allocated_bluetooth_credentials(::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials* bluetooth_credentials); + private: + const ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials& _internal_bluetooth_credentials() const; + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials* _internal_mutable_bluetooth_credentials(); + public: + void unsafe_arena_set_allocated_bluetooth_credentials( + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials* bluetooth_credentials); + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials* unsafe_arena_release_bluetooth_credentials(); + + // optional .location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiAwareCredentials wifi_aware_credentials = 5; + bool has_wifi_aware_credentials() const; + private: + bool _internal_has_wifi_aware_credentials() const; + public: + void clear_wifi_aware_credentials(); + const ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials& wifi_aware_credentials() const; + PROTOBUF_NODISCARD ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials* release_wifi_aware_credentials(); + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials* mutable_wifi_aware_credentials(); + void set_allocated_wifi_aware_credentials(::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials* wifi_aware_credentials); + private: + const ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials& _internal_wifi_aware_credentials() const; + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials* _internal_mutable_wifi_aware_credentials(); + public: + void unsafe_arena_set_allocated_wifi_aware_credentials( + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials* wifi_aware_credentials); + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials* unsafe_arena_release_wifi_aware_credentials(); + + // optional .location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiDirectCredentials wifi_direct_credentials = 6; + bool has_wifi_direct_credentials() const; + private: + bool _internal_has_wifi_direct_credentials() const; + public: + void clear_wifi_direct_credentials(); + const ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials& wifi_direct_credentials() const; + PROTOBUF_NODISCARD ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials* release_wifi_direct_credentials(); + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials* mutable_wifi_direct_credentials(); + void set_allocated_wifi_direct_credentials(::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials* wifi_direct_credentials); + private: + const ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials& _internal_wifi_direct_credentials() const; + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials* _internal_mutable_wifi_direct_credentials(); + public: + void unsafe_arena_set_allocated_wifi_direct_credentials( + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials* wifi_direct_credentials); + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials* unsafe_arena_release_wifi_direct_credentials(); + + // optional .location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WebRtcCredentials web_rtc_credentials = 8; + bool has_web_rtc_credentials() const; + private: + bool _internal_has_web_rtc_credentials() const; + public: + void clear_web_rtc_credentials(); + const ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials& web_rtc_credentials() const; + PROTOBUF_NODISCARD ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials* release_web_rtc_credentials(); + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials* mutable_web_rtc_credentials(); + void set_allocated_web_rtc_credentials(::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials* web_rtc_credentials); + private: + const ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials& _internal_web_rtc_credentials() const; + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials* _internal_mutable_web_rtc_credentials(); + public: + void unsafe_arena_set_allocated_web_rtc_credentials( + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials* web_rtc_credentials); + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials* unsafe_arena_release_web_rtc_credentials(); + + // optional .location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.Medium medium = 1; + bool has_medium() const; + private: + bool _internal_has_medium() const; + public: + void clear_medium(); + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium medium() const; + void set_medium(::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium value); + private: + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium _internal_medium() const; + void _internal_set_medium(::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium value); + public: + + // optional bool supports_disabling_encryption = 7; + bool has_supports_disabling_encryption() const; + private: + bool _internal_has_supports_disabling_encryption() const; + public: + void clear_supports_disabling_encryption(); + bool supports_disabling_encryption() const; + void set_supports_disabling_encryption(bool value); + private: + bool _internal_supports_disabling_encryption() const; + void _internal_set_supports_disabling_encryption(bool value); + public: + + // optional bool supports_client_introduction_ack = 9; + bool has_supports_client_introduction_ack() const; + private: + bool _internal_has_supports_client_introduction_ack() const; + public: + void clear_supports_client_introduction_ack(); + bool supports_client_introduction_ack() const; + void set_supports_client_introduction_ack(bool value); + private: + bool _internal_supports_client_introduction_ack() const; + void _internal_set_supports_client_introduction_ack(bool value); + public: + + // @@protoc_insertion_point(class_scope:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials* wifi_hotspot_credentials_; + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket* wifi_lan_socket_; + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials* bluetooth_credentials_; + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials* wifi_aware_credentials_; + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials* wifi_direct_credentials_; + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials* web_rtc_credentials_; + int medium_; + bool supports_disabling_encryption_; + bool supports_client_introduction_ack_; + friend struct ::TableStruct_connections_2fimplementation_2fproto_2foffline_5fwire_5fformats_2eproto; +}; +// ------------------------------------------------------------------- + +class BandwidthUpgradeNegotiationFrame_ClientIntroduction final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:location.nearby.connections.BandwidthUpgradeNegotiationFrame.ClientIntroduction) */ { + public: + inline BandwidthUpgradeNegotiationFrame_ClientIntroduction() : BandwidthUpgradeNegotiationFrame_ClientIntroduction(nullptr) {} + ~BandwidthUpgradeNegotiationFrame_ClientIntroduction() override; + explicit constexpr BandwidthUpgradeNegotiationFrame_ClientIntroduction(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + BandwidthUpgradeNegotiationFrame_ClientIntroduction(const BandwidthUpgradeNegotiationFrame_ClientIntroduction& from); + BandwidthUpgradeNegotiationFrame_ClientIntroduction(BandwidthUpgradeNegotiationFrame_ClientIntroduction&& from) noexcept + : BandwidthUpgradeNegotiationFrame_ClientIntroduction() { + *this = ::std::move(from); + } + + inline BandwidthUpgradeNegotiationFrame_ClientIntroduction& operator=(const BandwidthUpgradeNegotiationFrame_ClientIntroduction& from) { + CopyFrom(from); + return *this; + } + inline BandwidthUpgradeNegotiationFrame_ClientIntroduction& operator=(BandwidthUpgradeNegotiationFrame_ClientIntroduction&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const BandwidthUpgradeNegotiationFrame_ClientIntroduction& default_instance() { + return *internal_default_instance(); + } + static inline const BandwidthUpgradeNegotiationFrame_ClientIntroduction* internal_default_instance() { + return reinterpret_cast( + &_BandwidthUpgradeNegotiationFrame_ClientIntroduction_default_instance_); + } + static constexpr int kIndexInFileMessages = + 15; + + friend void swap(BandwidthUpgradeNegotiationFrame_ClientIntroduction& a, BandwidthUpgradeNegotiationFrame_ClientIntroduction& b) { + a.Swap(&b); + } + inline void Swap(BandwidthUpgradeNegotiationFrame_ClientIntroduction* 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(BandwidthUpgradeNegotiationFrame_ClientIntroduction* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + BandwidthUpgradeNegotiationFrame_ClientIntroduction* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const BandwidthUpgradeNegotiationFrame_ClientIntroduction& from); + void MergeFrom(const BandwidthUpgradeNegotiationFrame_ClientIntroduction& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(BandwidthUpgradeNegotiationFrame_ClientIntroduction* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "location.nearby.connections.BandwidthUpgradeNegotiationFrame.ClientIntroduction"; + } + protected: + explicit BandwidthUpgradeNegotiationFrame_ClientIntroduction(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kEndpointIdFieldNumber = 1, + kSupportsDisablingEncryptionFieldNumber = 2, + }; + // optional string endpoint_id = 1; + bool has_endpoint_id() const; + private: + bool _internal_has_endpoint_id() const; + public: + void clear_endpoint_id(); + const std::string& endpoint_id() const; + template + void set_endpoint_id(ArgT0&& arg0, ArgT... args); + std::string* mutable_endpoint_id(); + PROTOBUF_NODISCARD std::string* release_endpoint_id(); + void set_allocated_endpoint_id(std::string* endpoint_id); + private: + const std::string& _internal_endpoint_id() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_endpoint_id(const std::string& value); + std::string* _internal_mutable_endpoint_id(); + public: + + // optional bool supports_disabling_encryption = 2; + bool has_supports_disabling_encryption() const; + private: + bool _internal_has_supports_disabling_encryption() const; + public: + void clear_supports_disabling_encryption(); + bool supports_disabling_encryption() const; + void set_supports_disabling_encryption(bool value); + private: + bool _internal_supports_disabling_encryption() const; + void _internal_set_supports_disabling_encryption(bool value); + public: + + // @@protoc_insertion_point(class_scope:location.nearby.connections.BandwidthUpgradeNegotiationFrame.ClientIntroduction) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr endpoint_id_; + bool supports_disabling_encryption_; + friend struct ::TableStruct_connections_2fimplementation_2fproto_2foffline_5fwire_5fformats_2eproto; +}; +// ------------------------------------------------------------------- + +class BandwidthUpgradeNegotiationFrame_ClientIntroductionAck final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:location.nearby.connections.BandwidthUpgradeNegotiationFrame.ClientIntroductionAck) */ { + public: + inline BandwidthUpgradeNegotiationFrame_ClientIntroductionAck() : BandwidthUpgradeNegotiationFrame_ClientIntroductionAck(nullptr) {} + ~BandwidthUpgradeNegotiationFrame_ClientIntroductionAck() override; + explicit constexpr BandwidthUpgradeNegotiationFrame_ClientIntroductionAck(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + BandwidthUpgradeNegotiationFrame_ClientIntroductionAck(const BandwidthUpgradeNegotiationFrame_ClientIntroductionAck& from); + BandwidthUpgradeNegotiationFrame_ClientIntroductionAck(BandwidthUpgradeNegotiationFrame_ClientIntroductionAck&& from) noexcept + : BandwidthUpgradeNegotiationFrame_ClientIntroductionAck() { + *this = ::std::move(from); + } + + inline BandwidthUpgradeNegotiationFrame_ClientIntroductionAck& operator=(const BandwidthUpgradeNegotiationFrame_ClientIntroductionAck& from) { + CopyFrom(from); + return *this; + } + inline BandwidthUpgradeNegotiationFrame_ClientIntroductionAck& operator=(BandwidthUpgradeNegotiationFrame_ClientIntroductionAck&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const BandwidthUpgradeNegotiationFrame_ClientIntroductionAck& default_instance() { + return *internal_default_instance(); + } + static inline const BandwidthUpgradeNegotiationFrame_ClientIntroductionAck* internal_default_instance() { + return reinterpret_cast( + &_BandwidthUpgradeNegotiationFrame_ClientIntroductionAck_default_instance_); + } + static constexpr int kIndexInFileMessages = + 16; + + friend void swap(BandwidthUpgradeNegotiationFrame_ClientIntroductionAck& a, BandwidthUpgradeNegotiationFrame_ClientIntroductionAck& b) { + a.Swap(&b); + } + inline void Swap(BandwidthUpgradeNegotiationFrame_ClientIntroductionAck* 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(BandwidthUpgradeNegotiationFrame_ClientIntroductionAck* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + BandwidthUpgradeNegotiationFrame_ClientIntroductionAck* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const BandwidthUpgradeNegotiationFrame_ClientIntroductionAck& from); + void MergeFrom(const BandwidthUpgradeNegotiationFrame_ClientIntroductionAck& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(BandwidthUpgradeNegotiationFrame_ClientIntroductionAck* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "location.nearby.connections.BandwidthUpgradeNegotiationFrame.ClientIntroductionAck"; + } + protected: + explicit BandwidthUpgradeNegotiationFrame_ClientIntroductionAck(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // @@protoc_insertion_point(class_scope:location.nearby.connections.BandwidthUpgradeNegotiationFrame.ClientIntroductionAck) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_connections_2fimplementation_2fproto_2foffline_5fwire_5fformats_2eproto; +}; +// ------------------------------------------------------------------- + +class BandwidthUpgradeNegotiationFrame final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:location.nearby.connections.BandwidthUpgradeNegotiationFrame) */ { + public: + inline BandwidthUpgradeNegotiationFrame() : BandwidthUpgradeNegotiationFrame(nullptr) {} + ~BandwidthUpgradeNegotiationFrame() override; + explicit constexpr BandwidthUpgradeNegotiationFrame(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + BandwidthUpgradeNegotiationFrame(const BandwidthUpgradeNegotiationFrame& from); + BandwidthUpgradeNegotiationFrame(BandwidthUpgradeNegotiationFrame&& from) noexcept + : BandwidthUpgradeNegotiationFrame() { + *this = ::std::move(from); + } + + inline BandwidthUpgradeNegotiationFrame& operator=(const BandwidthUpgradeNegotiationFrame& from) { + CopyFrom(from); + return *this; + } + inline BandwidthUpgradeNegotiationFrame& operator=(BandwidthUpgradeNegotiationFrame&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const BandwidthUpgradeNegotiationFrame& default_instance() { + return *internal_default_instance(); + } + static inline const BandwidthUpgradeNegotiationFrame* internal_default_instance() { + return reinterpret_cast( + &_BandwidthUpgradeNegotiationFrame_default_instance_); + } + static constexpr int kIndexInFileMessages = + 17; + + friend void swap(BandwidthUpgradeNegotiationFrame& a, BandwidthUpgradeNegotiationFrame& b) { + a.Swap(&b); + } + inline void Swap(BandwidthUpgradeNegotiationFrame* 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(BandwidthUpgradeNegotiationFrame* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + BandwidthUpgradeNegotiationFrame* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const BandwidthUpgradeNegotiationFrame& from); + void MergeFrom(const BandwidthUpgradeNegotiationFrame& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(BandwidthUpgradeNegotiationFrame* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "location.nearby.connections.BandwidthUpgradeNegotiationFrame"; + } + protected: + explicit BandwidthUpgradeNegotiationFrame(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + typedef BandwidthUpgradeNegotiationFrame_UpgradePathInfo UpgradePathInfo; + typedef BandwidthUpgradeNegotiationFrame_ClientIntroduction ClientIntroduction; + typedef BandwidthUpgradeNegotiationFrame_ClientIntroductionAck ClientIntroductionAck; + + typedef BandwidthUpgradeNegotiationFrame_EventType EventType; + static constexpr EventType UNKNOWN_EVENT_TYPE = + BandwidthUpgradeNegotiationFrame_EventType_UNKNOWN_EVENT_TYPE; + static constexpr EventType UPGRADE_PATH_AVAILABLE = + BandwidthUpgradeNegotiationFrame_EventType_UPGRADE_PATH_AVAILABLE; + static constexpr EventType LAST_WRITE_TO_PRIOR_CHANNEL = + BandwidthUpgradeNegotiationFrame_EventType_LAST_WRITE_TO_PRIOR_CHANNEL; + static constexpr EventType SAFE_TO_CLOSE_PRIOR_CHANNEL = + BandwidthUpgradeNegotiationFrame_EventType_SAFE_TO_CLOSE_PRIOR_CHANNEL; + static constexpr EventType CLIENT_INTRODUCTION = + BandwidthUpgradeNegotiationFrame_EventType_CLIENT_INTRODUCTION; + static constexpr EventType UPGRADE_FAILURE = + BandwidthUpgradeNegotiationFrame_EventType_UPGRADE_FAILURE; + static constexpr EventType CLIENT_INTRODUCTION_ACK = + BandwidthUpgradeNegotiationFrame_EventType_CLIENT_INTRODUCTION_ACK; + static inline bool EventType_IsValid(int value) { + return BandwidthUpgradeNegotiationFrame_EventType_IsValid(value); + } + static constexpr EventType EventType_MIN = + BandwidthUpgradeNegotiationFrame_EventType_EventType_MIN; + static constexpr EventType EventType_MAX = + BandwidthUpgradeNegotiationFrame_EventType_EventType_MAX; + static constexpr int EventType_ARRAYSIZE = + BandwidthUpgradeNegotiationFrame_EventType_EventType_ARRAYSIZE; + template + static inline const std::string& EventType_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function EventType_Name."); + return BandwidthUpgradeNegotiationFrame_EventType_Name(enum_t_value); + } + static inline bool EventType_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name, + EventType* value) { + return BandwidthUpgradeNegotiationFrame_EventType_Parse(name, value); + } + + // accessors ------------------------------------------------------- + + enum : int { + kUpgradePathInfoFieldNumber = 2, + kClientIntroductionFieldNumber = 3, + kClientIntroductionAckFieldNumber = 4, + kEventTypeFieldNumber = 1, + }; + // optional .location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo upgrade_path_info = 2; + bool has_upgrade_path_info() const; + private: + bool _internal_has_upgrade_path_info() const; + public: + void clear_upgrade_path_info(); + const ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo& upgrade_path_info() const; + PROTOBUF_NODISCARD ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo* release_upgrade_path_info(); + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo* mutable_upgrade_path_info(); + void set_allocated_upgrade_path_info(::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo* upgrade_path_info); + private: + const ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo& _internal_upgrade_path_info() const; + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo* _internal_mutable_upgrade_path_info(); + public: + void unsafe_arena_set_allocated_upgrade_path_info( + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo* upgrade_path_info); + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo* unsafe_arena_release_upgrade_path_info(); + + // optional .location.nearby.connections.BandwidthUpgradeNegotiationFrame.ClientIntroduction client_introduction = 3; + bool has_client_introduction() const; + private: + bool _internal_has_client_introduction() const; + public: + void clear_client_introduction(); + const ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_ClientIntroduction& client_introduction() const; + PROTOBUF_NODISCARD ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_ClientIntroduction* release_client_introduction(); + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_ClientIntroduction* mutable_client_introduction(); + void set_allocated_client_introduction(::location::nearby::connections::BandwidthUpgradeNegotiationFrame_ClientIntroduction* client_introduction); + private: + const ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_ClientIntroduction& _internal_client_introduction() const; + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_ClientIntroduction* _internal_mutable_client_introduction(); + public: + void unsafe_arena_set_allocated_client_introduction( + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_ClientIntroduction* client_introduction); + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_ClientIntroduction* unsafe_arena_release_client_introduction(); + + // optional .location.nearby.connections.BandwidthUpgradeNegotiationFrame.ClientIntroductionAck client_introduction_ack = 4; + bool has_client_introduction_ack() const; + private: + bool _internal_has_client_introduction_ack() const; + public: + void clear_client_introduction_ack(); + const ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_ClientIntroductionAck& client_introduction_ack() const; + PROTOBUF_NODISCARD ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_ClientIntroductionAck* release_client_introduction_ack(); + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_ClientIntroductionAck* mutable_client_introduction_ack(); + void set_allocated_client_introduction_ack(::location::nearby::connections::BandwidthUpgradeNegotiationFrame_ClientIntroductionAck* client_introduction_ack); + private: + const ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_ClientIntroductionAck& _internal_client_introduction_ack() const; + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_ClientIntroductionAck* _internal_mutable_client_introduction_ack(); + public: + void unsafe_arena_set_allocated_client_introduction_ack( + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_ClientIntroductionAck* client_introduction_ack); + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_ClientIntroductionAck* unsafe_arena_release_client_introduction_ack(); + + // optional .location.nearby.connections.BandwidthUpgradeNegotiationFrame.EventType event_type = 1; + bool has_event_type() const; + private: + bool _internal_has_event_type() const; + public: + void clear_event_type(); + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_EventType event_type() const; + void set_event_type(::location::nearby::connections::BandwidthUpgradeNegotiationFrame_EventType value); + private: + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_EventType _internal_event_type() const; + void _internal_set_event_type(::location::nearby::connections::BandwidthUpgradeNegotiationFrame_EventType value); + public: + + // @@protoc_insertion_point(class_scope:location.nearby.connections.BandwidthUpgradeNegotiationFrame) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo* upgrade_path_info_; + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_ClientIntroduction* client_introduction_; + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_ClientIntroductionAck* client_introduction_ack_; + int event_type_; + friend struct ::TableStruct_connections_2fimplementation_2fproto_2foffline_5fwire_5fformats_2eproto; +}; +// ------------------------------------------------------------------- + +class KeepAliveFrame final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:location.nearby.connections.KeepAliveFrame) */ { + public: + inline KeepAliveFrame() : KeepAliveFrame(nullptr) {} + ~KeepAliveFrame() override; + explicit constexpr KeepAliveFrame(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + KeepAliveFrame(const KeepAliveFrame& from); + KeepAliveFrame(KeepAliveFrame&& from) noexcept + : KeepAliveFrame() { + *this = ::std::move(from); + } + + inline KeepAliveFrame& operator=(const KeepAliveFrame& from) { + CopyFrom(from); + return *this; + } + inline KeepAliveFrame& operator=(KeepAliveFrame&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const KeepAliveFrame& default_instance() { + return *internal_default_instance(); + } + static inline const KeepAliveFrame* internal_default_instance() { + return reinterpret_cast( + &_KeepAliveFrame_default_instance_); + } + static constexpr int kIndexInFileMessages = + 18; + + friend void swap(KeepAliveFrame& a, KeepAliveFrame& b) { + a.Swap(&b); + } + inline void Swap(KeepAliveFrame* 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(KeepAliveFrame* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + KeepAliveFrame* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const KeepAliveFrame& from); + void MergeFrom(const KeepAliveFrame& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(KeepAliveFrame* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "location.nearby.connections.KeepAliveFrame"; + } + protected: + explicit KeepAliveFrame(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kAckFieldNumber = 1, + }; + // optional bool ack = 1; + bool has_ack() const; + private: + bool _internal_has_ack() const; + public: + void clear_ack(); + bool ack() const; + void set_ack(bool value); + private: + bool _internal_ack() const; + void _internal_set_ack(bool value); + public: + + // @@protoc_insertion_point(class_scope:location.nearby.connections.KeepAliveFrame) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + bool ack_; + friend struct ::TableStruct_connections_2fimplementation_2fproto_2foffline_5fwire_5fformats_2eproto; +}; +// ------------------------------------------------------------------- + +class DisconnectionFrame final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:location.nearby.connections.DisconnectionFrame) */ { + public: + inline DisconnectionFrame() : DisconnectionFrame(nullptr) {} + ~DisconnectionFrame() override; + explicit constexpr DisconnectionFrame(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + DisconnectionFrame(const DisconnectionFrame& from); + DisconnectionFrame(DisconnectionFrame&& from) noexcept + : DisconnectionFrame() { + *this = ::std::move(from); + } + + inline DisconnectionFrame& operator=(const DisconnectionFrame& from) { + CopyFrom(from); + return *this; + } + inline DisconnectionFrame& operator=(DisconnectionFrame&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const DisconnectionFrame& default_instance() { + return *internal_default_instance(); + } + static inline const DisconnectionFrame* internal_default_instance() { + return reinterpret_cast( + &_DisconnectionFrame_default_instance_); + } + static constexpr int kIndexInFileMessages = + 19; + + friend void swap(DisconnectionFrame& a, DisconnectionFrame& b) { + a.Swap(&b); + } + inline void Swap(DisconnectionFrame* 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(DisconnectionFrame* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + DisconnectionFrame* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const DisconnectionFrame& from); + void MergeFrom(const DisconnectionFrame& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(DisconnectionFrame* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "location.nearby.connections.DisconnectionFrame"; + } + protected: + explicit DisconnectionFrame(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // @@protoc_insertion_point(class_scope:location.nearby.connections.DisconnectionFrame) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_connections_2fimplementation_2fproto_2foffline_5fwire_5fformats_2eproto; +}; +// ------------------------------------------------------------------- + +class PairedKeyEncryptionFrame final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:location.nearby.connections.PairedKeyEncryptionFrame) */ { + public: + inline PairedKeyEncryptionFrame() : PairedKeyEncryptionFrame(nullptr) {} + ~PairedKeyEncryptionFrame() override; + explicit constexpr PairedKeyEncryptionFrame(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + PairedKeyEncryptionFrame(const PairedKeyEncryptionFrame& from); + PairedKeyEncryptionFrame(PairedKeyEncryptionFrame&& from) noexcept + : PairedKeyEncryptionFrame() { + *this = ::std::move(from); + } + + inline PairedKeyEncryptionFrame& operator=(const PairedKeyEncryptionFrame& from) { + CopyFrom(from); + return *this; + } + inline PairedKeyEncryptionFrame& operator=(PairedKeyEncryptionFrame&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const PairedKeyEncryptionFrame& default_instance() { + return *internal_default_instance(); + } + static inline const PairedKeyEncryptionFrame* internal_default_instance() { + return reinterpret_cast( + &_PairedKeyEncryptionFrame_default_instance_); + } + static constexpr int kIndexInFileMessages = + 20; + + friend void swap(PairedKeyEncryptionFrame& a, PairedKeyEncryptionFrame& b) { + a.Swap(&b); + } + inline void Swap(PairedKeyEncryptionFrame* 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(PairedKeyEncryptionFrame* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + PairedKeyEncryptionFrame* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const PairedKeyEncryptionFrame& from); + void MergeFrom(const PairedKeyEncryptionFrame& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(PairedKeyEncryptionFrame* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "location.nearby.connections.PairedKeyEncryptionFrame"; + } + protected: + explicit PairedKeyEncryptionFrame(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kSignedDataFieldNumber = 1, + }; + // optional bytes signed_data = 1; + bool has_signed_data() const; + private: + bool _internal_has_signed_data() const; + public: + void clear_signed_data(); + const std::string& signed_data() const; + template + void set_signed_data(ArgT0&& arg0, ArgT... args); + std::string* mutable_signed_data(); + PROTOBUF_NODISCARD std::string* release_signed_data(); + void set_allocated_signed_data(std::string* signed_data); + private: + const std::string& _internal_signed_data() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_signed_data(const std::string& value); + std::string* _internal_mutable_signed_data(); + public: + + // @@protoc_insertion_point(class_scope:location.nearby.connections.PairedKeyEncryptionFrame) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr signed_data_; + friend struct ::TableStruct_connections_2fimplementation_2fproto_2foffline_5fwire_5fformats_2eproto; +}; +// ------------------------------------------------------------------- + +class MediumMetadata final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:location.nearby.connections.MediumMetadata) */ { + public: + inline MediumMetadata() : MediumMetadata(nullptr) {} + ~MediumMetadata() override; + explicit constexpr MediumMetadata(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + MediumMetadata(const MediumMetadata& from); + MediumMetadata(MediumMetadata&& from) noexcept + : MediumMetadata() { + *this = ::std::move(from); + } + + inline MediumMetadata& operator=(const MediumMetadata& from) { + CopyFrom(from); + return *this; + } + inline MediumMetadata& operator=(MediumMetadata&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const MediumMetadata& default_instance() { + return *internal_default_instance(); + } + static inline const MediumMetadata* internal_default_instance() { + return reinterpret_cast( + &_MediumMetadata_default_instance_); + } + static constexpr int kIndexInFileMessages = + 21; + + friend void swap(MediumMetadata& a, MediumMetadata& b) { + a.Swap(&b); + } + inline void Swap(MediumMetadata* 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(MediumMetadata* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + MediumMetadata* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const MediumMetadata& from); + void MergeFrom(const MediumMetadata& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(MediumMetadata* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "location.nearby.connections.MediumMetadata"; + } + protected: + explicit MediumMetadata(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kBssidFieldNumber = 2, + kIpAddressFieldNumber = 3, + kAvailableChannelsFieldNumber = 7, + kWifiDirectCliUsableChannelsFieldNumber = 8, + kWifiLanUsableChannelsFieldNumber = 9, + kWifiAwareUsableChannelsFieldNumber = 10, + kWifiHotspotStaUsableChannelsFieldNumber = 11, + kSupports5GhzFieldNumber = 1, + kSupports6GhzFieldNumber = 4, + kMobileRadioFieldNumber = 5, + kApFrequencyFieldNumber = 6, + }; + // optional string bssid = 2; + bool has_bssid() const; + private: + bool _internal_has_bssid() const; + public: + void clear_bssid(); + const std::string& bssid() const; + template + void set_bssid(ArgT0&& arg0, ArgT... args); + std::string* mutable_bssid(); + PROTOBUF_NODISCARD std::string* release_bssid(); + void set_allocated_bssid(std::string* bssid); + private: + const std::string& _internal_bssid() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_bssid(const std::string& value); + std::string* _internal_mutable_bssid(); + public: + + // optional bytes ip_address = 3; + bool has_ip_address() const; + private: + bool _internal_has_ip_address() const; + public: + void clear_ip_address(); + const std::string& ip_address() const; + template + void set_ip_address(ArgT0&& arg0, ArgT... args); + std::string* mutable_ip_address(); + PROTOBUF_NODISCARD std::string* release_ip_address(); + void set_allocated_ip_address(std::string* ip_address); + private: + const std::string& _internal_ip_address() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_ip_address(const std::string& value); + std::string* _internal_mutable_ip_address(); + public: + + // optional .location.nearby.connections.AvailableChannels available_channels = 7; + bool has_available_channels() const; + private: + bool _internal_has_available_channels() const; + public: + void clear_available_channels(); + const ::location::nearby::connections::AvailableChannels& available_channels() const; + PROTOBUF_NODISCARD ::location::nearby::connections::AvailableChannels* release_available_channels(); + ::location::nearby::connections::AvailableChannels* mutable_available_channels(); + void set_allocated_available_channels(::location::nearby::connections::AvailableChannels* available_channels); + private: + const ::location::nearby::connections::AvailableChannels& _internal_available_channels() const; + ::location::nearby::connections::AvailableChannels* _internal_mutable_available_channels(); + public: + void unsafe_arena_set_allocated_available_channels( + ::location::nearby::connections::AvailableChannels* available_channels); + ::location::nearby::connections::AvailableChannels* unsafe_arena_release_available_channels(); + + // optional .location.nearby.connections.WifiDirectCliUsableChannels wifi_direct_cli_usable_channels = 8; + bool has_wifi_direct_cli_usable_channels() const; + private: + bool _internal_has_wifi_direct_cli_usable_channels() const; + public: + void clear_wifi_direct_cli_usable_channels(); + const ::location::nearby::connections::WifiDirectCliUsableChannels& wifi_direct_cli_usable_channels() const; + PROTOBUF_NODISCARD ::location::nearby::connections::WifiDirectCliUsableChannels* release_wifi_direct_cli_usable_channels(); + ::location::nearby::connections::WifiDirectCliUsableChannels* mutable_wifi_direct_cli_usable_channels(); + void set_allocated_wifi_direct_cli_usable_channels(::location::nearby::connections::WifiDirectCliUsableChannels* wifi_direct_cli_usable_channels); + private: + const ::location::nearby::connections::WifiDirectCliUsableChannels& _internal_wifi_direct_cli_usable_channels() const; + ::location::nearby::connections::WifiDirectCliUsableChannels* _internal_mutable_wifi_direct_cli_usable_channels(); + public: + void unsafe_arena_set_allocated_wifi_direct_cli_usable_channels( + ::location::nearby::connections::WifiDirectCliUsableChannels* wifi_direct_cli_usable_channels); + ::location::nearby::connections::WifiDirectCliUsableChannels* unsafe_arena_release_wifi_direct_cli_usable_channels(); + + // optional .location.nearby.connections.WifiLanUsableChannels wifi_lan_usable_channels = 9; + bool has_wifi_lan_usable_channels() const; + private: + bool _internal_has_wifi_lan_usable_channels() const; + public: + void clear_wifi_lan_usable_channels(); + const ::location::nearby::connections::WifiLanUsableChannels& wifi_lan_usable_channels() const; + PROTOBUF_NODISCARD ::location::nearby::connections::WifiLanUsableChannels* release_wifi_lan_usable_channels(); + ::location::nearby::connections::WifiLanUsableChannels* mutable_wifi_lan_usable_channels(); + void set_allocated_wifi_lan_usable_channels(::location::nearby::connections::WifiLanUsableChannels* wifi_lan_usable_channels); + private: + const ::location::nearby::connections::WifiLanUsableChannels& _internal_wifi_lan_usable_channels() const; + ::location::nearby::connections::WifiLanUsableChannels* _internal_mutable_wifi_lan_usable_channels(); + public: + void unsafe_arena_set_allocated_wifi_lan_usable_channels( + ::location::nearby::connections::WifiLanUsableChannels* wifi_lan_usable_channels); + ::location::nearby::connections::WifiLanUsableChannels* unsafe_arena_release_wifi_lan_usable_channels(); + + // optional .location.nearby.connections.WifiAwareUsableChannels wifi_aware_usable_channels = 10; + bool has_wifi_aware_usable_channels() const; + private: + bool _internal_has_wifi_aware_usable_channels() const; + public: + void clear_wifi_aware_usable_channels(); + const ::location::nearby::connections::WifiAwareUsableChannels& wifi_aware_usable_channels() const; + PROTOBUF_NODISCARD ::location::nearby::connections::WifiAwareUsableChannels* release_wifi_aware_usable_channels(); + ::location::nearby::connections::WifiAwareUsableChannels* mutable_wifi_aware_usable_channels(); + void set_allocated_wifi_aware_usable_channels(::location::nearby::connections::WifiAwareUsableChannels* wifi_aware_usable_channels); + private: + const ::location::nearby::connections::WifiAwareUsableChannels& _internal_wifi_aware_usable_channels() const; + ::location::nearby::connections::WifiAwareUsableChannels* _internal_mutable_wifi_aware_usable_channels(); + public: + void unsafe_arena_set_allocated_wifi_aware_usable_channels( + ::location::nearby::connections::WifiAwareUsableChannels* wifi_aware_usable_channels); + ::location::nearby::connections::WifiAwareUsableChannels* unsafe_arena_release_wifi_aware_usable_channels(); + + // optional .location.nearby.connections.WifiHotspotStaUsableChannels wifi_hotspot_sta_usable_channels = 11; + bool has_wifi_hotspot_sta_usable_channels() const; + private: + bool _internal_has_wifi_hotspot_sta_usable_channels() const; + public: + void clear_wifi_hotspot_sta_usable_channels(); + const ::location::nearby::connections::WifiHotspotStaUsableChannels& wifi_hotspot_sta_usable_channels() const; + PROTOBUF_NODISCARD ::location::nearby::connections::WifiHotspotStaUsableChannels* release_wifi_hotspot_sta_usable_channels(); + ::location::nearby::connections::WifiHotspotStaUsableChannels* mutable_wifi_hotspot_sta_usable_channels(); + void set_allocated_wifi_hotspot_sta_usable_channels(::location::nearby::connections::WifiHotspotStaUsableChannels* wifi_hotspot_sta_usable_channels); + private: + const ::location::nearby::connections::WifiHotspotStaUsableChannels& _internal_wifi_hotspot_sta_usable_channels() const; + ::location::nearby::connections::WifiHotspotStaUsableChannels* _internal_mutable_wifi_hotspot_sta_usable_channels(); + public: + void unsafe_arena_set_allocated_wifi_hotspot_sta_usable_channels( + ::location::nearby::connections::WifiHotspotStaUsableChannels* wifi_hotspot_sta_usable_channels); + ::location::nearby::connections::WifiHotspotStaUsableChannels* unsafe_arena_release_wifi_hotspot_sta_usable_channels(); + + // optional bool supports_5_ghz = 1; + bool has_supports_5_ghz() const; + private: + bool _internal_has_supports_5_ghz() const; + public: + void clear_supports_5_ghz(); + bool supports_5_ghz() const; + void set_supports_5_ghz(bool value); + private: + bool _internal_supports_5_ghz() const; + void _internal_set_supports_5_ghz(bool value); + public: + + // optional bool supports_6_ghz = 4; + bool has_supports_6_ghz() const; + private: + bool _internal_has_supports_6_ghz() const; + public: + void clear_supports_6_ghz(); + bool supports_6_ghz() const; + void set_supports_6_ghz(bool value); + private: + bool _internal_supports_6_ghz() const; + void _internal_set_supports_6_ghz(bool value); + public: + + // optional bool mobile_radio = 5; + bool has_mobile_radio() const; + private: + bool _internal_has_mobile_radio() const; + public: + void clear_mobile_radio(); + bool mobile_radio() const; + void set_mobile_radio(bool value); + private: + bool _internal_mobile_radio() const; + void _internal_set_mobile_radio(bool value); + public: + + // optional int32 ap_frequency = 6 [default = -1]; + bool has_ap_frequency() const; + private: + bool _internal_has_ap_frequency() const; + public: + void clear_ap_frequency(); + int32_t ap_frequency() const; + void set_ap_frequency(int32_t value); + private: + int32_t _internal_ap_frequency() const; + void _internal_set_ap_frequency(int32_t value); + public: + + // @@protoc_insertion_point(class_scope:location.nearby.connections.MediumMetadata) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr bssid_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr ip_address_; + ::location::nearby::connections::AvailableChannels* available_channels_; + ::location::nearby::connections::WifiDirectCliUsableChannels* wifi_direct_cli_usable_channels_; + ::location::nearby::connections::WifiLanUsableChannels* wifi_lan_usable_channels_; + ::location::nearby::connections::WifiAwareUsableChannels* wifi_aware_usable_channels_; + ::location::nearby::connections::WifiHotspotStaUsableChannels* wifi_hotspot_sta_usable_channels_; + bool supports_5_ghz_; + bool supports_6_ghz_; + bool mobile_radio_; + int32_t ap_frequency_; + friend struct ::TableStruct_connections_2fimplementation_2fproto_2foffline_5fwire_5fformats_2eproto; +}; +// ------------------------------------------------------------------- + +class AvailableChannels final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:location.nearby.connections.AvailableChannels) */ { + public: + inline AvailableChannels() : AvailableChannels(nullptr) {} + ~AvailableChannels() override; + explicit constexpr AvailableChannels(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + AvailableChannels(const AvailableChannels& from); + AvailableChannels(AvailableChannels&& from) noexcept + : AvailableChannels() { + *this = ::std::move(from); + } + + inline AvailableChannels& operator=(const AvailableChannels& from) { + CopyFrom(from); + return *this; + } + inline AvailableChannels& operator=(AvailableChannels&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const AvailableChannels& default_instance() { + return *internal_default_instance(); + } + static inline const AvailableChannels* internal_default_instance() { + return reinterpret_cast( + &_AvailableChannels_default_instance_); + } + static constexpr int kIndexInFileMessages = + 22; + + friend void swap(AvailableChannels& a, AvailableChannels& b) { + a.Swap(&b); + } + inline void Swap(AvailableChannels* 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(AvailableChannels* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + AvailableChannels* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const AvailableChannels& from); + void MergeFrom(const AvailableChannels& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(AvailableChannels* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "location.nearby.connections.AvailableChannels"; + } + protected: + explicit AvailableChannels(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kChannelsFieldNumber = 1, + }; + // repeated int32 channels = 1 [packed = true]; + int channels_size() const; + private: + int _internal_channels_size() const; + public: + void clear_channels(); + private: + int32_t _internal_channels(int index) const; + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >& + _internal_channels() const; + void _internal_add_channels(int32_t value); + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >* + _internal_mutable_channels(); + public: + int32_t channels(int index) const; + void set_channels(int index, int32_t value); + void add_channels(int32_t value); + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >& + channels() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >* + mutable_channels(); + + // @@protoc_insertion_point(class_scope:location.nearby.connections.AvailableChannels) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t > channels_; + mutable std::atomic _channels_cached_byte_size_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_connections_2fimplementation_2fproto_2foffline_5fwire_5fformats_2eproto; +}; +// ------------------------------------------------------------------- + +class WifiDirectCliUsableChannels final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:location.nearby.connections.WifiDirectCliUsableChannels) */ { + public: + inline WifiDirectCliUsableChannels() : WifiDirectCliUsableChannels(nullptr) {} + ~WifiDirectCliUsableChannels() override; + explicit constexpr WifiDirectCliUsableChannels(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + WifiDirectCliUsableChannels(const WifiDirectCliUsableChannels& from); + WifiDirectCliUsableChannels(WifiDirectCliUsableChannels&& from) noexcept + : WifiDirectCliUsableChannels() { + *this = ::std::move(from); + } + + inline WifiDirectCliUsableChannels& operator=(const WifiDirectCliUsableChannels& from) { + CopyFrom(from); + return *this; + } + inline WifiDirectCliUsableChannels& operator=(WifiDirectCliUsableChannels&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const WifiDirectCliUsableChannels& default_instance() { + return *internal_default_instance(); + } + static inline const WifiDirectCliUsableChannels* internal_default_instance() { + return reinterpret_cast( + &_WifiDirectCliUsableChannels_default_instance_); + } + static constexpr int kIndexInFileMessages = + 23; + + friend void swap(WifiDirectCliUsableChannels& a, WifiDirectCliUsableChannels& b) { + a.Swap(&b); + } + inline void Swap(WifiDirectCliUsableChannels* 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(WifiDirectCliUsableChannels* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + WifiDirectCliUsableChannels* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const WifiDirectCliUsableChannels& from); + void MergeFrom(const WifiDirectCliUsableChannels& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(WifiDirectCliUsableChannels* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "location.nearby.connections.WifiDirectCliUsableChannels"; + } + protected: + explicit WifiDirectCliUsableChannels(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kChannelsFieldNumber = 1, + }; + // repeated int32 channels = 1 [packed = true]; + int channels_size() const; + private: + int _internal_channels_size() const; + public: + void clear_channels(); + private: + int32_t _internal_channels(int index) const; + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >& + _internal_channels() const; + void _internal_add_channels(int32_t value); + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >* + _internal_mutable_channels(); + public: + int32_t channels(int index) const; + void set_channels(int index, int32_t value); + void add_channels(int32_t value); + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >& + channels() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >* + mutable_channels(); + + // @@protoc_insertion_point(class_scope:location.nearby.connections.WifiDirectCliUsableChannels) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t > channels_; + mutable std::atomic _channels_cached_byte_size_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_connections_2fimplementation_2fproto_2foffline_5fwire_5fformats_2eproto; +}; +// ------------------------------------------------------------------- + +class WifiLanUsableChannels final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:location.nearby.connections.WifiLanUsableChannels) */ { + public: + inline WifiLanUsableChannels() : WifiLanUsableChannels(nullptr) {} + ~WifiLanUsableChannels() override; + explicit constexpr WifiLanUsableChannels(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + WifiLanUsableChannels(const WifiLanUsableChannels& from); + WifiLanUsableChannels(WifiLanUsableChannels&& from) noexcept + : WifiLanUsableChannels() { + *this = ::std::move(from); + } + + inline WifiLanUsableChannels& operator=(const WifiLanUsableChannels& from) { + CopyFrom(from); + return *this; + } + inline WifiLanUsableChannels& operator=(WifiLanUsableChannels&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const WifiLanUsableChannels& default_instance() { + return *internal_default_instance(); + } + static inline const WifiLanUsableChannels* internal_default_instance() { + return reinterpret_cast( + &_WifiLanUsableChannels_default_instance_); + } + static constexpr int kIndexInFileMessages = + 24; + + friend void swap(WifiLanUsableChannels& a, WifiLanUsableChannels& b) { + a.Swap(&b); + } + inline void Swap(WifiLanUsableChannels* 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(WifiLanUsableChannels* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + WifiLanUsableChannels* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const WifiLanUsableChannels& from); + void MergeFrom(const WifiLanUsableChannels& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(WifiLanUsableChannels* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "location.nearby.connections.WifiLanUsableChannels"; + } + protected: + explicit WifiLanUsableChannels(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kChannelsFieldNumber = 1, + }; + // repeated int32 channels = 1 [packed = true]; + int channels_size() const; + private: + int _internal_channels_size() const; + public: + void clear_channels(); + private: + int32_t _internal_channels(int index) const; + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >& + _internal_channels() const; + void _internal_add_channels(int32_t value); + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >* + _internal_mutable_channels(); + public: + int32_t channels(int index) const; + void set_channels(int index, int32_t value); + void add_channels(int32_t value); + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >& + channels() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >* + mutable_channels(); + + // @@protoc_insertion_point(class_scope:location.nearby.connections.WifiLanUsableChannels) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t > channels_; + mutable std::atomic _channels_cached_byte_size_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_connections_2fimplementation_2fproto_2foffline_5fwire_5fformats_2eproto; +}; +// ------------------------------------------------------------------- + +class WifiAwareUsableChannels final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:location.nearby.connections.WifiAwareUsableChannels) */ { + public: + inline WifiAwareUsableChannels() : WifiAwareUsableChannels(nullptr) {} + ~WifiAwareUsableChannels() override; + explicit constexpr WifiAwareUsableChannels(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + WifiAwareUsableChannels(const WifiAwareUsableChannels& from); + WifiAwareUsableChannels(WifiAwareUsableChannels&& from) noexcept + : WifiAwareUsableChannels() { + *this = ::std::move(from); + } + + inline WifiAwareUsableChannels& operator=(const WifiAwareUsableChannels& from) { + CopyFrom(from); + return *this; + } + inline WifiAwareUsableChannels& operator=(WifiAwareUsableChannels&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const WifiAwareUsableChannels& default_instance() { + return *internal_default_instance(); + } + static inline const WifiAwareUsableChannels* internal_default_instance() { + return reinterpret_cast( + &_WifiAwareUsableChannels_default_instance_); + } + static constexpr int kIndexInFileMessages = + 25; + + friend void swap(WifiAwareUsableChannels& a, WifiAwareUsableChannels& b) { + a.Swap(&b); + } + inline void Swap(WifiAwareUsableChannels* 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(WifiAwareUsableChannels* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + WifiAwareUsableChannels* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const WifiAwareUsableChannels& from); + void MergeFrom(const WifiAwareUsableChannels& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(WifiAwareUsableChannels* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "location.nearby.connections.WifiAwareUsableChannels"; + } + protected: + explicit WifiAwareUsableChannels(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kChannelsFieldNumber = 1, + }; + // repeated int32 channels = 1 [packed = true]; + int channels_size() const; + private: + int _internal_channels_size() const; + public: + void clear_channels(); + private: + int32_t _internal_channels(int index) const; + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >& + _internal_channels() const; + void _internal_add_channels(int32_t value); + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >* + _internal_mutable_channels(); + public: + int32_t channels(int index) const; + void set_channels(int index, int32_t value); + void add_channels(int32_t value); + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >& + channels() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >* + mutable_channels(); + + // @@protoc_insertion_point(class_scope:location.nearby.connections.WifiAwareUsableChannels) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t > channels_; + mutable std::atomic _channels_cached_byte_size_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_connections_2fimplementation_2fproto_2foffline_5fwire_5fformats_2eproto; +}; +// ------------------------------------------------------------------- + +class WifiHotspotStaUsableChannels final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:location.nearby.connections.WifiHotspotStaUsableChannels) */ { + public: + inline WifiHotspotStaUsableChannels() : WifiHotspotStaUsableChannels(nullptr) {} + ~WifiHotspotStaUsableChannels() override; + explicit constexpr WifiHotspotStaUsableChannels(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + WifiHotspotStaUsableChannels(const WifiHotspotStaUsableChannels& from); + WifiHotspotStaUsableChannels(WifiHotspotStaUsableChannels&& from) noexcept + : WifiHotspotStaUsableChannels() { + *this = ::std::move(from); + } + + inline WifiHotspotStaUsableChannels& operator=(const WifiHotspotStaUsableChannels& from) { + CopyFrom(from); + return *this; + } + inline WifiHotspotStaUsableChannels& operator=(WifiHotspotStaUsableChannels&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const WifiHotspotStaUsableChannels& default_instance() { + return *internal_default_instance(); + } + static inline const WifiHotspotStaUsableChannels* internal_default_instance() { + return reinterpret_cast( + &_WifiHotspotStaUsableChannels_default_instance_); + } + static constexpr int kIndexInFileMessages = + 26; + + friend void swap(WifiHotspotStaUsableChannels& a, WifiHotspotStaUsableChannels& b) { + a.Swap(&b); + } + inline void Swap(WifiHotspotStaUsableChannels* 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(WifiHotspotStaUsableChannels* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + WifiHotspotStaUsableChannels* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const WifiHotspotStaUsableChannels& from); + void MergeFrom(const WifiHotspotStaUsableChannels& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(WifiHotspotStaUsableChannels* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "location.nearby.connections.WifiHotspotStaUsableChannels"; + } + protected: + explicit WifiHotspotStaUsableChannels(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kChannelsFieldNumber = 1, + }; + // repeated int32 channels = 1 [packed = true]; + int channels_size() const; + private: + int _internal_channels_size() const; + public: + void clear_channels(); + private: + int32_t _internal_channels(int index) const; + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >& + _internal_channels() const; + void _internal_add_channels(int32_t value); + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >* + _internal_mutable_channels(); + public: + int32_t channels(int index) const; + void set_channels(int index, int32_t value); + void add_channels(int32_t value); + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >& + channels() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >* + mutable_channels(); + + // @@protoc_insertion_point(class_scope:location.nearby.connections.WifiHotspotStaUsableChannels) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t > channels_; + mutable std::atomic _channels_cached_byte_size_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_connections_2fimplementation_2fproto_2foffline_5fwire_5fformats_2eproto; +}; +// ------------------------------------------------------------------- + +class LocationHint final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:location.nearby.connections.LocationHint) */ { + public: + inline LocationHint() : LocationHint(nullptr) {} + ~LocationHint() override; + explicit constexpr LocationHint(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + LocationHint(const LocationHint& from); + LocationHint(LocationHint&& from) noexcept + : LocationHint() { + *this = ::std::move(from); + } + + inline LocationHint& operator=(const LocationHint& from) { + CopyFrom(from); + return *this; + } + inline LocationHint& operator=(LocationHint&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const LocationHint& default_instance() { + return *internal_default_instance(); + } + static inline const LocationHint* internal_default_instance() { + return reinterpret_cast( + &_LocationHint_default_instance_); + } + static constexpr int kIndexInFileMessages = + 27; + + friend void swap(LocationHint& a, LocationHint& b) { + a.Swap(&b); + } + inline void Swap(LocationHint* 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(LocationHint* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + LocationHint* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const LocationHint& from); + void MergeFrom(const LocationHint& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(LocationHint* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "location.nearby.connections.LocationHint"; + } + protected: + explicit LocationHint(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kLocationFieldNumber = 1, + kFormatFieldNumber = 2, + }; + // optional string location = 1; + bool has_location() const; + private: + bool _internal_has_location() const; + public: + void clear_location(); + const std::string& location() const; + template + void set_location(ArgT0&& arg0, ArgT... args); + std::string* mutable_location(); + PROTOBUF_NODISCARD std::string* release_location(); + void set_allocated_location(std::string* location); + private: + const std::string& _internal_location() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_location(const std::string& value); + std::string* _internal_mutable_location(); + public: + + // optional .location.nearby.connections.LocationStandard.Format format = 2; + bool has_format() const; + private: + bool _internal_has_format() const; + public: + void clear_format(); + ::location::nearby::connections::LocationStandard_Format format() const; + void set_format(::location::nearby::connections::LocationStandard_Format value); + private: + ::location::nearby::connections::LocationStandard_Format _internal_format() const; + void _internal_set_format(::location::nearby::connections::LocationStandard_Format value); + public: + + // @@protoc_insertion_point(class_scope:location.nearby.connections.LocationHint) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr location_; + int format_; + friend struct ::TableStruct_connections_2fimplementation_2fproto_2foffline_5fwire_5fformats_2eproto; +}; +// ------------------------------------------------------------------- + +class LocationStandard final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:location.nearby.connections.LocationStandard) */ { + public: + inline LocationStandard() : LocationStandard(nullptr) {} + ~LocationStandard() override; + explicit constexpr LocationStandard(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + LocationStandard(const LocationStandard& from); + LocationStandard(LocationStandard&& from) noexcept + : LocationStandard() { + *this = ::std::move(from); + } + + inline LocationStandard& operator=(const LocationStandard& from) { + CopyFrom(from); + return *this; + } + inline LocationStandard& operator=(LocationStandard&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const LocationStandard& default_instance() { + return *internal_default_instance(); + } + static inline const LocationStandard* internal_default_instance() { + return reinterpret_cast( + &_LocationStandard_default_instance_); + } + static constexpr int kIndexInFileMessages = + 28; + + friend void swap(LocationStandard& a, LocationStandard& b) { + a.Swap(&b); + } + inline void Swap(LocationStandard* 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(LocationStandard* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + LocationStandard* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const LocationStandard& from); + void MergeFrom(const LocationStandard& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(LocationStandard* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "location.nearby.connections.LocationStandard"; + } + protected: + explicit LocationStandard(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + typedef LocationStandard_Format Format; + static constexpr Format UNKNOWN = + LocationStandard_Format_UNKNOWN; + static constexpr Format E164_CALLING = + LocationStandard_Format_E164_CALLING; + static constexpr Format ISO_3166_1_ALPHA_2 = + LocationStandard_Format_ISO_3166_1_ALPHA_2; + static inline bool Format_IsValid(int value) { + return LocationStandard_Format_IsValid(value); + } + static constexpr Format Format_MIN = + LocationStandard_Format_Format_MIN; + static constexpr Format Format_MAX = + LocationStandard_Format_Format_MAX; + static constexpr int Format_ARRAYSIZE = + LocationStandard_Format_Format_ARRAYSIZE; + template + static inline const std::string& Format_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function Format_Name."); + return LocationStandard_Format_Name(enum_t_value); + } + static inline bool Format_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name, + Format* value) { + return LocationStandard_Format_Parse(name, value); + } + + // accessors ------------------------------------------------------- + + // @@protoc_insertion_point(class_scope:location.nearby.connections.LocationStandard) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_connections_2fimplementation_2fproto_2foffline_5fwire_5fformats_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// OfflineFrame + +// optional .location.nearby.connections.OfflineFrame.Version version = 1; +inline bool OfflineFrame::_internal_has_version() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool OfflineFrame::has_version() const { + return _internal_has_version(); +} +inline void OfflineFrame::clear_version() { + version_ = 0; + _has_bits_[0] &= ~0x00000002u; +} +inline ::location::nearby::connections::OfflineFrame_Version OfflineFrame::_internal_version() const { + return static_cast< ::location::nearby::connections::OfflineFrame_Version >(version_); +} +inline ::location::nearby::connections::OfflineFrame_Version OfflineFrame::version() const { + // @@protoc_insertion_point(field_get:location.nearby.connections.OfflineFrame.version) + return _internal_version(); +} +inline void OfflineFrame::_internal_set_version(::location::nearby::connections::OfflineFrame_Version value) { + assert(::location::nearby::connections::OfflineFrame_Version_IsValid(value)); + _has_bits_[0] |= 0x00000002u; + version_ = value; +} +inline void OfflineFrame::set_version(::location::nearby::connections::OfflineFrame_Version value) { + _internal_set_version(value); + // @@protoc_insertion_point(field_set:location.nearby.connections.OfflineFrame.version) +} + +// optional .location.nearby.connections.V1Frame v1 = 2; +inline bool OfflineFrame::_internal_has_v1() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + PROTOBUF_ASSUME(!value || v1_ != nullptr); + return value; +} +inline bool OfflineFrame::has_v1() const { + return _internal_has_v1(); +} +inline void OfflineFrame::clear_v1() { + if (v1_ != nullptr) v1_->Clear(); + _has_bits_[0] &= ~0x00000001u; +} +inline const ::location::nearby::connections::V1Frame& OfflineFrame::_internal_v1() const { + const ::location::nearby::connections::V1Frame* p = v1_; + return p != nullptr ? *p : reinterpret_cast( + ::location::nearby::connections::_V1Frame_default_instance_); +} +inline const ::location::nearby::connections::V1Frame& OfflineFrame::v1() const { + // @@protoc_insertion_point(field_get:location.nearby.connections.OfflineFrame.v1) + return _internal_v1(); +} +inline void OfflineFrame::unsafe_arena_set_allocated_v1( + ::location::nearby::connections::V1Frame* v1) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(v1_); + } + v1_ = v1; + if (v1) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:location.nearby.connections.OfflineFrame.v1) +} +inline ::location::nearby::connections::V1Frame* OfflineFrame::release_v1() { + _has_bits_[0] &= ~0x00000001u; + ::location::nearby::connections::V1Frame* temp = v1_; + v1_ = 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 ::location::nearby::connections::V1Frame* OfflineFrame::unsafe_arena_release_v1() { + // @@protoc_insertion_point(field_release:location.nearby.connections.OfflineFrame.v1) + _has_bits_[0] &= ~0x00000001u; + ::location::nearby::connections::V1Frame* temp = v1_; + v1_ = nullptr; + return temp; +} +inline ::location::nearby::connections::V1Frame* OfflineFrame::_internal_mutable_v1() { + _has_bits_[0] |= 0x00000001u; + if (v1_ == nullptr) { + auto* p = CreateMaybeMessage<::location::nearby::connections::V1Frame>(GetArenaForAllocation()); + v1_ = p; + } + return v1_; +} +inline ::location::nearby::connections::V1Frame* OfflineFrame::mutable_v1() { + ::location::nearby::connections::V1Frame* _msg = _internal_mutable_v1(); + // @@protoc_insertion_point(field_mutable:location.nearby.connections.OfflineFrame.v1) + return _msg; +} +inline void OfflineFrame::set_allocated_v1(::location::nearby::connections::V1Frame* v1) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete v1_; + } + if (v1) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::location::nearby::connections::V1Frame>::GetOwningArena(v1); + if (message_arena != submessage_arena) { + v1 = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, v1, submessage_arena); + } + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + v1_ = v1; + // @@protoc_insertion_point(field_set_allocated:location.nearby.connections.OfflineFrame.v1) +} + +// ------------------------------------------------------------------- + +// V1Frame + +// optional .location.nearby.connections.V1Frame.FrameType type = 1; +inline bool V1Frame::_internal_has_type() const { + bool value = (_has_bits_[0] & 0x00000080u) != 0; + return value; +} +inline bool V1Frame::has_type() const { + return _internal_has_type(); +} +inline void V1Frame::clear_type() { + type_ = 0; + _has_bits_[0] &= ~0x00000080u; +} +inline ::location::nearby::connections::V1Frame_FrameType V1Frame::_internal_type() const { + return static_cast< ::location::nearby::connections::V1Frame_FrameType >(type_); +} +inline ::location::nearby::connections::V1Frame_FrameType V1Frame::type() const { + // @@protoc_insertion_point(field_get:location.nearby.connections.V1Frame.type) + return _internal_type(); +} +inline void V1Frame::_internal_set_type(::location::nearby::connections::V1Frame_FrameType value) { + assert(::location::nearby::connections::V1Frame_FrameType_IsValid(value)); + _has_bits_[0] |= 0x00000080u; + type_ = value; +} +inline void V1Frame::set_type(::location::nearby::connections::V1Frame_FrameType value) { + _internal_set_type(value); + // @@protoc_insertion_point(field_set:location.nearby.connections.V1Frame.type) +} + +// optional .location.nearby.connections.ConnectionRequestFrame connection_request = 2; +inline bool V1Frame::_internal_has_connection_request() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + PROTOBUF_ASSUME(!value || connection_request_ != nullptr); + return value; +} +inline bool V1Frame::has_connection_request() const { + return _internal_has_connection_request(); +} +inline void V1Frame::clear_connection_request() { + if (connection_request_ != nullptr) connection_request_->Clear(); + _has_bits_[0] &= ~0x00000001u; +} +inline const ::location::nearby::connections::ConnectionRequestFrame& V1Frame::_internal_connection_request() const { + const ::location::nearby::connections::ConnectionRequestFrame* p = connection_request_; + return p != nullptr ? *p : reinterpret_cast( + ::location::nearby::connections::_ConnectionRequestFrame_default_instance_); +} +inline const ::location::nearby::connections::ConnectionRequestFrame& V1Frame::connection_request() const { + // @@protoc_insertion_point(field_get:location.nearby.connections.V1Frame.connection_request) + return _internal_connection_request(); +} +inline void V1Frame::unsafe_arena_set_allocated_connection_request( + ::location::nearby::connections::ConnectionRequestFrame* connection_request) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(connection_request_); + } + connection_request_ = connection_request; + if (connection_request) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:location.nearby.connections.V1Frame.connection_request) +} +inline ::location::nearby::connections::ConnectionRequestFrame* V1Frame::release_connection_request() { + _has_bits_[0] &= ~0x00000001u; + ::location::nearby::connections::ConnectionRequestFrame* temp = connection_request_; + connection_request_ = 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 ::location::nearby::connections::ConnectionRequestFrame* V1Frame::unsafe_arena_release_connection_request() { + // @@protoc_insertion_point(field_release:location.nearby.connections.V1Frame.connection_request) + _has_bits_[0] &= ~0x00000001u; + ::location::nearby::connections::ConnectionRequestFrame* temp = connection_request_; + connection_request_ = nullptr; + return temp; +} +inline ::location::nearby::connections::ConnectionRequestFrame* V1Frame::_internal_mutable_connection_request() { + _has_bits_[0] |= 0x00000001u; + if (connection_request_ == nullptr) { + auto* p = CreateMaybeMessage<::location::nearby::connections::ConnectionRequestFrame>(GetArenaForAllocation()); + connection_request_ = p; + } + return connection_request_; +} +inline ::location::nearby::connections::ConnectionRequestFrame* V1Frame::mutable_connection_request() { + ::location::nearby::connections::ConnectionRequestFrame* _msg = _internal_mutable_connection_request(); + // @@protoc_insertion_point(field_mutable:location.nearby.connections.V1Frame.connection_request) + return _msg; +} +inline void V1Frame::set_allocated_connection_request(::location::nearby::connections::ConnectionRequestFrame* connection_request) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete connection_request_; + } + if (connection_request) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::location::nearby::connections::ConnectionRequestFrame>::GetOwningArena(connection_request); + if (message_arena != submessage_arena) { + connection_request = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, connection_request, submessage_arena); + } + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + connection_request_ = connection_request; + // @@protoc_insertion_point(field_set_allocated:location.nearby.connections.V1Frame.connection_request) +} + +// optional .location.nearby.connections.ConnectionResponseFrame connection_response = 3; +inline bool V1Frame::_internal_has_connection_response() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + PROTOBUF_ASSUME(!value || connection_response_ != nullptr); + return value; +} +inline bool V1Frame::has_connection_response() const { + return _internal_has_connection_response(); +} +inline void V1Frame::clear_connection_response() { + if (connection_response_ != nullptr) connection_response_->Clear(); + _has_bits_[0] &= ~0x00000002u; +} +inline const ::location::nearby::connections::ConnectionResponseFrame& V1Frame::_internal_connection_response() const { + const ::location::nearby::connections::ConnectionResponseFrame* p = connection_response_; + return p != nullptr ? *p : reinterpret_cast( + ::location::nearby::connections::_ConnectionResponseFrame_default_instance_); +} +inline const ::location::nearby::connections::ConnectionResponseFrame& V1Frame::connection_response() const { + // @@protoc_insertion_point(field_get:location.nearby.connections.V1Frame.connection_response) + return _internal_connection_response(); +} +inline void V1Frame::unsafe_arena_set_allocated_connection_response( + ::location::nearby::connections::ConnectionResponseFrame* connection_response) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(connection_response_); + } + connection_response_ = connection_response; + if (connection_response) { + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:location.nearby.connections.V1Frame.connection_response) +} +inline ::location::nearby::connections::ConnectionResponseFrame* V1Frame::release_connection_response() { + _has_bits_[0] &= ~0x00000002u; + ::location::nearby::connections::ConnectionResponseFrame* temp = connection_response_; + connection_response_ = 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 ::location::nearby::connections::ConnectionResponseFrame* V1Frame::unsafe_arena_release_connection_response() { + // @@protoc_insertion_point(field_release:location.nearby.connections.V1Frame.connection_response) + _has_bits_[0] &= ~0x00000002u; + ::location::nearby::connections::ConnectionResponseFrame* temp = connection_response_; + connection_response_ = nullptr; + return temp; +} +inline ::location::nearby::connections::ConnectionResponseFrame* V1Frame::_internal_mutable_connection_response() { + _has_bits_[0] |= 0x00000002u; + if (connection_response_ == nullptr) { + auto* p = CreateMaybeMessage<::location::nearby::connections::ConnectionResponseFrame>(GetArenaForAllocation()); + connection_response_ = p; + } + return connection_response_; +} +inline ::location::nearby::connections::ConnectionResponseFrame* V1Frame::mutable_connection_response() { + ::location::nearby::connections::ConnectionResponseFrame* _msg = _internal_mutable_connection_response(); + // @@protoc_insertion_point(field_mutable:location.nearby.connections.V1Frame.connection_response) + return _msg; +} +inline void V1Frame::set_allocated_connection_response(::location::nearby::connections::ConnectionResponseFrame* connection_response) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete connection_response_; + } + if (connection_response) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::location::nearby::connections::ConnectionResponseFrame>::GetOwningArena(connection_response); + if (message_arena != submessage_arena) { + connection_response = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, connection_response, submessage_arena); + } + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + connection_response_ = connection_response; + // @@protoc_insertion_point(field_set_allocated:location.nearby.connections.V1Frame.connection_response) +} + +// optional .location.nearby.connections.PayloadTransferFrame payload_transfer = 4; +inline bool V1Frame::_internal_has_payload_transfer() const { + bool value = (_has_bits_[0] & 0x00000004u) != 0; + PROTOBUF_ASSUME(!value || payload_transfer_ != nullptr); + return value; +} +inline bool V1Frame::has_payload_transfer() const { + return _internal_has_payload_transfer(); +} +inline void V1Frame::clear_payload_transfer() { + if (payload_transfer_ != nullptr) payload_transfer_->Clear(); + _has_bits_[0] &= ~0x00000004u; +} +inline const ::location::nearby::connections::PayloadTransferFrame& V1Frame::_internal_payload_transfer() const { + const ::location::nearby::connections::PayloadTransferFrame* p = payload_transfer_; + return p != nullptr ? *p : reinterpret_cast( + ::location::nearby::connections::_PayloadTransferFrame_default_instance_); +} +inline const ::location::nearby::connections::PayloadTransferFrame& V1Frame::payload_transfer() const { + // @@protoc_insertion_point(field_get:location.nearby.connections.V1Frame.payload_transfer) + return _internal_payload_transfer(); +} +inline void V1Frame::unsafe_arena_set_allocated_payload_transfer( + ::location::nearby::connections::PayloadTransferFrame* payload_transfer) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(payload_transfer_); + } + payload_transfer_ = payload_transfer; + if (payload_transfer) { + _has_bits_[0] |= 0x00000004u; + } else { + _has_bits_[0] &= ~0x00000004u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:location.nearby.connections.V1Frame.payload_transfer) +} +inline ::location::nearby::connections::PayloadTransferFrame* V1Frame::release_payload_transfer() { + _has_bits_[0] &= ~0x00000004u; + ::location::nearby::connections::PayloadTransferFrame* temp = payload_transfer_; + payload_transfer_ = 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 ::location::nearby::connections::PayloadTransferFrame* V1Frame::unsafe_arena_release_payload_transfer() { + // @@protoc_insertion_point(field_release:location.nearby.connections.V1Frame.payload_transfer) + _has_bits_[0] &= ~0x00000004u; + ::location::nearby::connections::PayloadTransferFrame* temp = payload_transfer_; + payload_transfer_ = nullptr; + return temp; +} +inline ::location::nearby::connections::PayloadTransferFrame* V1Frame::_internal_mutable_payload_transfer() { + _has_bits_[0] |= 0x00000004u; + if (payload_transfer_ == nullptr) { + auto* p = CreateMaybeMessage<::location::nearby::connections::PayloadTransferFrame>(GetArenaForAllocation()); + payload_transfer_ = p; + } + return payload_transfer_; +} +inline ::location::nearby::connections::PayloadTransferFrame* V1Frame::mutable_payload_transfer() { + ::location::nearby::connections::PayloadTransferFrame* _msg = _internal_mutable_payload_transfer(); + // @@protoc_insertion_point(field_mutable:location.nearby.connections.V1Frame.payload_transfer) + return _msg; +} +inline void V1Frame::set_allocated_payload_transfer(::location::nearby::connections::PayloadTransferFrame* payload_transfer) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete payload_transfer_; + } + if (payload_transfer) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::location::nearby::connections::PayloadTransferFrame>::GetOwningArena(payload_transfer); + if (message_arena != submessage_arena) { + payload_transfer = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, payload_transfer, submessage_arena); + } + _has_bits_[0] |= 0x00000004u; + } else { + _has_bits_[0] &= ~0x00000004u; + } + payload_transfer_ = payload_transfer; + // @@protoc_insertion_point(field_set_allocated:location.nearby.connections.V1Frame.payload_transfer) +} + +// optional .location.nearby.connections.BandwidthUpgradeNegotiationFrame bandwidth_upgrade_negotiation = 5; +inline bool V1Frame::_internal_has_bandwidth_upgrade_negotiation() const { + bool value = (_has_bits_[0] & 0x00000008u) != 0; + PROTOBUF_ASSUME(!value || bandwidth_upgrade_negotiation_ != nullptr); + return value; +} +inline bool V1Frame::has_bandwidth_upgrade_negotiation() const { + return _internal_has_bandwidth_upgrade_negotiation(); +} +inline void V1Frame::clear_bandwidth_upgrade_negotiation() { + if (bandwidth_upgrade_negotiation_ != nullptr) bandwidth_upgrade_negotiation_->Clear(); + _has_bits_[0] &= ~0x00000008u; +} +inline const ::location::nearby::connections::BandwidthUpgradeNegotiationFrame& V1Frame::_internal_bandwidth_upgrade_negotiation() const { + const ::location::nearby::connections::BandwidthUpgradeNegotiationFrame* p = bandwidth_upgrade_negotiation_; + return p != nullptr ? *p : reinterpret_cast( + ::location::nearby::connections::_BandwidthUpgradeNegotiationFrame_default_instance_); +} +inline const ::location::nearby::connections::BandwidthUpgradeNegotiationFrame& V1Frame::bandwidth_upgrade_negotiation() const { + // @@protoc_insertion_point(field_get:location.nearby.connections.V1Frame.bandwidth_upgrade_negotiation) + return _internal_bandwidth_upgrade_negotiation(); +} +inline void V1Frame::unsafe_arena_set_allocated_bandwidth_upgrade_negotiation( + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame* bandwidth_upgrade_negotiation) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(bandwidth_upgrade_negotiation_); + } + bandwidth_upgrade_negotiation_ = bandwidth_upgrade_negotiation; + if (bandwidth_upgrade_negotiation) { + _has_bits_[0] |= 0x00000008u; + } else { + _has_bits_[0] &= ~0x00000008u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:location.nearby.connections.V1Frame.bandwidth_upgrade_negotiation) +} +inline ::location::nearby::connections::BandwidthUpgradeNegotiationFrame* V1Frame::release_bandwidth_upgrade_negotiation() { + _has_bits_[0] &= ~0x00000008u; + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame* temp = bandwidth_upgrade_negotiation_; + bandwidth_upgrade_negotiation_ = 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 ::location::nearby::connections::BandwidthUpgradeNegotiationFrame* V1Frame::unsafe_arena_release_bandwidth_upgrade_negotiation() { + // @@protoc_insertion_point(field_release:location.nearby.connections.V1Frame.bandwidth_upgrade_negotiation) + _has_bits_[0] &= ~0x00000008u; + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame* temp = bandwidth_upgrade_negotiation_; + bandwidth_upgrade_negotiation_ = nullptr; + return temp; +} +inline ::location::nearby::connections::BandwidthUpgradeNegotiationFrame* V1Frame::_internal_mutable_bandwidth_upgrade_negotiation() { + _has_bits_[0] |= 0x00000008u; + if (bandwidth_upgrade_negotiation_ == nullptr) { + auto* p = CreateMaybeMessage<::location::nearby::connections::BandwidthUpgradeNegotiationFrame>(GetArenaForAllocation()); + bandwidth_upgrade_negotiation_ = p; + } + return bandwidth_upgrade_negotiation_; +} +inline ::location::nearby::connections::BandwidthUpgradeNegotiationFrame* V1Frame::mutable_bandwidth_upgrade_negotiation() { + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame* _msg = _internal_mutable_bandwidth_upgrade_negotiation(); + // @@protoc_insertion_point(field_mutable:location.nearby.connections.V1Frame.bandwidth_upgrade_negotiation) + return _msg; +} +inline void V1Frame::set_allocated_bandwidth_upgrade_negotiation(::location::nearby::connections::BandwidthUpgradeNegotiationFrame* bandwidth_upgrade_negotiation) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete bandwidth_upgrade_negotiation_; + } + if (bandwidth_upgrade_negotiation) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::location::nearby::connections::BandwidthUpgradeNegotiationFrame>::GetOwningArena(bandwidth_upgrade_negotiation); + if (message_arena != submessage_arena) { + bandwidth_upgrade_negotiation = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, bandwidth_upgrade_negotiation, submessage_arena); + } + _has_bits_[0] |= 0x00000008u; + } else { + _has_bits_[0] &= ~0x00000008u; + } + bandwidth_upgrade_negotiation_ = bandwidth_upgrade_negotiation; + // @@protoc_insertion_point(field_set_allocated:location.nearby.connections.V1Frame.bandwidth_upgrade_negotiation) +} + +// optional .location.nearby.connections.KeepAliveFrame keep_alive = 6; +inline bool V1Frame::_internal_has_keep_alive() const { + bool value = (_has_bits_[0] & 0x00000010u) != 0; + PROTOBUF_ASSUME(!value || keep_alive_ != nullptr); + return value; +} +inline bool V1Frame::has_keep_alive() const { + return _internal_has_keep_alive(); +} +inline void V1Frame::clear_keep_alive() { + if (keep_alive_ != nullptr) keep_alive_->Clear(); + _has_bits_[0] &= ~0x00000010u; +} +inline const ::location::nearby::connections::KeepAliveFrame& V1Frame::_internal_keep_alive() const { + const ::location::nearby::connections::KeepAliveFrame* p = keep_alive_; + return p != nullptr ? *p : reinterpret_cast( + ::location::nearby::connections::_KeepAliveFrame_default_instance_); +} +inline const ::location::nearby::connections::KeepAliveFrame& V1Frame::keep_alive() const { + // @@protoc_insertion_point(field_get:location.nearby.connections.V1Frame.keep_alive) + return _internal_keep_alive(); +} +inline void V1Frame::unsafe_arena_set_allocated_keep_alive( + ::location::nearby::connections::KeepAliveFrame* keep_alive) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(keep_alive_); + } + keep_alive_ = keep_alive; + if (keep_alive) { + _has_bits_[0] |= 0x00000010u; + } else { + _has_bits_[0] &= ~0x00000010u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:location.nearby.connections.V1Frame.keep_alive) +} +inline ::location::nearby::connections::KeepAliveFrame* V1Frame::release_keep_alive() { + _has_bits_[0] &= ~0x00000010u; + ::location::nearby::connections::KeepAliveFrame* temp = keep_alive_; + keep_alive_ = 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 ::location::nearby::connections::KeepAliveFrame* V1Frame::unsafe_arena_release_keep_alive() { + // @@protoc_insertion_point(field_release:location.nearby.connections.V1Frame.keep_alive) + _has_bits_[0] &= ~0x00000010u; + ::location::nearby::connections::KeepAliveFrame* temp = keep_alive_; + keep_alive_ = nullptr; + return temp; +} +inline ::location::nearby::connections::KeepAliveFrame* V1Frame::_internal_mutable_keep_alive() { + _has_bits_[0] |= 0x00000010u; + if (keep_alive_ == nullptr) { + auto* p = CreateMaybeMessage<::location::nearby::connections::KeepAliveFrame>(GetArenaForAllocation()); + keep_alive_ = p; + } + return keep_alive_; +} +inline ::location::nearby::connections::KeepAliveFrame* V1Frame::mutable_keep_alive() { + ::location::nearby::connections::KeepAliveFrame* _msg = _internal_mutable_keep_alive(); + // @@protoc_insertion_point(field_mutable:location.nearby.connections.V1Frame.keep_alive) + return _msg; +} +inline void V1Frame::set_allocated_keep_alive(::location::nearby::connections::KeepAliveFrame* keep_alive) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete keep_alive_; + } + if (keep_alive) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::location::nearby::connections::KeepAliveFrame>::GetOwningArena(keep_alive); + if (message_arena != submessage_arena) { + keep_alive = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, keep_alive, submessage_arena); + } + _has_bits_[0] |= 0x00000010u; + } else { + _has_bits_[0] &= ~0x00000010u; + } + keep_alive_ = keep_alive; + // @@protoc_insertion_point(field_set_allocated:location.nearby.connections.V1Frame.keep_alive) +} + +// optional .location.nearby.connections.DisconnectionFrame disconnection = 7; +inline bool V1Frame::_internal_has_disconnection() const { + bool value = (_has_bits_[0] & 0x00000020u) != 0; + PROTOBUF_ASSUME(!value || disconnection_ != nullptr); + return value; +} +inline bool V1Frame::has_disconnection() const { + return _internal_has_disconnection(); +} +inline void V1Frame::clear_disconnection() { + if (disconnection_ != nullptr) disconnection_->Clear(); + _has_bits_[0] &= ~0x00000020u; +} +inline const ::location::nearby::connections::DisconnectionFrame& V1Frame::_internal_disconnection() const { + const ::location::nearby::connections::DisconnectionFrame* p = disconnection_; + return p != nullptr ? *p : reinterpret_cast( + ::location::nearby::connections::_DisconnectionFrame_default_instance_); +} +inline const ::location::nearby::connections::DisconnectionFrame& V1Frame::disconnection() const { + // @@protoc_insertion_point(field_get:location.nearby.connections.V1Frame.disconnection) + return _internal_disconnection(); +} +inline void V1Frame::unsafe_arena_set_allocated_disconnection( + ::location::nearby::connections::DisconnectionFrame* disconnection) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(disconnection_); + } + disconnection_ = disconnection; + if (disconnection) { + _has_bits_[0] |= 0x00000020u; + } else { + _has_bits_[0] &= ~0x00000020u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:location.nearby.connections.V1Frame.disconnection) +} +inline ::location::nearby::connections::DisconnectionFrame* V1Frame::release_disconnection() { + _has_bits_[0] &= ~0x00000020u; + ::location::nearby::connections::DisconnectionFrame* temp = disconnection_; + disconnection_ = 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 ::location::nearby::connections::DisconnectionFrame* V1Frame::unsafe_arena_release_disconnection() { + // @@protoc_insertion_point(field_release:location.nearby.connections.V1Frame.disconnection) + _has_bits_[0] &= ~0x00000020u; + ::location::nearby::connections::DisconnectionFrame* temp = disconnection_; + disconnection_ = nullptr; + return temp; +} +inline ::location::nearby::connections::DisconnectionFrame* V1Frame::_internal_mutable_disconnection() { + _has_bits_[0] |= 0x00000020u; + if (disconnection_ == nullptr) { + auto* p = CreateMaybeMessage<::location::nearby::connections::DisconnectionFrame>(GetArenaForAllocation()); + disconnection_ = p; + } + return disconnection_; +} +inline ::location::nearby::connections::DisconnectionFrame* V1Frame::mutable_disconnection() { + ::location::nearby::connections::DisconnectionFrame* _msg = _internal_mutable_disconnection(); + // @@protoc_insertion_point(field_mutable:location.nearby.connections.V1Frame.disconnection) + return _msg; +} +inline void V1Frame::set_allocated_disconnection(::location::nearby::connections::DisconnectionFrame* disconnection) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete disconnection_; + } + if (disconnection) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::location::nearby::connections::DisconnectionFrame>::GetOwningArena(disconnection); + if (message_arena != submessage_arena) { + disconnection = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, disconnection, submessage_arena); + } + _has_bits_[0] |= 0x00000020u; + } else { + _has_bits_[0] &= ~0x00000020u; + } + disconnection_ = disconnection; + // @@protoc_insertion_point(field_set_allocated:location.nearby.connections.V1Frame.disconnection) +} + +// optional .location.nearby.connections.PairedKeyEncryptionFrame paired_key_encryption = 8; +inline bool V1Frame::_internal_has_paired_key_encryption() const { + bool value = (_has_bits_[0] & 0x00000040u) != 0; + PROTOBUF_ASSUME(!value || paired_key_encryption_ != nullptr); + return value; +} +inline bool V1Frame::has_paired_key_encryption() const { + return _internal_has_paired_key_encryption(); +} +inline void V1Frame::clear_paired_key_encryption() { + if (paired_key_encryption_ != nullptr) paired_key_encryption_->Clear(); + _has_bits_[0] &= ~0x00000040u; +} +inline const ::location::nearby::connections::PairedKeyEncryptionFrame& V1Frame::_internal_paired_key_encryption() const { + const ::location::nearby::connections::PairedKeyEncryptionFrame* p = paired_key_encryption_; + return p != nullptr ? *p : reinterpret_cast( + ::location::nearby::connections::_PairedKeyEncryptionFrame_default_instance_); +} +inline const ::location::nearby::connections::PairedKeyEncryptionFrame& V1Frame::paired_key_encryption() const { + // @@protoc_insertion_point(field_get:location.nearby.connections.V1Frame.paired_key_encryption) + return _internal_paired_key_encryption(); +} +inline void V1Frame::unsafe_arena_set_allocated_paired_key_encryption( + ::location::nearby::connections::PairedKeyEncryptionFrame* paired_key_encryption) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(paired_key_encryption_); + } + paired_key_encryption_ = paired_key_encryption; + if (paired_key_encryption) { + _has_bits_[0] |= 0x00000040u; + } else { + _has_bits_[0] &= ~0x00000040u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:location.nearby.connections.V1Frame.paired_key_encryption) +} +inline ::location::nearby::connections::PairedKeyEncryptionFrame* V1Frame::release_paired_key_encryption() { + _has_bits_[0] &= ~0x00000040u; + ::location::nearby::connections::PairedKeyEncryptionFrame* temp = paired_key_encryption_; + paired_key_encryption_ = 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 ::location::nearby::connections::PairedKeyEncryptionFrame* V1Frame::unsafe_arena_release_paired_key_encryption() { + // @@protoc_insertion_point(field_release:location.nearby.connections.V1Frame.paired_key_encryption) + _has_bits_[0] &= ~0x00000040u; + ::location::nearby::connections::PairedKeyEncryptionFrame* temp = paired_key_encryption_; + paired_key_encryption_ = nullptr; + return temp; +} +inline ::location::nearby::connections::PairedKeyEncryptionFrame* V1Frame::_internal_mutable_paired_key_encryption() { + _has_bits_[0] |= 0x00000040u; + if (paired_key_encryption_ == nullptr) { + auto* p = CreateMaybeMessage<::location::nearby::connections::PairedKeyEncryptionFrame>(GetArenaForAllocation()); + paired_key_encryption_ = p; + } + return paired_key_encryption_; +} +inline ::location::nearby::connections::PairedKeyEncryptionFrame* V1Frame::mutable_paired_key_encryption() { + ::location::nearby::connections::PairedKeyEncryptionFrame* _msg = _internal_mutable_paired_key_encryption(); + // @@protoc_insertion_point(field_mutable:location.nearby.connections.V1Frame.paired_key_encryption) + return _msg; +} +inline void V1Frame::set_allocated_paired_key_encryption(::location::nearby::connections::PairedKeyEncryptionFrame* paired_key_encryption) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete paired_key_encryption_; + } + if (paired_key_encryption) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::location::nearby::connections::PairedKeyEncryptionFrame>::GetOwningArena(paired_key_encryption); + if (message_arena != submessage_arena) { + paired_key_encryption = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, paired_key_encryption, submessage_arena); + } + _has_bits_[0] |= 0x00000040u; + } else { + _has_bits_[0] &= ~0x00000040u; + } + paired_key_encryption_ = paired_key_encryption; + // @@protoc_insertion_point(field_set_allocated:location.nearby.connections.V1Frame.paired_key_encryption) +} + +// ------------------------------------------------------------------- + +// ConnectionRequestFrame + +// optional string endpoint_id = 1; +inline bool ConnectionRequestFrame::_internal_has_endpoint_id() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool ConnectionRequestFrame::has_endpoint_id() const { + return _internal_has_endpoint_id(); +} +inline void ConnectionRequestFrame::clear_endpoint_id() { + endpoint_id_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& ConnectionRequestFrame::endpoint_id() const { + // @@protoc_insertion_point(field_get:location.nearby.connections.ConnectionRequestFrame.endpoint_id) + return _internal_endpoint_id(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void ConnectionRequestFrame::set_endpoint_id(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + endpoint_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:location.nearby.connections.ConnectionRequestFrame.endpoint_id) +} +inline std::string* ConnectionRequestFrame::mutable_endpoint_id() { + std::string* _s = _internal_mutable_endpoint_id(); + // @@protoc_insertion_point(field_mutable:location.nearby.connections.ConnectionRequestFrame.endpoint_id) + return _s; +} +inline const std::string& ConnectionRequestFrame::_internal_endpoint_id() const { + return endpoint_id_.Get(); +} +inline void ConnectionRequestFrame::_internal_set_endpoint_id(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + endpoint_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* ConnectionRequestFrame::_internal_mutable_endpoint_id() { + _has_bits_[0] |= 0x00000001u; + return endpoint_id_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* ConnectionRequestFrame::release_endpoint_id() { + // @@protoc_insertion_point(field_release:location.nearby.connections.ConnectionRequestFrame.endpoint_id) + if (!_internal_has_endpoint_id()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = endpoint_id_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (endpoint_id_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + endpoint_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void ConnectionRequestFrame::set_allocated_endpoint_id(std::string* endpoint_id) { + if (endpoint_id != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + endpoint_id_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), endpoint_id, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (endpoint_id_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + endpoint_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:location.nearby.connections.ConnectionRequestFrame.endpoint_id) +} + +// optional string endpoint_name = 2; +inline bool ConnectionRequestFrame::_internal_has_endpoint_name() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool ConnectionRequestFrame::has_endpoint_name() const { + return _internal_has_endpoint_name(); +} +inline void ConnectionRequestFrame::clear_endpoint_name() { + endpoint_name_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000002u; +} +inline const std::string& ConnectionRequestFrame::endpoint_name() const { + // @@protoc_insertion_point(field_get:location.nearby.connections.ConnectionRequestFrame.endpoint_name) + return _internal_endpoint_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void ConnectionRequestFrame::set_endpoint_name(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000002u; + endpoint_name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:location.nearby.connections.ConnectionRequestFrame.endpoint_name) +} +inline std::string* ConnectionRequestFrame::mutable_endpoint_name() { + std::string* _s = _internal_mutable_endpoint_name(); + // @@protoc_insertion_point(field_mutable:location.nearby.connections.ConnectionRequestFrame.endpoint_name) + return _s; +} +inline const std::string& ConnectionRequestFrame::_internal_endpoint_name() const { + return endpoint_name_.Get(); +} +inline void ConnectionRequestFrame::_internal_set_endpoint_name(const std::string& value) { + _has_bits_[0] |= 0x00000002u; + endpoint_name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* ConnectionRequestFrame::_internal_mutable_endpoint_name() { + _has_bits_[0] |= 0x00000002u; + return endpoint_name_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* ConnectionRequestFrame::release_endpoint_name() { + // @@protoc_insertion_point(field_release:location.nearby.connections.ConnectionRequestFrame.endpoint_name) + if (!_internal_has_endpoint_name()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000002u; + auto* p = endpoint_name_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (endpoint_name_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + endpoint_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void ConnectionRequestFrame::set_allocated_endpoint_name(std::string* endpoint_name) { + if (endpoint_name != nullptr) { + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + endpoint_name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), endpoint_name, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (endpoint_name_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + endpoint_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:location.nearby.connections.ConnectionRequestFrame.endpoint_name) +} + +// optional bytes handshake_data = 3; +inline bool ConnectionRequestFrame::_internal_has_handshake_data() const { + bool value = (_has_bits_[0] & 0x00000004u) != 0; + return value; +} +inline bool ConnectionRequestFrame::has_handshake_data() const { + return _internal_has_handshake_data(); +} +inline void ConnectionRequestFrame::clear_handshake_data() { + handshake_data_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000004u; +} +inline const std::string& ConnectionRequestFrame::handshake_data() const { + // @@protoc_insertion_point(field_get:location.nearby.connections.ConnectionRequestFrame.handshake_data) + return _internal_handshake_data(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void ConnectionRequestFrame::set_handshake_data(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000004u; + handshake_data_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:location.nearby.connections.ConnectionRequestFrame.handshake_data) +} +inline std::string* ConnectionRequestFrame::mutable_handshake_data() { + std::string* _s = _internal_mutable_handshake_data(); + // @@protoc_insertion_point(field_mutable:location.nearby.connections.ConnectionRequestFrame.handshake_data) + return _s; +} +inline const std::string& ConnectionRequestFrame::_internal_handshake_data() const { + return handshake_data_.Get(); +} +inline void ConnectionRequestFrame::_internal_set_handshake_data(const std::string& value) { + _has_bits_[0] |= 0x00000004u; + handshake_data_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* ConnectionRequestFrame::_internal_mutable_handshake_data() { + _has_bits_[0] |= 0x00000004u; + return handshake_data_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* ConnectionRequestFrame::release_handshake_data() { + // @@protoc_insertion_point(field_release:location.nearby.connections.ConnectionRequestFrame.handshake_data) + if (!_internal_has_handshake_data()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000004u; + auto* p = handshake_data_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (handshake_data_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + handshake_data_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void ConnectionRequestFrame::set_allocated_handshake_data(std::string* handshake_data) { + if (handshake_data != nullptr) { + _has_bits_[0] |= 0x00000004u; + } else { + _has_bits_[0] &= ~0x00000004u; + } + handshake_data_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), handshake_data, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (handshake_data_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + handshake_data_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:location.nearby.connections.ConnectionRequestFrame.handshake_data) +} + +// optional int32 nonce = 4; +inline bool ConnectionRequestFrame::_internal_has_nonce() const { + bool value = (_has_bits_[0] & 0x00000040u) != 0; + return value; +} +inline bool ConnectionRequestFrame::has_nonce() const { + return _internal_has_nonce(); +} +inline void ConnectionRequestFrame::clear_nonce() { + nonce_ = 0; + _has_bits_[0] &= ~0x00000040u; +} +inline int32_t ConnectionRequestFrame::_internal_nonce() const { + return nonce_; +} +inline int32_t ConnectionRequestFrame::nonce() const { + // @@protoc_insertion_point(field_get:location.nearby.connections.ConnectionRequestFrame.nonce) + return _internal_nonce(); +} +inline void ConnectionRequestFrame::_internal_set_nonce(int32_t value) { + _has_bits_[0] |= 0x00000040u; + nonce_ = value; +} +inline void ConnectionRequestFrame::set_nonce(int32_t value) { + _internal_set_nonce(value); + // @@protoc_insertion_point(field_set:location.nearby.connections.ConnectionRequestFrame.nonce) +} + +// repeated .location.nearby.connections.ConnectionRequestFrame.Medium mediums = 5; +inline int ConnectionRequestFrame::_internal_mediums_size() const { + return mediums_.size(); +} +inline int ConnectionRequestFrame::mediums_size() const { + return _internal_mediums_size(); +} +inline void ConnectionRequestFrame::clear_mediums() { + mediums_.Clear(); +} +inline ::location::nearby::connections::ConnectionRequestFrame_Medium ConnectionRequestFrame::_internal_mediums(int index) const { + return static_cast< ::location::nearby::connections::ConnectionRequestFrame_Medium >(mediums_.Get(index)); +} +inline ::location::nearby::connections::ConnectionRequestFrame_Medium ConnectionRequestFrame::mediums(int index) const { + // @@protoc_insertion_point(field_get:location.nearby.connections.ConnectionRequestFrame.mediums) + return _internal_mediums(index); +} +inline void ConnectionRequestFrame::set_mediums(int index, ::location::nearby::connections::ConnectionRequestFrame_Medium value) { + assert(::location::nearby::connections::ConnectionRequestFrame_Medium_IsValid(value)); + mediums_.Set(index, value); + // @@protoc_insertion_point(field_set:location.nearby.connections.ConnectionRequestFrame.mediums) +} +inline void ConnectionRequestFrame::_internal_add_mediums(::location::nearby::connections::ConnectionRequestFrame_Medium value) { + assert(::location::nearby::connections::ConnectionRequestFrame_Medium_IsValid(value)); + mediums_.Add(value); +} +inline void ConnectionRequestFrame::add_mediums(::location::nearby::connections::ConnectionRequestFrame_Medium value) { + _internal_add_mediums(value); + // @@protoc_insertion_point(field_add:location.nearby.connections.ConnectionRequestFrame.mediums) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField& +ConnectionRequestFrame::mediums() const { + // @@protoc_insertion_point(field_list:location.nearby.connections.ConnectionRequestFrame.mediums) + return mediums_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField* +ConnectionRequestFrame::_internal_mutable_mediums() { + return &mediums_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField* +ConnectionRequestFrame::mutable_mediums() { + // @@protoc_insertion_point(field_mutable_list:location.nearby.connections.ConnectionRequestFrame.mediums) + return _internal_mutable_mediums(); +} + +// optional bytes endpoint_info = 6; +inline bool ConnectionRequestFrame::_internal_has_endpoint_info() const { + bool value = (_has_bits_[0] & 0x00000008u) != 0; + return value; +} +inline bool ConnectionRequestFrame::has_endpoint_info() const { + return _internal_has_endpoint_info(); +} +inline void ConnectionRequestFrame::clear_endpoint_info() { + endpoint_info_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000008u; +} +inline const std::string& ConnectionRequestFrame::endpoint_info() const { + // @@protoc_insertion_point(field_get:location.nearby.connections.ConnectionRequestFrame.endpoint_info) + return _internal_endpoint_info(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void ConnectionRequestFrame::set_endpoint_info(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000008u; + endpoint_info_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:location.nearby.connections.ConnectionRequestFrame.endpoint_info) +} +inline std::string* ConnectionRequestFrame::mutable_endpoint_info() { + std::string* _s = _internal_mutable_endpoint_info(); + // @@protoc_insertion_point(field_mutable:location.nearby.connections.ConnectionRequestFrame.endpoint_info) + return _s; +} +inline const std::string& ConnectionRequestFrame::_internal_endpoint_info() const { + return endpoint_info_.Get(); +} +inline void ConnectionRequestFrame::_internal_set_endpoint_info(const std::string& value) { + _has_bits_[0] |= 0x00000008u; + endpoint_info_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* ConnectionRequestFrame::_internal_mutable_endpoint_info() { + _has_bits_[0] |= 0x00000008u; + return endpoint_info_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* ConnectionRequestFrame::release_endpoint_info() { + // @@protoc_insertion_point(field_release:location.nearby.connections.ConnectionRequestFrame.endpoint_info) + if (!_internal_has_endpoint_info()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000008u; + auto* p = endpoint_info_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (endpoint_info_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + endpoint_info_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void ConnectionRequestFrame::set_allocated_endpoint_info(std::string* endpoint_info) { + if (endpoint_info != nullptr) { + _has_bits_[0] |= 0x00000008u; + } else { + _has_bits_[0] &= ~0x00000008u; + } + endpoint_info_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), endpoint_info, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (endpoint_info_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + endpoint_info_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:location.nearby.connections.ConnectionRequestFrame.endpoint_info) +} + +// optional .location.nearby.connections.MediumMetadata medium_metadata = 7; +inline bool ConnectionRequestFrame::_internal_has_medium_metadata() const { + bool value = (_has_bits_[0] & 0x00000020u) != 0; + PROTOBUF_ASSUME(!value || medium_metadata_ != nullptr); + return value; +} +inline bool ConnectionRequestFrame::has_medium_metadata() const { + return _internal_has_medium_metadata(); +} +inline void ConnectionRequestFrame::clear_medium_metadata() { + if (medium_metadata_ != nullptr) medium_metadata_->Clear(); + _has_bits_[0] &= ~0x00000020u; +} +inline const ::location::nearby::connections::MediumMetadata& ConnectionRequestFrame::_internal_medium_metadata() const { + const ::location::nearby::connections::MediumMetadata* p = medium_metadata_; + return p != nullptr ? *p : reinterpret_cast( + ::location::nearby::connections::_MediumMetadata_default_instance_); +} +inline const ::location::nearby::connections::MediumMetadata& ConnectionRequestFrame::medium_metadata() const { + // @@protoc_insertion_point(field_get:location.nearby.connections.ConnectionRequestFrame.medium_metadata) + return _internal_medium_metadata(); +} +inline void ConnectionRequestFrame::unsafe_arena_set_allocated_medium_metadata( + ::location::nearby::connections::MediumMetadata* medium_metadata) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(medium_metadata_); + } + medium_metadata_ = medium_metadata; + if (medium_metadata) { + _has_bits_[0] |= 0x00000020u; + } else { + _has_bits_[0] &= ~0x00000020u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:location.nearby.connections.ConnectionRequestFrame.medium_metadata) +} +inline ::location::nearby::connections::MediumMetadata* ConnectionRequestFrame::release_medium_metadata() { + _has_bits_[0] &= ~0x00000020u; + ::location::nearby::connections::MediumMetadata* temp = medium_metadata_; + medium_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 ::location::nearby::connections::MediumMetadata* ConnectionRequestFrame::unsafe_arena_release_medium_metadata() { + // @@protoc_insertion_point(field_release:location.nearby.connections.ConnectionRequestFrame.medium_metadata) + _has_bits_[0] &= ~0x00000020u; + ::location::nearby::connections::MediumMetadata* temp = medium_metadata_; + medium_metadata_ = nullptr; + return temp; +} +inline ::location::nearby::connections::MediumMetadata* ConnectionRequestFrame::_internal_mutable_medium_metadata() { + _has_bits_[0] |= 0x00000020u; + if (medium_metadata_ == nullptr) { + auto* p = CreateMaybeMessage<::location::nearby::connections::MediumMetadata>(GetArenaForAllocation()); + medium_metadata_ = p; + } + return medium_metadata_; +} +inline ::location::nearby::connections::MediumMetadata* ConnectionRequestFrame::mutable_medium_metadata() { + ::location::nearby::connections::MediumMetadata* _msg = _internal_mutable_medium_metadata(); + // @@protoc_insertion_point(field_mutable:location.nearby.connections.ConnectionRequestFrame.medium_metadata) + return _msg; +} +inline void ConnectionRequestFrame::set_allocated_medium_metadata(::location::nearby::connections::MediumMetadata* medium_metadata) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete medium_metadata_; + } + if (medium_metadata) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::location::nearby::connections::MediumMetadata>::GetOwningArena(medium_metadata); + if (message_arena != submessage_arena) { + medium_metadata = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, medium_metadata, submessage_arena); + } + _has_bits_[0] |= 0x00000020u; + } else { + _has_bits_[0] &= ~0x00000020u; + } + medium_metadata_ = medium_metadata; + // @@protoc_insertion_point(field_set_allocated:location.nearby.connections.ConnectionRequestFrame.medium_metadata) +} + +// optional int32 keep_alive_interval_millis = 8; +inline bool ConnectionRequestFrame::_internal_has_keep_alive_interval_millis() const { + bool value = (_has_bits_[0] & 0x00000080u) != 0; + return value; +} +inline bool ConnectionRequestFrame::has_keep_alive_interval_millis() const { + return _internal_has_keep_alive_interval_millis(); +} +inline void ConnectionRequestFrame::clear_keep_alive_interval_millis() { + keep_alive_interval_millis_ = 0; + _has_bits_[0] &= ~0x00000080u; +} +inline int32_t ConnectionRequestFrame::_internal_keep_alive_interval_millis() const { + return keep_alive_interval_millis_; +} +inline int32_t ConnectionRequestFrame::keep_alive_interval_millis() const { + // @@protoc_insertion_point(field_get:location.nearby.connections.ConnectionRequestFrame.keep_alive_interval_millis) + return _internal_keep_alive_interval_millis(); +} +inline void ConnectionRequestFrame::_internal_set_keep_alive_interval_millis(int32_t value) { + _has_bits_[0] |= 0x00000080u; + keep_alive_interval_millis_ = value; +} +inline void ConnectionRequestFrame::set_keep_alive_interval_millis(int32_t value) { + _internal_set_keep_alive_interval_millis(value); + // @@protoc_insertion_point(field_set:location.nearby.connections.ConnectionRequestFrame.keep_alive_interval_millis) +} + +// optional int32 keep_alive_timeout_millis = 9; +inline bool ConnectionRequestFrame::_internal_has_keep_alive_timeout_millis() const { + bool value = (_has_bits_[0] & 0x00000100u) != 0; + return value; +} +inline bool ConnectionRequestFrame::has_keep_alive_timeout_millis() const { + return _internal_has_keep_alive_timeout_millis(); +} +inline void ConnectionRequestFrame::clear_keep_alive_timeout_millis() { + keep_alive_timeout_millis_ = 0; + _has_bits_[0] &= ~0x00000100u; +} +inline int32_t ConnectionRequestFrame::_internal_keep_alive_timeout_millis() const { + return keep_alive_timeout_millis_; +} +inline int32_t ConnectionRequestFrame::keep_alive_timeout_millis() const { + // @@protoc_insertion_point(field_get:location.nearby.connections.ConnectionRequestFrame.keep_alive_timeout_millis) + return _internal_keep_alive_timeout_millis(); +} +inline void ConnectionRequestFrame::_internal_set_keep_alive_timeout_millis(int32_t value) { + _has_bits_[0] |= 0x00000100u; + keep_alive_timeout_millis_ = value; +} +inline void ConnectionRequestFrame::set_keep_alive_timeout_millis(int32_t value) { + _internal_set_keep_alive_timeout_millis(value); + // @@protoc_insertion_point(field_set:location.nearby.connections.ConnectionRequestFrame.keep_alive_timeout_millis) +} + +// optional int32 device_type = 10 [default = 0]; +inline bool ConnectionRequestFrame::_internal_has_device_type() const { + bool value = (_has_bits_[0] & 0x00000200u) != 0; + return value; +} +inline bool ConnectionRequestFrame::has_device_type() const { + return _internal_has_device_type(); +} +inline void ConnectionRequestFrame::clear_device_type() { + device_type_ = 0; + _has_bits_[0] &= ~0x00000200u; +} +inline int32_t ConnectionRequestFrame::_internal_device_type() const { + return device_type_; +} +inline int32_t ConnectionRequestFrame::device_type() const { + // @@protoc_insertion_point(field_get:location.nearby.connections.ConnectionRequestFrame.device_type) + return _internal_device_type(); +} +inline void ConnectionRequestFrame::_internal_set_device_type(int32_t value) { + _has_bits_[0] |= 0x00000200u; + device_type_ = value; +} +inline void ConnectionRequestFrame::set_device_type(int32_t value) { + _internal_set_device_type(value); + // @@protoc_insertion_point(field_set:location.nearby.connections.ConnectionRequestFrame.device_type) +} + +// optional bytes device_info = 11; +inline bool ConnectionRequestFrame::_internal_has_device_info() const { + bool value = (_has_bits_[0] & 0x00000010u) != 0; + return value; +} +inline bool ConnectionRequestFrame::has_device_info() const { + return _internal_has_device_info(); +} +inline void ConnectionRequestFrame::clear_device_info() { + device_info_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000010u; +} +inline const std::string& ConnectionRequestFrame::device_info() const { + // @@protoc_insertion_point(field_get:location.nearby.connections.ConnectionRequestFrame.device_info) + return _internal_device_info(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void ConnectionRequestFrame::set_device_info(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000010u; + device_info_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:location.nearby.connections.ConnectionRequestFrame.device_info) +} +inline std::string* ConnectionRequestFrame::mutable_device_info() { + std::string* _s = _internal_mutable_device_info(); + // @@protoc_insertion_point(field_mutable:location.nearby.connections.ConnectionRequestFrame.device_info) + return _s; +} +inline const std::string& ConnectionRequestFrame::_internal_device_info() const { + return device_info_.Get(); +} +inline void ConnectionRequestFrame::_internal_set_device_info(const std::string& value) { + _has_bits_[0] |= 0x00000010u; + device_info_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* ConnectionRequestFrame::_internal_mutable_device_info() { + _has_bits_[0] |= 0x00000010u; + return device_info_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* ConnectionRequestFrame::release_device_info() { + // @@protoc_insertion_point(field_release:location.nearby.connections.ConnectionRequestFrame.device_info) + if (!_internal_has_device_info()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000010u; + auto* p = device_info_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (device_info_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + device_info_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void ConnectionRequestFrame::set_allocated_device_info(std::string* device_info) { + if (device_info != nullptr) { + _has_bits_[0] |= 0x00000010u; + } else { + _has_bits_[0] &= ~0x00000010u; + } + device_info_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), device_info, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (device_info_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + device_info_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:location.nearby.connections.ConnectionRequestFrame.device_info) +} + +// ------------------------------------------------------------------- + +// ConnectionResponseFrame + +// optional int32 status = 1 [deprecated = true]; +inline bool ConnectionResponseFrame::_internal_has_status() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool ConnectionResponseFrame::has_status() const { + return _internal_has_status(); +} +inline void ConnectionResponseFrame::clear_status() { + status_ = 0; + _has_bits_[0] &= ~0x00000002u; +} +inline int32_t ConnectionResponseFrame::_internal_status() const { + return status_; +} +inline int32_t ConnectionResponseFrame::status() const { + // @@protoc_insertion_point(field_get:location.nearby.connections.ConnectionResponseFrame.status) + return _internal_status(); +} +inline void ConnectionResponseFrame::_internal_set_status(int32_t value) { + _has_bits_[0] |= 0x00000002u; + status_ = value; +} +inline void ConnectionResponseFrame::set_status(int32_t value) { + _internal_set_status(value); + // @@protoc_insertion_point(field_set:location.nearby.connections.ConnectionResponseFrame.status) +} + +// optional bytes handshake_data = 2; +inline bool ConnectionResponseFrame::_internal_has_handshake_data() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool ConnectionResponseFrame::has_handshake_data() const { + return _internal_has_handshake_data(); +} +inline void ConnectionResponseFrame::clear_handshake_data() { + handshake_data_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& ConnectionResponseFrame::handshake_data() const { + // @@protoc_insertion_point(field_get:location.nearby.connections.ConnectionResponseFrame.handshake_data) + return _internal_handshake_data(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void ConnectionResponseFrame::set_handshake_data(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + handshake_data_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:location.nearby.connections.ConnectionResponseFrame.handshake_data) +} +inline std::string* ConnectionResponseFrame::mutable_handshake_data() { + std::string* _s = _internal_mutable_handshake_data(); + // @@protoc_insertion_point(field_mutable:location.nearby.connections.ConnectionResponseFrame.handshake_data) + return _s; +} +inline const std::string& ConnectionResponseFrame::_internal_handshake_data() const { + return handshake_data_.Get(); +} +inline void ConnectionResponseFrame::_internal_set_handshake_data(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + handshake_data_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* ConnectionResponseFrame::_internal_mutable_handshake_data() { + _has_bits_[0] |= 0x00000001u; + return handshake_data_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* ConnectionResponseFrame::release_handshake_data() { + // @@protoc_insertion_point(field_release:location.nearby.connections.ConnectionResponseFrame.handshake_data) + if (!_internal_has_handshake_data()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = handshake_data_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (handshake_data_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + handshake_data_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void ConnectionResponseFrame::set_allocated_handshake_data(std::string* handshake_data) { + if (handshake_data != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + handshake_data_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), handshake_data, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (handshake_data_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + handshake_data_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:location.nearby.connections.ConnectionResponseFrame.handshake_data) +} + +// optional .location.nearby.connections.ConnectionResponseFrame.ResponseStatus response = 3; +inline bool ConnectionResponseFrame::_internal_has_response() const { + bool value = (_has_bits_[0] & 0x00000004u) != 0; + return value; +} +inline bool ConnectionResponseFrame::has_response() const { + return _internal_has_response(); +} +inline void ConnectionResponseFrame::clear_response() { + response_ = 0; + _has_bits_[0] &= ~0x00000004u; +} +inline ::location::nearby::connections::ConnectionResponseFrame_ResponseStatus ConnectionResponseFrame::_internal_response() const { + return static_cast< ::location::nearby::connections::ConnectionResponseFrame_ResponseStatus >(response_); +} +inline ::location::nearby::connections::ConnectionResponseFrame_ResponseStatus ConnectionResponseFrame::response() const { + // @@protoc_insertion_point(field_get:location.nearby.connections.ConnectionResponseFrame.response) + return _internal_response(); +} +inline void ConnectionResponseFrame::_internal_set_response(::location::nearby::connections::ConnectionResponseFrame_ResponseStatus value) { + assert(::location::nearby::connections::ConnectionResponseFrame_ResponseStatus_IsValid(value)); + _has_bits_[0] |= 0x00000004u; + response_ = value; +} +inline void ConnectionResponseFrame::set_response(::location::nearby::connections::ConnectionResponseFrame_ResponseStatus value) { + _internal_set_response(value); + // @@protoc_insertion_point(field_set:location.nearby.connections.ConnectionResponseFrame.response) +} + +// ------------------------------------------------------------------- + +// PayloadTransferFrame_PayloadHeader + +// optional int64 id = 1; +inline bool PayloadTransferFrame_PayloadHeader::_internal_has_id() const { + bool value = (_has_bits_[0] & 0x00000004u) != 0; + return value; +} +inline bool PayloadTransferFrame_PayloadHeader::has_id() const { + return _internal_has_id(); +} +inline void PayloadTransferFrame_PayloadHeader::clear_id() { + id_ = int64_t{0}; + _has_bits_[0] &= ~0x00000004u; +} +inline int64_t PayloadTransferFrame_PayloadHeader::_internal_id() const { + return id_; +} +inline int64_t PayloadTransferFrame_PayloadHeader::id() const { + // @@protoc_insertion_point(field_get:location.nearby.connections.PayloadTransferFrame.PayloadHeader.id) + return _internal_id(); +} +inline void PayloadTransferFrame_PayloadHeader::_internal_set_id(int64_t value) { + _has_bits_[0] |= 0x00000004u; + id_ = value; +} +inline void PayloadTransferFrame_PayloadHeader::set_id(int64_t value) { + _internal_set_id(value); + // @@protoc_insertion_point(field_set:location.nearby.connections.PayloadTransferFrame.PayloadHeader.id) +} + +// optional .location.nearby.connections.PayloadTransferFrame.PayloadHeader.PayloadType type = 2; +inline bool PayloadTransferFrame_PayloadHeader::_internal_has_type() const { + bool value = (_has_bits_[0] & 0x00000010u) != 0; + return value; +} +inline bool PayloadTransferFrame_PayloadHeader::has_type() const { + return _internal_has_type(); +} +inline void PayloadTransferFrame_PayloadHeader::clear_type() { + type_ = 0; + _has_bits_[0] &= ~0x00000010u; +} +inline ::location::nearby::connections::PayloadTransferFrame_PayloadHeader_PayloadType PayloadTransferFrame_PayloadHeader::_internal_type() const { + return static_cast< ::location::nearby::connections::PayloadTransferFrame_PayloadHeader_PayloadType >(type_); +} +inline ::location::nearby::connections::PayloadTransferFrame_PayloadHeader_PayloadType PayloadTransferFrame_PayloadHeader::type() const { + // @@protoc_insertion_point(field_get:location.nearby.connections.PayloadTransferFrame.PayloadHeader.type) + return _internal_type(); +} +inline void PayloadTransferFrame_PayloadHeader::_internal_set_type(::location::nearby::connections::PayloadTransferFrame_PayloadHeader_PayloadType value) { + assert(::location::nearby::connections::PayloadTransferFrame_PayloadHeader_PayloadType_IsValid(value)); + _has_bits_[0] |= 0x00000010u; + type_ = value; +} +inline void PayloadTransferFrame_PayloadHeader::set_type(::location::nearby::connections::PayloadTransferFrame_PayloadHeader_PayloadType value) { + _internal_set_type(value); + // @@protoc_insertion_point(field_set:location.nearby.connections.PayloadTransferFrame.PayloadHeader.type) +} + +// optional int64 total_size = 3; +inline bool PayloadTransferFrame_PayloadHeader::_internal_has_total_size() const { + bool value = (_has_bits_[0] & 0x00000008u) != 0; + return value; +} +inline bool PayloadTransferFrame_PayloadHeader::has_total_size() const { + return _internal_has_total_size(); +} +inline void PayloadTransferFrame_PayloadHeader::clear_total_size() { + total_size_ = int64_t{0}; + _has_bits_[0] &= ~0x00000008u; +} +inline int64_t PayloadTransferFrame_PayloadHeader::_internal_total_size() const { + return total_size_; +} +inline int64_t PayloadTransferFrame_PayloadHeader::total_size() const { + // @@protoc_insertion_point(field_get:location.nearby.connections.PayloadTransferFrame.PayloadHeader.total_size) + return _internal_total_size(); +} +inline void PayloadTransferFrame_PayloadHeader::_internal_set_total_size(int64_t value) { + _has_bits_[0] |= 0x00000008u; + total_size_ = value; +} +inline void PayloadTransferFrame_PayloadHeader::set_total_size(int64_t value) { + _internal_set_total_size(value); + // @@protoc_insertion_point(field_set:location.nearby.connections.PayloadTransferFrame.PayloadHeader.total_size) +} + +// optional bool is_sensitive = 4; +inline bool PayloadTransferFrame_PayloadHeader::_internal_has_is_sensitive() const { + bool value = (_has_bits_[0] & 0x00000020u) != 0; + return value; +} +inline bool PayloadTransferFrame_PayloadHeader::has_is_sensitive() const { + return _internal_has_is_sensitive(); +} +inline void PayloadTransferFrame_PayloadHeader::clear_is_sensitive() { + is_sensitive_ = false; + _has_bits_[0] &= ~0x00000020u; +} +inline bool PayloadTransferFrame_PayloadHeader::_internal_is_sensitive() const { + return is_sensitive_; +} +inline bool PayloadTransferFrame_PayloadHeader::is_sensitive() const { + // @@protoc_insertion_point(field_get:location.nearby.connections.PayloadTransferFrame.PayloadHeader.is_sensitive) + return _internal_is_sensitive(); +} +inline void PayloadTransferFrame_PayloadHeader::_internal_set_is_sensitive(bool value) { + _has_bits_[0] |= 0x00000020u; + is_sensitive_ = value; +} +inline void PayloadTransferFrame_PayloadHeader::set_is_sensitive(bool value) { + _internal_set_is_sensitive(value); + // @@protoc_insertion_point(field_set:location.nearby.connections.PayloadTransferFrame.PayloadHeader.is_sensitive) +} + +// optional string file_name = 5; +inline bool PayloadTransferFrame_PayloadHeader::_internal_has_file_name() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool PayloadTransferFrame_PayloadHeader::has_file_name() const { + return _internal_has_file_name(); +} +inline void PayloadTransferFrame_PayloadHeader::clear_file_name() { + file_name_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& PayloadTransferFrame_PayloadHeader::file_name() const { + // @@protoc_insertion_point(field_get:location.nearby.connections.PayloadTransferFrame.PayloadHeader.file_name) + return _internal_file_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void PayloadTransferFrame_PayloadHeader::set_file_name(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + file_name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:location.nearby.connections.PayloadTransferFrame.PayloadHeader.file_name) +} +inline std::string* PayloadTransferFrame_PayloadHeader::mutable_file_name() { + std::string* _s = _internal_mutable_file_name(); + // @@protoc_insertion_point(field_mutable:location.nearby.connections.PayloadTransferFrame.PayloadHeader.file_name) + return _s; +} +inline const std::string& PayloadTransferFrame_PayloadHeader::_internal_file_name() const { + return file_name_.Get(); +} +inline void PayloadTransferFrame_PayloadHeader::_internal_set_file_name(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + file_name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* PayloadTransferFrame_PayloadHeader::_internal_mutable_file_name() { + _has_bits_[0] |= 0x00000001u; + return file_name_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* PayloadTransferFrame_PayloadHeader::release_file_name() { + // @@protoc_insertion_point(field_release:location.nearby.connections.PayloadTransferFrame.PayloadHeader.file_name) + if (!_internal_has_file_name()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = file_name_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (file_name_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + file_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void PayloadTransferFrame_PayloadHeader::set_allocated_file_name(std::string* file_name) { + if (file_name != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + file_name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), file_name, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (file_name_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + file_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:location.nearby.connections.PayloadTransferFrame.PayloadHeader.file_name) +} + +// optional string parent_folder = 6; +inline bool PayloadTransferFrame_PayloadHeader::_internal_has_parent_folder() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool PayloadTransferFrame_PayloadHeader::has_parent_folder() const { + return _internal_has_parent_folder(); +} +inline void PayloadTransferFrame_PayloadHeader::clear_parent_folder() { + parent_folder_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000002u; +} +inline const std::string& PayloadTransferFrame_PayloadHeader::parent_folder() const { + // @@protoc_insertion_point(field_get:location.nearby.connections.PayloadTransferFrame.PayloadHeader.parent_folder) + return _internal_parent_folder(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void PayloadTransferFrame_PayloadHeader::set_parent_folder(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000002u; + parent_folder_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:location.nearby.connections.PayloadTransferFrame.PayloadHeader.parent_folder) +} +inline std::string* PayloadTransferFrame_PayloadHeader::mutable_parent_folder() { + std::string* _s = _internal_mutable_parent_folder(); + // @@protoc_insertion_point(field_mutable:location.nearby.connections.PayloadTransferFrame.PayloadHeader.parent_folder) + return _s; +} +inline const std::string& PayloadTransferFrame_PayloadHeader::_internal_parent_folder() const { + return parent_folder_.Get(); +} +inline void PayloadTransferFrame_PayloadHeader::_internal_set_parent_folder(const std::string& value) { + _has_bits_[0] |= 0x00000002u; + parent_folder_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* PayloadTransferFrame_PayloadHeader::_internal_mutable_parent_folder() { + _has_bits_[0] |= 0x00000002u; + return parent_folder_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* PayloadTransferFrame_PayloadHeader::release_parent_folder() { + // @@protoc_insertion_point(field_release:location.nearby.connections.PayloadTransferFrame.PayloadHeader.parent_folder) + if (!_internal_has_parent_folder()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000002u; + auto* p = parent_folder_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (parent_folder_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + parent_folder_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void PayloadTransferFrame_PayloadHeader::set_allocated_parent_folder(std::string* parent_folder) { + if (parent_folder != nullptr) { + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + parent_folder_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), parent_folder, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (parent_folder_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + parent_folder_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:location.nearby.connections.PayloadTransferFrame.PayloadHeader.parent_folder) +} + +// ------------------------------------------------------------------- + +// PayloadTransferFrame_PayloadChunk + +// optional int32 flags = 1; +inline bool PayloadTransferFrame_PayloadChunk::_internal_has_flags() const { + bool value = (_has_bits_[0] & 0x00000004u) != 0; + return value; +} +inline bool PayloadTransferFrame_PayloadChunk::has_flags() const { + return _internal_has_flags(); +} +inline void PayloadTransferFrame_PayloadChunk::clear_flags() { + flags_ = 0; + _has_bits_[0] &= ~0x00000004u; +} +inline int32_t PayloadTransferFrame_PayloadChunk::_internal_flags() const { + return flags_; +} +inline int32_t PayloadTransferFrame_PayloadChunk::flags() const { + // @@protoc_insertion_point(field_get:location.nearby.connections.PayloadTransferFrame.PayloadChunk.flags) + return _internal_flags(); +} +inline void PayloadTransferFrame_PayloadChunk::_internal_set_flags(int32_t value) { + _has_bits_[0] |= 0x00000004u; + flags_ = value; +} +inline void PayloadTransferFrame_PayloadChunk::set_flags(int32_t value) { + _internal_set_flags(value); + // @@protoc_insertion_point(field_set:location.nearby.connections.PayloadTransferFrame.PayloadChunk.flags) +} + +// optional int64 offset = 2; +inline bool PayloadTransferFrame_PayloadChunk::_internal_has_offset() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool PayloadTransferFrame_PayloadChunk::has_offset() const { + return _internal_has_offset(); +} +inline void PayloadTransferFrame_PayloadChunk::clear_offset() { + offset_ = int64_t{0}; + _has_bits_[0] &= ~0x00000002u; +} +inline int64_t PayloadTransferFrame_PayloadChunk::_internal_offset() const { + return offset_; +} +inline int64_t PayloadTransferFrame_PayloadChunk::offset() const { + // @@protoc_insertion_point(field_get:location.nearby.connections.PayloadTransferFrame.PayloadChunk.offset) + return _internal_offset(); +} +inline void PayloadTransferFrame_PayloadChunk::_internal_set_offset(int64_t value) { + _has_bits_[0] |= 0x00000002u; + offset_ = value; +} +inline void PayloadTransferFrame_PayloadChunk::set_offset(int64_t value) { + _internal_set_offset(value); + // @@protoc_insertion_point(field_set:location.nearby.connections.PayloadTransferFrame.PayloadChunk.offset) +} + +// optional bytes body = 3; +inline bool PayloadTransferFrame_PayloadChunk::_internal_has_body() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool PayloadTransferFrame_PayloadChunk::has_body() const { + return _internal_has_body(); +} +inline void PayloadTransferFrame_PayloadChunk::clear_body() { + body_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& PayloadTransferFrame_PayloadChunk::body() const { + // @@protoc_insertion_point(field_get:location.nearby.connections.PayloadTransferFrame.PayloadChunk.body) + return _internal_body(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void PayloadTransferFrame_PayloadChunk::set_body(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + body_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:location.nearby.connections.PayloadTransferFrame.PayloadChunk.body) +} +inline std::string* PayloadTransferFrame_PayloadChunk::mutable_body() { + std::string* _s = _internal_mutable_body(); + // @@protoc_insertion_point(field_mutable:location.nearby.connections.PayloadTransferFrame.PayloadChunk.body) + return _s; +} +inline const std::string& PayloadTransferFrame_PayloadChunk::_internal_body() const { + return body_.Get(); +} +inline void PayloadTransferFrame_PayloadChunk::_internal_set_body(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + body_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* PayloadTransferFrame_PayloadChunk::_internal_mutable_body() { + _has_bits_[0] |= 0x00000001u; + return body_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* PayloadTransferFrame_PayloadChunk::release_body() { + // @@protoc_insertion_point(field_release:location.nearby.connections.PayloadTransferFrame.PayloadChunk.body) + if (!_internal_has_body()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = body_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (body_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + body_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void PayloadTransferFrame_PayloadChunk::set_allocated_body(std::string* body) { + if (body != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + body_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), body, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (body_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + body_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:location.nearby.connections.PayloadTransferFrame.PayloadChunk.body) +} + +// ------------------------------------------------------------------- + +// PayloadTransferFrame_ControlMessage + +// optional .location.nearby.connections.PayloadTransferFrame.ControlMessage.EventType event = 1; +inline bool PayloadTransferFrame_ControlMessage::_internal_has_event() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool PayloadTransferFrame_ControlMessage::has_event() const { + return _internal_has_event(); +} +inline void PayloadTransferFrame_ControlMessage::clear_event() { + event_ = 0; + _has_bits_[0] &= ~0x00000002u; +} +inline ::location::nearby::connections::PayloadTransferFrame_ControlMessage_EventType PayloadTransferFrame_ControlMessage::_internal_event() const { + return static_cast< ::location::nearby::connections::PayloadTransferFrame_ControlMessage_EventType >(event_); +} +inline ::location::nearby::connections::PayloadTransferFrame_ControlMessage_EventType PayloadTransferFrame_ControlMessage::event() const { + // @@protoc_insertion_point(field_get:location.nearby.connections.PayloadTransferFrame.ControlMessage.event) + return _internal_event(); +} +inline void PayloadTransferFrame_ControlMessage::_internal_set_event(::location::nearby::connections::PayloadTransferFrame_ControlMessage_EventType value) { + assert(::location::nearby::connections::PayloadTransferFrame_ControlMessage_EventType_IsValid(value)); + _has_bits_[0] |= 0x00000002u; + event_ = value; +} +inline void PayloadTransferFrame_ControlMessage::set_event(::location::nearby::connections::PayloadTransferFrame_ControlMessage_EventType value) { + _internal_set_event(value); + // @@protoc_insertion_point(field_set:location.nearby.connections.PayloadTransferFrame.ControlMessage.event) +} + +// optional int64 offset = 2; +inline bool PayloadTransferFrame_ControlMessage::_internal_has_offset() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool PayloadTransferFrame_ControlMessage::has_offset() const { + return _internal_has_offset(); +} +inline void PayloadTransferFrame_ControlMessage::clear_offset() { + offset_ = int64_t{0}; + _has_bits_[0] &= ~0x00000001u; +} +inline int64_t PayloadTransferFrame_ControlMessage::_internal_offset() const { + return offset_; +} +inline int64_t PayloadTransferFrame_ControlMessage::offset() const { + // @@protoc_insertion_point(field_get:location.nearby.connections.PayloadTransferFrame.ControlMessage.offset) + return _internal_offset(); +} +inline void PayloadTransferFrame_ControlMessage::_internal_set_offset(int64_t value) { + _has_bits_[0] |= 0x00000001u; + offset_ = value; +} +inline void PayloadTransferFrame_ControlMessage::set_offset(int64_t value) { + _internal_set_offset(value); + // @@protoc_insertion_point(field_set:location.nearby.connections.PayloadTransferFrame.ControlMessage.offset) +} + +// ------------------------------------------------------------------- + +// PayloadTransferFrame + +// optional .location.nearby.connections.PayloadTransferFrame.PacketType packet_type = 1; +inline bool PayloadTransferFrame::_internal_has_packet_type() const { + bool value = (_has_bits_[0] & 0x00000008u) != 0; + return value; +} +inline bool PayloadTransferFrame::has_packet_type() const { + return _internal_has_packet_type(); +} +inline void PayloadTransferFrame::clear_packet_type() { + packet_type_ = 0; + _has_bits_[0] &= ~0x00000008u; +} +inline ::location::nearby::connections::PayloadTransferFrame_PacketType PayloadTransferFrame::_internal_packet_type() const { + return static_cast< ::location::nearby::connections::PayloadTransferFrame_PacketType >(packet_type_); +} +inline ::location::nearby::connections::PayloadTransferFrame_PacketType PayloadTransferFrame::packet_type() const { + // @@protoc_insertion_point(field_get:location.nearby.connections.PayloadTransferFrame.packet_type) + return _internal_packet_type(); +} +inline void PayloadTransferFrame::_internal_set_packet_type(::location::nearby::connections::PayloadTransferFrame_PacketType value) { + assert(::location::nearby::connections::PayloadTransferFrame_PacketType_IsValid(value)); + _has_bits_[0] |= 0x00000008u; + packet_type_ = value; +} +inline void PayloadTransferFrame::set_packet_type(::location::nearby::connections::PayloadTransferFrame_PacketType value) { + _internal_set_packet_type(value); + // @@protoc_insertion_point(field_set:location.nearby.connections.PayloadTransferFrame.packet_type) +} + +// optional .location.nearby.connections.PayloadTransferFrame.PayloadHeader payload_header = 2; +inline bool PayloadTransferFrame::_internal_has_payload_header() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + PROTOBUF_ASSUME(!value || payload_header_ != nullptr); + return value; +} +inline bool PayloadTransferFrame::has_payload_header() const { + return _internal_has_payload_header(); +} +inline void PayloadTransferFrame::clear_payload_header() { + if (payload_header_ != nullptr) payload_header_->Clear(); + _has_bits_[0] &= ~0x00000001u; +} +inline const ::location::nearby::connections::PayloadTransferFrame_PayloadHeader& PayloadTransferFrame::_internal_payload_header() const { + const ::location::nearby::connections::PayloadTransferFrame_PayloadHeader* p = payload_header_; + return p != nullptr ? *p : reinterpret_cast( + ::location::nearby::connections::_PayloadTransferFrame_PayloadHeader_default_instance_); +} +inline const ::location::nearby::connections::PayloadTransferFrame_PayloadHeader& PayloadTransferFrame::payload_header() const { + // @@protoc_insertion_point(field_get:location.nearby.connections.PayloadTransferFrame.payload_header) + return _internal_payload_header(); +} +inline void PayloadTransferFrame::unsafe_arena_set_allocated_payload_header( + ::location::nearby::connections::PayloadTransferFrame_PayloadHeader* payload_header) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(payload_header_); + } + payload_header_ = payload_header; + if (payload_header) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:location.nearby.connections.PayloadTransferFrame.payload_header) +} +inline ::location::nearby::connections::PayloadTransferFrame_PayloadHeader* PayloadTransferFrame::release_payload_header() { + _has_bits_[0] &= ~0x00000001u; + ::location::nearby::connections::PayloadTransferFrame_PayloadHeader* temp = payload_header_; + payload_header_ = 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 ::location::nearby::connections::PayloadTransferFrame_PayloadHeader* PayloadTransferFrame::unsafe_arena_release_payload_header() { + // @@protoc_insertion_point(field_release:location.nearby.connections.PayloadTransferFrame.payload_header) + _has_bits_[0] &= ~0x00000001u; + ::location::nearby::connections::PayloadTransferFrame_PayloadHeader* temp = payload_header_; + payload_header_ = nullptr; + return temp; +} +inline ::location::nearby::connections::PayloadTransferFrame_PayloadHeader* PayloadTransferFrame::_internal_mutable_payload_header() { + _has_bits_[0] |= 0x00000001u; + if (payload_header_ == nullptr) { + auto* p = CreateMaybeMessage<::location::nearby::connections::PayloadTransferFrame_PayloadHeader>(GetArenaForAllocation()); + payload_header_ = p; + } + return payload_header_; +} +inline ::location::nearby::connections::PayloadTransferFrame_PayloadHeader* PayloadTransferFrame::mutable_payload_header() { + ::location::nearby::connections::PayloadTransferFrame_PayloadHeader* _msg = _internal_mutable_payload_header(); + // @@protoc_insertion_point(field_mutable:location.nearby.connections.PayloadTransferFrame.payload_header) + return _msg; +} +inline void PayloadTransferFrame::set_allocated_payload_header(::location::nearby::connections::PayloadTransferFrame_PayloadHeader* payload_header) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete payload_header_; + } + if (payload_header) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::location::nearby::connections::PayloadTransferFrame_PayloadHeader>::GetOwningArena(payload_header); + if (message_arena != submessage_arena) { + payload_header = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, payload_header, submessage_arena); + } + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + payload_header_ = payload_header; + // @@protoc_insertion_point(field_set_allocated:location.nearby.connections.PayloadTransferFrame.payload_header) +} + +// optional .location.nearby.connections.PayloadTransferFrame.PayloadChunk payload_chunk = 3; +inline bool PayloadTransferFrame::_internal_has_payload_chunk() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + PROTOBUF_ASSUME(!value || payload_chunk_ != nullptr); + return value; +} +inline bool PayloadTransferFrame::has_payload_chunk() const { + return _internal_has_payload_chunk(); +} +inline void PayloadTransferFrame::clear_payload_chunk() { + if (payload_chunk_ != nullptr) payload_chunk_->Clear(); + _has_bits_[0] &= ~0x00000002u; +} +inline const ::location::nearby::connections::PayloadTransferFrame_PayloadChunk& PayloadTransferFrame::_internal_payload_chunk() const { + const ::location::nearby::connections::PayloadTransferFrame_PayloadChunk* p = payload_chunk_; + return p != nullptr ? *p : reinterpret_cast( + ::location::nearby::connections::_PayloadTransferFrame_PayloadChunk_default_instance_); +} +inline const ::location::nearby::connections::PayloadTransferFrame_PayloadChunk& PayloadTransferFrame::payload_chunk() const { + // @@protoc_insertion_point(field_get:location.nearby.connections.PayloadTransferFrame.payload_chunk) + return _internal_payload_chunk(); +} +inline void PayloadTransferFrame::unsafe_arena_set_allocated_payload_chunk( + ::location::nearby::connections::PayloadTransferFrame_PayloadChunk* payload_chunk) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(payload_chunk_); + } + payload_chunk_ = payload_chunk; + if (payload_chunk) { + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:location.nearby.connections.PayloadTransferFrame.payload_chunk) +} +inline ::location::nearby::connections::PayloadTransferFrame_PayloadChunk* PayloadTransferFrame::release_payload_chunk() { + _has_bits_[0] &= ~0x00000002u; + ::location::nearby::connections::PayloadTransferFrame_PayloadChunk* temp = payload_chunk_; + payload_chunk_ = 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 ::location::nearby::connections::PayloadTransferFrame_PayloadChunk* PayloadTransferFrame::unsafe_arena_release_payload_chunk() { + // @@protoc_insertion_point(field_release:location.nearby.connections.PayloadTransferFrame.payload_chunk) + _has_bits_[0] &= ~0x00000002u; + ::location::nearby::connections::PayloadTransferFrame_PayloadChunk* temp = payload_chunk_; + payload_chunk_ = nullptr; + return temp; +} +inline ::location::nearby::connections::PayloadTransferFrame_PayloadChunk* PayloadTransferFrame::_internal_mutable_payload_chunk() { + _has_bits_[0] |= 0x00000002u; + if (payload_chunk_ == nullptr) { + auto* p = CreateMaybeMessage<::location::nearby::connections::PayloadTransferFrame_PayloadChunk>(GetArenaForAllocation()); + payload_chunk_ = p; + } + return payload_chunk_; +} +inline ::location::nearby::connections::PayloadTransferFrame_PayloadChunk* PayloadTransferFrame::mutable_payload_chunk() { + ::location::nearby::connections::PayloadTransferFrame_PayloadChunk* _msg = _internal_mutable_payload_chunk(); + // @@protoc_insertion_point(field_mutable:location.nearby.connections.PayloadTransferFrame.payload_chunk) + return _msg; +} +inline void PayloadTransferFrame::set_allocated_payload_chunk(::location::nearby::connections::PayloadTransferFrame_PayloadChunk* payload_chunk) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete payload_chunk_; + } + if (payload_chunk) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::location::nearby::connections::PayloadTransferFrame_PayloadChunk>::GetOwningArena(payload_chunk); + if (message_arena != submessage_arena) { + payload_chunk = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, payload_chunk, submessage_arena); + } + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + payload_chunk_ = payload_chunk; + // @@protoc_insertion_point(field_set_allocated:location.nearby.connections.PayloadTransferFrame.payload_chunk) +} + +// optional .location.nearby.connections.PayloadTransferFrame.ControlMessage control_message = 4; +inline bool PayloadTransferFrame::_internal_has_control_message() const { + bool value = (_has_bits_[0] & 0x00000004u) != 0; + PROTOBUF_ASSUME(!value || control_message_ != nullptr); + return value; +} +inline bool PayloadTransferFrame::has_control_message() const { + return _internal_has_control_message(); +} +inline void PayloadTransferFrame::clear_control_message() { + if (control_message_ != nullptr) control_message_->Clear(); + _has_bits_[0] &= ~0x00000004u; +} +inline const ::location::nearby::connections::PayloadTransferFrame_ControlMessage& PayloadTransferFrame::_internal_control_message() const { + const ::location::nearby::connections::PayloadTransferFrame_ControlMessage* p = control_message_; + return p != nullptr ? *p : reinterpret_cast( + ::location::nearby::connections::_PayloadTransferFrame_ControlMessage_default_instance_); +} +inline const ::location::nearby::connections::PayloadTransferFrame_ControlMessage& PayloadTransferFrame::control_message() const { + // @@protoc_insertion_point(field_get:location.nearby.connections.PayloadTransferFrame.control_message) + return _internal_control_message(); +} +inline void PayloadTransferFrame::unsafe_arena_set_allocated_control_message( + ::location::nearby::connections::PayloadTransferFrame_ControlMessage* control_message) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(control_message_); + } + control_message_ = control_message; + if (control_message) { + _has_bits_[0] |= 0x00000004u; + } else { + _has_bits_[0] &= ~0x00000004u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:location.nearby.connections.PayloadTransferFrame.control_message) +} +inline ::location::nearby::connections::PayloadTransferFrame_ControlMessage* PayloadTransferFrame::release_control_message() { + _has_bits_[0] &= ~0x00000004u; + ::location::nearby::connections::PayloadTransferFrame_ControlMessage* temp = control_message_; + control_message_ = 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 ::location::nearby::connections::PayloadTransferFrame_ControlMessage* PayloadTransferFrame::unsafe_arena_release_control_message() { + // @@protoc_insertion_point(field_release:location.nearby.connections.PayloadTransferFrame.control_message) + _has_bits_[0] &= ~0x00000004u; + ::location::nearby::connections::PayloadTransferFrame_ControlMessage* temp = control_message_; + control_message_ = nullptr; + return temp; +} +inline ::location::nearby::connections::PayloadTransferFrame_ControlMessage* PayloadTransferFrame::_internal_mutable_control_message() { + _has_bits_[0] |= 0x00000004u; + if (control_message_ == nullptr) { + auto* p = CreateMaybeMessage<::location::nearby::connections::PayloadTransferFrame_ControlMessage>(GetArenaForAllocation()); + control_message_ = p; + } + return control_message_; +} +inline ::location::nearby::connections::PayloadTransferFrame_ControlMessage* PayloadTransferFrame::mutable_control_message() { + ::location::nearby::connections::PayloadTransferFrame_ControlMessage* _msg = _internal_mutable_control_message(); + // @@protoc_insertion_point(field_mutable:location.nearby.connections.PayloadTransferFrame.control_message) + return _msg; +} +inline void PayloadTransferFrame::set_allocated_control_message(::location::nearby::connections::PayloadTransferFrame_ControlMessage* control_message) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete control_message_; + } + if (control_message) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::location::nearby::connections::PayloadTransferFrame_ControlMessage>::GetOwningArena(control_message); + if (message_arena != submessage_arena) { + control_message = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, control_message, submessage_arena); + } + _has_bits_[0] |= 0x00000004u; + } else { + _has_bits_[0] &= ~0x00000004u; + } + control_message_ = control_message; + // @@protoc_insertion_point(field_set_allocated:location.nearby.connections.PayloadTransferFrame.control_message) +} + +// ------------------------------------------------------------------- + +// BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials + +// optional string ssid = 1; +inline bool BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials::_internal_has_ssid() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials::has_ssid() const { + return _internal_has_ssid(); +} +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials::clear_ssid() { + ssid_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials::ssid() const { + // @@protoc_insertion_point(field_get:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiHotspotCredentials.ssid) + return _internal_ssid(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials::set_ssid(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + ssid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiHotspotCredentials.ssid) +} +inline std::string* BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials::mutable_ssid() { + std::string* _s = _internal_mutable_ssid(); + // @@protoc_insertion_point(field_mutable:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiHotspotCredentials.ssid) + return _s; +} +inline const std::string& BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials::_internal_ssid() const { + return ssid_.Get(); +} +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials::_internal_set_ssid(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + ssid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials::_internal_mutable_ssid() { + _has_bits_[0] |= 0x00000001u; + return ssid_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials::release_ssid() { + // @@protoc_insertion_point(field_release:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiHotspotCredentials.ssid) + if (!_internal_has_ssid()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = ssid_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (ssid_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + ssid_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials::set_allocated_ssid(std::string* ssid) { + if (ssid != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + ssid_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ssid, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (ssid_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + ssid_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiHotspotCredentials.ssid) +} + +// optional string password = 2; +inline bool BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials::_internal_has_password() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials::has_password() const { + return _internal_has_password(); +} +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials::clear_password() { + password_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000002u; +} +inline const std::string& BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials::password() const { + // @@protoc_insertion_point(field_get:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiHotspotCredentials.password) + return _internal_password(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials::set_password(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000002u; + password_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiHotspotCredentials.password) +} +inline std::string* BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials::mutable_password() { + std::string* _s = _internal_mutable_password(); + // @@protoc_insertion_point(field_mutable:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiHotspotCredentials.password) + return _s; +} +inline const std::string& BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials::_internal_password() const { + return password_.Get(); +} +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials::_internal_set_password(const std::string& value) { + _has_bits_[0] |= 0x00000002u; + password_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials::_internal_mutable_password() { + _has_bits_[0] |= 0x00000002u; + return password_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials::release_password() { + // @@protoc_insertion_point(field_release:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiHotspotCredentials.password) + if (!_internal_has_password()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000002u; + auto* p = password_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (password_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + password_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials::set_allocated_password(std::string* password) { + if (password != nullptr) { + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + password_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), password, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (password_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + password_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiHotspotCredentials.password) +} + +// optional int32 port = 3; +inline bool BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials::_internal_has_port() const { + bool value = (_has_bits_[0] & 0x00000008u) != 0; + return value; +} +inline bool BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials::has_port() const { + return _internal_has_port(); +} +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials::clear_port() { + port_ = 0; + _has_bits_[0] &= ~0x00000008u; +} +inline int32_t BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials::_internal_port() const { + return port_; +} +inline int32_t BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials::port() const { + // @@protoc_insertion_point(field_get:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiHotspotCredentials.port) + return _internal_port(); +} +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials::_internal_set_port(int32_t value) { + _has_bits_[0] |= 0x00000008u; + port_ = value; +} +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials::set_port(int32_t value) { + _internal_set_port(value); + // @@protoc_insertion_point(field_set:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiHotspotCredentials.port) +} + +// optional string gateway = 4 [default = "0.0.0.0"]; +inline bool BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials::_internal_has_gateway() const { + bool value = (_has_bits_[0] & 0x00000004u) != 0; + return value; +} +inline bool BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials::has_gateway() const { + return _internal_has_gateway(); +} +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials::clear_gateway() { + gateway_.ClearToDefault(::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials::_i_give_permission_to_break_this_code_default_gateway_, GetArenaForAllocation()); + _has_bits_[0] &= ~0x00000004u; +} +inline const std::string& BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials::gateway() const { + // @@protoc_insertion_point(field_get:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiHotspotCredentials.gateway) + if (gateway_.IsDefault(nullptr)) return _i_give_permission_to_break_this_code_default_gateway_.get(); + return _internal_gateway(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials::set_gateway(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000004u; + gateway_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::NonEmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiHotspotCredentials.gateway) +} +inline std::string* BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials::mutable_gateway() { + std::string* _s = _internal_mutable_gateway(); + // @@protoc_insertion_point(field_mutable:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiHotspotCredentials.gateway) + return _s; +} +inline const std::string& BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials::_internal_gateway() const { + return gateway_.Get(); +} +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials::_internal_set_gateway(const std::string& value) { + _has_bits_[0] |= 0x00000004u; + gateway_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::NonEmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials::_internal_mutable_gateway() { + _has_bits_[0] |= 0x00000004u; + return gateway_.Mutable(::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials::_i_give_permission_to_break_this_code_default_gateway_, GetArenaForAllocation()); +} +inline std::string* BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials::release_gateway() { + // @@protoc_insertion_point(field_release:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiHotspotCredentials.gateway) + if (!_internal_has_gateway()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000004u; + auto* p = gateway_.ReleaseNonDefault(nullptr, GetArenaForAllocation()); + return p; +} +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials::set_allocated_gateway(std::string* gateway) { + if (gateway != nullptr) { + _has_bits_[0] |= 0x00000004u; + } else { + _has_bits_[0] &= ~0x00000004u; + } + gateway_.SetAllocated(nullptr, gateway, + GetArenaForAllocation()); + // @@protoc_insertion_point(field_set_allocated:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiHotspotCredentials.gateway) +} + +// optional int32 frequency = 5 [default = -1]; +inline bool BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials::_internal_has_frequency() const { + bool value = (_has_bits_[0] & 0x00000010u) != 0; + return value; +} +inline bool BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials::has_frequency() const { + return _internal_has_frequency(); +} +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials::clear_frequency() { + frequency_ = -1; + _has_bits_[0] &= ~0x00000010u; +} +inline int32_t BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials::_internal_frequency() const { + return frequency_; +} +inline int32_t BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials::frequency() const { + // @@protoc_insertion_point(field_get:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiHotspotCredentials.frequency) + return _internal_frequency(); +} +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials::_internal_set_frequency(int32_t value) { + _has_bits_[0] |= 0x00000010u; + frequency_ = value; +} +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials::set_frequency(int32_t value) { + _internal_set_frequency(value); + // @@protoc_insertion_point(field_set:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiHotspotCredentials.frequency) +} + +// ------------------------------------------------------------------- + +// BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket + +// optional bytes ip_address = 1; +inline bool BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket::_internal_has_ip_address() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket::has_ip_address() const { + return _internal_has_ip_address(); +} +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket::clear_ip_address() { + ip_address_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket::ip_address() const { + // @@protoc_insertion_point(field_get:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiLanSocket.ip_address) + return _internal_ip_address(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket::set_ip_address(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + ip_address_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiLanSocket.ip_address) +} +inline std::string* BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket::mutable_ip_address() { + std::string* _s = _internal_mutable_ip_address(); + // @@protoc_insertion_point(field_mutable:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiLanSocket.ip_address) + return _s; +} +inline const std::string& BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket::_internal_ip_address() const { + return ip_address_.Get(); +} +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket::_internal_set_ip_address(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + ip_address_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket::_internal_mutable_ip_address() { + _has_bits_[0] |= 0x00000001u; + return ip_address_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket::release_ip_address() { + // @@protoc_insertion_point(field_release:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiLanSocket.ip_address) + if (!_internal_has_ip_address()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = ip_address_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (ip_address_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + ip_address_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket::set_allocated_ip_address(std::string* ip_address) { + if (ip_address != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + ip_address_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ip_address, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (ip_address_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + ip_address_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiLanSocket.ip_address) +} + +// optional int32 wifi_port = 2; +inline bool BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket::_internal_has_wifi_port() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket::has_wifi_port() const { + return _internal_has_wifi_port(); +} +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket::clear_wifi_port() { + wifi_port_ = 0; + _has_bits_[0] &= ~0x00000002u; +} +inline int32_t BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket::_internal_wifi_port() const { + return wifi_port_; +} +inline int32_t BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket::wifi_port() const { + // @@protoc_insertion_point(field_get:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiLanSocket.wifi_port) + return _internal_wifi_port(); +} +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket::_internal_set_wifi_port(int32_t value) { + _has_bits_[0] |= 0x00000002u; + wifi_port_ = value; +} +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket::set_wifi_port(int32_t value) { + _internal_set_wifi_port(value); + // @@protoc_insertion_point(field_set:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiLanSocket.wifi_port) +} + +// ------------------------------------------------------------------- + +// BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials + +// optional string service_name = 1; +inline bool BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials::_internal_has_service_name() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials::has_service_name() const { + return _internal_has_service_name(); +} +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials::clear_service_name() { + service_name_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials::service_name() const { + // @@protoc_insertion_point(field_get:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.BluetoothCredentials.service_name) + return _internal_service_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials::set_service_name(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + service_name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.BluetoothCredentials.service_name) +} +inline std::string* BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials::mutable_service_name() { + std::string* _s = _internal_mutable_service_name(); + // @@protoc_insertion_point(field_mutable:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.BluetoothCredentials.service_name) + return _s; +} +inline const std::string& BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials::_internal_service_name() const { + return service_name_.Get(); +} +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials::_internal_set_service_name(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + service_name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials::_internal_mutable_service_name() { + _has_bits_[0] |= 0x00000001u; + return service_name_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials::release_service_name() { + // @@protoc_insertion_point(field_release:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.BluetoothCredentials.service_name) + if (!_internal_has_service_name()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = service_name_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (service_name_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + service_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials::set_allocated_service_name(std::string* service_name) { + if (service_name != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + service_name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), service_name, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (service_name_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + service_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.BluetoothCredentials.service_name) +} + +// optional string mac_address = 2; +inline bool BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials::_internal_has_mac_address() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials::has_mac_address() const { + return _internal_has_mac_address(); +} +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials::clear_mac_address() { + mac_address_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000002u; +} +inline const std::string& BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials::mac_address() const { + // @@protoc_insertion_point(field_get:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.BluetoothCredentials.mac_address) + return _internal_mac_address(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials::set_mac_address(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000002u; + mac_address_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.BluetoothCredentials.mac_address) +} +inline std::string* BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials::mutable_mac_address() { + std::string* _s = _internal_mutable_mac_address(); + // @@protoc_insertion_point(field_mutable:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.BluetoothCredentials.mac_address) + return _s; +} +inline const std::string& BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials::_internal_mac_address() const { + return mac_address_.Get(); +} +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials::_internal_set_mac_address(const std::string& value) { + _has_bits_[0] |= 0x00000002u; + mac_address_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials::_internal_mutable_mac_address() { + _has_bits_[0] |= 0x00000002u; + return mac_address_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials::release_mac_address() { + // @@protoc_insertion_point(field_release:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.BluetoothCredentials.mac_address) + if (!_internal_has_mac_address()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000002u; + auto* p = mac_address_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (mac_address_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + mac_address_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials::set_allocated_mac_address(std::string* mac_address) { + if (mac_address != nullptr) { + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + mac_address_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), mac_address, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (mac_address_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + mac_address_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.BluetoothCredentials.mac_address) +} + +// ------------------------------------------------------------------- + +// BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials + +// optional string service_id = 1; +inline bool BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials::_internal_has_service_id() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials::has_service_id() const { + return _internal_has_service_id(); +} +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials::clear_service_id() { + service_id_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials::service_id() const { + // @@protoc_insertion_point(field_get:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiAwareCredentials.service_id) + return _internal_service_id(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials::set_service_id(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + service_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiAwareCredentials.service_id) +} +inline std::string* BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials::mutable_service_id() { + std::string* _s = _internal_mutable_service_id(); + // @@protoc_insertion_point(field_mutable:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiAwareCredentials.service_id) + return _s; +} +inline const std::string& BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials::_internal_service_id() const { + return service_id_.Get(); +} +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials::_internal_set_service_id(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + service_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials::_internal_mutable_service_id() { + _has_bits_[0] |= 0x00000001u; + return service_id_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials::release_service_id() { + // @@protoc_insertion_point(field_release:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiAwareCredentials.service_id) + if (!_internal_has_service_id()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = service_id_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (service_id_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + service_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials::set_allocated_service_id(std::string* service_id) { + if (service_id != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + service_id_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), service_id, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (service_id_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + service_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiAwareCredentials.service_id) +} + +// optional bytes service_info = 2; +inline bool BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials::_internal_has_service_info() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials::has_service_info() const { + return _internal_has_service_info(); +} +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials::clear_service_info() { + service_info_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000002u; +} +inline const std::string& BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials::service_info() const { + // @@protoc_insertion_point(field_get:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiAwareCredentials.service_info) + return _internal_service_info(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials::set_service_info(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000002u; + service_info_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiAwareCredentials.service_info) +} +inline std::string* BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials::mutable_service_info() { + std::string* _s = _internal_mutable_service_info(); + // @@protoc_insertion_point(field_mutable:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiAwareCredentials.service_info) + return _s; +} +inline const std::string& BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials::_internal_service_info() const { + return service_info_.Get(); +} +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials::_internal_set_service_info(const std::string& value) { + _has_bits_[0] |= 0x00000002u; + service_info_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials::_internal_mutable_service_info() { + _has_bits_[0] |= 0x00000002u; + return service_info_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials::release_service_info() { + // @@protoc_insertion_point(field_release:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiAwareCredentials.service_info) + if (!_internal_has_service_info()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000002u; + auto* p = service_info_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (service_info_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + service_info_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials::set_allocated_service_info(std::string* service_info) { + if (service_info != nullptr) { + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + service_info_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), service_info, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (service_info_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + service_info_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiAwareCredentials.service_info) +} + +// optional string password = 3; +inline bool BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials::_internal_has_password() const { + bool value = (_has_bits_[0] & 0x00000004u) != 0; + return value; +} +inline bool BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials::has_password() const { + return _internal_has_password(); +} +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials::clear_password() { + password_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000004u; +} +inline const std::string& BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials::password() const { + // @@protoc_insertion_point(field_get:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiAwareCredentials.password) + return _internal_password(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials::set_password(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000004u; + password_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiAwareCredentials.password) +} +inline std::string* BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials::mutable_password() { + std::string* _s = _internal_mutable_password(); + // @@protoc_insertion_point(field_mutable:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiAwareCredentials.password) + return _s; +} +inline const std::string& BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials::_internal_password() const { + return password_.Get(); +} +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials::_internal_set_password(const std::string& value) { + _has_bits_[0] |= 0x00000004u; + password_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials::_internal_mutable_password() { + _has_bits_[0] |= 0x00000004u; + return password_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials::release_password() { + // @@protoc_insertion_point(field_release:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiAwareCredentials.password) + if (!_internal_has_password()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000004u; + auto* p = password_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (password_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + password_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials::set_allocated_password(std::string* password) { + if (password != nullptr) { + _has_bits_[0] |= 0x00000004u; + } else { + _has_bits_[0] &= ~0x00000004u; + } + password_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), password, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (password_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + password_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiAwareCredentials.password) +} + +// ------------------------------------------------------------------- + +// BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials + +// optional string ssid = 1; +inline bool BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials::_internal_has_ssid() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials::has_ssid() const { + return _internal_has_ssid(); +} +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials::clear_ssid() { + ssid_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials::ssid() const { + // @@protoc_insertion_point(field_get:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiDirectCredentials.ssid) + return _internal_ssid(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials::set_ssid(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + ssid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiDirectCredentials.ssid) +} +inline std::string* BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials::mutable_ssid() { + std::string* _s = _internal_mutable_ssid(); + // @@protoc_insertion_point(field_mutable:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiDirectCredentials.ssid) + return _s; +} +inline const std::string& BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials::_internal_ssid() const { + return ssid_.Get(); +} +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials::_internal_set_ssid(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + ssid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials::_internal_mutable_ssid() { + _has_bits_[0] |= 0x00000001u; + return ssid_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials::release_ssid() { + // @@protoc_insertion_point(field_release:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiDirectCredentials.ssid) + if (!_internal_has_ssid()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = ssid_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (ssid_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + ssid_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials::set_allocated_ssid(std::string* ssid) { + if (ssid != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + ssid_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ssid, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (ssid_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + ssid_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiDirectCredentials.ssid) +} + +// optional string password = 2; +inline bool BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials::_internal_has_password() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials::has_password() const { + return _internal_has_password(); +} +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials::clear_password() { + password_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000002u; +} +inline const std::string& BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials::password() const { + // @@protoc_insertion_point(field_get:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiDirectCredentials.password) + return _internal_password(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials::set_password(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000002u; + password_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiDirectCredentials.password) +} +inline std::string* BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials::mutable_password() { + std::string* _s = _internal_mutable_password(); + // @@protoc_insertion_point(field_mutable:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiDirectCredentials.password) + return _s; +} +inline const std::string& BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials::_internal_password() const { + return password_.Get(); +} +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials::_internal_set_password(const std::string& value) { + _has_bits_[0] |= 0x00000002u; + password_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials::_internal_mutable_password() { + _has_bits_[0] |= 0x00000002u; + return password_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials::release_password() { + // @@protoc_insertion_point(field_release:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiDirectCredentials.password) + if (!_internal_has_password()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000002u; + auto* p = password_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (password_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + password_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials::set_allocated_password(std::string* password) { + if (password != nullptr) { + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + password_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), password, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (password_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + password_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiDirectCredentials.password) +} + +// optional int32 port = 3; +inline bool BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials::_internal_has_port() const { + bool value = (_has_bits_[0] & 0x00000004u) != 0; + return value; +} +inline bool BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials::has_port() const { + return _internal_has_port(); +} +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials::clear_port() { + port_ = 0; + _has_bits_[0] &= ~0x00000004u; +} +inline int32_t BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials::_internal_port() const { + return port_; +} +inline int32_t BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials::port() const { + // @@protoc_insertion_point(field_get:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiDirectCredentials.port) + return _internal_port(); +} +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials::_internal_set_port(int32_t value) { + _has_bits_[0] |= 0x00000004u; + port_ = value; +} +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials::set_port(int32_t value) { + _internal_set_port(value); + // @@protoc_insertion_point(field_set:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiDirectCredentials.port) +} + +// optional int32 frequency = 4; +inline bool BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials::_internal_has_frequency() const { + bool value = (_has_bits_[0] & 0x00000008u) != 0; + return value; +} +inline bool BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials::has_frequency() const { + return _internal_has_frequency(); +} +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials::clear_frequency() { + frequency_ = 0; + _has_bits_[0] &= ~0x00000008u; +} +inline int32_t BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials::_internal_frequency() const { + return frequency_; +} +inline int32_t BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials::frequency() const { + // @@protoc_insertion_point(field_get:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiDirectCredentials.frequency) + return _internal_frequency(); +} +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials::_internal_set_frequency(int32_t value) { + _has_bits_[0] |= 0x00000008u; + frequency_ = value; +} +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials::set_frequency(int32_t value) { + _internal_set_frequency(value); + // @@protoc_insertion_point(field_set:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiDirectCredentials.frequency) +} + +// ------------------------------------------------------------------- + +// BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials + +// optional string peer_id = 1; +inline bool BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials::_internal_has_peer_id() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials::has_peer_id() const { + return _internal_has_peer_id(); +} +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials::clear_peer_id() { + peer_id_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials::peer_id() const { + // @@protoc_insertion_point(field_get:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WebRtcCredentials.peer_id) + return _internal_peer_id(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials::set_peer_id(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + peer_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WebRtcCredentials.peer_id) +} +inline std::string* BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials::mutable_peer_id() { + std::string* _s = _internal_mutable_peer_id(); + // @@protoc_insertion_point(field_mutable:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WebRtcCredentials.peer_id) + return _s; +} +inline const std::string& BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials::_internal_peer_id() const { + return peer_id_.Get(); +} +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials::_internal_set_peer_id(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + peer_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials::_internal_mutable_peer_id() { + _has_bits_[0] |= 0x00000001u; + return peer_id_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials::release_peer_id() { + // @@protoc_insertion_point(field_release:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WebRtcCredentials.peer_id) + if (!_internal_has_peer_id()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = peer_id_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (peer_id_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + peer_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials::set_allocated_peer_id(std::string* peer_id) { + if (peer_id != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + peer_id_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), peer_id, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (peer_id_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + peer_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WebRtcCredentials.peer_id) +} + +// optional .location.nearby.connections.LocationHint location_hint = 2; +inline bool BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials::_internal_has_location_hint() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + PROTOBUF_ASSUME(!value || location_hint_ != nullptr); + return value; +} +inline bool BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials::has_location_hint() const { + return _internal_has_location_hint(); +} +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials::clear_location_hint() { + if (location_hint_ != nullptr) location_hint_->Clear(); + _has_bits_[0] &= ~0x00000002u; +} +inline const ::location::nearby::connections::LocationHint& BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials::_internal_location_hint() const { + const ::location::nearby::connections::LocationHint* p = location_hint_; + return p != nullptr ? *p : reinterpret_cast( + ::location::nearby::connections::_LocationHint_default_instance_); +} +inline const ::location::nearby::connections::LocationHint& BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials::location_hint() const { + // @@protoc_insertion_point(field_get:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WebRtcCredentials.location_hint) + return _internal_location_hint(); +} +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials::unsafe_arena_set_allocated_location_hint( + ::location::nearby::connections::LocationHint* location_hint) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(location_hint_); + } + location_hint_ = location_hint; + if (location_hint) { + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WebRtcCredentials.location_hint) +} +inline ::location::nearby::connections::LocationHint* BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials::release_location_hint() { + _has_bits_[0] &= ~0x00000002u; + ::location::nearby::connections::LocationHint* temp = location_hint_; + location_hint_ = 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 ::location::nearby::connections::LocationHint* BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials::unsafe_arena_release_location_hint() { + // @@protoc_insertion_point(field_release:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WebRtcCredentials.location_hint) + _has_bits_[0] &= ~0x00000002u; + ::location::nearby::connections::LocationHint* temp = location_hint_; + location_hint_ = nullptr; + return temp; +} +inline ::location::nearby::connections::LocationHint* BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials::_internal_mutable_location_hint() { + _has_bits_[0] |= 0x00000002u; + if (location_hint_ == nullptr) { + auto* p = CreateMaybeMessage<::location::nearby::connections::LocationHint>(GetArenaForAllocation()); + location_hint_ = p; + } + return location_hint_; +} +inline ::location::nearby::connections::LocationHint* BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials::mutable_location_hint() { + ::location::nearby::connections::LocationHint* _msg = _internal_mutable_location_hint(); + // @@protoc_insertion_point(field_mutable:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WebRtcCredentials.location_hint) + return _msg; +} +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials::set_allocated_location_hint(::location::nearby::connections::LocationHint* location_hint) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete location_hint_; + } + if (location_hint) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::location::nearby::connections::LocationHint>::GetOwningArena(location_hint); + if (message_arena != submessage_arena) { + location_hint = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, location_hint, submessage_arena); + } + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + location_hint_ = location_hint; + // @@protoc_insertion_point(field_set_allocated:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WebRtcCredentials.location_hint) +} + +// ------------------------------------------------------------------- + +// BandwidthUpgradeNegotiationFrame_UpgradePathInfo + +// optional .location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.Medium medium = 1; +inline bool BandwidthUpgradeNegotiationFrame_UpgradePathInfo::_internal_has_medium() const { + bool value = (_has_bits_[0] & 0x00000040u) != 0; + return value; +} +inline bool BandwidthUpgradeNegotiationFrame_UpgradePathInfo::has_medium() const { + return _internal_has_medium(); +} +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo::clear_medium() { + medium_ = 0; + _has_bits_[0] &= ~0x00000040u; +} +inline ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium BandwidthUpgradeNegotiationFrame_UpgradePathInfo::_internal_medium() const { + return static_cast< ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium >(medium_); +} +inline ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium BandwidthUpgradeNegotiationFrame_UpgradePathInfo::medium() const { + // @@protoc_insertion_point(field_get:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.medium) + return _internal_medium(); +} +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo::_internal_set_medium(::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium value) { + assert(::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium_IsValid(value)); + _has_bits_[0] |= 0x00000040u; + medium_ = value; +} +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo::set_medium(::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium value) { + _internal_set_medium(value); + // @@protoc_insertion_point(field_set:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.medium) +} + +// optional .location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiHotspotCredentials wifi_hotspot_credentials = 2; +inline bool BandwidthUpgradeNegotiationFrame_UpgradePathInfo::_internal_has_wifi_hotspot_credentials() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + PROTOBUF_ASSUME(!value || wifi_hotspot_credentials_ != nullptr); + return value; +} +inline bool BandwidthUpgradeNegotiationFrame_UpgradePathInfo::has_wifi_hotspot_credentials() const { + return _internal_has_wifi_hotspot_credentials(); +} +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo::clear_wifi_hotspot_credentials() { + if (wifi_hotspot_credentials_ != nullptr) wifi_hotspot_credentials_->Clear(); + _has_bits_[0] &= ~0x00000001u; +} +inline const ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials& BandwidthUpgradeNegotiationFrame_UpgradePathInfo::_internal_wifi_hotspot_credentials() const { + const ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials* p = wifi_hotspot_credentials_; + return p != nullptr ? *p : reinterpret_cast( + ::location::nearby::connections::_BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials_default_instance_); +} +inline const ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials& BandwidthUpgradeNegotiationFrame_UpgradePathInfo::wifi_hotspot_credentials() const { + // @@protoc_insertion_point(field_get:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.wifi_hotspot_credentials) + return _internal_wifi_hotspot_credentials(); +} +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo::unsafe_arena_set_allocated_wifi_hotspot_credentials( + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials* wifi_hotspot_credentials) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(wifi_hotspot_credentials_); + } + wifi_hotspot_credentials_ = wifi_hotspot_credentials; + if (wifi_hotspot_credentials) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.wifi_hotspot_credentials) +} +inline ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials* BandwidthUpgradeNegotiationFrame_UpgradePathInfo::release_wifi_hotspot_credentials() { + _has_bits_[0] &= ~0x00000001u; + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials* temp = wifi_hotspot_credentials_; + wifi_hotspot_credentials_ = 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 ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials* BandwidthUpgradeNegotiationFrame_UpgradePathInfo::unsafe_arena_release_wifi_hotspot_credentials() { + // @@protoc_insertion_point(field_release:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.wifi_hotspot_credentials) + _has_bits_[0] &= ~0x00000001u; + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials* temp = wifi_hotspot_credentials_; + wifi_hotspot_credentials_ = nullptr; + return temp; +} +inline ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials* BandwidthUpgradeNegotiationFrame_UpgradePathInfo::_internal_mutable_wifi_hotspot_credentials() { + _has_bits_[0] |= 0x00000001u; + if (wifi_hotspot_credentials_ == nullptr) { + auto* p = CreateMaybeMessage<::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials>(GetArenaForAllocation()); + wifi_hotspot_credentials_ = p; + } + return wifi_hotspot_credentials_; +} +inline ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials* BandwidthUpgradeNegotiationFrame_UpgradePathInfo::mutable_wifi_hotspot_credentials() { + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials* _msg = _internal_mutable_wifi_hotspot_credentials(); + // @@protoc_insertion_point(field_mutable:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.wifi_hotspot_credentials) + return _msg; +} +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo::set_allocated_wifi_hotspot_credentials(::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials* wifi_hotspot_credentials) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete wifi_hotspot_credentials_; + } + if (wifi_hotspot_credentials) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiHotspotCredentials>::GetOwningArena(wifi_hotspot_credentials); + if (message_arena != submessage_arena) { + wifi_hotspot_credentials = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, wifi_hotspot_credentials, submessage_arena); + } + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + wifi_hotspot_credentials_ = wifi_hotspot_credentials; + // @@protoc_insertion_point(field_set_allocated:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.wifi_hotspot_credentials) +} + +// optional .location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiLanSocket wifi_lan_socket = 3; +inline bool BandwidthUpgradeNegotiationFrame_UpgradePathInfo::_internal_has_wifi_lan_socket() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + PROTOBUF_ASSUME(!value || wifi_lan_socket_ != nullptr); + return value; +} +inline bool BandwidthUpgradeNegotiationFrame_UpgradePathInfo::has_wifi_lan_socket() const { + return _internal_has_wifi_lan_socket(); +} +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo::clear_wifi_lan_socket() { + if (wifi_lan_socket_ != nullptr) wifi_lan_socket_->Clear(); + _has_bits_[0] &= ~0x00000002u; +} +inline const ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket& BandwidthUpgradeNegotiationFrame_UpgradePathInfo::_internal_wifi_lan_socket() const { + const ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket* p = wifi_lan_socket_; + return p != nullptr ? *p : reinterpret_cast( + ::location::nearby::connections::_BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket_default_instance_); +} +inline const ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket& BandwidthUpgradeNegotiationFrame_UpgradePathInfo::wifi_lan_socket() const { + // @@protoc_insertion_point(field_get:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.wifi_lan_socket) + return _internal_wifi_lan_socket(); +} +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo::unsafe_arena_set_allocated_wifi_lan_socket( + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket* wifi_lan_socket) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(wifi_lan_socket_); + } + wifi_lan_socket_ = wifi_lan_socket; + if (wifi_lan_socket) { + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.wifi_lan_socket) +} +inline ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket* BandwidthUpgradeNegotiationFrame_UpgradePathInfo::release_wifi_lan_socket() { + _has_bits_[0] &= ~0x00000002u; + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket* temp = wifi_lan_socket_; + wifi_lan_socket_ = 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 ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket* BandwidthUpgradeNegotiationFrame_UpgradePathInfo::unsafe_arena_release_wifi_lan_socket() { + // @@protoc_insertion_point(field_release:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.wifi_lan_socket) + _has_bits_[0] &= ~0x00000002u; + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket* temp = wifi_lan_socket_; + wifi_lan_socket_ = nullptr; + return temp; +} +inline ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket* BandwidthUpgradeNegotiationFrame_UpgradePathInfo::_internal_mutable_wifi_lan_socket() { + _has_bits_[0] |= 0x00000002u; + if (wifi_lan_socket_ == nullptr) { + auto* p = CreateMaybeMessage<::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket>(GetArenaForAllocation()); + wifi_lan_socket_ = p; + } + return wifi_lan_socket_; +} +inline ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket* BandwidthUpgradeNegotiationFrame_UpgradePathInfo::mutable_wifi_lan_socket() { + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket* _msg = _internal_mutable_wifi_lan_socket(); + // @@protoc_insertion_point(field_mutable:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.wifi_lan_socket) + return _msg; +} +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo::set_allocated_wifi_lan_socket(::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket* wifi_lan_socket) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete wifi_lan_socket_; + } + if (wifi_lan_socket) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiLanSocket>::GetOwningArena(wifi_lan_socket); + if (message_arena != submessage_arena) { + wifi_lan_socket = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, wifi_lan_socket, submessage_arena); + } + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + wifi_lan_socket_ = wifi_lan_socket; + // @@protoc_insertion_point(field_set_allocated:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.wifi_lan_socket) +} + +// optional .location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.BluetoothCredentials bluetooth_credentials = 4; +inline bool BandwidthUpgradeNegotiationFrame_UpgradePathInfo::_internal_has_bluetooth_credentials() const { + bool value = (_has_bits_[0] & 0x00000004u) != 0; + PROTOBUF_ASSUME(!value || bluetooth_credentials_ != nullptr); + return value; +} +inline bool BandwidthUpgradeNegotiationFrame_UpgradePathInfo::has_bluetooth_credentials() const { + return _internal_has_bluetooth_credentials(); +} +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo::clear_bluetooth_credentials() { + if (bluetooth_credentials_ != nullptr) bluetooth_credentials_->Clear(); + _has_bits_[0] &= ~0x00000004u; +} +inline const ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials& BandwidthUpgradeNegotiationFrame_UpgradePathInfo::_internal_bluetooth_credentials() const { + const ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials* p = bluetooth_credentials_; + return p != nullptr ? *p : reinterpret_cast( + ::location::nearby::connections::_BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials_default_instance_); +} +inline const ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials& BandwidthUpgradeNegotiationFrame_UpgradePathInfo::bluetooth_credentials() const { + // @@protoc_insertion_point(field_get:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.bluetooth_credentials) + return _internal_bluetooth_credentials(); +} +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo::unsafe_arena_set_allocated_bluetooth_credentials( + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials* bluetooth_credentials) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(bluetooth_credentials_); + } + bluetooth_credentials_ = bluetooth_credentials; + if (bluetooth_credentials) { + _has_bits_[0] |= 0x00000004u; + } else { + _has_bits_[0] &= ~0x00000004u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.bluetooth_credentials) +} +inline ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials* BandwidthUpgradeNegotiationFrame_UpgradePathInfo::release_bluetooth_credentials() { + _has_bits_[0] &= ~0x00000004u; + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials* temp = bluetooth_credentials_; + bluetooth_credentials_ = 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 ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials* BandwidthUpgradeNegotiationFrame_UpgradePathInfo::unsafe_arena_release_bluetooth_credentials() { + // @@protoc_insertion_point(field_release:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.bluetooth_credentials) + _has_bits_[0] &= ~0x00000004u; + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials* temp = bluetooth_credentials_; + bluetooth_credentials_ = nullptr; + return temp; +} +inline ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials* BandwidthUpgradeNegotiationFrame_UpgradePathInfo::_internal_mutable_bluetooth_credentials() { + _has_bits_[0] |= 0x00000004u; + if (bluetooth_credentials_ == nullptr) { + auto* p = CreateMaybeMessage<::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials>(GetArenaForAllocation()); + bluetooth_credentials_ = p; + } + return bluetooth_credentials_; +} +inline ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials* BandwidthUpgradeNegotiationFrame_UpgradePathInfo::mutable_bluetooth_credentials() { + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials* _msg = _internal_mutable_bluetooth_credentials(); + // @@protoc_insertion_point(field_mutable:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.bluetooth_credentials) + return _msg; +} +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo::set_allocated_bluetooth_credentials(::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials* bluetooth_credentials) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete bluetooth_credentials_; + } + if (bluetooth_credentials) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_BluetoothCredentials>::GetOwningArena(bluetooth_credentials); + if (message_arena != submessage_arena) { + bluetooth_credentials = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, bluetooth_credentials, submessage_arena); + } + _has_bits_[0] |= 0x00000004u; + } else { + _has_bits_[0] &= ~0x00000004u; + } + bluetooth_credentials_ = bluetooth_credentials; + // @@protoc_insertion_point(field_set_allocated:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.bluetooth_credentials) +} + +// optional .location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiAwareCredentials wifi_aware_credentials = 5; +inline bool BandwidthUpgradeNegotiationFrame_UpgradePathInfo::_internal_has_wifi_aware_credentials() const { + bool value = (_has_bits_[0] & 0x00000008u) != 0; + PROTOBUF_ASSUME(!value || wifi_aware_credentials_ != nullptr); + return value; +} +inline bool BandwidthUpgradeNegotiationFrame_UpgradePathInfo::has_wifi_aware_credentials() const { + return _internal_has_wifi_aware_credentials(); +} +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo::clear_wifi_aware_credentials() { + if (wifi_aware_credentials_ != nullptr) wifi_aware_credentials_->Clear(); + _has_bits_[0] &= ~0x00000008u; +} +inline const ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials& BandwidthUpgradeNegotiationFrame_UpgradePathInfo::_internal_wifi_aware_credentials() const { + const ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials* p = wifi_aware_credentials_; + return p != nullptr ? *p : reinterpret_cast( + ::location::nearby::connections::_BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials_default_instance_); +} +inline const ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials& BandwidthUpgradeNegotiationFrame_UpgradePathInfo::wifi_aware_credentials() const { + // @@protoc_insertion_point(field_get:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.wifi_aware_credentials) + return _internal_wifi_aware_credentials(); +} +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo::unsafe_arena_set_allocated_wifi_aware_credentials( + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials* wifi_aware_credentials) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(wifi_aware_credentials_); + } + wifi_aware_credentials_ = wifi_aware_credentials; + if (wifi_aware_credentials) { + _has_bits_[0] |= 0x00000008u; + } else { + _has_bits_[0] &= ~0x00000008u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.wifi_aware_credentials) +} +inline ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials* BandwidthUpgradeNegotiationFrame_UpgradePathInfo::release_wifi_aware_credentials() { + _has_bits_[0] &= ~0x00000008u; + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials* temp = wifi_aware_credentials_; + wifi_aware_credentials_ = 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 ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials* BandwidthUpgradeNegotiationFrame_UpgradePathInfo::unsafe_arena_release_wifi_aware_credentials() { + // @@protoc_insertion_point(field_release:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.wifi_aware_credentials) + _has_bits_[0] &= ~0x00000008u; + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials* temp = wifi_aware_credentials_; + wifi_aware_credentials_ = nullptr; + return temp; +} +inline ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials* BandwidthUpgradeNegotiationFrame_UpgradePathInfo::_internal_mutable_wifi_aware_credentials() { + _has_bits_[0] |= 0x00000008u; + if (wifi_aware_credentials_ == nullptr) { + auto* p = CreateMaybeMessage<::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials>(GetArenaForAllocation()); + wifi_aware_credentials_ = p; + } + return wifi_aware_credentials_; +} +inline ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials* BandwidthUpgradeNegotiationFrame_UpgradePathInfo::mutable_wifi_aware_credentials() { + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials* _msg = _internal_mutable_wifi_aware_credentials(); + // @@protoc_insertion_point(field_mutable:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.wifi_aware_credentials) + return _msg; +} +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo::set_allocated_wifi_aware_credentials(::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials* wifi_aware_credentials) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete wifi_aware_credentials_; + } + if (wifi_aware_credentials) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiAwareCredentials>::GetOwningArena(wifi_aware_credentials); + if (message_arena != submessage_arena) { + wifi_aware_credentials = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, wifi_aware_credentials, submessage_arena); + } + _has_bits_[0] |= 0x00000008u; + } else { + _has_bits_[0] &= ~0x00000008u; + } + wifi_aware_credentials_ = wifi_aware_credentials; + // @@protoc_insertion_point(field_set_allocated:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.wifi_aware_credentials) +} + +// optional .location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WifiDirectCredentials wifi_direct_credentials = 6; +inline bool BandwidthUpgradeNegotiationFrame_UpgradePathInfo::_internal_has_wifi_direct_credentials() const { + bool value = (_has_bits_[0] & 0x00000010u) != 0; + PROTOBUF_ASSUME(!value || wifi_direct_credentials_ != nullptr); + return value; +} +inline bool BandwidthUpgradeNegotiationFrame_UpgradePathInfo::has_wifi_direct_credentials() const { + return _internal_has_wifi_direct_credentials(); +} +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo::clear_wifi_direct_credentials() { + if (wifi_direct_credentials_ != nullptr) wifi_direct_credentials_->Clear(); + _has_bits_[0] &= ~0x00000010u; +} +inline const ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials& BandwidthUpgradeNegotiationFrame_UpgradePathInfo::_internal_wifi_direct_credentials() const { + const ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials* p = wifi_direct_credentials_; + return p != nullptr ? *p : reinterpret_cast( + ::location::nearby::connections::_BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials_default_instance_); +} +inline const ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials& BandwidthUpgradeNegotiationFrame_UpgradePathInfo::wifi_direct_credentials() const { + // @@protoc_insertion_point(field_get:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.wifi_direct_credentials) + return _internal_wifi_direct_credentials(); +} +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo::unsafe_arena_set_allocated_wifi_direct_credentials( + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials* wifi_direct_credentials) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(wifi_direct_credentials_); + } + wifi_direct_credentials_ = wifi_direct_credentials; + if (wifi_direct_credentials) { + _has_bits_[0] |= 0x00000010u; + } else { + _has_bits_[0] &= ~0x00000010u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.wifi_direct_credentials) +} +inline ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials* BandwidthUpgradeNegotiationFrame_UpgradePathInfo::release_wifi_direct_credentials() { + _has_bits_[0] &= ~0x00000010u; + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials* temp = wifi_direct_credentials_; + wifi_direct_credentials_ = 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 ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials* BandwidthUpgradeNegotiationFrame_UpgradePathInfo::unsafe_arena_release_wifi_direct_credentials() { + // @@protoc_insertion_point(field_release:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.wifi_direct_credentials) + _has_bits_[0] &= ~0x00000010u; + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials* temp = wifi_direct_credentials_; + wifi_direct_credentials_ = nullptr; + return temp; +} +inline ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials* BandwidthUpgradeNegotiationFrame_UpgradePathInfo::_internal_mutable_wifi_direct_credentials() { + _has_bits_[0] |= 0x00000010u; + if (wifi_direct_credentials_ == nullptr) { + auto* p = CreateMaybeMessage<::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials>(GetArenaForAllocation()); + wifi_direct_credentials_ = p; + } + return wifi_direct_credentials_; +} +inline ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials* BandwidthUpgradeNegotiationFrame_UpgradePathInfo::mutable_wifi_direct_credentials() { + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials* _msg = _internal_mutable_wifi_direct_credentials(); + // @@protoc_insertion_point(field_mutable:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.wifi_direct_credentials) + return _msg; +} +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo::set_allocated_wifi_direct_credentials(::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials* wifi_direct_credentials) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete wifi_direct_credentials_; + } + if (wifi_direct_credentials) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WifiDirectCredentials>::GetOwningArena(wifi_direct_credentials); + if (message_arena != submessage_arena) { + wifi_direct_credentials = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, wifi_direct_credentials, submessage_arena); + } + _has_bits_[0] |= 0x00000010u; + } else { + _has_bits_[0] &= ~0x00000010u; + } + wifi_direct_credentials_ = wifi_direct_credentials; + // @@protoc_insertion_point(field_set_allocated:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.wifi_direct_credentials) +} + +// optional .location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.WebRtcCredentials web_rtc_credentials = 8; +inline bool BandwidthUpgradeNegotiationFrame_UpgradePathInfo::_internal_has_web_rtc_credentials() const { + bool value = (_has_bits_[0] & 0x00000020u) != 0; + PROTOBUF_ASSUME(!value || web_rtc_credentials_ != nullptr); + return value; +} +inline bool BandwidthUpgradeNegotiationFrame_UpgradePathInfo::has_web_rtc_credentials() const { + return _internal_has_web_rtc_credentials(); +} +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo::clear_web_rtc_credentials() { + if (web_rtc_credentials_ != nullptr) web_rtc_credentials_->Clear(); + _has_bits_[0] &= ~0x00000020u; +} +inline const ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials& BandwidthUpgradeNegotiationFrame_UpgradePathInfo::_internal_web_rtc_credentials() const { + const ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials* p = web_rtc_credentials_; + return p != nullptr ? *p : reinterpret_cast( + ::location::nearby::connections::_BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials_default_instance_); +} +inline const ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials& BandwidthUpgradeNegotiationFrame_UpgradePathInfo::web_rtc_credentials() const { + // @@protoc_insertion_point(field_get:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.web_rtc_credentials) + return _internal_web_rtc_credentials(); +} +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo::unsafe_arena_set_allocated_web_rtc_credentials( + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials* web_rtc_credentials) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(web_rtc_credentials_); + } + web_rtc_credentials_ = web_rtc_credentials; + if (web_rtc_credentials) { + _has_bits_[0] |= 0x00000020u; + } else { + _has_bits_[0] &= ~0x00000020u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.web_rtc_credentials) +} +inline ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials* BandwidthUpgradeNegotiationFrame_UpgradePathInfo::release_web_rtc_credentials() { + _has_bits_[0] &= ~0x00000020u; + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials* temp = web_rtc_credentials_; + web_rtc_credentials_ = 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 ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials* BandwidthUpgradeNegotiationFrame_UpgradePathInfo::unsafe_arena_release_web_rtc_credentials() { + // @@protoc_insertion_point(field_release:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.web_rtc_credentials) + _has_bits_[0] &= ~0x00000020u; + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials* temp = web_rtc_credentials_; + web_rtc_credentials_ = nullptr; + return temp; +} +inline ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials* BandwidthUpgradeNegotiationFrame_UpgradePathInfo::_internal_mutable_web_rtc_credentials() { + _has_bits_[0] |= 0x00000020u; + if (web_rtc_credentials_ == nullptr) { + auto* p = CreateMaybeMessage<::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials>(GetArenaForAllocation()); + web_rtc_credentials_ = p; + } + return web_rtc_credentials_; +} +inline ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials* BandwidthUpgradeNegotiationFrame_UpgradePathInfo::mutable_web_rtc_credentials() { + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials* _msg = _internal_mutable_web_rtc_credentials(); + // @@protoc_insertion_point(field_mutable:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.web_rtc_credentials) + return _msg; +} +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo::set_allocated_web_rtc_credentials(::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials* web_rtc_credentials) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete web_rtc_credentials_; + } + if (web_rtc_credentials) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_WebRtcCredentials>::GetOwningArena(web_rtc_credentials); + if (message_arena != submessage_arena) { + web_rtc_credentials = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, web_rtc_credentials, submessage_arena); + } + _has_bits_[0] |= 0x00000020u; + } else { + _has_bits_[0] &= ~0x00000020u; + } + web_rtc_credentials_ = web_rtc_credentials; + // @@protoc_insertion_point(field_set_allocated:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.web_rtc_credentials) +} + +// optional bool supports_disabling_encryption = 7; +inline bool BandwidthUpgradeNegotiationFrame_UpgradePathInfo::_internal_has_supports_disabling_encryption() const { + bool value = (_has_bits_[0] & 0x00000080u) != 0; + return value; +} +inline bool BandwidthUpgradeNegotiationFrame_UpgradePathInfo::has_supports_disabling_encryption() const { + return _internal_has_supports_disabling_encryption(); +} +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo::clear_supports_disabling_encryption() { + supports_disabling_encryption_ = false; + _has_bits_[0] &= ~0x00000080u; +} +inline bool BandwidthUpgradeNegotiationFrame_UpgradePathInfo::_internal_supports_disabling_encryption() const { + return supports_disabling_encryption_; +} +inline bool BandwidthUpgradeNegotiationFrame_UpgradePathInfo::supports_disabling_encryption() const { + // @@protoc_insertion_point(field_get:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.supports_disabling_encryption) + return _internal_supports_disabling_encryption(); +} +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo::_internal_set_supports_disabling_encryption(bool value) { + _has_bits_[0] |= 0x00000080u; + supports_disabling_encryption_ = value; +} +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo::set_supports_disabling_encryption(bool value) { + _internal_set_supports_disabling_encryption(value); + // @@protoc_insertion_point(field_set:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.supports_disabling_encryption) +} + +// optional bool supports_client_introduction_ack = 9; +inline bool BandwidthUpgradeNegotiationFrame_UpgradePathInfo::_internal_has_supports_client_introduction_ack() const { + bool value = (_has_bits_[0] & 0x00000100u) != 0; + return value; +} +inline bool BandwidthUpgradeNegotiationFrame_UpgradePathInfo::has_supports_client_introduction_ack() const { + return _internal_has_supports_client_introduction_ack(); +} +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo::clear_supports_client_introduction_ack() { + supports_client_introduction_ack_ = false; + _has_bits_[0] &= ~0x00000100u; +} +inline bool BandwidthUpgradeNegotiationFrame_UpgradePathInfo::_internal_supports_client_introduction_ack() const { + return supports_client_introduction_ack_; +} +inline bool BandwidthUpgradeNegotiationFrame_UpgradePathInfo::supports_client_introduction_ack() const { + // @@protoc_insertion_point(field_get:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.supports_client_introduction_ack) + return _internal_supports_client_introduction_ack(); +} +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo::_internal_set_supports_client_introduction_ack(bool value) { + _has_bits_[0] |= 0x00000100u; + supports_client_introduction_ack_ = value; +} +inline void BandwidthUpgradeNegotiationFrame_UpgradePathInfo::set_supports_client_introduction_ack(bool value) { + _internal_set_supports_client_introduction_ack(value); + // @@protoc_insertion_point(field_set:location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo.supports_client_introduction_ack) +} + +// ------------------------------------------------------------------- + +// BandwidthUpgradeNegotiationFrame_ClientIntroduction + +// optional string endpoint_id = 1; +inline bool BandwidthUpgradeNegotiationFrame_ClientIntroduction::_internal_has_endpoint_id() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool BandwidthUpgradeNegotiationFrame_ClientIntroduction::has_endpoint_id() const { + return _internal_has_endpoint_id(); +} +inline void BandwidthUpgradeNegotiationFrame_ClientIntroduction::clear_endpoint_id() { + endpoint_id_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& BandwidthUpgradeNegotiationFrame_ClientIntroduction::endpoint_id() const { + // @@protoc_insertion_point(field_get:location.nearby.connections.BandwidthUpgradeNegotiationFrame.ClientIntroduction.endpoint_id) + return _internal_endpoint_id(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void BandwidthUpgradeNegotiationFrame_ClientIntroduction::set_endpoint_id(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + endpoint_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:location.nearby.connections.BandwidthUpgradeNegotiationFrame.ClientIntroduction.endpoint_id) +} +inline std::string* BandwidthUpgradeNegotiationFrame_ClientIntroduction::mutable_endpoint_id() { + std::string* _s = _internal_mutable_endpoint_id(); + // @@protoc_insertion_point(field_mutable:location.nearby.connections.BandwidthUpgradeNegotiationFrame.ClientIntroduction.endpoint_id) + return _s; +} +inline const std::string& BandwidthUpgradeNegotiationFrame_ClientIntroduction::_internal_endpoint_id() const { + return endpoint_id_.Get(); +} +inline void BandwidthUpgradeNegotiationFrame_ClientIntroduction::_internal_set_endpoint_id(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + endpoint_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* BandwidthUpgradeNegotiationFrame_ClientIntroduction::_internal_mutable_endpoint_id() { + _has_bits_[0] |= 0x00000001u; + return endpoint_id_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* BandwidthUpgradeNegotiationFrame_ClientIntroduction::release_endpoint_id() { + // @@protoc_insertion_point(field_release:location.nearby.connections.BandwidthUpgradeNegotiationFrame.ClientIntroduction.endpoint_id) + if (!_internal_has_endpoint_id()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = endpoint_id_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (endpoint_id_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + endpoint_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void BandwidthUpgradeNegotiationFrame_ClientIntroduction::set_allocated_endpoint_id(std::string* endpoint_id) { + if (endpoint_id != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + endpoint_id_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), endpoint_id, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (endpoint_id_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + endpoint_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:location.nearby.connections.BandwidthUpgradeNegotiationFrame.ClientIntroduction.endpoint_id) +} + +// optional bool supports_disabling_encryption = 2; +inline bool BandwidthUpgradeNegotiationFrame_ClientIntroduction::_internal_has_supports_disabling_encryption() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool BandwidthUpgradeNegotiationFrame_ClientIntroduction::has_supports_disabling_encryption() const { + return _internal_has_supports_disabling_encryption(); +} +inline void BandwidthUpgradeNegotiationFrame_ClientIntroduction::clear_supports_disabling_encryption() { + supports_disabling_encryption_ = false; + _has_bits_[0] &= ~0x00000002u; +} +inline bool BandwidthUpgradeNegotiationFrame_ClientIntroduction::_internal_supports_disabling_encryption() const { + return supports_disabling_encryption_; +} +inline bool BandwidthUpgradeNegotiationFrame_ClientIntroduction::supports_disabling_encryption() const { + // @@protoc_insertion_point(field_get:location.nearby.connections.BandwidthUpgradeNegotiationFrame.ClientIntroduction.supports_disabling_encryption) + return _internal_supports_disabling_encryption(); +} +inline void BandwidthUpgradeNegotiationFrame_ClientIntroduction::_internal_set_supports_disabling_encryption(bool value) { + _has_bits_[0] |= 0x00000002u; + supports_disabling_encryption_ = value; +} +inline void BandwidthUpgradeNegotiationFrame_ClientIntroduction::set_supports_disabling_encryption(bool value) { + _internal_set_supports_disabling_encryption(value); + // @@protoc_insertion_point(field_set:location.nearby.connections.BandwidthUpgradeNegotiationFrame.ClientIntroduction.supports_disabling_encryption) +} + +// ------------------------------------------------------------------- + +// BandwidthUpgradeNegotiationFrame_ClientIntroductionAck + +// ------------------------------------------------------------------- + +// BandwidthUpgradeNegotiationFrame + +// optional .location.nearby.connections.BandwidthUpgradeNegotiationFrame.EventType event_type = 1; +inline bool BandwidthUpgradeNegotiationFrame::_internal_has_event_type() const { + bool value = (_has_bits_[0] & 0x00000008u) != 0; + return value; +} +inline bool BandwidthUpgradeNegotiationFrame::has_event_type() const { + return _internal_has_event_type(); +} +inline void BandwidthUpgradeNegotiationFrame::clear_event_type() { + event_type_ = 0; + _has_bits_[0] &= ~0x00000008u; +} +inline ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_EventType BandwidthUpgradeNegotiationFrame::_internal_event_type() const { + return static_cast< ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_EventType >(event_type_); +} +inline ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_EventType BandwidthUpgradeNegotiationFrame::event_type() const { + // @@protoc_insertion_point(field_get:location.nearby.connections.BandwidthUpgradeNegotiationFrame.event_type) + return _internal_event_type(); +} +inline void BandwidthUpgradeNegotiationFrame::_internal_set_event_type(::location::nearby::connections::BandwidthUpgradeNegotiationFrame_EventType value) { + assert(::location::nearby::connections::BandwidthUpgradeNegotiationFrame_EventType_IsValid(value)); + _has_bits_[0] |= 0x00000008u; + event_type_ = value; +} +inline void BandwidthUpgradeNegotiationFrame::set_event_type(::location::nearby::connections::BandwidthUpgradeNegotiationFrame_EventType value) { + _internal_set_event_type(value); + // @@protoc_insertion_point(field_set:location.nearby.connections.BandwidthUpgradeNegotiationFrame.event_type) +} + +// optional .location.nearby.connections.BandwidthUpgradeNegotiationFrame.UpgradePathInfo upgrade_path_info = 2; +inline bool BandwidthUpgradeNegotiationFrame::_internal_has_upgrade_path_info() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + PROTOBUF_ASSUME(!value || upgrade_path_info_ != nullptr); + return value; +} +inline bool BandwidthUpgradeNegotiationFrame::has_upgrade_path_info() const { + return _internal_has_upgrade_path_info(); +} +inline void BandwidthUpgradeNegotiationFrame::clear_upgrade_path_info() { + if (upgrade_path_info_ != nullptr) upgrade_path_info_->Clear(); + _has_bits_[0] &= ~0x00000001u; +} +inline const ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo& BandwidthUpgradeNegotiationFrame::_internal_upgrade_path_info() const { + const ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo* p = upgrade_path_info_; + return p != nullptr ? *p : reinterpret_cast( + ::location::nearby::connections::_BandwidthUpgradeNegotiationFrame_UpgradePathInfo_default_instance_); +} +inline const ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo& BandwidthUpgradeNegotiationFrame::upgrade_path_info() const { + // @@protoc_insertion_point(field_get:location.nearby.connections.BandwidthUpgradeNegotiationFrame.upgrade_path_info) + return _internal_upgrade_path_info(); +} +inline void BandwidthUpgradeNegotiationFrame::unsafe_arena_set_allocated_upgrade_path_info( + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo* upgrade_path_info) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(upgrade_path_info_); + } + upgrade_path_info_ = upgrade_path_info; + if (upgrade_path_info) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:location.nearby.connections.BandwidthUpgradeNegotiationFrame.upgrade_path_info) +} +inline ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo* BandwidthUpgradeNegotiationFrame::release_upgrade_path_info() { + _has_bits_[0] &= ~0x00000001u; + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo* temp = upgrade_path_info_; + upgrade_path_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 ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo* BandwidthUpgradeNegotiationFrame::unsafe_arena_release_upgrade_path_info() { + // @@protoc_insertion_point(field_release:location.nearby.connections.BandwidthUpgradeNegotiationFrame.upgrade_path_info) + _has_bits_[0] &= ~0x00000001u; + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo* temp = upgrade_path_info_; + upgrade_path_info_ = nullptr; + return temp; +} +inline ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo* BandwidthUpgradeNegotiationFrame::_internal_mutable_upgrade_path_info() { + _has_bits_[0] |= 0x00000001u; + if (upgrade_path_info_ == nullptr) { + auto* p = CreateMaybeMessage<::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo>(GetArenaForAllocation()); + upgrade_path_info_ = p; + } + return upgrade_path_info_; +} +inline ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo* BandwidthUpgradeNegotiationFrame::mutable_upgrade_path_info() { + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo* _msg = _internal_mutable_upgrade_path_info(); + // @@protoc_insertion_point(field_mutable:location.nearby.connections.BandwidthUpgradeNegotiationFrame.upgrade_path_info) + return _msg; +} +inline void BandwidthUpgradeNegotiationFrame::set_allocated_upgrade_path_info(::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo* upgrade_path_info) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete upgrade_path_info_; + } + if (upgrade_path_info) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo>::GetOwningArena(upgrade_path_info); + if (message_arena != submessage_arena) { + upgrade_path_info = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, upgrade_path_info, submessage_arena); + } + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + upgrade_path_info_ = upgrade_path_info; + // @@protoc_insertion_point(field_set_allocated:location.nearby.connections.BandwidthUpgradeNegotiationFrame.upgrade_path_info) +} + +// optional .location.nearby.connections.BandwidthUpgradeNegotiationFrame.ClientIntroduction client_introduction = 3; +inline bool BandwidthUpgradeNegotiationFrame::_internal_has_client_introduction() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + PROTOBUF_ASSUME(!value || client_introduction_ != nullptr); + return value; +} +inline bool BandwidthUpgradeNegotiationFrame::has_client_introduction() const { + return _internal_has_client_introduction(); +} +inline void BandwidthUpgradeNegotiationFrame::clear_client_introduction() { + if (client_introduction_ != nullptr) client_introduction_->Clear(); + _has_bits_[0] &= ~0x00000002u; +} +inline const ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_ClientIntroduction& BandwidthUpgradeNegotiationFrame::_internal_client_introduction() const { + const ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_ClientIntroduction* p = client_introduction_; + return p != nullptr ? *p : reinterpret_cast( + ::location::nearby::connections::_BandwidthUpgradeNegotiationFrame_ClientIntroduction_default_instance_); +} +inline const ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_ClientIntroduction& BandwidthUpgradeNegotiationFrame::client_introduction() const { + // @@protoc_insertion_point(field_get:location.nearby.connections.BandwidthUpgradeNegotiationFrame.client_introduction) + return _internal_client_introduction(); +} +inline void BandwidthUpgradeNegotiationFrame::unsafe_arena_set_allocated_client_introduction( + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_ClientIntroduction* client_introduction) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(client_introduction_); + } + client_introduction_ = client_introduction; + if (client_introduction) { + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:location.nearby.connections.BandwidthUpgradeNegotiationFrame.client_introduction) +} +inline ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_ClientIntroduction* BandwidthUpgradeNegotiationFrame::release_client_introduction() { + _has_bits_[0] &= ~0x00000002u; + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_ClientIntroduction* temp = client_introduction_; + client_introduction_ = 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 ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_ClientIntroduction* BandwidthUpgradeNegotiationFrame::unsafe_arena_release_client_introduction() { + // @@protoc_insertion_point(field_release:location.nearby.connections.BandwidthUpgradeNegotiationFrame.client_introduction) + _has_bits_[0] &= ~0x00000002u; + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_ClientIntroduction* temp = client_introduction_; + client_introduction_ = nullptr; + return temp; +} +inline ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_ClientIntroduction* BandwidthUpgradeNegotiationFrame::_internal_mutable_client_introduction() { + _has_bits_[0] |= 0x00000002u; + if (client_introduction_ == nullptr) { + auto* p = CreateMaybeMessage<::location::nearby::connections::BandwidthUpgradeNegotiationFrame_ClientIntroduction>(GetArenaForAllocation()); + client_introduction_ = p; + } + return client_introduction_; +} +inline ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_ClientIntroduction* BandwidthUpgradeNegotiationFrame::mutable_client_introduction() { + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_ClientIntroduction* _msg = _internal_mutable_client_introduction(); + // @@protoc_insertion_point(field_mutable:location.nearby.connections.BandwidthUpgradeNegotiationFrame.client_introduction) + return _msg; +} +inline void BandwidthUpgradeNegotiationFrame::set_allocated_client_introduction(::location::nearby::connections::BandwidthUpgradeNegotiationFrame_ClientIntroduction* client_introduction) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete client_introduction_; + } + if (client_introduction) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::location::nearby::connections::BandwidthUpgradeNegotiationFrame_ClientIntroduction>::GetOwningArena(client_introduction); + if (message_arena != submessage_arena) { + client_introduction = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, client_introduction, submessage_arena); + } + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + client_introduction_ = client_introduction; + // @@protoc_insertion_point(field_set_allocated:location.nearby.connections.BandwidthUpgradeNegotiationFrame.client_introduction) +} + +// optional .location.nearby.connections.BandwidthUpgradeNegotiationFrame.ClientIntroductionAck client_introduction_ack = 4; +inline bool BandwidthUpgradeNegotiationFrame::_internal_has_client_introduction_ack() const { + bool value = (_has_bits_[0] & 0x00000004u) != 0; + PROTOBUF_ASSUME(!value || client_introduction_ack_ != nullptr); + return value; +} +inline bool BandwidthUpgradeNegotiationFrame::has_client_introduction_ack() const { + return _internal_has_client_introduction_ack(); +} +inline void BandwidthUpgradeNegotiationFrame::clear_client_introduction_ack() { + if (client_introduction_ack_ != nullptr) client_introduction_ack_->Clear(); + _has_bits_[0] &= ~0x00000004u; +} +inline const ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_ClientIntroductionAck& BandwidthUpgradeNegotiationFrame::_internal_client_introduction_ack() const { + const ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_ClientIntroductionAck* p = client_introduction_ack_; + return p != nullptr ? *p : reinterpret_cast( + ::location::nearby::connections::_BandwidthUpgradeNegotiationFrame_ClientIntroductionAck_default_instance_); +} +inline const ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_ClientIntroductionAck& BandwidthUpgradeNegotiationFrame::client_introduction_ack() const { + // @@protoc_insertion_point(field_get:location.nearby.connections.BandwidthUpgradeNegotiationFrame.client_introduction_ack) + return _internal_client_introduction_ack(); +} +inline void BandwidthUpgradeNegotiationFrame::unsafe_arena_set_allocated_client_introduction_ack( + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_ClientIntroductionAck* client_introduction_ack) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(client_introduction_ack_); + } + client_introduction_ack_ = client_introduction_ack; + if (client_introduction_ack) { + _has_bits_[0] |= 0x00000004u; + } else { + _has_bits_[0] &= ~0x00000004u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:location.nearby.connections.BandwidthUpgradeNegotiationFrame.client_introduction_ack) +} +inline ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_ClientIntroductionAck* BandwidthUpgradeNegotiationFrame::release_client_introduction_ack() { + _has_bits_[0] &= ~0x00000004u; + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_ClientIntroductionAck* temp = client_introduction_ack_; + client_introduction_ack_ = 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 ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_ClientIntroductionAck* BandwidthUpgradeNegotiationFrame::unsafe_arena_release_client_introduction_ack() { + // @@protoc_insertion_point(field_release:location.nearby.connections.BandwidthUpgradeNegotiationFrame.client_introduction_ack) + _has_bits_[0] &= ~0x00000004u; + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_ClientIntroductionAck* temp = client_introduction_ack_; + client_introduction_ack_ = nullptr; + return temp; +} +inline ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_ClientIntroductionAck* BandwidthUpgradeNegotiationFrame::_internal_mutable_client_introduction_ack() { + _has_bits_[0] |= 0x00000004u; + if (client_introduction_ack_ == nullptr) { + auto* p = CreateMaybeMessage<::location::nearby::connections::BandwidthUpgradeNegotiationFrame_ClientIntroductionAck>(GetArenaForAllocation()); + client_introduction_ack_ = p; + } + return client_introduction_ack_; +} +inline ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_ClientIntroductionAck* BandwidthUpgradeNegotiationFrame::mutable_client_introduction_ack() { + ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_ClientIntroductionAck* _msg = _internal_mutable_client_introduction_ack(); + // @@protoc_insertion_point(field_mutable:location.nearby.connections.BandwidthUpgradeNegotiationFrame.client_introduction_ack) + return _msg; +} +inline void BandwidthUpgradeNegotiationFrame::set_allocated_client_introduction_ack(::location::nearby::connections::BandwidthUpgradeNegotiationFrame_ClientIntroductionAck* client_introduction_ack) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete client_introduction_ack_; + } + if (client_introduction_ack) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::location::nearby::connections::BandwidthUpgradeNegotiationFrame_ClientIntroductionAck>::GetOwningArena(client_introduction_ack); + if (message_arena != submessage_arena) { + client_introduction_ack = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, client_introduction_ack, submessage_arena); + } + _has_bits_[0] |= 0x00000004u; + } else { + _has_bits_[0] &= ~0x00000004u; + } + client_introduction_ack_ = client_introduction_ack; + // @@protoc_insertion_point(field_set_allocated:location.nearby.connections.BandwidthUpgradeNegotiationFrame.client_introduction_ack) +} + +// ------------------------------------------------------------------- + +// KeepAliveFrame + +// optional bool ack = 1; +inline bool KeepAliveFrame::_internal_has_ack() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool KeepAliveFrame::has_ack() const { + return _internal_has_ack(); +} +inline void KeepAliveFrame::clear_ack() { + ack_ = false; + _has_bits_[0] &= ~0x00000001u; +} +inline bool KeepAliveFrame::_internal_ack() const { + return ack_; +} +inline bool KeepAliveFrame::ack() const { + // @@protoc_insertion_point(field_get:location.nearby.connections.KeepAliveFrame.ack) + return _internal_ack(); +} +inline void KeepAliveFrame::_internal_set_ack(bool value) { + _has_bits_[0] |= 0x00000001u; + ack_ = value; +} +inline void KeepAliveFrame::set_ack(bool value) { + _internal_set_ack(value); + // @@protoc_insertion_point(field_set:location.nearby.connections.KeepAliveFrame.ack) +} + +// ------------------------------------------------------------------- + +// DisconnectionFrame + +// ------------------------------------------------------------------- + +// PairedKeyEncryptionFrame + +// optional bytes signed_data = 1; +inline bool PairedKeyEncryptionFrame::_internal_has_signed_data() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool PairedKeyEncryptionFrame::has_signed_data() const { + return _internal_has_signed_data(); +} +inline void PairedKeyEncryptionFrame::clear_signed_data() { + signed_data_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& PairedKeyEncryptionFrame::signed_data() const { + // @@protoc_insertion_point(field_get:location.nearby.connections.PairedKeyEncryptionFrame.signed_data) + return _internal_signed_data(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void PairedKeyEncryptionFrame::set_signed_data(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + signed_data_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:location.nearby.connections.PairedKeyEncryptionFrame.signed_data) +} +inline std::string* PairedKeyEncryptionFrame::mutable_signed_data() { + std::string* _s = _internal_mutable_signed_data(); + // @@protoc_insertion_point(field_mutable:location.nearby.connections.PairedKeyEncryptionFrame.signed_data) + return _s; +} +inline const std::string& PairedKeyEncryptionFrame::_internal_signed_data() const { + return signed_data_.Get(); +} +inline void PairedKeyEncryptionFrame::_internal_set_signed_data(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + signed_data_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* PairedKeyEncryptionFrame::_internal_mutable_signed_data() { + _has_bits_[0] |= 0x00000001u; + return signed_data_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* PairedKeyEncryptionFrame::release_signed_data() { + // @@protoc_insertion_point(field_release:location.nearby.connections.PairedKeyEncryptionFrame.signed_data) + if (!_internal_has_signed_data()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = signed_data_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (signed_data_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + signed_data_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void PairedKeyEncryptionFrame::set_allocated_signed_data(std::string* signed_data) { + if (signed_data != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + signed_data_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), signed_data, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (signed_data_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + signed_data_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:location.nearby.connections.PairedKeyEncryptionFrame.signed_data) +} + +// ------------------------------------------------------------------- + +// MediumMetadata + +// optional bool supports_5_ghz = 1; +inline bool MediumMetadata::_internal_has_supports_5_ghz() const { + bool value = (_has_bits_[0] & 0x00000080u) != 0; + return value; +} +inline bool MediumMetadata::has_supports_5_ghz() const { + return _internal_has_supports_5_ghz(); +} +inline void MediumMetadata::clear_supports_5_ghz() { + supports_5_ghz_ = false; + _has_bits_[0] &= ~0x00000080u; +} +inline bool MediumMetadata::_internal_supports_5_ghz() const { + return supports_5_ghz_; +} +inline bool MediumMetadata::supports_5_ghz() const { + // @@protoc_insertion_point(field_get:location.nearby.connections.MediumMetadata.supports_5_ghz) + return _internal_supports_5_ghz(); +} +inline void MediumMetadata::_internal_set_supports_5_ghz(bool value) { + _has_bits_[0] |= 0x00000080u; + supports_5_ghz_ = value; +} +inline void MediumMetadata::set_supports_5_ghz(bool value) { + _internal_set_supports_5_ghz(value); + // @@protoc_insertion_point(field_set:location.nearby.connections.MediumMetadata.supports_5_ghz) +} + +// optional string bssid = 2; +inline bool MediumMetadata::_internal_has_bssid() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool MediumMetadata::has_bssid() const { + return _internal_has_bssid(); +} +inline void MediumMetadata::clear_bssid() { + bssid_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& MediumMetadata::bssid() const { + // @@protoc_insertion_point(field_get:location.nearby.connections.MediumMetadata.bssid) + return _internal_bssid(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void MediumMetadata::set_bssid(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + bssid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:location.nearby.connections.MediumMetadata.bssid) +} +inline std::string* MediumMetadata::mutable_bssid() { + std::string* _s = _internal_mutable_bssid(); + // @@protoc_insertion_point(field_mutable:location.nearby.connections.MediumMetadata.bssid) + return _s; +} +inline const std::string& MediumMetadata::_internal_bssid() const { + return bssid_.Get(); +} +inline void MediumMetadata::_internal_set_bssid(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + bssid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* MediumMetadata::_internal_mutable_bssid() { + _has_bits_[0] |= 0x00000001u; + return bssid_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* MediumMetadata::release_bssid() { + // @@protoc_insertion_point(field_release:location.nearby.connections.MediumMetadata.bssid) + if (!_internal_has_bssid()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = bssid_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (bssid_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + bssid_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void MediumMetadata::set_allocated_bssid(std::string* bssid) { + if (bssid != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + bssid_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), bssid, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (bssid_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + bssid_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:location.nearby.connections.MediumMetadata.bssid) +} + +// optional bytes ip_address = 3; +inline bool MediumMetadata::_internal_has_ip_address() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool MediumMetadata::has_ip_address() const { + return _internal_has_ip_address(); +} +inline void MediumMetadata::clear_ip_address() { + ip_address_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000002u; +} +inline const std::string& MediumMetadata::ip_address() const { + // @@protoc_insertion_point(field_get:location.nearby.connections.MediumMetadata.ip_address) + return _internal_ip_address(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void MediumMetadata::set_ip_address(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000002u; + ip_address_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:location.nearby.connections.MediumMetadata.ip_address) +} +inline std::string* MediumMetadata::mutable_ip_address() { + std::string* _s = _internal_mutable_ip_address(); + // @@protoc_insertion_point(field_mutable:location.nearby.connections.MediumMetadata.ip_address) + return _s; +} +inline const std::string& MediumMetadata::_internal_ip_address() const { + return ip_address_.Get(); +} +inline void MediumMetadata::_internal_set_ip_address(const std::string& value) { + _has_bits_[0] |= 0x00000002u; + ip_address_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* MediumMetadata::_internal_mutable_ip_address() { + _has_bits_[0] |= 0x00000002u; + return ip_address_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* MediumMetadata::release_ip_address() { + // @@protoc_insertion_point(field_release:location.nearby.connections.MediumMetadata.ip_address) + if (!_internal_has_ip_address()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000002u; + auto* p = ip_address_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (ip_address_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + ip_address_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void MediumMetadata::set_allocated_ip_address(std::string* ip_address) { + if (ip_address != nullptr) { + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + ip_address_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ip_address, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (ip_address_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + ip_address_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:location.nearby.connections.MediumMetadata.ip_address) +} + +// optional bool supports_6_ghz = 4; +inline bool MediumMetadata::_internal_has_supports_6_ghz() const { + bool value = (_has_bits_[0] & 0x00000100u) != 0; + return value; +} +inline bool MediumMetadata::has_supports_6_ghz() const { + return _internal_has_supports_6_ghz(); +} +inline void MediumMetadata::clear_supports_6_ghz() { + supports_6_ghz_ = false; + _has_bits_[0] &= ~0x00000100u; +} +inline bool MediumMetadata::_internal_supports_6_ghz() const { + return supports_6_ghz_; +} +inline bool MediumMetadata::supports_6_ghz() const { + // @@protoc_insertion_point(field_get:location.nearby.connections.MediumMetadata.supports_6_ghz) + return _internal_supports_6_ghz(); +} +inline void MediumMetadata::_internal_set_supports_6_ghz(bool value) { + _has_bits_[0] |= 0x00000100u; + supports_6_ghz_ = value; +} +inline void MediumMetadata::set_supports_6_ghz(bool value) { + _internal_set_supports_6_ghz(value); + // @@protoc_insertion_point(field_set:location.nearby.connections.MediumMetadata.supports_6_ghz) +} + +// optional bool mobile_radio = 5; +inline bool MediumMetadata::_internal_has_mobile_radio() const { + bool value = (_has_bits_[0] & 0x00000200u) != 0; + return value; +} +inline bool MediumMetadata::has_mobile_radio() const { + return _internal_has_mobile_radio(); +} +inline void MediumMetadata::clear_mobile_radio() { + mobile_radio_ = false; + _has_bits_[0] &= ~0x00000200u; +} +inline bool MediumMetadata::_internal_mobile_radio() const { + return mobile_radio_; +} +inline bool MediumMetadata::mobile_radio() const { + // @@protoc_insertion_point(field_get:location.nearby.connections.MediumMetadata.mobile_radio) + return _internal_mobile_radio(); +} +inline void MediumMetadata::_internal_set_mobile_radio(bool value) { + _has_bits_[0] |= 0x00000200u; + mobile_radio_ = value; +} +inline void MediumMetadata::set_mobile_radio(bool value) { + _internal_set_mobile_radio(value); + // @@protoc_insertion_point(field_set:location.nearby.connections.MediumMetadata.mobile_radio) +} + +// optional int32 ap_frequency = 6 [default = -1]; +inline bool MediumMetadata::_internal_has_ap_frequency() const { + bool value = (_has_bits_[0] & 0x00000400u) != 0; + return value; +} +inline bool MediumMetadata::has_ap_frequency() const { + return _internal_has_ap_frequency(); +} +inline void MediumMetadata::clear_ap_frequency() { + ap_frequency_ = -1; + _has_bits_[0] &= ~0x00000400u; +} +inline int32_t MediumMetadata::_internal_ap_frequency() const { + return ap_frequency_; +} +inline int32_t MediumMetadata::ap_frequency() const { + // @@protoc_insertion_point(field_get:location.nearby.connections.MediumMetadata.ap_frequency) + return _internal_ap_frequency(); +} +inline void MediumMetadata::_internal_set_ap_frequency(int32_t value) { + _has_bits_[0] |= 0x00000400u; + ap_frequency_ = value; +} +inline void MediumMetadata::set_ap_frequency(int32_t value) { + _internal_set_ap_frequency(value); + // @@protoc_insertion_point(field_set:location.nearby.connections.MediumMetadata.ap_frequency) +} + +// optional .location.nearby.connections.AvailableChannels available_channels = 7; +inline bool MediumMetadata::_internal_has_available_channels() const { + bool value = (_has_bits_[0] & 0x00000004u) != 0; + PROTOBUF_ASSUME(!value || available_channels_ != nullptr); + return value; +} +inline bool MediumMetadata::has_available_channels() const { + return _internal_has_available_channels(); +} +inline void MediumMetadata::clear_available_channels() { + if (available_channels_ != nullptr) available_channels_->Clear(); + _has_bits_[0] &= ~0x00000004u; +} +inline const ::location::nearby::connections::AvailableChannels& MediumMetadata::_internal_available_channels() const { + const ::location::nearby::connections::AvailableChannels* p = available_channels_; + return p != nullptr ? *p : reinterpret_cast( + ::location::nearby::connections::_AvailableChannels_default_instance_); +} +inline const ::location::nearby::connections::AvailableChannels& MediumMetadata::available_channels() const { + // @@protoc_insertion_point(field_get:location.nearby.connections.MediumMetadata.available_channels) + return _internal_available_channels(); +} +inline void MediumMetadata::unsafe_arena_set_allocated_available_channels( + ::location::nearby::connections::AvailableChannels* available_channels) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(available_channels_); + } + available_channels_ = available_channels; + if (available_channels) { + _has_bits_[0] |= 0x00000004u; + } else { + _has_bits_[0] &= ~0x00000004u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:location.nearby.connections.MediumMetadata.available_channels) +} +inline ::location::nearby::connections::AvailableChannels* MediumMetadata::release_available_channels() { + _has_bits_[0] &= ~0x00000004u; + ::location::nearby::connections::AvailableChannels* temp = available_channels_; + available_channels_ = 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 ::location::nearby::connections::AvailableChannels* MediumMetadata::unsafe_arena_release_available_channels() { + // @@protoc_insertion_point(field_release:location.nearby.connections.MediumMetadata.available_channels) + _has_bits_[0] &= ~0x00000004u; + ::location::nearby::connections::AvailableChannels* temp = available_channels_; + available_channels_ = nullptr; + return temp; +} +inline ::location::nearby::connections::AvailableChannels* MediumMetadata::_internal_mutable_available_channels() { + _has_bits_[0] |= 0x00000004u; + if (available_channels_ == nullptr) { + auto* p = CreateMaybeMessage<::location::nearby::connections::AvailableChannels>(GetArenaForAllocation()); + available_channels_ = p; + } + return available_channels_; +} +inline ::location::nearby::connections::AvailableChannels* MediumMetadata::mutable_available_channels() { + ::location::nearby::connections::AvailableChannels* _msg = _internal_mutable_available_channels(); + // @@protoc_insertion_point(field_mutable:location.nearby.connections.MediumMetadata.available_channels) + return _msg; +} +inline void MediumMetadata::set_allocated_available_channels(::location::nearby::connections::AvailableChannels* available_channels) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete available_channels_; + } + if (available_channels) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::location::nearby::connections::AvailableChannels>::GetOwningArena(available_channels); + if (message_arena != submessage_arena) { + available_channels = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, available_channels, submessage_arena); + } + _has_bits_[0] |= 0x00000004u; + } else { + _has_bits_[0] &= ~0x00000004u; + } + available_channels_ = available_channels; + // @@protoc_insertion_point(field_set_allocated:location.nearby.connections.MediumMetadata.available_channels) +} + +// optional .location.nearby.connections.WifiDirectCliUsableChannels wifi_direct_cli_usable_channels = 8; +inline bool MediumMetadata::_internal_has_wifi_direct_cli_usable_channels() const { + bool value = (_has_bits_[0] & 0x00000008u) != 0; + PROTOBUF_ASSUME(!value || wifi_direct_cli_usable_channels_ != nullptr); + return value; +} +inline bool MediumMetadata::has_wifi_direct_cli_usable_channels() const { + return _internal_has_wifi_direct_cli_usable_channels(); +} +inline void MediumMetadata::clear_wifi_direct_cli_usable_channels() { + if (wifi_direct_cli_usable_channels_ != nullptr) wifi_direct_cli_usable_channels_->Clear(); + _has_bits_[0] &= ~0x00000008u; +} +inline const ::location::nearby::connections::WifiDirectCliUsableChannels& MediumMetadata::_internal_wifi_direct_cli_usable_channels() const { + const ::location::nearby::connections::WifiDirectCliUsableChannels* p = wifi_direct_cli_usable_channels_; + return p != nullptr ? *p : reinterpret_cast( + ::location::nearby::connections::_WifiDirectCliUsableChannels_default_instance_); +} +inline const ::location::nearby::connections::WifiDirectCliUsableChannels& MediumMetadata::wifi_direct_cli_usable_channels() const { + // @@protoc_insertion_point(field_get:location.nearby.connections.MediumMetadata.wifi_direct_cli_usable_channels) + return _internal_wifi_direct_cli_usable_channels(); +} +inline void MediumMetadata::unsafe_arena_set_allocated_wifi_direct_cli_usable_channels( + ::location::nearby::connections::WifiDirectCliUsableChannels* wifi_direct_cli_usable_channels) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(wifi_direct_cli_usable_channels_); + } + wifi_direct_cli_usable_channels_ = wifi_direct_cli_usable_channels; + if (wifi_direct_cli_usable_channels) { + _has_bits_[0] |= 0x00000008u; + } else { + _has_bits_[0] &= ~0x00000008u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:location.nearby.connections.MediumMetadata.wifi_direct_cli_usable_channels) +} +inline ::location::nearby::connections::WifiDirectCliUsableChannels* MediumMetadata::release_wifi_direct_cli_usable_channels() { + _has_bits_[0] &= ~0x00000008u; + ::location::nearby::connections::WifiDirectCliUsableChannels* temp = wifi_direct_cli_usable_channels_; + wifi_direct_cli_usable_channels_ = 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 ::location::nearby::connections::WifiDirectCliUsableChannels* MediumMetadata::unsafe_arena_release_wifi_direct_cli_usable_channels() { + // @@protoc_insertion_point(field_release:location.nearby.connections.MediumMetadata.wifi_direct_cli_usable_channels) + _has_bits_[0] &= ~0x00000008u; + ::location::nearby::connections::WifiDirectCliUsableChannels* temp = wifi_direct_cli_usable_channels_; + wifi_direct_cli_usable_channels_ = nullptr; + return temp; +} +inline ::location::nearby::connections::WifiDirectCliUsableChannels* MediumMetadata::_internal_mutable_wifi_direct_cli_usable_channels() { + _has_bits_[0] |= 0x00000008u; + if (wifi_direct_cli_usable_channels_ == nullptr) { + auto* p = CreateMaybeMessage<::location::nearby::connections::WifiDirectCliUsableChannels>(GetArenaForAllocation()); + wifi_direct_cli_usable_channels_ = p; + } + return wifi_direct_cli_usable_channels_; +} +inline ::location::nearby::connections::WifiDirectCliUsableChannels* MediumMetadata::mutable_wifi_direct_cli_usable_channels() { + ::location::nearby::connections::WifiDirectCliUsableChannels* _msg = _internal_mutable_wifi_direct_cli_usable_channels(); + // @@protoc_insertion_point(field_mutable:location.nearby.connections.MediumMetadata.wifi_direct_cli_usable_channels) + return _msg; +} +inline void MediumMetadata::set_allocated_wifi_direct_cli_usable_channels(::location::nearby::connections::WifiDirectCliUsableChannels* wifi_direct_cli_usable_channels) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete wifi_direct_cli_usable_channels_; + } + if (wifi_direct_cli_usable_channels) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::location::nearby::connections::WifiDirectCliUsableChannels>::GetOwningArena(wifi_direct_cli_usable_channels); + if (message_arena != submessage_arena) { + wifi_direct_cli_usable_channels = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, wifi_direct_cli_usable_channels, submessage_arena); + } + _has_bits_[0] |= 0x00000008u; + } else { + _has_bits_[0] &= ~0x00000008u; + } + wifi_direct_cli_usable_channels_ = wifi_direct_cli_usable_channels; + // @@protoc_insertion_point(field_set_allocated:location.nearby.connections.MediumMetadata.wifi_direct_cli_usable_channels) +} + +// optional .location.nearby.connections.WifiLanUsableChannels wifi_lan_usable_channels = 9; +inline bool MediumMetadata::_internal_has_wifi_lan_usable_channels() const { + bool value = (_has_bits_[0] & 0x00000010u) != 0; + PROTOBUF_ASSUME(!value || wifi_lan_usable_channels_ != nullptr); + return value; +} +inline bool MediumMetadata::has_wifi_lan_usable_channels() const { + return _internal_has_wifi_lan_usable_channels(); +} +inline void MediumMetadata::clear_wifi_lan_usable_channels() { + if (wifi_lan_usable_channels_ != nullptr) wifi_lan_usable_channels_->Clear(); + _has_bits_[0] &= ~0x00000010u; +} +inline const ::location::nearby::connections::WifiLanUsableChannels& MediumMetadata::_internal_wifi_lan_usable_channels() const { + const ::location::nearby::connections::WifiLanUsableChannels* p = wifi_lan_usable_channels_; + return p != nullptr ? *p : reinterpret_cast( + ::location::nearby::connections::_WifiLanUsableChannels_default_instance_); +} +inline const ::location::nearby::connections::WifiLanUsableChannels& MediumMetadata::wifi_lan_usable_channels() const { + // @@protoc_insertion_point(field_get:location.nearby.connections.MediumMetadata.wifi_lan_usable_channels) + return _internal_wifi_lan_usable_channels(); +} +inline void MediumMetadata::unsafe_arena_set_allocated_wifi_lan_usable_channels( + ::location::nearby::connections::WifiLanUsableChannels* wifi_lan_usable_channels) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(wifi_lan_usable_channels_); + } + wifi_lan_usable_channels_ = wifi_lan_usable_channels; + if (wifi_lan_usable_channels) { + _has_bits_[0] |= 0x00000010u; + } else { + _has_bits_[0] &= ~0x00000010u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:location.nearby.connections.MediumMetadata.wifi_lan_usable_channels) +} +inline ::location::nearby::connections::WifiLanUsableChannels* MediumMetadata::release_wifi_lan_usable_channels() { + _has_bits_[0] &= ~0x00000010u; + ::location::nearby::connections::WifiLanUsableChannels* temp = wifi_lan_usable_channels_; + wifi_lan_usable_channels_ = 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 ::location::nearby::connections::WifiLanUsableChannels* MediumMetadata::unsafe_arena_release_wifi_lan_usable_channels() { + // @@protoc_insertion_point(field_release:location.nearby.connections.MediumMetadata.wifi_lan_usable_channels) + _has_bits_[0] &= ~0x00000010u; + ::location::nearby::connections::WifiLanUsableChannels* temp = wifi_lan_usable_channels_; + wifi_lan_usable_channels_ = nullptr; + return temp; +} +inline ::location::nearby::connections::WifiLanUsableChannels* MediumMetadata::_internal_mutable_wifi_lan_usable_channels() { + _has_bits_[0] |= 0x00000010u; + if (wifi_lan_usable_channels_ == nullptr) { + auto* p = CreateMaybeMessage<::location::nearby::connections::WifiLanUsableChannels>(GetArenaForAllocation()); + wifi_lan_usable_channels_ = p; + } + return wifi_lan_usable_channels_; +} +inline ::location::nearby::connections::WifiLanUsableChannels* MediumMetadata::mutable_wifi_lan_usable_channels() { + ::location::nearby::connections::WifiLanUsableChannels* _msg = _internal_mutable_wifi_lan_usable_channels(); + // @@protoc_insertion_point(field_mutable:location.nearby.connections.MediumMetadata.wifi_lan_usable_channels) + return _msg; +} +inline void MediumMetadata::set_allocated_wifi_lan_usable_channels(::location::nearby::connections::WifiLanUsableChannels* wifi_lan_usable_channels) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete wifi_lan_usable_channels_; + } + if (wifi_lan_usable_channels) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::location::nearby::connections::WifiLanUsableChannels>::GetOwningArena(wifi_lan_usable_channels); + if (message_arena != submessage_arena) { + wifi_lan_usable_channels = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, wifi_lan_usable_channels, submessage_arena); + } + _has_bits_[0] |= 0x00000010u; + } else { + _has_bits_[0] &= ~0x00000010u; + } + wifi_lan_usable_channels_ = wifi_lan_usable_channels; + // @@protoc_insertion_point(field_set_allocated:location.nearby.connections.MediumMetadata.wifi_lan_usable_channels) +} + +// optional .location.nearby.connections.WifiAwareUsableChannels wifi_aware_usable_channels = 10; +inline bool MediumMetadata::_internal_has_wifi_aware_usable_channels() const { + bool value = (_has_bits_[0] & 0x00000020u) != 0; + PROTOBUF_ASSUME(!value || wifi_aware_usable_channels_ != nullptr); + return value; +} +inline bool MediumMetadata::has_wifi_aware_usable_channels() const { + return _internal_has_wifi_aware_usable_channels(); +} +inline void MediumMetadata::clear_wifi_aware_usable_channels() { + if (wifi_aware_usable_channels_ != nullptr) wifi_aware_usable_channels_->Clear(); + _has_bits_[0] &= ~0x00000020u; +} +inline const ::location::nearby::connections::WifiAwareUsableChannels& MediumMetadata::_internal_wifi_aware_usable_channels() const { + const ::location::nearby::connections::WifiAwareUsableChannels* p = wifi_aware_usable_channels_; + return p != nullptr ? *p : reinterpret_cast( + ::location::nearby::connections::_WifiAwareUsableChannels_default_instance_); +} +inline const ::location::nearby::connections::WifiAwareUsableChannels& MediumMetadata::wifi_aware_usable_channels() const { + // @@protoc_insertion_point(field_get:location.nearby.connections.MediumMetadata.wifi_aware_usable_channels) + return _internal_wifi_aware_usable_channels(); +} +inline void MediumMetadata::unsafe_arena_set_allocated_wifi_aware_usable_channels( + ::location::nearby::connections::WifiAwareUsableChannels* wifi_aware_usable_channels) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(wifi_aware_usable_channels_); + } + wifi_aware_usable_channels_ = wifi_aware_usable_channels; + if (wifi_aware_usable_channels) { + _has_bits_[0] |= 0x00000020u; + } else { + _has_bits_[0] &= ~0x00000020u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:location.nearby.connections.MediumMetadata.wifi_aware_usable_channels) +} +inline ::location::nearby::connections::WifiAwareUsableChannels* MediumMetadata::release_wifi_aware_usable_channels() { + _has_bits_[0] &= ~0x00000020u; + ::location::nearby::connections::WifiAwareUsableChannels* temp = wifi_aware_usable_channels_; + wifi_aware_usable_channels_ = 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 ::location::nearby::connections::WifiAwareUsableChannels* MediumMetadata::unsafe_arena_release_wifi_aware_usable_channels() { + // @@protoc_insertion_point(field_release:location.nearby.connections.MediumMetadata.wifi_aware_usable_channels) + _has_bits_[0] &= ~0x00000020u; + ::location::nearby::connections::WifiAwareUsableChannels* temp = wifi_aware_usable_channels_; + wifi_aware_usable_channels_ = nullptr; + return temp; +} +inline ::location::nearby::connections::WifiAwareUsableChannels* MediumMetadata::_internal_mutable_wifi_aware_usable_channels() { + _has_bits_[0] |= 0x00000020u; + if (wifi_aware_usable_channels_ == nullptr) { + auto* p = CreateMaybeMessage<::location::nearby::connections::WifiAwareUsableChannels>(GetArenaForAllocation()); + wifi_aware_usable_channels_ = p; + } + return wifi_aware_usable_channels_; +} +inline ::location::nearby::connections::WifiAwareUsableChannels* MediumMetadata::mutable_wifi_aware_usable_channels() { + ::location::nearby::connections::WifiAwareUsableChannels* _msg = _internal_mutable_wifi_aware_usable_channels(); + // @@protoc_insertion_point(field_mutable:location.nearby.connections.MediumMetadata.wifi_aware_usable_channels) + return _msg; +} +inline void MediumMetadata::set_allocated_wifi_aware_usable_channels(::location::nearby::connections::WifiAwareUsableChannels* wifi_aware_usable_channels) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete wifi_aware_usable_channels_; + } + if (wifi_aware_usable_channels) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::location::nearby::connections::WifiAwareUsableChannels>::GetOwningArena(wifi_aware_usable_channels); + if (message_arena != submessage_arena) { + wifi_aware_usable_channels = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, wifi_aware_usable_channels, submessage_arena); + } + _has_bits_[0] |= 0x00000020u; + } else { + _has_bits_[0] &= ~0x00000020u; + } + wifi_aware_usable_channels_ = wifi_aware_usable_channels; + // @@protoc_insertion_point(field_set_allocated:location.nearby.connections.MediumMetadata.wifi_aware_usable_channels) +} + +// optional .location.nearby.connections.WifiHotspotStaUsableChannels wifi_hotspot_sta_usable_channels = 11; +inline bool MediumMetadata::_internal_has_wifi_hotspot_sta_usable_channels() const { + bool value = (_has_bits_[0] & 0x00000040u) != 0; + PROTOBUF_ASSUME(!value || wifi_hotspot_sta_usable_channels_ != nullptr); + return value; +} +inline bool MediumMetadata::has_wifi_hotspot_sta_usable_channels() const { + return _internal_has_wifi_hotspot_sta_usable_channels(); +} +inline void MediumMetadata::clear_wifi_hotspot_sta_usable_channels() { + if (wifi_hotspot_sta_usable_channels_ != nullptr) wifi_hotspot_sta_usable_channels_->Clear(); + _has_bits_[0] &= ~0x00000040u; +} +inline const ::location::nearby::connections::WifiHotspotStaUsableChannels& MediumMetadata::_internal_wifi_hotspot_sta_usable_channels() const { + const ::location::nearby::connections::WifiHotspotStaUsableChannels* p = wifi_hotspot_sta_usable_channels_; + return p != nullptr ? *p : reinterpret_cast( + ::location::nearby::connections::_WifiHotspotStaUsableChannels_default_instance_); +} +inline const ::location::nearby::connections::WifiHotspotStaUsableChannels& MediumMetadata::wifi_hotspot_sta_usable_channels() const { + // @@protoc_insertion_point(field_get:location.nearby.connections.MediumMetadata.wifi_hotspot_sta_usable_channels) + return _internal_wifi_hotspot_sta_usable_channels(); +} +inline void MediumMetadata::unsafe_arena_set_allocated_wifi_hotspot_sta_usable_channels( + ::location::nearby::connections::WifiHotspotStaUsableChannels* wifi_hotspot_sta_usable_channels) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(wifi_hotspot_sta_usable_channels_); + } + wifi_hotspot_sta_usable_channels_ = wifi_hotspot_sta_usable_channels; + if (wifi_hotspot_sta_usable_channels) { + _has_bits_[0] |= 0x00000040u; + } else { + _has_bits_[0] &= ~0x00000040u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:location.nearby.connections.MediumMetadata.wifi_hotspot_sta_usable_channels) +} +inline ::location::nearby::connections::WifiHotspotStaUsableChannels* MediumMetadata::release_wifi_hotspot_sta_usable_channels() { + _has_bits_[0] &= ~0x00000040u; + ::location::nearby::connections::WifiHotspotStaUsableChannels* temp = wifi_hotspot_sta_usable_channels_; + wifi_hotspot_sta_usable_channels_ = 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 ::location::nearby::connections::WifiHotspotStaUsableChannels* MediumMetadata::unsafe_arena_release_wifi_hotspot_sta_usable_channels() { + // @@protoc_insertion_point(field_release:location.nearby.connections.MediumMetadata.wifi_hotspot_sta_usable_channels) + _has_bits_[0] &= ~0x00000040u; + ::location::nearby::connections::WifiHotspotStaUsableChannels* temp = wifi_hotspot_sta_usable_channels_; + wifi_hotspot_sta_usable_channels_ = nullptr; + return temp; +} +inline ::location::nearby::connections::WifiHotspotStaUsableChannels* MediumMetadata::_internal_mutable_wifi_hotspot_sta_usable_channels() { + _has_bits_[0] |= 0x00000040u; + if (wifi_hotspot_sta_usable_channels_ == nullptr) { + auto* p = CreateMaybeMessage<::location::nearby::connections::WifiHotspotStaUsableChannels>(GetArenaForAllocation()); + wifi_hotspot_sta_usable_channels_ = p; + } + return wifi_hotspot_sta_usable_channels_; +} +inline ::location::nearby::connections::WifiHotspotStaUsableChannels* MediumMetadata::mutable_wifi_hotspot_sta_usable_channels() { + ::location::nearby::connections::WifiHotspotStaUsableChannels* _msg = _internal_mutable_wifi_hotspot_sta_usable_channels(); + // @@protoc_insertion_point(field_mutable:location.nearby.connections.MediumMetadata.wifi_hotspot_sta_usable_channels) + return _msg; +} +inline void MediumMetadata::set_allocated_wifi_hotspot_sta_usable_channels(::location::nearby::connections::WifiHotspotStaUsableChannels* wifi_hotspot_sta_usable_channels) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete wifi_hotspot_sta_usable_channels_; + } + if (wifi_hotspot_sta_usable_channels) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::location::nearby::connections::WifiHotspotStaUsableChannels>::GetOwningArena(wifi_hotspot_sta_usable_channels); + if (message_arena != submessage_arena) { + wifi_hotspot_sta_usable_channels = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, wifi_hotspot_sta_usable_channels, submessage_arena); + } + _has_bits_[0] |= 0x00000040u; + } else { + _has_bits_[0] &= ~0x00000040u; + } + wifi_hotspot_sta_usable_channels_ = wifi_hotspot_sta_usable_channels; + // @@protoc_insertion_point(field_set_allocated:location.nearby.connections.MediumMetadata.wifi_hotspot_sta_usable_channels) +} + +// ------------------------------------------------------------------- + +// AvailableChannels + +// repeated int32 channels = 1 [packed = true]; +inline int AvailableChannels::_internal_channels_size() const { + return channels_.size(); +} +inline int AvailableChannels::channels_size() const { + return _internal_channels_size(); +} +inline void AvailableChannels::clear_channels() { + channels_.Clear(); +} +inline int32_t AvailableChannels::_internal_channels(int index) const { + return channels_.Get(index); +} +inline int32_t AvailableChannels::channels(int index) const { + // @@protoc_insertion_point(field_get:location.nearby.connections.AvailableChannels.channels) + return _internal_channels(index); +} +inline void AvailableChannels::set_channels(int index, int32_t value) { + channels_.Set(index, value); + // @@protoc_insertion_point(field_set:location.nearby.connections.AvailableChannels.channels) +} +inline void AvailableChannels::_internal_add_channels(int32_t value) { + channels_.Add(value); +} +inline void AvailableChannels::add_channels(int32_t value) { + _internal_add_channels(value); + // @@protoc_insertion_point(field_add:location.nearby.connections.AvailableChannels.channels) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >& +AvailableChannels::_internal_channels() const { + return channels_; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >& +AvailableChannels::channels() const { + // @@protoc_insertion_point(field_list:location.nearby.connections.AvailableChannels.channels) + return _internal_channels(); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >* +AvailableChannels::_internal_mutable_channels() { + return &channels_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >* +AvailableChannels::mutable_channels() { + // @@protoc_insertion_point(field_mutable_list:location.nearby.connections.AvailableChannels.channels) + return _internal_mutable_channels(); +} + +// ------------------------------------------------------------------- + +// WifiDirectCliUsableChannels + +// repeated int32 channels = 1 [packed = true]; +inline int WifiDirectCliUsableChannels::_internal_channels_size() const { + return channels_.size(); +} +inline int WifiDirectCliUsableChannels::channels_size() const { + return _internal_channels_size(); +} +inline void WifiDirectCliUsableChannels::clear_channels() { + channels_.Clear(); +} +inline int32_t WifiDirectCliUsableChannels::_internal_channels(int index) const { + return channels_.Get(index); +} +inline int32_t WifiDirectCliUsableChannels::channels(int index) const { + // @@protoc_insertion_point(field_get:location.nearby.connections.WifiDirectCliUsableChannels.channels) + return _internal_channels(index); +} +inline void WifiDirectCliUsableChannels::set_channels(int index, int32_t value) { + channels_.Set(index, value); + // @@protoc_insertion_point(field_set:location.nearby.connections.WifiDirectCliUsableChannels.channels) +} +inline void WifiDirectCliUsableChannels::_internal_add_channels(int32_t value) { + channels_.Add(value); +} +inline void WifiDirectCliUsableChannels::add_channels(int32_t value) { + _internal_add_channels(value); + // @@protoc_insertion_point(field_add:location.nearby.connections.WifiDirectCliUsableChannels.channels) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >& +WifiDirectCliUsableChannels::_internal_channels() const { + return channels_; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >& +WifiDirectCliUsableChannels::channels() const { + // @@protoc_insertion_point(field_list:location.nearby.connections.WifiDirectCliUsableChannels.channels) + return _internal_channels(); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >* +WifiDirectCliUsableChannels::_internal_mutable_channels() { + return &channels_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >* +WifiDirectCliUsableChannels::mutable_channels() { + // @@protoc_insertion_point(field_mutable_list:location.nearby.connections.WifiDirectCliUsableChannels.channels) + return _internal_mutable_channels(); +} + +// ------------------------------------------------------------------- + +// WifiLanUsableChannels + +// repeated int32 channels = 1 [packed = true]; +inline int WifiLanUsableChannels::_internal_channels_size() const { + return channels_.size(); +} +inline int WifiLanUsableChannels::channels_size() const { + return _internal_channels_size(); +} +inline void WifiLanUsableChannels::clear_channels() { + channels_.Clear(); +} +inline int32_t WifiLanUsableChannels::_internal_channels(int index) const { + return channels_.Get(index); +} +inline int32_t WifiLanUsableChannels::channels(int index) const { + // @@protoc_insertion_point(field_get:location.nearby.connections.WifiLanUsableChannels.channels) + return _internal_channels(index); +} +inline void WifiLanUsableChannels::set_channels(int index, int32_t value) { + channels_.Set(index, value); + // @@protoc_insertion_point(field_set:location.nearby.connections.WifiLanUsableChannels.channels) +} +inline void WifiLanUsableChannels::_internal_add_channels(int32_t value) { + channels_.Add(value); +} +inline void WifiLanUsableChannels::add_channels(int32_t value) { + _internal_add_channels(value); + // @@protoc_insertion_point(field_add:location.nearby.connections.WifiLanUsableChannels.channels) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >& +WifiLanUsableChannels::_internal_channels() const { + return channels_; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >& +WifiLanUsableChannels::channels() const { + // @@protoc_insertion_point(field_list:location.nearby.connections.WifiLanUsableChannels.channels) + return _internal_channels(); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >* +WifiLanUsableChannels::_internal_mutable_channels() { + return &channels_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >* +WifiLanUsableChannels::mutable_channels() { + // @@protoc_insertion_point(field_mutable_list:location.nearby.connections.WifiLanUsableChannels.channels) + return _internal_mutable_channels(); +} + +// ------------------------------------------------------------------- + +// WifiAwareUsableChannels + +// repeated int32 channels = 1 [packed = true]; +inline int WifiAwareUsableChannels::_internal_channels_size() const { + return channels_.size(); +} +inline int WifiAwareUsableChannels::channels_size() const { + return _internal_channels_size(); +} +inline void WifiAwareUsableChannels::clear_channels() { + channels_.Clear(); +} +inline int32_t WifiAwareUsableChannels::_internal_channels(int index) const { + return channels_.Get(index); +} +inline int32_t WifiAwareUsableChannels::channels(int index) const { + // @@protoc_insertion_point(field_get:location.nearby.connections.WifiAwareUsableChannels.channels) + return _internal_channels(index); +} +inline void WifiAwareUsableChannels::set_channels(int index, int32_t value) { + channels_.Set(index, value); + // @@protoc_insertion_point(field_set:location.nearby.connections.WifiAwareUsableChannels.channels) +} +inline void WifiAwareUsableChannels::_internal_add_channels(int32_t value) { + channels_.Add(value); +} +inline void WifiAwareUsableChannels::add_channels(int32_t value) { + _internal_add_channels(value); + // @@protoc_insertion_point(field_add:location.nearby.connections.WifiAwareUsableChannels.channels) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >& +WifiAwareUsableChannels::_internal_channels() const { + return channels_; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >& +WifiAwareUsableChannels::channels() const { + // @@protoc_insertion_point(field_list:location.nearby.connections.WifiAwareUsableChannels.channels) + return _internal_channels(); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >* +WifiAwareUsableChannels::_internal_mutable_channels() { + return &channels_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >* +WifiAwareUsableChannels::mutable_channels() { + // @@protoc_insertion_point(field_mutable_list:location.nearby.connections.WifiAwareUsableChannels.channels) + return _internal_mutable_channels(); +} + +// ------------------------------------------------------------------- + +// WifiHotspotStaUsableChannels + +// repeated int32 channels = 1 [packed = true]; +inline int WifiHotspotStaUsableChannels::_internal_channels_size() const { + return channels_.size(); +} +inline int WifiHotspotStaUsableChannels::channels_size() const { + return _internal_channels_size(); +} +inline void WifiHotspotStaUsableChannels::clear_channels() { + channels_.Clear(); +} +inline int32_t WifiHotspotStaUsableChannels::_internal_channels(int index) const { + return channels_.Get(index); +} +inline int32_t WifiHotspotStaUsableChannels::channels(int index) const { + // @@protoc_insertion_point(field_get:location.nearby.connections.WifiHotspotStaUsableChannels.channels) + return _internal_channels(index); +} +inline void WifiHotspotStaUsableChannels::set_channels(int index, int32_t value) { + channels_.Set(index, value); + // @@protoc_insertion_point(field_set:location.nearby.connections.WifiHotspotStaUsableChannels.channels) +} +inline void WifiHotspotStaUsableChannels::_internal_add_channels(int32_t value) { + channels_.Add(value); +} +inline void WifiHotspotStaUsableChannels::add_channels(int32_t value) { + _internal_add_channels(value); + // @@protoc_insertion_point(field_add:location.nearby.connections.WifiHotspotStaUsableChannels.channels) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >& +WifiHotspotStaUsableChannels::_internal_channels() const { + return channels_; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >& +WifiHotspotStaUsableChannels::channels() const { + // @@protoc_insertion_point(field_list:location.nearby.connections.WifiHotspotStaUsableChannels.channels) + return _internal_channels(); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >* +WifiHotspotStaUsableChannels::_internal_mutable_channels() { + return &channels_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >* +WifiHotspotStaUsableChannels::mutable_channels() { + // @@protoc_insertion_point(field_mutable_list:location.nearby.connections.WifiHotspotStaUsableChannels.channels) + return _internal_mutable_channels(); +} + +// ------------------------------------------------------------------- + +// LocationHint + +// optional string location = 1; +inline bool LocationHint::_internal_has_location() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool LocationHint::has_location() const { + return _internal_has_location(); +} +inline void LocationHint::clear_location() { + location_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& LocationHint::location() const { + // @@protoc_insertion_point(field_get:location.nearby.connections.LocationHint.location) + return _internal_location(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void LocationHint::set_location(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + location_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:location.nearby.connections.LocationHint.location) +} +inline std::string* LocationHint::mutable_location() { + std::string* _s = _internal_mutable_location(); + // @@protoc_insertion_point(field_mutable:location.nearby.connections.LocationHint.location) + return _s; +} +inline const std::string& LocationHint::_internal_location() const { + return location_.Get(); +} +inline void LocationHint::_internal_set_location(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + location_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* LocationHint::_internal_mutable_location() { + _has_bits_[0] |= 0x00000001u; + return location_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* LocationHint::release_location() { + // @@protoc_insertion_point(field_release:location.nearby.connections.LocationHint.location) + if (!_internal_has_location()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = location_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (location_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + location_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void LocationHint::set_allocated_location(std::string* location) { + if (location != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + location_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), location, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (location_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + location_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:location.nearby.connections.LocationHint.location) +} + +// optional .location.nearby.connections.LocationStandard.Format format = 2; +inline bool LocationHint::_internal_has_format() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool LocationHint::has_format() const { + return _internal_has_format(); +} +inline void LocationHint::clear_format() { + format_ = 0; + _has_bits_[0] &= ~0x00000002u; +} +inline ::location::nearby::connections::LocationStandard_Format LocationHint::_internal_format() const { + return static_cast< ::location::nearby::connections::LocationStandard_Format >(format_); +} +inline ::location::nearby::connections::LocationStandard_Format LocationHint::format() const { + // @@protoc_insertion_point(field_get:location.nearby.connections.LocationHint.format) + return _internal_format(); +} +inline void LocationHint::_internal_set_format(::location::nearby::connections::LocationStandard_Format value) { + assert(::location::nearby::connections::LocationStandard_Format_IsValid(value)); + _has_bits_[0] |= 0x00000002u; + format_ = value; +} +inline void LocationHint::set_format(::location::nearby::connections::LocationStandard_Format value) { + _internal_set_format(value); + // @@protoc_insertion_point(field_set:location.nearby.connections.LocationHint.format) +} + +// ------------------------------------------------------------------- + +// LocationStandard + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace connections +} // namespace nearby +} // namespace location + +PROTOBUF_NAMESPACE_OPEN + +template <> struct is_proto_enum< ::location::nearby::connections::OfflineFrame_Version> : ::std::true_type {}; +template <> struct is_proto_enum< ::location::nearby::connections::V1Frame_FrameType> : ::std::true_type {}; +template <> struct is_proto_enum< ::location::nearby::connections::ConnectionRequestFrame_Medium> : ::std::true_type {}; +template <> struct is_proto_enum< ::location::nearby::connections::ConnectionResponseFrame_ResponseStatus> : ::std::true_type {}; +template <> struct is_proto_enum< ::location::nearby::connections::PayloadTransferFrame_PayloadHeader_PayloadType> : ::std::true_type {}; +template <> struct is_proto_enum< ::location::nearby::connections::PayloadTransferFrame_PayloadChunk_Flags> : ::std::true_type {}; +template <> struct is_proto_enum< ::location::nearby::connections::PayloadTransferFrame_ControlMessage_EventType> : ::std::true_type {}; +template <> struct is_proto_enum< ::location::nearby::connections::PayloadTransferFrame_PacketType> : ::std::true_type {}; +template <> struct is_proto_enum< ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_UpgradePathInfo_Medium> : ::std::true_type {}; +template <> struct is_proto_enum< ::location::nearby::connections::BandwidthUpgradeNegotiationFrame_EventType> : ::std::true_type {}; +template <> struct is_proto_enum< ::location::nearby::connections::LocationStandard_Format> : ::std::true_type {}; + +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_connections_2fimplementation_2fproto_2foffline_5fwire_5fformats_2eproto diff --git a/internal/proto/analytics/connections_log.pb.cc b/internal/proto/analytics/connections_log.pb.cc new file mode 100644 index 00000000..4fbe867a --- /dev/null +++ b/internal/proto/analytics/connections_log.pb.cc @@ -0,0 +1,7261 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: internal/proto/analytics/connections_log.proto + +#include "internal/proto/analytics/connections_log.pb.h" + +#include + +#include +#include +#include +#include +// @@protoc_insertion_point(includes) +#include + +PROTOBUF_PRAGMA_INIT_SEG +namespace location { +namespace nearby { +namespace analytics { +namespace proto { +constexpr ConnectionsLog_ClientSession::ConnectionsLog_ClientSession( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : strategy_session_() + , duration_millis_(int64_t{0}){} +struct ConnectionsLog_ClientSessionDefaultTypeInternal { + constexpr ConnectionsLog_ClientSessionDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~ConnectionsLog_ClientSessionDefaultTypeInternal() {} + union { + ConnectionsLog_ClientSession _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ConnectionsLog_ClientSessionDefaultTypeInternal _ConnectionsLog_ClientSession_default_instance_; +constexpr ConnectionsLog_StrategySession::ConnectionsLog_StrategySession( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : role_() + , discovery_phase_() + , advertising_phase_() + , connection_attempt_() + , established_connection_() + , upgrade_attempt_() + , build_version_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , duration_millis_(int64_t{0}) + , strategy_(0) +{} +struct ConnectionsLog_StrategySessionDefaultTypeInternal { + constexpr ConnectionsLog_StrategySessionDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~ConnectionsLog_StrategySessionDefaultTypeInternal() {} + union { + ConnectionsLog_StrategySession _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ConnectionsLog_StrategySessionDefaultTypeInternal _ConnectionsLog_StrategySession_default_instance_; +constexpr ConnectionsLog_DiscoveryPhase::ConnectionsLog_DiscoveryPhase( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : medium_() + , discovered_endpoint_() + , sent_connection_request_() + , uwb_ranging_() + , discovery_metadata_(nullptr) + , duration_millis_(int64_t{0}) + , client_flow_id_(int64_t{0}){} +struct ConnectionsLog_DiscoveryPhaseDefaultTypeInternal { + constexpr ConnectionsLog_DiscoveryPhaseDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~ConnectionsLog_DiscoveryPhaseDefaultTypeInternal() {} + union { + ConnectionsLog_DiscoveryPhase _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ConnectionsLog_DiscoveryPhaseDefaultTypeInternal _ConnectionsLog_DiscoveryPhase_default_instance_; +constexpr ConnectionsLog_DiscoveredEndpoint::ConnectionsLog_DiscoveredEndpoint( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : latency_millis_(int64_t{0}) + , medium_(0) +{} +struct ConnectionsLog_DiscoveredEndpointDefaultTypeInternal { + constexpr ConnectionsLog_DiscoveredEndpointDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~ConnectionsLog_DiscoveredEndpointDefaultTypeInternal() {} + union { + ConnectionsLog_DiscoveredEndpoint _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ConnectionsLog_DiscoveredEndpointDefaultTypeInternal _ConnectionsLog_DiscoveredEndpoint_default_instance_; +constexpr ConnectionsLog_UwbRangingProcess::ConnectionsLog_UwbRangingProcess( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : uwb_ranging_data_() + , duration_millis_(int64_t{0}) + , number_of_ranging_data_(0) + , distance_min_(0) + , distance_max_(0) + , distance_ave_(0) + , distance_variance_(0) + , azimuth_min_(0) + , azimuth_max_(0) + , azimuth_ave_(0) + , azimuth_variance_(0){} +struct ConnectionsLog_UwbRangingProcessDefaultTypeInternal { + constexpr ConnectionsLog_UwbRangingProcessDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~ConnectionsLog_UwbRangingProcessDefaultTypeInternal() {} + union { + ConnectionsLog_UwbRangingProcess _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ConnectionsLog_UwbRangingProcessDefaultTypeInternal _ConnectionsLog_UwbRangingProcess_default_instance_; +constexpr ConnectionsLog_RawUwbRangingEvent::ConnectionsLog_RawUwbRangingEvent( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : distance_(0) + , azimuth_angle_(0) + , polar_angle_(0){} +struct ConnectionsLog_RawUwbRangingEventDefaultTypeInternal { + constexpr ConnectionsLog_RawUwbRangingEventDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~ConnectionsLog_RawUwbRangingEventDefaultTypeInternal() {} + union { + ConnectionsLog_RawUwbRangingEvent _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ConnectionsLog_RawUwbRangingEventDefaultTypeInternal _ConnectionsLog_RawUwbRangingEvent_default_instance_; +constexpr ConnectionsLog_AdvertisingPhase::ConnectionsLog_AdvertisingPhase( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : medium_() + , received_connection_request_() + , advertising_metadata_(nullptr) + , duration_millis_(int64_t{0}) + , client_flow_id_(int64_t{0}){} +struct ConnectionsLog_AdvertisingPhaseDefaultTypeInternal { + constexpr ConnectionsLog_AdvertisingPhaseDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~ConnectionsLog_AdvertisingPhaseDefaultTypeInternal() {} + union { + ConnectionsLog_AdvertisingPhase _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ConnectionsLog_AdvertisingPhaseDefaultTypeInternal _ConnectionsLog_AdvertisingPhase_default_instance_; +constexpr ConnectionsLog_ConnectionRequest::ConnectionsLog_ConnectionRequest( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : duration_millis_(int64_t{0}) + , request_delay_millis_(int64_t{0}) + , local_response_(0) + + , remote_response_(0) + + , client_flow_id_(int64_t{0}){} +struct ConnectionsLog_ConnectionRequestDefaultTypeInternal { + constexpr ConnectionsLog_ConnectionRequestDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~ConnectionsLog_ConnectionRequestDefaultTypeInternal() {} + union { + ConnectionsLog_ConnectionRequest _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ConnectionsLog_ConnectionRequestDefaultTypeInternal _ConnectionsLog_ConnectionRequest_default_instance_; +constexpr ConnectionsLog_ConnectionAttempt::ConnectionsLog_ConnectionAttempt( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : connection_token_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , connection_attempt_metadata_(nullptr) + , duration_millis_(int64_t{0}) + , type_(0) + + , direction_(0) + + , medium_(0) + + , attempt_result_(0) + + , client_flow_id_(int64_t{0}){} +struct ConnectionsLog_ConnectionAttemptDefaultTypeInternal { + constexpr ConnectionsLog_ConnectionAttemptDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~ConnectionsLog_ConnectionAttemptDefaultTypeInternal() {} + union { + ConnectionsLog_ConnectionAttempt _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ConnectionsLog_ConnectionAttemptDefaultTypeInternal _ConnectionsLog_ConnectionAttempt_default_instance_; +constexpr ConnectionsLog_EstablishedConnection::ConnectionsLog_EstablishedConnection( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : sent_payload_() + , received_payload_() + , connection_token_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , duration_millis_(int64_t{0}) + , medium_(0) + + , disconnection_reason_(0) + + , client_flow_id_(int64_t{0}){} +struct ConnectionsLog_EstablishedConnectionDefaultTypeInternal { + constexpr ConnectionsLog_EstablishedConnectionDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~ConnectionsLog_EstablishedConnectionDefaultTypeInternal() {} + union { + ConnectionsLog_EstablishedConnection _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ConnectionsLog_EstablishedConnectionDefaultTypeInternal _ConnectionsLog_EstablishedConnection_default_instance_; +constexpr ConnectionsLog_Payload::ConnectionsLog_Payload( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : duration_millis_(int64_t{0}) + , total_size_bytes_(int64_t{0}) + , type_(0) + + , num_chunks_(0) + , num_bytes_transferred_(int64_t{0}) + , status_(0) +{} +struct ConnectionsLog_PayloadDefaultTypeInternal { + constexpr ConnectionsLog_PayloadDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~ConnectionsLog_PayloadDefaultTypeInternal() {} + union { + ConnectionsLog_Payload _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ConnectionsLog_PayloadDefaultTypeInternal _ConnectionsLog_Payload_default_instance_; +constexpr ConnectionsLog_BandwidthUpgradeAttempt::ConnectionsLog_BandwidthUpgradeAttempt( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : connection_token_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , duration_millis_(int64_t{0}) + , direction_(0) + + , from_medium_(0) + + , to_medium_(0) + + , upgrade_result_(0) + + , client_flow_id_(int64_t{0}) + , error_stage_(0) +{} +struct ConnectionsLog_BandwidthUpgradeAttemptDefaultTypeInternal { + constexpr ConnectionsLog_BandwidthUpgradeAttemptDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~ConnectionsLog_BandwidthUpgradeAttemptDefaultTypeInternal() {} + union { + ConnectionsLog_BandwidthUpgradeAttempt _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ConnectionsLog_BandwidthUpgradeAttemptDefaultTypeInternal _ConnectionsLog_BandwidthUpgradeAttempt_default_instance_; +constexpr ConnectionsLog_ErrorCode::ConnectionsLog_ErrorCode( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : service_id_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , connection_token_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , direction_(0) + + , medium_(0) + + , event_(0) + + , description_(0) + + , flow_id_(int64_t{0}) + , _oneof_case_{}{} +struct ConnectionsLog_ErrorCodeDefaultTypeInternal { + constexpr ConnectionsLog_ErrorCodeDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~ConnectionsLog_ErrorCodeDefaultTypeInternal() {} + union { + ConnectionsLog_ErrorCode _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ConnectionsLog_ErrorCodeDefaultTypeInternal _ConnectionsLog_ErrorCode_default_instance_; +constexpr ConnectionsLog_AdvertisingMetadata::ConnectionsLog_AdvertisingMetadata( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : connected_ap_frequency_(0) + , supports_extended_ble_advertisements_(false) + , supports_nfc_technology_(false) + , multiple_advertisement_supported_(false){} +struct ConnectionsLog_AdvertisingMetadataDefaultTypeInternal { + constexpr ConnectionsLog_AdvertisingMetadataDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~ConnectionsLog_AdvertisingMetadataDefaultTypeInternal() {} + union { + ConnectionsLog_AdvertisingMetadata _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ConnectionsLog_AdvertisingMetadataDefaultTypeInternal _ConnectionsLog_AdvertisingMetadata_default_instance_; +constexpr ConnectionsLog_DiscoveryMetadata::ConnectionsLog_DiscoveryMetadata( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : connected_ap_frequency_(0) + , supports_extended_ble_advertisements_(false) + , supports_nfc_technology_(false){} +struct ConnectionsLog_DiscoveryMetadataDefaultTypeInternal { + constexpr ConnectionsLog_DiscoveryMetadataDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~ConnectionsLog_DiscoveryMetadataDefaultTypeInternal() {} + union { + ConnectionsLog_DiscoveryMetadata _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ConnectionsLog_DiscoveryMetadataDefaultTypeInternal _ConnectionsLog_DiscoveryMetadata_default_instance_; +constexpr ConnectionsLog_ConnectionAttemptMetadata::ConnectionsLog_ConnectionAttemptMetadata( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : network_operator_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , country_code_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , technology_(0) + + , band_(0) + + , frequency_(0) + , try_counts_(0) + , is_tdls_used_(false) + , wifi_hotspot_status_(false) + , max_tx_speed_(0) + , max_rx_speed_(0) + , wifi_channel_width_(0) + , send_buffer_size_(0) + , receive_buffer_size_(0){} +struct ConnectionsLog_ConnectionAttemptMetadataDefaultTypeInternal { + constexpr ConnectionsLog_ConnectionAttemptMetadataDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~ConnectionsLog_ConnectionAttemptMetadataDefaultTypeInternal() {} + union { + ConnectionsLog_ConnectionAttemptMetadata _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ConnectionsLog_ConnectionAttemptMetadataDefaultTypeInternal _ConnectionsLog_ConnectionAttemptMetadata_default_instance_; +constexpr ConnectionsLog::ConnectionsLog( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : version_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , files_migration_phase_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , client_session_(nullptr) + , error_code_(nullptr) + , event_type_(0) + + , log_source_(0) +{} +struct ConnectionsLogDefaultTypeInternal { + constexpr ConnectionsLogDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~ConnectionsLogDefaultTypeInternal() {} + union { + ConnectionsLog _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ConnectionsLogDefaultTypeInternal _ConnectionsLog_default_instance_; +} // namespace proto +} // namespace analytics +} // namespace nearby +} // namespace location +namespace location { +namespace nearby { +namespace analytics { +namespace proto { + +// =================================================================== + +class ConnectionsLog_ClientSession::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_duration_millis(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } +}; + +ConnectionsLog_ClientSession::ConnectionsLog_ClientSession(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned), + strategy_session_(arena) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:location.nearby.analytics.proto.ConnectionsLog.ClientSession) +} +ConnectionsLog_ClientSession::ConnectionsLog_ClientSession(const ConnectionsLog_ClientSession& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_), + strategy_session_(from.strategy_session_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + duration_millis_ = from.duration_millis_; + // @@protoc_insertion_point(copy_constructor:location.nearby.analytics.proto.ConnectionsLog.ClientSession) +} + +inline void ConnectionsLog_ClientSession::SharedCtor() { +duration_millis_ = int64_t{0}; +} + +ConnectionsLog_ClientSession::~ConnectionsLog_ClientSession() { + // @@protoc_insertion_point(destructor:location.nearby.analytics.proto.ConnectionsLog.ClientSession) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void ConnectionsLog_ClientSession::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); +} + +void ConnectionsLog_ClientSession::ArenaDtor(void* object) { + ConnectionsLog_ClientSession* _this = reinterpret_cast< ConnectionsLog_ClientSession* >(object); + (void)_this; +} +void ConnectionsLog_ClientSession::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void ConnectionsLog_ClientSession::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void ConnectionsLog_ClientSession::Clear() { +// @@protoc_insertion_point(message_clear_start:location.nearby.analytics.proto.ConnectionsLog.ClientSession) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + strategy_session_.Clear(); + duration_millis_ = int64_t{0}; + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* ConnectionsLog_ClientSession::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional int64 duration_millis = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + _Internal::set_has_duration_millis(&has_bits); + duration_millis_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // repeated .location.nearby.analytics.proto.ConnectionsLog.StrategySession strategy_session = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_strategy_session(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* ConnectionsLog_ClientSession::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:location.nearby.analytics.proto.ConnectionsLog.ClientSession) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional int64 duration_millis = 1; + if (cached_has_bits & 0x00000001u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(1, this->_internal_duration_millis(), target); + } + + // repeated .location.nearby.analytics.proto.ConnectionsLog.StrategySession strategy_session = 2; + for (unsigned int i = 0, + n = static_cast(this->_internal_strategy_session_size()); i < n; i++) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(2, this->_internal_strategy_session(i), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:location.nearby.analytics.proto.ConnectionsLog.ClientSession) + return target; +} + +size_t ConnectionsLog_ClientSession::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:location.nearby.analytics.proto.ConnectionsLog.ClientSession) + 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 .location.nearby.analytics.proto.ConnectionsLog.StrategySession strategy_session = 2; + total_size += 1UL * this->_internal_strategy_session_size(); + for (const auto& msg : this->strategy_session_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + // optional int64 duration_millis = 1; + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_duration_millis()); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void ConnectionsLog_ClientSession::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void ConnectionsLog_ClientSession::MergeFrom(const ConnectionsLog_ClientSession& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:location.nearby.analytics.proto.ConnectionsLog.ClientSession) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + strategy_session_.MergeFrom(from.strategy_session_); + if (from._internal_has_duration_millis()) { + _internal_set_duration_millis(from._internal_duration_millis()); + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void ConnectionsLog_ClientSession::CopyFrom(const ConnectionsLog_ClientSession& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:location.nearby.analytics.proto.ConnectionsLog.ClientSession) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ConnectionsLog_ClientSession::IsInitialized() const { + return true; +} + +void ConnectionsLog_ClientSession::InternalSwap(ConnectionsLog_ClientSession* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + strategy_session_.InternalSwap(&other->strategy_session_); + swap(duration_millis_, other->duration_millis_); +} + +std::string ConnectionsLog_ClientSession::GetTypeName() const { + return "location.nearby.analytics.proto.ConnectionsLog.ClientSession"; +} + + +// =================================================================== + +class ConnectionsLog_StrategySession::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_duration_millis(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static void set_has_strategy(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } + static void set_has_build_version(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } +}; + +ConnectionsLog_StrategySession::ConnectionsLog_StrategySession(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned), + role_(arena), + discovery_phase_(arena), + advertising_phase_(arena), + connection_attempt_(arena), + established_connection_(arena), + upgrade_attempt_(arena) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:location.nearby.analytics.proto.ConnectionsLog.StrategySession) +} +ConnectionsLog_StrategySession::ConnectionsLog_StrategySession(const ConnectionsLog_StrategySession& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_), + role_(from.role_), + discovery_phase_(from.discovery_phase_), + advertising_phase_(from.advertising_phase_), + connection_attempt_(from.connection_attempt_), + established_connection_(from.established_connection_), + upgrade_attempt_(from.upgrade_attempt_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + build_version_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + build_version_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_build_version()) { + build_version_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_build_version(), + GetArenaForAllocation()); + } + ::memcpy(&duration_millis_, &from.duration_millis_, + static_cast(reinterpret_cast(&strategy_) - + reinterpret_cast(&duration_millis_)) + sizeof(strategy_)); + // @@protoc_insertion_point(copy_constructor:location.nearby.analytics.proto.ConnectionsLog.StrategySession) +} + +inline void ConnectionsLog_StrategySession::SharedCtor() { +build_version_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + build_version_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&duration_millis_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&strategy_) - + reinterpret_cast(&duration_millis_)) + sizeof(strategy_)); +} + +ConnectionsLog_StrategySession::~ConnectionsLog_StrategySession() { + // @@protoc_insertion_point(destructor:location.nearby.analytics.proto.ConnectionsLog.StrategySession) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void ConnectionsLog_StrategySession::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + build_version_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void ConnectionsLog_StrategySession::ArenaDtor(void* object) { + ConnectionsLog_StrategySession* _this = reinterpret_cast< ConnectionsLog_StrategySession* >(object); + (void)_this; +} +void ConnectionsLog_StrategySession::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void ConnectionsLog_StrategySession::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void ConnectionsLog_StrategySession::Clear() { +// @@protoc_insertion_point(message_clear_start:location.nearby.analytics.proto.ConnectionsLog.StrategySession) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + role_.Clear(); + discovery_phase_.Clear(); + advertising_phase_.Clear(); + connection_attempt_.Clear(); + established_connection_.Clear(); + upgrade_attempt_.Clear(); + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + build_version_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000006u) { + ::memset(&duration_millis_, 0, static_cast( + reinterpret_cast(&strategy_) - + reinterpret_cast(&duration_millis_)) + sizeof(strategy_)); + } + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* ConnectionsLog_StrategySession::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional int64 duration_millis = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + _Internal::set_has_duration_millis(&has_bits); + duration_millis_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .location.nearby.proto.connections.ConnectionsStrategy strategy = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::location::nearby::proto::connections::ConnectionsStrategy_IsValid(val))) { + _internal_set_strategy(static_cast<::location::nearby::proto::connections::ConnectionsStrategy>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(2, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // repeated .location.nearby.proto.connections.SessionRole role = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { + ptr -= 1; + do { + ptr += 1; + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::location::nearby::proto::connections::SessionRole_IsValid(val))) { + _internal_add_role(static_cast<::location::nearby::proto::connections::SessionRole>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(3, val, mutable_unknown_fields()); + } + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<24>(ptr)); + } else if (static_cast(tag) == 26) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedEnumParser(_internal_mutable_role(), ptr, ctx, ::location::nearby::proto::connections::SessionRole_IsValid, &_internal_metadata_, 3); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // repeated .location.nearby.analytics.proto.ConnectionsLog.DiscoveryPhase discovery_phase = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_discovery_phase(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<34>(ptr)); + } else + goto handle_unusual; + continue; + // repeated .location.nearby.analytics.proto.ConnectionsLog.AdvertisingPhase advertising_phase = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 42)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_advertising_phase(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<42>(ptr)); + } else + goto handle_unusual; + continue; + // repeated .location.nearby.analytics.proto.ConnectionsLog.ConnectionAttempt connection_attempt = 6; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 50)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_connection_attempt(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<50>(ptr)); + } else + goto handle_unusual; + continue; + // repeated .location.nearby.analytics.proto.ConnectionsLog.EstablishedConnection established_connection = 7; + case 7: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 58)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_established_connection(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<58>(ptr)); + } else + goto handle_unusual; + continue; + // repeated .location.nearby.analytics.proto.ConnectionsLog.BandwidthUpgradeAttempt upgrade_attempt = 9; + case 9: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 74)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_upgrade_attempt(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<74>(ptr)); + } else + goto handle_unusual; + continue; + // optional string build_version = 10; + case 10: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 82)) { + auto str = _internal_mutable_build_version(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* ConnectionsLog_StrategySession::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:location.nearby.analytics.proto.ConnectionsLog.StrategySession) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional int64 duration_millis = 1; + if (cached_has_bits & 0x00000002u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(1, this->_internal_duration_millis(), target); + } + + // optional .location.nearby.proto.connections.ConnectionsStrategy strategy = 2; + if (cached_has_bits & 0x00000004u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 2, this->_internal_strategy(), target); + } + + // repeated .location.nearby.proto.connections.SessionRole role = 3; + for (int i = 0, n = this->_internal_role_size(); i < n; i++) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 3, this->_internal_role(i), target); + } + + // repeated .location.nearby.analytics.proto.ConnectionsLog.DiscoveryPhase discovery_phase = 4; + for (unsigned int i = 0, + n = static_cast(this->_internal_discovery_phase_size()); i < n; i++) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(4, this->_internal_discovery_phase(i), target, stream); + } + + // repeated .location.nearby.analytics.proto.ConnectionsLog.AdvertisingPhase advertising_phase = 5; + for (unsigned int i = 0, + n = static_cast(this->_internal_advertising_phase_size()); i < n; i++) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(5, this->_internal_advertising_phase(i), target, stream); + } + + // repeated .location.nearby.analytics.proto.ConnectionsLog.ConnectionAttempt connection_attempt = 6; + for (unsigned int i = 0, + n = static_cast(this->_internal_connection_attempt_size()); i < n; i++) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(6, this->_internal_connection_attempt(i), target, stream); + } + + // repeated .location.nearby.analytics.proto.ConnectionsLog.EstablishedConnection established_connection = 7; + for (unsigned int i = 0, + n = static_cast(this->_internal_established_connection_size()); i < n; i++) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(7, this->_internal_established_connection(i), target, stream); + } + + // repeated .location.nearby.analytics.proto.ConnectionsLog.BandwidthUpgradeAttempt upgrade_attempt = 9; + for (unsigned int i = 0, + n = static_cast(this->_internal_upgrade_attempt_size()); i < n; i++) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(9, this->_internal_upgrade_attempt(i), target, stream); + } + + // optional string build_version = 10; + if (cached_has_bits & 0x00000001u) { + target = stream->WriteStringMaybeAliased( + 10, this->_internal_build_version(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:location.nearby.analytics.proto.ConnectionsLog.StrategySession) + return target; +} + +size_t ConnectionsLog_StrategySession::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:location.nearby.analytics.proto.ConnectionsLog.StrategySession) + 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 .location.nearby.proto.connections.SessionRole role = 3; + { + size_t data_size = 0; + unsigned int count = static_cast(this->_internal_role_size());for (unsigned int i = 0; i < count; i++) { + data_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize( + this->_internal_role(static_cast(i))); + } + total_size += (1UL * count) + data_size; + } + + // repeated .location.nearby.analytics.proto.ConnectionsLog.DiscoveryPhase discovery_phase = 4; + total_size += 1UL * this->_internal_discovery_phase_size(); + for (const auto& msg : this->discovery_phase_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + // repeated .location.nearby.analytics.proto.ConnectionsLog.AdvertisingPhase advertising_phase = 5; + total_size += 1UL * this->_internal_advertising_phase_size(); + for (const auto& msg : this->advertising_phase_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + // repeated .location.nearby.analytics.proto.ConnectionsLog.ConnectionAttempt connection_attempt = 6; + total_size += 1UL * this->_internal_connection_attempt_size(); + for (const auto& msg : this->connection_attempt_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + // repeated .location.nearby.analytics.proto.ConnectionsLog.EstablishedConnection established_connection = 7; + total_size += 1UL * this->_internal_established_connection_size(); + for (const auto& msg : this->established_connection_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + // repeated .location.nearby.analytics.proto.ConnectionsLog.BandwidthUpgradeAttempt upgrade_attempt = 9; + total_size += 1UL * this->_internal_upgrade_attempt_size(); + for (const auto& msg : this->upgrade_attempt_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + // optional string build_version = 10; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_build_version()); + } + + // optional int64 duration_millis = 1; + if (cached_has_bits & 0x00000002u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_duration_millis()); + } + + // optional .location.nearby.proto.connections.ConnectionsStrategy strategy = 2; + if (cached_has_bits & 0x00000004u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_strategy()); + } + + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void ConnectionsLog_StrategySession::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void ConnectionsLog_StrategySession::MergeFrom(const ConnectionsLog_StrategySession& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:location.nearby.analytics.proto.ConnectionsLog.StrategySession) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + role_.MergeFrom(from.role_); + discovery_phase_.MergeFrom(from.discovery_phase_); + advertising_phase_.MergeFrom(from.advertising_phase_); + connection_attempt_.MergeFrom(from.connection_attempt_); + established_connection_.MergeFrom(from.established_connection_); + upgrade_attempt_.MergeFrom(from.upgrade_attempt_); + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + if (cached_has_bits & 0x00000001u) { + _internal_set_build_version(from._internal_build_version()); + } + if (cached_has_bits & 0x00000002u) { + duration_millis_ = from.duration_millis_; + } + if (cached_has_bits & 0x00000004u) { + strategy_ = from.strategy_; + } + _has_bits_[0] |= cached_has_bits; + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void ConnectionsLog_StrategySession::CopyFrom(const ConnectionsLog_StrategySession& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:location.nearby.analytics.proto.ConnectionsLog.StrategySession) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ConnectionsLog_StrategySession::IsInitialized() const { + return true; +} + +void ConnectionsLog_StrategySession::InternalSwap(ConnectionsLog_StrategySession* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + role_.InternalSwap(&other->role_); + discovery_phase_.InternalSwap(&other->discovery_phase_); + advertising_phase_.InternalSwap(&other->advertising_phase_); + connection_attempt_.InternalSwap(&other->connection_attempt_); + established_connection_.InternalSwap(&other->established_connection_); + upgrade_attempt_.InternalSwap(&other->upgrade_attempt_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &build_version_, lhs_arena, + &other->build_version_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(ConnectionsLog_StrategySession, strategy_) + + sizeof(ConnectionsLog_StrategySession::strategy_) + - PROTOBUF_FIELD_OFFSET(ConnectionsLog_StrategySession, duration_millis_)>( + reinterpret_cast(&duration_millis_), + reinterpret_cast(&other->duration_millis_)); +} + +std::string ConnectionsLog_StrategySession::GetTypeName() const { + return "location.nearby.analytics.proto.ConnectionsLog.StrategySession"; +} + + +// =================================================================== + +class ConnectionsLog_DiscoveryPhase::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_duration_millis(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static void set_has_client_flow_id(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } + static const ::location::nearby::analytics::proto::ConnectionsLog_DiscoveryMetadata& discovery_metadata(const ConnectionsLog_DiscoveryPhase* msg); + static void set_has_discovery_metadata(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } +}; + +const ::location::nearby::analytics::proto::ConnectionsLog_DiscoveryMetadata& +ConnectionsLog_DiscoveryPhase::_Internal::discovery_metadata(const ConnectionsLog_DiscoveryPhase* msg) { + return *msg->discovery_metadata_; +} +ConnectionsLog_DiscoveryPhase::ConnectionsLog_DiscoveryPhase(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned), + medium_(arena), + discovered_endpoint_(arena), + sent_connection_request_(arena), + uwb_ranging_(arena) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:location.nearby.analytics.proto.ConnectionsLog.DiscoveryPhase) +} +ConnectionsLog_DiscoveryPhase::ConnectionsLog_DiscoveryPhase(const ConnectionsLog_DiscoveryPhase& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_), + medium_(from.medium_), + discovered_endpoint_(from.discovered_endpoint_), + sent_connection_request_(from.sent_connection_request_), + uwb_ranging_(from.uwb_ranging_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + if (from._internal_has_discovery_metadata()) { + discovery_metadata_ = new ::location::nearby::analytics::proto::ConnectionsLog_DiscoveryMetadata(*from.discovery_metadata_); + } else { + discovery_metadata_ = nullptr; + } + ::memcpy(&duration_millis_, &from.duration_millis_, + static_cast(reinterpret_cast(&client_flow_id_) - + reinterpret_cast(&duration_millis_)) + sizeof(client_flow_id_)); + // @@protoc_insertion_point(copy_constructor:location.nearby.analytics.proto.ConnectionsLog.DiscoveryPhase) +} + +inline void ConnectionsLog_DiscoveryPhase::SharedCtor() { +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&discovery_metadata_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&client_flow_id_) - + reinterpret_cast(&discovery_metadata_)) + sizeof(client_flow_id_)); +} + +ConnectionsLog_DiscoveryPhase::~ConnectionsLog_DiscoveryPhase() { + // @@protoc_insertion_point(destructor:location.nearby.analytics.proto.ConnectionsLog.DiscoveryPhase) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void ConnectionsLog_DiscoveryPhase::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + if (this != internal_default_instance()) delete discovery_metadata_; +} + +void ConnectionsLog_DiscoveryPhase::ArenaDtor(void* object) { + ConnectionsLog_DiscoveryPhase* _this = reinterpret_cast< ConnectionsLog_DiscoveryPhase* >(object); + (void)_this; +} +void ConnectionsLog_DiscoveryPhase::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void ConnectionsLog_DiscoveryPhase::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void ConnectionsLog_DiscoveryPhase::Clear() { +// @@protoc_insertion_point(message_clear_start:location.nearby.analytics.proto.ConnectionsLog.DiscoveryPhase) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + medium_.Clear(); + discovered_endpoint_.Clear(); + sent_connection_request_.Clear(); + uwb_ranging_.Clear(); + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + GOOGLE_DCHECK(discovery_metadata_ != nullptr); + discovery_metadata_->Clear(); + } + if (cached_has_bits & 0x00000006u) { + ::memset(&duration_millis_, 0, static_cast( + reinterpret_cast(&client_flow_id_) - + reinterpret_cast(&duration_millis_)) + sizeof(client_flow_id_)); + } + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* ConnectionsLog_DiscoveryPhase::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional int64 duration_millis = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + _Internal::set_has_duration_millis(&has_bits); + duration_millis_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // repeated .location.nearby.proto.connections.Medium medium = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { + ptr -= 1; + do { + ptr += 1; + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::location::nearby::proto::connections::Medium_IsValid(val))) { + _internal_add_medium(static_cast<::location::nearby::proto::connections::Medium>(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(tag) == 18) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedEnumParser(_internal_mutable_medium(), ptr, ctx, ::location::nearby::proto::connections::Medium_IsValid, &_internal_metadata_, 2); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // repeated .location.nearby.analytics.proto.ConnectionsLog.DiscoveredEndpoint discovered_endpoint = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_discovered_endpoint(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr)); + } else + goto handle_unusual; + continue; + // repeated .location.nearby.analytics.proto.ConnectionsLog.ConnectionRequest sent_connection_request = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_sent_connection_request(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<34>(ptr)); + } else + goto handle_unusual; + continue; + // repeated .location.nearby.analytics.proto.ConnectionsLog.UwbRangingProcess uwb_ranging = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 42)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_uwb_ranging(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<42>(ptr)); + } else + goto handle_unusual; + continue; + // optional int64 client_flow_id = 6; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 48)) { + _Internal::set_has_client_flow_id(&has_bits); + client_flow_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .location.nearby.analytics.proto.ConnectionsLog.DiscoveryMetadata discovery_metadata = 7; + case 7: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 58)) { + ptr = ctx->ParseMessage(_internal_mutable_discovery_metadata(), 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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* ConnectionsLog_DiscoveryPhase::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:location.nearby.analytics.proto.ConnectionsLog.DiscoveryPhase) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional int64 duration_millis = 1; + if (cached_has_bits & 0x00000002u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(1, this->_internal_duration_millis(), target); + } + + // repeated .location.nearby.proto.connections.Medium medium = 2; + for (int i = 0, n = this->_internal_medium_size(); i < n; i++) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 2, this->_internal_medium(i), target); + } + + // repeated .location.nearby.analytics.proto.ConnectionsLog.DiscoveredEndpoint discovered_endpoint = 3; + for (unsigned int i = 0, + n = static_cast(this->_internal_discovered_endpoint_size()); i < n; i++) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(3, this->_internal_discovered_endpoint(i), target, stream); + } + + // repeated .location.nearby.analytics.proto.ConnectionsLog.ConnectionRequest sent_connection_request = 4; + for (unsigned int i = 0, + n = static_cast(this->_internal_sent_connection_request_size()); i < n; i++) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(4, this->_internal_sent_connection_request(i), target, stream); + } + + // repeated .location.nearby.analytics.proto.ConnectionsLog.UwbRangingProcess uwb_ranging = 5; + for (unsigned int i = 0, + n = static_cast(this->_internal_uwb_ranging_size()); i < n; i++) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(5, this->_internal_uwb_ranging(i), target, stream); + } + + // optional int64 client_flow_id = 6; + if (cached_has_bits & 0x00000004u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(6, this->_internal_client_flow_id(), target); + } + + // optional .location.nearby.analytics.proto.ConnectionsLog.DiscoveryMetadata discovery_metadata = 7; + if (cached_has_bits & 0x00000001u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 7, _Internal::discovery_metadata(this), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:location.nearby.analytics.proto.ConnectionsLog.DiscoveryPhase) + return target; +} + +size_t ConnectionsLog_DiscoveryPhase::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:location.nearby.analytics.proto.ConnectionsLog.DiscoveryPhase) + 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 .location.nearby.proto.connections.Medium medium = 2; + { + size_t data_size = 0; + unsigned int count = static_cast(this->_internal_medium_size());for (unsigned int i = 0; i < count; i++) { + data_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize( + this->_internal_medium(static_cast(i))); + } + total_size += (1UL * count) + data_size; + } + + // repeated .location.nearby.analytics.proto.ConnectionsLog.DiscoveredEndpoint discovered_endpoint = 3; + total_size += 1UL * this->_internal_discovered_endpoint_size(); + for (const auto& msg : this->discovered_endpoint_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + // repeated .location.nearby.analytics.proto.ConnectionsLog.ConnectionRequest sent_connection_request = 4; + total_size += 1UL * this->_internal_sent_connection_request_size(); + for (const auto& msg : this->sent_connection_request_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + // repeated .location.nearby.analytics.proto.ConnectionsLog.UwbRangingProcess uwb_ranging = 5; + total_size += 1UL * this->_internal_uwb_ranging_size(); + for (const auto& msg : this->uwb_ranging_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + // optional .location.nearby.analytics.proto.ConnectionsLog.DiscoveryMetadata discovery_metadata = 7; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *discovery_metadata_); + } + + // optional int64 duration_millis = 1; + if (cached_has_bits & 0x00000002u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_duration_millis()); + } + + // optional int64 client_flow_id = 6; + if (cached_has_bits & 0x00000004u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_client_flow_id()); + } + + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void ConnectionsLog_DiscoveryPhase::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void ConnectionsLog_DiscoveryPhase::MergeFrom(const ConnectionsLog_DiscoveryPhase& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:location.nearby.analytics.proto.ConnectionsLog.DiscoveryPhase) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + medium_.MergeFrom(from.medium_); + discovered_endpoint_.MergeFrom(from.discovered_endpoint_); + sent_connection_request_.MergeFrom(from.sent_connection_request_); + uwb_ranging_.MergeFrom(from.uwb_ranging_); + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + if (cached_has_bits & 0x00000001u) { + _internal_mutable_discovery_metadata()->::location::nearby::analytics::proto::ConnectionsLog_DiscoveryMetadata::MergeFrom(from._internal_discovery_metadata()); + } + if (cached_has_bits & 0x00000002u) { + duration_millis_ = from.duration_millis_; + } + if (cached_has_bits & 0x00000004u) { + client_flow_id_ = from.client_flow_id_; + } + _has_bits_[0] |= cached_has_bits; + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void ConnectionsLog_DiscoveryPhase::CopyFrom(const ConnectionsLog_DiscoveryPhase& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:location.nearby.analytics.proto.ConnectionsLog.DiscoveryPhase) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ConnectionsLog_DiscoveryPhase::IsInitialized() const { + return true; +} + +void ConnectionsLog_DiscoveryPhase::InternalSwap(ConnectionsLog_DiscoveryPhase* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + medium_.InternalSwap(&other->medium_); + discovered_endpoint_.InternalSwap(&other->discovered_endpoint_); + sent_connection_request_.InternalSwap(&other->sent_connection_request_); + uwb_ranging_.InternalSwap(&other->uwb_ranging_); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(ConnectionsLog_DiscoveryPhase, client_flow_id_) + + sizeof(ConnectionsLog_DiscoveryPhase::client_flow_id_) + - PROTOBUF_FIELD_OFFSET(ConnectionsLog_DiscoveryPhase, discovery_metadata_)>( + reinterpret_cast(&discovery_metadata_), + reinterpret_cast(&other->discovery_metadata_)); +} + +std::string ConnectionsLog_DiscoveryPhase::GetTypeName() const { + return "location.nearby.analytics.proto.ConnectionsLog.DiscoveryPhase"; +} + + +// =================================================================== + +class ConnectionsLog_DiscoveredEndpoint::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_medium(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static void set_has_latency_millis(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } +}; + +ConnectionsLog_DiscoveredEndpoint::ConnectionsLog_DiscoveredEndpoint(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:location.nearby.analytics.proto.ConnectionsLog.DiscoveredEndpoint) +} +ConnectionsLog_DiscoveredEndpoint::ConnectionsLog_DiscoveredEndpoint(const ConnectionsLog_DiscoveredEndpoint& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::memcpy(&latency_millis_, &from.latency_millis_, + static_cast(reinterpret_cast(&medium_) - + reinterpret_cast(&latency_millis_)) + sizeof(medium_)); + // @@protoc_insertion_point(copy_constructor:location.nearby.analytics.proto.ConnectionsLog.DiscoveredEndpoint) +} + +inline void ConnectionsLog_DiscoveredEndpoint::SharedCtor() { +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&latency_millis_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&medium_) - + reinterpret_cast(&latency_millis_)) + sizeof(medium_)); +} + +ConnectionsLog_DiscoveredEndpoint::~ConnectionsLog_DiscoveredEndpoint() { + // @@protoc_insertion_point(destructor:location.nearby.analytics.proto.ConnectionsLog.DiscoveredEndpoint) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void ConnectionsLog_DiscoveredEndpoint::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); +} + +void ConnectionsLog_DiscoveredEndpoint::ArenaDtor(void* object) { + ConnectionsLog_DiscoveredEndpoint* _this = reinterpret_cast< ConnectionsLog_DiscoveredEndpoint* >(object); + (void)_this; +} +void ConnectionsLog_DiscoveredEndpoint::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void ConnectionsLog_DiscoveredEndpoint::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void ConnectionsLog_DiscoveredEndpoint::Clear() { +// @@protoc_insertion_point(message_clear_start:location.nearby.analytics.proto.ConnectionsLog.DiscoveredEndpoint) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + ::memset(&latency_millis_, 0, static_cast( + reinterpret_cast(&medium_) - + reinterpret_cast(&latency_millis_)) + sizeof(medium_)); + } + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* ConnectionsLog_DiscoveredEndpoint::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional .location.nearby.proto.connections.Medium medium = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::location::nearby::proto::connections::Medium_IsValid(val))) { + _internal_set_medium(static_cast<::location::nearby::proto::connections::Medium>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // optional int64 latency_millis = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { + _Internal::set_has_latency_millis(&has_bits); + latency_millis_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* ConnectionsLog_DiscoveredEndpoint::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:location.nearby.analytics.proto.ConnectionsLog.DiscoveredEndpoint) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional .location.nearby.proto.connections.Medium medium = 1; + if (cached_has_bits & 0x00000002u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 1, this->_internal_medium(), target); + } + + // optional int64 latency_millis = 2; + if (cached_has_bits & 0x00000001u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(2, this->_internal_latency_millis(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:location.nearby.analytics.proto.ConnectionsLog.DiscoveredEndpoint) + return target; +} + +size_t ConnectionsLog_DiscoveredEndpoint::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:location.nearby.analytics.proto.ConnectionsLog.DiscoveredEndpoint) + 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 = _has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + // optional int64 latency_millis = 2; + if (cached_has_bits & 0x00000001u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_latency_millis()); + } + + // optional .location.nearby.proto.connections.Medium medium = 1; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_medium()); + } + + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void ConnectionsLog_DiscoveredEndpoint::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void ConnectionsLog_DiscoveredEndpoint::MergeFrom(const ConnectionsLog_DiscoveredEndpoint& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:location.nearby.analytics.proto.ConnectionsLog.DiscoveredEndpoint) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + latency_millis_ = from.latency_millis_; + } + if (cached_has_bits & 0x00000002u) { + medium_ = from.medium_; + } + _has_bits_[0] |= cached_has_bits; + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void ConnectionsLog_DiscoveredEndpoint::CopyFrom(const ConnectionsLog_DiscoveredEndpoint& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:location.nearby.analytics.proto.ConnectionsLog.DiscoveredEndpoint) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ConnectionsLog_DiscoveredEndpoint::IsInitialized() const { + return true; +} + +void ConnectionsLog_DiscoveredEndpoint::InternalSwap(ConnectionsLog_DiscoveredEndpoint* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(ConnectionsLog_DiscoveredEndpoint, medium_) + + sizeof(ConnectionsLog_DiscoveredEndpoint::medium_) + - PROTOBUF_FIELD_OFFSET(ConnectionsLog_DiscoveredEndpoint, latency_millis_)>( + reinterpret_cast(&latency_millis_), + reinterpret_cast(&other->latency_millis_)); +} + +std::string ConnectionsLog_DiscoveredEndpoint::GetTypeName() const { + return "location.nearby.analytics.proto.ConnectionsLog.DiscoveredEndpoint"; +} + + +// =================================================================== + +class ConnectionsLog_UwbRangingProcess::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_duration_millis(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_number_of_ranging_data(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static void set_has_distance_min(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } + static void set_has_distance_max(HasBits* has_bits) { + (*has_bits)[0] |= 8u; + } + static void set_has_distance_ave(HasBits* has_bits) { + (*has_bits)[0] |= 16u; + } + static void set_has_distance_variance(HasBits* has_bits) { + (*has_bits)[0] |= 32u; + } + static void set_has_azimuth_min(HasBits* has_bits) { + (*has_bits)[0] |= 64u; + } + static void set_has_azimuth_max(HasBits* has_bits) { + (*has_bits)[0] |= 128u; + } + static void set_has_azimuth_ave(HasBits* has_bits) { + (*has_bits)[0] |= 256u; + } + static void set_has_azimuth_variance(HasBits* has_bits) { + (*has_bits)[0] |= 512u; + } +}; + +ConnectionsLog_UwbRangingProcess::ConnectionsLog_UwbRangingProcess(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned), + uwb_ranging_data_(arena) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:location.nearby.analytics.proto.ConnectionsLog.UwbRangingProcess) +} +ConnectionsLog_UwbRangingProcess::ConnectionsLog_UwbRangingProcess(const ConnectionsLog_UwbRangingProcess& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_), + uwb_ranging_data_(from.uwb_ranging_data_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::memcpy(&duration_millis_, &from.duration_millis_, + static_cast(reinterpret_cast(&azimuth_variance_) - + reinterpret_cast(&duration_millis_)) + sizeof(azimuth_variance_)); + // @@protoc_insertion_point(copy_constructor:location.nearby.analytics.proto.ConnectionsLog.UwbRangingProcess) +} + +inline void ConnectionsLog_UwbRangingProcess::SharedCtor() { +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&duration_millis_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&azimuth_variance_) - + reinterpret_cast(&duration_millis_)) + sizeof(azimuth_variance_)); +} + +ConnectionsLog_UwbRangingProcess::~ConnectionsLog_UwbRangingProcess() { + // @@protoc_insertion_point(destructor:location.nearby.analytics.proto.ConnectionsLog.UwbRangingProcess) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void ConnectionsLog_UwbRangingProcess::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); +} + +void ConnectionsLog_UwbRangingProcess::ArenaDtor(void* object) { + ConnectionsLog_UwbRangingProcess* _this = reinterpret_cast< ConnectionsLog_UwbRangingProcess* >(object); + (void)_this; +} +void ConnectionsLog_UwbRangingProcess::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void ConnectionsLog_UwbRangingProcess::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void ConnectionsLog_UwbRangingProcess::Clear() { +// @@protoc_insertion_point(message_clear_start:location.nearby.analytics.proto.ConnectionsLog.UwbRangingProcess) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + uwb_ranging_data_.Clear(); + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x000000ffu) { + ::memset(&duration_millis_, 0, static_cast( + reinterpret_cast(&azimuth_max_) - + reinterpret_cast(&duration_millis_)) + sizeof(azimuth_max_)); + } + if (cached_has_bits & 0x00000300u) { + ::memset(&azimuth_ave_, 0, static_cast( + reinterpret_cast(&azimuth_variance_) - + reinterpret_cast(&azimuth_ave_)) + sizeof(azimuth_variance_)); + } + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* ConnectionsLog_UwbRangingProcess::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional int64 duration_millis = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + _Internal::set_has_duration_millis(&has_bits); + duration_millis_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // repeated .location.nearby.analytics.proto.ConnectionsLog.RawUwbRangingEvent uwb_ranging_data = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_uwb_ranging_data(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr)); + } else + goto handle_unusual; + continue; + // optional int32 number_of_ranging_data = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { + _Internal::set_has_number_of_ranging_data(&has_bits); + number_of_ranging_data_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional int32 distance_min = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 32)) { + _Internal::set_has_distance_min(&has_bits); + distance_min_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional int32 distance_max = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 40)) { + _Internal::set_has_distance_max(&has_bits); + distance_max_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional int32 distance_ave = 6; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 48)) { + _Internal::set_has_distance_ave(&has_bits); + distance_ave_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional int32 distance_variance = 7; + case 7: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 56)) { + _Internal::set_has_distance_variance(&has_bits); + distance_variance_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional int32 azimuth_min = 8; + case 8: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 64)) { + _Internal::set_has_azimuth_min(&has_bits); + azimuth_min_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional int32 azimuth_max = 9; + case 9: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 72)) { + _Internal::set_has_azimuth_max(&has_bits); + azimuth_max_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional int32 azimuth_ave = 10; + case 10: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 80)) { + _Internal::set_has_azimuth_ave(&has_bits); + azimuth_ave_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional int32 azimuth_variance = 11; + case 11: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 88)) { + _Internal::set_has_azimuth_variance(&has_bits); + azimuth_variance_ = ::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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* ConnectionsLog_UwbRangingProcess::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:location.nearby.analytics.proto.ConnectionsLog.UwbRangingProcess) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional int64 duration_millis = 1; + if (cached_has_bits & 0x00000001u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(1, this->_internal_duration_millis(), target); + } + + // repeated .location.nearby.analytics.proto.ConnectionsLog.RawUwbRangingEvent uwb_ranging_data = 2; + for (unsigned int i = 0, + n = static_cast(this->_internal_uwb_ranging_data_size()); i < n; i++) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(2, this->_internal_uwb_ranging_data(i), target, stream); + } + + // optional int32 number_of_ranging_data = 3; + if (cached_has_bits & 0x00000002u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(3, this->_internal_number_of_ranging_data(), target); + } + + // optional int32 distance_min = 4; + if (cached_has_bits & 0x00000004u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(4, this->_internal_distance_min(), target); + } + + // optional int32 distance_max = 5; + if (cached_has_bits & 0x00000008u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(5, this->_internal_distance_max(), target); + } + + // optional int32 distance_ave = 6; + if (cached_has_bits & 0x00000010u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(6, this->_internal_distance_ave(), target); + } + + // optional int32 distance_variance = 7; + if (cached_has_bits & 0x00000020u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(7, this->_internal_distance_variance(), target); + } + + // optional int32 azimuth_min = 8; + if (cached_has_bits & 0x00000040u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(8, this->_internal_azimuth_min(), target); + } + + // optional int32 azimuth_max = 9; + if (cached_has_bits & 0x00000080u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(9, this->_internal_azimuth_max(), target); + } + + // optional int32 azimuth_ave = 10; + if (cached_has_bits & 0x00000100u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(10, this->_internal_azimuth_ave(), target); + } + + // optional int32 azimuth_variance = 11; + if (cached_has_bits & 0x00000200u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(11, this->_internal_azimuth_variance(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:location.nearby.analytics.proto.ConnectionsLog.UwbRangingProcess) + return target; +} + +size_t ConnectionsLog_UwbRangingProcess::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:location.nearby.analytics.proto.ConnectionsLog.UwbRangingProcess) + 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 .location.nearby.analytics.proto.ConnectionsLog.RawUwbRangingEvent uwb_ranging_data = 2; + total_size += 1UL * this->_internal_uwb_ranging_data_size(); + for (const auto& msg : this->uwb_ranging_data_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x000000ffu) { + // optional int64 duration_millis = 1; + if (cached_has_bits & 0x00000001u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_duration_millis()); + } + + // optional int32 number_of_ranging_data = 3; + if (cached_has_bits & 0x00000002u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_number_of_ranging_data()); + } + + // optional int32 distance_min = 4; + if (cached_has_bits & 0x00000004u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_distance_min()); + } + + // optional int32 distance_max = 5; + if (cached_has_bits & 0x00000008u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_distance_max()); + } + + // optional int32 distance_ave = 6; + if (cached_has_bits & 0x00000010u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_distance_ave()); + } + + // optional int32 distance_variance = 7; + if (cached_has_bits & 0x00000020u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_distance_variance()); + } + + // optional int32 azimuth_min = 8; + if (cached_has_bits & 0x00000040u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_azimuth_min()); + } + + // optional int32 azimuth_max = 9; + if (cached_has_bits & 0x00000080u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_azimuth_max()); + } + + } + if (cached_has_bits & 0x00000300u) { + // optional int32 azimuth_ave = 10; + if (cached_has_bits & 0x00000100u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_azimuth_ave()); + } + + // optional int32 azimuth_variance = 11; + if (cached_has_bits & 0x00000200u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_azimuth_variance()); + } + + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void ConnectionsLog_UwbRangingProcess::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void ConnectionsLog_UwbRangingProcess::MergeFrom(const ConnectionsLog_UwbRangingProcess& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:location.nearby.analytics.proto.ConnectionsLog.UwbRangingProcess) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + uwb_ranging_data_.MergeFrom(from.uwb_ranging_data_); + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x000000ffu) { + if (cached_has_bits & 0x00000001u) { + duration_millis_ = from.duration_millis_; + } + if (cached_has_bits & 0x00000002u) { + number_of_ranging_data_ = from.number_of_ranging_data_; + } + if (cached_has_bits & 0x00000004u) { + distance_min_ = from.distance_min_; + } + if (cached_has_bits & 0x00000008u) { + distance_max_ = from.distance_max_; + } + if (cached_has_bits & 0x00000010u) { + distance_ave_ = from.distance_ave_; + } + if (cached_has_bits & 0x00000020u) { + distance_variance_ = from.distance_variance_; + } + if (cached_has_bits & 0x00000040u) { + azimuth_min_ = from.azimuth_min_; + } + if (cached_has_bits & 0x00000080u) { + azimuth_max_ = from.azimuth_max_; + } + _has_bits_[0] |= cached_has_bits; + } + if (cached_has_bits & 0x00000300u) { + if (cached_has_bits & 0x00000100u) { + azimuth_ave_ = from.azimuth_ave_; + } + if (cached_has_bits & 0x00000200u) { + azimuth_variance_ = from.azimuth_variance_; + } + _has_bits_[0] |= cached_has_bits; + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void ConnectionsLog_UwbRangingProcess::CopyFrom(const ConnectionsLog_UwbRangingProcess& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:location.nearby.analytics.proto.ConnectionsLog.UwbRangingProcess) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ConnectionsLog_UwbRangingProcess::IsInitialized() const { + return true; +} + +void ConnectionsLog_UwbRangingProcess::InternalSwap(ConnectionsLog_UwbRangingProcess* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + uwb_ranging_data_.InternalSwap(&other->uwb_ranging_data_); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(ConnectionsLog_UwbRangingProcess, azimuth_variance_) + + sizeof(ConnectionsLog_UwbRangingProcess::azimuth_variance_) + - PROTOBUF_FIELD_OFFSET(ConnectionsLog_UwbRangingProcess, duration_millis_)>( + reinterpret_cast(&duration_millis_), + reinterpret_cast(&other->duration_millis_)); +} + +std::string ConnectionsLog_UwbRangingProcess::GetTypeName() const { + return "location.nearby.analytics.proto.ConnectionsLog.UwbRangingProcess"; +} + + +// =================================================================== + +class ConnectionsLog_RawUwbRangingEvent::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_distance(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_azimuth_angle(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static void set_has_polar_angle(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } +}; + +ConnectionsLog_RawUwbRangingEvent::ConnectionsLog_RawUwbRangingEvent(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:location.nearby.analytics.proto.ConnectionsLog.RawUwbRangingEvent) +} +ConnectionsLog_RawUwbRangingEvent::ConnectionsLog_RawUwbRangingEvent(const ConnectionsLog_RawUwbRangingEvent& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::memcpy(&distance_, &from.distance_, + static_cast(reinterpret_cast(&polar_angle_) - + reinterpret_cast(&distance_)) + sizeof(polar_angle_)); + // @@protoc_insertion_point(copy_constructor:location.nearby.analytics.proto.ConnectionsLog.RawUwbRangingEvent) +} + +inline void ConnectionsLog_RawUwbRangingEvent::SharedCtor() { +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&distance_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&polar_angle_) - + reinterpret_cast(&distance_)) + sizeof(polar_angle_)); +} + +ConnectionsLog_RawUwbRangingEvent::~ConnectionsLog_RawUwbRangingEvent() { + // @@protoc_insertion_point(destructor:location.nearby.analytics.proto.ConnectionsLog.RawUwbRangingEvent) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void ConnectionsLog_RawUwbRangingEvent::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); +} + +void ConnectionsLog_RawUwbRangingEvent::ArenaDtor(void* object) { + ConnectionsLog_RawUwbRangingEvent* _this = reinterpret_cast< ConnectionsLog_RawUwbRangingEvent* >(object); + (void)_this; +} +void ConnectionsLog_RawUwbRangingEvent::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void ConnectionsLog_RawUwbRangingEvent::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void ConnectionsLog_RawUwbRangingEvent::Clear() { +// @@protoc_insertion_point(message_clear_start:location.nearby.analytics.proto.ConnectionsLog.RawUwbRangingEvent) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + ::memset(&distance_, 0, static_cast( + reinterpret_cast(&polar_angle_) - + reinterpret_cast(&distance_)) + sizeof(polar_angle_)); + } + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* ConnectionsLog_RawUwbRangingEvent::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional int32 distance = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + _Internal::set_has_distance(&has_bits); + distance_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional int32 azimuth_angle = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { + _Internal::set_has_azimuth_angle(&has_bits); + azimuth_angle_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional int32 polar_angle = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { + _Internal::set_has_polar_angle(&has_bits); + polar_angle_ = ::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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* ConnectionsLog_RawUwbRangingEvent::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:location.nearby.analytics.proto.ConnectionsLog.RawUwbRangingEvent) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional int32 distance = 1; + if (cached_has_bits & 0x00000001u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_distance(), target); + } + + // optional int32 azimuth_angle = 2; + if (cached_has_bits & 0x00000002u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_azimuth_angle(), target); + } + + // optional int32 polar_angle = 3; + if (cached_has_bits & 0x00000004u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(3, this->_internal_polar_angle(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:location.nearby.analytics.proto.ConnectionsLog.RawUwbRangingEvent) + return target; +} + +size_t ConnectionsLog_RawUwbRangingEvent::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:location.nearby.analytics.proto.ConnectionsLog.RawUwbRangingEvent) + 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 = _has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + // optional int32 distance = 1; + if (cached_has_bits & 0x00000001u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_distance()); + } + + // optional int32 azimuth_angle = 2; + if (cached_has_bits & 0x00000002u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_azimuth_angle()); + } + + // optional int32 polar_angle = 3; + if (cached_has_bits & 0x00000004u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_polar_angle()); + } + + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void ConnectionsLog_RawUwbRangingEvent::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void ConnectionsLog_RawUwbRangingEvent::MergeFrom(const ConnectionsLog_RawUwbRangingEvent& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:location.nearby.analytics.proto.ConnectionsLog.RawUwbRangingEvent) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + if (cached_has_bits & 0x00000001u) { + distance_ = from.distance_; + } + if (cached_has_bits & 0x00000002u) { + azimuth_angle_ = from.azimuth_angle_; + } + if (cached_has_bits & 0x00000004u) { + polar_angle_ = from.polar_angle_; + } + _has_bits_[0] |= cached_has_bits; + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void ConnectionsLog_RawUwbRangingEvent::CopyFrom(const ConnectionsLog_RawUwbRangingEvent& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:location.nearby.analytics.proto.ConnectionsLog.RawUwbRangingEvent) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ConnectionsLog_RawUwbRangingEvent::IsInitialized() const { + return true; +} + +void ConnectionsLog_RawUwbRangingEvent::InternalSwap(ConnectionsLog_RawUwbRangingEvent* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(ConnectionsLog_RawUwbRangingEvent, polar_angle_) + + sizeof(ConnectionsLog_RawUwbRangingEvent::polar_angle_) + - PROTOBUF_FIELD_OFFSET(ConnectionsLog_RawUwbRangingEvent, distance_)>( + reinterpret_cast(&distance_), + reinterpret_cast(&other->distance_)); +} + +std::string ConnectionsLog_RawUwbRangingEvent::GetTypeName() const { + return "location.nearby.analytics.proto.ConnectionsLog.RawUwbRangingEvent"; +} + + +// =================================================================== + +class ConnectionsLog_AdvertisingPhase::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_duration_millis(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static void set_has_client_flow_id(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } + static const ::location::nearby::analytics::proto::ConnectionsLog_AdvertisingMetadata& advertising_metadata(const ConnectionsLog_AdvertisingPhase* msg); + static void set_has_advertising_metadata(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } +}; + +const ::location::nearby::analytics::proto::ConnectionsLog_AdvertisingMetadata& +ConnectionsLog_AdvertisingPhase::_Internal::advertising_metadata(const ConnectionsLog_AdvertisingPhase* msg) { + return *msg->advertising_metadata_; +} +ConnectionsLog_AdvertisingPhase::ConnectionsLog_AdvertisingPhase(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned), + medium_(arena), + received_connection_request_(arena) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:location.nearby.analytics.proto.ConnectionsLog.AdvertisingPhase) +} +ConnectionsLog_AdvertisingPhase::ConnectionsLog_AdvertisingPhase(const ConnectionsLog_AdvertisingPhase& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_), + medium_(from.medium_), + received_connection_request_(from.received_connection_request_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + if (from._internal_has_advertising_metadata()) { + advertising_metadata_ = new ::location::nearby::analytics::proto::ConnectionsLog_AdvertisingMetadata(*from.advertising_metadata_); + } else { + advertising_metadata_ = nullptr; + } + ::memcpy(&duration_millis_, &from.duration_millis_, + static_cast(reinterpret_cast(&client_flow_id_) - + reinterpret_cast(&duration_millis_)) + sizeof(client_flow_id_)); + // @@protoc_insertion_point(copy_constructor:location.nearby.analytics.proto.ConnectionsLog.AdvertisingPhase) +} + +inline void ConnectionsLog_AdvertisingPhase::SharedCtor() { +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&advertising_metadata_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&client_flow_id_) - + reinterpret_cast(&advertising_metadata_)) + sizeof(client_flow_id_)); +} + +ConnectionsLog_AdvertisingPhase::~ConnectionsLog_AdvertisingPhase() { + // @@protoc_insertion_point(destructor:location.nearby.analytics.proto.ConnectionsLog.AdvertisingPhase) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void ConnectionsLog_AdvertisingPhase::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + if (this != internal_default_instance()) delete advertising_metadata_; +} + +void ConnectionsLog_AdvertisingPhase::ArenaDtor(void* object) { + ConnectionsLog_AdvertisingPhase* _this = reinterpret_cast< ConnectionsLog_AdvertisingPhase* >(object); + (void)_this; +} +void ConnectionsLog_AdvertisingPhase::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void ConnectionsLog_AdvertisingPhase::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void ConnectionsLog_AdvertisingPhase::Clear() { +// @@protoc_insertion_point(message_clear_start:location.nearby.analytics.proto.ConnectionsLog.AdvertisingPhase) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + medium_.Clear(); + received_connection_request_.Clear(); + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + GOOGLE_DCHECK(advertising_metadata_ != nullptr); + advertising_metadata_->Clear(); + } + if (cached_has_bits & 0x00000006u) { + ::memset(&duration_millis_, 0, static_cast( + reinterpret_cast(&client_flow_id_) - + reinterpret_cast(&duration_millis_)) + sizeof(client_flow_id_)); + } + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* ConnectionsLog_AdvertisingPhase::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional int64 duration_millis = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + _Internal::set_has_duration_millis(&has_bits); + duration_millis_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // repeated .location.nearby.proto.connections.Medium medium = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { + ptr -= 1; + do { + ptr += 1; + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::location::nearby::proto::connections::Medium_IsValid(val))) { + _internal_add_medium(static_cast<::location::nearby::proto::connections::Medium>(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(tag) == 18) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedEnumParser(_internal_mutable_medium(), ptr, ctx, ::location::nearby::proto::connections::Medium_IsValid, &_internal_metadata_, 2); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // repeated .location.nearby.analytics.proto.ConnectionsLog.ConnectionRequest received_connection_request = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_received_connection_request(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr)); + } else + goto handle_unusual; + continue; + // optional int64 client_flow_id = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 32)) { + _Internal::set_has_client_flow_id(&has_bits); + client_flow_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .location.nearby.analytics.proto.ConnectionsLog.AdvertisingMetadata advertising_metadata = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 42)) { + ptr = ctx->ParseMessage(_internal_mutable_advertising_metadata(), 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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* ConnectionsLog_AdvertisingPhase::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:location.nearby.analytics.proto.ConnectionsLog.AdvertisingPhase) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional int64 duration_millis = 1; + if (cached_has_bits & 0x00000002u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(1, this->_internal_duration_millis(), target); + } + + // repeated .location.nearby.proto.connections.Medium medium = 2; + for (int i = 0, n = this->_internal_medium_size(); i < n; i++) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 2, this->_internal_medium(i), target); + } + + // repeated .location.nearby.analytics.proto.ConnectionsLog.ConnectionRequest received_connection_request = 3; + for (unsigned int i = 0, + n = static_cast(this->_internal_received_connection_request_size()); i < n; i++) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(3, this->_internal_received_connection_request(i), target, stream); + } + + // optional int64 client_flow_id = 4; + if (cached_has_bits & 0x00000004u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(4, this->_internal_client_flow_id(), target); + } + + // optional .location.nearby.analytics.proto.ConnectionsLog.AdvertisingMetadata advertising_metadata = 5; + if (cached_has_bits & 0x00000001u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 5, _Internal::advertising_metadata(this), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:location.nearby.analytics.proto.ConnectionsLog.AdvertisingPhase) + return target; +} + +size_t ConnectionsLog_AdvertisingPhase::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:location.nearby.analytics.proto.ConnectionsLog.AdvertisingPhase) + 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 .location.nearby.proto.connections.Medium medium = 2; + { + size_t data_size = 0; + unsigned int count = static_cast(this->_internal_medium_size());for (unsigned int i = 0; i < count; i++) { + data_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize( + this->_internal_medium(static_cast(i))); + } + total_size += (1UL * count) + data_size; + } + + // repeated .location.nearby.analytics.proto.ConnectionsLog.ConnectionRequest received_connection_request = 3; + total_size += 1UL * this->_internal_received_connection_request_size(); + for (const auto& msg : this->received_connection_request_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + // optional .location.nearby.analytics.proto.ConnectionsLog.AdvertisingMetadata advertising_metadata = 5; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *advertising_metadata_); + } + + // optional int64 duration_millis = 1; + if (cached_has_bits & 0x00000002u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_duration_millis()); + } + + // optional int64 client_flow_id = 4; + if (cached_has_bits & 0x00000004u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_client_flow_id()); + } + + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void ConnectionsLog_AdvertisingPhase::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void ConnectionsLog_AdvertisingPhase::MergeFrom(const ConnectionsLog_AdvertisingPhase& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:location.nearby.analytics.proto.ConnectionsLog.AdvertisingPhase) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + medium_.MergeFrom(from.medium_); + received_connection_request_.MergeFrom(from.received_connection_request_); + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + if (cached_has_bits & 0x00000001u) { + _internal_mutable_advertising_metadata()->::location::nearby::analytics::proto::ConnectionsLog_AdvertisingMetadata::MergeFrom(from._internal_advertising_metadata()); + } + if (cached_has_bits & 0x00000002u) { + duration_millis_ = from.duration_millis_; + } + if (cached_has_bits & 0x00000004u) { + client_flow_id_ = from.client_flow_id_; + } + _has_bits_[0] |= cached_has_bits; + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void ConnectionsLog_AdvertisingPhase::CopyFrom(const ConnectionsLog_AdvertisingPhase& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:location.nearby.analytics.proto.ConnectionsLog.AdvertisingPhase) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ConnectionsLog_AdvertisingPhase::IsInitialized() const { + return true; +} + +void ConnectionsLog_AdvertisingPhase::InternalSwap(ConnectionsLog_AdvertisingPhase* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + medium_.InternalSwap(&other->medium_); + received_connection_request_.InternalSwap(&other->received_connection_request_); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(ConnectionsLog_AdvertisingPhase, client_flow_id_) + + sizeof(ConnectionsLog_AdvertisingPhase::client_flow_id_) + - PROTOBUF_FIELD_OFFSET(ConnectionsLog_AdvertisingPhase, advertising_metadata_)>( + reinterpret_cast(&advertising_metadata_), + reinterpret_cast(&other->advertising_metadata_)); +} + +std::string ConnectionsLog_AdvertisingPhase::GetTypeName() const { + return "location.nearby.analytics.proto.ConnectionsLog.AdvertisingPhase"; +} + + +// =================================================================== + +class ConnectionsLog_ConnectionRequest::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_duration_millis(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_request_delay_millis(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static void set_has_local_response(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } + static void set_has_remote_response(HasBits* has_bits) { + (*has_bits)[0] |= 8u; + } + static void set_has_client_flow_id(HasBits* has_bits) { + (*has_bits)[0] |= 16u; + } +}; + +ConnectionsLog_ConnectionRequest::ConnectionsLog_ConnectionRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:location.nearby.analytics.proto.ConnectionsLog.ConnectionRequest) +} +ConnectionsLog_ConnectionRequest::ConnectionsLog_ConnectionRequest(const ConnectionsLog_ConnectionRequest& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::memcpy(&duration_millis_, &from.duration_millis_, + static_cast(reinterpret_cast(&client_flow_id_) - + reinterpret_cast(&duration_millis_)) + sizeof(client_flow_id_)); + // @@protoc_insertion_point(copy_constructor:location.nearby.analytics.proto.ConnectionsLog.ConnectionRequest) +} + +inline void ConnectionsLog_ConnectionRequest::SharedCtor() { +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&duration_millis_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&client_flow_id_) - + reinterpret_cast(&duration_millis_)) + sizeof(client_flow_id_)); +} + +ConnectionsLog_ConnectionRequest::~ConnectionsLog_ConnectionRequest() { + // @@protoc_insertion_point(destructor:location.nearby.analytics.proto.ConnectionsLog.ConnectionRequest) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void ConnectionsLog_ConnectionRequest::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); +} + +void ConnectionsLog_ConnectionRequest::ArenaDtor(void* object) { + ConnectionsLog_ConnectionRequest* _this = reinterpret_cast< ConnectionsLog_ConnectionRequest* >(object); + (void)_this; +} +void ConnectionsLog_ConnectionRequest::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void ConnectionsLog_ConnectionRequest::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void ConnectionsLog_ConnectionRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:location.nearby.analytics.proto.ConnectionsLog.ConnectionRequest) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x0000001fu) { + ::memset(&duration_millis_, 0, static_cast( + reinterpret_cast(&client_flow_id_) - + reinterpret_cast(&duration_millis_)) + sizeof(client_flow_id_)); + } + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* ConnectionsLog_ConnectionRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional int64 duration_millis = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + _Internal::set_has_duration_millis(&has_bits); + duration_millis_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional int64 request_delay_millis = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { + _Internal::set_has_request_delay_millis(&has_bits); + request_delay_millis_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .location.nearby.proto.connections.ConnectionRequestResponse local_response = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::location::nearby::proto::connections::ConnectionRequestResponse_IsValid(val))) { + _internal_set_local_response(static_cast<::location::nearby::proto::connections::ConnectionRequestResponse>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(3, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // optional .location.nearby.proto.connections.ConnectionRequestResponse remote_response = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 32)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::location::nearby::proto::connections::ConnectionRequestResponse_IsValid(val))) { + _internal_set_remote_response(static_cast<::location::nearby::proto::connections::ConnectionRequestResponse>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(4, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // optional int64 client_flow_id = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 40)) { + _Internal::set_has_client_flow_id(&has_bits); + client_flow_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* ConnectionsLog_ConnectionRequest::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:location.nearby.analytics.proto.ConnectionsLog.ConnectionRequest) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional int64 duration_millis = 1; + if (cached_has_bits & 0x00000001u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(1, this->_internal_duration_millis(), target); + } + + // optional int64 request_delay_millis = 2; + if (cached_has_bits & 0x00000002u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(2, this->_internal_request_delay_millis(), target); + } + + // optional .location.nearby.proto.connections.ConnectionRequestResponse local_response = 3; + if (cached_has_bits & 0x00000004u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 3, this->_internal_local_response(), target); + } + + // optional .location.nearby.proto.connections.ConnectionRequestResponse remote_response = 4; + if (cached_has_bits & 0x00000008u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 4, this->_internal_remote_response(), target); + } + + // optional int64 client_flow_id = 5; + if (cached_has_bits & 0x00000010u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(5, this->_internal_client_flow_id(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:location.nearby.analytics.proto.ConnectionsLog.ConnectionRequest) + return target; +} + +size_t ConnectionsLog_ConnectionRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:location.nearby.analytics.proto.ConnectionsLog.ConnectionRequest) + 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 = _has_bits_[0]; + if (cached_has_bits & 0x0000001fu) { + // optional int64 duration_millis = 1; + if (cached_has_bits & 0x00000001u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_duration_millis()); + } + + // optional int64 request_delay_millis = 2; + if (cached_has_bits & 0x00000002u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_request_delay_millis()); + } + + // optional .location.nearby.proto.connections.ConnectionRequestResponse local_response = 3; + if (cached_has_bits & 0x00000004u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_local_response()); + } + + // optional .location.nearby.proto.connections.ConnectionRequestResponse remote_response = 4; + if (cached_has_bits & 0x00000008u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_remote_response()); + } + + // optional int64 client_flow_id = 5; + if (cached_has_bits & 0x00000010u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_client_flow_id()); + } + + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void ConnectionsLog_ConnectionRequest::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void ConnectionsLog_ConnectionRequest::MergeFrom(const ConnectionsLog_ConnectionRequest& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:location.nearby.analytics.proto.ConnectionsLog.ConnectionRequest) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x0000001fu) { + if (cached_has_bits & 0x00000001u) { + duration_millis_ = from.duration_millis_; + } + if (cached_has_bits & 0x00000002u) { + request_delay_millis_ = from.request_delay_millis_; + } + if (cached_has_bits & 0x00000004u) { + local_response_ = from.local_response_; + } + if (cached_has_bits & 0x00000008u) { + remote_response_ = from.remote_response_; + } + if (cached_has_bits & 0x00000010u) { + client_flow_id_ = from.client_flow_id_; + } + _has_bits_[0] |= cached_has_bits; + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void ConnectionsLog_ConnectionRequest::CopyFrom(const ConnectionsLog_ConnectionRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:location.nearby.analytics.proto.ConnectionsLog.ConnectionRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ConnectionsLog_ConnectionRequest::IsInitialized() const { + return true; +} + +void ConnectionsLog_ConnectionRequest::InternalSwap(ConnectionsLog_ConnectionRequest* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(ConnectionsLog_ConnectionRequest, client_flow_id_) + + sizeof(ConnectionsLog_ConnectionRequest::client_flow_id_) + - PROTOBUF_FIELD_OFFSET(ConnectionsLog_ConnectionRequest, duration_millis_)>( + reinterpret_cast(&duration_millis_), + reinterpret_cast(&other->duration_millis_)); +} + +std::string ConnectionsLog_ConnectionRequest::GetTypeName() const { + return "location.nearby.analytics.proto.ConnectionsLog.ConnectionRequest"; +} + + +// =================================================================== + +class ConnectionsLog_ConnectionAttempt::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_duration_millis(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } + static void set_has_type(HasBits* has_bits) { + (*has_bits)[0] |= 8u; + } + static void set_has_direction(HasBits* has_bits) { + (*has_bits)[0] |= 16u; + } + static void set_has_medium(HasBits* has_bits) { + (*has_bits)[0] |= 32u; + } + static void set_has_attempt_result(HasBits* has_bits) { + (*has_bits)[0] |= 64u; + } + static void set_has_client_flow_id(HasBits* has_bits) { + (*has_bits)[0] |= 128u; + } + static void set_has_connection_token(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static const ::location::nearby::analytics::proto::ConnectionsLog_ConnectionAttemptMetadata& connection_attempt_metadata(const ConnectionsLog_ConnectionAttempt* msg); + static void set_has_connection_attempt_metadata(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } +}; + +const ::location::nearby::analytics::proto::ConnectionsLog_ConnectionAttemptMetadata& +ConnectionsLog_ConnectionAttempt::_Internal::connection_attempt_metadata(const ConnectionsLog_ConnectionAttempt* msg) { + return *msg->connection_attempt_metadata_; +} +ConnectionsLog_ConnectionAttempt::ConnectionsLog_ConnectionAttempt(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:location.nearby.analytics.proto.ConnectionsLog.ConnectionAttempt) +} +ConnectionsLog_ConnectionAttempt::ConnectionsLog_ConnectionAttempt(const ConnectionsLog_ConnectionAttempt& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + connection_token_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + connection_token_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_connection_token()) { + connection_token_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_connection_token(), + GetArenaForAllocation()); + } + if (from._internal_has_connection_attempt_metadata()) { + connection_attempt_metadata_ = new ::location::nearby::analytics::proto::ConnectionsLog_ConnectionAttemptMetadata(*from.connection_attempt_metadata_); + } else { + connection_attempt_metadata_ = nullptr; + } + ::memcpy(&duration_millis_, &from.duration_millis_, + static_cast(reinterpret_cast(&client_flow_id_) - + reinterpret_cast(&duration_millis_)) + sizeof(client_flow_id_)); + // @@protoc_insertion_point(copy_constructor:location.nearby.analytics.proto.ConnectionsLog.ConnectionAttempt) +} + +inline void ConnectionsLog_ConnectionAttempt::SharedCtor() { +connection_token_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + connection_token_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&connection_attempt_metadata_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&client_flow_id_) - + reinterpret_cast(&connection_attempt_metadata_)) + sizeof(client_flow_id_)); +} + +ConnectionsLog_ConnectionAttempt::~ConnectionsLog_ConnectionAttempt() { + // @@protoc_insertion_point(destructor:location.nearby.analytics.proto.ConnectionsLog.ConnectionAttempt) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void ConnectionsLog_ConnectionAttempt::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + connection_token_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (this != internal_default_instance()) delete connection_attempt_metadata_; +} + +void ConnectionsLog_ConnectionAttempt::ArenaDtor(void* object) { + ConnectionsLog_ConnectionAttempt* _this = reinterpret_cast< ConnectionsLog_ConnectionAttempt* >(object); + (void)_this; +} +void ConnectionsLog_ConnectionAttempt::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void ConnectionsLog_ConnectionAttempt::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void ConnectionsLog_ConnectionAttempt::Clear() { +// @@protoc_insertion_point(message_clear_start:location.nearby.analytics.proto.ConnectionsLog.ConnectionAttempt) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + connection_token_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000002u) { + GOOGLE_DCHECK(connection_attempt_metadata_ != nullptr); + connection_attempt_metadata_->Clear(); + } + } + if (cached_has_bits & 0x000000fcu) { + ::memset(&duration_millis_, 0, static_cast( + reinterpret_cast(&client_flow_id_) - + reinterpret_cast(&duration_millis_)) + sizeof(client_flow_id_)); + } + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* ConnectionsLog_ConnectionAttempt::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional int64 duration_millis = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + _Internal::set_has_duration_millis(&has_bits); + duration_millis_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .location.nearby.proto.connections.ConnectionAttemptType type = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::location::nearby::proto::connections::ConnectionAttemptType_IsValid(val))) { + _internal_set_type(static_cast<::location::nearby::proto::connections::ConnectionAttemptType>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(2, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // optional .location.nearby.proto.connections.ConnectionAttemptDirection direction = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::location::nearby::proto::connections::ConnectionAttemptDirection_IsValid(val))) { + _internal_set_direction(static_cast<::location::nearby::proto::connections::ConnectionAttemptDirection>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(3, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // optional .location.nearby.proto.connections.Medium medium = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 32)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::location::nearby::proto::connections::Medium_IsValid(val))) { + _internal_set_medium(static_cast<::location::nearby::proto::connections::Medium>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(4, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // optional .location.nearby.proto.connections.ConnectionAttemptResult attempt_result = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 40)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::location::nearby::proto::connections::ConnectionAttemptResult_IsValid(val))) { + _internal_set_attempt_result(static_cast<::location::nearby::proto::connections::ConnectionAttemptResult>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(5, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // optional int64 client_flow_id = 6; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 48)) { + _Internal::set_has_client_flow_id(&has_bits); + client_flow_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional string connection_token = 7; + case 7: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 58)) { + auto str = _internal_mutable_connection_token(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .location.nearby.analytics.proto.ConnectionsLog.ConnectionAttemptMetadata connection_attempt_metadata = 8; + case 8: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 66)) { + ptr = ctx->ParseMessage(_internal_mutable_connection_attempt_metadata(), 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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* ConnectionsLog_ConnectionAttempt::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:location.nearby.analytics.proto.ConnectionsLog.ConnectionAttempt) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional int64 duration_millis = 1; + if (cached_has_bits & 0x00000004u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(1, this->_internal_duration_millis(), target); + } + + // optional .location.nearby.proto.connections.ConnectionAttemptType type = 2; + if (cached_has_bits & 0x00000008u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 2, this->_internal_type(), target); + } + + // optional .location.nearby.proto.connections.ConnectionAttemptDirection direction = 3; + if (cached_has_bits & 0x00000010u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 3, this->_internal_direction(), target); + } + + // optional .location.nearby.proto.connections.Medium medium = 4; + if (cached_has_bits & 0x00000020u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 4, this->_internal_medium(), target); + } + + // optional .location.nearby.proto.connections.ConnectionAttemptResult attempt_result = 5; + if (cached_has_bits & 0x00000040u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 5, this->_internal_attempt_result(), target); + } + + // optional int64 client_flow_id = 6; + if (cached_has_bits & 0x00000080u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(6, this->_internal_client_flow_id(), target); + } + + // optional string connection_token = 7; + if (cached_has_bits & 0x00000001u) { + target = stream->WriteStringMaybeAliased( + 7, this->_internal_connection_token(), target); + } + + // optional .location.nearby.analytics.proto.ConnectionsLog.ConnectionAttemptMetadata connection_attempt_metadata = 8; + if (cached_has_bits & 0x00000002u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 8, _Internal::connection_attempt_metadata(this), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:location.nearby.analytics.proto.ConnectionsLog.ConnectionAttempt) + return target; +} + +size_t ConnectionsLog_ConnectionAttempt::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:location.nearby.analytics.proto.ConnectionsLog.ConnectionAttempt) + 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 = _has_bits_[0]; + if (cached_has_bits & 0x000000ffu) { + // optional string connection_token = 7; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_connection_token()); + } + + // optional .location.nearby.analytics.proto.ConnectionsLog.ConnectionAttemptMetadata connection_attempt_metadata = 8; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *connection_attempt_metadata_); + } + + // optional int64 duration_millis = 1; + if (cached_has_bits & 0x00000004u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_duration_millis()); + } + + // optional .location.nearby.proto.connections.ConnectionAttemptType type = 2; + if (cached_has_bits & 0x00000008u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_type()); + } + + // optional .location.nearby.proto.connections.ConnectionAttemptDirection direction = 3; + if (cached_has_bits & 0x00000010u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_direction()); + } + + // optional .location.nearby.proto.connections.Medium medium = 4; + if (cached_has_bits & 0x00000020u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_medium()); + } + + // optional .location.nearby.proto.connections.ConnectionAttemptResult attempt_result = 5; + if (cached_has_bits & 0x00000040u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_attempt_result()); + } + + // optional int64 client_flow_id = 6; + if (cached_has_bits & 0x00000080u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_client_flow_id()); + } + + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void ConnectionsLog_ConnectionAttempt::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void ConnectionsLog_ConnectionAttempt::MergeFrom(const ConnectionsLog_ConnectionAttempt& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:location.nearby.analytics.proto.ConnectionsLog.ConnectionAttempt) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x000000ffu) { + if (cached_has_bits & 0x00000001u) { + _internal_set_connection_token(from._internal_connection_token()); + } + if (cached_has_bits & 0x00000002u) { + _internal_mutable_connection_attempt_metadata()->::location::nearby::analytics::proto::ConnectionsLog_ConnectionAttemptMetadata::MergeFrom(from._internal_connection_attempt_metadata()); + } + if (cached_has_bits & 0x00000004u) { + duration_millis_ = from.duration_millis_; + } + if (cached_has_bits & 0x00000008u) { + type_ = from.type_; + } + if (cached_has_bits & 0x00000010u) { + direction_ = from.direction_; + } + if (cached_has_bits & 0x00000020u) { + medium_ = from.medium_; + } + if (cached_has_bits & 0x00000040u) { + attempt_result_ = from.attempt_result_; + } + if (cached_has_bits & 0x00000080u) { + client_flow_id_ = from.client_flow_id_; + } + _has_bits_[0] |= cached_has_bits; + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void ConnectionsLog_ConnectionAttempt::CopyFrom(const ConnectionsLog_ConnectionAttempt& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:location.nearby.analytics.proto.ConnectionsLog.ConnectionAttempt) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ConnectionsLog_ConnectionAttempt::IsInitialized() const { + return true; +} + +void ConnectionsLog_ConnectionAttempt::InternalSwap(ConnectionsLog_ConnectionAttempt* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &connection_token_, lhs_arena, + &other->connection_token_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(ConnectionsLog_ConnectionAttempt, client_flow_id_) + + sizeof(ConnectionsLog_ConnectionAttempt::client_flow_id_) + - PROTOBUF_FIELD_OFFSET(ConnectionsLog_ConnectionAttempt, connection_attempt_metadata_)>( + reinterpret_cast(&connection_attempt_metadata_), + reinterpret_cast(&other->connection_attempt_metadata_)); +} + +std::string ConnectionsLog_ConnectionAttempt::GetTypeName() const { + return "location.nearby.analytics.proto.ConnectionsLog.ConnectionAttempt"; +} + + +// =================================================================== + +class ConnectionsLog_EstablishedConnection::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_duration_millis(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static void set_has_medium(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } + static void set_has_disconnection_reason(HasBits* has_bits) { + (*has_bits)[0] |= 8u; + } + static void set_has_client_flow_id(HasBits* has_bits) { + (*has_bits)[0] |= 16u; + } + static void set_has_connection_token(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } +}; + +ConnectionsLog_EstablishedConnection::ConnectionsLog_EstablishedConnection(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned), + sent_payload_(arena), + received_payload_(arena) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:location.nearby.analytics.proto.ConnectionsLog.EstablishedConnection) +} +ConnectionsLog_EstablishedConnection::ConnectionsLog_EstablishedConnection(const ConnectionsLog_EstablishedConnection& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_), + sent_payload_(from.sent_payload_), + received_payload_(from.received_payload_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + connection_token_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + connection_token_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_connection_token()) { + connection_token_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_connection_token(), + GetArenaForAllocation()); + } + ::memcpy(&duration_millis_, &from.duration_millis_, + static_cast(reinterpret_cast(&client_flow_id_) - + reinterpret_cast(&duration_millis_)) + sizeof(client_flow_id_)); + // @@protoc_insertion_point(copy_constructor:location.nearby.analytics.proto.ConnectionsLog.EstablishedConnection) +} + +inline void ConnectionsLog_EstablishedConnection::SharedCtor() { +connection_token_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + connection_token_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&duration_millis_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&client_flow_id_) - + reinterpret_cast(&duration_millis_)) + sizeof(client_flow_id_)); +} + +ConnectionsLog_EstablishedConnection::~ConnectionsLog_EstablishedConnection() { + // @@protoc_insertion_point(destructor:location.nearby.analytics.proto.ConnectionsLog.EstablishedConnection) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void ConnectionsLog_EstablishedConnection::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + connection_token_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void ConnectionsLog_EstablishedConnection::ArenaDtor(void* object) { + ConnectionsLog_EstablishedConnection* _this = reinterpret_cast< ConnectionsLog_EstablishedConnection* >(object); + (void)_this; +} +void ConnectionsLog_EstablishedConnection::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void ConnectionsLog_EstablishedConnection::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void ConnectionsLog_EstablishedConnection::Clear() { +// @@protoc_insertion_point(message_clear_start:location.nearby.analytics.proto.ConnectionsLog.EstablishedConnection) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + sent_payload_.Clear(); + received_payload_.Clear(); + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + connection_token_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x0000001eu) { + ::memset(&duration_millis_, 0, static_cast( + reinterpret_cast(&client_flow_id_) - + reinterpret_cast(&duration_millis_)) + sizeof(client_flow_id_)); + } + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* ConnectionsLog_EstablishedConnection::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional int64 duration_millis = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + _Internal::set_has_duration_millis(&has_bits); + duration_millis_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .location.nearby.proto.connections.Medium medium = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::location::nearby::proto::connections::Medium_IsValid(val))) { + _internal_set_medium(static_cast<::location::nearby::proto::connections::Medium>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(2, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // repeated .location.nearby.analytics.proto.ConnectionsLog.Payload sent_payload = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_sent_payload(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr)); + } else + goto handle_unusual; + continue; + // repeated .location.nearby.analytics.proto.ConnectionsLog.Payload received_payload = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_received_payload(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<34>(ptr)); + } else + goto handle_unusual; + continue; + // optional .location.nearby.proto.connections.DisconnectionReason disconnection_reason = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 40)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::location::nearby::proto::connections::DisconnectionReason_IsValid(val))) { + _internal_set_disconnection_reason(static_cast<::location::nearby::proto::connections::DisconnectionReason>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(5, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // optional int64 client_flow_id = 6; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 48)) { + _Internal::set_has_client_flow_id(&has_bits); + client_flow_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional string connection_token = 7; + case 7: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 58)) { + auto str = _internal_mutable_connection_token(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* ConnectionsLog_EstablishedConnection::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:location.nearby.analytics.proto.ConnectionsLog.EstablishedConnection) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional int64 duration_millis = 1; + if (cached_has_bits & 0x00000002u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(1, this->_internal_duration_millis(), target); + } + + // optional .location.nearby.proto.connections.Medium medium = 2; + if (cached_has_bits & 0x00000004u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 2, this->_internal_medium(), target); + } + + // repeated .location.nearby.analytics.proto.ConnectionsLog.Payload sent_payload = 3; + for (unsigned int i = 0, + n = static_cast(this->_internal_sent_payload_size()); i < n; i++) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(3, this->_internal_sent_payload(i), target, stream); + } + + // repeated .location.nearby.analytics.proto.ConnectionsLog.Payload received_payload = 4; + for (unsigned int i = 0, + n = static_cast(this->_internal_received_payload_size()); i < n; i++) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(4, this->_internal_received_payload(i), target, stream); + } + + // optional .location.nearby.proto.connections.DisconnectionReason disconnection_reason = 5; + if (cached_has_bits & 0x00000008u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 5, this->_internal_disconnection_reason(), target); + } + + // optional int64 client_flow_id = 6; + if (cached_has_bits & 0x00000010u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(6, this->_internal_client_flow_id(), target); + } + + // optional string connection_token = 7; + if (cached_has_bits & 0x00000001u) { + target = stream->WriteStringMaybeAliased( + 7, this->_internal_connection_token(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:location.nearby.analytics.proto.ConnectionsLog.EstablishedConnection) + return target; +} + +size_t ConnectionsLog_EstablishedConnection::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:location.nearby.analytics.proto.ConnectionsLog.EstablishedConnection) + 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 .location.nearby.analytics.proto.ConnectionsLog.Payload sent_payload = 3; + total_size += 1UL * this->_internal_sent_payload_size(); + for (const auto& msg : this->sent_payload_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + // repeated .location.nearby.analytics.proto.ConnectionsLog.Payload received_payload = 4; + total_size += 1UL * this->_internal_received_payload_size(); + for (const auto& msg : this->received_payload_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x0000001fu) { + // optional string connection_token = 7; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_connection_token()); + } + + // optional int64 duration_millis = 1; + if (cached_has_bits & 0x00000002u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_duration_millis()); + } + + // optional .location.nearby.proto.connections.Medium medium = 2; + if (cached_has_bits & 0x00000004u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_medium()); + } + + // optional .location.nearby.proto.connections.DisconnectionReason disconnection_reason = 5; + if (cached_has_bits & 0x00000008u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_disconnection_reason()); + } + + // optional int64 client_flow_id = 6; + if (cached_has_bits & 0x00000010u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_client_flow_id()); + } + + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void ConnectionsLog_EstablishedConnection::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void ConnectionsLog_EstablishedConnection::MergeFrom(const ConnectionsLog_EstablishedConnection& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:location.nearby.analytics.proto.ConnectionsLog.EstablishedConnection) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + sent_payload_.MergeFrom(from.sent_payload_); + received_payload_.MergeFrom(from.received_payload_); + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x0000001fu) { + if (cached_has_bits & 0x00000001u) { + _internal_set_connection_token(from._internal_connection_token()); + } + if (cached_has_bits & 0x00000002u) { + duration_millis_ = from.duration_millis_; + } + if (cached_has_bits & 0x00000004u) { + medium_ = from.medium_; + } + if (cached_has_bits & 0x00000008u) { + disconnection_reason_ = from.disconnection_reason_; + } + if (cached_has_bits & 0x00000010u) { + client_flow_id_ = from.client_flow_id_; + } + _has_bits_[0] |= cached_has_bits; + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void ConnectionsLog_EstablishedConnection::CopyFrom(const ConnectionsLog_EstablishedConnection& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:location.nearby.analytics.proto.ConnectionsLog.EstablishedConnection) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ConnectionsLog_EstablishedConnection::IsInitialized() const { + return true; +} + +void ConnectionsLog_EstablishedConnection::InternalSwap(ConnectionsLog_EstablishedConnection* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + sent_payload_.InternalSwap(&other->sent_payload_); + received_payload_.InternalSwap(&other->received_payload_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &connection_token_, lhs_arena, + &other->connection_token_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(ConnectionsLog_EstablishedConnection, client_flow_id_) + + sizeof(ConnectionsLog_EstablishedConnection::client_flow_id_) + - PROTOBUF_FIELD_OFFSET(ConnectionsLog_EstablishedConnection, duration_millis_)>( + reinterpret_cast(&duration_millis_), + reinterpret_cast(&other->duration_millis_)); +} + +std::string ConnectionsLog_EstablishedConnection::GetTypeName() const { + return "location.nearby.analytics.proto.ConnectionsLog.EstablishedConnection"; +} + + +// =================================================================== + +class ConnectionsLog_Payload::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_duration_millis(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_type(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } + static void set_has_total_size_bytes(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static void set_has_num_bytes_transferred(HasBits* has_bits) { + (*has_bits)[0] |= 16u; + } + static void set_has_num_chunks(HasBits* has_bits) { + (*has_bits)[0] |= 8u; + } + static void set_has_status(HasBits* has_bits) { + (*has_bits)[0] |= 32u; + } +}; + +ConnectionsLog_Payload::ConnectionsLog_Payload(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:location.nearby.analytics.proto.ConnectionsLog.Payload) +} +ConnectionsLog_Payload::ConnectionsLog_Payload(const ConnectionsLog_Payload& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::memcpy(&duration_millis_, &from.duration_millis_, + static_cast(reinterpret_cast(&status_) - + reinterpret_cast(&duration_millis_)) + sizeof(status_)); + // @@protoc_insertion_point(copy_constructor:location.nearby.analytics.proto.ConnectionsLog.Payload) +} + +inline void ConnectionsLog_Payload::SharedCtor() { +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&duration_millis_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&status_) - + reinterpret_cast(&duration_millis_)) + sizeof(status_)); +} + +ConnectionsLog_Payload::~ConnectionsLog_Payload() { + // @@protoc_insertion_point(destructor:location.nearby.analytics.proto.ConnectionsLog.Payload) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void ConnectionsLog_Payload::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); +} + +void ConnectionsLog_Payload::ArenaDtor(void* object) { + ConnectionsLog_Payload* _this = reinterpret_cast< ConnectionsLog_Payload* >(object); + (void)_this; +} +void ConnectionsLog_Payload::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void ConnectionsLog_Payload::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void ConnectionsLog_Payload::Clear() { +// @@protoc_insertion_point(message_clear_start:location.nearby.analytics.proto.ConnectionsLog.Payload) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x0000003fu) { + ::memset(&duration_millis_, 0, static_cast( + reinterpret_cast(&status_) - + reinterpret_cast(&duration_millis_)) + sizeof(status_)); + } + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* ConnectionsLog_Payload::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional int64 duration_millis = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + _Internal::set_has_duration_millis(&has_bits); + duration_millis_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .location.nearby.proto.connections.PayloadType type = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::location::nearby::proto::connections::PayloadType_IsValid(val))) { + _internal_set_type(static_cast<::location::nearby::proto::connections::PayloadType>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(2, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // optional int64 total_size_bytes = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { + _Internal::set_has_total_size_bytes(&has_bits); + total_size_bytes_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional int64 num_bytes_transferred = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 32)) { + _Internal::set_has_num_bytes_transferred(&has_bits); + num_bytes_transferred_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional int32 num_chunks = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 40)) { + _Internal::set_has_num_chunks(&has_bits); + num_chunks_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .location.nearby.proto.connections.PayloadStatus status = 6; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 48)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::location::nearby::proto::connections::PayloadStatus_IsValid(val))) { + _internal_set_status(static_cast<::location::nearby::proto::connections::PayloadStatus>(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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* ConnectionsLog_Payload::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:location.nearby.analytics.proto.ConnectionsLog.Payload) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional int64 duration_millis = 1; + if (cached_has_bits & 0x00000001u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(1, this->_internal_duration_millis(), target); + } + + // optional .location.nearby.proto.connections.PayloadType type = 2; + if (cached_has_bits & 0x00000004u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 2, this->_internal_type(), target); + } + + // optional int64 total_size_bytes = 3; + if (cached_has_bits & 0x00000002u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(3, this->_internal_total_size_bytes(), target); + } + + // optional int64 num_bytes_transferred = 4; + if (cached_has_bits & 0x00000010u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(4, this->_internal_num_bytes_transferred(), target); + } + + // optional int32 num_chunks = 5; + if (cached_has_bits & 0x00000008u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(5, this->_internal_num_chunks(), target); + } + + // optional .location.nearby.proto.connections.PayloadStatus status = 6; + if (cached_has_bits & 0x00000020u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 6, this->_internal_status(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:location.nearby.analytics.proto.ConnectionsLog.Payload) + return target; +} + +size_t ConnectionsLog_Payload::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:location.nearby.analytics.proto.ConnectionsLog.Payload) + 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 = _has_bits_[0]; + if (cached_has_bits & 0x0000003fu) { + // optional int64 duration_millis = 1; + if (cached_has_bits & 0x00000001u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_duration_millis()); + } + + // optional int64 total_size_bytes = 3; + if (cached_has_bits & 0x00000002u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_total_size_bytes()); + } + + // optional .location.nearby.proto.connections.PayloadType type = 2; + if (cached_has_bits & 0x00000004u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_type()); + } + + // optional int32 num_chunks = 5; + if (cached_has_bits & 0x00000008u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_num_chunks()); + } + + // optional int64 num_bytes_transferred = 4; + if (cached_has_bits & 0x00000010u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_num_bytes_transferred()); + } + + // optional .location.nearby.proto.connections.PayloadStatus status = 6; + if (cached_has_bits & 0x00000020u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_status()); + } + + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void ConnectionsLog_Payload::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void ConnectionsLog_Payload::MergeFrom(const ConnectionsLog_Payload& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:location.nearby.analytics.proto.ConnectionsLog.Payload) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x0000003fu) { + if (cached_has_bits & 0x00000001u) { + duration_millis_ = from.duration_millis_; + } + if (cached_has_bits & 0x00000002u) { + total_size_bytes_ = from.total_size_bytes_; + } + if (cached_has_bits & 0x00000004u) { + type_ = from.type_; + } + if (cached_has_bits & 0x00000008u) { + num_chunks_ = from.num_chunks_; + } + if (cached_has_bits & 0x00000010u) { + num_bytes_transferred_ = from.num_bytes_transferred_; + } + if (cached_has_bits & 0x00000020u) { + status_ = from.status_; + } + _has_bits_[0] |= cached_has_bits; + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void ConnectionsLog_Payload::CopyFrom(const ConnectionsLog_Payload& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:location.nearby.analytics.proto.ConnectionsLog.Payload) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ConnectionsLog_Payload::IsInitialized() const { + return true; +} + +void ConnectionsLog_Payload::InternalSwap(ConnectionsLog_Payload* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(ConnectionsLog_Payload, status_) + + sizeof(ConnectionsLog_Payload::status_) + - PROTOBUF_FIELD_OFFSET(ConnectionsLog_Payload, duration_millis_)>( + reinterpret_cast(&duration_millis_), + reinterpret_cast(&other->duration_millis_)); +} + +std::string ConnectionsLog_Payload::GetTypeName() const { + return "location.nearby.analytics.proto.ConnectionsLog.Payload"; +} + + +// =================================================================== + +class ConnectionsLog_BandwidthUpgradeAttempt::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_direction(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } + static void set_has_duration_millis(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static void set_has_from_medium(HasBits* has_bits) { + (*has_bits)[0] |= 8u; + } + static void set_has_to_medium(HasBits* has_bits) { + (*has_bits)[0] |= 16u; + } + static void set_has_upgrade_result(HasBits* has_bits) { + (*has_bits)[0] |= 32u; + } + static void set_has_error_stage(HasBits* has_bits) { + (*has_bits)[0] |= 128u; + } + static void set_has_client_flow_id(HasBits* has_bits) { + (*has_bits)[0] |= 64u; + } + static void set_has_connection_token(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } +}; + +ConnectionsLog_BandwidthUpgradeAttempt::ConnectionsLog_BandwidthUpgradeAttempt(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:location.nearby.analytics.proto.ConnectionsLog.BandwidthUpgradeAttempt) +} +ConnectionsLog_BandwidthUpgradeAttempt::ConnectionsLog_BandwidthUpgradeAttempt(const ConnectionsLog_BandwidthUpgradeAttempt& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + connection_token_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + connection_token_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_connection_token()) { + connection_token_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_connection_token(), + GetArenaForAllocation()); + } + ::memcpy(&duration_millis_, &from.duration_millis_, + static_cast(reinterpret_cast(&error_stage_) - + reinterpret_cast(&duration_millis_)) + sizeof(error_stage_)); + // @@protoc_insertion_point(copy_constructor:location.nearby.analytics.proto.ConnectionsLog.BandwidthUpgradeAttempt) +} + +inline void ConnectionsLog_BandwidthUpgradeAttempt::SharedCtor() { +connection_token_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + connection_token_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&duration_millis_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&error_stage_) - + reinterpret_cast(&duration_millis_)) + sizeof(error_stage_)); +} + +ConnectionsLog_BandwidthUpgradeAttempt::~ConnectionsLog_BandwidthUpgradeAttempt() { + // @@protoc_insertion_point(destructor:location.nearby.analytics.proto.ConnectionsLog.BandwidthUpgradeAttempt) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void ConnectionsLog_BandwidthUpgradeAttempt::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + connection_token_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void ConnectionsLog_BandwidthUpgradeAttempt::ArenaDtor(void* object) { + ConnectionsLog_BandwidthUpgradeAttempt* _this = reinterpret_cast< ConnectionsLog_BandwidthUpgradeAttempt* >(object); + (void)_this; +} +void ConnectionsLog_BandwidthUpgradeAttempt::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void ConnectionsLog_BandwidthUpgradeAttempt::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void ConnectionsLog_BandwidthUpgradeAttempt::Clear() { +// @@protoc_insertion_point(message_clear_start:location.nearby.analytics.proto.ConnectionsLog.BandwidthUpgradeAttempt) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + connection_token_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x000000feu) { + ::memset(&duration_millis_, 0, static_cast( + reinterpret_cast(&error_stage_) - + reinterpret_cast(&duration_millis_)) + sizeof(error_stage_)); + } + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* ConnectionsLog_BandwidthUpgradeAttempt::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional .location.nearby.proto.connections.ConnectionAttemptDirection direction = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::location::nearby::proto::connections::ConnectionAttemptDirection_IsValid(val))) { + _internal_set_direction(static_cast<::location::nearby::proto::connections::ConnectionAttemptDirection>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // optional int64 duration_millis = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { + _Internal::set_has_duration_millis(&has_bits); + duration_millis_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .location.nearby.proto.connections.Medium from_medium = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::location::nearby::proto::connections::Medium_IsValid(val))) { + _internal_set_from_medium(static_cast<::location::nearby::proto::connections::Medium>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(3, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // optional .location.nearby.proto.connections.Medium to_medium = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 32)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::location::nearby::proto::connections::Medium_IsValid(val))) { + _internal_set_to_medium(static_cast<::location::nearby::proto::connections::Medium>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(4, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // optional .location.nearby.proto.connections.BandwidthUpgradeResult upgrade_result = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 40)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::location::nearby::proto::connections::BandwidthUpgradeResult_IsValid(val))) { + _internal_set_upgrade_result(static_cast<::location::nearby::proto::connections::BandwidthUpgradeResult>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(5, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // optional .location.nearby.proto.connections.BandwidthUpgradeErrorStage error_stage = 6; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 48)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::location::nearby::proto::connections::BandwidthUpgradeErrorStage_IsValid(val))) { + _internal_set_error_stage(static_cast<::location::nearby::proto::connections::BandwidthUpgradeErrorStage>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(6, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // optional int64 client_flow_id = 7; + case 7: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 56)) { + _Internal::set_has_client_flow_id(&has_bits); + client_flow_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional string connection_token = 8; + case 8: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 66)) { + auto str = _internal_mutable_connection_token(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* ConnectionsLog_BandwidthUpgradeAttempt::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:location.nearby.analytics.proto.ConnectionsLog.BandwidthUpgradeAttempt) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional .location.nearby.proto.connections.ConnectionAttemptDirection direction = 1; + if (cached_has_bits & 0x00000004u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 1, this->_internal_direction(), target); + } + + // optional int64 duration_millis = 2; + if (cached_has_bits & 0x00000002u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(2, this->_internal_duration_millis(), target); + } + + // optional .location.nearby.proto.connections.Medium from_medium = 3; + if (cached_has_bits & 0x00000008u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 3, this->_internal_from_medium(), target); + } + + // optional .location.nearby.proto.connections.Medium to_medium = 4; + if (cached_has_bits & 0x00000010u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 4, this->_internal_to_medium(), target); + } + + // optional .location.nearby.proto.connections.BandwidthUpgradeResult upgrade_result = 5; + if (cached_has_bits & 0x00000020u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 5, this->_internal_upgrade_result(), target); + } + + // optional .location.nearby.proto.connections.BandwidthUpgradeErrorStage error_stage = 6; + if (cached_has_bits & 0x00000080u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 6, this->_internal_error_stage(), target); + } + + // optional int64 client_flow_id = 7; + if (cached_has_bits & 0x00000040u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(7, this->_internal_client_flow_id(), target); + } + + // optional string connection_token = 8; + if (cached_has_bits & 0x00000001u) { + target = stream->WriteStringMaybeAliased( + 8, this->_internal_connection_token(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:location.nearby.analytics.proto.ConnectionsLog.BandwidthUpgradeAttempt) + return target; +} + +size_t ConnectionsLog_BandwidthUpgradeAttempt::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:location.nearby.analytics.proto.ConnectionsLog.BandwidthUpgradeAttempt) + 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 = _has_bits_[0]; + if (cached_has_bits & 0x000000ffu) { + // optional string connection_token = 8; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_connection_token()); + } + + // optional int64 duration_millis = 2; + if (cached_has_bits & 0x00000002u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_duration_millis()); + } + + // optional .location.nearby.proto.connections.ConnectionAttemptDirection direction = 1; + if (cached_has_bits & 0x00000004u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_direction()); + } + + // optional .location.nearby.proto.connections.Medium from_medium = 3; + if (cached_has_bits & 0x00000008u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_from_medium()); + } + + // optional .location.nearby.proto.connections.Medium to_medium = 4; + if (cached_has_bits & 0x00000010u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_to_medium()); + } + + // optional .location.nearby.proto.connections.BandwidthUpgradeResult upgrade_result = 5; + if (cached_has_bits & 0x00000020u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_upgrade_result()); + } + + // optional int64 client_flow_id = 7; + if (cached_has_bits & 0x00000040u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_client_flow_id()); + } + + // optional .location.nearby.proto.connections.BandwidthUpgradeErrorStage error_stage = 6; + if (cached_has_bits & 0x00000080u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_error_stage()); + } + + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void ConnectionsLog_BandwidthUpgradeAttempt::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void ConnectionsLog_BandwidthUpgradeAttempt::MergeFrom(const ConnectionsLog_BandwidthUpgradeAttempt& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:location.nearby.analytics.proto.ConnectionsLog.BandwidthUpgradeAttempt) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x000000ffu) { + if (cached_has_bits & 0x00000001u) { + _internal_set_connection_token(from._internal_connection_token()); + } + if (cached_has_bits & 0x00000002u) { + duration_millis_ = from.duration_millis_; + } + if (cached_has_bits & 0x00000004u) { + direction_ = from.direction_; + } + if (cached_has_bits & 0x00000008u) { + from_medium_ = from.from_medium_; + } + if (cached_has_bits & 0x00000010u) { + to_medium_ = from.to_medium_; + } + if (cached_has_bits & 0x00000020u) { + upgrade_result_ = from.upgrade_result_; + } + if (cached_has_bits & 0x00000040u) { + client_flow_id_ = from.client_flow_id_; + } + if (cached_has_bits & 0x00000080u) { + error_stage_ = from.error_stage_; + } + _has_bits_[0] |= cached_has_bits; + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void ConnectionsLog_BandwidthUpgradeAttempt::CopyFrom(const ConnectionsLog_BandwidthUpgradeAttempt& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:location.nearby.analytics.proto.ConnectionsLog.BandwidthUpgradeAttempt) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ConnectionsLog_BandwidthUpgradeAttempt::IsInitialized() const { + return true; +} + +void ConnectionsLog_BandwidthUpgradeAttempt::InternalSwap(ConnectionsLog_BandwidthUpgradeAttempt* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &connection_token_, lhs_arena, + &other->connection_token_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(ConnectionsLog_BandwidthUpgradeAttempt, error_stage_) + + sizeof(ConnectionsLog_BandwidthUpgradeAttempt::error_stage_) + - PROTOBUF_FIELD_OFFSET(ConnectionsLog_BandwidthUpgradeAttempt, duration_millis_)>( + reinterpret_cast(&duration_millis_), + reinterpret_cast(&other->duration_millis_)); +} + +std::string ConnectionsLog_BandwidthUpgradeAttempt::GetTypeName() const { + return "location.nearby.analytics.proto.ConnectionsLog.BandwidthUpgradeAttempt"; +} + + +// =================================================================== + +class ConnectionsLog_ErrorCode::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_direction(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } + static void set_has_service_id(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_medium(HasBits* has_bits) { + (*has_bits)[0] |= 8u; + } + static void set_has_event(HasBits* has_bits) { + (*has_bits)[0] |= 16u; + } + static void set_has_description(HasBits* has_bits) { + (*has_bits)[0] |= 32u; + } + static void set_has_flow_id(HasBits* has_bits) { + (*has_bits)[0] |= 64u; + } + static void set_has_connection_token(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } +}; + +ConnectionsLog_ErrorCode::ConnectionsLog_ErrorCode(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:location.nearby.analytics.proto.ConnectionsLog.ErrorCode) +} +ConnectionsLog_ErrorCode::ConnectionsLog_ErrorCode(const ConnectionsLog_ErrorCode& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + service_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + service_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_service_id()) { + service_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_service_id(), + GetArenaForAllocation()); + } + connection_token_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + connection_token_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_connection_token()) { + connection_token_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_connection_token(), + GetArenaForAllocation()); + } + ::memcpy(&direction_, &from.direction_, + static_cast(reinterpret_cast(&flow_id_) - + reinterpret_cast(&direction_)) + sizeof(flow_id_)); + clear_has_ErrorCodeDetail(); + switch (from.ErrorCodeDetail_case()) { + case kCommonError: { + _internal_set_common_error(from._internal_common_error()); + break; + } + case kStartAdvertisingError: { + _internal_set_start_advertising_error(from._internal_start_advertising_error()); + break; + } + case kStartDiscoveringError: { + _internal_set_start_discovering_error(from._internal_start_discovering_error()); + break; + } + case kStopAdvertisingError: { + _internal_set_stop_advertising_error(from._internal_stop_advertising_error()); + break; + } + case kStopDiscoveringError: { + _internal_set_stop_discovering_error(from._internal_stop_discovering_error()); + break; + } + case kStartListeningIncomingConnectionError: { + _internal_set_start_listening_incoming_connection_error(from._internal_start_listening_incoming_connection_error()); + break; + } + case kStopListeningIncomingConnectionError: { + _internal_set_stop_listening_incoming_connection_error(from._internal_stop_listening_incoming_connection_error()); + break; + } + case kConnectError: { + _internal_set_connect_error(from._internal_connect_error()); + break; + } + case kDisconnectError: { + _internal_set_disconnect_error(from._internal_disconnect_error()); + break; + } + case ERRORCODEDETAIL_NOT_SET: { + break; + } + } + // @@protoc_insertion_point(copy_constructor:location.nearby.analytics.proto.ConnectionsLog.ErrorCode) +} + +inline void ConnectionsLog_ErrorCode::SharedCtor() { +service_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + service_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +connection_token_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + connection_token_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&direction_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&flow_id_) - + reinterpret_cast(&direction_)) + sizeof(flow_id_)); +clear_has_ErrorCodeDetail(); +} + +ConnectionsLog_ErrorCode::~ConnectionsLog_ErrorCode() { + // @@protoc_insertion_point(destructor:location.nearby.analytics.proto.ConnectionsLog.ErrorCode) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void ConnectionsLog_ErrorCode::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + service_id_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + connection_token_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (has_ErrorCodeDetail()) { + clear_ErrorCodeDetail(); + } +} + +void ConnectionsLog_ErrorCode::ArenaDtor(void* object) { + ConnectionsLog_ErrorCode* _this = reinterpret_cast< ConnectionsLog_ErrorCode* >(object); + (void)_this; +} +void ConnectionsLog_ErrorCode::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void ConnectionsLog_ErrorCode::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void ConnectionsLog_ErrorCode::clear_ErrorCodeDetail() { +// @@protoc_insertion_point(one_of_clear_start:location.nearby.analytics.proto.ConnectionsLog.ErrorCode) + switch (ErrorCodeDetail_case()) { + case kCommonError: { + // No need to clear + break; + } + case kStartAdvertisingError: { + // No need to clear + break; + } + case kStartDiscoveringError: { + // No need to clear + break; + } + case kStopAdvertisingError: { + // No need to clear + break; + } + case kStopDiscoveringError: { + // No need to clear + break; + } + case kStartListeningIncomingConnectionError: { + // No need to clear + break; + } + case kStopListeningIncomingConnectionError: { + // No need to clear + break; + } + case kConnectError: { + // No need to clear + break; + } + case kDisconnectError: { + // No need to clear + break; + } + case ERRORCODEDETAIL_NOT_SET: { + break; + } + } + _oneof_case_[0] = ERRORCODEDETAIL_NOT_SET; +} + + +void ConnectionsLog_ErrorCode::Clear() { +// @@protoc_insertion_point(message_clear_start:location.nearby.analytics.proto.ConnectionsLog.ErrorCode) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + service_id_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000002u) { + connection_token_.ClearNonDefaultToEmpty(); + } + } + if (cached_has_bits & 0x0000007cu) { + ::memset(&direction_, 0, static_cast( + reinterpret_cast(&flow_id_) - + reinterpret_cast(&direction_)) + sizeof(flow_id_)); + } + clear_ErrorCodeDetail(); + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* ConnectionsLog_ErrorCode::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional .location.nearby.proto.connections.ConnectionAttemptDirection direction = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::location::nearby::proto::connections::ConnectionAttemptDirection_IsValid(val))) { + _internal_set_direction(static_cast<::location::nearby::proto::connections::ConnectionAttemptDirection>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // optional string service_id = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + auto str = _internal_mutable_service_id(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .location.nearby.proto.connections.Medium medium = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::location::nearby::proto::connections::Medium_IsValid(val))) { + _internal_set_medium(static_cast<::location::nearby::proto::connections::Medium>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(3, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // optional .location.nearby.errorcode.proto.Event event = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 32)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::location::nearby::errorcode::proto::Event_IsValid(val))) { + _internal_set_event(static_cast<::location::nearby::errorcode::proto::Event>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(4, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // optional .location.nearby.errorcode.proto.Description description = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 40)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::location::nearby::errorcode::proto::Description_IsValid(val))) { + _internal_set_description(static_cast<::location::nearby::errorcode::proto::Description>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(5, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // optional int64 flow_id = 6; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 48)) { + _Internal::set_has_flow_id(&has_bits); + flow_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // .location.nearby.errorcode.proto.CommonError common_error = 7; + case 7: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 56)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::location::nearby::errorcode::proto::CommonError_IsValid(val))) { + _internal_set_common_error(static_cast<::location::nearby::errorcode::proto::CommonError>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(7, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // .location.nearby.errorcode.proto.StartAdvertisingError start_advertising_error = 8; + case 8: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 64)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::location::nearby::errorcode::proto::StartAdvertisingError_IsValid(val))) { + _internal_set_start_advertising_error(static_cast<::location::nearby::errorcode::proto::StartAdvertisingError>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(8, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // .location.nearby.errorcode.proto.StartDiscoveringError start_discovering_error = 9; + case 9: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 72)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::location::nearby::errorcode::proto::StartDiscoveringError_IsValid(val))) { + _internal_set_start_discovering_error(static_cast<::location::nearby::errorcode::proto::StartDiscoveringError>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(9, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // .location.nearby.errorcode.proto.StopAdvertisingError stop_advertising_error = 10; + case 10: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 80)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::location::nearby::errorcode::proto::StopAdvertisingError_IsValid(val))) { + _internal_set_stop_advertising_error(static_cast<::location::nearby::errorcode::proto::StopAdvertisingError>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(10, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // .location.nearby.errorcode.proto.StopDiscoveringError stop_discovering_error = 11; + case 11: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 88)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::location::nearby::errorcode::proto::StopDiscoveringError_IsValid(val))) { + _internal_set_stop_discovering_error(static_cast<::location::nearby::errorcode::proto::StopDiscoveringError>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(11, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // .location.nearby.errorcode.proto.StartListeningIncomingConnectionError start_listening_incoming_connection_error = 12; + case 12: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 96)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::location::nearby::errorcode::proto::StartListeningIncomingConnectionError_IsValid(val))) { + _internal_set_start_listening_incoming_connection_error(static_cast<::location::nearby::errorcode::proto::StartListeningIncomingConnectionError>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(12, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // .location.nearby.errorcode.proto.StopListeningIncomingConnectionError stop_listening_incoming_connection_error = 13; + case 13: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 104)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::location::nearby::errorcode::proto::StopListeningIncomingConnectionError_IsValid(val))) { + _internal_set_stop_listening_incoming_connection_error(static_cast<::location::nearby::errorcode::proto::StopListeningIncomingConnectionError>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(13, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // .location.nearby.errorcode.proto.ConnectError connect_error = 14; + case 14: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 112)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::location::nearby::errorcode::proto::ConnectError_IsValid(val))) { + _internal_set_connect_error(static_cast<::location::nearby::errorcode::proto::ConnectError>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(14, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // .location.nearby.errorcode.proto.DisconnectError disconnect_error = 15; + case 15: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 120)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::location::nearby::errorcode::proto::DisconnectError_IsValid(val))) { + _internal_set_disconnect_error(static_cast<::location::nearby::errorcode::proto::DisconnectError>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(15, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // optional string connection_token = 16; + case 16: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 130)) { + auto str = _internal_mutable_connection_token(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* ConnectionsLog_ErrorCode::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:location.nearby.analytics.proto.ConnectionsLog.ErrorCode) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional .location.nearby.proto.connections.ConnectionAttemptDirection direction = 1; + if (cached_has_bits & 0x00000004u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 1, this->_internal_direction(), target); + } + + // optional string service_id = 2; + if (cached_has_bits & 0x00000001u) { + target = stream->WriteStringMaybeAliased( + 2, this->_internal_service_id(), target); + } + + // optional .location.nearby.proto.connections.Medium medium = 3; + if (cached_has_bits & 0x00000008u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 3, this->_internal_medium(), target); + } + + // optional .location.nearby.errorcode.proto.Event event = 4; + if (cached_has_bits & 0x00000010u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 4, this->_internal_event(), target); + } + + // optional .location.nearby.errorcode.proto.Description description = 5; + if (cached_has_bits & 0x00000020u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 5, this->_internal_description(), target); + } + + // optional int64 flow_id = 6; + if (cached_has_bits & 0x00000040u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(6, this->_internal_flow_id(), target); + } + + switch (ErrorCodeDetail_case()) { + case kCommonError: { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 7, this->_internal_common_error(), target); + break; + } + case kStartAdvertisingError: { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 8, this->_internal_start_advertising_error(), target); + break; + } + case kStartDiscoveringError: { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 9, this->_internal_start_discovering_error(), target); + break; + } + case kStopAdvertisingError: { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 10, this->_internal_stop_advertising_error(), target); + break; + } + case kStopDiscoveringError: { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 11, this->_internal_stop_discovering_error(), target); + break; + } + case kStartListeningIncomingConnectionError: { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 12, this->_internal_start_listening_incoming_connection_error(), target); + break; + } + case kStopListeningIncomingConnectionError: { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 13, this->_internal_stop_listening_incoming_connection_error(), target); + break; + } + case kConnectError: { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 14, this->_internal_connect_error(), target); + break; + } + case kDisconnectError: { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 15, this->_internal_disconnect_error(), target); + break; + } + default: ; + } + // optional string connection_token = 16; + if (cached_has_bits & 0x00000002u) { + target = stream->WriteStringMaybeAliased( + 16, this->_internal_connection_token(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:location.nearby.analytics.proto.ConnectionsLog.ErrorCode) + return target; +} + +size_t ConnectionsLog_ErrorCode::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:location.nearby.analytics.proto.ConnectionsLog.ErrorCode) + 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 = _has_bits_[0]; + if (cached_has_bits & 0x0000007fu) { + // optional string service_id = 2; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_service_id()); + } + + // optional string connection_token = 16; + if (cached_has_bits & 0x00000002u) { + total_size += 2 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_connection_token()); + } + + // optional .location.nearby.proto.connections.ConnectionAttemptDirection direction = 1; + if (cached_has_bits & 0x00000004u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_direction()); + } + + // optional .location.nearby.proto.connections.Medium medium = 3; + if (cached_has_bits & 0x00000008u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_medium()); + } + + // optional .location.nearby.errorcode.proto.Event event = 4; + if (cached_has_bits & 0x00000010u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_event()); + } + + // optional .location.nearby.errorcode.proto.Description description = 5; + if (cached_has_bits & 0x00000020u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_description()); + } + + // optional int64 flow_id = 6; + if (cached_has_bits & 0x00000040u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_flow_id()); + } + + } + switch (ErrorCodeDetail_case()) { + // .location.nearby.errorcode.proto.CommonError common_error = 7; + case kCommonError: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_common_error()); + break; + } + // .location.nearby.errorcode.proto.StartAdvertisingError start_advertising_error = 8; + case kStartAdvertisingError: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_start_advertising_error()); + break; + } + // .location.nearby.errorcode.proto.StartDiscoveringError start_discovering_error = 9; + case kStartDiscoveringError: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_start_discovering_error()); + break; + } + // .location.nearby.errorcode.proto.StopAdvertisingError stop_advertising_error = 10; + case kStopAdvertisingError: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_stop_advertising_error()); + break; + } + // .location.nearby.errorcode.proto.StopDiscoveringError stop_discovering_error = 11; + case kStopDiscoveringError: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_stop_discovering_error()); + break; + } + // .location.nearby.errorcode.proto.StartListeningIncomingConnectionError start_listening_incoming_connection_error = 12; + case kStartListeningIncomingConnectionError: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_start_listening_incoming_connection_error()); + break; + } + // .location.nearby.errorcode.proto.StopListeningIncomingConnectionError stop_listening_incoming_connection_error = 13; + case kStopListeningIncomingConnectionError: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_stop_listening_incoming_connection_error()); + break; + } + // .location.nearby.errorcode.proto.ConnectError connect_error = 14; + case kConnectError: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_connect_error()); + break; + } + // .location.nearby.errorcode.proto.DisconnectError disconnect_error = 15; + case kDisconnectError: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_disconnect_error()); + break; + } + case ERRORCODEDETAIL_NOT_SET: { + break; + } + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void ConnectionsLog_ErrorCode::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void ConnectionsLog_ErrorCode::MergeFrom(const ConnectionsLog_ErrorCode& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:location.nearby.analytics.proto.ConnectionsLog.ErrorCode) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x0000007fu) { + if (cached_has_bits & 0x00000001u) { + _internal_set_service_id(from._internal_service_id()); + } + if (cached_has_bits & 0x00000002u) { + _internal_set_connection_token(from._internal_connection_token()); + } + if (cached_has_bits & 0x00000004u) { + direction_ = from.direction_; + } + if (cached_has_bits & 0x00000008u) { + medium_ = from.medium_; + } + if (cached_has_bits & 0x00000010u) { + event_ = from.event_; + } + if (cached_has_bits & 0x00000020u) { + description_ = from.description_; + } + if (cached_has_bits & 0x00000040u) { + flow_id_ = from.flow_id_; + } + _has_bits_[0] |= cached_has_bits; + } + switch (from.ErrorCodeDetail_case()) { + case kCommonError: { + _internal_set_common_error(from._internal_common_error()); + break; + } + case kStartAdvertisingError: { + _internal_set_start_advertising_error(from._internal_start_advertising_error()); + break; + } + case kStartDiscoveringError: { + _internal_set_start_discovering_error(from._internal_start_discovering_error()); + break; + } + case kStopAdvertisingError: { + _internal_set_stop_advertising_error(from._internal_stop_advertising_error()); + break; + } + case kStopDiscoveringError: { + _internal_set_stop_discovering_error(from._internal_stop_discovering_error()); + break; + } + case kStartListeningIncomingConnectionError: { + _internal_set_start_listening_incoming_connection_error(from._internal_start_listening_incoming_connection_error()); + break; + } + case kStopListeningIncomingConnectionError: { + _internal_set_stop_listening_incoming_connection_error(from._internal_stop_listening_incoming_connection_error()); + break; + } + case kConnectError: { + _internal_set_connect_error(from._internal_connect_error()); + break; + } + case kDisconnectError: { + _internal_set_disconnect_error(from._internal_disconnect_error()); + break; + } + case ERRORCODEDETAIL_NOT_SET: { + break; + } + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void ConnectionsLog_ErrorCode::CopyFrom(const ConnectionsLog_ErrorCode& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:location.nearby.analytics.proto.ConnectionsLog.ErrorCode) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ConnectionsLog_ErrorCode::IsInitialized() const { + return true; +} + +void ConnectionsLog_ErrorCode::InternalSwap(ConnectionsLog_ErrorCode* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &service_id_, lhs_arena, + &other->service_id_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &connection_token_, lhs_arena, + &other->connection_token_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(ConnectionsLog_ErrorCode, flow_id_) + + sizeof(ConnectionsLog_ErrorCode::flow_id_) + - PROTOBUF_FIELD_OFFSET(ConnectionsLog_ErrorCode, direction_)>( + reinterpret_cast(&direction_), + reinterpret_cast(&other->direction_)); + swap(ErrorCodeDetail_, other->ErrorCodeDetail_); + swap(_oneof_case_[0], other->_oneof_case_[0]); +} + +std::string ConnectionsLog_ErrorCode::GetTypeName() const { + return "location.nearby.analytics.proto.ConnectionsLog.ErrorCode"; +} + + +// =================================================================== + +class ConnectionsLog_AdvertisingMetadata::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_supports_extended_ble_advertisements(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static void set_has_connected_ap_frequency(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_supports_nfc_technology(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } + static void set_has_multiple_advertisement_supported(HasBits* has_bits) { + (*has_bits)[0] |= 8u; + } +}; + +ConnectionsLog_AdvertisingMetadata::ConnectionsLog_AdvertisingMetadata(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:location.nearby.analytics.proto.ConnectionsLog.AdvertisingMetadata) +} +ConnectionsLog_AdvertisingMetadata::ConnectionsLog_AdvertisingMetadata(const ConnectionsLog_AdvertisingMetadata& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::memcpy(&connected_ap_frequency_, &from.connected_ap_frequency_, + static_cast(reinterpret_cast(&multiple_advertisement_supported_) - + reinterpret_cast(&connected_ap_frequency_)) + sizeof(multiple_advertisement_supported_)); + // @@protoc_insertion_point(copy_constructor:location.nearby.analytics.proto.ConnectionsLog.AdvertisingMetadata) +} + +inline void ConnectionsLog_AdvertisingMetadata::SharedCtor() { +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&connected_ap_frequency_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&multiple_advertisement_supported_) - + reinterpret_cast(&connected_ap_frequency_)) + sizeof(multiple_advertisement_supported_)); +} + +ConnectionsLog_AdvertisingMetadata::~ConnectionsLog_AdvertisingMetadata() { + // @@protoc_insertion_point(destructor:location.nearby.analytics.proto.ConnectionsLog.AdvertisingMetadata) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void ConnectionsLog_AdvertisingMetadata::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); +} + +void ConnectionsLog_AdvertisingMetadata::ArenaDtor(void* object) { + ConnectionsLog_AdvertisingMetadata* _this = reinterpret_cast< ConnectionsLog_AdvertisingMetadata* >(object); + (void)_this; +} +void ConnectionsLog_AdvertisingMetadata::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void ConnectionsLog_AdvertisingMetadata::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void ConnectionsLog_AdvertisingMetadata::Clear() { +// @@protoc_insertion_point(message_clear_start:location.nearby.analytics.proto.ConnectionsLog.AdvertisingMetadata) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x0000000fu) { + ::memset(&connected_ap_frequency_, 0, static_cast( + reinterpret_cast(&multiple_advertisement_supported_) - + reinterpret_cast(&connected_ap_frequency_)) + sizeof(multiple_advertisement_supported_)); + } + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* ConnectionsLog_AdvertisingMetadata::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional bool supports_extended_ble_advertisements = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + _Internal::set_has_supports_extended_ble_advertisements(&has_bits); + supports_extended_ble_advertisements_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional int32 connected_ap_frequency = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { + _Internal::set_has_connected_ap_frequency(&has_bits); + connected_ap_frequency_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional bool supports_nfc_technology = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { + _Internal::set_has_supports_nfc_technology(&has_bits); + supports_nfc_technology_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional bool multiple_advertisement_supported = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 32)) { + _Internal::set_has_multiple_advertisement_supported(&has_bits); + multiple_advertisement_supported_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* ConnectionsLog_AdvertisingMetadata::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:location.nearby.analytics.proto.ConnectionsLog.AdvertisingMetadata) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional bool supports_extended_ble_advertisements = 1; + if (cached_has_bits & 0x00000002u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(1, this->_internal_supports_extended_ble_advertisements(), target); + } + + // optional int32 connected_ap_frequency = 2; + if (cached_has_bits & 0x00000001u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_connected_ap_frequency(), target); + } + + // optional bool supports_nfc_technology = 3; + if (cached_has_bits & 0x00000004u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(3, this->_internal_supports_nfc_technology(), target); + } + + // optional bool multiple_advertisement_supported = 4; + if (cached_has_bits & 0x00000008u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(4, this->_internal_multiple_advertisement_supported(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:location.nearby.analytics.proto.ConnectionsLog.AdvertisingMetadata) + return target; +} + +size_t ConnectionsLog_AdvertisingMetadata::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:location.nearby.analytics.proto.ConnectionsLog.AdvertisingMetadata) + 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 = _has_bits_[0]; + if (cached_has_bits & 0x0000000fu) { + // optional int32 connected_ap_frequency = 2; + if (cached_has_bits & 0x00000001u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_connected_ap_frequency()); + } + + // optional bool supports_extended_ble_advertisements = 1; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + 1; + } + + // optional bool supports_nfc_technology = 3; + if (cached_has_bits & 0x00000004u) { + total_size += 1 + 1; + } + + // optional bool multiple_advertisement_supported = 4; + if (cached_has_bits & 0x00000008u) { + total_size += 1 + 1; + } + + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void ConnectionsLog_AdvertisingMetadata::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void ConnectionsLog_AdvertisingMetadata::MergeFrom(const ConnectionsLog_AdvertisingMetadata& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:location.nearby.analytics.proto.ConnectionsLog.AdvertisingMetadata) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x0000000fu) { + if (cached_has_bits & 0x00000001u) { + connected_ap_frequency_ = from.connected_ap_frequency_; + } + if (cached_has_bits & 0x00000002u) { + supports_extended_ble_advertisements_ = from.supports_extended_ble_advertisements_; + } + if (cached_has_bits & 0x00000004u) { + supports_nfc_technology_ = from.supports_nfc_technology_; + } + if (cached_has_bits & 0x00000008u) { + multiple_advertisement_supported_ = from.multiple_advertisement_supported_; + } + _has_bits_[0] |= cached_has_bits; + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void ConnectionsLog_AdvertisingMetadata::CopyFrom(const ConnectionsLog_AdvertisingMetadata& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:location.nearby.analytics.proto.ConnectionsLog.AdvertisingMetadata) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ConnectionsLog_AdvertisingMetadata::IsInitialized() const { + return true; +} + +void ConnectionsLog_AdvertisingMetadata::InternalSwap(ConnectionsLog_AdvertisingMetadata* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(ConnectionsLog_AdvertisingMetadata, multiple_advertisement_supported_) + + sizeof(ConnectionsLog_AdvertisingMetadata::multiple_advertisement_supported_) + - PROTOBUF_FIELD_OFFSET(ConnectionsLog_AdvertisingMetadata, connected_ap_frequency_)>( + reinterpret_cast(&connected_ap_frequency_), + reinterpret_cast(&other->connected_ap_frequency_)); +} + +std::string ConnectionsLog_AdvertisingMetadata::GetTypeName() const { + return "location.nearby.analytics.proto.ConnectionsLog.AdvertisingMetadata"; +} + + +// =================================================================== + +class ConnectionsLog_DiscoveryMetadata::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_supports_extended_ble_advertisements(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static void set_has_connected_ap_frequency(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_supports_nfc_technology(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } +}; + +ConnectionsLog_DiscoveryMetadata::ConnectionsLog_DiscoveryMetadata(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:location.nearby.analytics.proto.ConnectionsLog.DiscoveryMetadata) +} +ConnectionsLog_DiscoveryMetadata::ConnectionsLog_DiscoveryMetadata(const ConnectionsLog_DiscoveryMetadata& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::memcpy(&connected_ap_frequency_, &from.connected_ap_frequency_, + static_cast(reinterpret_cast(&supports_nfc_technology_) - + reinterpret_cast(&connected_ap_frequency_)) + sizeof(supports_nfc_technology_)); + // @@protoc_insertion_point(copy_constructor:location.nearby.analytics.proto.ConnectionsLog.DiscoveryMetadata) +} + +inline void ConnectionsLog_DiscoveryMetadata::SharedCtor() { +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&connected_ap_frequency_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&supports_nfc_technology_) - + reinterpret_cast(&connected_ap_frequency_)) + sizeof(supports_nfc_technology_)); +} + +ConnectionsLog_DiscoveryMetadata::~ConnectionsLog_DiscoveryMetadata() { + // @@protoc_insertion_point(destructor:location.nearby.analytics.proto.ConnectionsLog.DiscoveryMetadata) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void ConnectionsLog_DiscoveryMetadata::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); +} + +void ConnectionsLog_DiscoveryMetadata::ArenaDtor(void* object) { + ConnectionsLog_DiscoveryMetadata* _this = reinterpret_cast< ConnectionsLog_DiscoveryMetadata* >(object); + (void)_this; +} +void ConnectionsLog_DiscoveryMetadata::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void ConnectionsLog_DiscoveryMetadata::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void ConnectionsLog_DiscoveryMetadata::Clear() { +// @@protoc_insertion_point(message_clear_start:location.nearby.analytics.proto.ConnectionsLog.DiscoveryMetadata) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + ::memset(&connected_ap_frequency_, 0, static_cast( + reinterpret_cast(&supports_nfc_technology_) - + reinterpret_cast(&connected_ap_frequency_)) + sizeof(supports_nfc_technology_)); + } + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* ConnectionsLog_DiscoveryMetadata::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional bool supports_extended_ble_advertisements = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + _Internal::set_has_supports_extended_ble_advertisements(&has_bits); + supports_extended_ble_advertisements_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional int32 connected_ap_frequency = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { + _Internal::set_has_connected_ap_frequency(&has_bits); + connected_ap_frequency_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional bool supports_nfc_technology = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { + _Internal::set_has_supports_nfc_technology(&has_bits); + supports_nfc_technology_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* ConnectionsLog_DiscoveryMetadata::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:location.nearby.analytics.proto.ConnectionsLog.DiscoveryMetadata) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional bool supports_extended_ble_advertisements = 1; + if (cached_has_bits & 0x00000002u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(1, this->_internal_supports_extended_ble_advertisements(), target); + } + + // optional int32 connected_ap_frequency = 2; + if (cached_has_bits & 0x00000001u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_connected_ap_frequency(), target); + } + + // optional bool supports_nfc_technology = 3; + if (cached_has_bits & 0x00000004u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(3, this->_internal_supports_nfc_technology(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:location.nearby.analytics.proto.ConnectionsLog.DiscoveryMetadata) + return target; +} + +size_t ConnectionsLog_DiscoveryMetadata::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:location.nearby.analytics.proto.ConnectionsLog.DiscoveryMetadata) + 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 = _has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + // optional int32 connected_ap_frequency = 2; + if (cached_has_bits & 0x00000001u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_connected_ap_frequency()); + } + + // optional bool supports_extended_ble_advertisements = 1; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + 1; + } + + // optional bool supports_nfc_technology = 3; + if (cached_has_bits & 0x00000004u) { + total_size += 1 + 1; + } + + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void ConnectionsLog_DiscoveryMetadata::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void ConnectionsLog_DiscoveryMetadata::MergeFrom(const ConnectionsLog_DiscoveryMetadata& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:location.nearby.analytics.proto.ConnectionsLog.DiscoveryMetadata) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + if (cached_has_bits & 0x00000001u) { + connected_ap_frequency_ = from.connected_ap_frequency_; + } + if (cached_has_bits & 0x00000002u) { + supports_extended_ble_advertisements_ = from.supports_extended_ble_advertisements_; + } + if (cached_has_bits & 0x00000004u) { + supports_nfc_technology_ = from.supports_nfc_technology_; + } + _has_bits_[0] |= cached_has_bits; + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void ConnectionsLog_DiscoveryMetadata::CopyFrom(const ConnectionsLog_DiscoveryMetadata& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:location.nearby.analytics.proto.ConnectionsLog.DiscoveryMetadata) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ConnectionsLog_DiscoveryMetadata::IsInitialized() const { + return true; +} + +void ConnectionsLog_DiscoveryMetadata::InternalSwap(ConnectionsLog_DiscoveryMetadata* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(ConnectionsLog_DiscoveryMetadata, supports_nfc_technology_) + + sizeof(ConnectionsLog_DiscoveryMetadata::supports_nfc_technology_) + - PROTOBUF_FIELD_OFFSET(ConnectionsLog_DiscoveryMetadata, connected_ap_frequency_)>( + reinterpret_cast(&connected_ap_frequency_), + reinterpret_cast(&other->connected_ap_frequency_)); +} + +std::string ConnectionsLog_DiscoveryMetadata::GetTypeName() const { + return "location.nearby.analytics.proto.ConnectionsLog.DiscoveryMetadata"; +} + + +// =================================================================== + +class ConnectionsLog_ConnectionAttemptMetadata::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_technology(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } + static void set_has_band(HasBits* has_bits) { + (*has_bits)[0] |= 8u; + } + static void set_has_frequency(HasBits* has_bits) { + (*has_bits)[0] |= 16u; + } + static void set_has_network_operator(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_country_code(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static void set_has_is_tdls_used(HasBits* has_bits) { + (*has_bits)[0] |= 64u; + } + static void set_has_try_counts(HasBits* has_bits) { + (*has_bits)[0] |= 32u; + } + static void set_has_wifi_hotspot_status(HasBits* has_bits) { + (*has_bits)[0] |= 128u; + } + static void set_has_max_tx_speed(HasBits* has_bits) { + (*has_bits)[0] |= 256u; + } + static void set_has_max_rx_speed(HasBits* has_bits) { + (*has_bits)[0] |= 512u; + } + static void set_has_wifi_channel_width(HasBits* has_bits) { + (*has_bits)[0] |= 1024u; + } + static void set_has_send_buffer_size(HasBits* has_bits) { + (*has_bits)[0] |= 2048u; + } + static void set_has_receive_buffer_size(HasBits* has_bits) { + (*has_bits)[0] |= 4096u; + } +}; + +ConnectionsLog_ConnectionAttemptMetadata::ConnectionsLog_ConnectionAttemptMetadata(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:location.nearby.analytics.proto.ConnectionsLog.ConnectionAttemptMetadata) +} +ConnectionsLog_ConnectionAttemptMetadata::ConnectionsLog_ConnectionAttemptMetadata(const ConnectionsLog_ConnectionAttemptMetadata& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + network_operator_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + network_operator_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_network_operator()) { + network_operator_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_network_operator(), + GetArenaForAllocation()); + } + country_code_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + country_code_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_country_code()) { + country_code_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_country_code(), + GetArenaForAllocation()); + } + ::memcpy(&technology_, &from.technology_, + static_cast(reinterpret_cast(&receive_buffer_size_) - + reinterpret_cast(&technology_)) + sizeof(receive_buffer_size_)); + // @@protoc_insertion_point(copy_constructor:location.nearby.analytics.proto.ConnectionsLog.ConnectionAttemptMetadata) +} + +inline void ConnectionsLog_ConnectionAttemptMetadata::SharedCtor() { +network_operator_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + network_operator_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +country_code_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + country_code_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&technology_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&receive_buffer_size_) - + reinterpret_cast(&technology_)) + sizeof(receive_buffer_size_)); +} + +ConnectionsLog_ConnectionAttemptMetadata::~ConnectionsLog_ConnectionAttemptMetadata() { + // @@protoc_insertion_point(destructor:location.nearby.analytics.proto.ConnectionsLog.ConnectionAttemptMetadata) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void ConnectionsLog_ConnectionAttemptMetadata::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + network_operator_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + country_code_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void ConnectionsLog_ConnectionAttemptMetadata::ArenaDtor(void* object) { + ConnectionsLog_ConnectionAttemptMetadata* _this = reinterpret_cast< ConnectionsLog_ConnectionAttemptMetadata* >(object); + (void)_this; +} +void ConnectionsLog_ConnectionAttemptMetadata::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void ConnectionsLog_ConnectionAttemptMetadata::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void ConnectionsLog_ConnectionAttemptMetadata::Clear() { +// @@protoc_insertion_point(message_clear_start:location.nearby.analytics.proto.ConnectionsLog.ConnectionAttemptMetadata) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + network_operator_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000002u) { + country_code_.ClearNonDefaultToEmpty(); + } + } + if (cached_has_bits & 0x000000fcu) { + ::memset(&technology_, 0, static_cast( + reinterpret_cast(&wifi_hotspot_status_) - + reinterpret_cast(&technology_)) + sizeof(wifi_hotspot_status_)); + } + if (cached_has_bits & 0x00001f00u) { + ::memset(&max_tx_speed_, 0, static_cast( + reinterpret_cast(&receive_buffer_size_) - + reinterpret_cast(&max_tx_speed_)) + sizeof(receive_buffer_size_)); + } + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* ConnectionsLog_ConnectionAttemptMetadata::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional .location.nearby.proto.connections.ConnectionTechnology technology = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::location::nearby::proto::connections::ConnectionTechnology_IsValid(val))) { + _internal_set_technology(static_cast<::location::nearby::proto::connections::ConnectionTechnology>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // optional .location.nearby.proto.connections.ConnectionBand band = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::location::nearby::proto::connections::ConnectionBand_IsValid(val))) { + _internal_set_band(static_cast<::location::nearby::proto::connections::ConnectionBand>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(2, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // optional int32 frequency = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { + _Internal::set_has_frequency(&has_bits); + frequency_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional string network_operator = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { + auto str = _internal_mutable_network_operator(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional string country_code = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 42)) { + auto str = _internal_mutable_country_code(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional bool is_tdls_used = 6; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 48)) { + _Internal::set_has_is_tdls_used(&has_bits); + is_tdls_used_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional int32 try_counts = 7; + case 7: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 56)) { + _Internal::set_has_try_counts(&has_bits); + try_counts_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional bool wifi_hotspot_status = 8; + case 8: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 64)) { + _Internal::set_has_wifi_hotspot_status(&has_bits); + wifi_hotspot_status_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional int32 max_tx_speed = 9; + case 9: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 72)) { + _Internal::set_has_max_tx_speed(&has_bits); + max_tx_speed_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional int32 max_rx_speed = 10; + case 10: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 80)) { + _Internal::set_has_max_rx_speed(&has_bits); + max_rx_speed_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional int32 wifi_channel_width = 11; + case 11: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 88)) { + _Internal::set_has_wifi_channel_width(&has_bits); + wifi_channel_width_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional int32 send_buffer_size = 12; + case 12: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 96)) { + _Internal::set_has_send_buffer_size(&has_bits); + send_buffer_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional int32 receive_buffer_size = 13; + case 13: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 104)) { + _Internal::set_has_receive_buffer_size(&has_bits); + receive_buffer_size_ = ::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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* ConnectionsLog_ConnectionAttemptMetadata::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:location.nearby.analytics.proto.ConnectionsLog.ConnectionAttemptMetadata) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional .location.nearby.proto.connections.ConnectionTechnology technology = 1; + if (cached_has_bits & 0x00000004u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 1, this->_internal_technology(), target); + } + + // optional .location.nearby.proto.connections.ConnectionBand band = 2; + if (cached_has_bits & 0x00000008u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 2, this->_internal_band(), target); + } + + // optional int32 frequency = 3; + if (cached_has_bits & 0x00000010u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(3, this->_internal_frequency(), target); + } + + // optional string network_operator = 4; + if (cached_has_bits & 0x00000001u) { + target = stream->WriteStringMaybeAliased( + 4, this->_internal_network_operator(), target); + } + + // optional string country_code = 5; + if (cached_has_bits & 0x00000002u) { + target = stream->WriteStringMaybeAliased( + 5, this->_internal_country_code(), target); + } + + // optional bool is_tdls_used = 6; + if (cached_has_bits & 0x00000040u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(6, this->_internal_is_tdls_used(), target); + } + + // optional int32 try_counts = 7; + if (cached_has_bits & 0x00000020u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(7, this->_internal_try_counts(), target); + } + + // optional bool wifi_hotspot_status = 8; + if (cached_has_bits & 0x00000080u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(8, this->_internal_wifi_hotspot_status(), target); + } + + // optional int32 max_tx_speed = 9; + if (cached_has_bits & 0x00000100u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(9, this->_internal_max_tx_speed(), target); + } + + // optional int32 max_rx_speed = 10; + if (cached_has_bits & 0x00000200u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(10, this->_internal_max_rx_speed(), target); + } + + // optional int32 wifi_channel_width = 11; + if (cached_has_bits & 0x00000400u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(11, this->_internal_wifi_channel_width(), target); + } + + // optional int32 send_buffer_size = 12; + if (cached_has_bits & 0x00000800u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(12, this->_internal_send_buffer_size(), target); + } + + // optional int32 receive_buffer_size = 13; + if (cached_has_bits & 0x00001000u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(13, this->_internal_receive_buffer_size(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:location.nearby.analytics.proto.ConnectionsLog.ConnectionAttemptMetadata) + return target; +} + +size_t ConnectionsLog_ConnectionAttemptMetadata::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:location.nearby.analytics.proto.ConnectionsLog.ConnectionAttemptMetadata) + 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 = _has_bits_[0]; + if (cached_has_bits & 0x000000ffu) { + // optional string network_operator = 4; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_network_operator()); + } + + // optional string country_code = 5; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_country_code()); + } + + // optional .location.nearby.proto.connections.ConnectionTechnology technology = 1; + if (cached_has_bits & 0x00000004u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_technology()); + } + + // optional .location.nearby.proto.connections.ConnectionBand band = 2; + if (cached_has_bits & 0x00000008u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_band()); + } + + // optional int32 frequency = 3; + if (cached_has_bits & 0x00000010u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_frequency()); + } + + // optional int32 try_counts = 7; + if (cached_has_bits & 0x00000020u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_try_counts()); + } + + // optional bool is_tdls_used = 6; + if (cached_has_bits & 0x00000040u) { + total_size += 1 + 1; + } + + // optional bool wifi_hotspot_status = 8; + if (cached_has_bits & 0x00000080u) { + total_size += 1 + 1; + } + + } + if (cached_has_bits & 0x00001f00u) { + // optional int32 max_tx_speed = 9; + if (cached_has_bits & 0x00000100u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_max_tx_speed()); + } + + // optional int32 max_rx_speed = 10; + if (cached_has_bits & 0x00000200u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_max_rx_speed()); + } + + // optional int32 wifi_channel_width = 11; + if (cached_has_bits & 0x00000400u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_wifi_channel_width()); + } + + // optional int32 send_buffer_size = 12; + if (cached_has_bits & 0x00000800u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_send_buffer_size()); + } + + // optional int32 receive_buffer_size = 13; + if (cached_has_bits & 0x00001000u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_receive_buffer_size()); + } + + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void ConnectionsLog_ConnectionAttemptMetadata::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void ConnectionsLog_ConnectionAttemptMetadata::MergeFrom(const ConnectionsLog_ConnectionAttemptMetadata& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:location.nearby.analytics.proto.ConnectionsLog.ConnectionAttemptMetadata) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x000000ffu) { + if (cached_has_bits & 0x00000001u) { + _internal_set_network_operator(from._internal_network_operator()); + } + if (cached_has_bits & 0x00000002u) { + _internal_set_country_code(from._internal_country_code()); + } + if (cached_has_bits & 0x00000004u) { + technology_ = from.technology_; + } + if (cached_has_bits & 0x00000008u) { + band_ = from.band_; + } + if (cached_has_bits & 0x00000010u) { + frequency_ = from.frequency_; + } + if (cached_has_bits & 0x00000020u) { + try_counts_ = from.try_counts_; + } + if (cached_has_bits & 0x00000040u) { + is_tdls_used_ = from.is_tdls_used_; + } + if (cached_has_bits & 0x00000080u) { + wifi_hotspot_status_ = from.wifi_hotspot_status_; + } + _has_bits_[0] |= cached_has_bits; + } + if (cached_has_bits & 0x00001f00u) { + if (cached_has_bits & 0x00000100u) { + max_tx_speed_ = from.max_tx_speed_; + } + if (cached_has_bits & 0x00000200u) { + max_rx_speed_ = from.max_rx_speed_; + } + if (cached_has_bits & 0x00000400u) { + wifi_channel_width_ = from.wifi_channel_width_; + } + if (cached_has_bits & 0x00000800u) { + send_buffer_size_ = from.send_buffer_size_; + } + if (cached_has_bits & 0x00001000u) { + receive_buffer_size_ = from.receive_buffer_size_; + } + _has_bits_[0] |= cached_has_bits; + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void ConnectionsLog_ConnectionAttemptMetadata::CopyFrom(const ConnectionsLog_ConnectionAttemptMetadata& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:location.nearby.analytics.proto.ConnectionsLog.ConnectionAttemptMetadata) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ConnectionsLog_ConnectionAttemptMetadata::IsInitialized() const { + return true; +} + +void ConnectionsLog_ConnectionAttemptMetadata::InternalSwap(ConnectionsLog_ConnectionAttemptMetadata* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &network_operator_, lhs_arena, + &other->network_operator_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &country_code_, lhs_arena, + &other->country_code_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(ConnectionsLog_ConnectionAttemptMetadata, receive_buffer_size_) + + sizeof(ConnectionsLog_ConnectionAttemptMetadata::receive_buffer_size_) + - PROTOBUF_FIELD_OFFSET(ConnectionsLog_ConnectionAttemptMetadata, technology_)>( + reinterpret_cast(&technology_), + reinterpret_cast(&other->technology_)); +} + +std::string ConnectionsLog_ConnectionAttemptMetadata::GetTypeName() const { + return "location.nearby.analytics.proto.ConnectionsLog.ConnectionAttemptMetadata"; +} + + +// =================================================================== + +class ConnectionsLog::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_event_type(HasBits* has_bits) { + (*has_bits)[0] |= 16u; + } + static const ::location::nearby::analytics::proto::ConnectionsLog_ClientSession& client_session(const ConnectionsLog* msg); + static void set_has_client_session(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } + static void set_has_version(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static const ::location::nearby::analytics::proto::ConnectionsLog_ErrorCode& error_code(const ConnectionsLog* msg); + static void set_has_error_code(HasBits* has_bits) { + (*has_bits)[0] |= 8u; + } + static void set_has_log_source(HasBits* has_bits) { + (*has_bits)[0] |= 32u; + } + static void set_has_files_migration_phase(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } +}; + +const ::location::nearby::analytics::proto::ConnectionsLog_ClientSession& +ConnectionsLog::_Internal::client_session(const ConnectionsLog* msg) { + return *msg->client_session_; +} +const ::location::nearby::analytics::proto::ConnectionsLog_ErrorCode& +ConnectionsLog::_Internal::error_code(const ConnectionsLog* msg) { + return *msg->error_code_; +} +ConnectionsLog::ConnectionsLog(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:location.nearby.analytics.proto.ConnectionsLog) +} +ConnectionsLog::ConnectionsLog(const ConnectionsLog& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + version_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + version_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_version()) { + version_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_version(), + GetArenaForAllocation()); + } + files_migration_phase_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + files_migration_phase_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_files_migration_phase()) { + files_migration_phase_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_files_migration_phase(), + GetArenaForAllocation()); + } + if (from._internal_has_client_session()) { + client_session_ = new ::location::nearby::analytics::proto::ConnectionsLog_ClientSession(*from.client_session_); + } else { + client_session_ = nullptr; + } + if (from._internal_has_error_code()) { + error_code_ = new ::location::nearby::analytics::proto::ConnectionsLog_ErrorCode(*from.error_code_); + } else { + error_code_ = nullptr; + } + ::memcpy(&event_type_, &from.event_type_, + static_cast(reinterpret_cast(&log_source_) - + reinterpret_cast(&event_type_)) + sizeof(log_source_)); + // @@protoc_insertion_point(copy_constructor:location.nearby.analytics.proto.ConnectionsLog) +} + +inline void ConnectionsLog::SharedCtor() { +version_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + version_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +files_migration_phase_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + files_migration_phase_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&client_session_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&log_source_) - + reinterpret_cast(&client_session_)) + sizeof(log_source_)); +} + +ConnectionsLog::~ConnectionsLog() { + // @@protoc_insertion_point(destructor:location.nearby.analytics.proto.ConnectionsLog) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void ConnectionsLog::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + version_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + files_migration_phase_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (this != internal_default_instance()) delete client_session_; + if (this != internal_default_instance()) delete error_code_; +} + +void ConnectionsLog::ArenaDtor(void* object) { + ConnectionsLog* _this = reinterpret_cast< ConnectionsLog* >(object); + (void)_this; +} +void ConnectionsLog::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void ConnectionsLog::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void ConnectionsLog::Clear() { +// @@protoc_insertion_point(message_clear_start:location.nearby.analytics.proto.ConnectionsLog) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x0000000fu) { + if (cached_has_bits & 0x00000001u) { + version_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000002u) { + files_migration_phase_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000004u) { + GOOGLE_DCHECK(client_session_ != nullptr); + client_session_->Clear(); + } + if (cached_has_bits & 0x00000008u) { + GOOGLE_DCHECK(error_code_ != nullptr); + error_code_->Clear(); + } + } + if (cached_has_bits & 0x00000030u) { + ::memset(&event_type_, 0, static_cast( + reinterpret_cast(&log_source_) - + reinterpret_cast(&event_type_)) + sizeof(log_source_)); + } + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* ConnectionsLog::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional .location.nearby.proto.connections.EventType event_type = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::location::nearby::proto::connections::EventType_IsValid(val))) { + _internal_set_event_type(static_cast<::location::nearby::proto::connections::EventType>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // optional .location.nearby.analytics.proto.ConnectionsLog.ClientSession client_session = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + ptr = ctx->ParseMessage(_internal_mutable_client_session(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional string version = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { + auto str = _internal_mutable_version(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .location.nearby.analytics.proto.ConnectionsLog.ErrorCode error_code = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { + ptr = ctx->ParseMessage(_internal_mutable_error_code(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .location.nearby.proto.connections.LogSource log_source = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 40)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::location::nearby::proto::connections::LogSource_IsValid(val))) { + _internal_set_log_source(static_cast<::location::nearby::proto::connections::LogSource>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(5, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // optional string files_migration_phase = 6; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 50)) { + auto str = _internal_mutable_files_migration_phase(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* ConnectionsLog::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:location.nearby.analytics.proto.ConnectionsLog) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional .location.nearby.proto.connections.EventType event_type = 1; + if (cached_has_bits & 0x00000010u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 1, this->_internal_event_type(), target); + } + + // optional .location.nearby.analytics.proto.ConnectionsLog.ClientSession client_session = 2; + if (cached_has_bits & 0x00000004u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 2, _Internal::client_session(this), target, stream); + } + + // optional string version = 3; + if (cached_has_bits & 0x00000001u) { + target = stream->WriteStringMaybeAliased( + 3, this->_internal_version(), target); + } + + // optional .location.nearby.analytics.proto.ConnectionsLog.ErrorCode error_code = 4; + if (cached_has_bits & 0x00000008u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 4, _Internal::error_code(this), target, stream); + } + + // optional .location.nearby.proto.connections.LogSource log_source = 5; + if (cached_has_bits & 0x00000020u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 5, this->_internal_log_source(), target); + } + + // optional string files_migration_phase = 6; + if (cached_has_bits & 0x00000002u) { + target = stream->WriteStringMaybeAliased( + 6, this->_internal_files_migration_phase(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:location.nearby.analytics.proto.ConnectionsLog) + return target; +} + +size_t ConnectionsLog::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:location.nearby.analytics.proto.ConnectionsLog) + 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 = _has_bits_[0]; + if (cached_has_bits & 0x0000003fu) { + // optional string version = 3; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_version()); + } + + // optional string files_migration_phase = 6; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_files_migration_phase()); + } + + // optional .location.nearby.analytics.proto.ConnectionsLog.ClientSession client_session = 2; + if (cached_has_bits & 0x00000004u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *client_session_); + } + + // optional .location.nearby.analytics.proto.ConnectionsLog.ErrorCode error_code = 4; + if (cached_has_bits & 0x00000008u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *error_code_); + } + + // optional .location.nearby.proto.connections.EventType event_type = 1; + if (cached_has_bits & 0x00000010u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_event_type()); + } + + // optional .location.nearby.proto.connections.LogSource log_source = 5; + if (cached_has_bits & 0x00000020u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_log_source()); + } + + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void ConnectionsLog::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void ConnectionsLog::MergeFrom(const ConnectionsLog& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:location.nearby.analytics.proto.ConnectionsLog) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x0000003fu) { + if (cached_has_bits & 0x00000001u) { + _internal_set_version(from._internal_version()); + } + if (cached_has_bits & 0x00000002u) { + _internal_set_files_migration_phase(from._internal_files_migration_phase()); + } + if (cached_has_bits & 0x00000004u) { + _internal_mutable_client_session()->::location::nearby::analytics::proto::ConnectionsLog_ClientSession::MergeFrom(from._internal_client_session()); + } + if (cached_has_bits & 0x00000008u) { + _internal_mutable_error_code()->::location::nearby::analytics::proto::ConnectionsLog_ErrorCode::MergeFrom(from._internal_error_code()); + } + if (cached_has_bits & 0x00000010u) { + event_type_ = from.event_type_; + } + if (cached_has_bits & 0x00000020u) { + log_source_ = from.log_source_; + } + _has_bits_[0] |= cached_has_bits; + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void ConnectionsLog::CopyFrom(const ConnectionsLog& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:location.nearby.analytics.proto.ConnectionsLog) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ConnectionsLog::IsInitialized() const { + return true; +} + +void ConnectionsLog::InternalSwap(ConnectionsLog* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &version_, lhs_arena, + &other->version_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &files_migration_phase_, lhs_arena, + &other->files_migration_phase_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(ConnectionsLog, log_source_) + + sizeof(ConnectionsLog::log_source_) + - PROTOBUF_FIELD_OFFSET(ConnectionsLog, client_session_)>( + reinterpret_cast(&client_session_), + reinterpret_cast(&other->client_session_)); +} + +std::string ConnectionsLog::GetTypeName() const { + return "location.nearby.analytics.proto.ConnectionsLog"; +} + + +// @@protoc_insertion_point(namespace_scope) +} // namespace proto +} // namespace analytics +} // namespace nearby +} // namespace location +PROTOBUF_NAMESPACE_OPEN +template<> PROTOBUF_NOINLINE ::location::nearby::analytics::proto::ConnectionsLog_ClientSession* Arena::CreateMaybeMessage< ::location::nearby::analytics::proto::ConnectionsLog_ClientSession >(Arena* arena) { + return Arena::CreateMessageInternal< ::location::nearby::analytics::proto::ConnectionsLog_ClientSession >(arena); +} +template<> PROTOBUF_NOINLINE ::location::nearby::analytics::proto::ConnectionsLog_StrategySession* Arena::CreateMaybeMessage< ::location::nearby::analytics::proto::ConnectionsLog_StrategySession >(Arena* arena) { + return Arena::CreateMessageInternal< ::location::nearby::analytics::proto::ConnectionsLog_StrategySession >(arena); +} +template<> PROTOBUF_NOINLINE ::location::nearby::analytics::proto::ConnectionsLog_DiscoveryPhase* Arena::CreateMaybeMessage< ::location::nearby::analytics::proto::ConnectionsLog_DiscoveryPhase >(Arena* arena) { + return Arena::CreateMessageInternal< ::location::nearby::analytics::proto::ConnectionsLog_DiscoveryPhase >(arena); +} +template<> PROTOBUF_NOINLINE ::location::nearby::analytics::proto::ConnectionsLog_DiscoveredEndpoint* Arena::CreateMaybeMessage< ::location::nearby::analytics::proto::ConnectionsLog_DiscoveredEndpoint >(Arena* arena) { + return Arena::CreateMessageInternal< ::location::nearby::analytics::proto::ConnectionsLog_DiscoveredEndpoint >(arena); +} +template<> PROTOBUF_NOINLINE ::location::nearby::analytics::proto::ConnectionsLog_UwbRangingProcess* Arena::CreateMaybeMessage< ::location::nearby::analytics::proto::ConnectionsLog_UwbRangingProcess >(Arena* arena) { + return Arena::CreateMessageInternal< ::location::nearby::analytics::proto::ConnectionsLog_UwbRangingProcess >(arena); +} +template<> PROTOBUF_NOINLINE ::location::nearby::analytics::proto::ConnectionsLog_RawUwbRangingEvent* Arena::CreateMaybeMessage< ::location::nearby::analytics::proto::ConnectionsLog_RawUwbRangingEvent >(Arena* arena) { + return Arena::CreateMessageInternal< ::location::nearby::analytics::proto::ConnectionsLog_RawUwbRangingEvent >(arena); +} +template<> PROTOBUF_NOINLINE ::location::nearby::analytics::proto::ConnectionsLog_AdvertisingPhase* Arena::CreateMaybeMessage< ::location::nearby::analytics::proto::ConnectionsLog_AdvertisingPhase >(Arena* arena) { + return Arena::CreateMessageInternal< ::location::nearby::analytics::proto::ConnectionsLog_AdvertisingPhase >(arena); +} +template<> PROTOBUF_NOINLINE ::location::nearby::analytics::proto::ConnectionsLog_ConnectionRequest* Arena::CreateMaybeMessage< ::location::nearby::analytics::proto::ConnectionsLog_ConnectionRequest >(Arena* arena) { + return Arena::CreateMessageInternal< ::location::nearby::analytics::proto::ConnectionsLog_ConnectionRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::location::nearby::analytics::proto::ConnectionsLog_ConnectionAttempt* Arena::CreateMaybeMessage< ::location::nearby::analytics::proto::ConnectionsLog_ConnectionAttempt >(Arena* arena) { + return Arena::CreateMessageInternal< ::location::nearby::analytics::proto::ConnectionsLog_ConnectionAttempt >(arena); +} +template<> PROTOBUF_NOINLINE ::location::nearby::analytics::proto::ConnectionsLog_EstablishedConnection* Arena::CreateMaybeMessage< ::location::nearby::analytics::proto::ConnectionsLog_EstablishedConnection >(Arena* arena) { + return Arena::CreateMessageInternal< ::location::nearby::analytics::proto::ConnectionsLog_EstablishedConnection >(arena); +} +template<> PROTOBUF_NOINLINE ::location::nearby::analytics::proto::ConnectionsLog_Payload* Arena::CreateMaybeMessage< ::location::nearby::analytics::proto::ConnectionsLog_Payload >(Arena* arena) { + return Arena::CreateMessageInternal< ::location::nearby::analytics::proto::ConnectionsLog_Payload >(arena); +} +template<> PROTOBUF_NOINLINE ::location::nearby::analytics::proto::ConnectionsLog_BandwidthUpgradeAttempt* Arena::CreateMaybeMessage< ::location::nearby::analytics::proto::ConnectionsLog_BandwidthUpgradeAttempt >(Arena* arena) { + return Arena::CreateMessageInternal< ::location::nearby::analytics::proto::ConnectionsLog_BandwidthUpgradeAttempt >(arena); +} +template<> PROTOBUF_NOINLINE ::location::nearby::analytics::proto::ConnectionsLog_ErrorCode* Arena::CreateMaybeMessage< ::location::nearby::analytics::proto::ConnectionsLog_ErrorCode >(Arena* arena) { + return Arena::CreateMessageInternal< ::location::nearby::analytics::proto::ConnectionsLog_ErrorCode >(arena); +} +template<> PROTOBUF_NOINLINE ::location::nearby::analytics::proto::ConnectionsLog_AdvertisingMetadata* Arena::CreateMaybeMessage< ::location::nearby::analytics::proto::ConnectionsLog_AdvertisingMetadata >(Arena* arena) { + return Arena::CreateMessageInternal< ::location::nearby::analytics::proto::ConnectionsLog_AdvertisingMetadata >(arena); +} +template<> PROTOBUF_NOINLINE ::location::nearby::analytics::proto::ConnectionsLog_DiscoveryMetadata* Arena::CreateMaybeMessage< ::location::nearby::analytics::proto::ConnectionsLog_DiscoveryMetadata >(Arena* arena) { + return Arena::CreateMessageInternal< ::location::nearby::analytics::proto::ConnectionsLog_DiscoveryMetadata >(arena); +} +template<> PROTOBUF_NOINLINE ::location::nearby::analytics::proto::ConnectionsLog_ConnectionAttemptMetadata* Arena::CreateMaybeMessage< ::location::nearby::analytics::proto::ConnectionsLog_ConnectionAttemptMetadata >(Arena* arena) { + return Arena::CreateMessageInternal< ::location::nearby::analytics::proto::ConnectionsLog_ConnectionAttemptMetadata >(arena); +} +template<> PROTOBUF_NOINLINE ::location::nearby::analytics::proto::ConnectionsLog* Arena::CreateMaybeMessage< ::location::nearby::analytics::proto::ConnectionsLog >(Arena* arena) { + return Arena::CreateMessageInternal< ::location::nearby::analytics::proto::ConnectionsLog >(arena); +} +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) +#include diff --git a/internal/proto/analytics/connections_log.pb.h b/internal/proto/analytics/connections_log.pb.h new file mode 100644 index 00000000..1a68afa4 --- /dev/null +++ b/internal/proto/analytics/connections_log.pb.h @@ -0,0 +1,8625 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: internal/proto/analytics/connections_log.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_internal_2fproto_2fanalytics_2fconnections_5flog_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_internal_2fproto_2fanalytics_2fconnections_5flog_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3019000 +#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 3019004 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include "proto/connections_enums.pb.h" +#include "proto/errorcode/error_code_enums.pb.h" +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_internal_2fproto_2fanalytics_2fconnections_5flog_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_internal_2fproto_2fanalytics_2fconnections_5flog_2eproto { + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::AuxiliaryParseTableField aux[] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[17] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[]; + static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[]; + static const uint32_t offsets[]; +}; +namespace location { +namespace nearby { +namespace analytics { +namespace proto { +class ConnectionsLog; +struct ConnectionsLogDefaultTypeInternal; +extern ConnectionsLogDefaultTypeInternal _ConnectionsLog_default_instance_; +class ConnectionsLog_AdvertisingMetadata; +struct ConnectionsLog_AdvertisingMetadataDefaultTypeInternal; +extern ConnectionsLog_AdvertisingMetadataDefaultTypeInternal _ConnectionsLog_AdvertisingMetadata_default_instance_; +class ConnectionsLog_AdvertisingPhase; +struct ConnectionsLog_AdvertisingPhaseDefaultTypeInternal; +extern ConnectionsLog_AdvertisingPhaseDefaultTypeInternal _ConnectionsLog_AdvertisingPhase_default_instance_; +class ConnectionsLog_BandwidthUpgradeAttempt; +struct ConnectionsLog_BandwidthUpgradeAttemptDefaultTypeInternal; +extern ConnectionsLog_BandwidthUpgradeAttemptDefaultTypeInternal _ConnectionsLog_BandwidthUpgradeAttempt_default_instance_; +class ConnectionsLog_ClientSession; +struct ConnectionsLog_ClientSessionDefaultTypeInternal; +extern ConnectionsLog_ClientSessionDefaultTypeInternal _ConnectionsLog_ClientSession_default_instance_; +class ConnectionsLog_ConnectionAttempt; +struct ConnectionsLog_ConnectionAttemptDefaultTypeInternal; +extern ConnectionsLog_ConnectionAttemptDefaultTypeInternal _ConnectionsLog_ConnectionAttempt_default_instance_; +class ConnectionsLog_ConnectionAttemptMetadata; +struct ConnectionsLog_ConnectionAttemptMetadataDefaultTypeInternal; +extern ConnectionsLog_ConnectionAttemptMetadataDefaultTypeInternal _ConnectionsLog_ConnectionAttemptMetadata_default_instance_; +class ConnectionsLog_ConnectionRequest; +struct ConnectionsLog_ConnectionRequestDefaultTypeInternal; +extern ConnectionsLog_ConnectionRequestDefaultTypeInternal _ConnectionsLog_ConnectionRequest_default_instance_; +class ConnectionsLog_DiscoveredEndpoint; +struct ConnectionsLog_DiscoveredEndpointDefaultTypeInternal; +extern ConnectionsLog_DiscoveredEndpointDefaultTypeInternal _ConnectionsLog_DiscoveredEndpoint_default_instance_; +class ConnectionsLog_DiscoveryMetadata; +struct ConnectionsLog_DiscoveryMetadataDefaultTypeInternal; +extern ConnectionsLog_DiscoveryMetadataDefaultTypeInternal _ConnectionsLog_DiscoveryMetadata_default_instance_; +class ConnectionsLog_DiscoveryPhase; +struct ConnectionsLog_DiscoveryPhaseDefaultTypeInternal; +extern ConnectionsLog_DiscoveryPhaseDefaultTypeInternal _ConnectionsLog_DiscoveryPhase_default_instance_; +class ConnectionsLog_ErrorCode; +struct ConnectionsLog_ErrorCodeDefaultTypeInternal; +extern ConnectionsLog_ErrorCodeDefaultTypeInternal _ConnectionsLog_ErrorCode_default_instance_; +class ConnectionsLog_EstablishedConnection; +struct ConnectionsLog_EstablishedConnectionDefaultTypeInternal; +extern ConnectionsLog_EstablishedConnectionDefaultTypeInternal _ConnectionsLog_EstablishedConnection_default_instance_; +class ConnectionsLog_Payload; +struct ConnectionsLog_PayloadDefaultTypeInternal; +extern ConnectionsLog_PayloadDefaultTypeInternal _ConnectionsLog_Payload_default_instance_; +class ConnectionsLog_RawUwbRangingEvent; +struct ConnectionsLog_RawUwbRangingEventDefaultTypeInternal; +extern ConnectionsLog_RawUwbRangingEventDefaultTypeInternal _ConnectionsLog_RawUwbRangingEvent_default_instance_; +class ConnectionsLog_StrategySession; +struct ConnectionsLog_StrategySessionDefaultTypeInternal; +extern ConnectionsLog_StrategySessionDefaultTypeInternal _ConnectionsLog_StrategySession_default_instance_; +class ConnectionsLog_UwbRangingProcess; +struct ConnectionsLog_UwbRangingProcessDefaultTypeInternal; +extern ConnectionsLog_UwbRangingProcessDefaultTypeInternal _ConnectionsLog_UwbRangingProcess_default_instance_; +} // namespace proto +} // namespace analytics +} // namespace nearby +} // namespace location +PROTOBUF_NAMESPACE_OPEN +template<> ::location::nearby::analytics::proto::ConnectionsLog* Arena::CreateMaybeMessage<::location::nearby::analytics::proto::ConnectionsLog>(Arena*); +template<> ::location::nearby::analytics::proto::ConnectionsLog_AdvertisingMetadata* Arena::CreateMaybeMessage<::location::nearby::analytics::proto::ConnectionsLog_AdvertisingMetadata>(Arena*); +template<> ::location::nearby::analytics::proto::ConnectionsLog_AdvertisingPhase* Arena::CreateMaybeMessage<::location::nearby::analytics::proto::ConnectionsLog_AdvertisingPhase>(Arena*); +template<> ::location::nearby::analytics::proto::ConnectionsLog_BandwidthUpgradeAttempt* Arena::CreateMaybeMessage<::location::nearby::analytics::proto::ConnectionsLog_BandwidthUpgradeAttempt>(Arena*); +template<> ::location::nearby::analytics::proto::ConnectionsLog_ClientSession* Arena::CreateMaybeMessage<::location::nearby::analytics::proto::ConnectionsLog_ClientSession>(Arena*); +template<> ::location::nearby::analytics::proto::ConnectionsLog_ConnectionAttempt* Arena::CreateMaybeMessage<::location::nearby::analytics::proto::ConnectionsLog_ConnectionAttempt>(Arena*); +template<> ::location::nearby::analytics::proto::ConnectionsLog_ConnectionAttemptMetadata* Arena::CreateMaybeMessage<::location::nearby::analytics::proto::ConnectionsLog_ConnectionAttemptMetadata>(Arena*); +template<> ::location::nearby::analytics::proto::ConnectionsLog_ConnectionRequest* Arena::CreateMaybeMessage<::location::nearby::analytics::proto::ConnectionsLog_ConnectionRequest>(Arena*); +template<> ::location::nearby::analytics::proto::ConnectionsLog_DiscoveredEndpoint* Arena::CreateMaybeMessage<::location::nearby::analytics::proto::ConnectionsLog_DiscoveredEndpoint>(Arena*); +template<> ::location::nearby::analytics::proto::ConnectionsLog_DiscoveryMetadata* Arena::CreateMaybeMessage<::location::nearby::analytics::proto::ConnectionsLog_DiscoveryMetadata>(Arena*); +template<> ::location::nearby::analytics::proto::ConnectionsLog_DiscoveryPhase* Arena::CreateMaybeMessage<::location::nearby::analytics::proto::ConnectionsLog_DiscoveryPhase>(Arena*); +template<> ::location::nearby::analytics::proto::ConnectionsLog_ErrorCode* Arena::CreateMaybeMessage<::location::nearby::analytics::proto::ConnectionsLog_ErrorCode>(Arena*); +template<> ::location::nearby::analytics::proto::ConnectionsLog_EstablishedConnection* Arena::CreateMaybeMessage<::location::nearby::analytics::proto::ConnectionsLog_EstablishedConnection>(Arena*); +template<> ::location::nearby::analytics::proto::ConnectionsLog_Payload* Arena::CreateMaybeMessage<::location::nearby::analytics::proto::ConnectionsLog_Payload>(Arena*); +template<> ::location::nearby::analytics::proto::ConnectionsLog_RawUwbRangingEvent* Arena::CreateMaybeMessage<::location::nearby::analytics::proto::ConnectionsLog_RawUwbRangingEvent>(Arena*); +template<> ::location::nearby::analytics::proto::ConnectionsLog_StrategySession* Arena::CreateMaybeMessage<::location::nearby::analytics::proto::ConnectionsLog_StrategySession>(Arena*); +template<> ::location::nearby::analytics::proto::ConnectionsLog_UwbRangingProcess* Arena::CreateMaybeMessage<::location::nearby::analytics::proto::ConnectionsLog_UwbRangingProcess>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace location { +namespace nearby { +namespace analytics { +namespace proto { + +// =================================================================== + +class ConnectionsLog_ClientSession final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:location.nearby.analytics.proto.ConnectionsLog.ClientSession) */ { + public: + inline ConnectionsLog_ClientSession() : ConnectionsLog_ClientSession(nullptr) {} + ~ConnectionsLog_ClientSession() override; + explicit constexpr ConnectionsLog_ClientSession(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ConnectionsLog_ClientSession(const ConnectionsLog_ClientSession& from); + ConnectionsLog_ClientSession(ConnectionsLog_ClientSession&& from) noexcept + : ConnectionsLog_ClientSession() { + *this = ::std::move(from); + } + + inline ConnectionsLog_ClientSession& operator=(const ConnectionsLog_ClientSession& from) { + CopyFrom(from); + return *this; + } + inline ConnectionsLog_ClientSession& operator=(ConnectionsLog_ClientSession&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const ConnectionsLog_ClientSession& default_instance() { + return *internal_default_instance(); + } + static inline const ConnectionsLog_ClientSession* internal_default_instance() { + return reinterpret_cast( + &_ConnectionsLog_ClientSession_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(ConnectionsLog_ClientSession& a, ConnectionsLog_ClientSession& b) { + a.Swap(&b); + } + inline void Swap(ConnectionsLog_ClientSession* 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(ConnectionsLog_ClientSession* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ConnectionsLog_ClientSession* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const ConnectionsLog_ClientSession& from); + void MergeFrom(const ConnectionsLog_ClientSession& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(ConnectionsLog_ClientSession* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "location.nearby.analytics.proto.ConnectionsLog.ClientSession"; + } + protected: + explicit ConnectionsLog_ClientSession(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kStrategySessionFieldNumber = 2, + kDurationMillisFieldNumber = 1, + }; + // repeated .location.nearby.analytics.proto.ConnectionsLog.StrategySession strategy_session = 2; + int strategy_session_size() const; + private: + int _internal_strategy_session_size() const; + public: + void clear_strategy_session(); + ::location::nearby::analytics::proto::ConnectionsLog_StrategySession* mutable_strategy_session(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::location::nearby::analytics::proto::ConnectionsLog_StrategySession >* + mutable_strategy_session(); + private: + const ::location::nearby::analytics::proto::ConnectionsLog_StrategySession& _internal_strategy_session(int index) const; + ::location::nearby::analytics::proto::ConnectionsLog_StrategySession* _internal_add_strategy_session(); + public: + const ::location::nearby::analytics::proto::ConnectionsLog_StrategySession& strategy_session(int index) const; + ::location::nearby::analytics::proto::ConnectionsLog_StrategySession* add_strategy_session(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::location::nearby::analytics::proto::ConnectionsLog_StrategySession >& + strategy_session() const; + + // optional int64 duration_millis = 1; + bool has_duration_millis() const; + private: + bool _internal_has_duration_millis() const; + public: + void clear_duration_millis(); + int64_t duration_millis() const; + void set_duration_millis(int64_t value); + private: + int64_t _internal_duration_millis() const; + void _internal_set_duration_millis(int64_t value); + public: + + // @@protoc_insertion_point(class_scope:location.nearby.analytics.proto.ConnectionsLog.ClientSession) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::location::nearby::analytics::proto::ConnectionsLog_StrategySession > strategy_session_; + int64_t duration_millis_; + friend struct ::TableStruct_internal_2fproto_2fanalytics_2fconnections_5flog_2eproto; +}; +// ------------------------------------------------------------------- + +class ConnectionsLog_StrategySession final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:location.nearby.analytics.proto.ConnectionsLog.StrategySession) */ { + public: + inline ConnectionsLog_StrategySession() : ConnectionsLog_StrategySession(nullptr) {} + ~ConnectionsLog_StrategySession() override; + explicit constexpr ConnectionsLog_StrategySession(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ConnectionsLog_StrategySession(const ConnectionsLog_StrategySession& from); + ConnectionsLog_StrategySession(ConnectionsLog_StrategySession&& from) noexcept + : ConnectionsLog_StrategySession() { + *this = ::std::move(from); + } + + inline ConnectionsLog_StrategySession& operator=(const ConnectionsLog_StrategySession& from) { + CopyFrom(from); + return *this; + } + inline ConnectionsLog_StrategySession& operator=(ConnectionsLog_StrategySession&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const ConnectionsLog_StrategySession& default_instance() { + return *internal_default_instance(); + } + static inline const ConnectionsLog_StrategySession* internal_default_instance() { + return reinterpret_cast( + &_ConnectionsLog_StrategySession_default_instance_); + } + static constexpr int kIndexInFileMessages = + 1; + + friend void swap(ConnectionsLog_StrategySession& a, ConnectionsLog_StrategySession& b) { + a.Swap(&b); + } + inline void Swap(ConnectionsLog_StrategySession* 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(ConnectionsLog_StrategySession* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ConnectionsLog_StrategySession* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const ConnectionsLog_StrategySession& from); + void MergeFrom(const ConnectionsLog_StrategySession& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(ConnectionsLog_StrategySession* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "location.nearby.analytics.proto.ConnectionsLog.StrategySession"; + } + protected: + explicit ConnectionsLog_StrategySession(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kRoleFieldNumber = 3, + kDiscoveryPhaseFieldNumber = 4, + kAdvertisingPhaseFieldNumber = 5, + kConnectionAttemptFieldNumber = 6, + kEstablishedConnectionFieldNumber = 7, + kUpgradeAttemptFieldNumber = 9, + kBuildVersionFieldNumber = 10, + kDurationMillisFieldNumber = 1, + kStrategyFieldNumber = 2, + }; + // repeated .location.nearby.proto.connections.SessionRole role = 3; + int role_size() const; + private: + int _internal_role_size() const; + public: + void clear_role(); + private: + ::location::nearby::proto::connections::SessionRole _internal_role(int index) const; + void _internal_add_role(::location::nearby::proto::connections::SessionRole value); + ::PROTOBUF_NAMESPACE_ID::RepeatedField* _internal_mutable_role(); + public: + ::location::nearby::proto::connections::SessionRole role(int index) const; + void set_role(int index, ::location::nearby::proto::connections::SessionRole value); + void add_role(::location::nearby::proto::connections::SessionRole value); + const ::PROTOBUF_NAMESPACE_ID::RepeatedField& role() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedField* mutable_role(); + + // repeated .location.nearby.analytics.proto.ConnectionsLog.DiscoveryPhase discovery_phase = 4; + int discovery_phase_size() const; + private: + int _internal_discovery_phase_size() const; + public: + void clear_discovery_phase(); + ::location::nearby::analytics::proto::ConnectionsLog_DiscoveryPhase* mutable_discovery_phase(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::location::nearby::analytics::proto::ConnectionsLog_DiscoveryPhase >* + mutable_discovery_phase(); + private: + const ::location::nearby::analytics::proto::ConnectionsLog_DiscoveryPhase& _internal_discovery_phase(int index) const; + ::location::nearby::analytics::proto::ConnectionsLog_DiscoveryPhase* _internal_add_discovery_phase(); + public: + const ::location::nearby::analytics::proto::ConnectionsLog_DiscoveryPhase& discovery_phase(int index) const; + ::location::nearby::analytics::proto::ConnectionsLog_DiscoveryPhase* add_discovery_phase(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::location::nearby::analytics::proto::ConnectionsLog_DiscoveryPhase >& + discovery_phase() const; + + // repeated .location.nearby.analytics.proto.ConnectionsLog.AdvertisingPhase advertising_phase = 5; + int advertising_phase_size() const; + private: + int _internal_advertising_phase_size() const; + public: + void clear_advertising_phase(); + ::location::nearby::analytics::proto::ConnectionsLog_AdvertisingPhase* mutable_advertising_phase(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::location::nearby::analytics::proto::ConnectionsLog_AdvertisingPhase >* + mutable_advertising_phase(); + private: + const ::location::nearby::analytics::proto::ConnectionsLog_AdvertisingPhase& _internal_advertising_phase(int index) const; + ::location::nearby::analytics::proto::ConnectionsLog_AdvertisingPhase* _internal_add_advertising_phase(); + public: + const ::location::nearby::analytics::proto::ConnectionsLog_AdvertisingPhase& advertising_phase(int index) const; + ::location::nearby::analytics::proto::ConnectionsLog_AdvertisingPhase* add_advertising_phase(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::location::nearby::analytics::proto::ConnectionsLog_AdvertisingPhase >& + advertising_phase() const; + + // repeated .location.nearby.analytics.proto.ConnectionsLog.ConnectionAttempt connection_attempt = 6; + int connection_attempt_size() const; + private: + int _internal_connection_attempt_size() const; + public: + void clear_connection_attempt(); + ::location::nearby::analytics::proto::ConnectionsLog_ConnectionAttempt* mutable_connection_attempt(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::location::nearby::analytics::proto::ConnectionsLog_ConnectionAttempt >* + mutable_connection_attempt(); + private: + const ::location::nearby::analytics::proto::ConnectionsLog_ConnectionAttempt& _internal_connection_attempt(int index) const; + ::location::nearby::analytics::proto::ConnectionsLog_ConnectionAttempt* _internal_add_connection_attempt(); + public: + const ::location::nearby::analytics::proto::ConnectionsLog_ConnectionAttempt& connection_attempt(int index) const; + ::location::nearby::analytics::proto::ConnectionsLog_ConnectionAttempt* add_connection_attempt(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::location::nearby::analytics::proto::ConnectionsLog_ConnectionAttempt >& + connection_attempt() const; + + // repeated .location.nearby.analytics.proto.ConnectionsLog.EstablishedConnection established_connection = 7; + int established_connection_size() const; + private: + int _internal_established_connection_size() const; + public: + void clear_established_connection(); + ::location::nearby::analytics::proto::ConnectionsLog_EstablishedConnection* mutable_established_connection(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::location::nearby::analytics::proto::ConnectionsLog_EstablishedConnection >* + mutable_established_connection(); + private: + const ::location::nearby::analytics::proto::ConnectionsLog_EstablishedConnection& _internal_established_connection(int index) const; + ::location::nearby::analytics::proto::ConnectionsLog_EstablishedConnection* _internal_add_established_connection(); + public: + const ::location::nearby::analytics::proto::ConnectionsLog_EstablishedConnection& established_connection(int index) const; + ::location::nearby::analytics::proto::ConnectionsLog_EstablishedConnection* add_established_connection(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::location::nearby::analytics::proto::ConnectionsLog_EstablishedConnection >& + established_connection() const; + + // repeated .location.nearby.analytics.proto.ConnectionsLog.BandwidthUpgradeAttempt upgrade_attempt = 9; + int upgrade_attempt_size() const; + private: + int _internal_upgrade_attempt_size() const; + public: + void clear_upgrade_attempt(); + ::location::nearby::analytics::proto::ConnectionsLog_BandwidthUpgradeAttempt* mutable_upgrade_attempt(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::location::nearby::analytics::proto::ConnectionsLog_BandwidthUpgradeAttempt >* + mutable_upgrade_attempt(); + private: + const ::location::nearby::analytics::proto::ConnectionsLog_BandwidthUpgradeAttempt& _internal_upgrade_attempt(int index) const; + ::location::nearby::analytics::proto::ConnectionsLog_BandwidthUpgradeAttempt* _internal_add_upgrade_attempt(); + public: + const ::location::nearby::analytics::proto::ConnectionsLog_BandwidthUpgradeAttempt& upgrade_attempt(int index) const; + ::location::nearby::analytics::proto::ConnectionsLog_BandwidthUpgradeAttempt* add_upgrade_attempt(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::location::nearby::analytics::proto::ConnectionsLog_BandwidthUpgradeAttempt >& + upgrade_attempt() const; + + // optional string build_version = 10; + bool has_build_version() const; + private: + bool _internal_has_build_version() const; + public: + void clear_build_version(); + const std::string& build_version() const; + template + void set_build_version(ArgT0&& arg0, ArgT... args); + std::string* mutable_build_version(); + PROTOBUF_NODISCARD std::string* release_build_version(); + void set_allocated_build_version(std::string* build_version); + private: + const std::string& _internal_build_version() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_build_version(const std::string& value); + std::string* _internal_mutable_build_version(); + public: + + // optional int64 duration_millis = 1; + bool has_duration_millis() const; + private: + bool _internal_has_duration_millis() const; + public: + void clear_duration_millis(); + int64_t duration_millis() const; + void set_duration_millis(int64_t value); + private: + int64_t _internal_duration_millis() const; + void _internal_set_duration_millis(int64_t value); + public: + + // optional .location.nearby.proto.connections.ConnectionsStrategy strategy = 2; + bool has_strategy() const; + private: + bool _internal_has_strategy() const; + public: + void clear_strategy(); + ::location::nearby::proto::connections::ConnectionsStrategy strategy() const; + void set_strategy(::location::nearby::proto::connections::ConnectionsStrategy value); + private: + ::location::nearby::proto::connections::ConnectionsStrategy _internal_strategy() const; + void _internal_set_strategy(::location::nearby::proto::connections::ConnectionsStrategy value); + public: + + // @@protoc_insertion_point(class_scope:location.nearby.analytics.proto.ConnectionsLog.StrategySession) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::RepeatedField role_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::location::nearby::analytics::proto::ConnectionsLog_DiscoveryPhase > discovery_phase_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::location::nearby::analytics::proto::ConnectionsLog_AdvertisingPhase > advertising_phase_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::location::nearby::analytics::proto::ConnectionsLog_ConnectionAttempt > connection_attempt_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::location::nearby::analytics::proto::ConnectionsLog_EstablishedConnection > established_connection_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::location::nearby::analytics::proto::ConnectionsLog_BandwidthUpgradeAttempt > upgrade_attempt_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr build_version_; + int64_t duration_millis_; + int strategy_; + friend struct ::TableStruct_internal_2fproto_2fanalytics_2fconnections_5flog_2eproto; +}; +// ------------------------------------------------------------------- + +class ConnectionsLog_DiscoveryPhase final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:location.nearby.analytics.proto.ConnectionsLog.DiscoveryPhase) */ { + public: + inline ConnectionsLog_DiscoveryPhase() : ConnectionsLog_DiscoveryPhase(nullptr) {} + ~ConnectionsLog_DiscoveryPhase() override; + explicit constexpr ConnectionsLog_DiscoveryPhase(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ConnectionsLog_DiscoveryPhase(const ConnectionsLog_DiscoveryPhase& from); + ConnectionsLog_DiscoveryPhase(ConnectionsLog_DiscoveryPhase&& from) noexcept + : ConnectionsLog_DiscoveryPhase() { + *this = ::std::move(from); + } + + inline ConnectionsLog_DiscoveryPhase& operator=(const ConnectionsLog_DiscoveryPhase& from) { + CopyFrom(from); + return *this; + } + inline ConnectionsLog_DiscoveryPhase& operator=(ConnectionsLog_DiscoveryPhase&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const ConnectionsLog_DiscoveryPhase& default_instance() { + return *internal_default_instance(); + } + static inline const ConnectionsLog_DiscoveryPhase* internal_default_instance() { + return reinterpret_cast( + &_ConnectionsLog_DiscoveryPhase_default_instance_); + } + static constexpr int kIndexInFileMessages = + 2; + + friend void swap(ConnectionsLog_DiscoveryPhase& a, ConnectionsLog_DiscoveryPhase& b) { + a.Swap(&b); + } + inline void Swap(ConnectionsLog_DiscoveryPhase* 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(ConnectionsLog_DiscoveryPhase* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ConnectionsLog_DiscoveryPhase* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const ConnectionsLog_DiscoveryPhase& from); + void MergeFrom(const ConnectionsLog_DiscoveryPhase& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(ConnectionsLog_DiscoveryPhase* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "location.nearby.analytics.proto.ConnectionsLog.DiscoveryPhase"; + } + protected: + explicit ConnectionsLog_DiscoveryPhase(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kMediumFieldNumber = 2, + kDiscoveredEndpointFieldNumber = 3, + kSentConnectionRequestFieldNumber = 4, + kUwbRangingFieldNumber = 5, + kDiscoveryMetadataFieldNumber = 7, + kDurationMillisFieldNumber = 1, + kClientFlowIdFieldNumber = 6, + }; + // repeated .location.nearby.proto.connections.Medium medium = 2; + int medium_size() const; + private: + int _internal_medium_size() const; + public: + void clear_medium(); + private: + ::location::nearby::proto::connections::Medium _internal_medium(int index) const; + void _internal_add_medium(::location::nearby::proto::connections::Medium value); + ::PROTOBUF_NAMESPACE_ID::RepeatedField* _internal_mutable_medium(); + public: + ::location::nearby::proto::connections::Medium medium(int index) const; + void set_medium(int index, ::location::nearby::proto::connections::Medium value); + void add_medium(::location::nearby::proto::connections::Medium value); + const ::PROTOBUF_NAMESPACE_ID::RepeatedField& medium() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedField* mutable_medium(); + + // repeated .location.nearby.analytics.proto.ConnectionsLog.DiscoveredEndpoint discovered_endpoint = 3; + int discovered_endpoint_size() const; + private: + int _internal_discovered_endpoint_size() const; + public: + void clear_discovered_endpoint(); + ::location::nearby::analytics::proto::ConnectionsLog_DiscoveredEndpoint* mutable_discovered_endpoint(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::location::nearby::analytics::proto::ConnectionsLog_DiscoveredEndpoint >* + mutable_discovered_endpoint(); + private: + const ::location::nearby::analytics::proto::ConnectionsLog_DiscoveredEndpoint& _internal_discovered_endpoint(int index) const; + ::location::nearby::analytics::proto::ConnectionsLog_DiscoveredEndpoint* _internal_add_discovered_endpoint(); + public: + const ::location::nearby::analytics::proto::ConnectionsLog_DiscoveredEndpoint& discovered_endpoint(int index) const; + ::location::nearby::analytics::proto::ConnectionsLog_DiscoveredEndpoint* add_discovered_endpoint(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::location::nearby::analytics::proto::ConnectionsLog_DiscoveredEndpoint >& + discovered_endpoint() const; + + // repeated .location.nearby.analytics.proto.ConnectionsLog.ConnectionRequest sent_connection_request = 4; + int sent_connection_request_size() const; + private: + int _internal_sent_connection_request_size() const; + public: + void clear_sent_connection_request(); + ::location::nearby::analytics::proto::ConnectionsLog_ConnectionRequest* mutable_sent_connection_request(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::location::nearby::analytics::proto::ConnectionsLog_ConnectionRequest >* + mutable_sent_connection_request(); + private: + const ::location::nearby::analytics::proto::ConnectionsLog_ConnectionRequest& _internal_sent_connection_request(int index) const; + ::location::nearby::analytics::proto::ConnectionsLog_ConnectionRequest* _internal_add_sent_connection_request(); + public: + const ::location::nearby::analytics::proto::ConnectionsLog_ConnectionRequest& sent_connection_request(int index) const; + ::location::nearby::analytics::proto::ConnectionsLog_ConnectionRequest* add_sent_connection_request(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::location::nearby::analytics::proto::ConnectionsLog_ConnectionRequest >& + sent_connection_request() const; + + // repeated .location.nearby.analytics.proto.ConnectionsLog.UwbRangingProcess uwb_ranging = 5; + int uwb_ranging_size() const; + private: + int _internal_uwb_ranging_size() const; + public: + void clear_uwb_ranging(); + ::location::nearby::analytics::proto::ConnectionsLog_UwbRangingProcess* mutable_uwb_ranging(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::location::nearby::analytics::proto::ConnectionsLog_UwbRangingProcess >* + mutable_uwb_ranging(); + private: + const ::location::nearby::analytics::proto::ConnectionsLog_UwbRangingProcess& _internal_uwb_ranging(int index) const; + ::location::nearby::analytics::proto::ConnectionsLog_UwbRangingProcess* _internal_add_uwb_ranging(); + public: + const ::location::nearby::analytics::proto::ConnectionsLog_UwbRangingProcess& uwb_ranging(int index) const; + ::location::nearby::analytics::proto::ConnectionsLog_UwbRangingProcess* add_uwb_ranging(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::location::nearby::analytics::proto::ConnectionsLog_UwbRangingProcess >& + uwb_ranging() const; + + // optional .location.nearby.analytics.proto.ConnectionsLog.DiscoveryMetadata discovery_metadata = 7; + bool has_discovery_metadata() const; + private: + bool _internal_has_discovery_metadata() const; + public: + void clear_discovery_metadata(); + const ::location::nearby::analytics::proto::ConnectionsLog_DiscoveryMetadata& discovery_metadata() const; + PROTOBUF_NODISCARD ::location::nearby::analytics::proto::ConnectionsLog_DiscoveryMetadata* release_discovery_metadata(); + ::location::nearby::analytics::proto::ConnectionsLog_DiscoveryMetadata* mutable_discovery_metadata(); + void set_allocated_discovery_metadata(::location::nearby::analytics::proto::ConnectionsLog_DiscoveryMetadata* discovery_metadata); + private: + const ::location::nearby::analytics::proto::ConnectionsLog_DiscoveryMetadata& _internal_discovery_metadata() const; + ::location::nearby::analytics::proto::ConnectionsLog_DiscoveryMetadata* _internal_mutable_discovery_metadata(); + public: + void unsafe_arena_set_allocated_discovery_metadata( + ::location::nearby::analytics::proto::ConnectionsLog_DiscoveryMetadata* discovery_metadata); + ::location::nearby::analytics::proto::ConnectionsLog_DiscoveryMetadata* unsafe_arena_release_discovery_metadata(); + + // optional int64 duration_millis = 1; + bool has_duration_millis() const; + private: + bool _internal_has_duration_millis() const; + public: + void clear_duration_millis(); + int64_t duration_millis() const; + void set_duration_millis(int64_t value); + private: + int64_t _internal_duration_millis() const; + void _internal_set_duration_millis(int64_t value); + public: + + // optional int64 client_flow_id = 6; + bool has_client_flow_id() const; + private: + bool _internal_has_client_flow_id() const; + public: + void clear_client_flow_id(); + int64_t client_flow_id() const; + void set_client_flow_id(int64_t value); + private: + int64_t _internal_client_flow_id() const; + void _internal_set_client_flow_id(int64_t value); + public: + + // @@protoc_insertion_point(class_scope:location.nearby.analytics.proto.ConnectionsLog.DiscoveryPhase) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::RepeatedField medium_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::location::nearby::analytics::proto::ConnectionsLog_DiscoveredEndpoint > discovered_endpoint_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::location::nearby::analytics::proto::ConnectionsLog_ConnectionRequest > sent_connection_request_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::location::nearby::analytics::proto::ConnectionsLog_UwbRangingProcess > uwb_ranging_; + ::location::nearby::analytics::proto::ConnectionsLog_DiscoveryMetadata* discovery_metadata_; + int64_t duration_millis_; + int64_t client_flow_id_; + friend struct ::TableStruct_internal_2fproto_2fanalytics_2fconnections_5flog_2eproto; +}; +// ------------------------------------------------------------------- + +class ConnectionsLog_DiscoveredEndpoint final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:location.nearby.analytics.proto.ConnectionsLog.DiscoveredEndpoint) */ { + public: + inline ConnectionsLog_DiscoveredEndpoint() : ConnectionsLog_DiscoveredEndpoint(nullptr) {} + ~ConnectionsLog_DiscoveredEndpoint() override; + explicit constexpr ConnectionsLog_DiscoveredEndpoint(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ConnectionsLog_DiscoveredEndpoint(const ConnectionsLog_DiscoveredEndpoint& from); + ConnectionsLog_DiscoveredEndpoint(ConnectionsLog_DiscoveredEndpoint&& from) noexcept + : ConnectionsLog_DiscoveredEndpoint() { + *this = ::std::move(from); + } + + inline ConnectionsLog_DiscoveredEndpoint& operator=(const ConnectionsLog_DiscoveredEndpoint& from) { + CopyFrom(from); + return *this; + } + inline ConnectionsLog_DiscoveredEndpoint& operator=(ConnectionsLog_DiscoveredEndpoint&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const ConnectionsLog_DiscoveredEndpoint& default_instance() { + return *internal_default_instance(); + } + static inline const ConnectionsLog_DiscoveredEndpoint* internal_default_instance() { + return reinterpret_cast( + &_ConnectionsLog_DiscoveredEndpoint_default_instance_); + } + static constexpr int kIndexInFileMessages = + 3; + + friend void swap(ConnectionsLog_DiscoveredEndpoint& a, ConnectionsLog_DiscoveredEndpoint& b) { + a.Swap(&b); + } + inline void Swap(ConnectionsLog_DiscoveredEndpoint* 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(ConnectionsLog_DiscoveredEndpoint* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ConnectionsLog_DiscoveredEndpoint* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const ConnectionsLog_DiscoveredEndpoint& from); + void MergeFrom(const ConnectionsLog_DiscoveredEndpoint& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(ConnectionsLog_DiscoveredEndpoint* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "location.nearby.analytics.proto.ConnectionsLog.DiscoveredEndpoint"; + } + protected: + explicit ConnectionsLog_DiscoveredEndpoint(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kLatencyMillisFieldNumber = 2, + kMediumFieldNumber = 1, + }; + // optional int64 latency_millis = 2; + bool has_latency_millis() const; + private: + bool _internal_has_latency_millis() const; + public: + void clear_latency_millis(); + int64_t latency_millis() const; + void set_latency_millis(int64_t value); + private: + int64_t _internal_latency_millis() const; + void _internal_set_latency_millis(int64_t value); + public: + + // optional .location.nearby.proto.connections.Medium medium = 1; + bool has_medium() const; + private: + bool _internal_has_medium() const; + public: + void clear_medium(); + ::location::nearby::proto::connections::Medium medium() const; + void set_medium(::location::nearby::proto::connections::Medium value); + private: + ::location::nearby::proto::connections::Medium _internal_medium() const; + void _internal_set_medium(::location::nearby::proto::connections::Medium value); + public: + + // @@protoc_insertion_point(class_scope:location.nearby.analytics.proto.ConnectionsLog.DiscoveredEndpoint) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + int64_t latency_millis_; + int medium_; + friend struct ::TableStruct_internal_2fproto_2fanalytics_2fconnections_5flog_2eproto; +}; +// ------------------------------------------------------------------- + +class ConnectionsLog_UwbRangingProcess final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:location.nearby.analytics.proto.ConnectionsLog.UwbRangingProcess) */ { + public: + inline ConnectionsLog_UwbRangingProcess() : ConnectionsLog_UwbRangingProcess(nullptr) {} + ~ConnectionsLog_UwbRangingProcess() override; + explicit constexpr ConnectionsLog_UwbRangingProcess(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ConnectionsLog_UwbRangingProcess(const ConnectionsLog_UwbRangingProcess& from); + ConnectionsLog_UwbRangingProcess(ConnectionsLog_UwbRangingProcess&& from) noexcept + : ConnectionsLog_UwbRangingProcess() { + *this = ::std::move(from); + } + + inline ConnectionsLog_UwbRangingProcess& operator=(const ConnectionsLog_UwbRangingProcess& from) { + CopyFrom(from); + return *this; + } + inline ConnectionsLog_UwbRangingProcess& operator=(ConnectionsLog_UwbRangingProcess&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const ConnectionsLog_UwbRangingProcess& default_instance() { + return *internal_default_instance(); + } + static inline const ConnectionsLog_UwbRangingProcess* internal_default_instance() { + return reinterpret_cast( + &_ConnectionsLog_UwbRangingProcess_default_instance_); + } + static constexpr int kIndexInFileMessages = + 4; + + friend void swap(ConnectionsLog_UwbRangingProcess& a, ConnectionsLog_UwbRangingProcess& b) { + a.Swap(&b); + } + inline void Swap(ConnectionsLog_UwbRangingProcess* 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(ConnectionsLog_UwbRangingProcess* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ConnectionsLog_UwbRangingProcess* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const ConnectionsLog_UwbRangingProcess& from); + void MergeFrom(const ConnectionsLog_UwbRangingProcess& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(ConnectionsLog_UwbRangingProcess* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "location.nearby.analytics.proto.ConnectionsLog.UwbRangingProcess"; + } + protected: + explicit ConnectionsLog_UwbRangingProcess(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kUwbRangingDataFieldNumber = 2, + kDurationMillisFieldNumber = 1, + kNumberOfRangingDataFieldNumber = 3, + kDistanceMinFieldNumber = 4, + kDistanceMaxFieldNumber = 5, + kDistanceAveFieldNumber = 6, + kDistanceVarianceFieldNumber = 7, + kAzimuthMinFieldNumber = 8, + kAzimuthMaxFieldNumber = 9, + kAzimuthAveFieldNumber = 10, + kAzimuthVarianceFieldNumber = 11, + }; + // repeated .location.nearby.analytics.proto.ConnectionsLog.RawUwbRangingEvent uwb_ranging_data = 2; + int uwb_ranging_data_size() const; + private: + int _internal_uwb_ranging_data_size() const; + public: + void clear_uwb_ranging_data(); + ::location::nearby::analytics::proto::ConnectionsLog_RawUwbRangingEvent* mutable_uwb_ranging_data(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::location::nearby::analytics::proto::ConnectionsLog_RawUwbRangingEvent >* + mutable_uwb_ranging_data(); + private: + const ::location::nearby::analytics::proto::ConnectionsLog_RawUwbRangingEvent& _internal_uwb_ranging_data(int index) const; + ::location::nearby::analytics::proto::ConnectionsLog_RawUwbRangingEvent* _internal_add_uwb_ranging_data(); + public: + const ::location::nearby::analytics::proto::ConnectionsLog_RawUwbRangingEvent& uwb_ranging_data(int index) const; + ::location::nearby::analytics::proto::ConnectionsLog_RawUwbRangingEvent* add_uwb_ranging_data(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::location::nearby::analytics::proto::ConnectionsLog_RawUwbRangingEvent >& + uwb_ranging_data() const; + + // optional int64 duration_millis = 1; + bool has_duration_millis() const; + private: + bool _internal_has_duration_millis() const; + public: + void clear_duration_millis(); + int64_t duration_millis() const; + void set_duration_millis(int64_t value); + private: + int64_t _internal_duration_millis() const; + void _internal_set_duration_millis(int64_t value); + public: + + // optional int32 number_of_ranging_data = 3; + bool has_number_of_ranging_data() const; + private: + bool _internal_has_number_of_ranging_data() const; + public: + void clear_number_of_ranging_data(); + int32_t number_of_ranging_data() const; + void set_number_of_ranging_data(int32_t value); + private: + int32_t _internal_number_of_ranging_data() const; + void _internal_set_number_of_ranging_data(int32_t value); + public: + + // optional int32 distance_min = 4; + bool has_distance_min() const; + private: + bool _internal_has_distance_min() const; + public: + void clear_distance_min(); + int32_t distance_min() const; + void set_distance_min(int32_t value); + private: + int32_t _internal_distance_min() const; + void _internal_set_distance_min(int32_t value); + public: + + // optional int32 distance_max = 5; + bool has_distance_max() const; + private: + bool _internal_has_distance_max() const; + public: + void clear_distance_max(); + int32_t distance_max() const; + void set_distance_max(int32_t value); + private: + int32_t _internal_distance_max() const; + void _internal_set_distance_max(int32_t value); + public: + + // optional int32 distance_ave = 6; + bool has_distance_ave() const; + private: + bool _internal_has_distance_ave() const; + public: + void clear_distance_ave(); + int32_t distance_ave() const; + void set_distance_ave(int32_t value); + private: + int32_t _internal_distance_ave() const; + void _internal_set_distance_ave(int32_t value); + public: + + // optional int32 distance_variance = 7; + bool has_distance_variance() const; + private: + bool _internal_has_distance_variance() const; + public: + void clear_distance_variance(); + int32_t distance_variance() const; + void set_distance_variance(int32_t value); + private: + int32_t _internal_distance_variance() const; + void _internal_set_distance_variance(int32_t value); + public: + + // optional int32 azimuth_min = 8; + bool has_azimuth_min() const; + private: + bool _internal_has_azimuth_min() const; + public: + void clear_azimuth_min(); + int32_t azimuth_min() const; + void set_azimuth_min(int32_t value); + private: + int32_t _internal_azimuth_min() const; + void _internal_set_azimuth_min(int32_t value); + public: + + // optional int32 azimuth_max = 9; + bool has_azimuth_max() const; + private: + bool _internal_has_azimuth_max() const; + public: + void clear_azimuth_max(); + int32_t azimuth_max() const; + void set_azimuth_max(int32_t value); + private: + int32_t _internal_azimuth_max() const; + void _internal_set_azimuth_max(int32_t value); + public: + + // optional int32 azimuth_ave = 10; + bool has_azimuth_ave() const; + private: + bool _internal_has_azimuth_ave() const; + public: + void clear_azimuth_ave(); + int32_t azimuth_ave() const; + void set_azimuth_ave(int32_t value); + private: + int32_t _internal_azimuth_ave() const; + void _internal_set_azimuth_ave(int32_t value); + public: + + // optional int32 azimuth_variance = 11; + bool has_azimuth_variance() const; + private: + bool _internal_has_azimuth_variance() const; + public: + void clear_azimuth_variance(); + int32_t azimuth_variance() const; + void set_azimuth_variance(int32_t value); + private: + int32_t _internal_azimuth_variance() const; + void _internal_set_azimuth_variance(int32_t value); + public: + + // @@protoc_insertion_point(class_scope:location.nearby.analytics.proto.ConnectionsLog.UwbRangingProcess) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::location::nearby::analytics::proto::ConnectionsLog_RawUwbRangingEvent > uwb_ranging_data_; + int64_t duration_millis_; + int32_t number_of_ranging_data_; + int32_t distance_min_; + int32_t distance_max_; + int32_t distance_ave_; + int32_t distance_variance_; + int32_t azimuth_min_; + int32_t azimuth_max_; + int32_t azimuth_ave_; + int32_t azimuth_variance_; + friend struct ::TableStruct_internal_2fproto_2fanalytics_2fconnections_5flog_2eproto; +}; +// ------------------------------------------------------------------- + +class ConnectionsLog_RawUwbRangingEvent final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:location.nearby.analytics.proto.ConnectionsLog.RawUwbRangingEvent) */ { + public: + inline ConnectionsLog_RawUwbRangingEvent() : ConnectionsLog_RawUwbRangingEvent(nullptr) {} + ~ConnectionsLog_RawUwbRangingEvent() override; + explicit constexpr ConnectionsLog_RawUwbRangingEvent(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ConnectionsLog_RawUwbRangingEvent(const ConnectionsLog_RawUwbRangingEvent& from); + ConnectionsLog_RawUwbRangingEvent(ConnectionsLog_RawUwbRangingEvent&& from) noexcept + : ConnectionsLog_RawUwbRangingEvent() { + *this = ::std::move(from); + } + + inline ConnectionsLog_RawUwbRangingEvent& operator=(const ConnectionsLog_RawUwbRangingEvent& from) { + CopyFrom(from); + return *this; + } + inline ConnectionsLog_RawUwbRangingEvent& operator=(ConnectionsLog_RawUwbRangingEvent&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const ConnectionsLog_RawUwbRangingEvent& default_instance() { + return *internal_default_instance(); + } + static inline const ConnectionsLog_RawUwbRangingEvent* internal_default_instance() { + return reinterpret_cast( + &_ConnectionsLog_RawUwbRangingEvent_default_instance_); + } + static constexpr int kIndexInFileMessages = + 5; + + friend void swap(ConnectionsLog_RawUwbRangingEvent& a, ConnectionsLog_RawUwbRangingEvent& b) { + a.Swap(&b); + } + inline void Swap(ConnectionsLog_RawUwbRangingEvent* 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(ConnectionsLog_RawUwbRangingEvent* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ConnectionsLog_RawUwbRangingEvent* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const ConnectionsLog_RawUwbRangingEvent& from); + void MergeFrom(const ConnectionsLog_RawUwbRangingEvent& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(ConnectionsLog_RawUwbRangingEvent* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "location.nearby.analytics.proto.ConnectionsLog.RawUwbRangingEvent"; + } + protected: + explicit ConnectionsLog_RawUwbRangingEvent(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kDistanceFieldNumber = 1, + kAzimuthAngleFieldNumber = 2, + kPolarAngleFieldNumber = 3, + }; + // optional int32 distance = 1; + bool has_distance() const; + private: + bool _internal_has_distance() const; + public: + void clear_distance(); + int32_t distance() const; + void set_distance(int32_t value); + private: + int32_t _internal_distance() const; + void _internal_set_distance(int32_t value); + public: + + // optional int32 azimuth_angle = 2; + bool has_azimuth_angle() const; + private: + bool _internal_has_azimuth_angle() const; + public: + void clear_azimuth_angle(); + int32_t azimuth_angle() const; + void set_azimuth_angle(int32_t value); + private: + int32_t _internal_azimuth_angle() const; + void _internal_set_azimuth_angle(int32_t value); + public: + + // optional int32 polar_angle = 3; + bool has_polar_angle() const; + private: + bool _internal_has_polar_angle() const; + public: + void clear_polar_angle(); + int32_t polar_angle() const; + void set_polar_angle(int32_t value); + private: + int32_t _internal_polar_angle() const; + void _internal_set_polar_angle(int32_t value); + public: + + // @@protoc_insertion_point(class_scope:location.nearby.analytics.proto.ConnectionsLog.RawUwbRangingEvent) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + int32_t distance_; + int32_t azimuth_angle_; + int32_t polar_angle_; + friend struct ::TableStruct_internal_2fproto_2fanalytics_2fconnections_5flog_2eproto; +}; +// ------------------------------------------------------------------- + +class ConnectionsLog_AdvertisingPhase final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:location.nearby.analytics.proto.ConnectionsLog.AdvertisingPhase) */ { + public: + inline ConnectionsLog_AdvertisingPhase() : ConnectionsLog_AdvertisingPhase(nullptr) {} + ~ConnectionsLog_AdvertisingPhase() override; + explicit constexpr ConnectionsLog_AdvertisingPhase(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ConnectionsLog_AdvertisingPhase(const ConnectionsLog_AdvertisingPhase& from); + ConnectionsLog_AdvertisingPhase(ConnectionsLog_AdvertisingPhase&& from) noexcept + : ConnectionsLog_AdvertisingPhase() { + *this = ::std::move(from); + } + + inline ConnectionsLog_AdvertisingPhase& operator=(const ConnectionsLog_AdvertisingPhase& from) { + CopyFrom(from); + return *this; + } + inline ConnectionsLog_AdvertisingPhase& operator=(ConnectionsLog_AdvertisingPhase&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const ConnectionsLog_AdvertisingPhase& default_instance() { + return *internal_default_instance(); + } + static inline const ConnectionsLog_AdvertisingPhase* internal_default_instance() { + return reinterpret_cast( + &_ConnectionsLog_AdvertisingPhase_default_instance_); + } + static constexpr int kIndexInFileMessages = + 6; + + friend void swap(ConnectionsLog_AdvertisingPhase& a, ConnectionsLog_AdvertisingPhase& b) { + a.Swap(&b); + } + inline void Swap(ConnectionsLog_AdvertisingPhase* 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(ConnectionsLog_AdvertisingPhase* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ConnectionsLog_AdvertisingPhase* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const ConnectionsLog_AdvertisingPhase& from); + void MergeFrom(const ConnectionsLog_AdvertisingPhase& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(ConnectionsLog_AdvertisingPhase* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "location.nearby.analytics.proto.ConnectionsLog.AdvertisingPhase"; + } + protected: + explicit ConnectionsLog_AdvertisingPhase(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kMediumFieldNumber = 2, + kReceivedConnectionRequestFieldNumber = 3, + kAdvertisingMetadataFieldNumber = 5, + kDurationMillisFieldNumber = 1, + kClientFlowIdFieldNumber = 4, + }; + // repeated .location.nearby.proto.connections.Medium medium = 2; + int medium_size() const; + private: + int _internal_medium_size() const; + public: + void clear_medium(); + private: + ::location::nearby::proto::connections::Medium _internal_medium(int index) const; + void _internal_add_medium(::location::nearby::proto::connections::Medium value); + ::PROTOBUF_NAMESPACE_ID::RepeatedField* _internal_mutable_medium(); + public: + ::location::nearby::proto::connections::Medium medium(int index) const; + void set_medium(int index, ::location::nearby::proto::connections::Medium value); + void add_medium(::location::nearby::proto::connections::Medium value); + const ::PROTOBUF_NAMESPACE_ID::RepeatedField& medium() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedField* mutable_medium(); + + // repeated .location.nearby.analytics.proto.ConnectionsLog.ConnectionRequest received_connection_request = 3; + int received_connection_request_size() const; + private: + int _internal_received_connection_request_size() const; + public: + void clear_received_connection_request(); + ::location::nearby::analytics::proto::ConnectionsLog_ConnectionRequest* mutable_received_connection_request(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::location::nearby::analytics::proto::ConnectionsLog_ConnectionRequest >* + mutable_received_connection_request(); + private: + const ::location::nearby::analytics::proto::ConnectionsLog_ConnectionRequest& _internal_received_connection_request(int index) const; + ::location::nearby::analytics::proto::ConnectionsLog_ConnectionRequest* _internal_add_received_connection_request(); + public: + const ::location::nearby::analytics::proto::ConnectionsLog_ConnectionRequest& received_connection_request(int index) const; + ::location::nearby::analytics::proto::ConnectionsLog_ConnectionRequest* add_received_connection_request(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::location::nearby::analytics::proto::ConnectionsLog_ConnectionRequest >& + received_connection_request() const; + + // optional .location.nearby.analytics.proto.ConnectionsLog.AdvertisingMetadata advertising_metadata = 5; + bool has_advertising_metadata() const; + private: + bool _internal_has_advertising_metadata() const; + public: + void clear_advertising_metadata(); + const ::location::nearby::analytics::proto::ConnectionsLog_AdvertisingMetadata& advertising_metadata() const; + PROTOBUF_NODISCARD ::location::nearby::analytics::proto::ConnectionsLog_AdvertisingMetadata* release_advertising_metadata(); + ::location::nearby::analytics::proto::ConnectionsLog_AdvertisingMetadata* mutable_advertising_metadata(); + void set_allocated_advertising_metadata(::location::nearby::analytics::proto::ConnectionsLog_AdvertisingMetadata* advertising_metadata); + private: + const ::location::nearby::analytics::proto::ConnectionsLog_AdvertisingMetadata& _internal_advertising_metadata() const; + ::location::nearby::analytics::proto::ConnectionsLog_AdvertisingMetadata* _internal_mutable_advertising_metadata(); + public: + void unsafe_arena_set_allocated_advertising_metadata( + ::location::nearby::analytics::proto::ConnectionsLog_AdvertisingMetadata* advertising_metadata); + ::location::nearby::analytics::proto::ConnectionsLog_AdvertisingMetadata* unsafe_arena_release_advertising_metadata(); + + // optional int64 duration_millis = 1; + bool has_duration_millis() const; + private: + bool _internal_has_duration_millis() const; + public: + void clear_duration_millis(); + int64_t duration_millis() const; + void set_duration_millis(int64_t value); + private: + int64_t _internal_duration_millis() const; + void _internal_set_duration_millis(int64_t value); + public: + + // optional int64 client_flow_id = 4; + bool has_client_flow_id() const; + private: + bool _internal_has_client_flow_id() const; + public: + void clear_client_flow_id(); + int64_t client_flow_id() const; + void set_client_flow_id(int64_t value); + private: + int64_t _internal_client_flow_id() const; + void _internal_set_client_flow_id(int64_t value); + public: + + // @@protoc_insertion_point(class_scope:location.nearby.analytics.proto.ConnectionsLog.AdvertisingPhase) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::RepeatedField medium_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::location::nearby::analytics::proto::ConnectionsLog_ConnectionRequest > received_connection_request_; + ::location::nearby::analytics::proto::ConnectionsLog_AdvertisingMetadata* advertising_metadata_; + int64_t duration_millis_; + int64_t client_flow_id_; + friend struct ::TableStruct_internal_2fproto_2fanalytics_2fconnections_5flog_2eproto; +}; +// ------------------------------------------------------------------- + +class ConnectionsLog_ConnectionRequest final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:location.nearby.analytics.proto.ConnectionsLog.ConnectionRequest) */ { + public: + inline ConnectionsLog_ConnectionRequest() : ConnectionsLog_ConnectionRequest(nullptr) {} + ~ConnectionsLog_ConnectionRequest() override; + explicit constexpr ConnectionsLog_ConnectionRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ConnectionsLog_ConnectionRequest(const ConnectionsLog_ConnectionRequest& from); + ConnectionsLog_ConnectionRequest(ConnectionsLog_ConnectionRequest&& from) noexcept + : ConnectionsLog_ConnectionRequest() { + *this = ::std::move(from); + } + + inline ConnectionsLog_ConnectionRequest& operator=(const ConnectionsLog_ConnectionRequest& from) { + CopyFrom(from); + return *this; + } + inline ConnectionsLog_ConnectionRequest& operator=(ConnectionsLog_ConnectionRequest&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const ConnectionsLog_ConnectionRequest& default_instance() { + return *internal_default_instance(); + } + static inline const ConnectionsLog_ConnectionRequest* internal_default_instance() { + return reinterpret_cast( + &_ConnectionsLog_ConnectionRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 7; + + friend void swap(ConnectionsLog_ConnectionRequest& a, ConnectionsLog_ConnectionRequest& b) { + a.Swap(&b); + } + inline void Swap(ConnectionsLog_ConnectionRequest* 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(ConnectionsLog_ConnectionRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ConnectionsLog_ConnectionRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const ConnectionsLog_ConnectionRequest& from); + void MergeFrom(const ConnectionsLog_ConnectionRequest& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(ConnectionsLog_ConnectionRequest* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "location.nearby.analytics.proto.ConnectionsLog.ConnectionRequest"; + } + protected: + explicit ConnectionsLog_ConnectionRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kDurationMillisFieldNumber = 1, + kRequestDelayMillisFieldNumber = 2, + kLocalResponseFieldNumber = 3, + kRemoteResponseFieldNumber = 4, + kClientFlowIdFieldNumber = 5, + }; + // optional int64 duration_millis = 1; + bool has_duration_millis() const; + private: + bool _internal_has_duration_millis() const; + public: + void clear_duration_millis(); + int64_t duration_millis() const; + void set_duration_millis(int64_t value); + private: + int64_t _internal_duration_millis() const; + void _internal_set_duration_millis(int64_t value); + public: + + // optional int64 request_delay_millis = 2; + bool has_request_delay_millis() const; + private: + bool _internal_has_request_delay_millis() const; + public: + void clear_request_delay_millis(); + int64_t request_delay_millis() const; + void set_request_delay_millis(int64_t value); + private: + int64_t _internal_request_delay_millis() const; + void _internal_set_request_delay_millis(int64_t value); + public: + + // optional .location.nearby.proto.connections.ConnectionRequestResponse local_response = 3; + bool has_local_response() const; + private: + bool _internal_has_local_response() const; + public: + void clear_local_response(); + ::location::nearby::proto::connections::ConnectionRequestResponse local_response() const; + void set_local_response(::location::nearby::proto::connections::ConnectionRequestResponse value); + private: + ::location::nearby::proto::connections::ConnectionRequestResponse _internal_local_response() const; + void _internal_set_local_response(::location::nearby::proto::connections::ConnectionRequestResponse value); + public: + + // optional .location.nearby.proto.connections.ConnectionRequestResponse remote_response = 4; + bool has_remote_response() const; + private: + bool _internal_has_remote_response() const; + public: + void clear_remote_response(); + ::location::nearby::proto::connections::ConnectionRequestResponse remote_response() const; + void set_remote_response(::location::nearby::proto::connections::ConnectionRequestResponse value); + private: + ::location::nearby::proto::connections::ConnectionRequestResponse _internal_remote_response() const; + void _internal_set_remote_response(::location::nearby::proto::connections::ConnectionRequestResponse value); + public: + + // optional int64 client_flow_id = 5; + bool has_client_flow_id() const; + private: + bool _internal_has_client_flow_id() const; + public: + void clear_client_flow_id(); + int64_t client_flow_id() const; + void set_client_flow_id(int64_t value); + private: + int64_t _internal_client_flow_id() const; + void _internal_set_client_flow_id(int64_t value); + public: + + // @@protoc_insertion_point(class_scope:location.nearby.analytics.proto.ConnectionsLog.ConnectionRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + int64_t duration_millis_; + int64_t request_delay_millis_; + int local_response_; + int remote_response_; + int64_t client_flow_id_; + friend struct ::TableStruct_internal_2fproto_2fanalytics_2fconnections_5flog_2eproto; +}; +// ------------------------------------------------------------------- + +class ConnectionsLog_ConnectionAttempt final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:location.nearby.analytics.proto.ConnectionsLog.ConnectionAttempt) */ { + public: + inline ConnectionsLog_ConnectionAttempt() : ConnectionsLog_ConnectionAttempt(nullptr) {} + ~ConnectionsLog_ConnectionAttempt() override; + explicit constexpr ConnectionsLog_ConnectionAttempt(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ConnectionsLog_ConnectionAttempt(const ConnectionsLog_ConnectionAttempt& from); + ConnectionsLog_ConnectionAttempt(ConnectionsLog_ConnectionAttempt&& from) noexcept + : ConnectionsLog_ConnectionAttempt() { + *this = ::std::move(from); + } + + inline ConnectionsLog_ConnectionAttempt& operator=(const ConnectionsLog_ConnectionAttempt& from) { + CopyFrom(from); + return *this; + } + inline ConnectionsLog_ConnectionAttempt& operator=(ConnectionsLog_ConnectionAttempt&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const ConnectionsLog_ConnectionAttempt& default_instance() { + return *internal_default_instance(); + } + static inline const ConnectionsLog_ConnectionAttempt* internal_default_instance() { + return reinterpret_cast( + &_ConnectionsLog_ConnectionAttempt_default_instance_); + } + static constexpr int kIndexInFileMessages = + 8; + + friend void swap(ConnectionsLog_ConnectionAttempt& a, ConnectionsLog_ConnectionAttempt& b) { + a.Swap(&b); + } + inline void Swap(ConnectionsLog_ConnectionAttempt* 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(ConnectionsLog_ConnectionAttempt* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ConnectionsLog_ConnectionAttempt* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const ConnectionsLog_ConnectionAttempt& from); + void MergeFrom(const ConnectionsLog_ConnectionAttempt& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(ConnectionsLog_ConnectionAttempt* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "location.nearby.analytics.proto.ConnectionsLog.ConnectionAttempt"; + } + protected: + explicit ConnectionsLog_ConnectionAttempt(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kConnectionTokenFieldNumber = 7, + kConnectionAttemptMetadataFieldNumber = 8, + kDurationMillisFieldNumber = 1, + kTypeFieldNumber = 2, + kDirectionFieldNumber = 3, + kMediumFieldNumber = 4, + kAttemptResultFieldNumber = 5, + kClientFlowIdFieldNumber = 6, + }; + // optional string connection_token = 7; + bool has_connection_token() const; + private: + bool _internal_has_connection_token() const; + public: + void clear_connection_token(); + const std::string& connection_token() const; + template + void set_connection_token(ArgT0&& arg0, ArgT... args); + std::string* mutable_connection_token(); + PROTOBUF_NODISCARD std::string* release_connection_token(); + void set_allocated_connection_token(std::string* connection_token); + private: + const std::string& _internal_connection_token() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_connection_token(const std::string& value); + std::string* _internal_mutable_connection_token(); + public: + + // optional .location.nearby.analytics.proto.ConnectionsLog.ConnectionAttemptMetadata connection_attempt_metadata = 8; + bool has_connection_attempt_metadata() const; + private: + bool _internal_has_connection_attempt_metadata() const; + public: + void clear_connection_attempt_metadata(); + const ::location::nearby::analytics::proto::ConnectionsLog_ConnectionAttemptMetadata& connection_attempt_metadata() const; + PROTOBUF_NODISCARD ::location::nearby::analytics::proto::ConnectionsLog_ConnectionAttemptMetadata* release_connection_attempt_metadata(); + ::location::nearby::analytics::proto::ConnectionsLog_ConnectionAttemptMetadata* mutable_connection_attempt_metadata(); + void set_allocated_connection_attempt_metadata(::location::nearby::analytics::proto::ConnectionsLog_ConnectionAttemptMetadata* connection_attempt_metadata); + private: + const ::location::nearby::analytics::proto::ConnectionsLog_ConnectionAttemptMetadata& _internal_connection_attempt_metadata() const; + ::location::nearby::analytics::proto::ConnectionsLog_ConnectionAttemptMetadata* _internal_mutable_connection_attempt_metadata(); + public: + void unsafe_arena_set_allocated_connection_attempt_metadata( + ::location::nearby::analytics::proto::ConnectionsLog_ConnectionAttemptMetadata* connection_attempt_metadata); + ::location::nearby::analytics::proto::ConnectionsLog_ConnectionAttemptMetadata* unsafe_arena_release_connection_attempt_metadata(); + + // optional int64 duration_millis = 1; + bool has_duration_millis() const; + private: + bool _internal_has_duration_millis() const; + public: + void clear_duration_millis(); + int64_t duration_millis() const; + void set_duration_millis(int64_t value); + private: + int64_t _internal_duration_millis() const; + void _internal_set_duration_millis(int64_t value); + public: + + // optional .location.nearby.proto.connections.ConnectionAttemptType type = 2; + bool has_type() const; + private: + bool _internal_has_type() const; + public: + void clear_type(); + ::location::nearby::proto::connections::ConnectionAttemptType type() const; + void set_type(::location::nearby::proto::connections::ConnectionAttemptType value); + private: + ::location::nearby::proto::connections::ConnectionAttemptType _internal_type() const; + void _internal_set_type(::location::nearby::proto::connections::ConnectionAttemptType value); + public: + + // optional .location.nearby.proto.connections.ConnectionAttemptDirection direction = 3; + bool has_direction() const; + private: + bool _internal_has_direction() const; + public: + void clear_direction(); + ::location::nearby::proto::connections::ConnectionAttemptDirection direction() const; + void set_direction(::location::nearby::proto::connections::ConnectionAttemptDirection value); + private: + ::location::nearby::proto::connections::ConnectionAttemptDirection _internal_direction() const; + void _internal_set_direction(::location::nearby::proto::connections::ConnectionAttemptDirection value); + public: + + // optional .location.nearby.proto.connections.Medium medium = 4; + bool has_medium() const; + private: + bool _internal_has_medium() const; + public: + void clear_medium(); + ::location::nearby::proto::connections::Medium medium() const; + void set_medium(::location::nearby::proto::connections::Medium value); + private: + ::location::nearby::proto::connections::Medium _internal_medium() const; + void _internal_set_medium(::location::nearby::proto::connections::Medium value); + public: + + // optional .location.nearby.proto.connections.ConnectionAttemptResult attempt_result = 5; + bool has_attempt_result() const; + private: + bool _internal_has_attempt_result() const; + public: + void clear_attempt_result(); + ::location::nearby::proto::connections::ConnectionAttemptResult attempt_result() const; + void set_attempt_result(::location::nearby::proto::connections::ConnectionAttemptResult value); + private: + ::location::nearby::proto::connections::ConnectionAttemptResult _internal_attempt_result() const; + void _internal_set_attempt_result(::location::nearby::proto::connections::ConnectionAttemptResult value); + public: + + // optional int64 client_flow_id = 6; + bool has_client_flow_id() const; + private: + bool _internal_has_client_flow_id() const; + public: + void clear_client_flow_id(); + int64_t client_flow_id() const; + void set_client_flow_id(int64_t value); + private: + int64_t _internal_client_flow_id() const; + void _internal_set_client_flow_id(int64_t value); + public: + + // @@protoc_insertion_point(class_scope:location.nearby.analytics.proto.ConnectionsLog.ConnectionAttempt) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr connection_token_; + ::location::nearby::analytics::proto::ConnectionsLog_ConnectionAttemptMetadata* connection_attempt_metadata_; + int64_t duration_millis_; + int type_; + int direction_; + int medium_; + int attempt_result_; + int64_t client_flow_id_; + friend struct ::TableStruct_internal_2fproto_2fanalytics_2fconnections_5flog_2eproto; +}; +// ------------------------------------------------------------------- + +class ConnectionsLog_EstablishedConnection final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:location.nearby.analytics.proto.ConnectionsLog.EstablishedConnection) */ { + public: + inline ConnectionsLog_EstablishedConnection() : ConnectionsLog_EstablishedConnection(nullptr) {} + ~ConnectionsLog_EstablishedConnection() override; + explicit constexpr ConnectionsLog_EstablishedConnection(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ConnectionsLog_EstablishedConnection(const ConnectionsLog_EstablishedConnection& from); + ConnectionsLog_EstablishedConnection(ConnectionsLog_EstablishedConnection&& from) noexcept + : ConnectionsLog_EstablishedConnection() { + *this = ::std::move(from); + } + + inline ConnectionsLog_EstablishedConnection& operator=(const ConnectionsLog_EstablishedConnection& from) { + CopyFrom(from); + return *this; + } + inline ConnectionsLog_EstablishedConnection& operator=(ConnectionsLog_EstablishedConnection&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const ConnectionsLog_EstablishedConnection& default_instance() { + return *internal_default_instance(); + } + static inline const ConnectionsLog_EstablishedConnection* internal_default_instance() { + return reinterpret_cast( + &_ConnectionsLog_EstablishedConnection_default_instance_); + } + static constexpr int kIndexInFileMessages = + 9; + + friend void swap(ConnectionsLog_EstablishedConnection& a, ConnectionsLog_EstablishedConnection& b) { + a.Swap(&b); + } + inline void Swap(ConnectionsLog_EstablishedConnection* 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(ConnectionsLog_EstablishedConnection* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ConnectionsLog_EstablishedConnection* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const ConnectionsLog_EstablishedConnection& from); + void MergeFrom(const ConnectionsLog_EstablishedConnection& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(ConnectionsLog_EstablishedConnection* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "location.nearby.analytics.proto.ConnectionsLog.EstablishedConnection"; + } + protected: + explicit ConnectionsLog_EstablishedConnection(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kSentPayloadFieldNumber = 3, + kReceivedPayloadFieldNumber = 4, + kConnectionTokenFieldNumber = 7, + kDurationMillisFieldNumber = 1, + kMediumFieldNumber = 2, + kDisconnectionReasonFieldNumber = 5, + kClientFlowIdFieldNumber = 6, + }; + // repeated .location.nearby.analytics.proto.ConnectionsLog.Payload sent_payload = 3; + int sent_payload_size() const; + private: + int _internal_sent_payload_size() const; + public: + void clear_sent_payload(); + ::location::nearby::analytics::proto::ConnectionsLog_Payload* mutable_sent_payload(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::location::nearby::analytics::proto::ConnectionsLog_Payload >* + mutable_sent_payload(); + private: + const ::location::nearby::analytics::proto::ConnectionsLog_Payload& _internal_sent_payload(int index) const; + ::location::nearby::analytics::proto::ConnectionsLog_Payload* _internal_add_sent_payload(); + public: + const ::location::nearby::analytics::proto::ConnectionsLog_Payload& sent_payload(int index) const; + ::location::nearby::analytics::proto::ConnectionsLog_Payload* add_sent_payload(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::location::nearby::analytics::proto::ConnectionsLog_Payload >& + sent_payload() const; + + // repeated .location.nearby.analytics.proto.ConnectionsLog.Payload received_payload = 4; + int received_payload_size() const; + private: + int _internal_received_payload_size() const; + public: + void clear_received_payload(); + ::location::nearby::analytics::proto::ConnectionsLog_Payload* mutable_received_payload(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::location::nearby::analytics::proto::ConnectionsLog_Payload >* + mutable_received_payload(); + private: + const ::location::nearby::analytics::proto::ConnectionsLog_Payload& _internal_received_payload(int index) const; + ::location::nearby::analytics::proto::ConnectionsLog_Payload* _internal_add_received_payload(); + public: + const ::location::nearby::analytics::proto::ConnectionsLog_Payload& received_payload(int index) const; + ::location::nearby::analytics::proto::ConnectionsLog_Payload* add_received_payload(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::location::nearby::analytics::proto::ConnectionsLog_Payload >& + received_payload() const; + + // optional string connection_token = 7; + bool has_connection_token() const; + private: + bool _internal_has_connection_token() const; + public: + void clear_connection_token(); + const std::string& connection_token() const; + template + void set_connection_token(ArgT0&& arg0, ArgT... args); + std::string* mutable_connection_token(); + PROTOBUF_NODISCARD std::string* release_connection_token(); + void set_allocated_connection_token(std::string* connection_token); + private: + const std::string& _internal_connection_token() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_connection_token(const std::string& value); + std::string* _internal_mutable_connection_token(); + public: + + // optional int64 duration_millis = 1; + bool has_duration_millis() const; + private: + bool _internal_has_duration_millis() const; + public: + void clear_duration_millis(); + int64_t duration_millis() const; + void set_duration_millis(int64_t value); + private: + int64_t _internal_duration_millis() const; + void _internal_set_duration_millis(int64_t value); + public: + + // optional .location.nearby.proto.connections.Medium medium = 2; + bool has_medium() const; + private: + bool _internal_has_medium() const; + public: + void clear_medium(); + ::location::nearby::proto::connections::Medium medium() const; + void set_medium(::location::nearby::proto::connections::Medium value); + private: + ::location::nearby::proto::connections::Medium _internal_medium() const; + void _internal_set_medium(::location::nearby::proto::connections::Medium value); + public: + + // optional .location.nearby.proto.connections.DisconnectionReason disconnection_reason = 5; + bool has_disconnection_reason() const; + private: + bool _internal_has_disconnection_reason() const; + public: + void clear_disconnection_reason(); + ::location::nearby::proto::connections::DisconnectionReason disconnection_reason() const; + void set_disconnection_reason(::location::nearby::proto::connections::DisconnectionReason value); + private: + ::location::nearby::proto::connections::DisconnectionReason _internal_disconnection_reason() const; + void _internal_set_disconnection_reason(::location::nearby::proto::connections::DisconnectionReason value); + public: + + // optional int64 client_flow_id = 6; + bool has_client_flow_id() const; + private: + bool _internal_has_client_flow_id() const; + public: + void clear_client_flow_id(); + int64_t client_flow_id() const; + void set_client_flow_id(int64_t value); + private: + int64_t _internal_client_flow_id() const; + void _internal_set_client_flow_id(int64_t value); + public: + + // @@protoc_insertion_point(class_scope:location.nearby.analytics.proto.ConnectionsLog.EstablishedConnection) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::location::nearby::analytics::proto::ConnectionsLog_Payload > sent_payload_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::location::nearby::analytics::proto::ConnectionsLog_Payload > received_payload_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr connection_token_; + int64_t duration_millis_; + int medium_; + int disconnection_reason_; + int64_t client_flow_id_; + friend struct ::TableStruct_internal_2fproto_2fanalytics_2fconnections_5flog_2eproto; +}; +// ------------------------------------------------------------------- + +class ConnectionsLog_Payload final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:location.nearby.analytics.proto.ConnectionsLog.Payload) */ { + public: + inline ConnectionsLog_Payload() : ConnectionsLog_Payload(nullptr) {} + ~ConnectionsLog_Payload() override; + explicit constexpr ConnectionsLog_Payload(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ConnectionsLog_Payload(const ConnectionsLog_Payload& from); + ConnectionsLog_Payload(ConnectionsLog_Payload&& from) noexcept + : ConnectionsLog_Payload() { + *this = ::std::move(from); + } + + inline ConnectionsLog_Payload& operator=(const ConnectionsLog_Payload& from) { + CopyFrom(from); + return *this; + } + inline ConnectionsLog_Payload& operator=(ConnectionsLog_Payload&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const ConnectionsLog_Payload& default_instance() { + return *internal_default_instance(); + } + static inline const ConnectionsLog_Payload* internal_default_instance() { + return reinterpret_cast( + &_ConnectionsLog_Payload_default_instance_); + } + static constexpr int kIndexInFileMessages = + 10; + + friend void swap(ConnectionsLog_Payload& a, ConnectionsLog_Payload& b) { + a.Swap(&b); + } + inline void Swap(ConnectionsLog_Payload* 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(ConnectionsLog_Payload* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ConnectionsLog_Payload* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const ConnectionsLog_Payload& from); + void MergeFrom(const ConnectionsLog_Payload& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(ConnectionsLog_Payload* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "location.nearby.analytics.proto.ConnectionsLog.Payload"; + } + protected: + explicit ConnectionsLog_Payload(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kDurationMillisFieldNumber = 1, + kTotalSizeBytesFieldNumber = 3, + kTypeFieldNumber = 2, + kNumChunksFieldNumber = 5, + kNumBytesTransferredFieldNumber = 4, + kStatusFieldNumber = 6, + }; + // optional int64 duration_millis = 1; + bool has_duration_millis() const; + private: + bool _internal_has_duration_millis() const; + public: + void clear_duration_millis(); + int64_t duration_millis() const; + void set_duration_millis(int64_t value); + private: + int64_t _internal_duration_millis() const; + void _internal_set_duration_millis(int64_t value); + public: + + // optional int64 total_size_bytes = 3; + bool has_total_size_bytes() const; + private: + bool _internal_has_total_size_bytes() const; + public: + void clear_total_size_bytes(); + int64_t total_size_bytes() const; + void set_total_size_bytes(int64_t value); + private: + int64_t _internal_total_size_bytes() const; + void _internal_set_total_size_bytes(int64_t value); + public: + + // optional .location.nearby.proto.connections.PayloadType type = 2; + bool has_type() const; + private: + bool _internal_has_type() const; + public: + void clear_type(); + ::location::nearby::proto::connections::PayloadType type() const; + void set_type(::location::nearby::proto::connections::PayloadType value); + private: + ::location::nearby::proto::connections::PayloadType _internal_type() const; + void _internal_set_type(::location::nearby::proto::connections::PayloadType value); + public: + + // optional int32 num_chunks = 5; + bool has_num_chunks() const; + private: + bool _internal_has_num_chunks() const; + public: + void clear_num_chunks(); + int32_t num_chunks() const; + void set_num_chunks(int32_t value); + private: + int32_t _internal_num_chunks() const; + void _internal_set_num_chunks(int32_t value); + public: + + // optional int64 num_bytes_transferred = 4; + bool has_num_bytes_transferred() const; + private: + bool _internal_has_num_bytes_transferred() const; + public: + void clear_num_bytes_transferred(); + int64_t num_bytes_transferred() const; + void set_num_bytes_transferred(int64_t value); + private: + int64_t _internal_num_bytes_transferred() const; + void _internal_set_num_bytes_transferred(int64_t value); + public: + + // optional .location.nearby.proto.connections.PayloadStatus status = 6; + bool has_status() const; + private: + bool _internal_has_status() const; + public: + void clear_status(); + ::location::nearby::proto::connections::PayloadStatus status() const; + void set_status(::location::nearby::proto::connections::PayloadStatus value); + private: + ::location::nearby::proto::connections::PayloadStatus _internal_status() const; + void _internal_set_status(::location::nearby::proto::connections::PayloadStatus value); + public: + + // @@protoc_insertion_point(class_scope:location.nearby.analytics.proto.ConnectionsLog.Payload) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + int64_t duration_millis_; + int64_t total_size_bytes_; + int type_; + int32_t num_chunks_; + int64_t num_bytes_transferred_; + int status_; + friend struct ::TableStruct_internal_2fproto_2fanalytics_2fconnections_5flog_2eproto; +}; +// ------------------------------------------------------------------- + +class ConnectionsLog_BandwidthUpgradeAttempt final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:location.nearby.analytics.proto.ConnectionsLog.BandwidthUpgradeAttempt) */ { + public: + inline ConnectionsLog_BandwidthUpgradeAttempt() : ConnectionsLog_BandwidthUpgradeAttempt(nullptr) {} + ~ConnectionsLog_BandwidthUpgradeAttempt() override; + explicit constexpr ConnectionsLog_BandwidthUpgradeAttempt(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ConnectionsLog_BandwidthUpgradeAttempt(const ConnectionsLog_BandwidthUpgradeAttempt& from); + ConnectionsLog_BandwidthUpgradeAttempt(ConnectionsLog_BandwidthUpgradeAttempt&& from) noexcept + : ConnectionsLog_BandwidthUpgradeAttempt() { + *this = ::std::move(from); + } + + inline ConnectionsLog_BandwidthUpgradeAttempt& operator=(const ConnectionsLog_BandwidthUpgradeAttempt& from) { + CopyFrom(from); + return *this; + } + inline ConnectionsLog_BandwidthUpgradeAttempt& operator=(ConnectionsLog_BandwidthUpgradeAttempt&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const ConnectionsLog_BandwidthUpgradeAttempt& default_instance() { + return *internal_default_instance(); + } + static inline const ConnectionsLog_BandwidthUpgradeAttempt* internal_default_instance() { + return reinterpret_cast( + &_ConnectionsLog_BandwidthUpgradeAttempt_default_instance_); + } + static constexpr int kIndexInFileMessages = + 11; + + friend void swap(ConnectionsLog_BandwidthUpgradeAttempt& a, ConnectionsLog_BandwidthUpgradeAttempt& b) { + a.Swap(&b); + } + inline void Swap(ConnectionsLog_BandwidthUpgradeAttempt* 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(ConnectionsLog_BandwidthUpgradeAttempt* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ConnectionsLog_BandwidthUpgradeAttempt* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const ConnectionsLog_BandwidthUpgradeAttempt& from); + void MergeFrom(const ConnectionsLog_BandwidthUpgradeAttempt& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(ConnectionsLog_BandwidthUpgradeAttempt* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "location.nearby.analytics.proto.ConnectionsLog.BandwidthUpgradeAttempt"; + } + protected: + explicit ConnectionsLog_BandwidthUpgradeAttempt(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kConnectionTokenFieldNumber = 8, + kDurationMillisFieldNumber = 2, + kDirectionFieldNumber = 1, + kFromMediumFieldNumber = 3, + kToMediumFieldNumber = 4, + kUpgradeResultFieldNumber = 5, + kClientFlowIdFieldNumber = 7, + kErrorStageFieldNumber = 6, + }; + // optional string connection_token = 8; + bool has_connection_token() const; + private: + bool _internal_has_connection_token() const; + public: + void clear_connection_token(); + const std::string& connection_token() const; + template + void set_connection_token(ArgT0&& arg0, ArgT... args); + std::string* mutable_connection_token(); + PROTOBUF_NODISCARD std::string* release_connection_token(); + void set_allocated_connection_token(std::string* connection_token); + private: + const std::string& _internal_connection_token() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_connection_token(const std::string& value); + std::string* _internal_mutable_connection_token(); + public: + + // optional int64 duration_millis = 2; + bool has_duration_millis() const; + private: + bool _internal_has_duration_millis() const; + public: + void clear_duration_millis(); + int64_t duration_millis() const; + void set_duration_millis(int64_t value); + private: + int64_t _internal_duration_millis() const; + void _internal_set_duration_millis(int64_t value); + public: + + // optional .location.nearby.proto.connections.ConnectionAttemptDirection direction = 1; + bool has_direction() const; + private: + bool _internal_has_direction() const; + public: + void clear_direction(); + ::location::nearby::proto::connections::ConnectionAttemptDirection direction() const; + void set_direction(::location::nearby::proto::connections::ConnectionAttemptDirection value); + private: + ::location::nearby::proto::connections::ConnectionAttemptDirection _internal_direction() const; + void _internal_set_direction(::location::nearby::proto::connections::ConnectionAttemptDirection value); + public: + + // optional .location.nearby.proto.connections.Medium from_medium = 3; + bool has_from_medium() const; + private: + bool _internal_has_from_medium() const; + public: + void clear_from_medium(); + ::location::nearby::proto::connections::Medium from_medium() const; + void set_from_medium(::location::nearby::proto::connections::Medium value); + private: + ::location::nearby::proto::connections::Medium _internal_from_medium() const; + void _internal_set_from_medium(::location::nearby::proto::connections::Medium value); + public: + + // optional .location.nearby.proto.connections.Medium to_medium = 4; + bool has_to_medium() const; + private: + bool _internal_has_to_medium() const; + public: + void clear_to_medium(); + ::location::nearby::proto::connections::Medium to_medium() const; + void set_to_medium(::location::nearby::proto::connections::Medium value); + private: + ::location::nearby::proto::connections::Medium _internal_to_medium() const; + void _internal_set_to_medium(::location::nearby::proto::connections::Medium value); + public: + + // optional .location.nearby.proto.connections.BandwidthUpgradeResult upgrade_result = 5; + bool has_upgrade_result() const; + private: + bool _internal_has_upgrade_result() const; + public: + void clear_upgrade_result(); + ::location::nearby::proto::connections::BandwidthUpgradeResult upgrade_result() const; + void set_upgrade_result(::location::nearby::proto::connections::BandwidthUpgradeResult value); + private: + ::location::nearby::proto::connections::BandwidthUpgradeResult _internal_upgrade_result() const; + void _internal_set_upgrade_result(::location::nearby::proto::connections::BandwidthUpgradeResult value); + public: + + // optional int64 client_flow_id = 7; + bool has_client_flow_id() const; + private: + bool _internal_has_client_flow_id() const; + public: + void clear_client_flow_id(); + int64_t client_flow_id() const; + void set_client_flow_id(int64_t value); + private: + int64_t _internal_client_flow_id() const; + void _internal_set_client_flow_id(int64_t value); + public: + + // optional .location.nearby.proto.connections.BandwidthUpgradeErrorStage error_stage = 6; + bool has_error_stage() const; + private: + bool _internal_has_error_stage() const; + public: + void clear_error_stage(); + ::location::nearby::proto::connections::BandwidthUpgradeErrorStage error_stage() const; + void set_error_stage(::location::nearby::proto::connections::BandwidthUpgradeErrorStage value); + private: + ::location::nearby::proto::connections::BandwidthUpgradeErrorStage _internal_error_stage() const; + void _internal_set_error_stage(::location::nearby::proto::connections::BandwidthUpgradeErrorStage value); + public: + + // @@protoc_insertion_point(class_scope:location.nearby.analytics.proto.ConnectionsLog.BandwidthUpgradeAttempt) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr connection_token_; + int64_t duration_millis_; + int direction_; + int from_medium_; + int to_medium_; + int upgrade_result_; + int64_t client_flow_id_; + int error_stage_; + friend struct ::TableStruct_internal_2fproto_2fanalytics_2fconnections_5flog_2eproto; +}; +// ------------------------------------------------------------------- + +class ConnectionsLog_ErrorCode final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:location.nearby.analytics.proto.ConnectionsLog.ErrorCode) */ { + public: + inline ConnectionsLog_ErrorCode() : ConnectionsLog_ErrorCode(nullptr) {} + ~ConnectionsLog_ErrorCode() override; + explicit constexpr ConnectionsLog_ErrorCode(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ConnectionsLog_ErrorCode(const ConnectionsLog_ErrorCode& from); + ConnectionsLog_ErrorCode(ConnectionsLog_ErrorCode&& from) noexcept + : ConnectionsLog_ErrorCode() { + *this = ::std::move(from); + } + + inline ConnectionsLog_ErrorCode& operator=(const ConnectionsLog_ErrorCode& from) { + CopyFrom(from); + return *this; + } + inline ConnectionsLog_ErrorCode& operator=(ConnectionsLog_ErrorCode&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const ConnectionsLog_ErrorCode& default_instance() { + return *internal_default_instance(); + } + enum ErrorCodeDetailCase { + kCommonError = 7, + kStartAdvertisingError = 8, + kStartDiscoveringError = 9, + kStopAdvertisingError = 10, + kStopDiscoveringError = 11, + kStartListeningIncomingConnectionError = 12, + kStopListeningIncomingConnectionError = 13, + kConnectError = 14, + kDisconnectError = 15, + ERRORCODEDETAIL_NOT_SET = 0, + }; + + static inline const ConnectionsLog_ErrorCode* internal_default_instance() { + return reinterpret_cast( + &_ConnectionsLog_ErrorCode_default_instance_); + } + static constexpr int kIndexInFileMessages = + 12; + + friend void swap(ConnectionsLog_ErrorCode& a, ConnectionsLog_ErrorCode& b) { + a.Swap(&b); + } + inline void Swap(ConnectionsLog_ErrorCode* 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(ConnectionsLog_ErrorCode* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ConnectionsLog_ErrorCode* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const ConnectionsLog_ErrorCode& from); + void MergeFrom(const ConnectionsLog_ErrorCode& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(ConnectionsLog_ErrorCode* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "location.nearby.analytics.proto.ConnectionsLog.ErrorCode"; + } + protected: + explicit ConnectionsLog_ErrorCode(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kServiceIdFieldNumber = 2, + kConnectionTokenFieldNumber = 16, + kDirectionFieldNumber = 1, + kMediumFieldNumber = 3, + kEventFieldNumber = 4, + kDescriptionFieldNumber = 5, + kFlowIdFieldNumber = 6, + kCommonErrorFieldNumber = 7, + kStartAdvertisingErrorFieldNumber = 8, + kStartDiscoveringErrorFieldNumber = 9, + kStopAdvertisingErrorFieldNumber = 10, + kStopDiscoveringErrorFieldNumber = 11, + kStartListeningIncomingConnectionErrorFieldNumber = 12, + kStopListeningIncomingConnectionErrorFieldNumber = 13, + kConnectErrorFieldNumber = 14, + kDisconnectErrorFieldNumber = 15, + }; + // optional string service_id = 2; + bool has_service_id() const; + private: + bool _internal_has_service_id() const; + public: + void clear_service_id(); + const std::string& service_id() const; + template + void set_service_id(ArgT0&& arg0, ArgT... args); + std::string* mutable_service_id(); + PROTOBUF_NODISCARD std::string* release_service_id(); + void set_allocated_service_id(std::string* service_id); + private: + const std::string& _internal_service_id() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_service_id(const std::string& value); + std::string* _internal_mutable_service_id(); + public: + + // optional string connection_token = 16; + bool has_connection_token() const; + private: + bool _internal_has_connection_token() const; + public: + void clear_connection_token(); + const std::string& connection_token() const; + template + void set_connection_token(ArgT0&& arg0, ArgT... args); + std::string* mutable_connection_token(); + PROTOBUF_NODISCARD std::string* release_connection_token(); + void set_allocated_connection_token(std::string* connection_token); + private: + const std::string& _internal_connection_token() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_connection_token(const std::string& value); + std::string* _internal_mutable_connection_token(); + public: + + // optional .location.nearby.proto.connections.ConnectionAttemptDirection direction = 1; + bool has_direction() const; + private: + bool _internal_has_direction() const; + public: + void clear_direction(); + ::location::nearby::proto::connections::ConnectionAttemptDirection direction() const; + void set_direction(::location::nearby::proto::connections::ConnectionAttemptDirection value); + private: + ::location::nearby::proto::connections::ConnectionAttemptDirection _internal_direction() const; + void _internal_set_direction(::location::nearby::proto::connections::ConnectionAttemptDirection value); + public: + + // optional .location.nearby.proto.connections.Medium medium = 3; + bool has_medium() const; + private: + bool _internal_has_medium() const; + public: + void clear_medium(); + ::location::nearby::proto::connections::Medium medium() const; + void set_medium(::location::nearby::proto::connections::Medium value); + private: + ::location::nearby::proto::connections::Medium _internal_medium() const; + void _internal_set_medium(::location::nearby::proto::connections::Medium value); + public: + + // optional .location.nearby.errorcode.proto.Event event = 4; + bool has_event() const; + private: + bool _internal_has_event() const; + public: + void clear_event(); + ::location::nearby::errorcode::proto::Event event() const; + void set_event(::location::nearby::errorcode::proto::Event value); + private: + ::location::nearby::errorcode::proto::Event _internal_event() const; + void _internal_set_event(::location::nearby::errorcode::proto::Event value); + public: + + // optional .location.nearby.errorcode.proto.Description description = 5; + bool has_description() const; + private: + bool _internal_has_description() const; + public: + void clear_description(); + ::location::nearby::errorcode::proto::Description description() const; + void set_description(::location::nearby::errorcode::proto::Description value); + private: + ::location::nearby::errorcode::proto::Description _internal_description() const; + void _internal_set_description(::location::nearby::errorcode::proto::Description value); + public: + + // optional int64 flow_id = 6; + bool has_flow_id() const; + private: + bool _internal_has_flow_id() const; + public: + void clear_flow_id(); + int64_t flow_id() const; + void set_flow_id(int64_t value); + private: + int64_t _internal_flow_id() const; + void _internal_set_flow_id(int64_t value); + public: + + // .location.nearby.errorcode.proto.CommonError common_error = 7; + bool has_common_error() const; + private: + bool _internal_has_common_error() const; + public: + void clear_common_error(); + ::location::nearby::errorcode::proto::CommonError common_error() const; + void set_common_error(::location::nearby::errorcode::proto::CommonError value); + private: + ::location::nearby::errorcode::proto::CommonError _internal_common_error() const; + void _internal_set_common_error(::location::nearby::errorcode::proto::CommonError value); + public: + + // .location.nearby.errorcode.proto.StartAdvertisingError start_advertising_error = 8; + bool has_start_advertising_error() const; + private: + bool _internal_has_start_advertising_error() const; + public: + void clear_start_advertising_error(); + ::location::nearby::errorcode::proto::StartAdvertisingError start_advertising_error() const; + void set_start_advertising_error(::location::nearby::errorcode::proto::StartAdvertisingError value); + private: + ::location::nearby::errorcode::proto::StartAdvertisingError _internal_start_advertising_error() const; + void _internal_set_start_advertising_error(::location::nearby::errorcode::proto::StartAdvertisingError value); + public: + + // .location.nearby.errorcode.proto.StartDiscoveringError start_discovering_error = 9; + bool has_start_discovering_error() const; + private: + bool _internal_has_start_discovering_error() const; + public: + void clear_start_discovering_error(); + ::location::nearby::errorcode::proto::StartDiscoveringError start_discovering_error() const; + void set_start_discovering_error(::location::nearby::errorcode::proto::StartDiscoveringError value); + private: + ::location::nearby::errorcode::proto::StartDiscoveringError _internal_start_discovering_error() const; + void _internal_set_start_discovering_error(::location::nearby::errorcode::proto::StartDiscoveringError value); + public: + + // .location.nearby.errorcode.proto.StopAdvertisingError stop_advertising_error = 10; + bool has_stop_advertising_error() const; + private: + bool _internal_has_stop_advertising_error() const; + public: + void clear_stop_advertising_error(); + ::location::nearby::errorcode::proto::StopAdvertisingError stop_advertising_error() const; + void set_stop_advertising_error(::location::nearby::errorcode::proto::StopAdvertisingError value); + private: + ::location::nearby::errorcode::proto::StopAdvertisingError _internal_stop_advertising_error() const; + void _internal_set_stop_advertising_error(::location::nearby::errorcode::proto::StopAdvertisingError value); + public: + + // .location.nearby.errorcode.proto.StopDiscoveringError stop_discovering_error = 11; + bool has_stop_discovering_error() const; + private: + bool _internal_has_stop_discovering_error() const; + public: + void clear_stop_discovering_error(); + ::location::nearby::errorcode::proto::StopDiscoveringError stop_discovering_error() const; + void set_stop_discovering_error(::location::nearby::errorcode::proto::StopDiscoveringError value); + private: + ::location::nearby::errorcode::proto::StopDiscoveringError _internal_stop_discovering_error() const; + void _internal_set_stop_discovering_error(::location::nearby::errorcode::proto::StopDiscoveringError value); + public: + + // .location.nearby.errorcode.proto.StartListeningIncomingConnectionError start_listening_incoming_connection_error = 12; + bool has_start_listening_incoming_connection_error() const; + private: + bool _internal_has_start_listening_incoming_connection_error() const; + public: + void clear_start_listening_incoming_connection_error(); + ::location::nearby::errorcode::proto::StartListeningIncomingConnectionError start_listening_incoming_connection_error() const; + void set_start_listening_incoming_connection_error(::location::nearby::errorcode::proto::StartListeningIncomingConnectionError value); + private: + ::location::nearby::errorcode::proto::StartListeningIncomingConnectionError _internal_start_listening_incoming_connection_error() const; + void _internal_set_start_listening_incoming_connection_error(::location::nearby::errorcode::proto::StartListeningIncomingConnectionError value); + public: + + // .location.nearby.errorcode.proto.StopListeningIncomingConnectionError stop_listening_incoming_connection_error = 13; + bool has_stop_listening_incoming_connection_error() const; + private: + bool _internal_has_stop_listening_incoming_connection_error() const; + public: + void clear_stop_listening_incoming_connection_error(); + ::location::nearby::errorcode::proto::StopListeningIncomingConnectionError stop_listening_incoming_connection_error() const; + void set_stop_listening_incoming_connection_error(::location::nearby::errorcode::proto::StopListeningIncomingConnectionError value); + private: + ::location::nearby::errorcode::proto::StopListeningIncomingConnectionError _internal_stop_listening_incoming_connection_error() const; + void _internal_set_stop_listening_incoming_connection_error(::location::nearby::errorcode::proto::StopListeningIncomingConnectionError value); + public: + + // .location.nearby.errorcode.proto.ConnectError connect_error = 14; + bool has_connect_error() const; + private: + bool _internal_has_connect_error() const; + public: + void clear_connect_error(); + ::location::nearby::errorcode::proto::ConnectError connect_error() const; + void set_connect_error(::location::nearby::errorcode::proto::ConnectError value); + private: + ::location::nearby::errorcode::proto::ConnectError _internal_connect_error() const; + void _internal_set_connect_error(::location::nearby::errorcode::proto::ConnectError value); + public: + + // .location.nearby.errorcode.proto.DisconnectError disconnect_error = 15; + bool has_disconnect_error() const; + private: + bool _internal_has_disconnect_error() const; + public: + void clear_disconnect_error(); + ::location::nearby::errorcode::proto::DisconnectError disconnect_error() const; + void set_disconnect_error(::location::nearby::errorcode::proto::DisconnectError value); + private: + ::location::nearby::errorcode::proto::DisconnectError _internal_disconnect_error() const; + void _internal_set_disconnect_error(::location::nearby::errorcode::proto::DisconnectError value); + public: + + void clear_ErrorCodeDetail(); + ErrorCodeDetailCase ErrorCodeDetail_case() const; + // @@protoc_insertion_point(class_scope:location.nearby.analytics.proto.ConnectionsLog.ErrorCode) + private: + class _Internal; + void set_has_common_error(); + void set_has_start_advertising_error(); + void set_has_start_discovering_error(); + void set_has_stop_advertising_error(); + void set_has_stop_discovering_error(); + void set_has_start_listening_incoming_connection_error(); + void set_has_stop_listening_incoming_connection_error(); + void set_has_connect_error(); + void set_has_disconnect_error(); + + inline bool has_ErrorCodeDetail() const; + inline void clear_has_ErrorCodeDetail(); + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr service_id_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr connection_token_; + int direction_; + int medium_; + int event_; + int description_; + int64_t flow_id_; + union ErrorCodeDetailUnion { + constexpr ErrorCodeDetailUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + int common_error_; + int start_advertising_error_; + int start_discovering_error_; + int stop_advertising_error_; + int stop_discovering_error_; + int start_listening_incoming_connection_error_; + int stop_listening_incoming_connection_error_; + int connect_error_; + int disconnect_error_; + } ErrorCodeDetail_; + uint32_t _oneof_case_[1]; + + friend struct ::TableStruct_internal_2fproto_2fanalytics_2fconnections_5flog_2eproto; +}; +// ------------------------------------------------------------------- + +class ConnectionsLog_AdvertisingMetadata final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:location.nearby.analytics.proto.ConnectionsLog.AdvertisingMetadata) */ { + public: + inline ConnectionsLog_AdvertisingMetadata() : ConnectionsLog_AdvertisingMetadata(nullptr) {} + ~ConnectionsLog_AdvertisingMetadata() override; + explicit constexpr ConnectionsLog_AdvertisingMetadata(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ConnectionsLog_AdvertisingMetadata(const ConnectionsLog_AdvertisingMetadata& from); + ConnectionsLog_AdvertisingMetadata(ConnectionsLog_AdvertisingMetadata&& from) noexcept + : ConnectionsLog_AdvertisingMetadata() { + *this = ::std::move(from); + } + + inline ConnectionsLog_AdvertisingMetadata& operator=(const ConnectionsLog_AdvertisingMetadata& from) { + CopyFrom(from); + return *this; + } + inline ConnectionsLog_AdvertisingMetadata& operator=(ConnectionsLog_AdvertisingMetadata&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const ConnectionsLog_AdvertisingMetadata& default_instance() { + return *internal_default_instance(); + } + static inline const ConnectionsLog_AdvertisingMetadata* internal_default_instance() { + return reinterpret_cast( + &_ConnectionsLog_AdvertisingMetadata_default_instance_); + } + static constexpr int kIndexInFileMessages = + 13; + + friend void swap(ConnectionsLog_AdvertisingMetadata& a, ConnectionsLog_AdvertisingMetadata& b) { + a.Swap(&b); + } + inline void Swap(ConnectionsLog_AdvertisingMetadata* 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(ConnectionsLog_AdvertisingMetadata* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ConnectionsLog_AdvertisingMetadata* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const ConnectionsLog_AdvertisingMetadata& from); + void MergeFrom(const ConnectionsLog_AdvertisingMetadata& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(ConnectionsLog_AdvertisingMetadata* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "location.nearby.analytics.proto.ConnectionsLog.AdvertisingMetadata"; + } + protected: + explicit ConnectionsLog_AdvertisingMetadata(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kConnectedApFrequencyFieldNumber = 2, + kSupportsExtendedBleAdvertisementsFieldNumber = 1, + kSupportsNfcTechnologyFieldNumber = 3, + kMultipleAdvertisementSupportedFieldNumber = 4, + }; + // optional int32 connected_ap_frequency = 2; + bool has_connected_ap_frequency() const; + private: + bool _internal_has_connected_ap_frequency() const; + public: + void clear_connected_ap_frequency(); + int32_t connected_ap_frequency() const; + void set_connected_ap_frequency(int32_t value); + private: + int32_t _internal_connected_ap_frequency() const; + void _internal_set_connected_ap_frequency(int32_t value); + public: + + // optional bool supports_extended_ble_advertisements = 1; + bool has_supports_extended_ble_advertisements() const; + private: + bool _internal_has_supports_extended_ble_advertisements() const; + public: + void clear_supports_extended_ble_advertisements(); + bool supports_extended_ble_advertisements() const; + void set_supports_extended_ble_advertisements(bool value); + private: + bool _internal_supports_extended_ble_advertisements() const; + void _internal_set_supports_extended_ble_advertisements(bool value); + public: + + // optional bool supports_nfc_technology = 3; + bool has_supports_nfc_technology() const; + private: + bool _internal_has_supports_nfc_technology() const; + public: + void clear_supports_nfc_technology(); + bool supports_nfc_technology() const; + void set_supports_nfc_technology(bool value); + private: + bool _internal_supports_nfc_technology() const; + void _internal_set_supports_nfc_technology(bool value); + public: + + // optional bool multiple_advertisement_supported = 4; + bool has_multiple_advertisement_supported() const; + private: + bool _internal_has_multiple_advertisement_supported() const; + public: + void clear_multiple_advertisement_supported(); + bool multiple_advertisement_supported() const; + void set_multiple_advertisement_supported(bool value); + private: + bool _internal_multiple_advertisement_supported() const; + void _internal_set_multiple_advertisement_supported(bool value); + public: + + // @@protoc_insertion_point(class_scope:location.nearby.analytics.proto.ConnectionsLog.AdvertisingMetadata) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + int32_t connected_ap_frequency_; + bool supports_extended_ble_advertisements_; + bool supports_nfc_technology_; + bool multiple_advertisement_supported_; + friend struct ::TableStruct_internal_2fproto_2fanalytics_2fconnections_5flog_2eproto; +}; +// ------------------------------------------------------------------- + +class ConnectionsLog_DiscoveryMetadata final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:location.nearby.analytics.proto.ConnectionsLog.DiscoveryMetadata) */ { + public: + inline ConnectionsLog_DiscoveryMetadata() : ConnectionsLog_DiscoveryMetadata(nullptr) {} + ~ConnectionsLog_DiscoveryMetadata() override; + explicit constexpr ConnectionsLog_DiscoveryMetadata(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ConnectionsLog_DiscoveryMetadata(const ConnectionsLog_DiscoveryMetadata& from); + ConnectionsLog_DiscoveryMetadata(ConnectionsLog_DiscoveryMetadata&& from) noexcept + : ConnectionsLog_DiscoveryMetadata() { + *this = ::std::move(from); + } + + inline ConnectionsLog_DiscoveryMetadata& operator=(const ConnectionsLog_DiscoveryMetadata& from) { + CopyFrom(from); + return *this; + } + inline ConnectionsLog_DiscoveryMetadata& operator=(ConnectionsLog_DiscoveryMetadata&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const ConnectionsLog_DiscoveryMetadata& default_instance() { + return *internal_default_instance(); + } + static inline const ConnectionsLog_DiscoveryMetadata* internal_default_instance() { + return reinterpret_cast( + &_ConnectionsLog_DiscoveryMetadata_default_instance_); + } + static constexpr int kIndexInFileMessages = + 14; + + friend void swap(ConnectionsLog_DiscoveryMetadata& a, ConnectionsLog_DiscoveryMetadata& b) { + a.Swap(&b); + } + inline void Swap(ConnectionsLog_DiscoveryMetadata* 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(ConnectionsLog_DiscoveryMetadata* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ConnectionsLog_DiscoveryMetadata* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const ConnectionsLog_DiscoveryMetadata& from); + void MergeFrom(const ConnectionsLog_DiscoveryMetadata& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(ConnectionsLog_DiscoveryMetadata* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "location.nearby.analytics.proto.ConnectionsLog.DiscoveryMetadata"; + } + protected: + explicit ConnectionsLog_DiscoveryMetadata(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kConnectedApFrequencyFieldNumber = 2, + kSupportsExtendedBleAdvertisementsFieldNumber = 1, + kSupportsNfcTechnologyFieldNumber = 3, + }; + // optional int32 connected_ap_frequency = 2; + bool has_connected_ap_frequency() const; + private: + bool _internal_has_connected_ap_frequency() const; + public: + void clear_connected_ap_frequency(); + int32_t connected_ap_frequency() const; + void set_connected_ap_frequency(int32_t value); + private: + int32_t _internal_connected_ap_frequency() const; + void _internal_set_connected_ap_frequency(int32_t value); + public: + + // optional bool supports_extended_ble_advertisements = 1; + bool has_supports_extended_ble_advertisements() const; + private: + bool _internal_has_supports_extended_ble_advertisements() const; + public: + void clear_supports_extended_ble_advertisements(); + bool supports_extended_ble_advertisements() const; + void set_supports_extended_ble_advertisements(bool value); + private: + bool _internal_supports_extended_ble_advertisements() const; + void _internal_set_supports_extended_ble_advertisements(bool value); + public: + + // optional bool supports_nfc_technology = 3; + bool has_supports_nfc_technology() const; + private: + bool _internal_has_supports_nfc_technology() const; + public: + void clear_supports_nfc_technology(); + bool supports_nfc_technology() const; + void set_supports_nfc_technology(bool value); + private: + bool _internal_supports_nfc_technology() const; + void _internal_set_supports_nfc_technology(bool value); + public: + + // @@protoc_insertion_point(class_scope:location.nearby.analytics.proto.ConnectionsLog.DiscoveryMetadata) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + int32_t connected_ap_frequency_; + bool supports_extended_ble_advertisements_; + bool supports_nfc_technology_; + friend struct ::TableStruct_internal_2fproto_2fanalytics_2fconnections_5flog_2eproto; +}; +// ------------------------------------------------------------------- + +class ConnectionsLog_ConnectionAttemptMetadata final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:location.nearby.analytics.proto.ConnectionsLog.ConnectionAttemptMetadata) */ { + public: + inline ConnectionsLog_ConnectionAttemptMetadata() : ConnectionsLog_ConnectionAttemptMetadata(nullptr) {} + ~ConnectionsLog_ConnectionAttemptMetadata() override; + explicit constexpr ConnectionsLog_ConnectionAttemptMetadata(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ConnectionsLog_ConnectionAttemptMetadata(const ConnectionsLog_ConnectionAttemptMetadata& from); + ConnectionsLog_ConnectionAttemptMetadata(ConnectionsLog_ConnectionAttemptMetadata&& from) noexcept + : ConnectionsLog_ConnectionAttemptMetadata() { + *this = ::std::move(from); + } + + inline ConnectionsLog_ConnectionAttemptMetadata& operator=(const ConnectionsLog_ConnectionAttemptMetadata& from) { + CopyFrom(from); + return *this; + } + inline ConnectionsLog_ConnectionAttemptMetadata& operator=(ConnectionsLog_ConnectionAttemptMetadata&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const ConnectionsLog_ConnectionAttemptMetadata& default_instance() { + return *internal_default_instance(); + } + static inline const ConnectionsLog_ConnectionAttemptMetadata* internal_default_instance() { + return reinterpret_cast( + &_ConnectionsLog_ConnectionAttemptMetadata_default_instance_); + } + static constexpr int kIndexInFileMessages = + 15; + + friend void swap(ConnectionsLog_ConnectionAttemptMetadata& a, ConnectionsLog_ConnectionAttemptMetadata& b) { + a.Swap(&b); + } + inline void Swap(ConnectionsLog_ConnectionAttemptMetadata* 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(ConnectionsLog_ConnectionAttemptMetadata* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ConnectionsLog_ConnectionAttemptMetadata* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const ConnectionsLog_ConnectionAttemptMetadata& from); + void MergeFrom(const ConnectionsLog_ConnectionAttemptMetadata& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(ConnectionsLog_ConnectionAttemptMetadata* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "location.nearby.analytics.proto.ConnectionsLog.ConnectionAttemptMetadata"; + } + protected: + explicit ConnectionsLog_ConnectionAttemptMetadata(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kNetworkOperatorFieldNumber = 4, + kCountryCodeFieldNumber = 5, + kTechnologyFieldNumber = 1, + kBandFieldNumber = 2, + kFrequencyFieldNumber = 3, + kTryCountsFieldNumber = 7, + kIsTdlsUsedFieldNumber = 6, + kWifiHotspotStatusFieldNumber = 8, + kMaxTxSpeedFieldNumber = 9, + kMaxRxSpeedFieldNumber = 10, + kWifiChannelWidthFieldNumber = 11, + kSendBufferSizeFieldNumber = 12, + kReceiveBufferSizeFieldNumber = 13, + }; + // optional string network_operator = 4; + bool has_network_operator() const; + private: + bool _internal_has_network_operator() const; + public: + void clear_network_operator(); + const std::string& network_operator() const; + template + void set_network_operator(ArgT0&& arg0, ArgT... args); + std::string* mutable_network_operator(); + PROTOBUF_NODISCARD std::string* release_network_operator(); + void set_allocated_network_operator(std::string* network_operator); + private: + const std::string& _internal_network_operator() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_network_operator(const std::string& value); + std::string* _internal_mutable_network_operator(); + public: + + // optional string country_code = 5; + bool has_country_code() const; + private: + bool _internal_has_country_code() const; + public: + void clear_country_code(); + const std::string& country_code() const; + template + void set_country_code(ArgT0&& arg0, ArgT... args); + std::string* mutable_country_code(); + PROTOBUF_NODISCARD std::string* release_country_code(); + void set_allocated_country_code(std::string* country_code); + private: + const std::string& _internal_country_code() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_country_code(const std::string& value); + std::string* _internal_mutable_country_code(); + public: + + // optional .location.nearby.proto.connections.ConnectionTechnology technology = 1; + bool has_technology() const; + private: + bool _internal_has_technology() const; + public: + void clear_technology(); + ::location::nearby::proto::connections::ConnectionTechnology technology() const; + void set_technology(::location::nearby::proto::connections::ConnectionTechnology value); + private: + ::location::nearby::proto::connections::ConnectionTechnology _internal_technology() const; + void _internal_set_technology(::location::nearby::proto::connections::ConnectionTechnology value); + public: + + // optional .location.nearby.proto.connections.ConnectionBand band = 2; + bool has_band() const; + private: + bool _internal_has_band() const; + public: + void clear_band(); + ::location::nearby::proto::connections::ConnectionBand band() const; + void set_band(::location::nearby::proto::connections::ConnectionBand value); + private: + ::location::nearby::proto::connections::ConnectionBand _internal_band() const; + void _internal_set_band(::location::nearby::proto::connections::ConnectionBand value); + public: + + // optional int32 frequency = 3; + bool has_frequency() const; + private: + bool _internal_has_frequency() const; + public: + void clear_frequency(); + int32_t frequency() const; + void set_frequency(int32_t value); + private: + int32_t _internal_frequency() const; + void _internal_set_frequency(int32_t value); + public: + + // optional int32 try_counts = 7; + bool has_try_counts() const; + private: + bool _internal_has_try_counts() const; + public: + void clear_try_counts(); + int32_t try_counts() const; + void set_try_counts(int32_t value); + private: + int32_t _internal_try_counts() const; + void _internal_set_try_counts(int32_t value); + public: + + // optional bool is_tdls_used = 6; + bool has_is_tdls_used() const; + private: + bool _internal_has_is_tdls_used() const; + public: + void clear_is_tdls_used(); + bool is_tdls_used() const; + void set_is_tdls_used(bool value); + private: + bool _internal_is_tdls_used() const; + void _internal_set_is_tdls_used(bool value); + public: + + // optional bool wifi_hotspot_status = 8; + bool has_wifi_hotspot_status() const; + private: + bool _internal_has_wifi_hotspot_status() const; + public: + void clear_wifi_hotspot_status(); + bool wifi_hotspot_status() const; + void set_wifi_hotspot_status(bool value); + private: + bool _internal_wifi_hotspot_status() const; + void _internal_set_wifi_hotspot_status(bool value); + public: + + // optional int32 max_tx_speed = 9; + bool has_max_tx_speed() const; + private: + bool _internal_has_max_tx_speed() const; + public: + void clear_max_tx_speed(); + int32_t max_tx_speed() const; + void set_max_tx_speed(int32_t value); + private: + int32_t _internal_max_tx_speed() const; + void _internal_set_max_tx_speed(int32_t value); + public: + + // optional int32 max_rx_speed = 10; + bool has_max_rx_speed() const; + private: + bool _internal_has_max_rx_speed() const; + public: + void clear_max_rx_speed(); + int32_t max_rx_speed() const; + void set_max_rx_speed(int32_t value); + private: + int32_t _internal_max_rx_speed() const; + void _internal_set_max_rx_speed(int32_t value); + public: + + // optional int32 wifi_channel_width = 11; + bool has_wifi_channel_width() const; + private: + bool _internal_has_wifi_channel_width() const; + public: + void clear_wifi_channel_width(); + int32_t wifi_channel_width() const; + void set_wifi_channel_width(int32_t value); + private: + int32_t _internal_wifi_channel_width() const; + void _internal_set_wifi_channel_width(int32_t value); + public: + + // optional int32 send_buffer_size = 12; + bool has_send_buffer_size() const; + private: + bool _internal_has_send_buffer_size() const; + public: + void clear_send_buffer_size(); + int32_t send_buffer_size() const; + void set_send_buffer_size(int32_t value); + private: + int32_t _internal_send_buffer_size() const; + void _internal_set_send_buffer_size(int32_t value); + public: + + // optional int32 receive_buffer_size = 13; + bool has_receive_buffer_size() const; + private: + bool _internal_has_receive_buffer_size() const; + public: + void clear_receive_buffer_size(); + int32_t receive_buffer_size() const; + void set_receive_buffer_size(int32_t value); + private: + int32_t _internal_receive_buffer_size() const; + void _internal_set_receive_buffer_size(int32_t value); + public: + + // @@protoc_insertion_point(class_scope:location.nearby.analytics.proto.ConnectionsLog.ConnectionAttemptMetadata) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr network_operator_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr country_code_; + int technology_; + int band_; + int32_t frequency_; + int32_t try_counts_; + bool is_tdls_used_; + bool wifi_hotspot_status_; + int32_t max_tx_speed_; + int32_t max_rx_speed_; + int32_t wifi_channel_width_; + int32_t send_buffer_size_; + int32_t receive_buffer_size_; + friend struct ::TableStruct_internal_2fproto_2fanalytics_2fconnections_5flog_2eproto; +}; +// ------------------------------------------------------------------- + +class ConnectionsLog final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:location.nearby.analytics.proto.ConnectionsLog) */ { + public: + inline ConnectionsLog() : ConnectionsLog(nullptr) {} + ~ConnectionsLog() override; + explicit constexpr ConnectionsLog(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ConnectionsLog(const ConnectionsLog& from); + ConnectionsLog(ConnectionsLog&& from) noexcept + : ConnectionsLog() { + *this = ::std::move(from); + } + + inline ConnectionsLog& operator=(const ConnectionsLog& from) { + CopyFrom(from); + return *this; + } + inline ConnectionsLog& operator=(ConnectionsLog&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const ConnectionsLog& default_instance() { + return *internal_default_instance(); + } + static inline const ConnectionsLog* internal_default_instance() { + return reinterpret_cast( + &_ConnectionsLog_default_instance_); + } + static constexpr int kIndexInFileMessages = + 16; + + friend void swap(ConnectionsLog& a, ConnectionsLog& b) { + a.Swap(&b); + } + inline void Swap(ConnectionsLog* 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(ConnectionsLog* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ConnectionsLog* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const ConnectionsLog& from); + void MergeFrom(const ConnectionsLog& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(ConnectionsLog* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "location.nearby.analytics.proto.ConnectionsLog"; + } + protected: + explicit ConnectionsLog(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + typedef ConnectionsLog_ClientSession ClientSession; + typedef ConnectionsLog_StrategySession StrategySession; + typedef ConnectionsLog_DiscoveryPhase DiscoveryPhase; + typedef ConnectionsLog_DiscoveredEndpoint DiscoveredEndpoint; + typedef ConnectionsLog_UwbRangingProcess UwbRangingProcess; + typedef ConnectionsLog_RawUwbRangingEvent RawUwbRangingEvent; + typedef ConnectionsLog_AdvertisingPhase AdvertisingPhase; + typedef ConnectionsLog_ConnectionRequest ConnectionRequest; + typedef ConnectionsLog_ConnectionAttempt ConnectionAttempt; + typedef ConnectionsLog_EstablishedConnection EstablishedConnection; + typedef ConnectionsLog_Payload Payload; + typedef ConnectionsLog_BandwidthUpgradeAttempt BandwidthUpgradeAttempt; + typedef ConnectionsLog_ErrorCode ErrorCode; + typedef ConnectionsLog_AdvertisingMetadata AdvertisingMetadata; + typedef ConnectionsLog_DiscoveryMetadata DiscoveryMetadata; + typedef ConnectionsLog_ConnectionAttemptMetadata ConnectionAttemptMetadata; + + // accessors ------------------------------------------------------- + + enum : int { + kVersionFieldNumber = 3, + kFilesMigrationPhaseFieldNumber = 6, + kClientSessionFieldNumber = 2, + kErrorCodeFieldNumber = 4, + kEventTypeFieldNumber = 1, + kLogSourceFieldNumber = 5, + }; + // optional string version = 3; + bool has_version() const; + private: + bool _internal_has_version() const; + public: + void clear_version(); + const std::string& version() const; + template + void set_version(ArgT0&& arg0, ArgT... args); + std::string* mutable_version(); + PROTOBUF_NODISCARD std::string* release_version(); + void set_allocated_version(std::string* version); + private: + const std::string& _internal_version() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_version(const std::string& value); + std::string* _internal_mutable_version(); + public: + + // optional string files_migration_phase = 6; + bool has_files_migration_phase() const; + private: + bool _internal_has_files_migration_phase() const; + public: + void clear_files_migration_phase(); + const std::string& files_migration_phase() const; + template + void set_files_migration_phase(ArgT0&& arg0, ArgT... args); + std::string* mutable_files_migration_phase(); + PROTOBUF_NODISCARD std::string* release_files_migration_phase(); + void set_allocated_files_migration_phase(std::string* files_migration_phase); + private: + const std::string& _internal_files_migration_phase() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_files_migration_phase(const std::string& value); + std::string* _internal_mutable_files_migration_phase(); + public: + + // optional .location.nearby.analytics.proto.ConnectionsLog.ClientSession client_session = 2; + bool has_client_session() const; + private: + bool _internal_has_client_session() const; + public: + void clear_client_session(); + const ::location::nearby::analytics::proto::ConnectionsLog_ClientSession& client_session() const; + PROTOBUF_NODISCARD ::location::nearby::analytics::proto::ConnectionsLog_ClientSession* release_client_session(); + ::location::nearby::analytics::proto::ConnectionsLog_ClientSession* mutable_client_session(); + void set_allocated_client_session(::location::nearby::analytics::proto::ConnectionsLog_ClientSession* client_session); + private: + const ::location::nearby::analytics::proto::ConnectionsLog_ClientSession& _internal_client_session() const; + ::location::nearby::analytics::proto::ConnectionsLog_ClientSession* _internal_mutable_client_session(); + public: + void unsafe_arena_set_allocated_client_session( + ::location::nearby::analytics::proto::ConnectionsLog_ClientSession* client_session); + ::location::nearby::analytics::proto::ConnectionsLog_ClientSession* unsafe_arena_release_client_session(); + + // optional .location.nearby.analytics.proto.ConnectionsLog.ErrorCode error_code = 4; + bool has_error_code() const; + private: + bool _internal_has_error_code() const; + public: + void clear_error_code(); + const ::location::nearby::analytics::proto::ConnectionsLog_ErrorCode& error_code() const; + PROTOBUF_NODISCARD ::location::nearby::analytics::proto::ConnectionsLog_ErrorCode* release_error_code(); + ::location::nearby::analytics::proto::ConnectionsLog_ErrorCode* mutable_error_code(); + void set_allocated_error_code(::location::nearby::analytics::proto::ConnectionsLog_ErrorCode* error_code); + private: + const ::location::nearby::analytics::proto::ConnectionsLog_ErrorCode& _internal_error_code() const; + ::location::nearby::analytics::proto::ConnectionsLog_ErrorCode* _internal_mutable_error_code(); + public: + void unsafe_arena_set_allocated_error_code( + ::location::nearby::analytics::proto::ConnectionsLog_ErrorCode* error_code); + ::location::nearby::analytics::proto::ConnectionsLog_ErrorCode* unsafe_arena_release_error_code(); + + // optional .location.nearby.proto.connections.EventType event_type = 1; + bool has_event_type() const; + private: + bool _internal_has_event_type() const; + public: + void clear_event_type(); + ::location::nearby::proto::connections::EventType event_type() const; + void set_event_type(::location::nearby::proto::connections::EventType value); + private: + ::location::nearby::proto::connections::EventType _internal_event_type() const; + void _internal_set_event_type(::location::nearby::proto::connections::EventType value); + public: + + // optional .location.nearby.proto.connections.LogSource log_source = 5; + bool has_log_source() const; + private: + bool _internal_has_log_source() const; + public: + void clear_log_source(); + ::location::nearby::proto::connections::LogSource log_source() const; + void set_log_source(::location::nearby::proto::connections::LogSource value); + private: + ::location::nearby::proto::connections::LogSource _internal_log_source() const; + void _internal_set_log_source(::location::nearby::proto::connections::LogSource value); + public: + + // @@protoc_insertion_point(class_scope:location.nearby.analytics.proto.ConnectionsLog) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr version_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr files_migration_phase_; + ::location::nearby::analytics::proto::ConnectionsLog_ClientSession* client_session_; + ::location::nearby::analytics::proto::ConnectionsLog_ErrorCode* error_code_; + int event_type_; + int log_source_; + friend struct ::TableStruct_internal_2fproto_2fanalytics_2fconnections_5flog_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// ConnectionsLog_ClientSession + +// optional int64 duration_millis = 1; +inline bool ConnectionsLog_ClientSession::_internal_has_duration_millis() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool ConnectionsLog_ClientSession::has_duration_millis() const { + return _internal_has_duration_millis(); +} +inline void ConnectionsLog_ClientSession::clear_duration_millis() { + duration_millis_ = int64_t{0}; + _has_bits_[0] &= ~0x00000001u; +} +inline int64_t ConnectionsLog_ClientSession::_internal_duration_millis() const { + return duration_millis_; +} +inline int64_t ConnectionsLog_ClientSession::duration_millis() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.ClientSession.duration_millis) + return _internal_duration_millis(); +} +inline void ConnectionsLog_ClientSession::_internal_set_duration_millis(int64_t value) { + _has_bits_[0] |= 0x00000001u; + duration_millis_ = value; +} +inline void ConnectionsLog_ClientSession::set_duration_millis(int64_t value) { + _internal_set_duration_millis(value); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.ClientSession.duration_millis) +} + +// repeated .location.nearby.analytics.proto.ConnectionsLog.StrategySession strategy_session = 2; +inline int ConnectionsLog_ClientSession::_internal_strategy_session_size() const { + return strategy_session_.size(); +} +inline int ConnectionsLog_ClientSession::strategy_session_size() const { + return _internal_strategy_session_size(); +} +inline void ConnectionsLog_ClientSession::clear_strategy_session() { + strategy_session_.Clear(); +} +inline ::location::nearby::analytics::proto::ConnectionsLog_StrategySession* ConnectionsLog_ClientSession::mutable_strategy_session(int index) { + // @@protoc_insertion_point(field_mutable:location.nearby.analytics.proto.ConnectionsLog.ClientSession.strategy_session) + return strategy_session_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::location::nearby::analytics::proto::ConnectionsLog_StrategySession >* +ConnectionsLog_ClientSession::mutable_strategy_session() { + // @@protoc_insertion_point(field_mutable_list:location.nearby.analytics.proto.ConnectionsLog.ClientSession.strategy_session) + return &strategy_session_; +} +inline const ::location::nearby::analytics::proto::ConnectionsLog_StrategySession& ConnectionsLog_ClientSession::_internal_strategy_session(int index) const { + return strategy_session_.Get(index); +} +inline const ::location::nearby::analytics::proto::ConnectionsLog_StrategySession& ConnectionsLog_ClientSession::strategy_session(int index) const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.ClientSession.strategy_session) + return _internal_strategy_session(index); +} +inline ::location::nearby::analytics::proto::ConnectionsLog_StrategySession* ConnectionsLog_ClientSession::_internal_add_strategy_session() { + return strategy_session_.Add(); +} +inline ::location::nearby::analytics::proto::ConnectionsLog_StrategySession* ConnectionsLog_ClientSession::add_strategy_session() { + ::location::nearby::analytics::proto::ConnectionsLog_StrategySession* _add = _internal_add_strategy_session(); + // @@protoc_insertion_point(field_add:location.nearby.analytics.proto.ConnectionsLog.ClientSession.strategy_session) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::location::nearby::analytics::proto::ConnectionsLog_StrategySession >& +ConnectionsLog_ClientSession::strategy_session() const { + // @@protoc_insertion_point(field_list:location.nearby.analytics.proto.ConnectionsLog.ClientSession.strategy_session) + return strategy_session_; +} + +// ------------------------------------------------------------------- + +// ConnectionsLog_StrategySession + +// optional int64 duration_millis = 1; +inline bool ConnectionsLog_StrategySession::_internal_has_duration_millis() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool ConnectionsLog_StrategySession::has_duration_millis() const { + return _internal_has_duration_millis(); +} +inline void ConnectionsLog_StrategySession::clear_duration_millis() { + duration_millis_ = int64_t{0}; + _has_bits_[0] &= ~0x00000002u; +} +inline int64_t ConnectionsLog_StrategySession::_internal_duration_millis() const { + return duration_millis_; +} +inline int64_t ConnectionsLog_StrategySession::duration_millis() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.StrategySession.duration_millis) + return _internal_duration_millis(); +} +inline void ConnectionsLog_StrategySession::_internal_set_duration_millis(int64_t value) { + _has_bits_[0] |= 0x00000002u; + duration_millis_ = value; +} +inline void ConnectionsLog_StrategySession::set_duration_millis(int64_t value) { + _internal_set_duration_millis(value); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.StrategySession.duration_millis) +} + +// optional .location.nearby.proto.connections.ConnectionsStrategy strategy = 2; +inline bool ConnectionsLog_StrategySession::_internal_has_strategy() const { + bool value = (_has_bits_[0] & 0x00000004u) != 0; + return value; +} +inline bool ConnectionsLog_StrategySession::has_strategy() const { + return _internal_has_strategy(); +} +inline void ConnectionsLog_StrategySession::clear_strategy() { + strategy_ = 0; + _has_bits_[0] &= ~0x00000004u; +} +inline ::location::nearby::proto::connections::ConnectionsStrategy ConnectionsLog_StrategySession::_internal_strategy() const { + return static_cast< ::location::nearby::proto::connections::ConnectionsStrategy >(strategy_); +} +inline ::location::nearby::proto::connections::ConnectionsStrategy ConnectionsLog_StrategySession::strategy() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.StrategySession.strategy) + return _internal_strategy(); +} +inline void ConnectionsLog_StrategySession::_internal_set_strategy(::location::nearby::proto::connections::ConnectionsStrategy value) { + assert(::location::nearby::proto::connections::ConnectionsStrategy_IsValid(value)); + _has_bits_[0] |= 0x00000004u; + strategy_ = value; +} +inline void ConnectionsLog_StrategySession::set_strategy(::location::nearby::proto::connections::ConnectionsStrategy value) { + _internal_set_strategy(value); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.StrategySession.strategy) +} + +// repeated .location.nearby.proto.connections.SessionRole role = 3; +inline int ConnectionsLog_StrategySession::_internal_role_size() const { + return role_.size(); +} +inline int ConnectionsLog_StrategySession::role_size() const { + return _internal_role_size(); +} +inline void ConnectionsLog_StrategySession::clear_role() { + role_.Clear(); +} +inline ::location::nearby::proto::connections::SessionRole ConnectionsLog_StrategySession::_internal_role(int index) const { + return static_cast< ::location::nearby::proto::connections::SessionRole >(role_.Get(index)); +} +inline ::location::nearby::proto::connections::SessionRole ConnectionsLog_StrategySession::role(int index) const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.StrategySession.role) + return _internal_role(index); +} +inline void ConnectionsLog_StrategySession::set_role(int index, ::location::nearby::proto::connections::SessionRole value) { + assert(::location::nearby::proto::connections::SessionRole_IsValid(value)); + role_.Set(index, value); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.StrategySession.role) +} +inline void ConnectionsLog_StrategySession::_internal_add_role(::location::nearby::proto::connections::SessionRole value) { + assert(::location::nearby::proto::connections::SessionRole_IsValid(value)); + role_.Add(value); +} +inline void ConnectionsLog_StrategySession::add_role(::location::nearby::proto::connections::SessionRole value) { + _internal_add_role(value); + // @@protoc_insertion_point(field_add:location.nearby.analytics.proto.ConnectionsLog.StrategySession.role) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField& +ConnectionsLog_StrategySession::role() const { + // @@protoc_insertion_point(field_list:location.nearby.analytics.proto.ConnectionsLog.StrategySession.role) + return role_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField* +ConnectionsLog_StrategySession::_internal_mutable_role() { + return &role_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField* +ConnectionsLog_StrategySession::mutable_role() { + // @@protoc_insertion_point(field_mutable_list:location.nearby.analytics.proto.ConnectionsLog.StrategySession.role) + return _internal_mutable_role(); +} + +// repeated .location.nearby.analytics.proto.ConnectionsLog.DiscoveryPhase discovery_phase = 4; +inline int ConnectionsLog_StrategySession::_internal_discovery_phase_size() const { + return discovery_phase_.size(); +} +inline int ConnectionsLog_StrategySession::discovery_phase_size() const { + return _internal_discovery_phase_size(); +} +inline void ConnectionsLog_StrategySession::clear_discovery_phase() { + discovery_phase_.Clear(); +} +inline ::location::nearby::analytics::proto::ConnectionsLog_DiscoveryPhase* ConnectionsLog_StrategySession::mutable_discovery_phase(int index) { + // @@protoc_insertion_point(field_mutable:location.nearby.analytics.proto.ConnectionsLog.StrategySession.discovery_phase) + return discovery_phase_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::location::nearby::analytics::proto::ConnectionsLog_DiscoveryPhase >* +ConnectionsLog_StrategySession::mutable_discovery_phase() { + // @@protoc_insertion_point(field_mutable_list:location.nearby.analytics.proto.ConnectionsLog.StrategySession.discovery_phase) + return &discovery_phase_; +} +inline const ::location::nearby::analytics::proto::ConnectionsLog_DiscoveryPhase& ConnectionsLog_StrategySession::_internal_discovery_phase(int index) const { + return discovery_phase_.Get(index); +} +inline const ::location::nearby::analytics::proto::ConnectionsLog_DiscoveryPhase& ConnectionsLog_StrategySession::discovery_phase(int index) const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.StrategySession.discovery_phase) + return _internal_discovery_phase(index); +} +inline ::location::nearby::analytics::proto::ConnectionsLog_DiscoveryPhase* ConnectionsLog_StrategySession::_internal_add_discovery_phase() { + return discovery_phase_.Add(); +} +inline ::location::nearby::analytics::proto::ConnectionsLog_DiscoveryPhase* ConnectionsLog_StrategySession::add_discovery_phase() { + ::location::nearby::analytics::proto::ConnectionsLog_DiscoveryPhase* _add = _internal_add_discovery_phase(); + // @@protoc_insertion_point(field_add:location.nearby.analytics.proto.ConnectionsLog.StrategySession.discovery_phase) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::location::nearby::analytics::proto::ConnectionsLog_DiscoveryPhase >& +ConnectionsLog_StrategySession::discovery_phase() const { + // @@protoc_insertion_point(field_list:location.nearby.analytics.proto.ConnectionsLog.StrategySession.discovery_phase) + return discovery_phase_; +} + +// repeated .location.nearby.analytics.proto.ConnectionsLog.AdvertisingPhase advertising_phase = 5; +inline int ConnectionsLog_StrategySession::_internal_advertising_phase_size() const { + return advertising_phase_.size(); +} +inline int ConnectionsLog_StrategySession::advertising_phase_size() const { + return _internal_advertising_phase_size(); +} +inline void ConnectionsLog_StrategySession::clear_advertising_phase() { + advertising_phase_.Clear(); +} +inline ::location::nearby::analytics::proto::ConnectionsLog_AdvertisingPhase* ConnectionsLog_StrategySession::mutable_advertising_phase(int index) { + // @@protoc_insertion_point(field_mutable:location.nearby.analytics.proto.ConnectionsLog.StrategySession.advertising_phase) + return advertising_phase_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::location::nearby::analytics::proto::ConnectionsLog_AdvertisingPhase >* +ConnectionsLog_StrategySession::mutable_advertising_phase() { + // @@protoc_insertion_point(field_mutable_list:location.nearby.analytics.proto.ConnectionsLog.StrategySession.advertising_phase) + return &advertising_phase_; +} +inline const ::location::nearby::analytics::proto::ConnectionsLog_AdvertisingPhase& ConnectionsLog_StrategySession::_internal_advertising_phase(int index) const { + return advertising_phase_.Get(index); +} +inline const ::location::nearby::analytics::proto::ConnectionsLog_AdvertisingPhase& ConnectionsLog_StrategySession::advertising_phase(int index) const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.StrategySession.advertising_phase) + return _internal_advertising_phase(index); +} +inline ::location::nearby::analytics::proto::ConnectionsLog_AdvertisingPhase* ConnectionsLog_StrategySession::_internal_add_advertising_phase() { + return advertising_phase_.Add(); +} +inline ::location::nearby::analytics::proto::ConnectionsLog_AdvertisingPhase* ConnectionsLog_StrategySession::add_advertising_phase() { + ::location::nearby::analytics::proto::ConnectionsLog_AdvertisingPhase* _add = _internal_add_advertising_phase(); + // @@protoc_insertion_point(field_add:location.nearby.analytics.proto.ConnectionsLog.StrategySession.advertising_phase) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::location::nearby::analytics::proto::ConnectionsLog_AdvertisingPhase >& +ConnectionsLog_StrategySession::advertising_phase() const { + // @@protoc_insertion_point(field_list:location.nearby.analytics.proto.ConnectionsLog.StrategySession.advertising_phase) + return advertising_phase_; +} + +// repeated .location.nearby.analytics.proto.ConnectionsLog.ConnectionAttempt connection_attempt = 6; +inline int ConnectionsLog_StrategySession::_internal_connection_attempt_size() const { + return connection_attempt_.size(); +} +inline int ConnectionsLog_StrategySession::connection_attempt_size() const { + return _internal_connection_attempt_size(); +} +inline void ConnectionsLog_StrategySession::clear_connection_attempt() { + connection_attempt_.Clear(); +} +inline ::location::nearby::analytics::proto::ConnectionsLog_ConnectionAttempt* ConnectionsLog_StrategySession::mutable_connection_attempt(int index) { + // @@protoc_insertion_point(field_mutable:location.nearby.analytics.proto.ConnectionsLog.StrategySession.connection_attempt) + return connection_attempt_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::location::nearby::analytics::proto::ConnectionsLog_ConnectionAttempt >* +ConnectionsLog_StrategySession::mutable_connection_attempt() { + // @@protoc_insertion_point(field_mutable_list:location.nearby.analytics.proto.ConnectionsLog.StrategySession.connection_attempt) + return &connection_attempt_; +} +inline const ::location::nearby::analytics::proto::ConnectionsLog_ConnectionAttempt& ConnectionsLog_StrategySession::_internal_connection_attempt(int index) const { + return connection_attempt_.Get(index); +} +inline const ::location::nearby::analytics::proto::ConnectionsLog_ConnectionAttempt& ConnectionsLog_StrategySession::connection_attempt(int index) const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.StrategySession.connection_attempt) + return _internal_connection_attempt(index); +} +inline ::location::nearby::analytics::proto::ConnectionsLog_ConnectionAttempt* ConnectionsLog_StrategySession::_internal_add_connection_attempt() { + return connection_attempt_.Add(); +} +inline ::location::nearby::analytics::proto::ConnectionsLog_ConnectionAttempt* ConnectionsLog_StrategySession::add_connection_attempt() { + ::location::nearby::analytics::proto::ConnectionsLog_ConnectionAttempt* _add = _internal_add_connection_attempt(); + // @@protoc_insertion_point(field_add:location.nearby.analytics.proto.ConnectionsLog.StrategySession.connection_attempt) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::location::nearby::analytics::proto::ConnectionsLog_ConnectionAttempt >& +ConnectionsLog_StrategySession::connection_attempt() const { + // @@protoc_insertion_point(field_list:location.nearby.analytics.proto.ConnectionsLog.StrategySession.connection_attempt) + return connection_attempt_; +} + +// repeated .location.nearby.analytics.proto.ConnectionsLog.EstablishedConnection established_connection = 7; +inline int ConnectionsLog_StrategySession::_internal_established_connection_size() const { + return established_connection_.size(); +} +inline int ConnectionsLog_StrategySession::established_connection_size() const { + return _internal_established_connection_size(); +} +inline void ConnectionsLog_StrategySession::clear_established_connection() { + established_connection_.Clear(); +} +inline ::location::nearby::analytics::proto::ConnectionsLog_EstablishedConnection* ConnectionsLog_StrategySession::mutable_established_connection(int index) { + // @@protoc_insertion_point(field_mutable:location.nearby.analytics.proto.ConnectionsLog.StrategySession.established_connection) + return established_connection_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::location::nearby::analytics::proto::ConnectionsLog_EstablishedConnection >* +ConnectionsLog_StrategySession::mutable_established_connection() { + // @@protoc_insertion_point(field_mutable_list:location.nearby.analytics.proto.ConnectionsLog.StrategySession.established_connection) + return &established_connection_; +} +inline const ::location::nearby::analytics::proto::ConnectionsLog_EstablishedConnection& ConnectionsLog_StrategySession::_internal_established_connection(int index) const { + return established_connection_.Get(index); +} +inline const ::location::nearby::analytics::proto::ConnectionsLog_EstablishedConnection& ConnectionsLog_StrategySession::established_connection(int index) const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.StrategySession.established_connection) + return _internal_established_connection(index); +} +inline ::location::nearby::analytics::proto::ConnectionsLog_EstablishedConnection* ConnectionsLog_StrategySession::_internal_add_established_connection() { + return established_connection_.Add(); +} +inline ::location::nearby::analytics::proto::ConnectionsLog_EstablishedConnection* ConnectionsLog_StrategySession::add_established_connection() { + ::location::nearby::analytics::proto::ConnectionsLog_EstablishedConnection* _add = _internal_add_established_connection(); + // @@protoc_insertion_point(field_add:location.nearby.analytics.proto.ConnectionsLog.StrategySession.established_connection) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::location::nearby::analytics::proto::ConnectionsLog_EstablishedConnection >& +ConnectionsLog_StrategySession::established_connection() const { + // @@protoc_insertion_point(field_list:location.nearby.analytics.proto.ConnectionsLog.StrategySession.established_connection) + return established_connection_; +} + +// repeated .location.nearby.analytics.proto.ConnectionsLog.BandwidthUpgradeAttempt upgrade_attempt = 9; +inline int ConnectionsLog_StrategySession::_internal_upgrade_attempt_size() const { + return upgrade_attempt_.size(); +} +inline int ConnectionsLog_StrategySession::upgrade_attempt_size() const { + return _internal_upgrade_attempt_size(); +} +inline void ConnectionsLog_StrategySession::clear_upgrade_attempt() { + upgrade_attempt_.Clear(); +} +inline ::location::nearby::analytics::proto::ConnectionsLog_BandwidthUpgradeAttempt* ConnectionsLog_StrategySession::mutable_upgrade_attempt(int index) { + // @@protoc_insertion_point(field_mutable:location.nearby.analytics.proto.ConnectionsLog.StrategySession.upgrade_attempt) + return upgrade_attempt_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::location::nearby::analytics::proto::ConnectionsLog_BandwidthUpgradeAttempt >* +ConnectionsLog_StrategySession::mutable_upgrade_attempt() { + // @@protoc_insertion_point(field_mutable_list:location.nearby.analytics.proto.ConnectionsLog.StrategySession.upgrade_attempt) + return &upgrade_attempt_; +} +inline const ::location::nearby::analytics::proto::ConnectionsLog_BandwidthUpgradeAttempt& ConnectionsLog_StrategySession::_internal_upgrade_attempt(int index) const { + return upgrade_attempt_.Get(index); +} +inline const ::location::nearby::analytics::proto::ConnectionsLog_BandwidthUpgradeAttempt& ConnectionsLog_StrategySession::upgrade_attempt(int index) const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.StrategySession.upgrade_attempt) + return _internal_upgrade_attempt(index); +} +inline ::location::nearby::analytics::proto::ConnectionsLog_BandwidthUpgradeAttempt* ConnectionsLog_StrategySession::_internal_add_upgrade_attempt() { + return upgrade_attempt_.Add(); +} +inline ::location::nearby::analytics::proto::ConnectionsLog_BandwidthUpgradeAttempt* ConnectionsLog_StrategySession::add_upgrade_attempt() { + ::location::nearby::analytics::proto::ConnectionsLog_BandwidthUpgradeAttempt* _add = _internal_add_upgrade_attempt(); + // @@protoc_insertion_point(field_add:location.nearby.analytics.proto.ConnectionsLog.StrategySession.upgrade_attempt) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::location::nearby::analytics::proto::ConnectionsLog_BandwidthUpgradeAttempt >& +ConnectionsLog_StrategySession::upgrade_attempt() const { + // @@protoc_insertion_point(field_list:location.nearby.analytics.proto.ConnectionsLog.StrategySession.upgrade_attempt) + return upgrade_attempt_; +} + +// optional string build_version = 10; +inline bool ConnectionsLog_StrategySession::_internal_has_build_version() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool ConnectionsLog_StrategySession::has_build_version() const { + return _internal_has_build_version(); +} +inline void ConnectionsLog_StrategySession::clear_build_version() { + build_version_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& ConnectionsLog_StrategySession::build_version() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.StrategySession.build_version) + return _internal_build_version(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void ConnectionsLog_StrategySession::set_build_version(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + build_version_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.StrategySession.build_version) +} +inline std::string* ConnectionsLog_StrategySession::mutable_build_version() { + std::string* _s = _internal_mutable_build_version(); + // @@protoc_insertion_point(field_mutable:location.nearby.analytics.proto.ConnectionsLog.StrategySession.build_version) + return _s; +} +inline const std::string& ConnectionsLog_StrategySession::_internal_build_version() const { + return build_version_.Get(); +} +inline void ConnectionsLog_StrategySession::_internal_set_build_version(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + build_version_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* ConnectionsLog_StrategySession::_internal_mutable_build_version() { + _has_bits_[0] |= 0x00000001u; + return build_version_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* ConnectionsLog_StrategySession::release_build_version() { + // @@protoc_insertion_point(field_release:location.nearby.analytics.proto.ConnectionsLog.StrategySession.build_version) + if (!_internal_has_build_version()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = build_version_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (build_version_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + build_version_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void ConnectionsLog_StrategySession::set_allocated_build_version(std::string* build_version) { + if (build_version != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + build_version_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), build_version, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (build_version_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + build_version_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:location.nearby.analytics.proto.ConnectionsLog.StrategySession.build_version) +} + +// ------------------------------------------------------------------- + +// ConnectionsLog_DiscoveryPhase + +// optional int64 duration_millis = 1; +inline bool ConnectionsLog_DiscoveryPhase::_internal_has_duration_millis() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool ConnectionsLog_DiscoveryPhase::has_duration_millis() const { + return _internal_has_duration_millis(); +} +inline void ConnectionsLog_DiscoveryPhase::clear_duration_millis() { + duration_millis_ = int64_t{0}; + _has_bits_[0] &= ~0x00000002u; +} +inline int64_t ConnectionsLog_DiscoveryPhase::_internal_duration_millis() const { + return duration_millis_; +} +inline int64_t ConnectionsLog_DiscoveryPhase::duration_millis() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.DiscoveryPhase.duration_millis) + return _internal_duration_millis(); +} +inline void ConnectionsLog_DiscoveryPhase::_internal_set_duration_millis(int64_t value) { + _has_bits_[0] |= 0x00000002u; + duration_millis_ = value; +} +inline void ConnectionsLog_DiscoveryPhase::set_duration_millis(int64_t value) { + _internal_set_duration_millis(value); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.DiscoveryPhase.duration_millis) +} + +// repeated .location.nearby.proto.connections.Medium medium = 2; +inline int ConnectionsLog_DiscoveryPhase::_internal_medium_size() const { + return medium_.size(); +} +inline int ConnectionsLog_DiscoveryPhase::medium_size() const { + return _internal_medium_size(); +} +inline void ConnectionsLog_DiscoveryPhase::clear_medium() { + medium_.Clear(); +} +inline ::location::nearby::proto::connections::Medium ConnectionsLog_DiscoveryPhase::_internal_medium(int index) const { + return static_cast< ::location::nearby::proto::connections::Medium >(medium_.Get(index)); +} +inline ::location::nearby::proto::connections::Medium ConnectionsLog_DiscoveryPhase::medium(int index) const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.DiscoveryPhase.medium) + return _internal_medium(index); +} +inline void ConnectionsLog_DiscoveryPhase::set_medium(int index, ::location::nearby::proto::connections::Medium value) { + assert(::location::nearby::proto::connections::Medium_IsValid(value)); + medium_.Set(index, value); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.DiscoveryPhase.medium) +} +inline void ConnectionsLog_DiscoveryPhase::_internal_add_medium(::location::nearby::proto::connections::Medium value) { + assert(::location::nearby::proto::connections::Medium_IsValid(value)); + medium_.Add(value); +} +inline void ConnectionsLog_DiscoveryPhase::add_medium(::location::nearby::proto::connections::Medium value) { + _internal_add_medium(value); + // @@protoc_insertion_point(field_add:location.nearby.analytics.proto.ConnectionsLog.DiscoveryPhase.medium) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField& +ConnectionsLog_DiscoveryPhase::medium() const { + // @@protoc_insertion_point(field_list:location.nearby.analytics.proto.ConnectionsLog.DiscoveryPhase.medium) + return medium_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField* +ConnectionsLog_DiscoveryPhase::_internal_mutable_medium() { + return &medium_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField* +ConnectionsLog_DiscoveryPhase::mutable_medium() { + // @@protoc_insertion_point(field_mutable_list:location.nearby.analytics.proto.ConnectionsLog.DiscoveryPhase.medium) + return _internal_mutable_medium(); +} + +// repeated .location.nearby.analytics.proto.ConnectionsLog.DiscoveredEndpoint discovered_endpoint = 3; +inline int ConnectionsLog_DiscoveryPhase::_internal_discovered_endpoint_size() const { + return discovered_endpoint_.size(); +} +inline int ConnectionsLog_DiscoveryPhase::discovered_endpoint_size() const { + return _internal_discovered_endpoint_size(); +} +inline void ConnectionsLog_DiscoveryPhase::clear_discovered_endpoint() { + discovered_endpoint_.Clear(); +} +inline ::location::nearby::analytics::proto::ConnectionsLog_DiscoveredEndpoint* ConnectionsLog_DiscoveryPhase::mutable_discovered_endpoint(int index) { + // @@protoc_insertion_point(field_mutable:location.nearby.analytics.proto.ConnectionsLog.DiscoveryPhase.discovered_endpoint) + return discovered_endpoint_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::location::nearby::analytics::proto::ConnectionsLog_DiscoveredEndpoint >* +ConnectionsLog_DiscoveryPhase::mutable_discovered_endpoint() { + // @@protoc_insertion_point(field_mutable_list:location.nearby.analytics.proto.ConnectionsLog.DiscoveryPhase.discovered_endpoint) + return &discovered_endpoint_; +} +inline const ::location::nearby::analytics::proto::ConnectionsLog_DiscoveredEndpoint& ConnectionsLog_DiscoveryPhase::_internal_discovered_endpoint(int index) const { + return discovered_endpoint_.Get(index); +} +inline const ::location::nearby::analytics::proto::ConnectionsLog_DiscoveredEndpoint& ConnectionsLog_DiscoveryPhase::discovered_endpoint(int index) const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.DiscoveryPhase.discovered_endpoint) + return _internal_discovered_endpoint(index); +} +inline ::location::nearby::analytics::proto::ConnectionsLog_DiscoveredEndpoint* ConnectionsLog_DiscoveryPhase::_internal_add_discovered_endpoint() { + return discovered_endpoint_.Add(); +} +inline ::location::nearby::analytics::proto::ConnectionsLog_DiscoveredEndpoint* ConnectionsLog_DiscoveryPhase::add_discovered_endpoint() { + ::location::nearby::analytics::proto::ConnectionsLog_DiscoveredEndpoint* _add = _internal_add_discovered_endpoint(); + // @@protoc_insertion_point(field_add:location.nearby.analytics.proto.ConnectionsLog.DiscoveryPhase.discovered_endpoint) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::location::nearby::analytics::proto::ConnectionsLog_DiscoveredEndpoint >& +ConnectionsLog_DiscoveryPhase::discovered_endpoint() const { + // @@protoc_insertion_point(field_list:location.nearby.analytics.proto.ConnectionsLog.DiscoveryPhase.discovered_endpoint) + return discovered_endpoint_; +} + +// repeated .location.nearby.analytics.proto.ConnectionsLog.ConnectionRequest sent_connection_request = 4; +inline int ConnectionsLog_DiscoveryPhase::_internal_sent_connection_request_size() const { + return sent_connection_request_.size(); +} +inline int ConnectionsLog_DiscoveryPhase::sent_connection_request_size() const { + return _internal_sent_connection_request_size(); +} +inline void ConnectionsLog_DiscoveryPhase::clear_sent_connection_request() { + sent_connection_request_.Clear(); +} +inline ::location::nearby::analytics::proto::ConnectionsLog_ConnectionRequest* ConnectionsLog_DiscoveryPhase::mutable_sent_connection_request(int index) { + // @@protoc_insertion_point(field_mutable:location.nearby.analytics.proto.ConnectionsLog.DiscoveryPhase.sent_connection_request) + return sent_connection_request_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::location::nearby::analytics::proto::ConnectionsLog_ConnectionRequest >* +ConnectionsLog_DiscoveryPhase::mutable_sent_connection_request() { + // @@protoc_insertion_point(field_mutable_list:location.nearby.analytics.proto.ConnectionsLog.DiscoveryPhase.sent_connection_request) + return &sent_connection_request_; +} +inline const ::location::nearby::analytics::proto::ConnectionsLog_ConnectionRequest& ConnectionsLog_DiscoveryPhase::_internal_sent_connection_request(int index) const { + return sent_connection_request_.Get(index); +} +inline const ::location::nearby::analytics::proto::ConnectionsLog_ConnectionRequest& ConnectionsLog_DiscoveryPhase::sent_connection_request(int index) const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.DiscoveryPhase.sent_connection_request) + return _internal_sent_connection_request(index); +} +inline ::location::nearby::analytics::proto::ConnectionsLog_ConnectionRequest* ConnectionsLog_DiscoveryPhase::_internal_add_sent_connection_request() { + return sent_connection_request_.Add(); +} +inline ::location::nearby::analytics::proto::ConnectionsLog_ConnectionRequest* ConnectionsLog_DiscoveryPhase::add_sent_connection_request() { + ::location::nearby::analytics::proto::ConnectionsLog_ConnectionRequest* _add = _internal_add_sent_connection_request(); + // @@protoc_insertion_point(field_add:location.nearby.analytics.proto.ConnectionsLog.DiscoveryPhase.sent_connection_request) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::location::nearby::analytics::proto::ConnectionsLog_ConnectionRequest >& +ConnectionsLog_DiscoveryPhase::sent_connection_request() const { + // @@protoc_insertion_point(field_list:location.nearby.analytics.proto.ConnectionsLog.DiscoveryPhase.sent_connection_request) + return sent_connection_request_; +} + +// repeated .location.nearby.analytics.proto.ConnectionsLog.UwbRangingProcess uwb_ranging = 5; +inline int ConnectionsLog_DiscoveryPhase::_internal_uwb_ranging_size() const { + return uwb_ranging_.size(); +} +inline int ConnectionsLog_DiscoveryPhase::uwb_ranging_size() const { + return _internal_uwb_ranging_size(); +} +inline void ConnectionsLog_DiscoveryPhase::clear_uwb_ranging() { + uwb_ranging_.Clear(); +} +inline ::location::nearby::analytics::proto::ConnectionsLog_UwbRangingProcess* ConnectionsLog_DiscoveryPhase::mutable_uwb_ranging(int index) { + // @@protoc_insertion_point(field_mutable:location.nearby.analytics.proto.ConnectionsLog.DiscoveryPhase.uwb_ranging) + return uwb_ranging_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::location::nearby::analytics::proto::ConnectionsLog_UwbRangingProcess >* +ConnectionsLog_DiscoveryPhase::mutable_uwb_ranging() { + // @@protoc_insertion_point(field_mutable_list:location.nearby.analytics.proto.ConnectionsLog.DiscoveryPhase.uwb_ranging) + return &uwb_ranging_; +} +inline const ::location::nearby::analytics::proto::ConnectionsLog_UwbRangingProcess& ConnectionsLog_DiscoveryPhase::_internal_uwb_ranging(int index) const { + return uwb_ranging_.Get(index); +} +inline const ::location::nearby::analytics::proto::ConnectionsLog_UwbRangingProcess& ConnectionsLog_DiscoveryPhase::uwb_ranging(int index) const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.DiscoveryPhase.uwb_ranging) + return _internal_uwb_ranging(index); +} +inline ::location::nearby::analytics::proto::ConnectionsLog_UwbRangingProcess* ConnectionsLog_DiscoveryPhase::_internal_add_uwb_ranging() { + return uwb_ranging_.Add(); +} +inline ::location::nearby::analytics::proto::ConnectionsLog_UwbRangingProcess* ConnectionsLog_DiscoveryPhase::add_uwb_ranging() { + ::location::nearby::analytics::proto::ConnectionsLog_UwbRangingProcess* _add = _internal_add_uwb_ranging(); + // @@protoc_insertion_point(field_add:location.nearby.analytics.proto.ConnectionsLog.DiscoveryPhase.uwb_ranging) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::location::nearby::analytics::proto::ConnectionsLog_UwbRangingProcess >& +ConnectionsLog_DiscoveryPhase::uwb_ranging() const { + // @@protoc_insertion_point(field_list:location.nearby.analytics.proto.ConnectionsLog.DiscoveryPhase.uwb_ranging) + return uwb_ranging_; +} + +// optional int64 client_flow_id = 6; +inline bool ConnectionsLog_DiscoveryPhase::_internal_has_client_flow_id() const { + bool value = (_has_bits_[0] & 0x00000004u) != 0; + return value; +} +inline bool ConnectionsLog_DiscoveryPhase::has_client_flow_id() const { + return _internal_has_client_flow_id(); +} +inline void ConnectionsLog_DiscoveryPhase::clear_client_flow_id() { + client_flow_id_ = int64_t{0}; + _has_bits_[0] &= ~0x00000004u; +} +inline int64_t ConnectionsLog_DiscoveryPhase::_internal_client_flow_id() const { + return client_flow_id_; +} +inline int64_t ConnectionsLog_DiscoveryPhase::client_flow_id() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.DiscoveryPhase.client_flow_id) + return _internal_client_flow_id(); +} +inline void ConnectionsLog_DiscoveryPhase::_internal_set_client_flow_id(int64_t value) { + _has_bits_[0] |= 0x00000004u; + client_flow_id_ = value; +} +inline void ConnectionsLog_DiscoveryPhase::set_client_flow_id(int64_t value) { + _internal_set_client_flow_id(value); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.DiscoveryPhase.client_flow_id) +} + +// optional .location.nearby.analytics.proto.ConnectionsLog.DiscoveryMetadata discovery_metadata = 7; +inline bool ConnectionsLog_DiscoveryPhase::_internal_has_discovery_metadata() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + PROTOBUF_ASSUME(!value || discovery_metadata_ != nullptr); + return value; +} +inline bool ConnectionsLog_DiscoveryPhase::has_discovery_metadata() const { + return _internal_has_discovery_metadata(); +} +inline void ConnectionsLog_DiscoveryPhase::clear_discovery_metadata() { + if (discovery_metadata_ != nullptr) discovery_metadata_->Clear(); + _has_bits_[0] &= ~0x00000001u; +} +inline const ::location::nearby::analytics::proto::ConnectionsLog_DiscoveryMetadata& ConnectionsLog_DiscoveryPhase::_internal_discovery_metadata() const { + const ::location::nearby::analytics::proto::ConnectionsLog_DiscoveryMetadata* p = discovery_metadata_; + return p != nullptr ? *p : reinterpret_cast( + ::location::nearby::analytics::proto::_ConnectionsLog_DiscoveryMetadata_default_instance_); +} +inline const ::location::nearby::analytics::proto::ConnectionsLog_DiscoveryMetadata& ConnectionsLog_DiscoveryPhase::discovery_metadata() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.DiscoveryPhase.discovery_metadata) + return _internal_discovery_metadata(); +} +inline void ConnectionsLog_DiscoveryPhase::unsafe_arena_set_allocated_discovery_metadata( + ::location::nearby::analytics::proto::ConnectionsLog_DiscoveryMetadata* discovery_metadata) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(discovery_metadata_); + } + discovery_metadata_ = discovery_metadata; + if (discovery_metadata) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:location.nearby.analytics.proto.ConnectionsLog.DiscoveryPhase.discovery_metadata) +} +inline ::location::nearby::analytics::proto::ConnectionsLog_DiscoveryMetadata* ConnectionsLog_DiscoveryPhase::release_discovery_metadata() { + _has_bits_[0] &= ~0x00000001u; + ::location::nearby::analytics::proto::ConnectionsLog_DiscoveryMetadata* temp = discovery_metadata_; + discovery_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 ::location::nearby::analytics::proto::ConnectionsLog_DiscoveryMetadata* ConnectionsLog_DiscoveryPhase::unsafe_arena_release_discovery_metadata() { + // @@protoc_insertion_point(field_release:location.nearby.analytics.proto.ConnectionsLog.DiscoveryPhase.discovery_metadata) + _has_bits_[0] &= ~0x00000001u; + ::location::nearby::analytics::proto::ConnectionsLog_DiscoveryMetadata* temp = discovery_metadata_; + discovery_metadata_ = nullptr; + return temp; +} +inline ::location::nearby::analytics::proto::ConnectionsLog_DiscoveryMetadata* ConnectionsLog_DiscoveryPhase::_internal_mutable_discovery_metadata() { + _has_bits_[0] |= 0x00000001u; + if (discovery_metadata_ == nullptr) { + auto* p = CreateMaybeMessage<::location::nearby::analytics::proto::ConnectionsLog_DiscoveryMetadata>(GetArenaForAllocation()); + discovery_metadata_ = p; + } + return discovery_metadata_; +} +inline ::location::nearby::analytics::proto::ConnectionsLog_DiscoveryMetadata* ConnectionsLog_DiscoveryPhase::mutable_discovery_metadata() { + ::location::nearby::analytics::proto::ConnectionsLog_DiscoveryMetadata* _msg = _internal_mutable_discovery_metadata(); + // @@protoc_insertion_point(field_mutable:location.nearby.analytics.proto.ConnectionsLog.DiscoveryPhase.discovery_metadata) + return _msg; +} +inline void ConnectionsLog_DiscoveryPhase::set_allocated_discovery_metadata(::location::nearby::analytics::proto::ConnectionsLog_DiscoveryMetadata* discovery_metadata) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete discovery_metadata_; + } + if (discovery_metadata) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::location::nearby::analytics::proto::ConnectionsLog_DiscoveryMetadata>::GetOwningArena(discovery_metadata); + if (message_arena != submessage_arena) { + discovery_metadata = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, discovery_metadata, submessage_arena); + } + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + discovery_metadata_ = discovery_metadata; + // @@protoc_insertion_point(field_set_allocated:location.nearby.analytics.proto.ConnectionsLog.DiscoveryPhase.discovery_metadata) +} + +// ------------------------------------------------------------------- + +// ConnectionsLog_DiscoveredEndpoint + +// optional .location.nearby.proto.connections.Medium medium = 1; +inline bool ConnectionsLog_DiscoveredEndpoint::_internal_has_medium() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool ConnectionsLog_DiscoveredEndpoint::has_medium() const { + return _internal_has_medium(); +} +inline void ConnectionsLog_DiscoveredEndpoint::clear_medium() { + medium_ = 0; + _has_bits_[0] &= ~0x00000002u; +} +inline ::location::nearby::proto::connections::Medium ConnectionsLog_DiscoveredEndpoint::_internal_medium() const { + return static_cast< ::location::nearby::proto::connections::Medium >(medium_); +} +inline ::location::nearby::proto::connections::Medium ConnectionsLog_DiscoveredEndpoint::medium() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.DiscoveredEndpoint.medium) + return _internal_medium(); +} +inline void ConnectionsLog_DiscoveredEndpoint::_internal_set_medium(::location::nearby::proto::connections::Medium value) { + assert(::location::nearby::proto::connections::Medium_IsValid(value)); + _has_bits_[0] |= 0x00000002u; + medium_ = value; +} +inline void ConnectionsLog_DiscoveredEndpoint::set_medium(::location::nearby::proto::connections::Medium value) { + _internal_set_medium(value); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.DiscoveredEndpoint.medium) +} + +// optional int64 latency_millis = 2; +inline bool ConnectionsLog_DiscoveredEndpoint::_internal_has_latency_millis() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool ConnectionsLog_DiscoveredEndpoint::has_latency_millis() const { + return _internal_has_latency_millis(); +} +inline void ConnectionsLog_DiscoveredEndpoint::clear_latency_millis() { + latency_millis_ = int64_t{0}; + _has_bits_[0] &= ~0x00000001u; +} +inline int64_t ConnectionsLog_DiscoveredEndpoint::_internal_latency_millis() const { + return latency_millis_; +} +inline int64_t ConnectionsLog_DiscoveredEndpoint::latency_millis() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.DiscoveredEndpoint.latency_millis) + return _internal_latency_millis(); +} +inline void ConnectionsLog_DiscoveredEndpoint::_internal_set_latency_millis(int64_t value) { + _has_bits_[0] |= 0x00000001u; + latency_millis_ = value; +} +inline void ConnectionsLog_DiscoveredEndpoint::set_latency_millis(int64_t value) { + _internal_set_latency_millis(value); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.DiscoveredEndpoint.latency_millis) +} + +// ------------------------------------------------------------------- + +// ConnectionsLog_UwbRangingProcess + +// optional int64 duration_millis = 1; +inline bool ConnectionsLog_UwbRangingProcess::_internal_has_duration_millis() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool ConnectionsLog_UwbRangingProcess::has_duration_millis() const { + return _internal_has_duration_millis(); +} +inline void ConnectionsLog_UwbRangingProcess::clear_duration_millis() { + duration_millis_ = int64_t{0}; + _has_bits_[0] &= ~0x00000001u; +} +inline int64_t ConnectionsLog_UwbRangingProcess::_internal_duration_millis() const { + return duration_millis_; +} +inline int64_t ConnectionsLog_UwbRangingProcess::duration_millis() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.UwbRangingProcess.duration_millis) + return _internal_duration_millis(); +} +inline void ConnectionsLog_UwbRangingProcess::_internal_set_duration_millis(int64_t value) { + _has_bits_[0] |= 0x00000001u; + duration_millis_ = value; +} +inline void ConnectionsLog_UwbRangingProcess::set_duration_millis(int64_t value) { + _internal_set_duration_millis(value); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.UwbRangingProcess.duration_millis) +} + +// repeated .location.nearby.analytics.proto.ConnectionsLog.RawUwbRangingEvent uwb_ranging_data = 2; +inline int ConnectionsLog_UwbRangingProcess::_internal_uwb_ranging_data_size() const { + return uwb_ranging_data_.size(); +} +inline int ConnectionsLog_UwbRangingProcess::uwb_ranging_data_size() const { + return _internal_uwb_ranging_data_size(); +} +inline void ConnectionsLog_UwbRangingProcess::clear_uwb_ranging_data() { + uwb_ranging_data_.Clear(); +} +inline ::location::nearby::analytics::proto::ConnectionsLog_RawUwbRangingEvent* ConnectionsLog_UwbRangingProcess::mutable_uwb_ranging_data(int index) { + // @@protoc_insertion_point(field_mutable:location.nearby.analytics.proto.ConnectionsLog.UwbRangingProcess.uwb_ranging_data) + return uwb_ranging_data_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::location::nearby::analytics::proto::ConnectionsLog_RawUwbRangingEvent >* +ConnectionsLog_UwbRangingProcess::mutable_uwb_ranging_data() { + // @@protoc_insertion_point(field_mutable_list:location.nearby.analytics.proto.ConnectionsLog.UwbRangingProcess.uwb_ranging_data) + return &uwb_ranging_data_; +} +inline const ::location::nearby::analytics::proto::ConnectionsLog_RawUwbRangingEvent& ConnectionsLog_UwbRangingProcess::_internal_uwb_ranging_data(int index) const { + return uwb_ranging_data_.Get(index); +} +inline const ::location::nearby::analytics::proto::ConnectionsLog_RawUwbRangingEvent& ConnectionsLog_UwbRangingProcess::uwb_ranging_data(int index) const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.UwbRangingProcess.uwb_ranging_data) + return _internal_uwb_ranging_data(index); +} +inline ::location::nearby::analytics::proto::ConnectionsLog_RawUwbRangingEvent* ConnectionsLog_UwbRangingProcess::_internal_add_uwb_ranging_data() { + return uwb_ranging_data_.Add(); +} +inline ::location::nearby::analytics::proto::ConnectionsLog_RawUwbRangingEvent* ConnectionsLog_UwbRangingProcess::add_uwb_ranging_data() { + ::location::nearby::analytics::proto::ConnectionsLog_RawUwbRangingEvent* _add = _internal_add_uwb_ranging_data(); + // @@protoc_insertion_point(field_add:location.nearby.analytics.proto.ConnectionsLog.UwbRangingProcess.uwb_ranging_data) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::location::nearby::analytics::proto::ConnectionsLog_RawUwbRangingEvent >& +ConnectionsLog_UwbRangingProcess::uwb_ranging_data() const { + // @@protoc_insertion_point(field_list:location.nearby.analytics.proto.ConnectionsLog.UwbRangingProcess.uwb_ranging_data) + return uwb_ranging_data_; +} + +// optional int32 number_of_ranging_data = 3; +inline bool ConnectionsLog_UwbRangingProcess::_internal_has_number_of_ranging_data() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool ConnectionsLog_UwbRangingProcess::has_number_of_ranging_data() const { + return _internal_has_number_of_ranging_data(); +} +inline void ConnectionsLog_UwbRangingProcess::clear_number_of_ranging_data() { + number_of_ranging_data_ = 0; + _has_bits_[0] &= ~0x00000002u; +} +inline int32_t ConnectionsLog_UwbRangingProcess::_internal_number_of_ranging_data() const { + return number_of_ranging_data_; +} +inline int32_t ConnectionsLog_UwbRangingProcess::number_of_ranging_data() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.UwbRangingProcess.number_of_ranging_data) + return _internal_number_of_ranging_data(); +} +inline void ConnectionsLog_UwbRangingProcess::_internal_set_number_of_ranging_data(int32_t value) { + _has_bits_[0] |= 0x00000002u; + number_of_ranging_data_ = value; +} +inline void ConnectionsLog_UwbRangingProcess::set_number_of_ranging_data(int32_t value) { + _internal_set_number_of_ranging_data(value); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.UwbRangingProcess.number_of_ranging_data) +} + +// optional int32 distance_min = 4; +inline bool ConnectionsLog_UwbRangingProcess::_internal_has_distance_min() const { + bool value = (_has_bits_[0] & 0x00000004u) != 0; + return value; +} +inline bool ConnectionsLog_UwbRangingProcess::has_distance_min() const { + return _internal_has_distance_min(); +} +inline void ConnectionsLog_UwbRangingProcess::clear_distance_min() { + distance_min_ = 0; + _has_bits_[0] &= ~0x00000004u; +} +inline int32_t ConnectionsLog_UwbRangingProcess::_internal_distance_min() const { + return distance_min_; +} +inline int32_t ConnectionsLog_UwbRangingProcess::distance_min() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.UwbRangingProcess.distance_min) + return _internal_distance_min(); +} +inline void ConnectionsLog_UwbRangingProcess::_internal_set_distance_min(int32_t value) { + _has_bits_[0] |= 0x00000004u; + distance_min_ = value; +} +inline void ConnectionsLog_UwbRangingProcess::set_distance_min(int32_t value) { + _internal_set_distance_min(value); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.UwbRangingProcess.distance_min) +} + +// optional int32 distance_max = 5; +inline bool ConnectionsLog_UwbRangingProcess::_internal_has_distance_max() const { + bool value = (_has_bits_[0] & 0x00000008u) != 0; + return value; +} +inline bool ConnectionsLog_UwbRangingProcess::has_distance_max() const { + return _internal_has_distance_max(); +} +inline void ConnectionsLog_UwbRangingProcess::clear_distance_max() { + distance_max_ = 0; + _has_bits_[0] &= ~0x00000008u; +} +inline int32_t ConnectionsLog_UwbRangingProcess::_internal_distance_max() const { + return distance_max_; +} +inline int32_t ConnectionsLog_UwbRangingProcess::distance_max() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.UwbRangingProcess.distance_max) + return _internal_distance_max(); +} +inline void ConnectionsLog_UwbRangingProcess::_internal_set_distance_max(int32_t value) { + _has_bits_[0] |= 0x00000008u; + distance_max_ = value; +} +inline void ConnectionsLog_UwbRangingProcess::set_distance_max(int32_t value) { + _internal_set_distance_max(value); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.UwbRangingProcess.distance_max) +} + +// optional int32 distance_ave = 6; +inline bool ConnectionsLog_UwbRangingProcess::_internal_has_distance_ave() const { + bool value = (_has_bits_[0] & 0x00000010u) != 0; + return value; +} +inline bool ConnectionsLog_UwbRangingProcess::has_distance_ave() const { + return _internal_has_distance_ave(); +} +inline void ConnectionsLog_UwbRangingProcess::clear_distance_ave() { + distance_ave_ = 0; + _has_bits_[0] &= ~0x00000010u; +} +inline int32_t ConnectionsLog_UwbRangingProcess::_internal_distance_ave() const { + return distance_ave_; +} +inline int32_t ConnectionsLog_UwbRangingProcess::distance_ave() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.UwbRangingProcess.distance_ave) + return _internal_distance_ave(); +} +inline void ConnectionsLog_UwbRangingProcess::_internal_set_distance_ave(int32_t value) { + _has_bits_[0] |= 0x00000010u; + distance_ave_ = value; +} +inline void ConnectionsLog_UwbRangingProcess::set_distance_ave(int32_t value) { + _internal_set_distance_ave(value); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.UwbRangingProcess.distance_ave) +} + +// optional int32 distance_variance = 7; +inline bool ConnectionsLog_UwbRangingProcess::_internal_has_distance_variance() const { + bool value = (_has_bits_[0] & 0x00000020u) != 0; + return value; +} +inline bool ConnectionsLog_UwbRangingProcess::has_distance_variance() const { + return _internal_has_distance_variance(); +} +inline void ConnectionsLog_UwbRangingProcess::clear_distance_variance() { + distance_variance_ = 0; + _has_bits_[0] &= ~0x00000020u; +} +inline int32_t ConnectionsLog_UwbRangingProcess::_internal_distance_variance() const { + return distance_variance_; +} +inline int32_t ConnectionsLog_UwbRangingProcess::distance_variance() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.UwbRangingProcess.distance_variance) + return _internal_distance_variance(); +} +inline void ConnectionsLog_UwbRangingProcess::_internal_set_distance_variance(int32_t value) { + _has_bits_[0] |= 0x00000020u; + distance_variance_ = value; +} +inline void ConnectionsLog_UwbRangingProcess::set_distance_variance(int32_t value) { + _internal_set_distance_variance(value); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.UwbRangingProcess.distance_variance) +} + +// optional int32 azimuth_min = 8; +inline bool ConnectionsLog_UwbRangingProcess::_internal_has_azimuth_min() const { + bool value = (_has_bits_[0] & 0x00000040u) != 0; + return value; +} +inline bool ConnectionsLog_UwbRangingProcess::has_azimuth_min() const { + return _internal_has_azimuth_min(); +} +inline void ConnectionsLog_UwbRangingProcess::clear_azimuth_min() { + azimuth_min_ = 0; + _has_bits_[0] &= ~0x00000040u; +} +inline int32_t ConnectionsLog_UwbRangingProcess::_internal_azimuth_min() const { + return azimuth_min_; +} +inline int32_t ConnectionsLog_UwbRangingProcess::azimuth_min() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.UwbRangingProcess.azimuth_min) + return _internal_azimuth_min(); +} +inline void ConnectionsLog_UwbRangingProcess::_internal_set_azimuth_min(int32_t value) { + _has_bits_[0] |= 0x00000040u; + azimuth_min_ = value; +} +inline void ConnectionsLog_UwbRangingProcess::set_azimuth_min(int32_t value) { + _internal_set_azimuth_min(value); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.UwbRangingProcess.azimuth_min) +} + +// optional int32 azimuth_max = 9; +inline bool ConnectionsLog_UwbRangingProcess::_internal_has_azimuth_max() const { + bool value = (_has_bits_[0] & 0x00000080u) != 0; + return value; +} +inline bool ConnectionsLog_UwbRangingProcess::has_azimuth_max() const { + return _internal_has_azimuth_max(); +} +inline void ConnectionsLog_UwbRangingProcess::clear_azimuth_max() { + azimuth_max_ = 0; + _has_bits_[0] &= ~0x00000080u; +} +inline int32_t ConnectionsLog_UwbRangingProcess::_internal_azimuth_max() const { + return azimuth_max_; +} +inline int32_t ConnectionsLog_UwbRangingProcess::azimuth_max() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.UwbRangingProcess.azimuth_max) + return _internal_azimuth_max(); +} +inline void ConnectionsLog_UwbRangingProcess::_internal_set_azimuth_max(int32_t value) { + _has_bits_[0] |= 0x00000080u; + azimuth_max_ = value; +} +inline void ConnectionsLog_UwbRangingProcess::set_azimuth_max(int32_t value) { + _internal_set_azimuth_max(value); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.UwbRangingProcess.azimuth_max) +} + +// optional int32 azimuth_ave = 10; +inline bool ConnectionsLog_UwbRangingProcess::_internal_has_azimuth_ave() const { + bool value = (_has_bits_[0] & 0x00000100u) != 0; + return value; +} +inline bool ConnectionsLog_UwbRangingProcess::has_azimuth_ave() const { + return _internal_has_azimuth_ave(); +} +inline void ConnectionsLog_UwbRangingProcess::clear_azimuth_ave() { + azimuth_ave_ = 0; + _has_bits_[0] &= ~0x00000100u; +} +inline int32_t ConnectionsLog_UwbRangingProcess::_internal_azimuth_ave() const { + return azimuth_ave_; +} +inline int32_t ConnectionsLog_UwbRangingProcess::azimuth_ave() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.UwbRangingProcess.azimuth_ave) + return _internal_azimuth_ave(); +} +inline void ConnectionsLog_UwbRangingProcess::_internal_set_azimuth_ave(int32_t value) { + _has_bits_[0] |= 0x00000100u; + azimuth_ave_ = value; +} +inline void ConnectionsLog_UwbRangingProcess::set_azimuth_ave(int32_t value) { + _internal_set_azimuth_ave(value); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.UwbRangingProcess.azimuth_ave) +} + +// optional int32 azimuth_variance = 11; +inline bool ConnectionsLog_UwbRangingProcess::_internal_has_azimuth_variance() const { + bool value = (_has_bits_[0] & 0x00000200u) != 0; + return value; +} +inline bool ConnectionsLog_UwbRangingProcess::has_azimuth_variance() const { + return _internal_has_azimuth_variance(); +} +inline void ConnectionsLog_UwbRangingProcess::clear_azimuth_variance() { + azimuth_variance_ = 0; + _has_bits_[0] &= ~0x00000200u; +} +inline int32_t ConnectionsLog_UwbRangingProcess::_internal_azimuth_variance() const { + return azimuth_variance_; +} +inline int32_t ConnectionsLog_UwbRangingProcess::azimuth_variance() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.UwbRangingProcess.azimuth_variance) + return _internal_azimuth_variance(); +} +inline void ConnectionsLog_UwbRangingProcess::_internal_set_azimuth_variance(int32_t value) { + _has_bits_[0] |= 0x00000200u; + azimuth_variance_ = value; +} +inline void ConnectionsLog_UwbRangingProcess::set_azimuth_variance(int32_t value) { + _internal_set_azimuth_variance(value); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.UwbRangingProcess.azimuth_variance) +} + +// ------------------------------------------------------------------- + +// ConnectionsLog_RawUwbRangingEvent + +// optional int32 distance = 1; +inline bool ConnectionsLog_RawUwbRangingEvent::_internal_has_distance() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool ConnectionsLog_RawUwbRangingEvent::has_distance() const { + return _internal_has_distance(); +} +inline void ConnectionsLog_RawUwbRangingEvent::clear_distance() { + distance_ = 0; + _has_bits_[0] &= ~0x00000001u; +} +inline int32_t ConnectionsLog_RawUwbRangingEvent::_internal_distance() const { + return distance_; +} +inline int32_t ConnectionsLog_RawUwbRangingEvent::distance() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.RawUwbRangingEvent.distance) + return _internal_distance(); +} +inline void ConnectionsLog_RawUwbRangingEvent::_internal_set_distance(int32_t value) { + _has_bits_[0] |= 0x00000001u; + distance_ = value; +} +inline void ConnectionsLog_RawUwbRangingEvent::set_distance(int32_t value) { + _internal_set_distance(value); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.RawUwbRangingEvent.distance) +} + +// optional int32 azimuth_angle = 2; +inline bool ConnectionsLog_RawUwbRangingEvent::_internal_has_azimuth_angle() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool ConnectionsLog_RawUwbRangingEvent::has_azimuth_angle() const { + return _internal_has_azimuth_angle(); +} +inline void ConnectionsLog_RawUwbRangingEvent::clear_azimuth_angle() { + azimuth_angle_ = 0; + _has_bits_[0] &= ~0x00000002u; +} +inline int32_t ConnectionsLog_RawUwbRangingEvent::_internal_azimuth_angle() const { + return azimuth_angle_; +} +inline int32_t ConnectionsLog_RawUwbRangingEvent::azimuth_angle() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.RawUwbRangingEvent.azimuth_angle) + return _internal_azimuth_angle(); +} +inline void ConnectionsLog_RawUwbRangingEvent::_internal_set_azimuth_angle(int32_t value) { + _has_bits_[0] |= 0x00000002u; + azimuth_angle_ = value; +} +inline void ConnectionsLog_RawUwbRangingEvent::set_azimuth_angle(int32_t value) { + _internal_set_azimuth_angle(value); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.RawUwbRangingEvent.azimuth_angle) +} + +// optional int32 polar_angle = 3; +inline bool ConnectionsLog_RawUwbRangingEvent::_internal_has_polar_angle() const { + bool value = (_has_bits_[0] & 0x00000004u) != 0; + return value; +} +inline bool ConnectionsLog_RawUwbRangingEvent::has_polar_angle() const { + return _internal_has_polar_angle(); +} +inline void ConnectionsLog_RawUwbRangingEvent::clear_polar_angle() { + polar_angle_ = 0; + _has_bits_[0] &= ~0x00000004u; +} +inline int32_t ConnectionsLog_RawUwbRangingEvent::_internal_polar_angle() const { + return polar_angle_; +} +inline int32_t ConnectionsLog_RawUwbRangingEvent::polar_angle() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.RawUwbRangingEvent.polar_angle) + return _internal_polar_angle(); +} +inline void ConnectionsLog_RawUwbRangingEvent::_internal_set_polar_angle(int32_t value) { + _has_bits_[0] |= 0x00000004u; + polar_angle_ = value; +} +inline void ConnectionsLog_RawUwbRangingEvent::set_polar_angle(int32_t value) { + _internal_set_polar_angle(value); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.RawUwbRangingEvent.polar_angle) +} + +// ------------------------------------------------------------------- + +// ConnectionsLog_AdvertisingPhase + +// optional int64 duration_millis = 1; +inline bool ConnectionsLog_AdvertisingPhase::_internal_has_duration_millis() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool ConnectionsLog_AdvertisingPhase::has_duration_millis() const { + return _internal_has_duration_millis(); +} +inline void ConnectionsLog_AdvertisingPhase::clear_duration_millis() { + duration_millis_ = int64_t{0}; + _has_bits_[0] &= ~0x00000002u; +} +inline int64_t ConnectionsLog_AdvertisingPhase::_internal_duration_millis() const { + return duration_millis_; +} +inline int64_t ConnectionsLog_AdvertisingPhase::duration_millis() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.AdvertisingPhase.duration_millis) + return _internal_duration_millis(); +} +inline void ConnectionsLog_AdvertisingPhase::_internal_set_duration_millis(int64_t value) { + _has_bits_[0] |= 0x00000002u; + duration_millis_ = value; +} +inline void ConnectionsLog_AdvertisingPhase::set_duration_millis(int64_t value) { + _internal_set_duration_millis(value); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.AdvertisingPhase.duration_millis) +} + +// repeated .location.nearby.proto.connections.Medium medium = 2; +inline int ConnectionsLog_AdvertisingPhase::_internal_medium_size() const { + return medium_.size(); +} +inline int ConnectionsLog_AdvertisingPhase::medium_size() const { + return _internal_medium_size(); +} +inline void ConnectionsLog_AdvertisingPhase::clear_medium() { + medium_.Clear(); +} +inline ::location::nearby::proto::connections::Medium ConnectionsLog_AdvertisingPhase::_internal_medium(int index) const { + return static_cast< ::location::nearby::proto::connections::Medium >(medium_.Get(index)); +} +inline ::location::nearby::proto::connections::Medium ConnectionsLog_AdvertisingPhase::medium(int index) const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.AdvertisingPhase.medium) + return _internal_medium(index); +} +inline void ConnectionsLog_AdvertisingPhase::set_medium(int index, ::location::nearby::proto::connections::Medium value) { + assert(::location::nearby::proto::connections::Medium_IsValid(value)); + medium_.Set(index, value); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.AdvertisingPhase.medium) +} +inline void ConnectionsLog_AdvertisingPhase::_internal_add_medium(::location::nearby::proto::connections::Medium value) { + assert(::location::nearby::proto::connections::Medium_IsValid(value)); + medium_.Add(value); +} +inline void ConnectionsLog_AdvertisingPhase::add_medium(::location::nearby::proto::connections::Medium value) { + _internal_add_medium(value); + // @@protoc_insertion_point(field_add:location.nearby.analytics.proto.ConnectionsLog.AdvertisingPhase.medium) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField& +ConnectionsLog_AdvertisingPhase::medium() const { + // @@protoc_insertion_point(field_list:location.nearby.analytics.proto.ConnectionsLog.AdvertisingPhase.medium) + return medium_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField* +ConnectionsLog_AdvertisingPhase::_internal_mutable_medium() { + return &medium_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField* +ConnectionsLog_AdvertisingPhase::mutable_medium() { + // @@protoc_insertion_point(field_mutable_list:location.nearby.analytics.proto.ConnectionsLog.AdvertisingPhase.medium) + return _internal_mutable_medium(); +} + +// repeated .location.nearby.analytics.proto.ConnectionsLog.ConnectionRequest received_connection_request = 3; +inline int ConnectionsLog_AdvertisingPhase::_internal_received_connection_request_size() const { + return received_connection_request_.size(); +} +inline int ConnectionsLog_AdvertisingPhase::received_connection_request_size() const { + return _internal_received_connection_request_size(); +} +inline void ConnectionsLog_AdvertisingPhase::clear_received_connection_request() { + received_connection_request_.Clear(); +} +inline ::location::nearby::analytics::proto::ConnectionsLog_ConnectionRequest* ConnectionsLog_AdvertisingPhase::mutable_received_connection_request(int index) { + // @@protoc_insertion_point(field_mutable:location.nearby.analytics.proto.ConnectionsLog.AdvertisingPhase.received_connection_request) + return received_connection_request_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::location::nearby::analytics::proto::ConnectionsLog_ConnectionRequest >* +ConnectionsLog_AdvertisingPhase::mutable_received_connection_request() { + // @@protoc_insertion_point(field_mutable_list:location.nearby.analytics.proto.ConnectionsLog.AdvertisingPhase.received_connection_request) + return &received_connection_request_; +} +inline const ::location::nearby::analytics::proto::ConnectionsLog_ConnectionRequest& ConnectionsLog_AdvertisingPhase::_internal_received_connection_request(int index) const { + return received_connection_request_.Get(index); +} +inline const ::location::nearby::analytics::proto::ConnectionsLog_ConnectionRequest& ConnectionsLog_AdvertisingPhase::received_connection_request(int index) const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.AdvertisingPhase.received_connection_request) + return _internal_received_connection_request(index); +} +inline ::location::nearby::analytics::proto::ConnectionsLog_ConnectionRequest* ConnectionsLog_AdvertisingPhase::_internal_add_received_connection_request() { + return received_connection_request_.Add(); +} +inline ::location::nearby::analytics::proto::ConnectionsLog_ConnectionRequest* ConnectionsLog_AdvertisingPhase::add_received_connection_request() { + ::location::nearby::analytics::proto::ConnectionsLog_ConnectionRequest* _add = _internal_add_received_connection_request(); + // @@protoc_insertion_point(field_add:location.nearby.analytics.proto.ConnectionsLog.AdvertisingPhase.received_connection_request) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::location::nearby::analytics::proto::ConnectionsLog_ConnectionRequest >& +ConnectionsLog_AdvertisingPhase::received_connection_request() const { + // @@protoc_insertion_point(field_list:location.nearby.analytics.proto.ConnectionsLog.AdvertisingPhase.received_connection_request) + return received_connection_request_; +} + +// optional int64 client_flow_id = 4; +inline bool ConnectionsLog_AdvertisingPhase::_internal_has_client_flow_id() const { + bool value = (_has_bits_[0] & 0x00000004u) != 0; + return value; +} +inline bool ConnectionsLog_AdvertisingPhase::has_client_flow_id() const { + return _internal_has_client_flow_id(); +} +inline void ConnectionsLog_AdvertisingPhase::clear_client_flow_id() { + client_flow_id_ = int64_t{0}; + _has_bits_[0] &= ~0x00000004u; +} +inline int64_t ConnectionsLog_AdvertisingPhase::_internal_client_flow_id() const { + return client_flow_id_; +} +inline int64_t ConnectionsLog_AdvertisingPhase::client_flow_id() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.AdvertisingPhase.client_flow_id) + return _internal_client_flow_id(); +} +inline void ConnectionsLog_AdvertisingPhase::_internal_set_client_flow_id(int64_t value) { + _has_bits_[0] |= 0x00000004u; + client_flow_id_ = value; +} +inline void ConnectionsLog_AdvertisingPhase::set_client_flow_id(int64_t value) { + _internal_set_client_flow_id(value); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.AdvertisingPhase.client_flow_id) +} + +// optional .location.nearby.analytics.proto.ConnectionsLog.AdvertisingMetadata advertising_metadata = 5; +inline bool ConnectionsLog_AdvertisingPhase::_internal_has_advertising_metadata() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + PROTOBUF_ASSUME(!value || advertising_metadata_ != nullptr); + return value; +} +inline bool ConnectionsLog_AdvertisingPhase::has_advertising_metadata() const { + return _internal_has_advertising_metadata(); +} +inline void ConnectionsLog_AdvertisingPhase::clear_advertising_metadata() { + if (advertising_metadata_ != nullptr) advertising_metadata_->Clear(); + _has_bits_[0] &= ~0x00000001u; +} +inline const ::location::nearby::analytics::proto::ConnectionsLog_AdvertisingMetadata& ConnectionsLog_AdvertisingPhase::_internal_advertising_metadata() const { + const ::location::nearby::analytics::proto::ConnectionsLog_AdvertisingMetadata* p = advertising_metadata_; + return p != nullptr ? *p : reinterpret_cast( + ::location::nearby::analytics::proto::_ConnectionsLog_AdvertisingMetadata_default_instance_); +} +inline const ::location::nearby::analytics::proto::ConnectionsLog_AdvertisingMetadata& ConnectionsLog_AdvertisingPhase::advertising_metadata() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.AdvertisingPhase.advertising_metadata) + return _internal_advertising_metadata(); +} +inline void ConnectionsLog_AdvertisingPhase::unsafe_arena_set_allocated_advertising_metadata( + ::location::nearby::analytics::proto::ConnectionsLog_AdvertisingMetadata* advertising_metadata) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(advertising_metadata_); + } + advertising_metadata_ = advertising_metadata; + if (advertising_metadata) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:location.nearby.analytics.proto.ConnectionsLog.AdvertisingPhase.advertising_metadata) +} +inline ::location::nearby::analytics::proto::ConnectionsLog_AdvertisingMetadata* ConnectionsLog_AdvertisingPhase::release_advertising_metadata() { + _has_bits_[0] &= ~0x00000001u; + ::location::nearby::analytics::proto::ConnectionsLog_AdvertisingMetadata* temp = advertising_metadata_; + advertising_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 ::location::nearby::analytics::proto::ConnectionsLog_AdvertisingMetadata* ConnectionsLog_AdvertisingPhase::unsafe_arena_release_advertising_metadata() { + // @@protoc_insertion_point(field_release:location.nearby.analytics.proto.ConnectionsLog.AdvertisingPhase.advertising_metadata) + _has_bits_[0] &= ~0x00000001u; + ::location::nearby::analytics::proto::ConnectionsLog_AdvertisingMetadata* temp = advertising_metadata_; + advertising_metadata_ = nullptr; + return temp; +} +inline ::location::nearby::analytics::proto::ConnectionsLog_AdvertisingMetadata* ConnectionsLog_AdvertisingPhase::_internal_mutable_advertising_metadata() { + _has_bits_[0] |= 0x00000001u; + if (advertising_metadata_ == nullptr) { + auto* p = CreateMaybeMessage<::location::nearby::analytics::proto::ConnectionsLog_AdvertisingMetadata>(GetArenaForAllocation()); + advertising_metadata_ = p; + } + return advertising_metadata_; +} +inline ::location::nearby::analytics::proto::ConnectionsLog_AdvertisingMetadata* ConnectionsLog_AdvertisingPhase::mutable_advertising_metadata() { + ::location::nearby::analytics::proto::ConnectionsLog_AdvertisingMetadata* _msg = _internal_mutable_advertising_metadata(); + // @@protoc_insertion_point(field_mutable:location.nearby.analytics.proto.ConnectionsLog.AdvertisingPhase.advertising_metadata) + return _msg; +} +inline void ConnectionsLog_AdvertisingPhase::set_allocated_advertising_metadata(::location::nearby::analytics::proto::ConnectionsLog_AdvertisingMetadata* advertising_metadata) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete advertising_metadata_; + } + if (advertising_metadata) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::location::nearby::analytics::proto::ConnectionsLog_AdvertisingMetadata>::GetOwningArena(advertising_metadata); + if (message_arena != submessage_arena) { + advertising_metadata = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, advertising_metadata, submessage_arena); + } + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + advertising_metadata_ = advertising_metadata; + // @@protoc_insertion_point(field_set_allocated:location.nearby.analytics.proto.ConnectionsLog.AdvertisingPhase.advertising_metadata) +} + +// ------------------------------------------------------------------- + +// ConnectionsLog_ConnectionRequest + +// optional int64 duration_millis = 1; +inline bool ConnectionsLog_ConnectionRequest::_internal_has_duration_millis() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool ConnectionsLog_ConnectionRequest::has_duration_millis() const { + return _internal_has_duration_millis(); +} +inline void ConnectionsLog_ConnectionRequest::clear_duration_millis() { + duration_millis_ = int64_t{0}; + _has_bits_[0] &= ~0x00000001u; +} +inline int64_t ConnectionsLog_ConnectionRequest::_internal_duration_millis() const { + return duration_millis_; +} +inline int64_t ConnectionsLog_ConnectionRequest::duration_millis() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.ConnectionRequest.duration_millis) + return _internal_duration_millis(); +} +inline void ConnectionsLog_ConnectionRequest::_internal_set_duration_millis(int64_t value) { + _has_bits_[0] |= 0x00000001u; + duration_millis_ = value; +} +inline void ConnectionsLog_ConnectionRequest::set_duration_millis(int64_t value) { + _internal_set_duration_millis(value); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.ConnectionRequest.duration_millis) +} + +// optional int64 request_delay_millis = 2; +inline bool ConnectionsLog_ConnectionRequest::_internal_has_request_delay_millis() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool ConnectionsLog_ConnectionRequest::has_request_delay_millis() const { + return _internal_has_request_delay_millis(); +} +inline void ConnectionsLog_ConnectionRequest::clear_request_delay_millis() { + request_delay_millis_ = int64_t{0}; + _has_bits_[0] &= ~0x00000002u; +} +inline int64_t ConnectionsLog_ConnectionRequest::_internal_request_delay_millis() const { + return request_delay_millis_; +} +inline int64_t ConnectionsLog_ConnectionRequest::request_delay_millis() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.ConnectionRequest.request_delay_millis) + return _internal_request_delay_millis(); +} +inline void ConnectionsLog_ConnectionRequest::_internal_set_request_delay_millis(int64_t value) { + _has_bits_[0] |= 0x00000002u; + request_delay_millis_ = value; +} +inline void ConnectionsLog_ConnectionRequest::set_request_delay_millis(int64_t value) { + _internal_set_request_delay_millis(value); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.ConnectionRequest.request_delay_millis) +} + +// optional .location.nearby.proto.connections.ConnectionRequestResponse local_response = 3; +inline bool ConnectionsLog_ConnectionRequest::_internal_has_local_response() const { + bool value = (_has_bits_[0] & 0x00000004u) != 0; + return value; +} +inline bool ConnectionsLog_ConnectionRequest::has_local_response() const { + return _internal_has_local_response(); +} +inline void ConnectionsLog_ConnectionRequest::clear_local_response() { + local_response_ = 0; + _has_bits_[0] &= ~0x00000004u; +} +inline ::location::nearby::proto::connections::ConnectionRequestResponse ConnectionsLog_ConnectionRequest::_internal_local_response() const { + return static_cast< ::location::nearby::proto::connections::ConnectionRequestResponse >(local_response_); +} +inline ::location::nearby::proto::connections::ConnectionRequestResponse ConnectionsLog_ConnectionRequest::local_response() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.ConnectionRequest.local_response) + return _internal_local_response(); +} +inline void ConnectionsLog_ConnectionRequest::_internal_set_local_response(::location::nearby::proto::connections::ConnectionRequestResponse value) { + assert(::location::nearby::proto::connections::ConnectionRequestResponse_IsValid(value)); + _has_bits_[0] |= 0x00000004u; + local_response_ = value; +} +inline void ConnectionsLog_ConnectionRequest::set_local_response(::location::nearby::proto::connections::ConnectionRequestResponse value) { + _internal_set_local_response(value); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.ConnectionRequest.local_response) +} + +// optional .location.nearby.proto.connections.ConnectionRequestResponse remote_response = 4; +inline bool ConnectionsLog_ConnectionRequest::_internal_has_remote_response() const { + bool value = (_has_bits_[0] & 0x00000008u) != 0; + return value; +} +inline bool ConnectionsLog_ConnectionRequest::has_remote_response() const { + return _internal_has_remote_response(); +} +inline void ConnectionsLog_ConnectionRequest::clear_remote_response() { + remote_response_ = 0; + _has_bits_[0] &= ~0x00000008u; +} +inline ::location::nearby::proto::connections::ConnectionRequestResponse ConnectionsLog_ConnectionRequest::_internal_remote_response() const { + return static_cast< ::location::nearby::proto::connections::ConnectionRequestResponse >(remote_response_); +} +inline ::location::nearby::proto::connections::ConnectionRequestResponse ConnectionsLog_ConnectionRequest::remote_response() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.ConnectionRequest.remote_response) + return _internal_remote_response(); +} +inline void ConnectionsLog_ConnectionRequest::_internal_set_remote_response(::location::nearby::proto::connections::ConnectionRequestResponse value) { + assert(::location::nearby::proto::connections::ConnectionRequestResponse_IsValid(value)); + _has_bits_[0] |= 0x00000008u; + remote_response_ = value; +} +inline void ConnectionsLog_ConnectionRequest::set_remote_response(::location::nearby::proto::connections::ConnectionRequestResponse value) { + _internal_set_remote_response(value); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.ConnectionRequest.remote_response) +} + +// optional int64 client_flow_id = 5; +inline bool ConnectionsLog_ConnectionRequest::_internal_has_client_flow_id() const { + bool value = (_has_bits_[0] & 0x00000010u) != 0; + return value; +} +inline bool ConnectionsLog_ConnectionRequest::has_client_flow_id() const { + return _internal_has_client_flow_id(); +} +inline void ConnectionsLog_ConnectionRequest::clear_client_flow_id() { + client_flow_id_ = int64_t{0}; + _has_bits_[0] &= ~0x00000010u; +} +inline int64_t ConnectionsLog_ConnectionRequest::_internal_client_flow_id() const { + return client_flow_id_; +} +inline int64_t ConnectionsLog_ConnectionRequest::client_flow_id() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.ConnectionRequest.client_flow_id) + return _internal_client_flow_id(); +} +inline void ConnectionsLog_ConnectionRequest::_internal_set_client_flow_id(int64_t value) { + _has_bits_[0] |= 0x00000010u; + client_flow_id_ = value; +} +inline void ConnectionsLog_ConnectionRequest::set_client_flow_id(int64_t value) { + _internal_set_client_flow_id(value); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.ConnectionRequest.client_flow_id) +} + +// ------------------------------------------------------------------- + +// ConnectionsLog_ConnectionAttempt + +// optional int64 duration_millis = 1; +inline bool ConnectionsLog_ConnectionAttempt::_internal_has_duration_millis() const { + bool value = (_has_bits_[0] & 0x00000004u) != 0; + return value; +} +inline bool ConnectionsLog_ConnectionAttempt::has_duration_millis() const { + return _internal_has_duration_millis(); +} +inline void ConnectionsLog_ConnectionAttempt::clear_duration_millis() { + duration_millis_ = int64_t{0}; + _has_bits_[0] &= ~0x00000004u; +} +inline int64_t ConnectionsLog_ConnectionAttempt::_internal_duration_millis() const { + return duration_millis_; +} +inline int64_t ConnectionsLog_ConnectionAttempt::duration_millis() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.ConnectionAttempt.duration_millis) + return _internal_duration_millis(); +} +inline void ConnectionsLog_ConnectionAttempt::_internal_set_duration_millis(int64_t value) { + _has_bits_[0] |= 0x00000004u; + duration_millis_ = value; +} +inline void ConnectionsLog_ConnectionAttempt::set_duration_millis(int64_t value) { + _internal_set_duration_millis(value); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.ConnectionAttempt.duration_millis) +} + +// optional .location.nearby.proto.connections.ConnectionAttemptType type = 2; +inline bool ConnectionsLog_ConnectionAttempt::_internal_has_type() const { + bool value = (_has_bits_[0] & 0x00000008u) != 0; + return value; +} +inline bool ConnectionsLog_ConnectionAttempt::has_type() const { + return _internal_has_type(); +} +inline void ConnectionsLog_ConnectionAttempt::clear_type() { + type_ = 0; + _has_bits_[0] &= ~0x00000008u; +} +inline ::location::nearby::proto::connections::ConnectionAttemptType ConnectionsLog_ConnectionAttempt::_internal_type() const { + return static_cast< ::location::nearby::proto::connections::ConnectionAttemptType >(type_); +} +inline ::location::nearby::proto::connections::ConnectionAttemptType ConnectionsLog_ConnectionAttempt::type() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.ConnectionAttempt.type) + return _internal_type(); +} +inline void ConnectionsLog_ConnectionAttempt::_internal_set_type(::location::nearby::proto::connections::ConnectionAttemptType value) { + assert(::location::nearby::proto::connections::ConnectionAttemptType_IsValid(value)); + _has_bits_[0] |= 0x00000008u; + type_ = value; +} +inline void ConnectionsLog_ConnectionAttempt::set_type(::location::nearby::proto::connections::ConnectionAttemptType value) { + _internal_set_type(value); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.ConnectionAttempt.type) +} + +// optional .location.nearby.proto.connections.ConnectionAttemptDirection direction = 3; +inline bool ConnectionsLog_ConnectionAttempt::_internal_has_direction() const { + bool value = (_has_bits_[0] & 0x00000010u) != 0; + return value; +} +inline bool ConnectionsLog_ConnectionAttempt::has_direction() const { + return _internal_has_direction(); +} +inline void ConnectionsLog_ConnectionAttempt::clear_direction() { + direction_ = 0; + _has_bits_[0] &= ~0x00000010u; +} +inline ::location::nearby::proto::connections::ConnectionAttemptDirection ConnectionsLog_ConnectionAttempt::_internal_direction() const { + return static_cast< ::location::nearby::proto::connections::ConnectionAttemptDirection >(direction_); +} +inline ::location::nearby::proto::connections::ConnectionAttemptDirection ConnectionsLog_ConnectionAttempt::direction() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.ConnectionAttempt.direction) + return _internal_direction(); +} +inline void ConnectionsLog_ConnectionAttempt::_internal_set_direction(::location::nearby::proto::connections::ConnectionAttemptDirection value) { + assert(::location::nearby::proto::connections::ConnectionAttemptDirection_IsValid(value)); + _has_bits_[0] |= 0x00000010u; + direction_ = value; +} +inline void ConnectionsLog_ConnectionAttempt::set_direction(::location::nearby::proto::connections::ConnectionAttemptDirection value) { + _internal_set_direction(value); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.ConnectionAttempt.direction) +} + +// optional .location.nearby.proto.connections.Medium medium = 4; +inline bool ConnectionsLog_ConnectionAttempt::_internal_has_medium() const { + bool value = (_has_bits_[0] & 0x00000020u) != 0; + return value; +} +inline bool ConnectionsLog_ConnectionAttempt::has_medium() const { + return _internal_has_medium(); +} +inline void ConnectionsLog_ConnectionAttempt::clear_medium() { + medium_ = 0; + _has_bits_[0] &= ~0x00000020u; +} +inline ::location::nearby::proto::connections::Medium ConnectionsLog_ConnectionAttempt::_internal_medium() const { + return static_cast< ::location::nearby::proto::connections::Medium >(medium_); +} +inline ::location::nearby::proto::connections::Medium ConnectionsLog_ConnectionAttempt::medium() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.ConnectionAttempt.medium) + return _internal_medium(); +} +inline void ConnectionsLog_ConnectionAttempt::_internal_set_medium(::location::nearby::proto::connections::Medium value) { + assert(::location::nearby::proto::connections::Medium_IsValid(value)); + _has_bits_[0] |= 0x00000020u; + medium_ = value; +} +inline void ConnectionsLog_ConnectionAttempt::set_medium(::location::nearby::proto::connections::Medium value) { + _internal_set_medium(value); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.ConnectionAttempt.medium) +} + +// optional .location.nearby.proto.connections.ConnectionAttemptResult attempt_result = 5; +inline bool ConnectionsLog_ConnectionAttempt::_internal_has_attempt_result() const { + bool value = (_has_bits_[0] & 0x00000040u) != 0; + return value; +} +inline bool ConnectionsLog_ConnectionAttempt::has_attempt_result() const { + return _internal_has_attempt_result(); +} +inline void ConnectionsLog_ConnectionAttempt::clear_attempt_result() { + attempt_result_ = 0; + _has_bits_[0] &= ~0x00000040u; +} +inline ::location::nearby::proto::connections::ConnectionAttemptResult ConnectionsLog_ConnectionAttempt::_internal_attempt_result() const { + return static_cast< ::location::nearby::proto::connections::ConnectionAttemptResult >(attempt_result_); +} +inline ::location::nearby::proto::connections::ConnectionAttemptResult ConnectionsLog_ConnectionAttempt::attempt_result() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.ConnectionAttempt.attempt_result) + return _internal_attempt_result(); +} +inline void ConnectionsLog_ConnectionAttempt::_internal_set_attempt_result(::location::nearby::proto::connections::ConnectionAttemptResult value) { + assert(::location::nearby::proto::connections::ConnectionAttemptResult_IsValid(value)); + _has_bits_[0] |= 0x00000040u; + attempt_result_ = value; +} +inline void ConnectionsLog_ConnectionAttempt::set_attempt_result(::location::nearby::proto::connections::ConnectionAttemptResult value) { + _internal_set_attempt_result(value); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.ConnectionAttempt.attempt_result) +} + +// optional int64 client_flow_id = 6; +inline bool ConnectionsLog_ConnectionAttempt::_internal_has_client_flow_id() const { + bool value = (_has_bits_[0] & 0x00000080u) != 0; + return value; +} +inline bool ConnectionsLog_ConnectionAttempt::has_client_flow_id() const { + return _internal_has_client_flow_id(); +} +inline void ConnectionsLog_ConnectionAttempt::clear_client_flow_id() { + client_flow_id_ = int64_t{0}; + _has_bits_[0] &= ~0x00000080u; +} +inline int64_t ConnectionsLog_ConnectionAttempt::_internal_client_flow_id() const { + return client_flow_id_; +} +inline int64_t ConnectionsLog_ConnectionAttempt::client_flow_id() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.ConnectionAttempt.client_flow_id) + return _internal_client_flow_id(); +} +inline void ConnectionsLog_ConnectionAttempt::_internal_set_client_flow_id(int64_t value) { + _has_bits_[0] |= 0x00000080u; + client_flow_id_ = value; +} +inline void ConnectionsLog_ConnectionAttempt::set_client_flow_id(int64_t value) { + _internal_set_client_flow_id(value); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.ConnectionAttempt.client_flow_id) +} + +// optional string connection_token = 7; +inline bool ConnectionsLog_ConnectionAttempt::_internal_has_connection_token() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool ConnectionsLog_ConnectionAttempt::has_connection_token() const { + return _internal_has_connection_token(); +} +inline void ConnectionsLog_ConnectionAttempt::clear_connection_token() { + connection_token_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& ConnectionsLog_ConnectionAttempt::connection_token() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.ConnectionAttempt.connection_token) + return _internal_connection_token(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void ConnectionsLog_ConnectionAttempt::set_connection_token(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + connection_token_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.ConnectionAttempt.connection_token) +} +inline std::string* ConnectionsLog_ConnectionAttempt::mutable_connection_token() { + std::string* _s = _internal_mutable_connection_token(); + // @@protoc_insertion_point(field_mutable:location.nearby.analytics.proto.ConnectionsLog.ConnectionAttempt.connection_token) + return _s; +} +inline const std::string& ConnectionsLog_ConnectionAttempt::_internal_connection_token() const { + return connection_token_.Get(); +} +inline void ConnectionsLog_ConnectionAttempt::_internal_set_connection_token(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + connection_token_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* ConnectionsLog_ConnectionAttempt::_internal_mutable_connection_token() { + _has_bits_[0] |= 0x00000001u; + return connection_token_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* ConnectionsLog_ConnectionAttempt::release_connection_token() { + // @@protoc_insertion_point(field_release:location.nearby.analytics.proto.ConnectionsLog.ConnectionAttempt.connection_token) + if (!_internal_has_connection_token()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = connection_token_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (connection_token_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + connection_token_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void ConnectionsLog_ConnectionAttempt::set_allocated_connection_token(std::string* connection_token) { + if (connection_token != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + connection_token_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), connection_token, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (connection_token_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + connection_token_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:location.nearby.analytics.proto.ConnectionsLog.ConnectionAttempt.connection_token) +} + +// optional .location.nearby.analytics.proto.ConnectionsLog.ConnectionAttemptMetadata connection_attempt_metadata = 8; +inline bool ConnectionsLog_ConnectionAttempt::_internal_has_connection_attempt_metadata() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + PROTOBUF_ASSUME(!value || connection_attempt_metadata_ != nullptr); + return value; +} +inline bool ConnectionsLog_ConnectionAttempt::has_connection_attempt_metadata() const { + return _internal_has_connection_attempt_metadata(); +} +inline void ConnectionsLog_ConnectionAttempt::clear_connection_attempt_metadata() { + if (connection_attempt_metadata_ != nullptr) connection_attempt_metadata_->Clear(); + _has_bits_[0] &= ~0x00000002u; +} +inline const ::location::nearby::analytics::proto::ConnectionsLog_ConnectionAttemptMetadata& ConnectionsLog_ConnectionAttempt::_internal_connection_attempt_metadata() const { + const ::location::nearby::analytics::proto::ConnectionsLog_ConnectionAttemptMetadata* p = connection_attempt_metadata_; + return p != nullptr ? *p : reinterpret_cast( + ::location::nearby::analytics::proto::_ConnectionsLog_ConnectionAttemptMetadata_default_instance_); +} +inline const ::location::nearby::analytics::proto::ConnectionsLog_ConnectionAttemptMetadata& ConnectionsLog_ConnectionAttempt::connection_attempt_metadata() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.ConnectionAttempt.connection_attempt_metadata) + return _internal_connection_attempt_metadata(); +} +inline void ConnectionsLog_ConnectionAttempt::unsafe_arena_set_allocated_connection_attempt_metadata( + ::location::nearby::analytics::proto::ConnectionsLog_ConnectionAttemptMetadata* connection_attempt_metadata) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(connection_attempt_metadata_); + } + connection_attempt_metadata_ = connection_attempt_metadata; + if (connection_attempt_metadata) { + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:location.nearby.analytics.proto.ConnectionsLog.ConnectionAttempt.connection_attempt_metadata) +} +inline ::location::nearby::analytics::proto::ConnectionsLog_ConnectionAttemptMetadata* ConnectionsLog_ConnectionAttempt::release_connection_attempt_metadata() { + _has_bits_[0] &= ~0x00000002u; + ::location::nearby::analytics::proto::ConnectionsLog_ConnectionAttemptMetadata* temp = connection_attempt_metadata_; + connection_attempt_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 ::location::nearby::analytics::proto::ConnectionsLog_ConnectionAttemptMetadata* ConnectionsLog_ConnectionAttempt::unsafe_arena_release_connection_attempt_metadata() { + // @@protoc_insertion_point(field_release:location.nearby.analytics.proto.ConnectionsLog.ConnectionAttempt.connection_attempt_metadata) + _has_bits_[0] &= ~0x00000002u; + ::location::nearby::analytics::proto::ConnectionsLog_ConnectionAttemptMetadata* temp = connection_attempt_metadata_; + connection_attempt_metadata_ = nullptr; + return temp; +} +inline ::location::nearby::analytics::proto::ConnectionsLog_ConnectionAttemptMetadata* ConnectionsLog_ConnectionAttempt::_internal_mutable_connection_attempt_metadata() { + _has_bits_[0] |= 0x00000002u; + if (connection_attempt_metadata_ == nullptr) { + auto* p = CreateMaybeMessage<::location::nearby::analytics::proto::ConnectionsLog_ConnectionAttemptMetadata>(GetArenaForAllocation()); + connection_attempt_metadata_ = p; + } + return connection_attempt_metadata_; +} +inline ::location::nearby::analytics::proto::ConnectionsLog_ConnectionAttemptMetadata* ConnectionsLog_ConnectionAttempt::mutable_connection_attempt_metadata() { + ::location::nearby::analytics::proto::ConnectionsLog_ConnectionAttemptMetadata* _msg = _internal_mutable_connection_attempt_metadata(); + // @@protoc_insertion_point(field_mutable:location.nearby.analytics.proto.ConnectionsLog.ConnectionAttempt.connection_attempt_metadata) + return _msg; +} +inline void ConnectionsLog_ConnectionAttempt::set_allocated_connection_attempt_metadata(::location::nearby::analytics::proto::ConnectionsLog_ConnectionAttemptMetadata* connection_attempt_metadata) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete connection_attempt_metadata_; + } + if (connection_attempt_metadata) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::location::nearby::analytics::proto::ConnectionsLog_ConnectionAttemptMetadata>::GetOwningArena(connection_attempt_metadata); + if (message_arena != submessage_arena) { + connection_attempt_metadata = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, connection_attempt_metadata, submessage_arena); + } + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + connection_attempt_metadata_ = connection_attempt_metadata; + // @@protoc_insertion_point(field_set_allocated:location.nearby.analytics.proto.ConnectionsLog.ConnectionAttempt.connection_attempt_metadata) +} + +// ------------------------------------------------------------------- + +// ConnectionsLog_EstablishedConnection + +// optional int64 duration_millis = 1; +inline bool ConnectionsLog_EstablishedConnection::_internal_has_duration_millis() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool ConnectionsLog_EstablishedConnection::has_duration_millis() const { + return _internal_has_duration_millis(); +} +inline void ConnectionsLog_EstablishedConnection::clear_duration_millis() { + duration_millis_ = int64_t{0}; + _has_bits_[0] &= ~0x00000002u; +} +inline int64_t ConnectionsLog_EstablishedConnection::_internal_duration_millis() const { + return duration_millis_; +} +inline int64_t ConnectionsLog_EstablishedConnection::duration_millis() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.EstablishedConnection.duration_millis) + return _internal_duration_millis(); +} +inline void ConnectionsLog_EstablishedConnection::_internal_set_duration_millis(int64_t value) { + _has_bits_[0] |= 0x00000002u; + duration_millis_ = value; +} +inline void ConnectionsLog_EstablishedConnection::set_duration_millis(int64_t value) { + _internal_set_duration_millis(value); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.EstablishedConnection.duration_millis) +} + +// optional .location.nearby.proto.connections.Medium medium = 2; +inline bool ConnectionsLog_EstablishedConnection::_internal_has_medium() const { + bool value = (_has_bits_[0] & 0x00000004u) != 0; + return value; +} +inline bool ConnectionsLog_EstablishedConnection::has_medium() const { + return _internal_has_medium(); +} +inline void ConnectionsLog_EstablishedConnection::clear_medium() { + medium_ = 0; + _has_bits_[0] &= ~0x00000004u; +} +inline ::location::nearby::proto::connections::Medium ConnectionsLog_EstablishedConnection::_internal_medium() const { + return static_cast< ::location::nearby::proto::connections::Medium >(medium_); +} +inline ::location::nearby::proto::connections::Medium ConnectionsLog_EstablishedConnection::medium() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.EstablishedConnection.medium) + return _internal_medium(); +} +inline void ConnectionsLog_EstablishedConnection::_internal_set_medium(::location::nearby::proto::connections::Medium value) { + assert(::location::nearby::proto::connections::Medium_IsValid(value)); + _has_bits_[0] |= 0x00000004u; + medium_ = value; +} +inline void ConnectionsLog_EstablishedConnection::set_medium(::location::nearby::proto::connections::Medium value) { + _internal_set_medium(value); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.EstablishedConnection.medium) +} + +// repeated .location.nearby.analytics.proto.ConnectionsLog.Payload sent_payload = 3; +inline int ConnectionsLog_EstablishedConnection::_internal_sent_payload_size() const { + return sent_payload_.size(); +} +inline int ConnectionsLog_EstablishedConnection::sent_payload_size() const { + return _internal_sent_payload_size(); +} +inline void ConnectionsLog_EstablishedConnection::clear_sent_payload() { + sent_payload_.Clear(); +} +inline ::location::nearby::analytics::proto::ConnectionsLog_Payload* ConnectionsLog_EstablishedConnection::mutable_sent_payload(int index) { + // @@protoc_insertion_point(field_mutable:location.nearby.analytics.proto.ConnectionsLog.EstablishedConnection.sent_payload) + return sent_payload_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::location::nearby::analytics::proto::ConnectionsLog_Payload >* +ConnectionsLog_EstablishedConnection::mutable_sent_payload() { + // @@protoc_insertion_point(field_mutable_list:location.nearby.analytics.proto.ConnectionsLog.EstablishedConnection.sent_payload) + return &sent_payload_; +} +inline const ::location::nearby::analytics::proto::ConnectionsLog_Payload& ConnectionsLog_EstablishedConnection::_internal_sent_payload(int index) const { + return sent_payload_.Get(index); +} +inline const ::location::nearby::analytics::proto::ConnectionsLog_Payload& ConnectionsLog_EstablishedConnection::sent_payload(int index) const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.EstablishedConnection.sent_payload) + return _internal_sent_payload(index); +} +inline ::location::nearby::analytics::proto::ConnectionsLog_Payload* ConnectionsLog_EstablishedConnection::_internal_add_sent_payload() { + return sent_payload_.Add(); +} +inline ::location::nearby::analytics::proto::ConnectionsLog_Payload* ConnectionsLog_EstablishedConnection::add_sent_payload() { + ::location::nearby::analytics::proto::ConnectionsLog_Payload* _add = _internal_add_sent_payload(); + // @@protoc_insertion_point(field_add:location.nearby.analytics.proto.ConnectionsLog.EstablishedConnection.sent_payload) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::location::nearby::analytics::proto::ConnectionsLog_Payload >& +ConnectionsLog_EstablishedConnection::sent_payload() const { + // @@protoc_insertion_point(field_list:location.nearby.analytics.proto.ConnectionsLog.EstablishedConnection.sent_payload) + return sent_payload_; +} + +// repeated .location.nearby.analytics.proto.ConnectionsLog.Payload received_payload = 4; +inline int ConnectionsLog_EstablishedConnection::_internal_received_payload_size() const { + return received_payload_.size(); +} +inline int ConnectionsLog_EstablishedConnection::received_payload_size() const { + return _internal_received_payload_size(); +} +inline void ConnectionsLog_EstablishedConnection::clear_received_payload() { + received_payload_.Clear(); +} +inline ::location::nearby::analytics::proto::ConnectionsLog_Payload* ConnectionsLog_EstablishedConnection::mutable_received_payload(int index) { + // @@protoc_insertion_point(field_mutable:location.nearby.analytics.proto.ConnectionsLog.EstablishedConnection.received_payload) + return received_payload_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::location::nearby::analytics::proto::ConnectionsLog_Payload >* +ConnectionsLog_EstablishedConnection::mutable_received_payload() { + // @@protoc_insertion_point(field_mutable_list:location.nearby.analytics.proto.ConnectionsLog.EstablishedConnection.received_payload) + return &received_payload_; +} +inline const ::location::nearby::analytics::proto::ConnectionsLog_Payload& ConnectionsLog_EstablishedConnection::_internal_received_payload(int index) const { + return received_payload_.Get(index); +} +inline const ::location::nearby::analytics::proto::ConnectionsLog_Payload& ConnectionsLog_EstablishedConnection::received_payload(int index) const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.EstablishedConnection.received_payload) + return _internal_received_payload(index); +} +inline ::location::nearby::analytics::proto::ConnectionsLog_Payload* ConnectionsLog_EstablishedConnection::_internal_add_received_payload() { + return received_payload_.Add(); +} +inline ::location::nearby::analytics::proto::ConnectionsLog_Payload* ConnectionsLog_EstablishedConnection::add_received_payload() { + ::location::nearby::analytics::proto::ConnectionsLog_Payload* _add = _internal_add_received_payload(); + // @@protoc_insertion_point(field_add:location.nearby.analytics.proto.ConnectionsLog.EstablishedConnection.received_payload) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::location::nearby::analytics::proto::ConnectionsLog_Payload >& +ConnectionsLog_EstablishedConnection::received_payload() const { + // @@protoc_insertion_point(field_list:location.nearby.analytics.proto.ConnectionsLog.EstablishedConnection.received_payload) + return received_payload_; +} + +// optional .location.nearby.proto.connections.DisconnectionReason disconnection_reason = 5; +inline bool ConnectionsLog_EstablishedConnection::_internal_has_disconnection_reason() const { + bool value = (_has_bits_[0] & 0x00000008u) != 0; + return value; +} +inline bool ConnectionsLog_EstablishedConnection::has_disconnection_reason() const { + return _internal_has_disconnection_reason(); +} +inline void ConnectionsLog_EstablishedConnection::clear_disconnection_reason() { + disconnection_reason_ = 0; + _has_bits_[0] &= ~0x00000008u; +} +inline ::location::nearby::proto::connections::DisconnectionReason ConnectionsLog_EstablishedConnection::_internal_disconnection_reason() const { + return static_cast< ::location::nearby::proto::connections::DisconnectionReason >(disconnection_reason_); +} +inline ::location::nearby::proto::connections::DisconnectionReason ConnectionsLog_EstablishedConnection::disconnection_reason() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.EstablishedConnection.disconnection_reason) + return _internal_disconnection_reason(); +} +inline void ConnectionsLog_EstablishedConnection::_internal_set_disconnection_reason(::location::nearby::proto::connections::DisconnectionReason value) { + assert(::location::nearby::proto::connections::DisconnectionReason_IsValid(value)); + _has_bits_[0] |= 0x00000008u; + disconnection_reason_ = value; +} +inline void ConnectionsLog_EstablishedConnection::set_disconnection_reason(::location::nearby::proto::connections::DisconnectionReason value) { + _internal_set_disconnection_reason(value); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.EstablishedConnection.disconnection_reason) +} + +// optional int64 client_flow_id = 6; +inline bool ConnectionsLog_EstablishedConnection::_internal_has_client_flow_id() const { + bool value = (_has_bits_[0] & 0x00000010u) != 0; + return value; +} +inline bool ConnectionsLog_EstablishedConnection::has_client_flow_id() const { + return _internal_has_client_flow_id(); +} +inline void ConnectionsLog_EstablishedConnection::clear_client_flow_id() { + client_flow_id_ = int64_t{0}; + _has_bits_[0] &= ~0x00000010u; +} +inline int64_t ConnectionsLog_EstablishedConnection::_internal_client_flow_id() const { + return client_flow_id_; +} +inline int64_t ConnectionsLog_EstablishedConnection::client_flow_id() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.EstablishedConnection.client_flow_id) + return _internal_client_flow_id(); +} +inline void ConnectionsLog_EstablishedConnection::_internal_set_client_flow_id(int64_t value) { + _has_bits_[0] |= 0x00000010u; + client_flow_id_ = value; +} +inline void ConnectionsLog_EstablishedConnection::set_client_flow_id(int64_t value) { + _internal_set_client_flow_id(value); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.EstablishedConnection.client_flow_id) +} + +// optional string connection_token = 7; +inline bool ConnectionsLog_EstablishedConnection::_internal_has_connection_token() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool ConnectionsLog_EstablishedConnection::has_connection_token() const { + return _internal_has_connection_token(); +} +inline void ConnectionsLog_EstablishedConnection::clear_connection_token() { + connection_token_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& ConnectionsLog_EstablishedConnection::connection_token() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.EstablishedConnection.connection_token) + return _internal_connection_token(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void ConnectionsLog_EstablishedConnection::set_connection_token(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + connection_token_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.EstablishedConnection.connection_token) +} +inline std::string* ConnectionsLog_EstablishedConnection::mutable_connection_token() { + std::string* _s = _internal_mutable_connection_token(); + // @@protoc_insertion_point(field_mutable:location.nearby.analytics.proto.ConnectionsLog.EstablishedConnection.connection_token) + return _s; +} +inline const std::string& ConnectionsLog_EstablishedConnection::_internal_connection_token() const { + return connection_token_.Get(); +} +inline void ConnectionsLog_EstablishedConnection::_internal_set_connection_token(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + connection_token_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* ConnectionsLog_EstablishedConnection::_internal_mutable_connection_token() { + _has_bits_[0] |= 0x00000001u; + return connection_token_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* ConnectionsLog_EstablishedConnection::release_connection_token() { + // @@protoc_insertion_point(field_release:location.nearby.analytics.proto.ConnectionsLog.EstablishedConnection.connection_token) + if (!_internal_has_connection_token()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = connection_token_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (connection_token_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + connection_token_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void ConnectionsLog_EstablishedConnection::set_allocated_connection_token(std::string* connection_token) { + if (connection_token != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + connection_token_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), connection_token, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (connection_token_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + connection_token_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:location.nearby.analytics.proto.ConnectionsLog.EstablishedConnection.connection_token) +} + +// ------------------------------------------------------------------- + +// ConnectionsLog_Payload + +// optional int64 duration_millis = 1; +inline bool ConnectionsLog_Payload::_internal_has_duration_millis() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool ConnectionsLog_Payload::has_duration_millis() const { + return _internal_has_duration_millis(); +} +inline void ConnectionsLog_Payload::clear_duration_millis() { + duration_millis_ = int64_t{0}; + _has_bits_[0] &= ~0x00000001u; +} +inline int64_t ConnectionsLog_Payload::_internal_duration_millis() const { + return duration_millis_; +} +inline int64_t ConnectionsLog_Payload::duration_millis() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.Payload.duration_millis) + return _internal_duration_millis(); +} +inline void ConnectionsLog_Payload::_internal_set_duration_millis(int64_t value) { + _has_bits_[0] |= 0x00000001u; + duration_millis_ = value; +} +inline void ConnectionsLog_Payload::set_duration_millis(int64_t value) { + _internal_set_duration_millis(value); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.Payload.duration_millis) +} + +// optional .location.nearby.proto.connections.PayloadType type = 2; +inline bool ConnectionsLog_Payload::_internal_has_type() const { + bool value = (_has_bits_[0] & 0x00000004u) != 0; + return value; +} +inline bool ConnectionsLog_Payload::has_type() const { + return _internal_has_type(); +} +inline void ConnectionsLog_Payload::clear_type() { + type_ = 0; + _has_bits_[0] &= ~0x00000004u; +} +inline ::location::nearby::proto::connections::PayloadType ConnectionsLog_Payload::_internal_type() const { + return static_cast< ::location::nearby::proto::connections::PayloadType >(type_); +} +inline ::location::nearby::proto::connections::PayloadType ConnectionsLog_Payload::type() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.Payload.type) + return _internal_type(); +} +inline void ConnectionsLog_Payload::_internal_set_type(::location::nearby::proto::connections::PayloadType value) { + assert(::location::nearby::proto::connections::PayloadType_IsValid(value)); + _has_bits_[0] |= 0x00000004u; + type_ = value; +} +inline void ConnectionsLog_Payload::set_type(::location::nearby::proto::connections::PayloadType value) { + _internal_set_type(value); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.Payload.type) +} + +// optional int64 total_size_bytes = 3; +inline bool ConnectionsLog_Payload::_internal_has_total_size_bytes() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool ConnectionsLog_Payload::has_total_size_bytes() const { + return _internal_has_total_size_bytes(); +} +inline void ConnectionsLog_Payload::clear_total_size_bytes() { + total_size_bytes_ = int64_t{0}; + _has_bits_[0] &= ~0x00000002u; +} +inline int64_t ConnectionsLog_Payload::_internal_total_size_bytes() const { + return total_size_bytes_; +} +inline int64_t ConnectionsLog_Payload::total_size_bytes() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.Payload.total_size_bytes) + return _internal_total_size_bytes(); +} +inline void ConnectionsLog_Payload::_internal_set_total_size_bytes(int64_t value) { + _has_bits_[0] |= 0x00000002u; + total_size_bytes_ = value; +} +inline void ConnectionsLog_Payload::set_total_size_bytes(int64_t value) { + _internal_set_total_size_bytes(value); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.Payload.total_size_bytes) +} + +// optional int64 num_bytes_transferred = 4; +inline bool ConnectionsLog_Payload::_internal_has_num_bytes_transferred() const { + bool value = (_has_bits_[0] & 0x00000010u) != 0; + return value; +} +inline bool ConnectionsLog_Payload::has_num_bytes_transferred() const { + return _internal_has_num_bytes_transferred(); +} +inline void ConnectionsLog_Payload::clear_num_bytes_transferred() { + num_bytes_transferred_ = int64_t{0}; + _has_bits_[0] &= ~0x00000010u; +} +inline int64_t ConnectionsLog_Payload::_internal_num_bytes_transferred() const { + return num_bytes_transferred_; +} +inline int64_t ConnectionsLog_Payload::num_bytes_transferred() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.Payload.num_bytes_transferred) + return _internal_num_bytes_transferred(); +} +inline void ConnectionsLog_Payload::_internal_set_num_bytes_transferred(int64_t value) { + _has_bits_[0] |= 0x00000010u; + num_bytes_transferred_ = value; +} +inline void ConnectionsLog_Payload::set_num_bytes_transferred(int64_t value) { + _internal_set_num_bytes_transferred(value); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.Payload.num_bytes_transferred) +} + +// optional int32 num_chunks = 5; +inline bool ConnectionsLog_Payload::_internal_has_num_chunks() const { + bool value = (_has_bits_[0] & 0x00000008u) != 0; + return value; +} +inline bool ConnectionsLog_Payload::has_num_chunks() const { + return _internal_has_num_chunks(); +} +inline void ConnectionsLog_Payload::clear_num_chunks() { + num_chunks_ = 0; + _has_bits_[0] &= ~0x00000008u; +} +inline int32_t ConnectionsLog_Payload::_internal_num_chunks() const { + return num_chunks_; +} +inline int32_t ConnectionsLog_Payload::num_chunks() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.Payload.num_chunks) + return _internal_num_chunks(); +} +inline void ConnectionsLog_Payload::_internal_set_num_chunks(int32_t value) { + _has_bits_[0] |= 0x00000008u; + num_chunks_ = value; +} +inline void ConnectionsLog_Payload::set_num_chunks(int32_t value) { + _internal_set_num_chunks(value); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.Payload.num_chunks) +} + +// optional .location.nearby.proto.connections.PayloadStatus status = 6; +inline bool ConnectionsLog_Payload::_internal_has_status() const { + bool value = (_has_bits_[0] & 0x00000020u) != 0; + return value; +} +inline bool ConnectionsLog_Payload::has_status() const { + return _internal_has_status(); +} +inline void ConnectionsLog_Payload::clear_status() { + status_ = 0; + _has_bits_[0] &= ~0x00000020u; +} +inline ::location::nearby::proto::connections::PayloadStatus ConnectionsLog_Payload::_internal_status() const { + return static_cast< ::location::nearby::proto::connections::PayloadStatus >(status_); +} +inline ::location::nearby::proto::connections::PayloadStatus ConnectionsLog_Payload::status() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.Payload.status) + return _internal_status(); +} +inline void ConnectionsLog_Payload::_internal_set_status(::location::nearby::proto::connections::PayloadStatus value) { + assert(::location::nearby::proto::connections::PayloadStatus_IsValid(value)); + _has_bits_[0] |= 0x00000020u; + status_ = value; +} +inline void ConnectionsLog_Payload::set_status(::location::nearby::proto::connections::PayloadStatus value) { + _internal_set_status(value); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.Payload.status) +} + +// ------------------------------------------------------------------- + +// ConnectionsLog_BandwidthUpgradeAttempt + +// optional .location.nearby.proto.connections.ConnectionAttemptDirection direction = 1; +inline bool ConnectionsLog_BandwidthUpgradeAttempt::_internal_has_direction() const { + bool value = (_has_bits_[0] & 0x00000004u) != 0; + return value; +} +inline bool ConnectionsLog_BandwidthUpgradeAttempt::has_direction() const { + return _internal_has_direction(); +} +inline void ConnectionsLog_BandwidthUpgradeAttempt::clear_direction() { + direction_ = 0; + _has_bits_[0] &= ~0x00000004u; +} +inline ::location::nearby::proto::connections::ConnectionAttemptDirection ConnectionsLog_BandwidthUpgradeAttempt::_internal_direction() const { + return static_cast< ::location::nearby::proto::connections::ConnectionAttemptDirection >(direction_); +} +inline ::location::nearby::proto::connections::ConnectionAttemptDirection ConnectionsLog_BandwidthUpgradeAttempt::direction() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.BandwidthUpgradeAttempt.direction) + return _internal_direction(); +} +inline void ConnectionsLog_BandwidthUpgradeAttempt::_internal_set_direction(::location::nearby::proto::connections::ConnectionAttemptDirection value) { + assert(::location::nearby::proto::connections::ConnectionAttemptDirection_IsValid(value)); + _has_bits_[0] |= 0x00000004u; + direction_ = value; +} +inline void ConnectionsLog_BandwidthUpgradeAttempt::set_direction(::location::nearby::proto::connections::ConnectionAttemptDirection value) { + _internal_set_direction(value); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.BandwidthUpgradeAttempt.direction) +} + +// optional int64 duration_millis = 2; +inline bool ConnectionsLog_BandwidthUpgradeAttempt::_internal_has_duration_millis() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool ConnectionsLog_BandwidthUpgradeAttempt::has_duration_millis() const { + return _internal_has_duration_millis(); +} +inline void ConnectionsLog_BandwidthUpgradeAttempt::clear_duration_millis() { + duration_millis_ = int64_t{0}; + _has_bits_[0] &= ~0x00000002u; +} +inline int64_t ConnectionsLog_BandwidthUpgradeAttempt::_internal_duration_millis() const { + return duration_millis_; +} +inline int64_t ConnectionsLog_BandwidthUpgradeAttempt::duration_millis() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.BandwidthUpgradeAttempt.duration_millis) + return _internal_duration_millis(); +} +inline void ConnectionsLog_BandwidthUpgradeAttempt::_internal_set_duration_millis(int64_t value) { + _has_bits_[0] |= 0x00000002u; + duration_millis_ = value; +} +inline void ConnectionsLog_BandwidthUpgradeAttempt::set_duration_millis(int64_t value) { + _internal_set_duration_millis(value); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.BandwidthUpgradeAttempt.duration_millis) +} + +// optional .location.nearby.proto.connections.Medium from_medium = 3; +inline bool ConnectionsLog_BandwidthUpgradeAttempt::_internal_has_from_medium() const { + bool value = (_has_bits_[0] & 0x00000008u) != 0; + return value; +} +inline bool ConnectionsLog_BandwidthUpgradeAttempt::has_from_medium() const { + return _internal_has_from_medium(); +} +inline void ConnectionsLog_BandwidthUpgradeAttempt::clear_from_medium() { + from_medium_ = 0; + _has_bits_[0] &= ~0x00000008u; +} +inline ::location::nearby::proto::connections::Medium ConnectionsLog_BandwidthUpgradeAttempt::_internal_from_medium() const { + return static_cast< ::location::nearby::proto::connections::Medium >(from_medium_); +} +inline ::location::nearby::proto::connections::Medium ConnectionsLog_BandwidthUpgradeAttempt::from_medium() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.BandwidthUpgradeAttempt.from_medium) + return _internal_from_medium(); +} +inline void ConnectionsLog_BandwidthUpgradeAttempt::_internal_set_from_medium(::location::nearby::proto::connections::Medium value) { + assert(::location::nearby::proto::connections::Medium_IsValid(value)); + _has_bits_[0] |= 0x00000008u; + from_medium_ = value; +} +inline void ConnectionsLog_BandwidthUpgradeAttempt::set_from_medium(::location::nearby::proto::connections::Medium value) { + _internal_set_from_medium(value); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.BandwidthUpgradeAttempt.from_medium) +} + +// optional .location.nearby.proto.connections.Medium to_medium = 4; +inline bool ConnectionsLog_BandwidthUpgradeAttempt::_internal_has_to_medium() const { + bool value = (_has_bits_[0] & 0x00000010u) != 0; + return value; +} +inline bool ConnectionsLog_BandwidthUpgradeAttempt::has_to_medium() const { + return _internal_has_to_medium(); +} +inline void ConnectionsLog_BandwidthUpgradeAttempt::clear_to_medium() { + to_medium_ = 0; + _has_bits_[0] &= ~0x00000010u; +} +inline ::location::nearby::proto::connections::Medium ConnectionsLog_BandwidthUpgradeAttempt::_internal_to_medium() const { + return static_cast< ::location::nearby::proto::connections::Medium >(to_medium_); +} +inline ::location::nearby::proto::connections::Medium ConnectionsLog_BandwidthUpgradeAttempt::to_medium() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.BandwidthUpgradeAttempt.to_medium) + return _internal_to_medium(); +} +inline void ConnectionsLog_BandwidthUpgradeAttempt::_internal_set_to_medium(::location::nearby::proto::connections::Medium value) { + assert(::location::nearby::proto::connections::Medium_IsValid(value)); + _has_bits_[0] |= 0x00000010u; + to_medium_ = value; +} +inline void ConnectionsLog_BandwidthUpgradeAttempt::set_to_medium(::location::nearby::proto::connections::Medium value) { + _internal_set_to_medium(value); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.BandwidthUpgradeAttempt.to_medium) +} + +// optional .location.nearby.proto.connections.BandwidthUpgradeResult upgrade_result = 5; +inline bool ConnectionsLog_BandwidthUpgradeAttempt::_internal_has_upgrade_result() const { + bool value = (_has_bits_[0] & 0x00000020u) != 0; + return value; +} +inline bool ConnectionsLog_BandwidthUpgradeAttempt::has_upgrade_result() const { + return _internal_has_upgrade_result(); +} +inline void ConnectionsLog_BandwidthUpgradeAttempt::clear_upgrade_result() { + upgrade_result_ = 0; + _has_bits_[0] &= ~0x00000020u; +} +inline ::location::nearby::proto::connections::BandwidthUpgradeResult ConnectionsLog_BandwidthUpgradeAttempt::_internal_upgrade_result() const { + return static_cast< ::location::nearby::proto::connections::BandwidthUpgradeResult >(upgrade_result_); +} +inline ::location::nearby::proto::connections::BandwidthUpgradeResult ConnectionsLog_BandwidthUpgradeAttempt::upgrade_result() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.BandwidthUpgradeAttempt.upgrade_result) + return _internal_upgrade_result(); +} +inline void ConnectionsLog_BandwidthUpgradeAttempt::_internal_set_upgrade_result(::location::nearby::proto::connections::BandwidthUpgradeResult value) { + assert(::location::nearby::proto::connections::BandwidthUpgradeResult_IsValid(value)); + _has_bits_[0] |= 0x00000020u; + upgrade_result_ = value; +} +inline void ConnectionsLog_BandwidthUpgradeAttempt::set_upgrade_result(::location::nearby::proto::connections::BandwidthUpgradeResult value) { + _internal_set_upgrade_result(value); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.BandwidthUpgradeAttempt.upgrade_result) +} + +// optional .location.nearby.proto.connections.BandwidthUpgradeErrorStage error_stage = 6; +inline bool ConnectionsLog_BandwidthUpgradeAttempt::_internal_has_error_stage() const { + bool value = (_has_bits_[0] & 0x00000080u) != 0; + return value; +} +inline bool ConnectionsLog_BandwidthUpgradeAttempt::has_error_stage() const { + return _internal_has_error_stage(); +} +inline void ConnectionsLog_BandwidthUpgradeAttempt::clear_error_stage() { + error_stage_ = 0; + _has_bits_[0] &= ~0x00000080u; +} +inline ::location::nearby::proto::connections::BandwidthUpgradeErrorStage ConnectionsLog_BandwidthUpgradeAttempt::_internal_error_stage() const { + return static_cast< ::location::nearby::proto::connections::BandwidthUpgradeErrorStage >(error_stage_); +} +inline ::location::nearby::proto::connections::BandwidthUpgradeErrorStage ConnectionsLog_BandwidthUpgradeAttempt::error_stage() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.BandwidthUpgradeAttempt.error_stage) + return _internal_error_stage(); +} +inline void ConnectionsLog_BandwidthUpgradeAttempt::_internal_set_error_stage(::location::nearby::proto::connections::BandwidthUpgradeErrorStage value) { + assert(::location::nearby::proto::connections::BandwidthUpgradeErrorStage_IsValid(value)); + _has_bits_[0] |= 0x00000080u; + error_stage_ = value; +} +inline void ConnectionsLog_BandwidthUpgradeAttempt::set_error_stage(::location::nearby::proto::connections::BandwidthUpgradeErrorStage value) { + _internal_set_error_stage(value); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.BandwidthUpgradeAttempt.error_stage) +} + +// optional int64 client_flow_id = 7; +inline bool ConnectionsLog_BandwidthUpgradeAttempt::_internal_has_client_flow_id() const { + bool value = (_has_bits_[0] & 0x00000040u) != 0; + return value; +} +inline bool ConnectionsLog_BandwidthUpgradeAttempt::has_client_flow_id() const { + return _internal_has_client_flow_id(); +} +inline void ConnectionsLog_BandwidthUpgradeAttempt::clear_client_flow_id() { + client_flow_id_ = int64_t{0}; + _has_bits_[0] &= ~0x00000040u; +} +inline int64_t ConnectionsLog_BandwidthUpgradeAttempt::_internal_client_flow_id() const { + return client_flow_id_; +} +inline int64_t ConnectionsLog_BandwidthUpgradeAttempt::client_flow_id() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.BandwidthUpgradeAttempt.client_flow_id) + return _internal_client_flow_id(); +} +inline void ConnectionsLog_BandwidthUpgradeAttempt::_internal_set_client_flow_id(int64_t value) { + _has_bits_[0] |= 0x00000040u; + client_flow_id_ = value; +} +inline void ConnectionsLog_BandwidthUpgradeAttempt::set_client_flow_id(int64_t value) { + _internal_set_client_flow_id(value); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.BandwidthUpgradeAttempt.client_flow_id) +} + +// optional string connection_token = 8; +inline bool ConnectionsLog_BandwidthUpgradeAttempt::_internal_has_connection_token() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool ConnectionsLog_BandwidthUpgradeAttempt::has_connection_token() const { + return _internal_has_connection_token(); +} +inline void ConnectionsLog_BandwidthUpgradeAttempt::clear_connection_token() { + connection_token_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& ConnectionsLog_BandwidthUpgradeAttempt::connection_token() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.BandwidthUpgradeAttempt.connection_token) + return _internal_connection_token(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void ConnectionsLog_BandwidthUpgradeAttempt::set_connection_token(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + connection_token_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.BandwidthUpgradeAttempt.connection_token) +} +inline std::string* ConnectionsLog_BandwidthUpgradeAttempt::mutable_connection_token() { + std::string* _s = _internal_mutable_connection_token(); + // @@protoc_insertion_point(field_mutable:location.nearby.analytics.proto.ConnectionsLog.BandwidthUpgradeAttempt.connection_token) + return _s; +} +inline const std::string& ConnectionsLog_BandwidthUpgradeAttempt::_internal_connection_token() const { + return connection_token_.Get(); +} +inline void ConnectionsLog_BandwidthUpgradeAttempt::_internal_set_connection_token(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + connection_token_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* ConnectionsLog_BandwidthUpgradeAttempt::_internal_mutable_connection_token() { + _has_bits_[0] |= 0x00000001u; + return connection_token_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* ConnectionsLog_BandwidthUpgradeAttempt::release_connection_token() { + // @@protoc_insertion_point(field_release:location.nearby.analytics.proto.ConnectionsLog.BandwidthUpgradeAttempt.connection_token) + if (!_internal_has_connection_token()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = connection_token_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (connection_token_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + connection_token_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void ConnectionsLog_BandwidthUpgradeAttempt::set_allocated_connection_token(std::string* connection_token) { + if (connection_token != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + connection_token_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), connection_token, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (connection_token_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + connection_token_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:location.nearby.analytics.proto.ConnectionsLog.BandwidthUpgradeAttempt.connection_token) +} + +// ------------------------------------------------------------------- + +// ConnectionsLog_ErrorCode + +// optional .location.nearby.proto.connections.ConnectionAttemptDirection direction = 1; +inline bool ConnectionsLog_ErrorCode::_internal_has_direction() const { + bool value = (_has_bits_[0] & 0x00000004u) != 0; + return value; +} +inline bool ConnectionsLog_ErrorCode::has_direction() const { + return _internal_has_direction(); +} +inline void ConnectionsLog_ErrorCode::clear_direction() { + direction_ = 0; + _has_bits_[0] &= ~0x00000004u; +} +inline ::location::nearby::proto::connections::ConnectionAttemptDirection ConnectionsLog_ErrorCode::_internal_direction() const { + return static_cast< ::location::nearby::proto::connections::ConnectionAttemptDirection >(direction_); +} +inline ::location::nearby::proto::connections::ConnectionAttemptDirection ConnectionsLog_ErrorCode::direction() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.ErrorCode.direction) + return _internal_direction(); +} +inline void ConnectionsLog_ErrorCode::_internal_set_direction(::location::nearby::proto::connections::ConnectionAttemptDirection value) { + assert(::location::nearby::proto::connections::ConnectionAttemptDirection_IsValid(value)); + _has_bits_[0] |= 0x00000004u; + direction_ = value; +} +inline void ConnectionsLog_ErrorCode::set_direction(::location::nearby::proto::connections::ConnectionAttemptDirection value) { + _internal_set_direction(value); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.ErrorCode.direction) +} + +// optional string service_id = 2; +inline bool ConnectionsLog_ErrorCode::_internal_has_service_id() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool ConnectionsLog_ErrorCode::has_service_id() const { + return _internal_has_service_id(); +} +inline void ConnectionsLog_ErrorCode::clear_service_id() { + service_id_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& ConnectionsLog_ErrorCode::service_id() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.ErrorCode.service_id) + return _internal_service_id(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void ConnectionsLog_ErrorCode::set_service_id(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + service_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.ErrorCode.service_id) +} +inline std::string* ConnectionsLog_ErrorCode::mutable_service_id() { + std::string* _s = _internal_mutable_service_id(); + // @@protoc_insertion_point(field_mutable:location.nearby.analytics.proto.ConnectionsLog.ErrorCode.service_id) + return _s; +} +inline const std::string& ConnectionsLog_ErrorCode::_internal_service_id() const { + return service_id_.Get(); +} +inline void ConnectionsLog_ErrorCode::_internal_set_service_id(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + service_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* ConnectionsLog_ErrorCode::_internal_mutable_service_id() { + _has_bits_[0] |= 0x00000001u; + return service_id_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* ConnectionsLog_ErrorCode::release_service_id() { + // @@protoc_insertion_point(field_release:location.nearby.analytics.proto.ConnectionsLog.ErrorCode.service_id) + if (!_internal_has_service_id()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = service_id_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (service_id_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + service_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void ConnectionsLog_ErrorCode::set_allocated_service_id(std::string* service_id) { + if (service_id != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + service_id_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), service_id, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (service_id_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + service_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:location.nearby.analytics.proto.ConnectionsLog.ErrorCode.service_id) +} + +// optional .location.nearby.proto.connections.Medium medium = 3; +inline bool ConnectionsLog_ErrorCode::_internal_has_medium() const { + bool value = (_has_bits_[0] & 0x00000008u) != 0; + return value; +} +inline bool ConnectionsLog_ErrorCode::has_medium() const { + return _internal_has_medium(); +} +inline void ConnectionsLog_ErrorCode::clear_medium() { + medium_ = 0; + _has_bits_[0] &= ~0x00000008u; +} +inline ::location::nearby::proto::connections::Medium ConnectionsLog_ErrorCode::_internal_medium() const { + return static_cast< ::location::nearby::proto::connections::Medium >(medium_); +} +inline ::location::nearby::proto::connections::Medium ConnectionsLog_ErrorCode::medium() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.ErrorCode.medium) + return _internal_medium(); +} +inline void ConnectionsLog_ErrorCode::_internal_set_medium(::location::nearby::proto::connections::Medium value) { + assert(::location::nearby::proto::connections::Medium_IsValid(value)); + _has_bits_[0] |= 0x00000008u; + medium_ = value; +} +inline void ConnectionsLog_ErrorCode::set_medium(::location::nearby::proto::connections::Medium value) { + _internal_set_medium(value); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.ErrorCode.medium) +} + +// optional .location.nearby.errorcode.proto.Event event = 4; +inline bool ConnectionsLog_ErrorCode::_internal_has_event() const { + bool value = (_has_bits_[0] & 0x00000010u) != 0; + return value; +} +inline bool ConnectionsLog_ErrorCode::has_event() const { + return _internal_has_event(); +} +inline void ConnectionsLog_ErrorCode::clear_event() { + event_ = 0; + _has_bits_[0] &= ~0x00000010u; +} +inline ::location::nearby::errorcode::proto::Event ConnectionsLog_ErrorCode::_internal_event() const { + return static_cast< ::location::nearby::errorcode::proto::Event >(event_); +} +inline ::location::nearby::errorcode::proto::Event ConnectionsLog_ErrorCode::event() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.ErrorCode.event) + return _internal_event(); +} +inline void ConnectionsLog_ErrorCode::_internal_set_event(::location::nearby::errorcode::proto::Event value) { + assert(::location::nearby::errorcode::proto::Event_IsValid(value)); + _has_bits_[0] |= 0x00000010u; + event_ = value; +} +inline void ConnectionsLog_ErrorCode::set_event(::location::nearby::errorcode::proto::Event value) { + _internal_set_event(value); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.ErrorCode.event) +} + +// optional .location.nearby.errorcode.proto.Description description = 5; +inline bool ConnectionsLog_ErrorCode::_internal_has_description() const { + bool value = (_has_bits_[0] & 0x00000020u) != 0; + return value; +} +inline bool ConnectionsLog_ErrorCode::has_description() const { + return _internal_has_description(); +} +inline void ConnectionsLog_ErrorCode::clear_description() { + description_ = 0; + _has_bits_[0] &= ~0x00000020u; +} +inline ::location::nearby::errorcode::proto::Description ConnectionsLog_ErrorCode::_internal_description() const { + return static_cast< ::location::nearby::errorcode::proto::Description >(description_); +} +inline ::location::nearby::errorcode::proto::Description ConnectionsLog_ErrorCode::description() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.ErrorCode.description) + return _internal_description(); +} +inline void ConnectionsLog_ErrorCode::_internal_set_description(::location::nearby::errorcode::proto::Description value) { + assert(::location::nearby::errorcode::proto::Description_IsValid(value)); + _has_bits_[0] |= 0x00000020u; + description_ = value; +} +inline void ConnectionsLog_ErrorCode::set_description(::location::nearby::errorcode::proto::Description value) { + _internal_set_description(value); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.ErrorCode.description) +} + +// optional int64 flow_id = 6; +inline bool ConnectionsLog_ErrorCode::_internal_has_flow_id() const { + bool value = (_has_bits_[0] & 0x00000040u) != 0; + return value; +} +inline bool ConnectionsLog_ErrorCode::has_flow_id() const { + return _internal_has_flow_id(); +} +inline void ConnectionsLog_ErrorCode::clear_flow_id() { + flow_id_ = int64_t{0}; + _has_bits_[0] &= ~0x00000040u; +} +inline int64_t ConnectionsLog_ErrorCode::_internal_flow_id() const { + return flow_id_; +} +inline int64_t ConnectionsLog_ErrorCode::flow_id() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.ErrorCode.flow_id) + return _internal_flow_id(); +} +inline void ConnectionsLog_ErrorCode::_internal_set_flow_id(int64_t value) { + _has_bits_[0] |= 0x00000040u; + flow_id_ = value; +} +inline void ConnectionsLog_ErrorCode::set_flow_id(int64_t value) { + _internal_set_flow_id(value); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.ErrorCode.flow_id) +} + +// .location.nearby.errorcode.proto.CommonError common_error = 7; +inline bool ConnectionsLog_ErrorCode::_internal_has_common_error() const { + return ErrorCodeDetail_case() == kCommonError; +} +inline bool ConnectionsLog_ErrorCode::has_common_error() const { + return _internal_has_common_error(); +} +inline void ConnectionsLog_ErrorCode::set_has_common_error() { + _oneof_case_[0] = kCommonError; +} +inline void ConnectionsLog_ErrorCode::clear_common_error() { + if (_internal_has_common_error()) { + ErrorCodeDetail_.common_error_ = 0; + clear_has_ErrorCodeDetail(); + } +} +inline ::location::nearby::errorcode::proto::CommonError ConnectionsLog_ErrorCode::_internal_common_error() const { + if (_internal_has_common_error()) { + return static_cast< ::location::nearby::errorcode::proto::CommonError >(ErrorCodeDetail_.common_error_); + } + return static_cast< ::location::nearby::errorcode::proto::CommonError >(0); +} +inline ::location::nearby::errorcode::proto::CommonError ConnectionsLog_ErrorCode::common_error() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.ErrorCode.common_error) + return _internal_common_error(); +} +inline void ConnectionsLog_ErrorCode::_internal_set_common_error(::location::nearby::errorcode::proto::CommonError value) { + assert(::location::nearby::errorcode::proto::CommonError_IsValid(value)); + if (!_internal_has_common_error()) { + clear_ErrorCodeDetail(); + set_has_common_error(); + } + ErrorCodeDetail_.common_error_ = value; +} +inline void ConnectionsLog_ErrorCode::set_common_error(::location::nearby::errorcode::proto::CommonError value) { + _internal_set_common_error(value); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.ErrorCode.common_error) +} + +// .location.nearby.errorcode.proto.StartAdvertisingError start_advertising_error = 8; +inline bool ConnectionsLog_ErrorCode::_internal_has_start_advertising_error() const { + return ErrorCodeDetail_case() == kStartAdvertisingError; +} +inline bool ConnectionsLog_ErrorCode::has_start_advertising_error() const { + return _internal_has_start_advertising_error(); +} +inline void ConnectionsLog_ErrorCode::set_has_start_advertising_error() { + _oneof_case_[0] = kStartAdvertisingError; +} +inline void ConnectionsLog_ErrorCode::clear_start_advertising_error() { + if (_internal_has_start_advertising_error()) { + ErrorCodeDetail_.start_advertising_error_ = 31; + clear_has_ErrorCodeDetail(); + } +} +inline ::location::nearby::errorcode::proto::StartAdvertisingError ConnectionsLog_ErrorCode::_internal_start_advertising_error() const { + if (_internal_has_start_advertising_error()) { + return static_cast< ::location::nearby::errorcode::proto::StartAdvertisingError >(ErrorCodeDetail_.start_advertising_error_); + } + return static_cast< ::location::nearby::errorcode::proto::StartAdvertisingError >(31); +} +inline ::location::nearby::errorcode::proto::StartAdvertisingError ConnectionsLog_ErrorCode::start_advertising_error() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.ErrorCode.start_advertising_error) + return _internal_start_advertising_error(); +} +inline void ConnectionsLog_ErrorCode::_internal_set_start_advertising_error(::location::nearby::errorcode::proto::StartAdvertisingError value) { + assert(::location::nearby::errorcode::proto::StartAdvertisingError_IsValid(value)); + if (!_internal_has_start_advertising_error()) { + clear_ErrorCodeDetail(); + set_has_start_advertising_error(); + } + ErrorCodeDetail_.start_advertising_error_ = value; +} +inline void ConnectionsLog_ErrorCode::set_start_advertising_error(::location::nearby::errorcode::proto::StartAdvertisingError value) { + _internal_set_start_advertising_error(value); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.ErrorCode.start_advertising_error) +} + +// .location.nearby.errorcode.proto.StartDiscoveringError start_discovering_error = 9; +inline bool ConnectionsLog_ErrorCode::_internal_has_start_discovering_error() const { + return ErrorCodeDetail_case() == kStartDiscoveringError; +} +inline bool ConnectionsLog_ErrorCode::has_start_discovering_error() const { + return _internal_has_start_discovering_error(); +} +inline void ConnectionsLog_ErrorCode::set_has_start_discovering_error() { + _oneof_case_[0] = kStartDiscoveringError; +} +inline void ConnectionsLog_ErrorCode::clear_start_discovering_error() { + if (_internal_has_start_discovering_error()) { + ErrorCodeDetail_.start_discovering_error_ = 31; + clear_has_ErrorCodeDetail(); + } +} +inline ::location::nearby::errorcode::proto::StartDiscoveringError ConnectionsLog_ErrorCode::_internal_start_discovering_error() const { + if (_internal_has_start_discovering_error()) { + return static_cast< ::location::nearby::errorcode::proto::StartDiscoveringError >(ErrorCodeDetail_.start_discovering_error_); + } + return static_cast< ::location::nearby::errorcode::proto::StartDiscoveringError >(31); +} +inline ::location::nearby::errorcode::proto::StartDiscoveringError ConnectionsLog_ErrorCode::start_discovering_error() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.ErrorCode.start_discovering_error) + return _internal_start_discovering_error(); +} +inline void ConnectionsLog_ErrorCode::_internal_set_start_discovering_error(::location::nearby::errorcode::proto::StartDiscoveringError value) { + assert(::location::nearby::errorcode::proto::StartDiscoveringError_IsValid(value)); + if (!_internal_has_start_discovering_error()) { + clear_ErrorCodeDetail(); + set_has_start_discovering_error(); + } + ErrorCodeDetail_.start_discovering_error_ = value; +} +inline void ConnectionsLog_ErrorCode::set_start_discovering_error(::location::nearby::errorcode::proto::StartDiscoveringError value) { + _internal_set_start_discovering_error(value); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.ErrorCode.start_discovering_error) +} + +// .location.nearby.errorcode.proto.StopAdvertisingError stop_advertising_error = 10; +inline bool ConnectionsLog_ErrorCode::_internal_has_stop_advertising_error() const { + return ErrorCodeDetail_case() == kStopAdvertisingError; +} +inline bool ConnectionsLog_ErrorCode::has_stop_advertising_error() const { + return _internal_has_stop_advertising_error(); +} +inline void ConnectionsLog_ErrorCode::set_has_stop_advertising_error() { + _oneof_case_[0] = kStopAdvertisingError; +} +inline void ConnectionsLog_ErrorCode::clear_stop_advertising_error() { + if (_internal_has_stop_advertising_error()) { + ErrorCodeDetail_.stop_advertising_error_ = 31; + clear_has_ErrorCodeDetail(); + } +} +inline ::location::nearby::errorcode::proto::StopAdvertisingError ConnectionsLog_ErrorCode::_internal_stop_advertising_error() const { + if (_internal_has_stop_advertising_error()) { + return static_cast< ::location::nearby::errorcode::proto::StopAdvertisingError >(ErrorCodeDetail_.stop_advertising_error_); + } + return static_cast< ::location::nearby::errorcode::proto::StopAdvertisingError >(31); +} +inline ::location::nearby::errorcode::proto::StopAdvertisingError ConnectionsLog_ErrorCode::stop_advertising_error() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.ErrorCode.stop_advertising_error) + return _internal_stop_advertising_error(); +} +inline void ConnectionsLog_ErrorCode::_internal_set_stop_advertising_error(::location::nearby::errorcode::proto::StopAdvertisingError value) { + assert(::location::nearby::errorcode::proto::StopAdvertisingError_IsValid(value)); + if (!_internal_has_stop_advertising_error()) { + clear_ErrorCodeDetail(); + set_has_stop_advertising_error(); + } + ErrorCodeDetail_.stop_advertising_error_ = value; +} +inline void ConnectionsLog_ErrorCode::set_stop_advertising_error(::location::nearby::errorcode::proto::StopAdvertisingError value) { + _internal_set_stop_advertising_error(value); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.ErrorCode.stop_advertising_error) +} + +// .location.nearby.errorcode.proto.StopDiscoveringError stop_discovering_error = 11; +inline bool ConnectionsLog_ErrorCode::_internal_has_stop_discovering_error() const { + return ErrorCodeDetail_case() == kStopDiscoveringError; +} +inline bool ConnectionsLog_ErrorCode::has_stop_discovering_error() const { + return _internal_has_stop_discovering_error(); +} +inline void ConnectionsLog_ErrorCode::set_has_stop_discovering_error() { + _oneof_case_[0] = kStopDiscoveringError; +} +inline void ConnectionsLog_ErrorCode::clear_stop_discovering_error() { + if (_internal_has_stop_discovering_error()) { + ErrorCodeDetail_.stop_discovering_error_ = 31; + clear_has_ErrorCodeDetail(); + } +} +inline ::location::nearby::errorcode::proto::StopDiscoveringError ConnectionsLog_ErrorCode::_internal_stop_discovering_error() const { + if (_internal_has_stop_discovering_error()) { + return static_cast< ::location::nearby::errorcode::proto::StopDiscoveringError >(ErrorCodeDetail_.stop_discovering_error_); + } + return static_cast< ::location::nearby::errorcode::proto::StopDiscoveringError >(31); +} +inline ::location::nearby::errorcode::proto::StopDiscoveringError ConnectionsLog_ErrorCode::stop_discovering_error() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.ErrorCode.stop_discovering_error) + return _internal_stop_discovering_error(); +} +inline void ConnectionsLog_ErrorCode::_internal_set_stop_discovering_error(::location::nearby::errorcode::proto::StopDiscoveringError value) { + assert(::location::nearby::errorcode::proto::StopDiscoveringError_IsValid(value)); + if (!_internal_has_stop_discovering_error()) { + clear_ErrorCodeDetail(); + set_has_stop_discovering_error(); + } + ErrorCodeDetail_.stop_discovering_error_ = value; +} +inline void ConnectionsLog_ErrorCode::set_stop_discovering_error(::location::nearby::errorcode::proto::StopDiscoveringError value) { + _internal_set_stop_discovering_error(value); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.ErrorCode.stop_discovering_error) +} + +// .location.nearby.errorcode.proto.StartListeningIncomingConnectionError start_listening_incoming_connection_error = 12; +inline bool ConnectionsLog_ErrorCode::_internal_has_start_listening_incoming_connection_error() const { + return ErrorCodeDetail_case() == kStartListeningIncomingConnectionError; +} +inline bool ConnectionsLog_ErrorCode::has_start_listening_incoming_connection_error() const { + return _internal_has_start_listening_incoming_connection_error(); +} +inline void ConnectionsLog_ErrorCode::set_has_start_listening_incoming_connection_error() { + _oneof_case_[0] = kStartListeningIncomingConnectionError; +} +inline void ConnectionsLog_ErrorCode::clear_start_listening_incoming_connection_error() { + if (_internal_has_start_listening_incoming_connection_error()) { + ErrorCodeDetail_.start_listening_incoming_connection_error_ = 31; + clear_has_ErrorCodeDetail(); + } +} +inline ::location::nearby::errorcode::proto::StartListeningIncomingConnectionError ConnectionsLog_ErrorCode::_internal_start_listening_incoming_connection_error() const { + if (_internal_has_start_listening_incoming_connection_error()) { + return static_cast< ::location::nearby::errorcode::proto::StartListeningIncomingConnectionError >(ErrorCodeDetail_.start_listening_incoming_connection_error_); + } + return static_cast< ::location::nearby::errorcode::proto::StartListeningIncomingConnectionError >(31); +} +inline ::location::nearby::errorcode::proto::StartListeningIncomingConnectionError ConnectionsLog_ErrorCode::start_listening_incoming_connection_error() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.ErrorCode.start_listening_incoming_connection_error) + return _internal_start_listening_incoming_connection_error(); +} +inline void ConnectionsLog_ErrorCode::_internal_set_start_listening_incoming_connection_error(::location::nearby::errorcode::proto::StartListeningIncomingConnectionError value) { + assert(::location::nearby::errorcode::proto::StartListeningIncomingConnectionError_IsValid(value)); + if (!_internal_has_start_listening_incoming_connection_error()) { + clear_ErrorCodeDetail(); + set_has_start_listening_incoming_connection_error(); + } + ErrorCodeDetail_.start_listening_incoming_connection_error_ = value; +} +inline void ConnectionsLog_ErrorCode::set_start_listening_incoming_connection_error(::location::nearby::errorcode::proto::StartListeningIncomingConnectionError value) { + _internal_set_start_listening_incoming_connection_error(value); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.ErrorCode.start_listening_incoming_connection_error) +} + +// .location.nearby.errorcode.proto.StopListeningIncomingConnectionError stop_listening_incoming_connection_error = 13; +inline bool ConnectionsLog_ErrorCode::_internal_has_stop_listening_incoming_connection_error() const { + return ErrorCodeDetail_case() == kStopListeningIncomingConnectionError; +} +inline bool ConnectionsLog_ErrorCode::has_stop_listening_incoming_connection_error() const { + return _internal_has_stop_listening_incoming_connection_error(); +} +inline void ConnectionsLog_ErrorCode::set_has_stop_listening_incoming_connection_error() { + _oneof_case_[0] = kStopListeningIncomingConnectionError; +} +inline void ConnectionsLog_ErrorCode::clear_stop_listening_incoming_connection_error() { + if (_internal_has_stop_listening_incoming_connection_error()) { + ErrorCodeDetail_.stop_listening_incoming_connection_error_ = 31; + clear_has_ErrorCodeDetail(); + } +} +inline ::location::nearby::errorcode::proto::StopListeningIncomingConnectionError ConnectionsLog_ErrorCode::_internal_stop_listening_incoming_connection_error() const { + if (_internal_has_stop_listening_incoming_connection_error()) { + return static_cast< ::location::nearby::errorcode::proto::StopListeningIncomingConnectionError >(ErrorCodeDetail_.stop_listening_incoming_connection_error_); + } + return static_cast< ::location::nearby::errorcode::proto::StopListeningIncomingConnectionError >(31); +} +inline ::location::nearby::errorcode::proto::StopListeningIncomingConnectionError ConnectionsLog_ErrorCode::stop_listening_incoming_connection_error() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.ErrorCode.stop_listening_incoming_connection_error) + return _internal_stop_listening_incoming_connection_error(); +} +inline void ConnectionsLog_ErrorCode::_internal_set_stop_listening_incoming_connection_error(::location::nearby::errorcode::proto::StopListeningIncomingConnectionError value) { + assert(::location::nearby::errorcode::proto::StopListeningIncomingConnectionError_IsValid(value)); + if (!_internal_has_stop_listening_incoming_connection_error()) { + clear_ErrorCodeDetail(); + set_has_stop_listening_incoming_connection_error(); + } + ErrorCodeDetail_.stop_listening_incoming_connection_error_ = value; +} +inline void ConnectionsLog_ErrorCode::set_stop_listening_incoming_connection_error(::location::nearby::errorcode::proto::StopListeningIncomingConnectionError value) { + _internal_set_stop_listening_incoming_connection_error(value); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.ErrorCode.stop_listening_incoming_connection_error) +} + +// .location.nearby.errorcode.proto.ConnectError connect_error = 14; +inline bool ConnectionsLog_ErrorCode::_internal_has_connect_error() const { + return ErrorCodeDetail_case() == kConnectError; +} +inline bool ConnectionsLog_ErrorCode::has_connect_error() const { + return _internal_has_connect_error(); +} +inline void ConnectionsLog_ErrorCode::set_has_connect_error() { + _oneof_case_[0] = kConnectError; +} +inline void ConnectionsLog_ErrorCode::clear_connect_error() { + if (_internal_has_connect_error()) { + ErrorCodeDetail_.connect_error_ = 31; + clear_has_ErrorCodeDetail(); + } +} +inline ::location::nearby::errorcode::proto::ConnectError ConnectionsLog_ErrorCode::_internal_connect_error() const { + if (_internal_has_connect_error()) { + return static_cast< ::location::nearby::errorcode::proto::ConnectError >(ErrorCodeDetail_.connect_error_); + } + return static_cast< ::location::nearby::errorcode::proto::ConnectError >(31); +} +inline ::location::nearby::errorcode::proto::ConnectError ConnectionsLog_ErrorCode::connect_error() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.ErrorCode.connect_error) + return _internal_connect_error(); +} +inline void ConnectionsLog_ErrorCode::_internal_set_connect_error(::location::nearby::errorcode::proto::ConnectError value) { + assert(::location::nearby::errorcode::proto::ConnectError_IsValid(value)); + if (!_internal_has_connect_error()) { + clear_ErrorCodeDetail(); + set_has_connect_error(); + } + ErrorCodeDetail_.connect_error_ = value; +} +inline void ConnectionsLog_ErrorCode::set_connect_error(::location::nearby::errorcode::proto::ConnectError value) { + _internal_set_connect_error(value); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.ErrorCode.connect_error) +} + +// .location.nearby.errorcode.proto.DisconnectError disconnect_error = 15; +inline bool ConnectionsLog_ErrorCode::_internal_has_disconnect_error() const { + return ErrorCodeDetail_case() == kDisconnectError; +} +inline bool ConnectionsLog_ErrorCode::has_disconnect_error() const { + return _internal_has_disconnect_error(); +} +inline void ConnectionsLog_ErrorCode::set_has_disconnect_error() { + _oneof_case_[0] = kDisconnectError; +} +inline void ConnectionsLog_ErrorCode::clear_disconnect_error() { + if (_internal_has_disconnect_error()) { + ErrorCodeDetail_.disconnect_error_ = 31; + clear_has_ErrorCodeDetail(); + } +} +inline ::location::nearby::errorcode::proto::DisconnectError ConnectionsLog_ErrorCode::_internal_disconnect_error() const { + if (_internal_has_disconnect_error()) { + return static_cast< ::location::nearby::errorcode::proto::DisconnectError >(ErrorCodeDetail_.disconnect_error_); + } + return static_cast< ::location::nearby::errorcode::proto::DisconnectError >(31); +} +inline ::location::nearby::errorcode::proto::DisconnectError ConnectionsLog_ErrorCode::disconnect_error() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.ErrorCode.disconnect_error) + return _internal_disconnect_error(); +} +inline void ConnectionsLog_ErrorCode::_internal_set_disconnect_error(::location::nearby::errorcode::proto::DisconnectError value) { + assert(::location::nearby::errorcode::proto::DisconnectError_IsValid(value)); + if (!_internal_has_disconnect_error()) { + clear_ErrorCodeDetail(); + set_has_disconnect_error(); + } + ErrorCodeDetail_.disconnect_error_ = value; +} +inline void ConnectionsLog_ErrorCode::set_disconnect_error(::location::nearby::errorcode::proto::DisconnectError value) { + _internal_set_disconnect_error(value); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.ErrorCode.disconnect_error) +} + +// optional string connection_token = 16; +inline bool ConnectionsLog_ErrorCode::_internal_has_connection_token() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool ConnectionsLog_ErrorCode::has_connection_token() const { + return _internal_has_connection_token(); +} +inline void ConnectionsLog_ErrorCode::clear_connection_token() { + connection_token_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000002u; +} +inline const std::string& ConnectionsLog_ErrorCode::connection_token() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.ErrorCode.connection_token) + return _internal_connection_token(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void ConnectionsLog_ErrorCode::set_connection_token(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000002u; + connection_token_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.ErrorCode.connection_token) +} +inline std::string* ConnectionsLog_ErrorCode::mutable_connection_token() { + std::string* _s = _internal_mutable_connection_token(); + // @@protoc_insertion_point(field_mutable:location.nearby.analytics.proto.ConnectionsLog.ErrorCode.connection_token) + return _s; +} +inline const std::string& ConnectionsLog_ErrorCode::_internal_connection_token() const { + return connection_token_.Get(); +} +inline void ConnectionsLog_ErrorCode::_internal_set_connection_token(const std::string& value) { + _has_bits_[0] |= 0x00000002u; + connection_token_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* ConnectionsLog_ErrorCode::_internal_mutable_connection_token() { + _has_bits_[0] |= 0x00000002u; + return connection_token_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* ConnectionsLog_ErrorCode::release_connection_token() { + // @@protoc_insertion_point(field_release:location.nearby.analytics.proto.ConnectionsLog.ErrorCode.connection_token) + if (!_internal_has_connection_token()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000002u; + auto* p = connection_token_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (connection_token_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + connection_token_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void ConnectionsLog_ErrorCode::set_allocated_connection_token(std::string* connection_token) { + if (connection_token != nullptr) { + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + connection_token_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), connection_token, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (connection_token_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + connection_token_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:location.nearby.analytics.proto.ConnectionsLog.ErrorCode.connection_token) +} + +inline bool ConnectionsLog_ErrorCode::has_ErrorCodeDetail() const { + return ErrorCodeDetail_case() != ERRORCODEDETAIL_NOT_SET; +} +inline void ConnectionsLog_ErrorCode::clear_has_ErrorCodeDetail() { + _oneof_case_[0] = ERRORCODEDETAIL_NOT_SET; +} +inline ConnectionsLog_ErrorCode::ErrorCodeDetailCase ConnectionsLog_ErrorCode::ErrorCodeDetail_case() const { + return ConnectionsLog_ErrorCode::ErrorCodeDetailCase(_oneof_case_[0]); +} +// ------------------------------------------------------------------- + +// ConnectionsLog_AdvertisingMetadata + +// optional bool supports_extended_ble_advertisements = 1; +inline bool ConnectionsLog_AdvertisingMetadata::_internal_has_supports_extended_ble_advertisements() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool ConnectionsLog_AdvertisingMetadata::has_supports_extended_ble_advertisements() const { + return _internal_has_supports_extended_ble_advertisements(); +} +inline void ConnectionsLog_AdvertisingMetadata::clear_supports_extended_ble_advertisements() { + supports_extended_ble_advertisements_ = false; + _has_bits_[0] &= ~0x00000002u; +} +inline bool ConnectionsLog_AdvertisingMetadata::_internal_supports_extended_ble_advertisements() const { + return supports_extended_ble_advertisements_; +} +inline bool ConnectionsLog_AdvertisingMetadata::supports_extended_ble_advertisements() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.AdvertisingMetadata.supports_extended_ble_advertisements) + return _internal_supports_extended_ble_advertisements(); +} +inline void ConnectionsLog_AdvertisingMetadata::_internal_set_supports_extended_ble_advertisements(bool value) { + _has_bits_[0] |= 0x00000002u; + supports_extended_ble_advertisements_ = value; +} +inline void ConnectionsLog_AdvertisingMetadata::set_supports_extended_ble_advertisements(bool value) { + _internal_set_supports_extended_ble_advertisements(value); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.AdvertisingMetadata.supports_extended_ble_advertisements) +} + +// optional int32 connected_ap_frequency = 2; +inline bool ConnectionsLog_AdvertisingMetadata::_internal_has_connected_ap_frequency() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool ConnectionsLog_AdvertisingMetadata::has_connected_ap_frequency() const { + return _internal_has_connected_ap_frequency(); +} +inline void ConnectionsLog_AdvertisingMetadata::clear_connected_ap_frequency() { + connected_ap_frequency_ = 0; + _has_bits_[0] &= ~0x00000001u; +} +inline int32_t ConnectionsLog_AdvertisingMetadata::_internal_connected_ap_frequency() const { + return connected_ap_frequency_; +} +inline int32_t ConnectionsLog_AdvertisingMetadata::connected_ap_frequency() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.AdvertisingMetadata.connected_ap_frequency) + return _internal_connected_ap_frequency(); +} +inline void ConnectionsLog_AdvertisingMetadata::_internal_set_connected_ap_frequency(int32_t value) { + _has_bits_[0] |= 0x00000001u; + connected_ap_frequency_ = value; +} +inline void ConnectionsLog_AdvertisingMetadata::set_connected_ap_frequency(int32_t value) { + _internal_set_connected_ap_frequency(value); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.AdvertisingMetadata.connected_ap_frequency) +} + +// optional bool supports_nfc_technology = 3; +inline bool ConnectionsLog_AdvertisingMetadata::_internal_has_supports_nfc_technology() const { + bool value = (_has_bits_[0] & 0x00000004u) != 0; + return value; +} +inline bool ConnectionsLog_AdvertisingMetadata::has_supports_nfc_technology() const { + return _internal_has_supports_nfc_technology(); +} +inline void ConnectionsLog_AdvertisingMetadata::clear_supports_nfc_technology() { + supports_nfc_technology_ = false; + _has_bits_[0] &= ~0x00000004u; +} +inline bool ConnectionsLog_AdvertisingMetadata::_internal_supports_nfc_technology() const { + return supports_nfc_technology_; +} +inline bool ConnectionsLog_AdvertisingMetadata::supports_nfc_technology() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.AdvertisingMetadata.supports_nfc_technology) + return _internal_supports_nfc_technology(); +} +inline void ConnectionsLog_AdvertisingMetadata::_internal_set_supports_nfc_technology(bool value) { + _has_bits_[0] |= 0x00000004u; + supports_nfc_technology_ = value; +} +inline void ConnectionsLog_AdvertisingMetadata::set_supports_nfc_technology(bool value) { + _internal_set_supports_nfc_technology(value); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.AdvertisingMetadata.supports_nfc_technology) +} + +// optional bool multiple_advertisement_supported = 4; +inline bool ConnectionsLog_AdvertisingMetadata::_internal_has_multiple_advertisement_supported() const { + bool value = (_has_bits_[0] & 0x00000008u) != 0; + return value; +} +inline bool ConnectionsLog_AdvertisingMetadata::has_multiple_advertisement_supported() const { + return _internal_has_multiple_advertisement_supported(); +} +inline void ConnectionsLog_AdvertisingMetadata::clear_multiple_advertisement_supported() { + multiple_advertisement_supported_ = false; + _has_bits_[0] &= ~0x00000008u; +} +inline bool ConnectionsLog_AdvertisingMetadata::_internal_multiple_advertisement_supported() const { + return multiple_advertisement_supported_; +} +inline bool ConnectionsLog_AdvertisingMetadata::multiple_advertisement_supported() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.AdvertisingMetadata.multiple_advertisement_supported) + return _internal_multiple_advertisement_supported(); +} +inline void ConnectionsLog_AdvertisingMetadata::_internal_set_multiple_advertisement_supported(bool value) { + _has_bits_[0] |= 0x00000008u; + multiple_advertisement_supported_ = value; +} +inline void ConnectionsLog_AdvertisingMetadata::set_multiple_advertisement_supported(bool value) { + _internal_set_multiple_advertisement_supported(value); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.AdvertisingMetadata.multiple_advertisement_supported) +} + +// ------------------------------------------------------------------- + +// ConnectionsLog_DiscoveryMetadata + +// optional bool supports_extended_ble_advertisements = 1; +inline bool ConnectionsLog_DiscoveryMetadata::_internal_has_supports_extended_ble_advertisements() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool ConnectionsLog_DiscoveryMetadata::has_supports_extended_ble_advertisements() const { + return _internal_has_supports_extended_ble_advertisements(); +} +inline void ConnectionsLog_DiscoveryMetadata::clear_supports_extended_ble_advertisements() { + supports_extended_ble_advertisements_ = false; + _has_bits_[0] &= ~0x00000002u; +} +inline bool ConnectionsLog_DiscoveryMetadata::_internal_supports_extended_ble_advertisements() const { + return supports_extended_ble_advertisements_; +} +inline bool ConnectionsLog_DiscoveryMetadata::supports_extended_ble_advertisements() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.DiscoveryMetadata.supports_extended_ble_advertisements) + return _internal_supports_extended_ble_advertisements(); +} +inline void ConnectionsLog_DiscoveryMetadata::_internal_set_supports_extended_ble_advertisements(bool value) { + _has_bits_[0] |= 0x00000002u; + supports_extended_ble_advertisements_ = value; +} +inline void ConnectionsLog_DiscoveryMetadata::set_supports_extended_ble_advertisements(bool value) { + _internal_set_supports_extended_ble_advertisements(value); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.DiscoveryMetadata.supports_extended_ble_advertisements) +} + +// optional int32 connected_ap_frequency = 2; +inline bool ConnectionsLog_DiscoveryMetadata::_internal_has_connected_ap_frequency() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool ConnectionsLog_DiscoveryMetadata::has_connected_ap_frequency() const { + return _internal_has_connected_ap_frequency(); +} +inline void ConnectionsLog_DiscoveryMetadata::clear_connected_ap_frequency() { + connected_ap_frequency_ = 0; + _has_bits_[0] &= ~0x00000001u; +} +inline int32_t ConnectionsLog_DiscoveryMetadata::_internal_connected_ap_frequency() const { + return connected_ap_frequency_; +} +inline int32_t ConnectionsLog_DiscoveryMetadata::connected_ap_frequency() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.DiscoveryMetadata.connected_ap_frequency) + return _internal_connected_ap_frequency(); +} +inline void ConnectionsLog_DiscoveryMetadata::_internal_set_connected_ap_frequency(int32_t value) { + _has_bits_[0] |= 0x00000001u; + connected_ap_frequency_ = value; +} +inline void ConnectionsLog_DiscoveryMetadata::set_connected_ap_frequency(int32_t value) { + _internal_set_connected_ap_frequency(value); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.DiscoveryMetadata.connected_ap_frequency) +} + +// optional bool supports_nfc_technology = 3; +inline bool ConnectionsLog_DiscoveryMetadata::_internal_has_supports_nfc_technology() const { + bool value = (_has_bits_[0] & 0x00000004u) != 0; + return value; +} +inline bool ConnectionsLog_DiscoveryMetadata::has_supports_nfc_technology() const { + return _internal_has_supports_nfc_technology(); +} +inline void ConnectionsLog_DiscoveryMetadata::clear_supports_nfc_technology() { + supports_nfc_technology_ = false; + _has_bits_[0] &= ~0x00000004u; +} +inline bool ConnectionsLog_DiscoveryMetadata::_internal_supports_nfc_technology() const { + return supports_nfc_technology_; +} +inline bool ConnectionsLog_DiscoveryMetadata::supports_nfc_technology() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.DiscoveryMetadata.supports_nfc_technology) + return _internal_supports_nfc_technology(); +} +inline void ConnectionsLog_DiscoveryMetadata::_internal_set_supports_nfc_technology(bool value) { + _has_bits_[0] |= 0x00000004u; + supports_nfc_technology_ = value; +} +inline void ConnectionsLog_DiscoveryMetadata::set_supports_nfc_technology(bool value) { + _internal_set_supports_nfc_technology(value); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.DiscoveryMetadata.supports_nfc_technology) +} + +// ------------------------------------------------------------------- + +// ConnectionsLog_ConnectionAttemptMetadata + +// optional .location.nearby.proto.connections.ConnectionTechnology technology = 1; +inline bool ConnectionsLog_ConnectionAttemptMetadata::_internal_has_technology() const { + bool value = (_has_bits_[0] & 0x00000004u) != 0; + return value; +} +inline bool ConnectionsLog_ConnectionAttemptMetadata::has_technology() const { + return _internal_has_technology(); +} +inline void ConnectionsLog_ConnectionAttemptMetadata::clear_technology() { + technology_ = 0; + _has_bits_[0] &= ~0x00000004u; +} +inline ::location::nearby::proto::connections::ConnectionTechnology ConnectionsLog_ConnectionAttemptMetadata::_internal_technology() const { + return static_cast< ::location::nearby::proto::connections::ConnectionTechnology >(technology_); +} +inline ::location::nearby::proto::connections::ConnectionTechnology ConnectionsLog_ConnectionAttemptMetadata::technology() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.ConnectionAttemptMetadata.technology) + return _internal_technology(); +} +inline void ConnectionsLog_ConnectionAttemptMetadata::_internal_set_technology(::location::nearby::proto::connections::ConnectionTechnology value) { + assert(::location::nearby::proto::connections::ConnectionTechnology_IsValid(value)); + _has_bits_[0] |= 0x00000004u; + technology_ = value; +} +inline void ConnectionsLog_ConnectionAttemptMetadata::set_technology(::location::nearby::proto::connections::ConnectionTechnology value) { + _internal_set_technology(value); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.ConnectionAttemptMetadata.technology) +} + +// optional .location.nearby.proto.connections.ConnectionBand band = 2; +inline bool ConnectionsLog_ConnectionAttemptMetadata::_internal_has_band() const { + bool value = (_has_bits_[0] & 0x00000008u) != 0; + return value; +} +inline bool ConnectionsLog_ConnectionAttemptMetadata::has_band() const { + return _internal_has_band(); +} +inline void ConnectionsLog_ConnectionAttemptMetadata::clear_band() { + band_ = 0; + _has_bits_[0] &= ~0x00000008u; +} +inline ::location::nearby::proto::connections::ConnectionBand ConnectionsLog_ConnectionAttemptMetadata::_internal_band() const { + return static_cast< ::location::nearby::proto::connections::ConnectionBand >(band_); +} +inline ::location::nearby::proto::connections::ConnectionBand ConnectionsLog_ConnectionAttemptMetadata::band() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.ConnectionAttemptMetadata.band) + return _internal_band(); +} +inline void ConnectionsLog_ConnectionAttemptMetadata::_internal_set_band(::location::nearby::proto::connections::ConnectionBand value) { + assert(::location::nearby::proto::connections::ConnectionBand_IsValid(value)); + _has_bits_[0] |= 0x00000008u; + band_ = value; +} +inline void ConnectionsLog_ConnectionAttemptMetadata::set_band(::location::nearby::proto::connections::ConnectionBand value) { + _internal_set_band(value); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.ConnectionAttemptMetadata.band) +} + +// optional int32 frequency = 3; +inline bool ConnectionsLog_ConnectionAttemptMetadata::_internal_has_frequency() const { + bool value = (_has_bits_[0] & 0x00000010u) != 0; + return value; +} +inline bool ConnectionsLog_ConnectionAttemptMetadata::has_frequency() const { + return _internal_has_frequency(); +} +inline void ConnectionsLog_ConnectionAttemptMetadata::clear_frequency() { + frequency_ = 0; + _has_bits_[0] &= ~0x00000010u; +} +inline int32_t ConnectionsLog_ConnectionAttemptMetadata::_internal_frequency() const { + return frequency_; +} +inline int32_t ConnectionsLog_ConnectionAttemptMetadata::frequency() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.ConnectionAttemptMetadata.frequency) + return _internal_frequency(); +} +inline void ConnectionsLog_ConnectionAttemptMetadata::_internal_set_frequency(int32_t value) { + _has_bits_[0] |= 0x00000010u; + frequency_ = value; +} +inline void ConnectionsLog_ConnectionAttemptMetadata::set_frequency(int32_t value) { + _internal_set_frequency(value); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.ConnectionAttemptMetadata.frequency) +} + +// optional string network_operator = 4; +inline bool ConnectionsLog_ConnectionAttemptMetadata::_internal_has_network_operator() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool ConnectionsLog_ConnectionAttemptMetadata::has_network_operator() const { + return _internal_has_network_operator(); +} +inline void ConnectionsLog_ConnectionAttemptMetadata::clear_network_operator() { + network_operator_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& ConnectionsLog_ConnectionAttemptMetadata::network_operator() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.ConnectionAttemptMetadata.network_operator) + return _internal_network_operator(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void ConnectionsLog_ConnectionAttemptMetadata::set_network_operator(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + network_operator_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.ConnectionAttemptMetadata.network_operator) +} +inline std::string* ConnectionsLog_ConnectionAttemptMetadata::mutable_network_operator() { + std::string* _s = _internal_mutable_network_operator(); + // @@protoc_insertion_point(field_mutable:location.nearby.analytics.proto.ConnectionsLog.ConnectionAttemptMetadata.network_operator) + return _s; +} +inline const std::string& ConnectionsLog_ConnectionAttemptMetadata::_internal_network_operator() const { + return network_operator_.Get(); +} +inline void ConnectionsLog_ConnectionAttemptMetadata::_internal_set_network_operator(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + network_operator_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* ConnectionsLog_ConnectionAttemptMetadata::_internal_mutable_network_operator() { + _has_bits_[0] |= 0x00000001u; + return network_operator_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* ConnectionsLog_ConnectionAttemptMetadata::release_network_operator() { + // @@protoc_insertion_point(field_release:location.nearby.analytics.proto.ConnectionsLog.ConnectionAttemptMetadata.network_operator) + if (!_internal_has_network_operator()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = network_operator_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (network_operator_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + network_operator_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void ConnectionsLog_ConnectionAttemptMetadata::set_allocated_network_operator(std::string* network_operator) { + if (network_operator != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + network_operator_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), network_operator, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (network_operator_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + network_operator_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:location.nearby.analytics.proto.ConnectionsLog.ConnectionAttemptMetadata.network_operator) +} + +// optional string country_code = 5; +inline bool ConnectionsLog_ConnectionAttemptMetadata::_internal_has_country_code() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool ConnectionsLog_ConnectionAttemptMetadata::has_country_code() const { + return _internal_has_country_code(); +} +inline void ConnectionsLog_ConnectionAttemptMetadata::clear_country_code() { + country_code_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000002u; +} +inline const std::string& ConnectionsLog_ConnectionAttemptMetadata::country_code() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.ConnectionAttemptMetadata.country_code) + return _internal_country_code(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void ConnectionsLog_ConnectionAttemptMetadata::set_country_code(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000002u; + country_code_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.ConnectionAttemptMetadata.country_code) +} +inline std::string* ConnectionsLog_ConnectionAttemptMetadata::mutable_country_code() { + std::string* _s = _internal_mutable_country_code(); + // @@protoc_insertion_point(field_mutable:location.nearby.analytics.proto.ConnectionsLog.ConnectionAttemptMetadata.country_code) + return _s; +} +inline const std::string& ConnectionsLog_ConnectionAttemptMetadata::_internal_country_code() const { + return country_code_.Get(); +} +inline void ConnectionsLog_ConnectionAttemptMetadata::_internal_set_country_code(const std::string& value) { + _has_bits_[0] |= 0x00000002u; + country_code_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* ConnectionsLog_ConnectionAttemptMetadata::_internal_mutable_country_code() { + _has_bits_[0] |= 0x00000002u; + return country_code_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* ConnectionsLog_ConnectionAttemptMetadata::release_country_code() { + // @@protoc_insertion_point(field_release:location.nearby.analytics.proto.ConnectionsLog.ConnectionAttemptMetadata.country_code) + if (!_internal_has_country_code()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000002u; + auto* p = country_code_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (country_code_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + country_code_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void ConnectionsLog_ConnectionAttemptMetadata::set_allocated_country_code(std::string* country_code) { + if (country_code != nullptr) { + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + country_code_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), country_code, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (country_code_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + country_code_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:location.nearby.analytics.proto.ConnectionsLog.ConnectionAttemptMetadata.country_code) +} + +// optional bool is_tdls_used = 6; +inline bool ConnectionsLog_ConnectionAttemptMetadata::_internal_has_is_tdls_used() const { + bool value = (_has_bits_[0] & 0x00000040u) != 0; + return value; +} +inline bool ConnectionsLog_ConnectionAttemptMetadata::has_is_tdls_used() const { + return _internal_has_is_tdls_used(); +} +inline void ConnectionsLog_ConnectionAttemptMetadata::clear_is_tdls_used() { + is_tdls_used_ = false; + _has_bits_[0] &= ~0x00000040u; +} +inline bool ConnectionsLog_ConnectionAttemptMetadata::_internal_is_tdls_used() const { + return is_tdls_used_; +} +inline bool ConnectionsLog_ConnectionAttemptMetadata::is_tdls_used() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.ConnectionAttemptMetadata.is_tdls_used) + return _internal_is_tdls_used(); +} +inline void ConnectionsLog_ConnectionAttemptMetadata::_internal_set_is_tdls_used(bool value) { + _has_bits_[0] |= 0x00000040u; + is_tdls_used_ = value; +} +inline void ConnectionsLog_ConnectionAttemptMetadata::set_is_tdls_used(bool value) { + _internal_set_is_tdls_used(value); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.ConnectionAttemptMetadata.is_tdls_used) +} + +// optional int32 try_counts = 7; +inline bool ConnectionsLog_ConnectionAttemptMetadata::_internal_has_try_counts() const { + bool value = (_has_bits_[0] & 0x00000020u) != 0; + return value; +} +inline bool ConnectionsLog_ConnectionAttemptMetadata::has_try_counts() const { + return _internal_has_try_counts(); +} +inline void ConnectionsLog_ConnectionAttemptMetadata::clear_try_counts() { + try_counts_ = 0; + _has_bits_[0] &= ~0x00000020u; +} +inline int32_t ConnectionsLog_ConnectionAttemptMetadata::_internal_try_counts() const { + return try_counts_; +} +inline int32_t ConnectionsLog_ConnectionAttemptMetadata::try_counts() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.ConnectionAttemptMetadata.try_counts) + return _internal_try_counts(); +} +inline void ConnectionsLog_ConnectionAttemptMetadata::_internal_set_try_counts(int32_t value) { + _has_bits_[0] |= 0x00000020u; + try_counts_ = value; +} +inline void ConnectionsLog_ConnectionAttemptMetadata::set_try_counts(int32_t value) { + _internal_set_try_counts(value); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.ConnectionAttemptMetadata.try_counts) +} + +// optional bool wifi_hotspot_status = 8; +inline bool ConnectionsLog_ConnectionAttemptMetadata::_internal_has_wifi_hotspot_status() const { + bool value = (_has_bits_[0] & 0x00000080u) != 0; + return value; +} +inline bool ConnectionsLog_ConnectionAttemptMetadata::has_wifi_hotspot_status() const { + return _internal_has_wifi_hotspot_status(); +} +inline void ConnectionsLog_ConnectionAttemptMetadata::clear_wifi_hotspot_status() { + wifi_hotspot_status_ = false; + _has_bits_[0] &= ~0x00000080u; +} +inline bool ConnectionsLog_ConnectionAttemptMetadata::_internal_wifi_hotspot_status() const { + return wifi_hotspot_status_; +} +inline bool ConnectionsLog_ConnectionAttemptMetadata::wifi_hotspot_status() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.ConnectionAttemptMetadata.wifi_hotspot_status) + return _internal_wifi_hotspot_status(); +} +inline void ConnectionsLog_ConnectionAttemptMetadata::_internal_set_wifi_hotspot_status(bool value) { + _has_bits_[0] |= 0x00000080u; + wifi_hotspot_status_ = value; +} +inline void ConnectionsLog_ConnectionAttemptMetadata::set_wifi_hotspot_status(bool value) { + _internal_set_wifi_hotspot_status(value); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.ConnectionAttemptMetadata.wifi_hotspot_status) +} + +// optional int32 max_tx_speed = 9; +inline bool ConnectionsLog_ConnectionAttemptMetadata::_internal_has_max_tx_speed() const { + bool value = (_has_bits_[0] & 0x00000100u) != 0; + return value; +} +inline bool ConnectionsLog_ConnectionAttemptMetadata::has_max_tx_speed() const { + return _internal_has_max_tx_speed(); +} +inline void ConnectionsLog_ConnectionAttemptMetadata::clear_max_tx_speed() { + max_tx_speed_ = 0; + _has_bits_[0] &= ~0x00000100u; +} +inline int32_t ConnectionsLog_ConnectionAttemptMetadata::_internal_max_tx_speed() const { + return max_tx_speed_; +} +inline int32_t ConnectionsLog_ConnectionAttemptMetadata::max_tx_speed() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.ConnectionAttemptMetadata.max_tx_speed) + return _internal_max_tx_speed(); +} +inline void ConnectionsLog_ConnectionAttemptMetadata::_internal_set_max_tx_speed(int32_t value) { + _has_bits_[0] |= 0x00000100u; + max_tx_speed_ = value; +} +inline void ConnectionsLog_ConnectionAttemptMetadata::set_max_tx_speed(int32_t value) { + _internal_set_max_tx_speed(value); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.ConnectionAttemptMetadata.max_tx_speed) +} + +// optional int32 max_rx_speed = 10; +inline bool ConnectionsLog_ConnectionAttemptMetadata::_internal_has_max_rx_speed() const { + bool value = (_has_bits_[0] & 0x00000200u) != 0; + return value; +} +inline bool ConnectionsLog_ConnectionAttemptMetadata::has_max_rx_speed() const { + return _internal_has_max_rx_speed(); +} +inline void ConnectionsLog_ConnectionAttemptMetadata::clear_max_rx_speed() { + max_rx_speed_ = 0; + _has_bits_[0] &= ~0x00000200u; +} +inline int32_t ConnectionsLog_ConnectionAttemptMetadata::_internal_max_rx_speed() const { + return max_rx_speed_; +} +inline int32_t ConnectionsLog_ConnectionAttemptMetadata::max_rx_speed() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.ConnectionAttemptMetadata.max_rx_speed) + return _internal_max_rx_speed(); +} +inline void ConnectionsLog_ConnectionAttemptMetadata::_internal_set_max_rx_speed(int32_t value) { + _has_bits_[0] |= 0x00000200u; + max_rx_speed_ = value; +} +inline void ConnectionsLog_ConnectionAttemptMetadata::set_max_rx_speed(int32_t value) { + _internal_set_max_rx_speed(value); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.ConnectionAttemptMetadata.max_rx_speed) +} + +// optional int32 wifi_channel_width = 11; +inline bool ConnectionsLog_ConnectionAttemptMetadata::_internal_has_wifi_channel_width() const { + bool value = (_has_bits_[0] & 0x00000400u) != 0; + return value; +} +inline bool ConnectionsLog_ConnectionAttemptMetadata::has_wifi_channel_width() const { + return _internal_has_wifi_channel_width(); +} +inline void ConnectionsLog_ConnectionAttemptMetadata::clear_wifi_channel_width() { + wifi_channel_width_ = 0; + _has_bits_[0] &= ~0x00000400u; +} +inline int32_t ConnectionsLog_ConnectionAttemptMetadata::_internal_wifi_channel_width() const { + return wifi_channel_width_; +} +inline int32_t ConnectionsLog_ConnectionAttemptMetadata::wifi_channel_width() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.ConnectionAttemptMetadata.wifi_channel_width) + return _internal_wifi_channel_width(); +} +inline void ConnectionsLog_ConnectionAttemptMetadata::_internal_set_wifi_channel_width(int32_t value) { + _has_bits_[0] |= 0x00000400u; + wifi_channel_width_ = value; +} +inline void ConnectionsLog_ConnectionAttemptMetadata::set_wifi_channel_width(int32_t value) { + _internal_set_wifi_channel_width(value); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.ConnectionAttemptMetadata.wifi_channel_width) +} + +// optional int32 send_buffer_size = 12; +inline bool ConnectionsLog_ConnectionAttemptMetadata::_internal_has_send_buffer_size() const { + bool value = (_has_bits_[0] & 0x00000800u) != 0; + return value; +} +inline bool ConnectionsLog_ConnectionAttemptMetadata::has_send_buffer_size() const { + return _internal_has_send_buffer_size(); +} +inline void ConnectionsLog_ConnectionAttemptMetadata::clear_send_buffer_size() { + send_buffer_size_ = 0; + _has_bits_[0] &= ~0x00000800u; +} +inline int32_t ConnectionsLog_ConnectionAttemptMetadata::_internal_send_buffer_size() const { + return send_buffer_size_; +} +inline int32_t ConnectionsLog_ConnectionAttemptMetadata::send_buffer_size() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.ConnectionAttemptMetadata.send_buffer_size) + return _internal_send_buffer_size(); +} +inline void ConnectionsLog_ConnectionAttemptMetadata::_internal_set_send_buffer_size(int32_t value) { + _has_bits_[0] |= 0x00000800u; + send_buffer_size_ = value; +} +inline void ConnectionsLog_ConnectionAttemptMetadata::set_send_buffer_size(int32_t value) { + _internal_set_send_buffer_size(value); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.ConnectionAttemptMetadata.send_buffer_size) +} + +// optional int32 receive_buffer_size = 13; +inline bool ConnectionsLog_ConnectionAttemptMetadata::_internal_has_receive_buffer_size() const { + bool value = (_has_bits_[0] & 0x00001000u) != 0; + return value; +} +inline bool ConnectionsLog_ConnectionAttemptMetadata::has_receive_buffer_size() const { + return _internal_has_receive_buffer_size(); +} +inline void ConnectionsLog_ConnectionAttemptMetadata::clear_receive_buffer_size() { + receive_buffer_size_ = 0; + _has_bits_[0] &= ~0x00001000u; +} +inline int32_t ConnectionsLog_ConnectionAttemptMetadata::_internal_receive_buffer_size() const { + return receive_buffer_size_; +} +inline int32_t ConnectionsLog_ConnectionAttemptMetadata::receive_buffer_size() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.ConnectionAttemptMetadata.receive_buffer_size) + return _internal_receive_buffer_size(); +} +inline void ConnectionsLog_ConnectionAttemptMetadata::_internal_set_receive_buffer_size(int32_t value) { + _has_bits_[0] |= 0x00001000u; + receive_buffer_size_ = value; +} +inline void ConnectionsLog_ConnectionAttemptMetadata::set_receive_buffer_size(int32_t value) { + _internal_set_receive_buffer_size(value); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.ConnectionAttemptMetadata.receive_buffer_size) +} + +// ------------------------------------------------------------------- + +// ConnectionsLog + +// optional .location.nearby.proto.connections.EventType event_type = 1; +inline bool ConnectionsLog::_internal_has_event_type() const { + bool value = (_has_bits_[0] & 0x00000010u) != 0; + return value; +} +inline bool ConnectionsLog::has_event_type() const { + return _internal_has_event_type(); +} +inline void ConnectionsLog::clear_event_type() { + event_type_ = 0; + _has_bits_[0] &= ~0x00000010u; +} +inline ::location::nearby::proto::connections::EventType ConnectionsLog::_internal_event_type() const { + return static_cast< ::location::nearby::proto::connections::EventType >(event_type_); +} +inline ::location::nearby::proto::connections::EventType ConnectionsLog::event_type() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.event_type) + return _internal_event_type(); +} +inline void ConnectionsLog::_internal_set_event_type(::location::nearby::proto::connections::EventType value) { + assert(::location::nearby::proto::connections::EventType_IsValid(value)); + _has_bits_[0] |= 0x00000010u; + event_type_ = value; +} +inline void ConnectionsLog::set_event_type(::location::nearby::proto::connections::EventType value) { + _internal_set_event_type(value); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.event_type) +} + +// optional .location.nearby.analytics.proto.ConnectionsLog.ClientSession client_session = 2; +inline bool ConnectionsLog::_internal_has_client_session() const { + bool value = (_has_bits_[0] & 0x00000004u) != 0; + PROTOBUF_ASSUME(!value || client_session_ != nullptr); + return value; +} +inline bool ConnectionsLog::has_client_session() const { + return _internal_has_client_session(); +} +inline void ConnectionsLog::clear_client_session() { + if (client_session_ != nullptr) client_session_->Clear(); + _has_bits_[0] &= ~0x00000004u; +} +inline const ::location::nearby::analytics::proto::ConnectionsLog_ClientSession& ConnectionsLog::_internal_client_session() const { + const ::location::nearby::analytics::proto::ConnectionsLog_ClientSession* p = client_session_; + return p != nullptr ? *p : reinterpret_cast( + ::location::nearby::analytics::proto::_ConnectionsLog_ClientSession_default_instance_); +} +inline const ::location::nearby::analytics::proto::ConnectionsLog_ClientSession& ConnectionsLog::client_session() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.client_session) + return _internal_client_session(); +} +inline void ConnectionsLog::unsafe_arena_set_allocated_client_session( + ::location::nearby::analytics::proto::ConnectionsLog_ClientSession* client_session) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(client_session_); + } + client_session_ = client_session; + if (client_session) { + _has_bits_[0] |= 0x00000004u; + } else { + _has_bits_[0] &= ~0x00000004u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:location.nearby.analytics.proto.ConnectionsLog.client_session) +} +inline ::location::nearby::analytics::proto::ConnectionsLog_ClientSession* ConnectionsLog::release_client_session() { + _has_bits_[0] &= ~0x00000004u; + ::location::nearby::analytics::proto::ConnectionsLog_ClientSession* temp = client_session_; + client_session_ = 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 ::location::nearby::analytics::proto::ConnectionsLog_ClientSession* ConnectionsLog::unsafe_arena_release_client_session() { + // @@protoc_insertion_point(field_release:location.nearby.analytics.proto.ConnectionsLog.client_session) + _has_bits_[0] &= ~0x00000004u; + ::location::nearby::analytics::proto::ConnectionsLog_ClientSession* temp = client_session_; + client_session_ = nullptr; + return temp; +} +inline ::location::nearby::analytics::proto::ConnectionsLog_ClientSession* ConnectionsLog::_internal_mutable_client_session() { + _has_bits_[0] |= 0x00000004u; + if (client_session_ == nullptr) { + auto* p = CreateMaybeMessage<::location::nearby::analytics::proto::ConnectionsLog_ClientSession>(GetArenaForAllocation()); + client_session_ = p; + } + return client_session_; +} +inline ::location::nearby::analytics::proto::ConnectionsLog_ClientSession* ConnectionsLog::mutable_client_session() { + ::location::nearby::analytics::proto::ConnectionsLog_ClientSession* _msg = _internal_mutable_client_session(); + // @@protoc_insertion_point(field_mutable:location.nearby.analytics.proto.ConnectionsLog.client_session) + return _msg; +} +inline void ConnectionsLog::set_allocated_client_session(::location::nearby::analytics::proto::ConnectionsLog_ClientSession* client_session) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete client_session_; + } + if (client_session) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::location::nearby::analytics::proto::ConnectionsLog_ClientSession>::GetOwningArena(client_session); + if (message_arena != submessage_arena) { + client_session = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, client_session, submessage_arena); + } + _has_bits_[0] |= 0x00000004u; + } else { + _has_bits_[0] &= ~0x00000004u; + } + client_session_ = client_session; + // @@protoc_insertion_point(field_set_allocated:location.nearby.analytics.proto.ConnectionsLog.client_session) +} + +// optional string version = 3; +inline bool ConnectionsLog::_internal_has_version() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool ConnectionsLog::has_version() const { + return _internal_has_version(); +} +inline void ConnectionsLog::clear_version() { + version_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& ConnectionsLog::version() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.version) + return _internal_version(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void ConnectionsLog::set_version(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + version_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.version) +} +inline std::string* ConnectionsLog::mutable_version() { + std::string* _s = _internal_mutable_version(); + // @@protoc_insertion_point(field_mutable:location.nearby.analytics.proto.ConnectionsLog.version) + return _s; +} +inline const std::string& ConnectionsLog::_internal_version() const { + return version_.Get(); +} +inline void ConnectionsLog::_internal_set_version(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + version_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* ConnectionsLog::_internal_mutable_version() { + _has_bits_[0] |= 0x00000001u; + return version_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* ConnectionsLog::release_version() { + // @@protoc_insertion_point(field_release:location.nearby.analytics.proto.ConnectionsLog.version) + if (!_internal_has_version()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = version_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (version_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + version_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void ConnectionsLog::set_allocated_version(std::string* version) { + if (version != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + version_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), version, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (version_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + version_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:location.nearby.analytics.proto.ConnectionsLog.version) +} + +// optional .location.nearby.analytics.proto.ConnectionsLog.ErrorCode error_code = 4; +inline bool ConnectionsLog::_internal_has_error_code() const { + bool value = (_has_bits_[0] & 0x00000008u) != 0; + PROTOBUF_ASSUME(!value || error_code_ != nullptr); + return value; +} +inline bool ConnectionsLog::has_error_code() const { + return _internal_has_error_code(); +} +inline void ConnectionsLog::clear_error_code() { + if (error_code_ != nullptr) error_code_->Clear(); + _has_bits_[0] &= ~0x00000008u; +} +inline const ::location::nearby::analytics::proto::ConnectionsLog_ErrorCode& ConnectionsLog::_internal_error_code() const { + const ::location::nearby::analytics::proto::ConnectionsLog_ErrorCode* p = error_code_; + return p != nullptr ? *p : reinterpret_cast( + ::location::nearby::analytics::proto::_ConnectionsLog_ErrorCode_default_instance_); +} +inline const ::location::nearby::analytics::proto::ConnectionsLog_ErrorCode& ConnectionsLog::error_code() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.error_code) + return _internal_error_code(); +} +inline void ConnectionsLog::unsafe_arena_set_allocated_error_code( + ::location::nearby::analytics::proto::ConnectionsLog_ErrorCode* error_code) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(error_code_); + } + error_code_ = error_code; + if (error_code) { + _has_bits_[0] |= 0x00000008u; + } else { + _has_bits_[0] &= ~0x00000008u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:location.nearby.analytics.proto.ConnectionsLog.error_code) +} +inline ::location::nearby::analytics::proto::ConnectionsLog_ErrorCode* ConnectionsLog::release_error_code() { + _has_bits_[0] &= ~0x00000008u; + ::location::nearby::analytics::proto::ConnectionsLog_ErrorCode* temp = error_code_; + error_code_ = 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 ::location::nearby::analytics::proto::ConnectionsLog_ErrorCode* ConnectionsLog::unsafe_arena_release_error_code() { + // @@protoc_insertion_point(field_release:location.nearby.analytics.proto.ConnectionsLog.error_code) + _has_bits_[0] &= ~0x00000008u; + ::location::nearby::analytics::proto::ConnectionsLog_ErrorCode* temp = error_code_; + error_code_ = nullptr; + return temp; +} +inline ::location::nearby::analytics::proto::ConnectionsLog_ErrorCode* ConnectionsLog::_internal_mutable_error_code() { + _has_bits_[0] |= 0x00000008u; + if (error_code_ == nullptr) { + auto* p = CreateMaybeMessage<::location::nearby::analytics::proto::ConnectionsLog_ErrorCode>(GetArenaForAllocation()); + error_code_ = p; + } + return error_code_; +} +inline ::location::nearby::analytics::proto::ConnectionsLog_ErrorCode* ConnectionsLog::mutable_error_code() { + ::location::nearby::analytics::proto::ConnectionsLog_ErrorCode* _msg = _internal_mutable_error_code(); + // @@protoc_insertion_point(field_mutable:location.nearby.analytics.proto.ConnectionsLog.error_code) + return _msg; +} +inline void ConnectionsLog::set_allocated_error_code(::location::nearby::analytics::proto::ConnectionsLog_ErrorCode* error_code) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete error_code_; + } + if (error_code) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::location::nearby::analytics::proto::ConnectionsLog_ErrorCode>::GetOwningArena(error_code); + if (message_arena != submessage_arena) { + error_code = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, error_code, submessage_arena); + } + _has_bits_[0] |= 0x00000008u; + } else { + _has_bits_[0] &= ~0x00000008u; + } + error_code_ = error_code; + // @@protoc_insertion_point(field_set_allocated:location.nearby.analytics.proto.ConnectionsLog.error_code) +} + +// optional .location.nearby.proto.connections.LogSource log_source = 5; +inline bool ConnectionsLog::_internal_has_log_source() const { + bool value = (_has_bits_[0] & 0x00000020u) != 0; + return value; +} +inline bool ConnectionsLog::has_log_source() const { + return _internal_has_log_source(); +} +inline void ConnectionsLog::clear_log_source() { + log_source_ = 0; + _has_bits_[0] &= ~0x00000020u; +} +inline ::location::nearby::proto::connections::LogSource ConnectionsLog::_internal_log_source() const { + return static_cast< ::location::nearby::proto::connections::LogSource >(log_source_); +} +inline ::location::nearby::proto::connections::LogSource ConnectionsLog::log_source() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.log_source) + return _internal_log_source(); +} +inline void ConnectionsLog::_internal_set_log_source(::location::nearby::proto::connections::LogSource value) { + assert(::location::nearby::proto::connections::LogSource_IsValid(value)); + _has_bits_[0] |= 0x00000020u; + log_source_ = value; +} +inline void ConnectionsLog::set_log_source(::location::nearby::proto::connections::LogSource value) { + _internal_set_log_source(value); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.log_source) +} + +// optional string files_migration_phase = 6; +inline bool ConnectionsLog::_internal_has_files_migration_phase() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool ConnectionsLog::has_files_migration_phase() const { + return _internal_has_files_migration_phase(); +} +inline void ConnectionsLog::clear_files_migration_phase() { + files_migration_phase_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000002u; +} +inline const std::string& ConnectionsLog::files_migration_phase() const { + // @@protoc_insertion_point(field_get:location.nearby.analytics.proto.ConnectionsLog.files_migration_phase) + return _internal_files_migration_phase(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void ConnectionsLog::set_files_migration_phase(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000002u; + files_migration_phase_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:location.nearby.analytics.proto.ConnectionsLog.files_migration_phase) +} +inline std::string* ConnectionsLog::mutable_files_migration_phase() { + std::string* _s = _internal_mutable_files_migration_phase(); + // @@protoc_insertion_point(field_mutable:location.nearby.analytics.proto.ConnectionsLog.files_migration_phase) + return _s; +} +inline const std::string& ConnectionsLog::_internal_files_migration_phase() const { + return files_migration_phase_.Get(); +} +inline void ConnectionsLog::_internal_set_files_migration_phase(const std::string& value) { + _has_bits_[0] |= 0x00000002u; + files_migration_phase_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* ConnectionsLog::_internal_mutable_files_migration_phase() { + _has_bits_[0] |= 0x00000002u; + return files_migration_phase_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* ConnectionsLog::release_files_migration_phase() { + // @@protoc_insertion_point(field_release:location.nearby.analytics.proto.ConnectionsLog.files_migration_phase) + if (!_internal_has_files_migration_phase()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000002u; + auto* p = files_migration_phase_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (files_migration_phase_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + files_migration_phase_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void ConnectionsLog::set_allocated_files_migration_phase(std::string* files_migration_phase) { + if (files_migration_phase != nullptr) { + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + files_migration_phase_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), files_migration_phase, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (files_migration_phase_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + files_migration_phase_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:location.nearby.analytics.proto.ConnectionsLog.files_migration_phase) +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace proto +} // namespace analytics +} // namespace nearby +} // namespace location + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_internal_2fproto_2fanalytics_2fconnections_5flog_2eproto diff --git a/proto/connections_enums.pb.cc b/proto/connections_enums.pb.cc new file mode 100644 index 00000000..1b37f696 --- /dev/null +++ b/proto/connections_enums.pb.cc @@ -0,0 +1,1348 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: proto/connections_enums.proto + +#include "proto/connections_enums.pb.h" + +#include + +#include +#include +#include +// @@protoc_insertion_point(includes) +#include + +PROTOBUF_PRAGMA_INIT_SEG +namespace location { +namespace nearby { +namespace proto { +namespace connections { +} // namespace connections +} // namespace proto +} // namespace nearby +} // namespace location +namespace location { +namespace nearby { +namespace proto { +namespace connections { +bool EventType_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 EventType_strings[7] = {}; + +static const char EventType_names[] = + "CLIENT_SESSION" + "ERROR_CODE" + "START_CLIENT_SESSION" + "START_STRATEGY_SESSION" + "STOP_CLIENT_SESSION" + "STOP_STRATEGY_SESSION" + "UNKNOWN_EVENT_TYPE"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry EventType_entries[] = { + { {EventType_names + 0, 14}, 1 }, + { {EventType_names + 14, 10}, 6 }, + { {EventType_names + 24, 20}, 2 }, + { {EventType_names + 44, 22}, 4 }, + { {EventType_names + 66, 19}, 3 }, + { {EventType_names + 85, 21}, 5 }, + { {EventType_names + 106, 18}, 0 }, +}; + +static const int EventType_entries_by_number[] = { + 6, // 0 -> UNKNOWN_EVENT_TYPE + 0, // 1 -> CLIENT_SESSION + 2, // 2 -> START_CLIENT_SESSION + 4, // 3 -> STOP_CLIENT_SESSION + 3, // 4 -> START_STRATEGY_SESSION + 5, // 5 -> STOP_STRATEGY_SESSION + 1, // 6 -> ERROR_CODE +}; + +const std::string& EventType_Name( + EventType value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + EventType_entries, + EventType_entries_by_number, + 7, EventType_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + EventType_entries, + EventType_entries_by_number, + 7, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + EventType_strings[idx].get(); +} +bool EventType_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, EventType* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + EventType_entries, 7, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} +bool ConnectionsStrategy_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + return true; + default: + return false; + } +} + +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed ConnectionsStrategy_strings[6] = {}; + +static const char ConnectionsStrategy_names[] = + "MDNS_LOCAL_WIFI" + "P2P_CLUSTER" + "P2P_POINT_TO_POINT" + "P2P_STAR" + "RADIO_P2P" + "UNKNOWN_STRATEGY"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry ConnectionsStrategy_entries[] = { + { {ConnectionsStrategy_names + 0, 15}, 1 }, + { {ConnectionsStrategy_names + 15, 11}, 3 }, + { {ConnectionsStrategy_names + 26, 18}, 5 }, + { {ConnectionsStrategy_names + 44, 8}, 4 }, + { {ConnectionsStrategy_names + 52, 9}, 2 }, + { {ConnectionsStrategy_names + 61, 16}, 0 }, +}; + +static const int ConnectionsStrategy_entries_by_number[] = { + 5, // 0 -> UNKNOWN_STRATEGY + 0, // 1 -> MDNS_LOCAL_WIFI + 4, // 2 -> RADIO_P2P + 1, // 3 -> P2P_CLUSTER + 3, // 4 -> P2P_STAR + 2, // 5 -> P2P_POINT_TO_POINT +}; + +const std::string& ConnectionsStrategy_Name( + ConnectionsStrategy value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + ConnectionsStrategy_entries, + ConnectionsStrategy_entries_by_number, + 6, ConnectionsStrategy_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + ConnectionsStrategy_entries, + ConnectionsStrategy_entries_by_number, + 6, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + ConnectionsStrategy_strings[idx].get(); +} +bool ConnectionsStrategy_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, ConnectionsStrategy* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + ConnectionsStrategy_entries, 6, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} +bool SessionRole_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + return true; + default: + return false; + } +} + +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed SessionRole_strings[3] = {}; + +static const char SessionRole_names[] = + "ADVERTISER" + "DISCOVERER" + "UNKNOWN_SESSION_ROLE"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry SessionRole_entries[] = { + { {SessionRole_names + 0, 10}, 1 }, + { {SessionRole_names + 10, 10}, 2 }, + { {SessionRole_names + 20, 20}, 0 }, +}; + +static const int SessionRole_entries_by_number[] = { + 2, // 0 -> UNKNOWN_SESSION_ROLE + 0, // 1 -> ADVERTISER + 1, // 2 -> DISCOVERER +}; + +const std::string& SessionRole_Name( + SessionRole value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + SessionRole_entries, + SessionRole_entries_by_number, + 3, SessionRole_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + SessionRole_entries, + SessionRole_entries_by_number, + 3, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + SessionRole_strings[idx].get(); +} +bool SessionRole_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, SessionRole* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + SessionRole_entries, 3, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} +bool Medium_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: + return true; + default: + return false; + } +} + +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed Medium_strings[11] = {}; + +static const char Medium_names[] = + "BLE" + "BLE_L2CAP" + "BLUETOOTH" + "MDNS" + "NFC" + "UNKNOWN_MEDIUM" + "WEB_RTC" + "WIFI_AWARE" + "WIFI_DIRECT" + "WIFI_HOTSPOT" + "WIFI_LAN"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry Medium_entries[] = { + { {Medium_names + 0, 3}, 4 }, + { {Medium_names + 3, 9}, 10 }, + { {Medium_names + 12, 9}, 2 }, + { {Medium_names + 21, 4}, 1 }, + { {Medium_names + 25, 3}, 7 }, + { {Medium_names + 28, 14}, 0 }, + { {Medium_names + 42, 7}, 9 }, + { {Medium_names + 49, 10}, 6 }, + { {Medium_names + 59, 11}, 8 }, + { {Medium_names + 70, 12}, 3 }, + { {Medium_names + 82, 8}, 5 }, +}; + +static const int Medium_entries_by_number[] = { + 5, // 0 -> UNKNOWN_MEDIUM + 3, // 1 -> MDNS + 2, // 2 -> BLUETOOTH + 9, // 3 -> WIFI_HOTSPOT + 0, // 4 -> BLE + 10, // 5 -> WIFI_LAN + 7, // 6 -> WIFI_AWARE + 4, // 7 -> NFC + 8, // 8 -> WIFI_DIRECT + 6, // 9 -> WEB_RTC + 1, // 10 -> BLE_L2CAP +}; + +const std::string& Medium_Name( + Medium value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + Medium_entries, + Medium_entries_by_number, + 11, Medium_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + Medium_entries, + Medium_entries_by_number, + 11, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + Medium_strings[idx].get(); +} +bool Medium_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, Medium* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + Medium_entries, 11, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} +bool ConnectionTechnology_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 11: + return true; + default: + return false; + } +} + +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed ConnectionTechnology_strings[12] = {}; + +static const char ConnectionTechnology_names[] = + "CONNECTION_TECHNOLOGY_BLE_GATT" + "CONNECTION_TECHNOLOGY_BLE_L2CAP" + "CONNECTION_TECHNOLOGY_HOTSPOT_DIRECT" + "CONNECTION_TECHNOLOGY_HOTSPOT_LOCALONLY" + "CONNECTION_TECHNOLOGY_HOTSPOT_SOFTAP" + "CONNECTION_TECHNOLOGY_UNKNOWN_TECHNOLOGY" + "CONNECTION_TECHNOLOGY_WEBRTC_ADAPTER_TYPE_ANY" + "CONNECTION_TECHNOLOGY_WEBRTC_ETHERNET" + "CONNECTION_TECHNOLOGY_WEBRTC_LOOPBACK" + "CONNECTION_TECHNOLOGY_WEBRTC_MOBILE" + "CONNECTION_TECHNOLOGY_WEBRTC_VPN" + "CONNECTION_TECHNOLOGY_WEBRTC_WIFI"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry ConnectionTechnology_entries[] = { + { {ConnectionTechnology_names + 0, 30}, 1 }, + { {ConnectionTechnology_names + 30, 31}, 2 }, + { {ConnectionTechnology_names + 61, 36}, 3 }, + { {ConnectionTechnology_names + 97, 39}, 4 }, + { {ConnectionTechnology_names + 136, 36}, 5 }, + { {ConnectionTechnology_names + 172, 40}, 0 }, + { {ConnectionTechnology_names + 212, 45}, 11 }, + { {ConnectionTechnology_names + 257, 37}, 8 }, + { {ConnectionTechnology_names + 294, 37}, 10 }, + { {ConnectionTechnology_names + 331, 35}, 7 }, + { {ConnectionTechnology_names + 366, 32}, 9 }, + { {ConnectionTechnology_names + 398, 33}, 6 }, +}; + +static const int ConnectionTechnology_entries_by_number[] = { + 5, // 0 -> CONNECTION_TECHNOLOGY_UNKNOWN_TECHNOLOGY + 0, // 1 -> CONNECTION_TECHNOLOGY_BLE_GATT + 1, // 2 -> CONNECTION_TECHNOLOGY_BLE_L2CAP + 2, // 3 -> CONNECTION_TECHNOLOGY_HOTSPOT_DIRECT + 3, // 4 -> CONNECTION_TECHNOLOGY_HOTSPOT_LOCALONLY + 4, // 5 -> CONNECTION_TECHNOLOGY_HOTSPOT_SOFTAP + 11, // 6 -> CONNECTION_TECHNOLOGY_WEBRTC_WIFI + 9, // 7 -> CONNECTION_TECHNOLOGY_WEBRTC_MOBILE + 7, // 8 -> CONNECTION_TECHNOLOGY_WEBRTC_ETHERNET + 10, // 9 -> CONNECTION_TECHNOLOGY_WEBRTC_VPN + 8, // 10 -> CONNECTION_TECHNOLOGY_WEBRTC_LOOPBACK + 6, // 11 -> CONNECTION_TECHNOLOGY_WEBRTC_ADAPTER_TYPE_ANY +}; + +const std::string& ConnectionTechnology_Name( + ConnectionTechnology value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + ConnectionTechnology_entries, + ConnectionTechnology_entries_by_number, + 12, ConnectionTechnology_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + ConnectionTechnology_entries, + ConnectionTechnology_entries_by_number, + 12, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + ConnectionTechnology_strings[idx].get(); +} +bool ConnectionTechnology_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, ConnectionTechnology* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + ConnectionTechnology_entries, 12, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} +bool ConnectionBand_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + return true; + default: + return false; + } +} + +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed ConnectionBand_strings[8] = {}; + +static const char ConnectionBand_names[] = + "CONNECTION_BAND_CELLULAR_BAND_2G" + "CONNECTION_BAND_CELLULAR_BAND_3G" + "CONNECTION_BAND_CELLULAR_BAND_4G" + "CONNECTION_BAND_CELLULAR_BAND_5G" + "CONNECTION_BAND_UNKNOWN_BAND" + "CONNECTION_BAND_WIFI_BAND_2GHZ" + "CONNECTION_BAND_WIFI_BAND_5GHZ" + "CONNECTION_BAND_WIFI_BAND_6GHZ"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry ConnectionBand_entries[] = { + { {ConnectionBand_names + 0, 32}, 4 }, + { {ConnectionBand_names + 32, 32}, 5 }, + { {ConnectionBand_names + 64, 32}, 6 }, + { {ConnectionBand_names + 96, 32}, 7 }, + { {ConnectionBand_names + 128, 28}, 0 }, + { {ConnectionBand_names + 156, 30}, 1 }, + { {ConnectionBand_names + 186, 30}, 2 }, + { {ConnectionBand_names + 216, 30}, 3 }, +}; + +static const int ConnectionBand_entries_by_number[] = { + 4, // 0 -> CONNECTION_BAND_UNKNOWN_BAND + 5, // 1 -> CONNECTION_BAND_WIFI_BAND_2GHZ + 6, // 2 -> CONNECTION_BAND_WIFI_BAND_5GHZ + 7, // 3 -> CONNECTION_BAND_WIFI_BAND_6GHZ + 0, // 4 -> CONNECTION_BAND_CELLULAR_BAND_2G + 1, // 5 -> CONNECTION_BAND_CELLULAR_BAND_3G + 2, // 6 -> CONNECTION_BAND_CELLULAR_BAND_4G + 3, // 7 -> CONNECTION_BAND_CELLULAR_BAND_5G +}; + +const std::string& ConnectionBand_Name( + ConnectionBand value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + ConnectionBand_entries, + ConnectionBand_entries_by_number, + 8, ConnectionBand_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + ConnectionBand_entries, + ConnectionBand_entries_by_number, + 8, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + ConnectionBand_strings[idx].get(); +} +bool ConnectionBand_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, ConnectionBand* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + ConnectionBand_entries, 8, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} +bool ConnectionRequestResponse_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 ConnectionRequestResponse_strings[5] = {}; + +static const char ConnectionRequestResponse_names[] = + "ACCEPTED" + "IGNORED" + "NOT_SENT" + "REJECTED" + "UNKNOWN_CONNECTION_REQUEST_RESPONSE"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry ConnectionRequestResponse_entries[] = { + { {ConnectionRequestResponse_names + 0, 8}, 1 }, + { {ConnectionRequestResponse_names + 8, 7}, 3 }, + { {ConnectionRequestResponse_names + 15, 8}, 4 }, + { {ConnectionRequestResponse_names + 23, 8}, 2 }, + { {ConnectionRequestResponse_names + 31, 35}, 0 }, +}; + +static const int ConnectionRequestResponse_entries_by_number[] = { + 4, // 0 -> UNKNOWN_CONNECTION_REQUEST_RESPONSE + 0, // 1 -> ACCEPTED + 3, // 2 -> REJECTED + 1, // 3 -> IGNORED + 2, // 4 -> NOT_SENT +}; + +const std::string& ConnectionRequestResponse_Name( + ConnectionRequestResponse value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + ConnectionRequestResponse_entries, + ConnectionRequestResponse_entries_by_number, + 5, ConnectionRequestResponse_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + ConnectionRequestResponse_entries, + ConnectionRequestResponse_entries_by_number, + 5, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + ConnectionRequestResponse_strings[idx].get(); +} +bool ConnectionRequestResponse_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, ConnectionRequestResponse* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + ConnectionRequestResponse_entries, 5, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} +bool ConnectionAttemptResult_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + case 3: + return true; + default: + return false; + } +} + +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed ConnectionAttemptResult_strings[4] = {}; + +static const char ConnectionAttemptResult_names[] = + "RESULT_CANCELLED" + "RESULT_ERROR" + "RESULT_SUCCESS" + "UNKNOWN_CONNECTION_ATTEMPT_RESULT"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry ConnectionAttemptResult_entries[] = { + { {ConnectionAttemptResult_names + 0, 16}, 3 }, + { {ConnectionAttemptResult_names + 16, 12}, 2 }, + { {ConnectionAttemptResult_names + 28, 14}, 1 }, + { {ConnectionAttemptResult_names + 42, 33}, 0 }, +}; + +static const int ConnectionAttemptResult_entries_by_number[] = { + 3, // 0 -> UNKNOWN_CONNECTION_ATTEMPT_RESULT + 2, // 1 -> RESULT_SUCCESS + 1, // 2 -> RESULT_ERROR + 0, // 3 -> RESULT_CANCELLED +}; + +const std::string& ConnectionAttemptResult_Name( + ConnectionAttemptResult value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + ConnectionAttemptResult_entries, + ConnectionAttemptResult_entries_by_number, + 4, ConnectionAttemptResult_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + ConnectionAttemptResult_entries, + ConnectionAttemptResult_entries_by_number, + 4, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + ConnectionAttemptResult_strings[idx].get(); +} +bool ConnectionAttemptResult_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, ConnectionAttemptResult* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + ConnectionAttemptResult_entries, 4, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} +bool ConnectionAttemptDirection_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + return true; + default: + return false; + } +} + +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed ConnectionAttemptDirection_strings[3] = {}; + +static const char ConnectionAttemptDirection_names[] = + "INCOMING" + "OUTGOING" + "UNKNOWN_CONNECTION_ATTEMPT_DIRECTION"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry ConnectionAttemptDirection_entries[] = { + { {ConnectionAttemptDirection_names + 0, 8}, 1 }, + { {ConnectionAttemptDirection_names + 8, 8}, 2 }, + { {ConnectionAttemptDirection_names + 16, 36}, 0 }, +}; + +static const int ConnectionAttemptDirection_entries_by_number[] = { + 2, // 0 -> UNKNOWN_CONNECTION_ATTEMPT_DIRECTION + 0, // 1 -> INCOMING + 1, // 2 -> OUTGOING +}; + +const std::string& ConnectionAttemptDirection_Name( + ConnectionAttemptDirection value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + ConnectionAttemptDirection_entries, + ConnectionAttemptDirection_entries_by_number, + 3, ConnectionAttemptDirection_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + ConnectionAttemptDirection_entries, + ConnectionAttemptDirection_entries_by_number, + 3, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + ConnectionAttemptDirection_strings[idx].get(); +} +bool ConnectionAttemptDirection_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, ConnectionAttemptDirection* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + ConnectionAttemptDirection_entries, 3, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} +bool ConnectionAttemptType_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + return true; + default: + return false; + } +} + +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed ConnectionAttemptType_strings[3] = {}; + +static const char ConnectionAttemptType_names[] = + "INITIAL" + "UNKNOWN_CONNECTION_ATTEMPT_TYPE" + "UPGRADE"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry ConnectionAttemptType_entries[] = { + { {ConnectionAttemptType_names + 0, 7}, 1 }, + { {ConnectionAttemptType_names + 7, 31}, 0 }, + { {ConnectionAttemptType_names + 38, 7}, 2 }, +}; + +static const int ConnectionAttemptType_entries_by_number[] = { + 1, // 0 -> UNKNOWN_CONNECTION_ATTEMPT_TYPE + 0, // 1 -> INITIAL + 2, // 2 -> UPGRADE +}; + +const std::string& ConnectionAttemptType_Name( + ConnectionAttemptType value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + ConnectionAttemptType_entries, + ConnectionAttemptType_entries_by_number, + 3, ConnectionAttemptType_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + ConnectionAttemptType_entries, + ConnectionAttemptType_entries_by_number, + 3, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + ConnectionAttemptType_strings[idx].get(); +} +bool ConnectionAttemptType_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, ConnectionAttemptType* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + ConnectionAttemptType_entries, 3, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} +bool DisconnectionReason_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 DisconnectionReason_strings[7] = {}; + +static const char DisconnectionReason_names[] = + "IO_ERROR" + "LOCAL_DISCONNECTION" + "REMOTE_DISCONNECTION" + "SHUTDOWN" + "UNFINISHED" + "UNKNOWN_DISCONNECTION_REASON" + "UPGRADED"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry DisconnectionReason_entries[] = { + { {DisconnectionReason_names + 0, 8}, 3 }, + { {DisconnectionReason_names + 8, 19}, 1 }, + { {DisconnectionReason_names + 27, 20}, 2 }, + { {DisconnectionReason_names + 47, 8}, 5 }, + { {DisconnectionReason_names + 55, 10}, 6 }, + { {DisconnectionReason_names + 65, 28}, 0 }, + { {DisconnectionReason_names + 93, 8}, 4 }, +}; + +static const int DisconnectionReason_entries_by_number[] = { + 5, // 0 -> UNKNOWN_DISCONNECTION_REASON + 1, // 1 -> LOCAL_DISCONNECTION + 2, // 2 -> REMOTE_DISCONNECTION + 0, // 3 -> IO_ERROR + 6, // 4 -> UPGRADED + 3, // 5 -> SHUTDOWN + 4, // 6 -> UNFINISHED +}; + +const std::string& DisconnectionReason_Name( + DisconnectionReason value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + DisconnectionReason_entries, + DisconnectionReason_entries_by_number, + 7, DisconnectionReason_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + DisconnectionReason_entries, + DisconnectionReason_entries_by_number, + 7, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + DisconnectionReason_strings[idx].get(); +} +bool DisconnectionReason_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, DisconnectionReason* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + DisconnectionReason_entries, 7, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} +bool PayloadType_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + case 3: + return true; + default: + return false; + } +} + +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed PayloadType_strings[4] = {}; + +static const char PayloadType_names[] = + "BYTES" + "FILE" + "STREAM" + "UNKNOWN_PAYLOAD_TYPE"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry PayloadType_entries[] = { + { {PayloadType_names + 0, 5}, 1 }, + { {PayloadType_names + 5, 4}, 2 }, + { {PayloadType_names + 9, 6}, 3 }, + { {PayloadType_names + 15, 20}, 0 }, +}; + +static const int PayloadType_entries_by_number[] = { + 3, // 0 -> UNKNOWN_PAYLOAD_TYPE + 0, // 1 -> BYTES + 1, // 2 -> FILE + 2, // 3 -> STREAM +}; + +const std::string& PayloadType_Name( + PayloadType value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + PayloadType_entries, + PayloadType_entries_by_number, + 4, PayloadType_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + PayloadType_entries, + PayloadType_entries_by_number, + 4, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + PayloadType_strings[idx].get(); +} +bool PayloadType_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, PayloadType* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + PayloadType_entries, 4, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} +bool PayloadStatus_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: + return true; + default: + return false; + } +} + +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed PayloadStatus_strings[10] = {}; + +static const char PayloadStatus_names[] = + "CONNECTION_CLOSED" + "ENDPOINT_IO_ERROR" + "ENDPOINT_UNENCRYPTED" + "LOCAL_CANCELLATION" + "LOCAL_ERROR" + "MOVED_TO_NEW_MEDIUM" + "REMOTE_CANCELLATION" + "REMOTE_ERROR" + "SUCCESS" + "UNKNOWN_PAYLOAD_STATUS"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry PayloadStatus_entries[] = { + { {PayloadStatus_names + 0, 17}, 6 }, + { {PayloadStatus_names + 17, 17}, 4 }, + { {PayloadStatus_names + 34, 20}, 9 }, + { {PayloadStatus_names + 54, 18}, 7 }, + { {PayloadStatus_names + 72, 11}, 2 }, + { {PayloadStatus_names + 83, 19}, 5 }, + { {PayloadStatus_names + 102, 19}, 8 }, + { {PayloadStatus_names + 121, 12}, 3 }, + { {PayloadStatus_names + 133, 7}, 1 }, + { {PayloadStatus_names + 140, 22}, 0 }, +}; + +static const int PayloadStatus_entries_by_number[] = { + 9, // 0 -> UNKNOWN_PAYLOAD_STATUS + 8, // 1 -> SUCCESS + 4, // 2 -> LOCAL_ERROR + 7, // 3 -> REMOTE_ERROR + 1, // 4 -> ENDPOINT_IO_ERROR + 5, // 5 -> MOVED_TO_NEW_MEDIUM + 0, // 6 -> CONNECTION_CLOSED + 3, // 7 -> LOCAL_CANCELLATION + 6, // 8 -> REMOTE_CANCELLATION + 2, // 9 -> ENDPOINT_UNENCRYPTED +}; + +const std::string& PayloadStatus_Name( + PayloadStatus value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + PayloadStatus_entries, + PayloadStatus_entries_by_number, + 10, PayloadStatus_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + PayloadStatus_entries, + PayloadStatus_entries_by_number, + 10, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + PayloadStatus_strings[idx].get(); +} +bool PayloadStatus_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, PayloadStatus* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + PayloadStatus_entries, 10, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} +bool Bandwidth_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + case 3: + return true; + default: + return false; + } +} + +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed Bandwidth_strings[4] = {}; + +static const char Bandwidth_names[] = + "BANDWIDTH_24_GHZ" + "BANDWIDTH_5_GHZ" + "BANDWIDTH_6_GHZ" + "BANDWIDTH_UNKNOWN"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry Bandwidth_entries[] = { + { {Bandwidth_names + 0, 16}, 1 }, + { {Bandwidth_names + 16, 15}, 2 }, + { {Bandwidth_names + 31, 15}, 3 }, + { {Bandwidth_names + 46, 17}, 0 }, +}; + +static const int Bandwidth_entries_by_number[] = { + 3, // 0 -> BANDWIDTH_UNKNOWN + 0, // 1 -> BANDWIDTH_24_GHZ + 1, // 2 -> BANDWIDTH_5_GHZ + 2, // 3 -> BANDWIDTH_6_GHZ +}; + +const std::string& Bandwidth_Name( + Bandwidth value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + Bandwidth_entries, + Bandwidth_entries_by_number, + 4, Bandwidth_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + Bandwidth_entries, + Bandwidth_entries_by_number, + 4, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + Bandwidth_strings[idx].get(); +} +bool Bandwidth_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, Bandwidth* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + Bandwidth_entries, 4, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} +bool BandwidthUpgradeResult_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + return true; + default: + return false; + } +} + +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed BandwidthUpgradeResult_strings[17] = {}; + +static const char BandwidthUpgradeResult_names[] = + "ALREADY_ON_MEDIUM_ERROR" + "ATTEMPT_SKIPPED" + "BLUETOOTH_MEDIUM_ERROR" + "CHANNEL_ERROR" + "MEDIUM_ERROR" + "PROTOCOL_ERROR" + "RESULT_IO_ERROR" + "RESULT_REMOTE_ERROR" + "UNFINISHED_ERROR" + "UNKNOWN_BANDWIDTH_UPGRADE_RESULT" + "UPGRADE_RESULT_ERROR" + "UPGRADE_RESULT_SUCCESS" + "WEB_RTC_MEDIUM_ERROR" + "WIFI_AWARE_MEDIUM_ERROR" + "WIFI_DIRECT_MEDIUM_ERROR" + "WIFI_HOTSPOT_MEDIUM_ERROR" + "WIFI_LAN_MEDIUM_ERROR"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry BandwidthUpgradeResult_entries[] = { + { {BandwidthUpgradeResult_names + 0, 23}, 7 }, + { {BandwidthUpgradeResult_names + 23, 15}, 18 }, + { {BandwidthUpgradeResult_names + 38, 22}, 11 }, + { {BandwidthUpgradeResult_names + 60, 13}, 6 }, + { {BandwidthUpgradeResult_names + 73, 12}, 3 }, + { {BandwidthUpgradeResult_names + 85, 14}, 4 }, + { {BandwidthUpgradeResult_names + 99, 15}, 5 }, + { {BandwidthUpgradeResult_names + 114, 19}, 17 }, + { {BandwidthUpgradeResult_names + 133, 16}, 10 }, + { {BandwidthUpgradeResult_names + 149, 32}, 0 }, + { {BandwidthUpgradeResult_names + 181, 20}, 2 }, + { {BandwidthUpgradeResult_names + 201, 22}, 1 }, + { {BandwidthUpgradeResult_names + 223, 20}, 16 }, + { {BandwidthUpgradeResult_names + 243, 23}, 12 }, + { {BandwidthUpgradeResult_names + 266, 24}, 15 }, + { {BandwidthUpgradeResult_names + 290, 25}, 14 }, + { {BandwidthUpgradeResult_names + 315, 21}, 13 }, +}; + +static const int BandwidthUpgradeResult_entries_by_number[] = { + 9, // 0 -> UNKNOWN_BANDWIDTH_UPGRADE_RESULT + 11, // 1 -> UPGRADE_RESULT_SUCCESS + 10, // 2 -> UPGRADE_RESULT_ERROR + 4, // 3 -> MEDIUM_ERROR + 5, // 4 -> PROTOCOL_ERROR + 6, // 5 -> RESULT_IO_ERROR + 3, // 6 -> CHANNEL_ERROR + 0, // 7 -> ALREADY_ON_MEDIUM_ERROR + 8, // 10 -> UNFINISHED_ERROR + 2, // 11 -> BLUETOOTH_MEDIUM_ERROR + 13, // 12 -> WIFI_AWARE_MEDIUM_ERROR + 16, // 13 -> WIFI_LAN_MEDIUM_ERROR + 15, // 14 -> WIFI_HOTSPOT_MEDIUM_ERROR + 14, // 15 -> WIFI_DIRECT_MEDIUM_ERROR + 12, // 16 -> WEB_RTC_MEDIUM_ERROR + 7, // 17 -> RESULT_REMOTE_ERROR + 1, // 18 -> ATTEMPT_SKIPPED +}; + +const std::string& BandwidthUpgradeResult_Name( + BandwidthUpgradeResult value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + BandwidthUpgradeResult_entries, + BandwidthUpgradeResult_entries_by_number, + 17, BandwidthUpgradeResult_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + BandwidthUpgradeResult_entries, + BandwidthUpgradeResult_entries_by_number, + 17, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + BandwidthUpgradeResult_strings[idx].get(); +} +bool BandwidthUpgradeResult_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, BandwidthUpgradeResult* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + BandwidthUpgradeResult_entries, 17, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} +bool BandwidthUpgradeErrorStage_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 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + case 19: + case 20: + case 21: + case 22: + case 23: + case 24: + case 25: + case 26: + case 27: + case 28: + case 29: + case 30: + case 31: + case 32: + case 33: + case 34: + return true; + default: + return false; + } +} + +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed BandwidthUpgradeErrorStage_strings[35] = {}; + +static const char BandwidthUpgradeErrorStage_names[] = + "BLUETOOTH_CONNECT_OUTGOING" + "BLUETOOTH_LISTEN_INCOMING" + "BLUETOOTH_OBTAIN_MAC_ADDRESS" + "BLUETOOTH_PARSE_MAC_ADDRESS" + "BLUETOOTH_SOCKET_CREATION" + "CLIENT_INTRODUCTION" + "LAST_WRITE_TO_PRIOR_CHANNEL" + "NETWORK_AVAILABLE" + "PRIOR_ENDPOINT_CHANNEL" + "SAFE_TO_CLOSE_PRIOR_CHANNEL" + "SOCKET_CREATION" + "UNKNOWN_BANDWIDTH_UPGRADE_ERROR_STAGE" + "UPGRADE_CANCEL" + "UPGRADE_SUCCESS" + "UPGRADE_UNFINISHED" + "WEB_RTC_LISTEN_INCOMING" + "WEB_RTC_SOCKET_CREATION" + "WIFI_AWARE_CONNECT_TO_NETWORK" + "WIFI_AWARE_LISTEN_INCOMING" + "WIFI_AWARE_PUBLISH" + "WIFI_AWARE_SOCKET_CREATION" + "WIFI_AWARE_SUBSCRIBE" + "WIFI_CONNECT_TO_HOTSPOT" + "WIFI_DIRECT_CONNECT_OUTGOING" + "WIFI_DIRECT_CREATE_GROUP" + "WIFI_DIRECT_LISTEN_INCOMING" + "WIFI_DIRECT_PARSE_DEVICE_ADDRESS" + "WIFI_DIRECT_SOCKET_CREATION" + "WIFI_HOTSPOT_SOCKET_CREATION" + "WIFI_LAN_IP_ADDRESS" + "WIFI_LAN_LISTEN_INCOMING" + "WIFI_LAN_SOCKET_CONNECTION" + "WIFI_LAN_SOCKET_CREATION" + "WIFI_LISTEN_INCOMING" + "WIFI_START_HOTSPOT"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry BandwidthUpgradeErrorStage_entries[] = { + { {BandwidthUpgradeErrorStage_names + 0, 26}, 18 }, + { {BandwidthUpgradeErrorStage_names + 26, 25}, 16 }, + { {BandwidthUpgradeErrorStage_names + 51, 28}, 17 }, + { {BandwidthUpgradeErrorStage_names + 79, 27}, 19 }, + { {BandwidthUpgradeErrorStage_names + 106, 25}, 30 }, + { {BandwidthUpgradeErrorStage_names + 131, 19}, 1 }, + { {BandwidthUpgradeErrorStage_names + 150, 27}, 3 }, + { {BandwidthUpgradeErrorStage_names + 177, 17}, 2 }, + { {BandwidthUpgradeErrorStage_names + 194, 22}, 6 }, + { {BandwidthUpgradeErrorStage_names + 216, 27}, 4 }, + { {BandwidthUpgradeErrorStage_names + 243, 15}, 5 }, + { {BandwidthUpgradeErrorStage_names + 258, 37}, 0 }, + { {BandwidthUpgradeErrorStage_names + 295, 14}, 9 }, + { {BandwidthUpgradeErrorStage_names + 309, 15}, 8 }, + { {BandwidthUpgradeErrorStage_names + 324, 18}, 7 }, + { {BandwidthUpgradeErrorStage_names + 342, 23}, 34 }, + { {BandwidthUpgradeErrorStage_names + 365, 23}, 33 }, + { {BandwidthUpgradeErrorStage_names + 388, 29}, 23 }, + { {BandwidthUpgradeErrorStage_names + 417, 26}, 20 }, + { {BandwidthUpgradeErrorStage_names + 443, 18}, 21 }, + { {BandwidthUpgradeErrorStage_names + 461, 26}, 31 }, + { {BandwidthUpgradeErrorStage_names + 487, 20}, 22 }, + { {BandwidthUpgradeErrorStage_names + 507, 23}, 12 }, + { {BandwidthUpgradeErrorStage_names + 530, 28}, 26 }, + { {BandwidthUpgradeErrorStage_names + 558, 24}, 25 }, + { {BandwidthUpgradeErrorStage_names + 582, 27}, 24 }, + { {BandwidthUpgradeErrorStage_names + 609, 32}, 27 }, + { {BandwidthUpgradeErrorStage_names + 641, 27}, 32 }, + { {BandwidthUpgradeErrorStage_names + 668, 28}, 28 }, + { {BandwidthUpgradeErrorStage_names + 696, 19}, 14 }, + { {BandwidthUpgradeErrorStage_names + 715, 24}, 13 }, + { {BandwidthUpgradeErrorStage_names + 739, 26}, 15 }, + { {BandwidthUpgradeErrorStage_names + 765, 24}, 29 }, + { {BandwidthUpgradeErrorStage_names + 789, 20}, 11 }, + { {BandwidthUpgradeErrorStage_names + 809, 18}, 10 }, +}; + +static const int BandwidthUpgradeErrorStage_entries_by_number[] = { + 11, // 0 -> UNKNOWN_BANDWIDTH_UPGRADE_ERROR_STAGE + 5, // 1 -> CLIENT_INTRODUCTION + 7, // 2 -> NETWORK_AVAILABLE + 6, // 3 -> LAST_WRITE_TO_PRIOR_CHANNEL + 9, // 4 -> SAFE_TO_CLOSE_PRIOR_CHANNEL + 10, // 5 -> SOCKET_CREATION + 8, // 6 -> PRIOR_ENDPOINT_CHANNEL + 14, // 7 -> UPGRADE_UNFINISHED + 13, // 8 -> UPGRADE_SUCCESS + 12, // 9 -> UPGRADE_CANCEL + 34, // 10 -> WIFI_START_HOTSPOT + 33, // 11 -> WIFI_LISTEN_INCOMING + 22, // 12 -> WIFI_CONNECT_TO_HOTSPOT + 30, // 13 -> WIFI_LAN_LISTEN_INCOMING + 29, // 14 -> WIFI_LAN_IP_ADDRESS + 31, // 15 -> WIFI_LAN_SOCKET_CONNECTION + 1, // 16 -> BLUETOOTH_LISTEN_INCOMING + 2, // 17 -> BLUETOOTH_OBTAIN_MAC_ADDRESS + 0, // 18 -> BLUETOOTH_CONNECT_OUTGOING + 3, // 19 -> BLUETOOTH_PARSE_MAC_ADDRESS + 18, // 20 -> WIFI_AWARE_LISTEN_INCOMING + 19, // 21 -> WIFI_AWARE_PUBLISH + 21, // 22 -> WIFI_AWARE_SUBSCRIBE + 17, // 23 -> WIFI_AWARE_CONNECT_TO_NETWORK + 25, // 24 -> WIFI_DIRECT_LISTEN_INCOMING + 24, // 25 -> WIFI_DIRECT_CREATE_GROUP + 23, // 26 -> WIFI_DIRECT_CONNECT_OUTGOING + 26, // 27 -> WIFI_DIRECT_PARSE_DEVICE_ADDRESS + 28, // 28 -> WIFI_HOTSPOT_SOCKET_CREATION + 32, // 29 -> WIFI_LAN_SOCKET_CREATION + 4, // 30 -> BLUETOOTH_SOCKET_CREATION + 20, // 31 -> WIFI_AWARE_SOCKET_CREATION + 27, // 32 -> WIFI_DIRECT_SOCKET_CREATION + 16, // 33 -> WEB_RTC_SOCKET_CREATION + 15, // 34 -> WEB_RTC_LISTEN_INCOMING +}; + +const std::string& BandwidthUpgradeErrorStage_Name( + BandwidthUpgradeErrorStage value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + BandwidthUpgradeErrorStage_entries, + BandwidthUpgradeErrorStage_entries_by_number, + 35, BandwidthUpgradeErrorStage_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + BandwidthUpgradeErrorStage_entries, + BandwidthUpgradeErrorStage_entries_by_number, + 35, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + BandwidthUpgradeErrorStage_strings[idx].get(); +} +bool BandwidthUpgradeErrorStage_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, BandwidthUpgradeErrorStage* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + BandwidthUpgradeErrorStage_entries, 35, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} +bool LogSource_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + return true; + default: + return false; + } +} + +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed LogSource_strings[6] = {}; + +static const char LogSource_names[] = + "BETA_TESTER_DEVICES" + "DEBUG_DEVICES" + "INTERNAL_DEVICES" + "LAB_DEVICES" + "OEM_DEVICES" + "UNSPECIFIED_SOURCE"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry LogSource_entries[] = { + { {LogSource_names + 0, 19}, 3 }, + { {LogSource_names + 19, 13}, 5 }, + { {LogSource_names + 32, 16}, 2 }, + { {LogSource_names + 48, 11}, 1 }, + { {LogSource_names + 59, 11}, 4 }, + { {LogSource_names + 70, 18}, 0 }, +}; + +static const int LogSource_entries_by_number[] = { + 5, // 0 -> UNSPECIFIED_SOURCE + 3, // 1 -> LAB_DEVICES + 2, // 2 -> INTERNAL_DEVICES + 0, // 3 -> BETA_TESTER_DEVICES + 4, // 4 -> OEM_DEVICES + 1, // 5 -> DEBUG_DEVICES +}; + +const std::string& LogSource_Name( + LogSource value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + LogSource_entries, + LogSource_entries_by_number, + 6, LogSource_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + LogSource_entries, + LogSource_entries_by_number, + 6, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + LogSource_strings[idx].get(); +} +bool LogSource_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, LogSource* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + LogSource_entries, 6, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} + +// @@protoc_insertion_point(namespace_scope) +} // namespace connections +} // namespace proto +} // namespace nearby +} // namespace location +PROTOBUF_NAMESPACE_OPEN +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) +#include diff --git a/proto/connections_enums.pb.h b/proto/connections_enums.pb.h new file mode 100644 index 00000000..d6bc981d --- /dev/null +++ b/proto/connections_enums.pb.h @@ -0,0 +1,542 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: proto/connections_enums.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_proto_2fconnections_5fenums_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_proto_2fconnections_5fenums_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3019000 +#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 3019004 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_proto_2fconnections_5fenums_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_proto_2fconnections_5fenums_2eproto { + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::AuxiliaryParseTableField aux[] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[1] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[]; + static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[]; + static const uint32_t offsets[]; +}; +PROTOBUF_NAMESPACE_OPEN +PROTOBUF_NAMESPACE_CLOSE +namespace location { +namespace nearby { +namespace proto { +namespace connections { + +enum EventType : int { + UNKNOWN_EVENT_TYPE = 0, + CLIENT_SESSION = 1, + START_CLIENT_SESSION = 2, + STOP_CLIENT_SESSION = 3, + START_STRATEGY_SESSION = 4, + STOP_STRATEGY_SESSION = 5, + ERROR_CODE = 6 +}; +bool EventType_IsValid(int value); +constexpr EventType EventType_MIN = UNKNOWN_EVENT_TYPE; +constexpr EventType EventType_MAX = ERROR_CODE; +constexpr int EventType_ARRAYSIZE = EventType_MAX + 1; + +const std::string& EventType_Name(EventType value); +template +inline const std::string& EventType_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function EventType_Name."); + return EventType_Name(static_cast(enum_t_value)); +} +bool EventType_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, EventType* value); +enum ConnectionsStrategy : int { + UNKNOWN_STRATEGY = 0, + MDNS_LOCAL_WIFI PROTOBUF_DEPRECATED_ENUM = 1, + RADIO_P2P PROTOBUF_DEPRECATED_ENUM = 2, + P2P_CLUSTER = 3, + P2P_STAR = 4, + P2P_POINT_TO_POINT = 5 +}; +bool ConnectionsStrategy_IsValid(int value); +constexpr ConnectionsStrategy ConnectionsStrategy_MIN = UNKNOWN_STRATEGY; +constexpr ConnectionsStrategy ConnectionsStrategy_MAX = P2P_POINT_TO_POINT; +constexpr int ConnectionsStrategy_ARRAYSIZE = ConnectionsStrategy_MAX + 1; + +const std::string& ConnectionsStrategy_Name(ConnectionsStrategy value); +template +inline const std::string& ConnectionsStrategy_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function ConnectionsStrategy_Name."); + return ConnectionsStrategy_Name(static_cast(enum_t_value)); +} +bool ConnectionsStrategy_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, ConnectionsStrategy* value); +enum SessionRole : int { + UNKNOWN_SESSION_ROLE = 0, + ADVERTISER = 1, + DISCOVERER = 2 +}; +bool SessionRole_IsValid(int value); +constexpr SessionRole SessionRole_MIN = UNKNOWN_SESSION_ROLE; +constexpr SessionRole SessionRole_MAX = DISCOVERER; +constexpr int SessionRole_ARRAYSIZE = SessionRole_MAX + 1; + +const std::string& SessionRole_Name(SessionRole value); +template +inline const std::string& SessionRole_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function SessionRole_Name."); + return SessionRole_Name(static_cast(enum_t_value)); +} +bool SessionRole_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, SessionRole* value); +enum Medium : int { + UNKNOWN_MEDIUM = 0, + MDNS PROTOBUF_DEPRECATED_ENUM = 1, + BLUETOOTH = 2, + WIFI_HOTSPOT = 3, + BLE = 4, + WIFI_LAN = 5, + WIFI_AWARE = 6, + NFC = 7, + WIFI_DIRECT = 8, + WEB_RTC = 9, + BLE_L2CAP = 10 +}; +bool Medium_IsValid(int value); +constexpr Medium Medium_MIN = UNKNOWN_MEDIUM; +constexpr Medium Medium_MAX = BLE_L2CAP; +constexpr int Medium_ARRAYSIZE = Medium_MAX + 1; + +const std::string& Medium_Name(Medium value); +template +inline const std::string& Medium_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function Medium_Name."); + return Medium_Name(static_cast(enum_t_value)); +} +bool Medium_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, Medium* value); +enum ConnectionTechnology : int { + CONNECTION_TECHNOLOGY_UNKNOWN_TECHNOLOGY = 0, + CONNECTION_TECHNOLOGY_BLE_GATT = 1, + CONNECTION_TECHNOLOGY_BLE_L2CAP = 2, + CONNECTION_TECHNOLOGY_HOTSPOT_DIRECT = 3, + CONNECTION_TECHNOLOGY_HOTSPOT_LOCALONLY = 4, + CONNECTION_TECHNOLOGY_HOTSPOT_SOFTAP = 5, + CONNECTION_TECHNOLOGY_WEBRTC_WIFI = 6, + CONNECTION_TECHNOLOGY_WEBRTC_MOBILE = 7, + CONNECTION_TECHNOLOGY_WEBRTC_ETHERNET = 8, + CONNECTION_TECHNOLOGY_WEBRTC_VPN = 9, + CONNECTION_TECHNOLOGY_WEBRTC_LOOPBACK = 10, + CONNECTION_TECHNOLOGY_WEBRTC_ADAPTER_TYPE_ANY = 11 +}; +bool ConnectionTechnology_IsValid(int value); +constexpr ConnectionTechnology ConnectionTechnology_MIN = CONNECTION_TECHNOLOGY_UNKNOWN_TECHNOLOGY; +constexpr ConnectionTechnology ConnectionTechnology_MAX = CONNECTION_TECHNOLOGY_WEBRTC_ADAPTER_TYPE_ANY; +constexpr int ConnectionTechnology_ARRAYSIZE = ConnectionTechnology_MAX + 1; + +const std::string& ConnectionTechnology_Name(ConnectionTechnology value); +template +inline const std::string& ConnectionTechnology_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function ConnectionTechnology_Name."); + return ConnectionTechnology_Name(static_cast(enum_t_value)); +} +bool ConnectionTechnology_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, ConnectionTechnology* value); +enum ConnectionBand : int { + CONNECTION_BAND_UNKNOWN_BAND = 0, + CONNECTION_BAND_WIFI_BAND_2GHZ = 1, + CONNECTION_BAND_WIFI_BAND_5GHZ = 2, + CONNECTION_BAND_WIFI_BAND_6GHZ = 3, + CONNECTION_BAND_CELLULAR_BAND_2G = 4, + CONNECTION_BAND_CELLULAR_BAND_3G = 5, + CONNECTION_BAND_CELLULAR_BAND_4G = 6, + CONNECTION_BAND_CELLULAR_BAND_5G = 7 +}; +bool ConnectionBand_IsValid(int value); +constexpr ConnectionBand ConnectionBand_MIN = CONNECTION_BAND_UNKNOWN_BAND; +constexpr ConnectionBand ConnectionBand_MAX = CONNECTION_BAND_CELLULAR_BAND_5G; +constexpr int ConnectionBand_ARRAYSIZE = ConnectionBand_MAX + 1; + +const std::string& ConnectionBand_Name(ConnectionBand value); +template +inline const std::string& ConnectionBand_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function ConnectionBand_Name."); + return ConnectionBand_Name(static_cast(enum_t_value)); +} +bool ConnectionBand_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, ConnectionBand* value); +enum ConnectionRequestResponse : int { + UNKNOWN_CONNECTION_REQUEST_RESPONSE = 0, + ACCEPTED = 1, + REJECTED = 2, + IGNORED = 3, + NOT_SENT = 4 +}; +bool ConnectionRequestResponse_IsValid(int value); +constexpr ConnectionRequestResponse ConnectionRequestResponse_MIN = UNKNOWN_CONNECTION_REQUEST_RESPONSE; +constexpr ConnectionRequestResponse ConnectionRequestResponse_MAX = NOT_SENT; +constexpr int ConnectionRequestResponse_ARRAYSIZE = ConnectionRequestResponse_MAX + 1; + +const std::string& ConnectionRequestResponse_Name(ConnectionRequestResponse value); +template +inline const std::string& ConnectionRequestResponse_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function ConnectionRequestResponse_Name."); + return ConnectionRequestResponse_Name(static_cast(enum_t_value)); +} +bool ConnectionRequestResponse_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, ConnectionRequestResponse* value); +enum ConnectionAttemptResult : int { + UNKNOWN_CONNECTION_ATTEMPT_RESULT = 0, + RESULT_SUCCESS = 1, + RESULT_ERROR = 2, + RESULT_CANCELLED = 3 +}; +bool ConnectionAttemptResult_IsValid(int value); +constexpr ConnectionAttemptResult ConnectionAttemptResult_MIN = UNKNOWN_CONNECTION_ATTEMPT_RESULT; +constexpr ConnectionAttemptResult ConnectionAttemptResult_MAX = RESULT_CANCELLED; +constexpr int ConnectionAttemptResult_ARRAYSIZE = ConnectionAttemptResult_MAX + 1; + +const std::string& ConnectionAttemptResult_Name(ConnectionAttemptResult value); +template +inline const std::string& ConnectionAttemptResult_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function ConnectionAttemptResult_Name."); + return ConnectionAttemptResult_Name(static_cast(enum_t_value)); +} +bool ConnectionAttemptResult_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, ConnectionAttemptResult* value); +enum ConnectionAttemptDirection : int { + UNKNOWN_CONNECTION_ATTEMPT_DIRECTION = 0, + INCOMING = 1, + OUTGOING = 2 +}; +bool ConnectionAttemptDirection_IsValid(int value); +constexpr ConnectionAttemptDirection ConnectionAttemptDirection_MIN = UNKNOWN_CONNECTION_ATTEMPT_DIRECTION; +constexpr ConnectionAttemptDirection ConnectionAttemptDirection_MAX = OUTGOING; +constexpr int ConnectionAttemptDirection_ARRAYSIZE = ConnectionAttemptDirection_MAX + 1; + +const std::string& ConnectionAttemptDirection_Name(ConnectionAttemptDirection value); +template +inline const std::string& ConnectionAttemptDirection_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function ConnectionAttemptDirection_Name."); + return ConnectionAttemptDirection_Name(static_cast(enum_t_value)); +} +bool ConnectionAttemptDirection_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, ConnectionAttemptDirection* value); +enum ConnectionAttemptType : int { + UNKNOWN_CONNECTION_ATTEMPT_TYPE = 0, + INITIAL = 1, + UPGRADE = 2 +}; +bool ConnectionAttemptType_IsValid(int value); +constexpr ConnectionAttemptType ConnectionAttemptType_MIN = UNKNOWN_CONNECTION_ATTEMPT_TYPE; +constexpr ConnectionAttemptType ConnectionAttemptType_MAX = UPGRADE; +constexpr int ConnectionAttemptType_ARRAYSIZE = ConnectionAttemptType_MAX + 1; + +const std::string& ConnectionAttemptType_Name(ConnectionAttemptType value); +template +inline const std::string& ConnectionAttemptType_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function ConnectionAttemptType_Name."); + return ConnectionAttemptType_Name(static_cast(enum_t_value)); +} +bool ConnectionAttemptType_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, ConnectionAttemptType* value); +enum DisconnectionReason : int { + UNKNOWN_DISCONNECTION_REASON = 0, + LOCAL_DISCONNECTION = 1, + REMOTE_DISCONNECTION = 2, + IO_ERROR = 3, + UPGRADED = 4, + SHUTDOWN = 5, + UNFINISHED = 6 +}; +bool DisconnectionReason_IsValid(int value); +constexpr DisconnectionReason DisconnectionReason_MIN = UNKNOWN_DISCONNECTION_REASON; +constexpr DisconnectionReason DisconnectionReason_MAX = UNFINISHED; +constexpr int DisconnectionReason_ARRAYSIZE = DisconnectionReason_MAX + 1; + +const std::string& DisconnectionReason_Name(DisconnectionReason value); +template +inline const std::string& DisconnectionReason_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function DisconnectionReason_Name."); + return DisconnectionReason_Name(static_cast(enum_t_value)); +} +bool DisconnectionReason_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, DisconnectionReason* value); +enum PayloadType : int { + UNKNOWN_PAYLOAD_TYPE = 0, + BYTES = 1, + FILE = 2, + STREAM = 3 +}; +bool PayloadType_IsValid(int value); +constexpr PayloadType PayloadType_MIN = UNKNOWN_PAYLOAD_TYPE; +constexpr PayloadType PayloadType_MAX = STREAM; +constexpr int PayloadType_ARRAYSIZE = PayloadType_MAX + 1; + +const std::string& PayloadType_Name(PayloadType value); +template +inline const std::string& PayloadType_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function PayloadType_Name."); + return PayloadType_Name(static_cast(enum_t_value)); +} +bool PayloadType_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, PayloadType* value); +enum PayloadStatus : int { + UNKNOWN_PAYLOAD_STATUS = 0, + SUCCESS = 1, + LOCAL_ERROR = 2, + REMOTE_ERROR = 3, + ENDPOINT_IO_ERROR = 4, + MOVED_TO_NEW_MEDIUM = 5, + CONNECTION_CLOSED = 6, + LOCAL_CANCELLATION = 7, + REMOTE_CANCELLATION = 8, + ENDPOINT_UNENCRYPTED = 9 +}; +bool PayloadStatus_IsValid(int value); +constexpr PayloadStatus PayloadStatus_MIN = UNKNOWN_PAYLOAD_STATUS; +constexpr PayloadStatus PayloadStatus_MAX = ENDPOINT_UNENCRYPTED; +constexpr int PayloadStatus_ARRAYSIZE = PayloadStatus_MAX + 1; + +const std::string& PayloadStatus_Name(PayloadStatus value); +template +inline const std::string& PayloadStatus_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function PayloadStatus_Name."); + return PayloadStatus_Name(static_cast(enum_t_value)); +} +bool PayloadStatus_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, PayloadStatus* value); +enum Bandwidth : int { + BANDWIDTH_UNKNOWN = 0, + BANDWIDTH_24_GHZ = 1, + BANDWIDTH_5_GHZ = 2, + BANDWIDTH_6_GHZ = 3 +}; +bool Bandwidth_IsValid(int value); +constexpr Bandwidth Bandwidth_MIN = BANDWIDTH_UNKNOWN; +constexpr Bandwidth Bandwidth_MAX = BANDWIDTH_6_GHZ; +constexpr int Bandwidth_ARRAYSIZE = Bandwidth_MAX + 1; + +const std::string& Bandwidth_Name(Bandwidth value); +template +inline const std::string& Bandwidth_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function Bandwidth_Name."); + return Bandwidth_Name(static_cast(enum_t_value)); +} +bool Bandwidth_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, Bandwidth* value); +enum BandwidthUpgradeResult : int { + UNKNOWN_BANDWIDTH_UPGRADE_RESULT = 0, + UPGRADE_RESULT_SUCCESS = 1, + UPGRADE_RESULT_ERROR = 2, + MEDIUM_ERROR = 3, + PROTOCOL_ERROR = 4, + RESULT_IO_ERROR = 5, + CHANNEL_ERROR = 6, + ALREADY_ON_MEDIUM_ERROR = 7, + UNFINISHED_ERROR = 10, + BLUETOOTH_MEDIUM_ERROR = 11, + WIFI_AWARE_MEDIUM_ERROR = 12, + WIFI_LAN_MEDIUM_ERROR = 13, + WIFI_HOTSPOT_MEDIUM_ERROR = 14, + WIFI_DIRECT_MEDIUM_ERROR = 15, + WEB_RTC_MEDIUM_ERROR = 16, + RESULT_REMOTE_ERROR = 17, + ATTEMPT_SKIPPED = 18 +}; +bool BandwidthUpgradeResult_IsValid(int value); +constexpr BandwidthUpgradeResult BandwidthUpgradeResult_MIN = UNKNOWN_BANDWIDTH_UPGRADE_RESULT; +constexpr BandwidthUpgradeResult BandwidthUpgradeResult_MAX = ATTEMPT_SKIPPED; +constexpr int BandwidthUpgradeResult_ARRAYSIZE = BandwidthUpgradeResult_MAX + 1; + +const std::string& BandwidthUpgradeResult_Name(BandwidthUpgradeResult value); +template +inline const std::string& BandwidthUpgradeResult_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function BandwidthUpgradeResult_Name."); + return BandwidthUpgradeResult_Name(static_cast(enum_t_value)); +} +bool BandwidthUpgradeResult_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, BandwidthUpgradeResult* value); +enum BandwidthUpgradeErrorStage : int { + UNKNOWN_BANDWIDTH_UPGRADE_ERROR_STAGE = 0, + CLIENT_INTRODUCTION = 1, + NETWORK_AVAILABLE = 2, + LAST_WRITE_TO_PRIOR_CHANNEL = 3, + SAFE_TO_CLOSE_PRIOR_CHANNEL = 4, + SOCKET_CREATION = 5, + PRIOR_ENDPOINT_CHANNEL = 6, + UPGRADE_UNFINISHED = 7, + UPGRADE_SUCCESS = 8, + UPGRADE_CANCEL = 9, + WIFI_START_HOTSPOT = 10, + WIFI_LISTEN_INCOMING = 11, + WIFI_CONNECT_TO_HOTSPOT = 12, + WIFI_HOTSPOT_SOCKET_CREATION = 28, + WIFI_LAN_LISTEN_INCOMING = 13, + WIFI_LAN_IP_ADDRESS = 14, + WIFI_LAN_SOCKET_CREATION = 29, + WIFI_LAN_SOCKET_CONNECTION = 15, + BLUETOOTH_LISTEN_INCOMING = 16, + BLUETOOTH_OBTAIN_MAC_ADDRESS = 17, + BLUETOOTH_CONNECT_OUTGOING = 18, + BLUETOOTH_PARSE_MAC_ADDRESS = 19, + BLUETOOTH_SOCKET_CREATION = 30, + WIFI_AWARE_LISTEN_INCOMING = 20, + WIFI_AWARE_PUBLISH = 21, + WIFI_AWARE_SUBSCRIBE = 22, + WIFI_AWARE_CONNECT_TO_NETWORK = 23, + WIFI_AWARE_SOCKET_CREATION = 31, + WIFI_DIRECT_LISTEN_INCOMING = 24, + WIFI_DIRECT_CREATE_GROUP = 25, + WIFI_DIRECT_CONNECT_OUTGOING = 26, + WIFI_DIRECT_PARSE_DEVICE_ADDRESS = 27, + WIFI_DIRECT_SOCKET_CREATION = 32, + WEB_RTC_SOCKET_CREATION = 33, + WEB_RTC_LISTEN_INCOMING = 34 +}; +bool BandwidthUpgradeErrorStage_IsValid(int value); +constexpr BandwidthUpgradeErrorStage BandwidthUpgradeErrorStage_MIN = UNKNOWN_BANDWIDTH_UPGRADE_ERROR_STAGE; +constexpr BandwidthUpgradeErrorStage BandwidthUpgradeErrorStage_MAX = WEB_RTC_LISTEN_INCOMING; +constexpr int BandwidthUpgradeErrorStage_ARRAYSIZE = BandwidthUpgradeErrorStage_MAX + 1; + +const std::string& BandwidthUpgradeErrorStage_Name(BandwidthUpgradeErrorStage value); +template +inline const std::string& BandwidthUpgradeErrorStage_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function BandwidthUpgradeErrorStage_Name."); + return BandwidthUpgradeErrorStage_Name(static_cast(enum_t_value)); +} +bool BandwidthUpgradeErrorStage_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, BandwidthUpgradeErrorStage* value); +enum LogSource : int { + UNSPECIFIED_SOURCE = 0, + LAB_DEVICES = 1, + INTERNAL_DEVICES = 2, + BETA_TESTER_DEVICES = 3, + OEM_DEVICES = 4, + DEBUG_DEVICES = 5 +}; +bool LogSource_IsValid(int value); +constexpr LogSource LogSource_MIN = UNSPECIFIED_SOURCE; +constexpr LogSource LogSource_MAX = DEBUG_DEVICES; +constexpr int LogSource_ARRAYSIZE = LogSource_MAX + 1; + +const std::string& LogSource_Name(LogSource value); +template +inline const std::string& LogSource_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function LogSource_Name."); + return LogSource_Name(static_cast(enum_t_value)); +} +bool LogSource_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, LogSource* value); +// =================================================================== + + +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ + +// @@protoc_insertion_point(namespace_scope) + +} // namespace connections +} // namespace proto +} // namespace nearby +} // namespace location + +PROTOBUF_NAMESPACE_OPEN + +template <> struct is_proto_enum< ::location::nearby::proto::connections::EventType> : ::std::true_type {}; +template <> struct is_proto_enum< ::location::nearby::proto::connections::ConnectionsStrategy> : ::std::true_type {}; +template <> struct is_proto_enum< ::location::nearby::proto::connections::SessionRole> : ::std::true_type {}; +template <> struct is_proto_enum< ::location::nearby::proto::connections::Medium> : ::std::true_type {}; +template <> struct is_proto_enum< ::location::nearby::proto::connections::ConnectionTechnology> : ::std::true_type {}; +template <> struct is_proto_enum< ::location::nearby::proto::connections::ConnectionBand> : ::std::true_type {}; +template <> struct is_proto_enum< ::location::nearby::proto::connections::ConnectionRequestResponse> : ::std::true_type {}; +template <> struct is_proto_enum< ::location::nearby::proto::connections::ConnectionAttemptResult> : ::std::true_type {}; +template <> struct is_proto_enum< ::location::nearby::proto::connections::ConnectionAttemptDirection> : ::std::true_type {}; +template <> struct is_proto_enum< ::location::nearby::proto::connections::ConnectionAttemptType> : ::std::true_type {}; +template <> struct is_proto_enum< ::location::nearby::proto::connections::DisconnectionReason> : ::std::true_type {}; +template <> struct is_proto_enum< ::location::nearby::proto::connections::PayloadType> : ::std::true_type {}; +template <> struct is_proto_enum< ::location::nearby::proto::connections::PayloadStatus> : ::std::true_type {}; +template <> struct is_proto_enum< ::location::nearby::proto::connections::Bandwidth> : ::std::true_type {}; +template <> struct is_proto_enum< ::location::nearby::proto::connections::BandwidthUpgradeResult> : ::std::true_type {}; +template <> struct is_proto_enum< ::location::nearby::proto::connections::BandwidthUpgradeErrorStage> : ::std::true_type {}; +template <> struct is_proto_enum< ::location::nearby::proto::connections::LogSource> : ::std::true_type {}; + +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_proto_2fconnections_5fenums_2eproto diff --git a/proto/errorcode/error_code_enums.pb.cc b/proto/errorcode/error_code_enums.pb.cc new file mode 100644 index 00000000..6a8cb413 --- /dev/null +++ b/proto/errorcode/error_code_enums.pb.cc @@ -0,0 +1,1601 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: proto/errorcode/error_code_enums.proto + +#include "proto/errorcode/error_code_enums.pb.h" + +#include + +#include +#include +#include +// @@protoc_insertion_point(includes) +#include + +PROTOBUF_PRAGMA_INIT_SEG +namespace location { +namespace nearby { +namespace errorcode { +namespace proto { +} // namespace proto +} // namespace errorcode +} // namespace nearby +} // namespace location +namespace location { +namespace nearby { +namespace errorcode { +namespace proto { +bool ErrorType_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + return true; + default: + return false; + } +} + +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed ErrorType_strings[6] = {}; + +static const char ErrorType_names[] = + "DEVELOPING" + "DEVICE" + "NETWORK" + "OTHERS" + "SYSTEM" + "UNKNOWN_TYPE"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry ErrorType_entries[] = { + { {ErrorType_names + 0, 10}, 1 }, + { {ErrorType_names + 10, 6}, 2 }, + { {ErrorType_names + 16, 7}, 4 }, + { {ErrorType_names + 23, 6}, 5 }, + { {ErrorType_names + 29, 6}, 3 }, + { {ErrorType_names + 35, 12}, 0 }, +}; + +static const int ErrorType_entries_by_number[] = { + 5, // 0 -> UNKNOWN_TYPE + 0, // 1 -> DEVELOPING + 1, // 2 -> DEVICE + 4, // 3 -> SYSTEM + 2, // 4 -> NETWORK + 3, // 5 -> OTHERS +}; + +const std::string& ErrorType_Name( + ErrorType value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + ErrorType_entries, + ErrorType_entries_by_number, + 6, ErrorType_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + ErrorType_entries, + ErrorType_entries_by_number, + 6, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + ErrorType_strings[idx].get(); +} +bool ErrorType_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, ErrorType* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + ErrorType_entries, 6, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} +bool Event_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 11: + case 12: + case 13: + return true; + default: + return false; + } +} + +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed Event_strings[14] = {}; + +static const char Event_names[] = + "ACCEPT_CONNECTION" + "CANCEL_PAYLOAD" + "CONNECT" + "DISCONNECT" + "RECEIVE_PAYLOAD" + "REJECT_CONNECTION" + "SEND_PAYLOAD" + "START_ADVERTISING" + "START_DISCOVERING" + "START_LISTENING_INCOMING_CONNECTION" + "STOP_ADVERTISING" + "STOP_DISCOVERING" + "STOP_LISTENING_INCOMING_CONNECTION" + "UNKNOWN_EVENT"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry Event_entries[] = { + { {Event_names + 0, 17}, 9 }, + { {Event_names + 17, 14}, 12 }, + { {Event_names + 31, 7}, 7 }, + { {Event_names + 38, 10}, 8 }, + { {Event_names + 48, 15}, 13 }, + { {Event_names + 63, 17}, 10 }, + { {Event_names + 80, 12}, 11 }, + { {Event_names + 92, 17}, 1 }, + { {Event_names + 109, 17}, 5 }, + { {Event_names + 126, 35}, 3 }, + { {Event_names + 161, 16}, 2 }, + { {Event_names + 177, 16}, 6 }, + { {Event_names + 193, 34}, 4 }, + { {Event_names + 227, 13}, 0 }, +}; + +static const int Event_entries_by_number[] = { + 13, // 0 -> UNKNOWN_EVENT + 7, // 1 -> START_ADVERTISING + 10, // 2 -> STOP_ADVERTISING + 9, // 3 -> START_LISTENING_INCOMING_CONNECTION + 12, // 4 -> STOP_LISTENING_INCOMING_CONNECTION + 8, // 5 -> START_DISCOVERING + 11, // 6 -> STOP_DISCOVERING + 2, // 7 -> CONNECT + 3, // 8 -> DISCONNECT + 0, // 9 -> ACCEPT_CONNECTION + 5, // 10 -> REJECT_CONNECTION + 6, // 11 -> SEND_PAYLOAD + 1, // 12 -> CANCEL_PAYLOAD + 4, // 13 -> RECEIVE_PAYLOAD +}; + +const std::string& Event_Name( + Event value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + Event_entries, + Event_entries_by_number, + 14, Event_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + Event_entries, + Event_entries_by_number, + 14, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + Event_strings[idx].get(); +} +bool Event_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, Event* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + Event_entries, 14, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} +bool CommonError_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 CommonError_strings[7] = {}; + +static const char CommonError_names[] = + "FLOW_CANCELED" + "INVALID_PARAMETER" + "MEDIUM_NOT_AVAILABLE" + "OUT_OF_RESOURCE" + "UNEXPECTED_CALL" + "UNEXPECTED_MEDIUM_STATE" + "UNKNOWN_ERROR"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry CommonError_entries[] = { + { {CommonError_names + 0, 13}, 5 }, + { {CommonError_names + 13, 17}, 1 }, + { {CommonError_names + 30, 20}, 2 }, + { {CommonError_names + 50, 15}, 4 }, + { {CommonError_names + 65, 15}, 6 }, + { {CommonError_names + 80, 23}, 3 }, + { {CommonError_names + 103, 13}, 0 }, +}; + +static const int CommonError_entries_by_number[] = { + 6, // 0 -> UNKNOWN_ERROR + 1, // 1 -> INVALID_PARAMETER + 2, // 2 -> MEDIUM_NOT_AVAILABLE + 5, // 3 -> UNEXPECTED_MEDIUM_STATE + 3, // 4 -> OUT_OF_RESOURCE + 0, // 5 -> FLOW_CANCELED + 4, // 6 -> UNEXPECTED_CALL +}; + +const std::string& CommonError_Name( + CommonError value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + CommonError_entries, + CommonError_entries_by_number, + 7, CommonError_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + CommonError_entries, + CommonError_entries_by_number, + 7, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + CommonError_strings[idx].get(); +} +bool CommonError_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, CommonError* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + CommonError_entries, 7, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} +bool StartAdvertisingError_IsValid(int value) { + switch (value) { + case 31: + case 32: + case 33: + case 34: + case 35: + case 36: + case 38: + case 40: + case 41: + case 42: + case 43: + case 44: + case 45: + case 46: + case 47: + return true; + default: + return false; + } +} + +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed StartAdvertisingError_strings[15] = {}; + +static const char StartAdvertisingError_names[] = + "ACQUIRE_WIFI_AWARE_SESSION_FAILED" + "AWARE_UPDATE_PUBLISHING_FAILED" + "BLE_MAX_GATT_ADVERTISEMENT_SLOT_REACHED" + "BLUETOOTH_ALREADY_ADVERTISED" + "DUPLICATE_ADVERTISING_REQUESTED" + "FAST_ADVERTISEMENT_ALREADY_ADVERTISED" + "MODIFY_BLUETOOTH_NAME_FAILED" + "MULTIPLE_FAST_ADVERTISEMENT_NOT_ALLOWED" + "PERSIST_ORIGINAL_BLUETOOTH_NAME_FAILED" + "SHOULD_ACCEPT_CONNECTIONS_BEFORE_ADVERTISING_ON_WIFI_LAN" + "START_ADVERTISING_FAILED" + "START_EXTENDED_ADVERTISING_FAILED" + "START_GATT_SERVER_FAILED" + "START_LEGACY_ADVERTISING_FAILED" + "UNKNOWN_START_ADVERTISING_ERROR"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry StartAdvertisingError_entries[] = { + { {StartAdvertisingError_names + 0, 33}, 45 }, + { {StartAdvertisingError_names + 33, 30}, 47 }, + { {StartAdvertisingError_names + 63, 39}, 35 }, + { {StartAdvertisingError_names + 102, 28}, 40 }, + { {StartAdvertisingError_names + 130, 31}, 33 }, + { {StartAdvertisingError_names + 161, 37}, 32 }, + { {StartAdvertisingError_names + 198, 28}, 41 }, + { {StartAdvertisingError_names + 226, 39}, 31 }, + { {StartAdvertisingError_names + 265, 38}, 42 }, + { {StartAdvertisingError_names + 303, 56}, 44 }, + { {StartAdvertisingError_names + 359, 24}, 43 }, + { {StartAdvertisingError_names + 383, 33}, 38 }, + { {StartAdvertisingError_names + 416, 24}, 34 }, + { {StartAdvertisingError_names + 440, 31}, 36 }, + { {StartAdvertisingError_names + 471, 31}, 46 }, +}; + +static const int StartAdvertisingError_entries_by_number[] = { + 7, // 31 -> MULTIPLE_FAST_ADVERTISEMENT_NOT_ALLOWED + 5, // 32 -> FAST_ADVERTISEMENT_ALREADY_ADVERTISED + 4, // 33 -> DUPLICATE_ADVERTISING_REQUESTED + 12, // 34 -> START_GATT_SERVER_FAILED + 2, // 35 -> BLE_MAX_GATT_ADVERTISEMENT_SLOT_REACHED + 13, // 36 -> START_LEGACY_ADVERTISING_FAILED + 11, // 38 -> START_EXTENDED_ADVERTISING_FAILED + 3, // 40 -> BLUETOOTH_ALREADY_ADVERTISED + 6, // 41 -> MODIFY_BLUETOOTH_NAME_FAILED + 8, // 42 -> PERSIST_ORIGINAL_BLUETOOTH_NAME_FAILED + 10, // 43 -> START_ADVERTISING_FAILED + 9, // 44 -> SHOULD_ACCEPT_CONNECTIONS_BEFORE_ADVERTISING_ON_WIFI_LAN + 0, // 45 -> ACQUIRE_WIFI_AWARE_SESSION_FAILED + 14, // 46 -> UNKNOWN_START_ADVERTISING_ERROR + 1, // 47 -> AWARE_UPDATE_PUBLISHING_FAILED +}; + +const std::string& StartAdvertisingError_Name( + StartAdvertisingError value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + StartAdvertisingError_entries, + StartAdvertisingError_entries_by_number, + 15, StartAdvertisingError_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + StartAdvertisingError_entries, + StartAdvertisingError_entries_by_number, + 15, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + StartAdvertisingError_strings[idx].get(); +} +bool StartAdvertisingError_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, StartAdvertisingError* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + StartAdvertisingError_entries, 15, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} +bool StopAdvertisingError_IsValid(int value) { + switch (value) { + case 31: + case 32: + case 33: + case 34: + case 35: + return true; + default: + return false; + } +} + +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed StopAdvertisingError_strings[5] = {}; + +static const char StopAdvertisingError_names[] = + "RESTORE_BLUETOOTH_NAME_FAILED" + "STOP_ADVERTISING_FAILED" + "STOP_EXTENDED_ADVERTISING_FAILED" + "STOP_LEGACY_ADVERTISING_FAILED" + "UNKNOWN_STOP_ADVERTISING_ERROR"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry StopAdvertisingError_entries[] = { + { {StopAdvertisingError_names + 0, 29}, 32 }, + { {StopAdvertisingError_names + 29, 23}, 31 }, + { {StopAdvertisingError_names + 52, 32}, 34 }, + { {StopAdvertisingError_names + 84, 30}, 33 }, + { {StopAdvertisingError_names + 114, 30}, 35 }, +}; + +static const int StopAdvertisingError_entries_by_number[] = { + 1, // 31 -> STOP_ADVERTISING_FAILED + 0, // 32 -> RESTORE_BLUETOOTH_NAME_FAILED + 3, // 33 -> STOP_LEGACY_ADVERTISING_FAILED + 2, // 34 -> STOP_EXTENDED_ADVERTISING_FAILED + 4, // 35 -> UNKNOWN_STOP_ADVERTISING_ERROR +}; + +const std::string& StopAdvertisingError_Name( + StopAdvertisingError value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + StopAdvertisingError_entries, + StopAdvertisingError_entries_by_number, + 5, StopAdvertisingError_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + StopAdvertisingError_entries, + StopAdvertisingError_entries_by_number, + 5, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + StopAdvertisingError_strings[idx].get(); +} +bool StopAdvertisingError_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, StopAdvertisingError* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + StopAdvertisingError_entries, 5, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} +bool StartDiscoveringError_IsValid(int value) { + switch (value) { + case 31: + case 32: + case 33: + case 34: + case 35: + case 36: + case 37: + case 38: + case 39: + case 40: + case 41: + return true; + default: + return false; + } +} + +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed StartDiscoveringError_strings[11] = {}; + +static const char StartDiscoveringError_names[] = + "ACQUIRE_WIFI_AWARE_SESSION_FOR_DISCOVERING_FAILED" + "DUPLICATE_DISCOVERING_REQUESTED" + "FETCH_ADVERTISEMENT_FAILED" + "GATT_FETCH_ADVERTISEMENT_FAILED" + "INVALID_TARGET_INFO" + "L2CAP_FETCH_ADVERTISEMENT_FAILED" + "NOT_AVAILABLE_TO_FETCH_ADVERTISEMENT" + "START_DISCOVERING_FAILED" + "START_EXTENDED_DISCOVERING_FAILED" + "START_LEGACY_DISCOVERING_FAILED" + "UNKNOWN_START_DISCOVERING_ERROR"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry StartDiscoveringError_entries[] = { + { {StartDiscoveringError_names + 0, 49}, 40 }, + { {StartDiscoveringError_names + 49, 31}, 31 }, + { {StartDiscoveringError_names + 80, 26}, 36 }, + { {StartDiscoveringError_names + 106, 31}, 37 }, + { {StartDiscoveringError_names + 137, 19}, 35 }, + { {StartDiscoveringError_names + 156, 32}, 38 }, + { {StartDiscoveringError_names + 188, 36}, 39 }, + { {StartDiscoveringError_names + 224, 24}, 34 }, + { {StartDiscoveringError_names + 248, 33}, 33 }, + { {StartDiscoveringError_names + 281, 31}, 32 }, + { {StartDiscoveringError_names + 312, 31}, 41 }, +}; + +static const int StartDiscoveringError_entries_by_number[] = { + 1, // 31 -> DUPLICATE_DISCOVERING_REQUESTED + 9, // 32 -> START_LEGACY_DISCOVERING_FAILED + 8, // 33 -> START_EXTENDED_DISCOVERING_FAILED + 7, // 34 -> START_DISCOVERING_FAILED + 4, // 35 -> INVALID_TARGET_INFO + 2, // 36 -> FETCH_ADVERTISEMENT_FAILED + 3, // 37 -> GATT_FETCH_ADVERTISEMENT_FAILED + 5, // 38 -> L2CAP_FETCH_ADVERTISEMENT_FAILED + 6, // 39 -> NOT_AVAILABLE_TO_FETCH_ADVERTISEMENT + 0, // 40 -> ACQUIRE_WIFI_AWARE_SESSION_FOR_DISCOVERING_FAILED + 10, // 41 -> UNKNOWN_START_DISCOVERING_ERROR +}; + +const std::string& StartDiscoveringError_Name( + StartDiscoveringError value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + StartDiscoveringError_entries, + StartDiscoveringError_entries_by_number, + 11, StartDiscoveringError_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + StartDiscoveringError_entries, + StartDiscoveringError_entries_by_number, + 11, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + StartDiscoveringError_strings[idx].get(); +} +bool StartDiscoveringError_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, StartDiscoveringError* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + StartDiscoveringError_entries, 11, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} +bool StopDiscoveringError_IsValid(int value) { + switch (value) { + case 31: + case 32: + case 33: + case 34: + return true; + default: + return false; + } +} + +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed StopDiscoveringError_strings[4] = {}; + +static const char StopDiscoveringError_names[] = + "STOP_DISCOVERING_FAILED" + "STOP_EXTENDED_DISCOVERING_FAILED" + "STOP_LEGACY_DISCOVERING_FAILED" + "UNKNOWN_STOP_DISCOVERING_ERROR"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry StopDiscoveringError_entries[] = { + { {StopDiscoveringError_names + 0, 23}, 31 }, + { {StopDiscoveringError_names + 23, 32}, 33 }, + { {StopDiscoveringError_names + 55, 30}, 32 }, + { {StopDiscoveringError_names + 85, 30}, 34 }, +}; + +static const int StopDiscoveringError_entries_by_number[] = { + 0, // 31 -> STOP_DISCOVERING_FAILED + 2, // 32 -> STOP_LEGACY_DISCOVERING_FAILED + 1, // 33 -> STOP_EXTENDED_DISCOVERING_FAILED + 3, // 34 -> UNKNOWN_STOP_DISCOVERING_ERROR +}; + +const std::string& StopDiscoveringError_Name( + StopDiscoveringError value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + StopDiscoveringError_entries, + StopDiscoveringError_entries_by_number, + 4, StopDiscoveringError_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + StopDiscoveringError_entries, + StopDiscoveringError_entries_by_number, + 4, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + StopDiscoveringError_strings[idx].get(); +} +bool StopDiscoveringError_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, StopDiscoveringError* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + StopDiscoveringError_entries, 4, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} +bool StartListeningIncomingConnectionError_IsValid(int value) { + switch (value) { + case 31: + case 32: + case 33: + case 34: + case 35: + case 36: + case 37: + case 38: + case 39: + case 40: + return true; + default: + return false; + } +} + +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed StartListeningIncomingConnectionError_strings[10] = {}; + +static const char StartListeningIncomingConnectionError_names[] = + "ACCEPT_CONNECTION_FAILED" + "ACCEPT_GATT_CONNECTION_FAILED" + "ACCEPT_L2CAP_CONNECTION_FAILED" + "ACCEPT_RECEIVE_AWARE_L2_MESSAGE_FAILED" + "ACCEPT_SEND_AWARE_L2_MESSAGE_FAILED" + "CREATE_GATT_SERVER_SOCKET_NOT_READY" + "CREATE_SERVER_SOCKET_FAILED" + "DUPLICATE_ACCEPTING_CONNECTION_REQUESTED" + "OPEN_GATT_SERVER_FAILED" + "UNKNOWN_START_LISTENING_INCOMING_CONNECTION_ERROR"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry StartListeningIncomingConnectionError_entries[] = { + { {StartListeningIncomingConnectionError_names + 0, 24}, 36 }, + { {StartListeningIncomingConnectionError_names + 24, 29}, 33 }, + { {StartListeningIncomingConnectionError_names + 53, 30}, 34 }, + { {StartListeningIncomingConnectionError_names + 83, 38}, 40 }, + { {StartListeningIncomingConnectionError_names + 121, 35}, 39 }, + { {StartListeningIncomingConnectionError_names + 156, 35}, 35 }, + { {StartListeningIncomingConnectionError_names + 191, 27}, 37 }, + { {StartListeningIncomingConnectionError_names + 218, 40}, 31 }, + { {StartListeningIncomingConnectionError_names + 258, 23}, 32 }, + { {StartListeningIncomingConnectionError_names + 281, 49}, 38 }, +}; + +static const int StartListeningIncomingConnectionError_entries_by_number[] = { + 7, // 31 -> DUPLICATE_ACCEPTING_CONNECTION_REQUESTED + 8, // 32 -> OPEN_GATT_SERVER_FAILED + 1, // 33 -> ACCEPT_GATT_CONNECTION_FAILED + 2, // 34 -> ACCEPT_L2CAP_CONNECTION_FAILED + 5, // 35 -> CREATE_GATT_SERVER_SOCKET_NOT_READY + 0, // 36 -> ACCEPT_CONNECTION_FAILED + 6, // 37 -> CREATE_SERVER_SOCKET_FAILED + 9, // 38 -> UNKNOWN_START_LISTENING_INCOMING_CONNECTION_ERROR + 4, // 39 -> ACCEPT_SEND_AWARE_L2_MESSAGE_FAILED + 3, // 40 -> ACCEPT_RECEIVE_AWARE_L2_MESSAGE_FAILED +}; + +const std::string& StartListeningIncomingConnectionError_Name( + StartListeningIncomingConnectionError value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + StartListeningIncomingConnectionError_entries, + StartListeningIncomingConnectionError_entries_by_number, + 10, StartListeningIncomingConnectionError_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + StartListeningIncomingConnectionError_entries, + StartListeningIncomingConnectionError_entries_by_number, + 10, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + StartListeningIncomingConnectionError_strings[idx].get(); +} +bool StartListeningIncomingConnectionError_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, StartListeningIncomingConnectionError* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + StartListeningIncomingConnectionError_entries, 10, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} +bool StopListeningIncomingConnectionError_IsValid(int value) { + switch (value) { + case 31: + case 32: + return true; + default: + return false; + } +} + +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed StopListeningIncomingConnectionError_strings[2] = {}; + +static const char StopListeningIncomingConnectionError_names[] = + "STOP_ACCEPTING_CONNECTION_FAILED" + "UNKNOWN_STOP_LISTENING_INCOMING_CONNECTION_ERROR"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry StopListeningIncomingConnectionError_entries[] = { + { {StopListeningIncomingConnectionError_names + 0, 32}, 31 }, + { {StopListeningIncomingConnectionError_names + 32, 48}, 32 }, +}; + +static const int StopListeningIncomingConnectionError_entries_by_number[] = { + 0, // 31 -> STOP_ACCEPTING_CONNECTION_FAILED + 1, // 32 -> UNKNOWN_STOP_LISTENING_INCOMING_CONNECTION_ERROR +}; + +const std::string& StopListeningIncomingConnectionError_Name( + StopListeningIncomingConnectionError value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + StopListeningIncomingConnectionError_entries, + StopListeningIncomingConnectionError_entries_by_number, + 2, StopListeningIncomingConnectionError_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + StopListeningIncomingConnectionError_entries, + StopListeningIncomingConnectionError_entries_by_number, + 2, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + StopListeningIncomingConnectionError_strings[idx].get(); +} +bool StopListeningIncomingConnectionError_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, StopListeningIncomingConnectionError* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + StopListeningIncomingConnectionError_entries, 2, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} +bool ConnectError_IsValid(int value) { + switch (value) { + case 31: + case 32: + case 33: + case 34: + case 35: + case 36: + case 37: + case 38: + case 39: + case 40: + case 41: + case 42: + case 43: + case 44: + case 45: + case 46: + return true; + default: + return false; + } +} + +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed ConnectError_strings[16] = {}; + +static const char ConnectError_names[] = + "CONNECTION_LOST" + "CONNECT_READ_AWARE_L2_MESSAGE_FAILED" + "CONNECT_SEND_AWARE_L2_MESSAGE_FAILED" + "CONNECT_TO_NETWORK_FAILED" + "DUPLICATE_CONNECTION_REQUESTED" + "ESTABLISH_CONNECTION_FAILED" + "ESTABLISH_GATT_CONNECTION_FAILED" + "ESTABLISH_L2CAP_CONNECTION_FAILED" + "GATT_SWITCH_TO_DATA_TRANSFERRING_FAILED" + "INVALID_MAC_ADDRESS" + "L2CAP_SWITCH_TO_DATA_TRANSFERRING_FAILED" + "REQUEST_GATT_CONNECTION_PRIORITY_FAILED" + "SLEEP_AFTER_GATT_CONNECTED_INTERRUPTED" + "SLEEP_BEFORE_CONNECT_GATT_INTERRUPTED" + "UNEXPECT_TARGET_LOST" + "UNKNOWN_CONNECT_ERROR"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry ConnectError_entries[] = { + { {ConnectError_names + 0, 15}, 42 }, + { {ConnectError_names + 15, 36}, 46 }, + { {ConnectError_names + 51, 36}, 45 }, + { {ConnectError_names + 87, 25}, 43 }, + { {ConnectError_names + 112, 30}, 41 }, + { {ConnectError_names + 142, 27}, 40 }, + { {ConnectError_names + 169, 32}, 32 }, + { {ConnectError_names + 201, 33}, 33 }, + { {ConnectError_names + 234, 39}, 39 }, + { {ConnectError_names + 273, 19}, 34 }, + { {ConnectError_names + 292, 40}, 38 }, + { {ConnectError_names + 332, 39}, 37 }, + { {ConnectError_names + 371, 38}, 36 }, + { {ConnectError_names + 409, 37}, 35 }, + { {ConnectError_names + 446, 20}, 31 }, + { {ConnectError_names + 466, 21}, 44 }, +}; + +static const int ConnectError_entries_by_number[] = { + 14, // 31 -> UNEXPECT_TARGET_LOST + 6, // 32 -> ESTABLISH_GATT_CONNECTION_FAILED + 7, // 33 -> ESTABLISH_L2CAP_CONNECTION_FAILED + 9, // 34 -> INVALID_MAC_ADDRESS + 13, // 35 -> SLEEP_BEFORE_CONNECT_GATT_INTERRUPTED + 12, // 36 -> SLEEP_AFTER_GATT_CONNECTED_INTERRUPTED + 11, // 37 -> REQUEST_GATT_CONNECTION_PRIORITY_FAILED + 10, // 38 -> L2CAP_SWITCH_TO_DATA_TRANSFERRING_FAILED + 8, // 39 -> GATT_SWITCH_TO_DATA_TRANSFERRING_FAILED + 5, // 40 -> ESTABLISH_CONNECTION_FAILED + 4, // 41 -> DUPLICATE_CONNECTION_REQUESTED + 0, // 42 -> CONNECTION_LOST + 3, // 43 -> CONNECT_TO_NETWORK_FAILED + 15, // 44 -> UNKNOWN_CONNECT_ERROR + 2, // 45 -> CONNECT_SEND_AWARE_L2_MESSAGE_FAILED + 1, // 46 -> CONNECT_READ_AWARE_L2_MESSAGE_FAILED +}; + +const std::string& ConnectError_Name( + ConnectError value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + ConnectError_entries, + ConnectError_entries_by_number, + 16, ConnectError_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + ConnectError_entries, + ConnectError_entries_by_number, + 16, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + ConnectError_strings[idx].get(); +} +bool ConnectError_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, ConnectError* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + ConnectError_entries, 16, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} +bool DisconnectError_IsValid(int value) { + switch (value) { + case 31: + case 32: + return true; + default: + return false; + } +} + +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed DisconnectError_strings[2] = {}; + +static const char DisconnectError_names[] = + "DISCONNECT_NETWORK_FAILED" + "UNKNOWN_DISCONNECT_ERROR"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry DisconnectError_entries[] = { + { {DisconnectError_names + 0, 25}, 31 }, + { {DisconnectError_names + 25, 24}, 32 }, +}; + +static const int DisconnectError_entries_by_number[] = { + 0, // 31 -> DISCONNECT_NETWORK_FAILED + 1, // 32 -> UNKNOWN_DISCONNECT_ERROR +}; + +const std::string& DisconnectError_Name( + DisconnectError value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + DisconnectError_entries, + DisconnectError_entries_by_number, + 2, DisconnectError_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + DisconnectError_entries, + DisconnectError_entries_by_number, + 2, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + DisconnectError_strings[idx].get(); +} +bool DisconnectError_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, DisconnectError* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + DisconnectError_entries, 2, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} +bool Description_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 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + case 19: + case 20: + case 21: + case 22: + case 23: + case 24: + case 25: + case 26: + case 27: + case 30: + case 31: + case 32: + case 33: + case 34: + case 35: + case 36: + case 37: + case 38: + case 39: + case 40: + case 41: + case 42: + case 43: + case 44: + case 45: + case 46: + case 47: + case 48: + case 49: + case 50: + case 51: + case 52: + case 53: + case 54: + case 55: + case 56: + case 57: + case 58: + case 59: + case 60: + case 61: + case 62: + case 63: + case 64: + case 65: + case 66: + case 67: + case 68: + case 69: + case 70: + case 71: + case 72: + case 73: + case 74: + case 75: + case 76: + case 77: + case 78: + case 79: + case 80: + case 81: + case 82: + case 83: + case 84: + case 85: + case 86: + case 87: + case 88: + case 89: + case 90: + case 91: + case 92: + case 93: + case 94: + case 95: + case 96: + case 97: + case 98: + case 99: + case 100: + case 101: + case 102: + case 103: + case 104: + case 105: + case 106: + case 107: + case 108: + case 109: + case 110: + case 111: + case 112: + case 113: + case 114: + case 115: + case 116: + case 117: + case 118: + case 119: + case 120: + case 121: + case 122: + case 123: + case 124: + case 125: + case 126: + case 127: + case 128: + case 129: + case 130: + case 131: + case 132: + case 133: + case 134: + case 135: + case 136: + case 137: + case 138: + case 139: + case 140: + case 141: + case 142: + case 143: + case 144: + case 145: + case 146: + case 147: + case 148: + case 149: + case 150: + case 151: + case 152: + case 153: + case 154: + case 155: + case 156: + case 157: + case 158: + case 159: + case 160: + case 161: + case 162: + case 163: + case 164: + case 165: + case 166: + case 167: + case 168: + case 169: + case 170: + case 171: + return true; + default: + return false; + } +} + +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed Description_strings[170] = {}; + +static const char Description_names[] = + "ACQUIRE_P2P_CHANNEL_FAILED" + "ADD_NETWORK_FAILED" + "ADVERTISE_FAILED_ALREADY_STARTED" + "ADVERTISE_FAILED_DATA_TOO_LARGE" + "ADVERTISE_FAILED_FEATURE_UNSUPPORTED" + "ADVERTISE_FAILED_INTERNAL_ERROR" + "ADVERTISE_FAILED_TOO_MANY_ADVERTISERS" + "ALREADY_HAS_GATT_CONNECTION" + "ALREADY_IN_PROGRESS" + "AWARE_DATA_PATH_RAN_OUT" + "AWARE_L2_MESSAGE_CANCELLATION_RECEIVED" + "AWARE_L2_MESSAGE_HOST_NETWORK_ERROR" + "AWARE_L2_MESSAGE_IP_AVAILABLE_ERROR" + "AWARE_L2_MESSAGE_NETWORK_AVAILABLE_ERROR" + "AWARE_PUBLISH_SESSION_RAN_OUT" + "AWARE_SUBSCRIBE_SESSION_RAN_OUT" + "AWARE_UNAVAILABLE" + "AWARE_UPDATE_PUBLISHING_CONFIG_FAILED" + "BIND_NFC_SERVICE_FAILED" + "BLUETOOTH_SCAN_REJUVENATE_FAILED" + "BLUETOOTH_SOCKET_CLOSED_AFTER_CONNECTED" + "BLUETOOTH_SOCKET_NOT_IN_LISTENING_STATE" + "BUSY" + "CLOSE_SERVER_SOCKET_FAILED" + "CONNECTIONS_FEATURE_DISABLED" + "CONNET_TO_SOCKET_CANCELLED" + "CREATE_OFFER_FAILED" + "EMPTY_TACHYON_ICE_SERVER" + "EMPTY_WORK_SOURCE_CACHE" + "EXECUTION_EXCEPTION" + "FAIL_TO_RECEIVE_L2CAP_PACKET" + "FEATURE_BLUETOOTH_LE_NOT_SUPPORTED" + "FEATURE_BLUETOOTH_NOT_SUPPORTED" + "FEATURE_NFC_HOST_CARD_EMULATION_NOT_SUPPORTED" + "FEATURE_NFC_NOT_SUPPORTED" + "FEATURE_WIFI_AWARE_NOT_SUPPORTED" + "FEATURE_WIFI_DIRECT_NOT_SUPPORTED" + "FEATURE_WIFI_NOT_SUPPORTED" + "GET_ADDRESS_FAILED" + "HOSTED_NETWORK_UNAVAILABLE" + "HOTSPOT_NOT_STARTED" + "INTERNAL_ERROR" + "INTERRUPTED_EXCEPTION" + "INVALID_ADVERTISEMENT_HEADER_DATA" + "INVALID_ARGS" + "INVALID_BLUETOOTH_CHANNEL" + "INVALID_BLUETOOTH_SOCKET_SIGNAL_SIZE" + "INVALID_BLUETOOTH_SOCKET_SIGNAL_STATUS" + "INVALID_BLUETOOTH_SOCKET_STATE_BEFORE_CONNECT" + "INVALID_FAST_ADVERTISEMENT_DATA" + "INVALID_FAST_PAIR_MODEL_ID" + "INVALID_IPV4_ADDRESS" + "INVALID_IPV6_ADDRESS" + "INVALID_NETWORK_ID" + "INVALID_PACKET_BYTES" + "INVALID_PACKET_LENGTH" + "INVALID_PORT_NUMBER" + "INVALID_REGULAR_ADVERTISEMENT_DATA" + "INVALID_REMOTE_ADDRESS" + "INVALID_VERSION" + "INVALID_WEBRTC_STATE" + "INVOKE_API_FAILED" + "IN_BLACK_LIST" + "IS_LOOPBACK_ADDRESS" + "JOIN_AWARE_NETWORK_CANCELLED" + "L2CAP_UNAVAILABLE" + "MULTICAST_NOT_SUPPORTED" + "NETWORK_ALREADY_JOINED" + "NETWORK_ERROR_EHOSTUNREACH" + "NETWORK_ERROR_ENETUNREACH" + "NETWORK_UNAVAILABLE" + "NFC_CREATE_SOCKET_FAILED" + "NFC_SERVICE_DIED" + "NFC_TECH_NOT_SUPPORTED" + "NOT_AUTHORIZED" + "NSD_NOT_ENABLED" + "NULL_ADDRESS" + "NULL_ADVERTISEMENT_BYTES" + "NULL_BLE_PERIPHERAL" + "NULL_BLUETOOTH_ADAPTER" + "NULL_BLUETOOTH_DEVICE" + "NULL_BLUETOOTH_DEVICE_NAME" + "NULL_BLUETOOTH_GATT" + "NULL_BLUETOOTH_LE_ADVERTISER_COMPAT" + "NULL_BLUETOOTH_LE_SCANNER_COMPAT" + "NULL_BLUETOOTH_MANAGER" + "NULL_BLUETOOTH_PROXY" + "NULL_CALLBACK" + "NULL_CONNECTIVITY_MANAGER" + "NULL_DATA_CHANNEL" + "NULL_DROID_GUARD_RESULT" + "NULL_LOCAL_ADDRESS" + "NULL_MESSAGE" + "NULL_NFC_TAG" + "NULL_PASSWORD" + "NULL_SERVICE_ID" + "NULL_SERVICE_INFO" + "NULL_SERVICE_NAME" + "NULL_SERVICE_TYPE" + "NULL_SSID" + "NULL_WIFI_AWARE_MANAGER" + "NULL_WIFI_AWARE_PEER" + "NULL_WIFI_MANAGER" + "NULL_WIFI_P2P_MANAGER" + "NULL_WORK_SOURCE" + "P2P_GROUP_FORMED" + "P2P_UNSUPPORTED" + "POTENTIAL_SRD_ISSUE" + "POTENTIAL_WEBRTC_LIB_LOADING_FAILURE" + "PUBLISH_EMPTY_ADVERTISEMENT_FAILED" + "READ_CHARACTERISTIC_FAILED" + "REFLECTION_ERROR" + "REMOTE_EXCEPTION" + "SCAN_FAILED_ALREADY_STARTED" + "SCAN_FAILED_APPLICATION_REGISTRATION_FAILED" + "SCAN_FAILED_BLUETOOTH_DISABLED" + "SCAN_FAILED_FEATURE_UNSUPPORTED" + "SCAN_FAILED_INTERNAL_ERROR" + "SCAN_FILTERS_NOT_ALLOWED_FOR_LOCATION" + "SERVER_SOCKET_UNAVAILABLE" + "SET_CONNECTION_PRIORITY_FAILED" + "SET_CONNECTION_PRIORITY_INTERRUPTED" + "SET_SCAN_MODE_FAILED" + "SOCKET_ALREADY_BOUND" + "SOCKET_ALREADY_CONNECTED" + "SOCKET_BIND_LISTEN_FAILED" + "SOCKET_CLOSED" + "SOCKET_CLOSED_OR_TIMEOUT" + "SOCKET_NOT_BOUND" + "STALE_ANDROID_VERSION" + "STALE_SDK_VERSION" + "TACHYON_ALREADY_START_RECEIVE_MESSAGE" + "TACHYON_GET_ICE_SERVER_AUTH_EXCEPTION" + "TACHYON_GET_ICE_SERVER_STATUS_EXCEPTION" + "TACHYON_RECEIVE_MESSAGE_AUTH_EXCEPTION" + "TACHYON_RECEIVE_MESSAGE_EXECUTION_EXCEPTION" + "TACHYON_RECEIVE_MESSAGE_FAILED" + "TACHYON_RECEIVE_MESSAGE_INTERRUPTED" + "TACHYON_RECEIVE_MESSAGE_STATUS_EXCEPTION" + "TACHYON_RECEIVE_MESSAGE_TIMEOUT" + "TACHYON_SEND_MESSAGE_AUTH_EXCEPTION" + "TACHYON_SEND_MESSAGE_STATUS_EXCEPTION" + "TACHYON_SIGNALING_MESSENGER_EXIST" + "TIE_BREAK_LOSER" + "TIMEOUT" + "UNEXPECTED_BLUETOOTH_STATE" + "UNEXPECTED_EOF_EXCEPTION" + "UNEXPECTED_GATT_DESCRIPTOR" + "UNEXPECTED_PACKET_CONTENT" + "UNKNOWN" + "UNKNOWN_IO_EXCEPTION" + "UNREGISTER_NSD_MANAGER_FAILED" + "UNSUPPORTED_DEVICE_TYPE" + "UNSUPPORTED_DEVICE_TYPE_AUTO" + "UNSUPPORTED_DEVICE_TYPE_CHROME_OS" + "UNSUPPORTED_DEVICE_TYPE_TV" + "UNSUPPORTED_DEVICE_TYPE_WEAR" + "UPDATE_NETWORK_FAILED" + "WEBRTC_ALREADY_INITIALIZED" + "WEBRTC_CONNECTION_FLOW_EXIST" + "WIFI_AWARE_STARTED" + "WIFI_HOTSPOT_ENABLED" + "WIFI_MANAGER_ENABLE_NETWORK_FAILED" + "WIFI_MANAGER_RECONNECT_FAILED" + "WIFI_SIGNAL_STRENGTH_POOR" + "WITHOUT_ACTIVE_AWARE_NETWORK" + "WITHOUT_ACTIVE_NETWORK" + "WITHOUT_CONNECTED_WIFI_NETWORK" + "WITHOUT_JOINED_AWARE_NETWORK" + "WITHOUT_PSM_VALUE"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry Description_entries[] = { + { {Description_names + 0, 26}, 96 }, + { {Description_names + 26, 18}, 103 }, + { {Description_names + 44, 32}, 14 }, + { {Description_names + 76, 31}, 15 }, + { {Description_names + 107, 36}, 16 }, + { {Description_names + 143, 31}, 17 }, + { {Description_names + 174, 37}, 18 }, + { {Description_names + 211, 27}, 165 }, + { {Description_names + 238, 19}, 105 }, + { {Description_names + 257, 23}, 153 }, + { {Description_names + 280, 38}, 159 }, + { {Description_names + 318, 35}, 156 }, + { {Description_names + 353, 35}, 158 }, + { {Description_names + 388, 40}, 157 }, + { {Description_names + 428, 29}, 151 }, + { {Description_names + 457, 31}, 152 }, + { {Description_names + 488, 17}, 74 }, + { {Description_names + 505, 37}, 163 }, + { {Description_names + 542, 23}, 82 }, + { {Description_names + 565, 32}, 51 }, + { {Description_names + 597, 39}, 57 }, + { {Description_names + 636, 39}, 135 }, + { {Description_names + 675, 4}, 99 }, + { {Description_names + 679, 26}, 149 }, + { {Description_names + 705, 28}, 3 }, + { {Description_names + 733, 26}, 90 }, + { {Description_names + 759, 19}, 148 }, + { {Description_names + 778, 24}, 126 }, + { {Description_names + 802, 23}, 44 }, + { {Description_names + 825, 19}, 20 }, + { {Description_names + 844, 28}, 129 }, + { {Description_names + 872, 34}, 6 }, + { {Description_names + 906, 31}, 5 }, + { {Description_names + 937, 45}, 27 }, + { {Description_names + 982, 25}, 26 }, + { {Description_names + 1007, 32}, 36 }, + { {Description_names + 1039, 33}, 93 }, + { {Description_names + 1072, 26}, 76 }, + { {Description_names + 1098, 18}, 138 }, + { {Description_names + 1116, 26}, 162 }, + { {Description_names + 1142, 19}, 144 }, + { {Description_names + 1161, 14}, 98 }, + { {Description_names + 1175, 21}, 19 }, + { {Description_names + 1196, 33}, 11 }, + { {Description_names + 1229, 12}, 106 }, + { {Description_names + 1241, 25}, 58 }, + { {Description_names + 1266, 36}, 136 }, + { {Description_names + 1302, 38}, 137 }, + { {Description_names + 1340, 45}, 56 }, + { {Description_names + 1385, 31}, 10 }, + { {Description_names + 1416, 26}, 9 }, + { {Description_names + 1442, 20}, 65 }, + { {Description_names + 1462, 20}, 66 }, + { {Description_names + 1482, 18}, 108 }, + { {Description_names + 1500, 20}, 62 }, + { {Description_names + 1520, 21}, 61 }, + { {Description_names + 1541, 19}, 32 }, + { {Description_names + 1560, 34}, 12 }, + { {Description_names + 1594, 22}, 142 }, + { {Description_names + 1616, 15}, 68 }, + { {Description_names + 1631, 20}, 146 }, + { {Description_names + 1651, 17}, 23 }, + { {Description_names + 1668, 13}, 75 }, + { {Description_names + 1681, 19}, 140 }, + { {Description_names + 1700, 28}, 86 }, + { {Description_names + 1728, 17}, 164 }, + { {Description_names + 1745, 23}, 30 }, + { {Description_names + 1768, 22}, 85 }, + { {Description_names + 1790, 26}, 101 }, + { {Description_names + 1816, 25}, 102 }, + { {Description_names + 1841, 19}, 87 }, + { {Description_names + 1860, 24}, 83 }, + { {Description_names + 1884, 16}, 81 }, + { {Description_names + 1900, 22}, 80 }, + { {Description_names + 1922, 14}, 107 }, + { {Description_names + 1936, 15}, 31 }, + { {Description_names + 1951, 12}, 67 }, + { {Description_names + 1963, 24}, 2 }, + { {Description_names + 1987, 19}, 52 }, + { {Description_names + 2006, 22}, 8 }, + { {Description_names + 2028, 21}, 59 }, + { {Description_names + 2049, 26}, 21 }, + { {Description_names + 2075, 19}, 53 }, + { {Description_names + 2094, 35}, 13 }, + { {Description_names + 2129, 32}, 43 }, + { {Description_names + 2161, 22}, 7 }, + { {Description_names + 2183, 20}, 60 }, + { {Description_names + 2203, 13}, 42 }, + { {Description_names + 2216, 25}, 37 }, + { {Description_names + 2241, 17}, 147 }, + { {Description_names + 2258, 23}, 113 }, + { {Description_names + 2281, 18}, 139 }, + { {Description_names + 2299, 12}, 171 }, + { {Description_names + 2311, 12}, 25 }, + { {Description_names + 2323, 13}, 92 }, + { {Description_names + 2336, 15}, 1 }, + { {Description_names + 2351, 17}, 40 }, + { {Description_names + 2368, 17}, 33 }, + { {Description_names + 2385, 17}, 34 }, + { {Description_names + 2402, 9}, 91 }, + { {Description_names + 2411, 23}, 38 }, + { {Description_names + 2434, 20}, 84 }, + { {Description_names + 2454, 17}, 77 }, + { {Description_names + 2471, 21}, 94 }, + { {Description_names + 2492, 16}, 41 }, + { {Description_names + 2508, 16}, 95 }, + { {Description_names + 2524, 15}, 97 }, + { {Description_names + 2539, 19}, 155 }, + { {Description_names + 2558, 36}, 127 }, + { {Description_names + 2594, 34}, 134 }, + { {Description_names + 2628, 26}, 72 }, + { {Description_names + 2654, 16}, 100 }, + { {Description_names + 2670, 16}, 55 }, + { {Description_names + 2686, 27}, 45 }, + { {Description_names + 2713, 43}, 46 }, + { {Description_names + 2756, 30}, 49 }, + { {Description_names + 2786, 31}, 48 }, + { {Description_names + 2817, 26}, 47 }, + { {Description_names + 2843, 37}, 50 }, + { {Description_names + 2880, 25}, 161 }, + { {Description_names + 2905, 30}, 69 }, + { {Description_names + 2935, 35}, 70 }, + { {Description_names + 2970, 20}, 22 }, + { {Description_names + 2990, 20}, 143 }, + { {Description_names + 3010, 24}, 79 }, + { {Description_names + 3034, 25}, 131 }, + { {Description_names + 3059, 13}, 78 }, + { {Description_names + 3072, 24}, 64 }, + { {Description_names + 3096, 16}, 141 }, + { {Description_names + 3112, 21}, 39 }, + { {Description_names + 3133, 17}, 4 }, + { {Description_names + 3150, 37}, 115 }, + { {Description_names + 3187, 37}, 124 }, + { {Description_names + 3224, 39}, 125 }, + { {Description_names + 3263, 38}, 120 }, + { {Description_names + 3301, 43}, 118 }, + { {Description_names + 3344, 30}, 116 }, + { {Description_names + 3374, 35}, 117 }, + { {Description_names + 3409, 40}, 121 }, + { {Description_names + 3449, 31}, 119 }, + { {Description_names + 3480, 35}, 122 }, + { {Description_names + 3515, 37}, 123 }, + { {Description_names + 3552, 33}, 114 }, + { {Description_names + 3585, 15}, 160 }, + { {Description_names + 3600, 7}, 24 }, + { {Description_names + 3607, 26}, 54 }, + { {Description_names + 3633, 24}, 63 }, + { {Description_names + 3657, 26}, 128 }, + { {Description_names + 3683, 25}, 132 }, + { {Description_names + 3708, 7}, 0 }, + { {Description_names + 3715, 20}, 71 }, + { {Description_names + 3735, 29}, 133 }, + { {Description_names + 3764, 23}, 166 }, + { {Description_names + 3787, 28}, 168 }, + { {Description_names + 3815, 33}, 167 }, + { {Description_names + 3848, 26}, 169 }, + { {Description_names + 3874, 28}, 170 }, + { {Description_names + 3902, 21}, 104 }, + { {Description_names + 3923, 26}, 145 }, + { {Description_names + 3949, 28}, 112 }, + { {Description_names + 3977, 18}, 150 }, + { {Description_names + 3995, 20}, 73 }, + { {Description_names + 4015, 34}, 109 }, + { {Description_names + 4049, 29}, 110 }, + { {Description_names + 4078, 25}, 154 }, + { {Description_names + 4103, 28}, 88 }, + { {Description_names + 4131, 22}, 111 }, + { {Description_names + 4153, 30}, 35 }, + { {Description_names + 4183, 28}, 89 }, + { {Description_names + 4211, 17}, 130 }, +}; + +static const int Description_entries_by_number[] = { + 149, // 0 -> UNKNOWN + 95, // 1 -> NULL_SERVICE_ID + 77, // 2 -> NULL_ADVERTISEMENT_BYTES + 24, // 3 -> CONNECTIONS_FEATURE_DISABLED + 130, // 4 -> STALE_SDK_VERSION + 32, // 5 -> FEATURE_BLUETOOTH_NOT_SUPPORTED + 31, // 6 -> FEATURE_BLUETOOTH_LE_NOT_SUPPORTED + 85, // 7 -> NULL_BLUETOOTH_MANAGER + 79, // 8 -> NULL_BLUETOOTH_ADAPTER + 50, // 9 -> INVALID_FAST_PAIR_MODEL_ID + 49, // 10 -> INVALID_FAST_ADVERTISEMENT_DATA + 43, // 11 -> INVALID_ADVERTISEMENT_HEADER_DATA + 57, // 12 -> INVALID_REGULAR_ADVERTISEMENT_DATA + 83, // 13 -> NULL_BLUETOOTH_LE_ADVERTISER_COMPAT + 2, // 14 -> ADVERTISE_FAILED_ALREADY_STARTED + 3, // 15 -> ADVERTISE_FAILED_DATA_TOO_LARGE + 4, // 16 -> ADVERTISE_FAILED_FEATURE_UNSUPPORTED + 5, // 17 -> ADVERTISE_FAILED_INTERNAL_ERROR + 6, // 18 -> ADVERTISE_FAILED_TOO_MANY_ADVERTISERS + 42, // 19 -> INTERRUPTED_EXCEPTION + 29, // 20 -> EXECUTION_EXCEPTION + 81, // 21 -> NULL_BLUETOOTH_DEVICE_NAME + 122, // 22 -> SET_SCAN_MODE_FAILED + 61, // 23 -> INVOKE_API_FAILED + 144, // 24 -> TIMEOUT + 93, // 25 -> NULL_NFC_TAG + 34, // 26 -> FEATURE_NFC_NOT_SUPPORTED + 33, // 27 -> FEATURE_NFC_HOST_CARD_EMULATION_NOT_SUPPORTED + 66, // 30 -> MULTICAST_NOT_SUPPORTED + 75, // 31 -> NSD_NOT_ENABLED + 56, // 32 -> INVALID_PORT_NUMBER + 97, // 33 -> NULL_SERVICE_NAME + 98, // 34 -> NULL_SERVICE_TYPE + 167, // 35 -> WITHOUT_CONNECTED_WIFI_NETWORK + 35, // 36 -> FEATURE_WIFI_AWARE_NOT_SUPPORTED + 88, // 37 -> NULL_CONNECTIVITY_MANAGER + 100, // 38 -> NULL_WIFI_AWARE_MANAGER + 129, // 39 -> STALE_ANDROID_VERSION + 96, // 40 -> NULL_SERVICE_INFO + 104, // 41 -> NULL_WORK_SOURCE + 87, // 42 -> NULL_CALLBACK + 84, // 43 -> NULL_BLUETOOTH_LE_SCANNER_COMPAT + 28, // 44 -> EMPTY_WORK_SOURCE_CACHE + 113, // 45 -> SCAN_FAILED_ALREADY_STARTED + 114, // 46 -> SCAN_FAILED_APPLICATION_REGISTRATION_FAILED + 117, // 47 -> SCAN_FAILED_INTERNAL_ERROR + 116, // 48 -> SCAN_FAILED_FEATURE_UNSUPPORTED + 115, // 49 -> SCAN_FAILED_BLUETOOTH_DISABLED + 118, // 50 -> SCAN_FILTERS_NOT_ALLOWED_FOR_LOCATION + 19, // 51 -> BLUETOOTH_SCAN_REJUVENATE_FAILED + 78, // 52 -> NULL_BLE_PERIPHERAL + 82, // 53 -> NULL_BLUETOOTH_GATT + 145, // 54 -> UNEXPECTED_BLUETOOTH_STATE + 112, // 55 -> REMOTE_EXCEPTION + 48, // 56 -> INVALID_BLUETOOTH_SOCKET_STATE_BEFORE_CONNECT + 20, // 57 -> BLUETOOTH_SOCKET_CLOSED_AFTER_CONNECTED + 45, // 58 -> INVALID_BLUETOOTH_CHANNEL + 80, // 59 -> NULL_BLUETOOTH_DEVICE + 86, // 60 -> NULL_BLUETOOTH_PROXY + 55, // 61 -> INVALID_PACKET_LENGTH + 54, // 62 -> INVALID_PACKET_BYTES + 146, // 63 -> UNEXPECTED_EOF_EXCEPTION + 127, // 64 -> SOCKET_CLOSED_OR_TIMEOUT + 51, // 65 -> INVALID_IPV4_ADDRESS + 52, // 66 -> INVALID_IPV6_ADDRESS + 76, // 67 -> NULL_ADDRESS + 59, // 68 -> INVALID_VERSION + 120, // 69 -> SET_CONNECTION_PRIORITY_FAILED + 121, // 70 -> SET_CONNECTION_PRIORITY_INTERRUPTED + 150, // 71 -> UNKNOWN_IO_EXCEPTION + 110, // 72 -> READ_CHARACTERISTIC_FAILED + 161, // 73 -> WIFI_HOTSPOT_ENABLED + 16, // 74 -> AWARE_UNAVAILABLE + 62, // 75 -> IN_BLACK_LIST + 37, // 76 -> FEATURE_WIFI_NOT_SUPPORTED + 102, // 77 -> NULL_WIFI_MANAGER + 126, // 78 -> SOCKET_CLOSED + 124, // 79 -> SOCKET_ALREADY_CONNECTED + 73, // 80 -> NFC_TECH_NOT_SUPPORTED + 72, // 81 -> NFC_SERVICE_DIED + 18, // 82 -> BIND_NFC_SERVICE_FAILED + 71, // 83 -> NFC_CREATE_SOCKET_FAILED + 101, // 84 -> NULL_WIFI_AWARE_PEER + 67, // 85 -> NETWORK_ALREADY_JOINED + 64, // 86 -> JOIN_AWARE_NETWORK_CANCELLED + 70, // 87 -> NETWORK_UNAVAILABLE + 165, // 88 -> WITHOUT_ACTIVE_AWARE_NETWORK + 168, // 89 -> WITHOUT_JOINED_AWARE_NETWORK + 25, // 90 -> CONNET_TO_SOCKET_CANCELLED + 99, // 91 -> NULL_SSID + 94, // 92 -> NULL_PASSWORD + 36, // 93 -> FEATURE_WIFI_DIRECT_NOT_SUPPORTED + 103, // 94 -> NULL_WIFI_P2P_MANAGER + 105, // 95 -> P2P_GROUP_FORMED + 0, // 96 -> ACQUIRE_P2P_CHANNEL_FAILED + 106, // 97 -> P2P_UNSUPPORTED + 41, // 98 -> INTERNAL_ERROR + 22, // 99 -> BUSY + 111, // 100 -> REFLECTION_ERROR + 68, // 101 -> NETWORK_ERROR_EHOSTUNREACH + 69, // 102 -> NETWORK_ERROR_ENETUNREACH + 1, // 103 -> ADD_NETWORK_FAILED + 157, // 104 -> UPDATE_NETWORK_FAILED + 8, // 105 -> ALREADY_IN_PROGRESS + 44, // 106 -> INVALID_ARGS + 74, // 107 -> NOT_AUTHORIZED + 53, // 108 -> INVALID_NETWORK_ID + 162, // 109 -> WIFI_MANAGER_ENABLE_NETWORK_FAILED + 163, // 110 -> WIFI_MANAGER_RECONNECT_FAILED + 166, // 111 -> WITHOUT_ACTIVE_NETWORK + 159, // 112 -> WEBRTC_CONNECTION_FLOW_EXIST + 90, // 113 -> NULL_DROID_GUARD_RESULT + 142, // 114 -> TACHYON_SIGNALING_MESSENGER_EXIST + 131, // 115 -> TACHYON_ALREADY_START_RECEIVE_MESSAGE + 136, // 116 -> TACHYON_RECEIVE_MESSAGE_FAILED + 137, // 117 -> TACHYON_RECEIVE_MESSAGE_INTERRUPTED + 135, // 118 -> TACHYON_RECEIVE_MESSAGE_EXECUTION_EXCEPTION + 139, // 119 -> TACHYON_RECEIVE_MESSAGE_TIMEOUT + 134, // 120 -> TACHYON_RECEIVE_MESSAGE_AUTH_EXCEPTION + 138, // 121 -> TACHYON_RECEIVE_MESSAGE_STATUS_EXCEPTION + 140, // 122 -> TACHYON_SEND_MESSAGE_AUTH_EXCEPTION + 141, // 123 -> TACHYON_SEND_MESSAGE_STATUS_EXCEPTION + 132, // 124 -> TACHYON_GET_ICE_SERVER_AUTH_EXCEPTION + 133, // 125 -> TACHYON_GET_ICE_SERVER_STATUS_EXCEPTION + 27, // 126 -> EMPTY_TACHYON_ICE_SERVER + 108, // 127 -> POTENTIAL_WEBRTC_LIB_LOADING_FAILURE + 147, // 128 -> UNEXPECTED_GATT_DESCRIPTOR + 30, // 129 -> FAIL_TO_RECEIVE_L2CAP_PACKET + 169, // 130 -> WITHOUT_PSM_VALUE + 125, // 131 -> SOCKET_BIND_LISTEN_FAILED + 148, // 132 -> UNEXPECTED_PACKET_CONTENT + 151, // 133 -> UNREGISTER_NSD_MANAGER_FAILED + 109, // 134 -> PUBLISH_EMPTY_ADVERTISEMENT_FAILED + 21, // 135 -> BLUETOOTH_SOCKET_NOT_IN_LISTENING_STATE + 46, // 136 -> INVALID_BLUETOOTH_SOCKET_SIGNAL_SIZE + 47, // 137 -> INVALID_BLUETOOTH_SOCKET_SIGNAL_STATUS + 38, // 138 -> GET_ADDRESS_FAILED + 91, // 139 -> NULL_LOCAL_ADDRESS + 63, // 140 -> IS_LOOPBACK_ADDRESS + 128, // 141 -> SOCKET_NOT_BOUND + 58, // 142 -> INVALID_REMOTE_ADDRESS + 123, // 143 -> SOCKET_ALREADY_BOUND + 40, // 144 -> HOTSPOT_NOT_STARTED + 158, // 145 -> WEBRTC_ALREADY_INITIALIZED + 60, // 146 -> INVALID_WEBRTC_STATE + 89, // 147 -> NULL_DATA_CHANNEL + 26, // 148 -> CREATE_OFFER_FAILED + 23, // 149 -> CLOSE_SERVER_SOCKET_FAILED + 160, // 150 -> WIFI_AWARE_STARTED + 14, // 151 -> AWARE_PUBLISH_SESSION_RAN_OUT + 15, // 152 -> AWARE_SUBSCRIBE_SESSION_RAN_OUT + 9, // 153 -> AWARE_DATA_PATH_RAN_OUT + 164, // 154 -> WIFI_SIGNAL_STRENGTH_POOR + 107, // 155 -> POTENTIAL_SRD_ISSUE + 11, // 156 -> AWARE_L2_MESSAGE_HOST_NETWORK_ERROR + 13, // 157 -> AWARE_L2_MESSAGE_NETWORK_AVAILABLE_ERROR + 12, // 158 -> AWARE_L2_MESSAGE_IP_AVAILABLE_ERROR + 10, // 159 -> AWARE_L2_MESSAGE_CANCELLATION_RECEIVED + 143, // 160 -> TIE_BREAK_LOSER + 119, // 161 -> SERVER_SOCKET_UNAVAILABLE + 39, // 162 -> HOSTED_NETWORK_UNAVAILABLE + 17, // 163 -> AWARE_UPDATE_PUBLISHING_CONFIG_FAILED + 65, // 164 -> L2CAP_UNAVAILABLE + 7, // 165 -> ALREADY_HAS_GATT_CONNECTION + 152, // 166 -> UNSUPPORTED_DEVICE_TYPE + 154, // 167 -> UNSUPPORTED_DEVICE_TYPE_CHROME_OS + 153, // 168 -> UNSUPPORTED_DEVICE_TYPE_AUTO + 155, // 169 -> UNSUPPORTED_DEVICE_TYPE_TV + 156, // 170 -> UNSUPPORTED_DEVICE_TYPE_WEAR + 92, // 171 -> NULL_MESSAGE +}; + +const std::string& Description_Name( + Description value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + Description_entries, + Description_entries_by_number, + 170, Description_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + Description_entries, + Description_entries_by_number, + 170, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + Description_strings[idx].get(); +} +bool Description_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, Description* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + Description_entries, 170, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} + +// @@protoc_insertion_point(namespace_scope) +} // namespace proto +} // namespace errorcode +} // namespace nearby +} // namespace location +PROTOBUF_NAMESPACE_OPEN +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) +#include diff --git a/proto/errorcode/error_code_enums.pb.h b/proto/errorcode/error_code_enums.pb.h new file mode 100644 index 00000000..512a5c46 --- /dev/null +++ b/proto/errorcode/error_code_enums.pb.h @@ -0,0 +1,569 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: proto/errorcode/error_code_enums.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_proto_2ferrorcode_2ferror_5fcode_5fenums_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_proto_2ferrorcode_2ferror_5fcode_5fenums_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3019000 +#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 3019004 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_proto_2ferrorcode_2ferror_5fcode_5fenums_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_proto_2ferrorcode_2ferror_5fcode_5fenums_2eproto { + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::AuxiliaryParseTableField aux[] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[1] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[]; + static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[]; + static const uint32_t offsets[]; +}; +PROTOBUF_NAMESPACE_OPEN +PROTOBUF_NAMESPACE_CLOSE +namespace location { +namespace nearby { +namespace errorcode { +namespace proto { + +enum ErrorType : int { + UNKNOWN_TYPE = 0, + DEVELOPING = 1, + DEVICE = 2, + SYSTEM = 3, + NETWORK = 4, + OTHERS = 5 +}; +bool ErrorType_IsValid(int value); +constexpr ErrorType ErrorType_MIN = UNKNOWN_TYPE; +constexpr ErrorType ErrorType_MAX = OTHERS; +constexpr int ErrorType_ARRAYSIZE = ErrorType_MAX + 1; + +const std::string& ErrorType_Name(ErrorType value); +template +inline const std::string& ErrorType_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function ErrorType_Name."); + return ErrorType_Name(static_cast(enum_t_value)); +} +bool ErrorType_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, ErrorType* value); +enum Event : int { + UNKNOWN_EVENT = 0, + START_ADVERTISING = 1, + STOP_ADVERTISING = 2, + START_LISTENING_INCOMING_CONNECTION = 3, + STOP_LISTENING_INCOMING_CONNECTION = 4, + START_DISCOVERING = 5, + STOP_DISCOVERING = 6, + CONNECT = 7, + DISCONNECT = 8, + ACCEPT_CONNECTION = 9, + REJECT_CONNECTION = 10, + SEND_PAYLOAD = 11, + CANCEL_PAYLOAD = 12, + RECEIVE_PAYLOAD = 13 +}; +bool Event_IsValid(int value); +constexpr Event Event_MIN = UNKNOWN_EVENT; +constexpr Event Event_MAX = RECEIVE_PAYLOAD; +constexpr int Event_ARRAYSIZE = Event_MAX + 1; + +const std::string& Event_Name(Event value); +template +inline const std::string& Event_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function Event_Name."); + return Event_Name(static_cast(enum_t_value)); +} +bool Event_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, Event* value); +enum CommonError : int { + UNKNOWN_ERROR = 0, + INVALID_PARAMETER = 1, + MEDIUM_NOT_AVAILABLE = 2, + UNEXPECTED_MEDIUM_STATE = 3, + OUT_OF_RESOURCE = 4, + FLOW_CANCELED = 5, + UNEXPECTED_CALL = 6 +}; +bool CommonError_IsValid(int value); +constexpr CommonError CommonError_MIN = UNKNOWN_ERROR; +constexpr CommonError CommonError_MAX = UNEXPECTED_CALL; +constexpr int CommonError_ARRAYSIZE = CommonError_MAX + 1; + +const std::string& CommonError_Name(CommonError value); +template +inline const std::string& CommonError_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function CommonError_Name."); + return CommonError_Name(static_cast(enum_t_value)); +} +bool CommonError_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, CommonError* value); +enum StartAdvertisingError : int { + MULTIPLE_FAST_ADVERTISEMENT_NOT_ALLOWED = 31, + FAST_ADVERTISEMENT_ALREADY_ADVERTISED = 32, + DUPLICATE_ADVERTISING_REQUESTED = 33, + START_GATT_SERVER_FAILED = 34, + BLE_MAX_GATT_ADVERTISEMENT_SLOT_REACHED = 35, + START_LEGACY_ADVERTISING_FAILED = 36, + START_EXTENDED_ADVERTISING_FAILED = 38, + BLUETOOTH_ALREADY_ADVERTISED = 40, + MODIFY_BLUETOOTH_NAME_FAILED = 41, + PERSIST_ORIGINAL_BLUETOOTH_NAME_FAILED = 42, + START_ADVERTISING_FAILED = 43, + SHOULD_ACCEPT_CONNECTIONS_BEFORE_ADVERTISING_ON_WIFI_LAN = 44, + ACQUIRE_WIFI_AWARE_SESSION_FAILED = 45, + UNKNOWN_START_ADVERTISING_ERROR = 46, + AWARE_UPDATE_PUBLISHING_FAILED = 47 +}; +bool StartAdvertisingError_IsValid(int value); +constexpr StartAdvertisingError StartAdvertisingError_MIN = MULTIPLE_FAST_ADVERTISEMENT_NOT_ALLOWED; +constexpr StartAdvertisingError StartAdvertisingError_MAX = AWARE_UPDATE_PUBLISHING_FAILED; +constexpr int StartAdvertisingError_ARRAYSIZE = StartAdvertisingError_MAX + 1; + +const std::string& StartAdvertisingError_Name(StartAdvertisingError value); +template +inline const std::string& StartAdvertisingError_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function StartAdvertisingError_Name."); + return StartAdvertisingError_Name(static_cast(enum_t_value)); +} +bool StartAdvertisingError_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, StartAdvertisingError* value); +enum StopAdvertisingError : int { + STOP_ADVERTISING_FAILED = 31, + RESTORE_BLUETOOTH_NAME_FAILED = 32, + STOP_LEGACY_ADVERTISING_FAILED = 33, + STOP_EXTENDED_ADVERTISING_FAILED = 34, + UNKNOWN_STOP_ADVERTISING_ERROR = 35 +}; +bool StopAdvertisingError_IsValid(int value); +constexpr StopAdvertisingError StopAdvertisingError_MIN = STOP_ADVERTISING_FAILED; +constexpr StopAdvertisingError StopAdvertisingError_MAX = UNKNOWN_STOP_ADVERTISING_ERROR; +constexpr int StopAdvertisingError_ARRAYSIZE = StopAdvertisingError_MAX + 1; + +const std::string& StopAdvertisingError_Name(StopAdvertisingError value); +template +inline const std::string& StopAdvertisingError_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function StopAdvertisingError_Name."); + return StopAdvertisingError_Name(static_cast(enum_t_value)); +} +bool StopAdvertisingError_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, StopAdvertisingError* value); +enum StartDiscoveringError : int { + DUPLICATE_DISCOVERING_REQUESTED = 31, + START_LEGACY_DISCOVERING_FAILED = 32, + START_EXTENDED_DISCOVERING_FAILED = 33, + START_DISCOVERING_FAILED = 34, + INVALID_TARGET_INFO = 35, + FETCH_ADVERTISEMENT_FAILED = 36, + GATT_FETCH_ADVERTISEMENT_FAILED = 37, + L2CAP_FETCH_ADVERTISEMENT_FAILED = 38, + NOT_AVAILABLE_TO_FETCH_ADVERTISEMENT = 39, + ACQUIRE_WIFI_AWARE_SESSION_FOR_DISCOVERING_FAILED = 40, + UNKNOWN_START_DISCOVERING_ERROR = 41 +}; +bool StartDiscoveringError_IsValid(int value); +constexpr StartDiscoveringError StartDiscoveringError_MIN = DUPLICATE_DISCOVERING_REQUESTED; +constexpr StartDiscoveringError StartDiscoveringError_MAX = UNKNOWN_START_DISCOVERING_ERROR; +constexpr int StartDiscoveringError_ARRAYSIZE = StartDiscoveringError_MAX + 1; + +const std::string& StartDiscoveringError_Name(StartDiscoveringError value); +template +inline const std::string& StartDiscoveringError_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function StartDiscoveringError_Name."); + return StartDiscoveringError_Name(static_cast(enum_t_value)); +} +bool StartDiscoveringError_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, StartDiscoveringError* value); +enum StopDiscoveringError : int { + STOP_DISCOVERING_FAILED = 31, + STOP_LEGACY_DISCOVERING_FAILED = 32, + STOP_EXTENDED_DISCOVERING_FAILED = 33, + UNKNOWN_STOP_DISCOVERING_ERROR = 34 +}; +bool StopDiscoveringError_IsValid(int value); +constexpr StopDiscoveringError StopDiscoveringError_MIN = STOP_DISCOVERING_FAILED; +constexpr StopDiscoveringError StopDiscoveringError_MAX = UNKNOWN_STOP_DISCOVERING_ERROR; +constexpr int StopDiscoveringError_ARRAYSIZE = StopDiscoveringError_MAX + 1; + +const std::string& StopDiscoveringError_Name(StopDiscoveringError value); +template +inline const std::string& StopDiscoveringError_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function StopDiscoveringError_Name."); + return StopDiscoveringError_Name(static_cast(enum_t_value)); +} +bool StopDiscoveringError_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, StopDiscoveringError* value); +enum StartListeningIncomingConnectionError : int { + DUPLICATE_ACCEPTING_CONNECTION_REQUESTED = 31, + OPEN_GATT_SERVER_FAILED = 32, + ACCEPT_GATT_CONNECTION_FAILED = 33, + ACCEPT_L2CAP_CONNECTION_FAILED = 34, + CREATE_GATT_SERVER_SOCKET_NOT_READY = 35, + ACCEPT_CONNECTION_FAILED = 36, + CREATE_SERVER_SOCKET_FAILED = 37, + UNKNOWN_START_LISTENING_INCOMING_CONNECTION_ERROR = 38, + ACCEPT_SEND_AWARE_L2_MESSAGE_FAILED = 39, + ACCEPT_RECEIVE_AWARE_L2_MESSAGE_FAILED = 40 +}; +bool StartListeningIncomingConnectionError_IsValid(int value); +constexpr StartListeningIncomingConnectionError StartListeningIncomingConnectionError_MIN = DUPLICATE_ACCEPTING_CONNECTION_REQUESTED; +constexpr StartListeningIncomingConnectionError StartListeningIncomingConnectionError_MAX = ACCEPT_RECEIVE_AWARE_L2_MESSAGE_FAILED; +constexpr int StartListeningIncomingConnectionError_ARRAYSIZE = StartListeningIncomingConnectionError_MAX + 1; + +const std::string& StartListeningIncomingConnectionError_Name(StartListeningIncomingConnectionError value); +template +inline const std::string& StartListeningIncomingConnectionError_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function StartListeningIncomingConnectionError_Name."); + return StartListeningIncomingConnectionError_Name(static_cast(enum_t_value)); +} +bool StartListeningIncomingConnectionError_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, StartListeningIncomingConnectionError* value); +enum StopListeningIncomingConnectionError : int { + STOP_ACCEPTING_CONNECTION_FAILED = 31, + UNKNOWN_STOP_LISTENING_INCOMING_CONNECTION_ERROR = 32 +}; +bool StopListeningIncomingConnectionError_IsValid(int value); +constexpr StopListeningIncomingConnectionError StopListeningIncomingConnectionError_MIN = STOP_ACCEPTING_CONNECTION_FAILED; +constexpr StopListeningIncomingConnectionError StopListeningIncomingConnectionError_MAX = UNKNOWN_STOP_LISTENING_INCOMING_CONNECTION_ERROR; +constexpr int StopListeningIncomingConnectionError_ARRAYSIZE = StopListeningIncomingConnectionError_MAX + 1; + +const std::string& StopListeningIncomingConnectionError_Name(StopListeningIncomingConnectionError value); +template +inline const std::string& StopListeningIncomingConnectionError_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function StopListeningIncomingConnectionError_Name."); + return StopListeningIncomingConnectionError_Name(static_cast(enum_t_value)); +} +bool StopListeningIncomingConnectionError_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, StopListeningIncomingConnectionError* value); +enum ConnectError : int { + UNEXPECT_TARGET_LOST = 31, + ESTABLISH_GATT_CONNECTION_FAILED = 32, + ESTABLISH_L2CAP_CONNECTION_FAILED = 33, + INVALID_MAC_ADDRESS = 34, + SLEEP_BEFORE_CONNECT_GATT_INTERRUPTED = 35, + SLEEP_AFTER_GATT_CONNECTED_INTERRUPTED = 36, + REQUEST_GATT_CONNECTION_PRIORITY_FAILED = 37, + L2CAP_SWITCH_TO_DATA_TRANSFERRING_FAILED = 38, + GATT_SWITCH_TO_DATA_TRANSFERRING_FAILED = 39, + ESTABLISH_CONNECTION_FAILED = 40, + DUPLICATE_CONNECTION_REQUESTED = 41, + CONNECTION_LOST = 42, + CONNECT_TO_NETWORK_FAILED = 43, + UNKNOWN_CONNECT_ERROR = 44, + CONNECT_SEND_AWARE_L2_MESSAGE_FAILED = 45, + CONNECT_READ_AWARE_L2_MESSAGE_FAILED = 46 +}; +bool ConnectError_IsValid(int value); +constexpr ConnectError ConnectError_MIN = UNEXPECT_TARGET_LOST; +constexpr ConnectError ConnectError_MAX = CONNECT_READ_AWARE_L2_MESSAGE_FAILED; +constexpr int ConnectError_ARRAYSIZE = ConnectError_MAX + 1; + +const std::string& ConnectError_Name(ConnectError value); +template +inline const std::string& ConnectError_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function ConnectError_Name."); + return ConnectError_Name(static_cast(enum_t_value)); +} +bool ConnectError_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, ConnectError* value); +enum DisconnectError : int { + DISCONNECT_NETWORK_FAILED = 31, + UNKNOWN_DISCONNECT_ERROR = 32 +}; +bool DisconnectError_IsValid(int value); +constexpr DisconnectError DisconnectError_MIN = DISCONNECT_NETWORK_FAILED; +constexpr DisconnectError DisconnectError_MAX = UNKNOWN_DISCONNECT_ERROR; +constexpr int DisconnectError_ARRAYSIZE = DisconnectError_MAX + 1; + +const std::string& DisconnectError_Name(DisconnectError value); +template +inline const std::string& DisconnectError_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function DisconnectError_Name."); + return DisconnectError_Name(static_cast(enum_t_value)); +} +bool DisconnectError_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, DisconnectError* value); +enum Description : int { + UNKNOWN = 0, + NULL_SERVICE_ID = 1, + NULL_ADVERTISEMENT_BYTES = 2, + CONNECTIONS_FEATURE_DISABLED = 3, + STALE_SDK_VERSION = 4, + FEATURE_BLUETOOTH_NOT_SUPPORTED = 5, + FEATURE_BLUETOOTH_LE_NOT_SUPPORTED = 6, + NULL_BLUETOOTH_MANAGER = 7, + NULL_BLUETOOTH_ADAPTER = 8, + INVALID_FAST_PAIR_MODEL_ID = 9, + INVALID_FAST_ADVERTISEMENT_DATA = 10, + INVALID_ADVERTISEMENT_HEADER_DATA = 11, + INVALID_REGULAR_ADVERTISEMENT_DATA = 12, + NULL_BLUETOOTH_LE_ADVERTISER_COMPAT = 13, + ADVERTISE_FAILED_ALREADY_STARTED = 14, + ADVERTISE_FAILED_DATA_TOO_LARGE = 15, + ADVERTISE_FAILED_FEATURE_UNSUPPORTED = 16, + ADVERTISE_FAILED_INTERNAL_ERROR = 17, + ADVERTISE_FAILED_TOO_MANY_ADVERTISERS = 18, + INTERRUPTED_EXCEPTION = 19, + EXECUTION_EXCEPTION = 20, + NULL_BLUETOOTH_DEVICE_NAME = 21, + SET_SCAN_MODE_FAILED = 22, + INVOKE_API_FAILED = 23, + TIMEOUT = 24, + NULL_NFC_TAG = 25, + FEATURE_NFC_NOT_SUPPORTED = 26, + FEATURE_NFC_HOST_CARD_EMULATION_NOT_SUPPORTED = 27, + MULTICAST_NOT_SUPPORTED = 30, + NSD_NOT_ENABLED = 31, + INVALID_PORT_NUMBER = 32, + NULL_SERVICE_NAME = 33, + NULL_SERVICE_TYPE = 34, + WITHOUT_CONNECTED_WIFI_NETWORK = 35, + FEATURE_WIFI_AWARE_NOT_SUPPORTED = 36, + NULL_CONNECTIVITY_MANAGER = 37, + NULL_WIFI_AWARE_MANAGER = 38, + STALE_ANDROID_VERSION = 39, + NULL_SERVICE_INFO = 40, + NULL_WORK_SOURCE = 41, + NULL_CALLBACK = 42, + NULL_BLUETOOTH_LE_SCANNER_COMPAT = 43, + EMPTY_WORK_SOURCE_CACHE = 44, + SCAN_FAILED_ALREADY_STARTED = 45, + SCAN_FAILED_APPLICATION_REGISTRATION_FAILED = 46, + SCAN_FAILED_INTERNAL_ERROR = 47, + SCAN_FAILED_FEATURE_UNSUPPORTED = 48, + SCAN_FAILED_BLUETOOTH_DISABLED = 49, + SCAN_FILTERS_NOT_ALLOWED_FOR_LOCATION = 50, + BLUETOOTH_SCAN_REJUVENATE_FAILED = 51, + NULL_BLE_PERIPHERAL = 52, + NULL_BLUETOOTH_GATT = 53, + UNEXPECTED_BLUETOOTH_STATE = 54, + REMOTE_EXCEPTION = 55, + INVALID_BLUETOOTH_SOCKET_STATE_BEFORE_CONNECT = 56, + BLUETOOTH_SOCKET_CLOSED_AFTER_CONNECTED = 57, + INVALID_BLUETOOTH_CHANNEL = 58, + NULL_BLUETOOTH_DEVICE = 59, + NULL_BLUETOOTH_PROXY = 60, + INVALID_PACKET_LENGTH = 61, + INVALID_PACKET_BYTES = 62, + UNEXPECTED_EOF_EXCEPTION = 63, + SOCKET_CLOSED_OR_TIMEOUT = 64, + INVALID_IPV4_ADDRESS = 65, + INVALID_IPV6_ADDRESS = 66, + NULL_ADDRESS = 67, + INVALID_VERSION = 68, + SET_CONNECTION_PRIORITY_FAILED = 69, + SET_CONNECTION_PRIORITY_INTERRUPTED = 70, + UNKNOWN_IO_EXCEPTION = 71, + READ_CHARACTERISTIC_FAILED = 72, + WIFI_HOTSPOT_ENABLED = 73, + AWARE_UNAVAILABLE = 74, + IN_BLACK_LIST = 75, + FEATURE_WIFI_NOT_SUPPORTED = 76, + NULL_WIFI_MANAGER = 77, + SOCKET_CLOSED = 78, + SOCKET_ALREADY_CONNECTED = 79, + NFC_TECH_NOT_SUPPORTED = 80, + NFC_SERVICE_DIED = 81, + BIND_NFC_SERVICE_FAILED = 82, + NFC_CREATE_SOCKET_FAILED = 83, + NULL_WIFI_AWARE_PEER = 84, + NETWORK_ALREADY_JOINED = 85, + JOIN_AWARE_NETWORK_CANCELLED = 86, + NETWORK_UNAVAILABLE = 87, + WITHOUT_ACTIVE_AWARE_NETWORK = 88, + WITHOUT_JOINED_AWARE_NETWORK = 89, + CONNET_TO_SOCKET_CANCELLED = 90, + NULL_SSID = 91, + NULL_PASSWORD = 92, + FEATURE_WIFI_DIRECT_NOT_SUPPORTED = 93, + NULL_WIFI_P2P_MANAGER = 94, + P2P_GROUP_FORMED = 95, + ACQUIRE_P2P_CHANNEL_FAILED = 96, + P2P_UNSUPPORTED = 97, + INTERNAL_ERROR = 98, + BUSY = 99, + REFLECTION_ERROR = 100, + NETWORK_ERROR_EHOSTUNREACH = 101, + NETWORK_ERROR_ENETUNREACH = 102, + ADD_NETWORK_FAILED = 103, + UPDATE_NETWORK_FAILED = 104, + ALREADY_IN_PROGRESS = 105, + INVALID_ARGS = 106, + NOT_AUTHORIZED = 107, + INVALID_NETWORK_ID = 108, + WIFI_MANAGER_ENABLE_NETWORK_FAILED = 109, + WIFI_MANAGER_RECONNECT_FAILED = 110, + WITHOUT_ACTIVE_NETWORK = 111, + WEBRTC_CONNECTION_FLOW_EXIST = 112, + NULL_DROID_GUARD_RESULT = 113, + TACHYON_SIGNALING_MESSENGER_EXIST = 114, + TACHYON_ALREADY_START_RECEIVE_MESSAGE = 115, + TACHYON_RECEIVE_MESSAGE_FAILED = 116, + TACHYON_RECEIVE_MESSAGE_INTERRUPTED = 117, + TACHYON_RECEIVE_MESSAGE_EXECUTION_EXCEPTION = 118, + TACHYON_RECEIVE_MESSAGE_TIMEOUT = 119, + TACHYON_RECEIVE_MESSAGE_AUTH_EXCEPTION = 120, + TACHYON_RECEIVE_MESSAGE_STATUS_EXCEPTION = 121, + TACHYON_SEND_MESSAGE_AUTH_EXCEPTION = 122, + TACHYON_SEND_MESSAGE_STATUS_EXCEPTION = 123, + TACHYON_GET_ICE_SERVER_AUTH_EXCEPTION = 124, + TACHYON_GET_ICE_SERVER_STATUS_EXCEPTION = 125, + EMPTY_TACHYON_ICE_SERVER = 126, + POTENTIAL_WEBRTC_LIB_LOADING_FAILURE = 127, + UNEXPECTED_GATT_DESCRIPTOR = 128, + FAIL_TO_RECEIVE_L2CAP_PACKET = 129, + WITHOUT_PSM_VALUE = 130, + SOCKET_BIND_LISTEN_FAILED = 131, + UNEXPECTED_PACKET_CONTENT = 132, + UNREGISTER_NSD_MANAGER_FAILED = 133, + PUBLISH_EMPTY_ADVERTISEMENT_FAILED = 134, + BLUETOOTH_SOCKET_NOT_IN_LISTENING_STATE = 135, + INVALID_BLUETOOTH_SOCKET_SIGNAL_SIZE = 136, + INVALID_BLUETOOTH_SOCKET_SIGNAL_STATUS = 137, + GET_ADDRESS_FAILED = 138, + NULL_LOCAL_ADDRESS = 139, + IS_LOOPBACK_ADDRESS = 140, + SOCKET_NOT_BOUND = 141, + INVALID_REMOTE_ADDRESS = 142, + SOCKET_ALREADY_BOUND = 143, + HOTSPOT_NOT_STARTED = 144, + WEBRTC_ALREADY_INITIALIZED = 145, + INVALID_WEBRTC_STATE = 146, + NULL_DATA_CHANNEL = 147, + CREATE_OFFER_FAILED = 148, + CLOSE_SERVER_SOCKET_FAILED = 149, + WIFI_AWARE_STARTED = 150, + AWARE_PUBLISH_SESSION_RAN_OUT = 151, + AWARE_SUBSCRIBE_SESSION_RAN_OUT = 152, + AWARE_DATA_PATH_RAN_OUT = 153, + WIFI_SIGNAL_STRENGTH_POOR = 154, + POTENTIAL_SRD_ISSUE = 155, + AWARE_L2_MESSAGE_HOST_NETWORK_ERROR = 156, + AWARE_L2_MESSAGE_NETWORK_AVAILABLE_ERROR = 157, + AWARE_L2_MESSAGE_IP_AVAILABLE_ERROR = 158, + AWARE_L2_MESSAGE_CANCELLATION_RECEIVED = 159, + TIE_BREAK_LOSER = 160, + SERVER_SOCKET_UNAVAILABLE = 161, + HOSTED_NETWORK_UNAVAILABLE = 162, + AWARE_UPDATE_PUBLISHING_CONFIG_FAILED = 163, + L2CAP_UNAVAILABLE = 164, + ALREADY_HAS_GATT_CONNECTION = 165, + UNSUPPORTED_DEVICE_TYPE = 166, + UNSUPPORTED_DEVICE_TYPE_CHROME_OS = 167, + UNSUPPORTED_DEVICE_TYPE_AUTO = 168, + UNSUPPORTED_DEVICE_TYPE_TV = 169, + UNSUPPORTED_DEVICE_TYPE_WEAR = 170, + NULL_MESSAGE = 171 +}; +bool Description_IsValid(int value); +constexpr Description Description_MIN = UNKNOWN; +constexpr Description Description_MAX = NULL_MESSAGE; +constexpr int Description_ARRAYSIZE = Description_MAX + 1; + +const std::string& Description_Name(Description value); +template +inline const std::string& Description_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function Description_Name."); + return Description_Name(static_cast(enum_t_value)); +} +bool Description_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, Description* value); +// =================================================================== + + +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ + +// @@protoc_insertion_point(namespace_scope) + +} // namespace proto +} // namespace errorcode +} // namespace nearby +} // namespace location + +PROTOBUF_NAMESPACE_OPEN + +template <> struct is_proto_enum< ::location::nearby::errorcode::proto::ErrorType> : ::std::true_type {}; +template <> struct is_proto_enum< ::location::nearby::errorcode::proto::Event> : ::std::true_type {}; +template <> struct is_proto_enum< ::location::nearby::errorcode::proto::CommonError> : ::std::true_type {}; +template <> struct is_proto_enum< ::location::nearby::errorcode::proto::StartAdvertisingError> : ::std::true_type {}; +template <> struct is_proto_enum< ::location::nearby::errorcode::proto::StopAdvertisingError> : ::std::true_type {}; +template <> struct is_proto_enum< ::location::nearby::errorcode::proto::StartDiscoveringError> : ::std::true_type {}; +template <> struct is_proto_enum< ::location::nearby::errorcode::proto::StopDiscoveringError> : ::std::true_type {}; +template <> struct is_proto_enum< ::location::nearby::errorcode::proto::StartListeningIncomingConnectionError> : ::std::true_type {}; +template <> struct is_proto_enum< ::location::nearby::errorcode::proto::StopListeningIncomingConnectionError> : ::std::true_type {}; +template <> struct is_proto_enum< ::location::nearby::errorcode::proto::ConnectError> : ::std::true_type {}; +template <> struct is_proto_enum< ::location::nearby::errorcode::proto::DisconnectError> : ::std::true_type {}; +template <> struct is_proto_enum< ::location::nearby::errorcode::proto::Description> : ::std::true_type {}; + +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_proto_2ferrorcode_2ferror_5fcode_5fenums_2eproto diff --git a/proto/mediums/ble_frames.pb.cc b/proto/mediums/ble_frames.pb.cc new file mode 100644 index 00000000..42f55f75 --- /dev/null +++ b/proto/mediums/ble_frames.pb.cc @@ -0,0 +1,1271 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: proto/mediums/ble_frames.proto + +#include "proto/mediums/ble_frames.pb.h" + +#include + +#include +#include +#include +#include +// @@protoc_insertion_point(includes) +#include + +PROTOBUF_PRAGMA_INIT_SEG +namespace location { +namespace nearby { +namespace mediums { +constexpr SocketControlFrame::SocketControlFrame( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : introduction_(nullptr) + , disconnection_(nullptr) + , packet_acknowledgement_(nullptr) + , type_(0) +{} +struct SocketControlFrameDefaultTypeInternal { + constexpr SocketControlFrameDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~SocketControlFrameDefaultTypeInternal() {} + union { + SocketControlFrame _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT SocketControlFrameDefaultTypeInternal _SocketControlFrame_default_instance_; +constexpr IntroductionFrame::IntroductionFrame( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : service_id_hash_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , socket_version_(0) +{} +struct IntroductionFrameDefaultTypeInternal { + constexpr IntroductionFrameDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~IntroductionFrameDefaultTypeInternal() {} + union { + IntroductionFrame _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT IntroductionFrameDefaultTypeInternal _IntroductionFrame_default_instance_; +constexpr DisconnectionFrame::DisconnectionFrame( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : service_id_hash_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){} +struct DisconnectionFrameDefaultTypeInternal { + constexpr DisconnectionFrameDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~DisconnectionFrameDefaultTypeInternal() {} + union { + DisconnectionFrame _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT DisconnectionFrameDefaultTypeInternal _DisconnectionFrame_default_instance_; +constexpr PacketAcknowledgementFrame::PacketAcknowledgementFrame( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : service_id_hash_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , received_size_(0){} +struct PacketAcknowledgementFrameDefaultTypeInternal { + constexpr PacketAcknowledgementFrameDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~PacketAcknowledgementFrameDefaultTypeInternal() {} + union { + PacketAcknowledgementFrame _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PacketAcknowledgementFrameDefaultTypeInternal _PacketAcknowledgementFrame_default_instance_; +} // namespace mediums +} // namespace nearby +} // namespace location +namespace location { +namespace nearby { +namespace mediums { +bool SocketControlFrame_ControlFrameType_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + case 3: + return true; + default: + return false; + } +} + +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed SocketControlFrame_ControlFrameType_strings[4] = {}; + +static const char SocketControlFrame_ControlFrameType_names[] = + "DISCONNECTION" + "INTRODUCTION" + "PACKET_ACKNOWLEDGEMENT" + "UNKNOWN_CONTROL_FRAME_TYPE"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry SocketControlFrame_ControlFrameType_entries[] = { + { {SocketControlFrame_ControlFrameType_names + 0, 13}, 2 }, + { {SocketControlFrame_ControlFrameType_names + 13, 12}, 1 }, + { {SocketControlFrame_ControlFrameType_names + 25, 22}, 3 }, + { {SocketControlFrame_ControlFrameType_names + 47, 26}, 0 }, +}; + +static const int SocketControlFrame_ControlFrameType_entries_by_number[] = { + 3, // 0 -> UNKNOWN_CONTROL_FRAME_TYPE + 1, // 1 -> INTRODUCTION + 0, // 2 -> DISCONNECTION + 2, // 3 -> PACKET_ACKNOWLEDGEMENT +}; + +const std::string& SocketControlFrame_ControlFrameType_Name( + SocketControlFrame_ControlFrameType value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + SocketControlFrame_ControlFrameType_entries, + SocketControlFrame_ControlFrameType_entries_by_number, + 4, SocketControlFrame_ControlFrameType_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + SocketControlFrame_ControlFrameType_entries, + SocketControlFrame_ControlFrameType_entries_by_number, + 4, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + SocketControlFrame_ControlFrameType_strings[idx].get(); +} +bool SocketControlFrame_ControlFrameType_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, SocketControlFrame_ControlFrameType* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + SocketControlFrame_ControlFrameType_entries, 4, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} +#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) +constexpr SocketControlFrame_ControlFrameType SocketControlFrame::UNKNOWN_CONTROL_FRAME_TYPE; +constexpr SocketControlFrame_ControlFrameType SocketControlFrame::INTRODUCTION; +constexpr SocketControlFrame_ControlFrameType SocketControlFrame::DISCONNECTION; +constexpr SocketControlFrame_ControlFrameType SocketControlFrame::PACKET_ACKNOWLEDGEMENT; +constexpr SocketControlFrame_ControlFrameType SocketControlFrame::ControlFrameType_MIN; +constexpr SocketControlFrame_ControlFrameType SocketControlFrame::ControlFrameType_MAX; +constexpr int SocketControlFrame::ControlFrameType_ARRAYSIZE; +#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) +bool SocketVersion_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + return true; + default: + return false; + } +} + +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed SocketVersion_strings[3] = {}; + +static const char SocketVersion_names[] = + "UNKNOWN_SOCKET_VERSION" + "V1" + "V2"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry SocketVersion_entries[] = { + { {SocketVersion_names + 0, 22}, 0 }, + { {SocketVersion_names + 22, 2}, 1 }, + { {SocketVersion_names + 24, 2}, 2 }, +}; + +static const int SocketVersion_entries_by_number[] = { + 0, // 0 -> UNKNOWN_SOCKET_VERSION + 1, // 1 -> V1 + 2, // 2 -> V2 +}; + +const std::string& SocketVersion_Name( + SocketVersion value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + SocketVersion_entries, + SocketVersion_entries_by_number, + 3, SocketVersion_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + SocketVersion_entries, + SocketVersion_entries_by_number, + 3, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + SocketVersion_strings[idx].get(); +} +bool SocketVersion_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, SocketVersion* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + SocketVersion_entries, 3, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} + +// =================================================================== + +class SocketControlFrame::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_type(HasBits* has_bits) { + (*has_bits)[0] |= 8u; + } + static const ::location::nearby::mediums::IntroductionFrame& introduction(const SocketControlFrame* msg); + static void set_has_introduction(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static const ::location::nearby::mediums::DisconnectionFrame& disconnection(const SocketControlFrame* msg); + static void set_has_disconnection(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static const ::location::nearby::mediums::PacketAcknowledgementFrame& packet_acknowledgement(const SocketControlFrame* msg); + static void set_has_packet_acknowledgement(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } +}; + +const ::location::nearby::mediums::IntroductionFrame& +SocketControlFrame::_Internal::introduction(const SocketControlFrame* msg) { + return *msg->introduction_; +} +const ::location::nearby::mediums::DisconnectionFrame& +SocketControlFrame::_Internal::disconnection(const SocketControlFrame* msg) { + return *msg->disconnection_; +} +const ::location::nearby::mediums::PacketAcknowledgementFrame& +SocketControlFrame::_Internal::packet_acknowledgement(const SocketControlFrame* msg) { + return *msg->packet_acknowledgement_; +} +SocketControlFrame::SocketControlFrame(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:location.nearby.mediums.SocketControlFrame) +} +SocketControlFrame::SocketControlFrame(const SocketControlFrame& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + if (from._internal_has_introduction()) { + introduction_ = new ::location::nearby::mediums::IntroductionFrame(*from.introduction_); + } else { + introduction_ = nullptr; + } + if (from._internal_has_disconnection()) { + disconnection_ = new ::location::nearby::mediums::DisconnectionFrame(*from.disconnection_); + } else { + disconnection_ = nullptr; + } + if (from._internal_has_packet_acknowledgement()) { + packet_acknowledgement_ = new ::location::nearby::mediums::PacketAcknowledgementFrame(*from.packet_acknowledgement_); + } else { + packet_acknowledgement_ = nullptr; + } + type_ = from.type_; + // @@protoc_insertion_point(copy_constructor:location.nearby.mediums.SocketControlFrame) +} + +inline void SocketControlFrame::SharedCtor() { +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&introduction_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&type_) - + reinterpret_cast(&introduction_)) + sizeof(type_)); +} + +SocketControlFrame::~SocketControlFrame() { + // @@protoc_insertion_point(destructor:location.nearby.mediums.SocketControlFrame) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void SocketControlFrame::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + if (this != internal_default_instance()) delete introduction_; + if (this != internal_default_instance()) delete disconnection_; + if (this != internal_default_instance()) delete packet_acknowledgement_; +} + +void SocketControlFrame::ArenaDtor(void* object) { + SocketControlFrame* _this = reinterpret_cast< SocketControlFrame* >(object); + (void)_this; +} +void SocketControlFrame::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void SocketControlFrame::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void SocketControlFrame::Clear() { +// @@protoc_insertion_point(message_clear_start:location.nearby.mediums.SocketControlFrame) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + if (cached_has_bits & 0x00000001u) { + GOOGLE_DCHECK(introduction_ != nullptr); + introduction_->Clear(); + } + if (cached_has_bits & 0x00000002u) { + GOOGLE_DCHECK(disconnection_ != nullptr); + disconnection_->Clear(); + } + if (cached_has_bits & 0x00000004u) { + GOOGLE_DCHECK(packet_acknowledgement_ != nullptr); + packet_acknowledgement_->Clear(); + } + } + type_ = 0; + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* SocketControlFrame::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional .location.nearby.mediums.SocketControlFrame.ControlFrameType type = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::location::nearby::mediums::SocketControlFrame_ControlFrameType_IsValid(val))) { + _internal_set_type(static_cast<::location::nearby::mediums::SocketControlFrame_ControlFrameType>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // optional .location.nearby.mediums.IntroductionFrame introduction = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + ptr = ctx->ParseMessage(_internal_mutable_introduction(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .location.nearby.mediums.DisconnectionFrame disconnection = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { + ptr = ctx->ParseMessage(_internal_mutable_disconnection(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .location.nearby.mediums.PacketAcknowledgementFrame packet_acknowledgement = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { + ptr = ctx->ParseMessage(_internal_mutable_packet_acknowledgement(), 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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* SocketControlFrame::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:location.nearby.mediums.SocketControlFrame) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional .location.nearby.mediums.SocketControlFrame.ControlFrameType type = 1; + if (cached_has_bits & 0x00000008u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 1, this->_internal_type(), target); + } + + // optional .location.nearby.mediums.IntroductionFrame introduction = 2; + if (cached_has_bits & 0x00000001u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 2, _Internal::introduction(this), target, stream); + } + + // optional .location.nearby.mediums.DisconnectionFrame disconnection = 3; + if (cached_has_bits & 0x00000002u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 3, _Internal::disconnection(this), target, stream); + } + + // optional .location.nearby.mediums.PacketAcknowledgementFrame packet_acknowledgement = 4; + if (cached_has_bits & 0x00000004u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 4, _Internal::packet_acknowledgement(this), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:location.nearby.mediums.SocketControlFrame) + return target; +} + +size_t SocketControlFrame::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:location.nearby.mediums.SocketControlFrame) + 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 = _has_bits_[0]; + if (cached_has_bits & 0x0000000fu) { + // optional .location.nearby.mediums.IntroductionFrame introduction = 2; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *introduction_); + } + + // optional .location.nearby.mediums.DisconnectionFrame disconnection = 3; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *disconnection_); + } + + // optional .location.nearby.mediums.PacketAcknowledgementFrame packet_acknowledgement = 4; + if (cached_has_bits & 0x00000004u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *packet_acknowledgement_); + } + + // optional .location.nearby.mediums.SocketControlFrame.ControlFrameType type = 1; + if (cached_has_bits & 0x00000008u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_type()); + } + + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void SocketControlFrame::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void SocketControlFrame::MergeFrom(const SocketControlFrame& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:location.nearby.mediums.SocketControlFrame) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x0000000fu) { + if (cached_has_bits & 0x00000001u) { + _internal_mutable_introduction()->::location::nearby::mediums::IntroductionFrame::MergeFrom(from._internal_introduction()); + } + if (cached_has_bits & 0x00000002u) { + _internal_mutable_disconnection()->::location::nearby::mediums::DisconnectionFrame::MergeFrom(from._internal_disconnection()); + } + if (cached_has_bits & 0x00000004u) { + _internal_mutable_packet_acknowledgement()->::location::nearby::mediums::PacketAcknowledgementFrame::MergeFrom(from._internal_packet_acknowledgement()); + } + if (cached_has_bits & 0x00000008u) { + type_ = from.type_; + } + _has_bits_[0] |= cached_has_bits; + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void SocketControlFrame::CopyFrom(const SocketControlFrame& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:location.nearby.mediums.SocketControlFrame) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool SocketControlFrame::IsInitialized() const { + return true; +} + +void SocketControlFrame::InternalSwap(SocketControlFrame* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(SocketControlFrame, type_) + + sizeof(SocketControlFrame::type_) + - PROTOBUF_FIELD_OFFSET(SocketControlFrame, introduction_)>( + reinterpret_cast(&introduction_), + reinterpret_cast(&other->introduction_)); +} + +std::string SocketControlFrame::GetTypeName() const { + return "location.nearby.mediums.SocketControlFrame"; +} + + +// =================================================================== + +class IntroductionFrame::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_service_id_hash(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_socket_version(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } +}; + +IntroductionFrame::IntroductionFrame(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:location.nearby.mediums.IntroductionFrame) +} +IntroductionFrame::IntroductionFrame(const IntroductionFrame& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + service_id_hash_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + service_id_hash_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_service_id_hash()) { + service_id_hash_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_service_id_hash(), + GetArenaForAllocation()); + } + socket_version_ = from.socket_version_; + // @@protoc_insertion_point(copy_constructor:location.nearby.mediums.IntroductionFrame) +} + +inline void IntroductionFrame::SharedCtor() { +service_id_hash_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + service_id_hash_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +socket_version_ = 0; +} + +IntroductionFrame::~IntroductionFrame() { + // @@protoc_insertion_point(destructor:location.nearby.mediums.IntroductionFrame) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void IntroductionFrame::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + service_id_hash_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void IntroductionFrame::ArenaDtor(void* object) { + IntroductionFrame* _this = reinterpret_cast< IntroductionFrame* >(object); + (void)_this; +} +void IntroductionFrame::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void IntroductionFrame::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void IntroductionFrame::Clear() { +// @@protoc_insertion_point(message_clear_start:location.nearby.mediums.IntroductionFrame) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + service_id_hash_.ClearNonDefaultToEmpty(); + } + socket_version_ = 0; + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* IntroductionFrame::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional bytes service_id_hash = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_service_id_hash(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .location.nearby.mediums.SocketVersion socket_version = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::location::nearby::mediums::SocketVersion_IsValid(val))) { + _internal_set_socket_version(static_cast<::location::nearby::mediums::SocketVersion>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(2, 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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* IntroductionFrame::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:location.nearby.mediums.IntroductionFrame) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional bytes service_id_hash = 1; + if (cached_has_bits & 0x00000001u) { + target = stream->WriteBytesMaybeAliased( + 1, this->_internal_service_id_hash(), target); + } + + // optional .location.nearby.mediums.SocketVersion socket_version = 2; + if (cached_has_bits & 0x00000002u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 2, this->_internal_socket_version(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:location.nearby.mediums.IntroductionFrame) + return target; +} + +size_t IntroductionFrame::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:location.nearby.mediums.IntroductionFrame) + 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 = _has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + // optional bytes service_id_hash = 1; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_service_id_hash()); + } + + // optional .location.nearby.mediums.SocketVersion socket_version = 2; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_socket_version()); + } + + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void IntroductionFrame::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void IntroductionFrame::MergeFrom(const IntroductionFrame& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:location.nearby.mediums.IntroductionFrame) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + _internal_set_service_id_hash(from._internal_service_id_hash()); + } + if (cached_has_bits & 0x00000002u) { + socket_version_ = from.socket_version_; + } + _has_bits_[0] |= cached_has_bits; + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void IntroductionFrame::CopyFrom(const IntroductionFrame& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:location.nearby.mediums.IntroductionFrame) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool IntroductionFrame::IsInitialized() const { + return true; +} + +void IntroductionFrame::InternalSwap(IntroductionFrame* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &service_id_hash_, lhs_arena, + &other->service_id_hash_, rhs_arena + ); + swap(socket_version_, other->socket_version_); +} + +std::string IntroductionFrame::GetTypeName() const { + return "location.nearby.mediums.IntroductionFrame"; +} + + +// =================================================================== + +class DisconnectionFrame::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_service_id_hash(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } +}; + +DisconnectionFrame::DisconnectionFrame(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:location.nearby.mediums.DisconnectionFrame) +} +DisconnectionFrame::DisconnectionFrame(const DisconnectionFrame& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + service_id_hash_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + service_id_hash_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_service_id_hash()) { + service_id_hash_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_service_id_hash(), + GetArenaForAllocation()); + } + // @@protoc_insertion_point(copy_constructor:location.nearby.mediums.DisconnectionFrame) +} + +inline void DisconnectionFrame::SharedCtor() { +service_id_hash_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + service_id_hash_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +DisconnectionFrame::~DisconnectionFrame() { + // @@protoc_insertion_point(destructor:location.nearby.mediums.DisconnectionFrame) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void DisconnectionFrame::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + service_id_hash_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void DisconnectionFrame::ArenaDtor(void* object) { + DisconnectionFrame* _this = reinterpret_cast< DisconnectionFrame* >(object); + (void)_this; +} +void DisconnectionFrame::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void DisconnectionFrame::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void DisconnectionFrame::Clear() { +// @@protoc_insertion_point(message_clear_start:location.nearby.mediums.DisconnectionFrame) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + service_id_hash_.ClearNonDefaultToEmpty(); + } + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* DisconnectionFrame::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional bytes service_id_hash = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_service_id_hash(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* DisconnectionFrame::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:location.nearby.mediums.DisconnectionFrame) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional bytes service_id_hash = 1; + if (cached_has_bits & 0x00000001u) { + target = stream->WriteBytesMaybeAliased( + 1, this->_internal_service_id_hash(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:location.nearby.mediums.DisconnectionFrame) + return target; +} + +size_t DisconnectionFrame::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:location.nearby.mediums.DisconnectionFrame) + 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 service_id_hash = 1; + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_service_id_hash()); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void DisconnectionFrame::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void DisconnectionFrame::MergeFrom(const DisconnectionFrame& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:location.nearby.mediums.DisconnectionFrame) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_has_service_id_hash()) { + _internal_set_service_id_hash(from._internal_service_id_hash()); + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void DisconnectionFrame::CopyFrom(const DisconnectionFrame& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:location.nearby.mediums.DisconnectionFrame) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool DisconnectionFrame::IsInitialized() const { + return true; +} + +void DisconnectionFrame::InternalSwap(DisconnectionFrame* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &service_id_hash_, lhs_arena, + &other->service_id_hash_, rhs_arena + ); +} + +std::string DisconnectionFrame::GetTypeName() const { + return "location.nearby.mediums.DisconnectionFrame"; +} + + +// =================================================================== + +class PacketAcknowledgementFrame::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_service_id_hash(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_received_size(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } +}; + +PacketAcknowledgementFrame::PacketAcknowledgementFrame(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:location.nearby.mediums.PacketAcknowledgementFrame) +} +PacketAcknowledgementFrame::PacketAcknowledgementFrame(const PacketAcknowledgementFrame& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + service_id_hash_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + service_id_hash_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_service_id_hash()) { + service_id_hash_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_service_id_hash(), + GetArenaForAllocation()); + } + received_size_ = from.received_size_; + // @@protoc_insertion_point(copy_constructor:location.nearby.mediums.PacketAcknowledgementFrame) +} + +inline void PacketAcknowledgementFrame::SharedCtor() { +service_id_hash_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + service_id_hash_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +received_size_ = 0; +} + +PacketAcknowledgementFrame::~PacketAcknowledgementFrame() { + // @@protoc_insertion_point(destructor:location.nearby.mediums.PacketAcknowledgementFrame) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void PacketAcknowledgementFrame::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + service_id_hash_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void PacketAcknowledgementFrame::ArenaDtor(void* object) { + PacketAcknowledgementFrame* _this = reinterpret_cast< PacketAcknowledgementFrame* >(object); + (void)_this; +} +void PacketAcknowledgementFrame::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void PacketAcknowledgementFrame::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void PacketAcknowledgementFrame::Clear() { +// @@protoc_insertion_point(message_clear_start:location.nearby.mediums.PacketAcknowledgementFrame) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + service_id_hash_.ClearNonDefaultToEmpty(); + } + received_size_ = 0; + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* PacketAcknowledgementFrame::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional bytes service_id_hash = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_service_id_hash(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional int32 received_size = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { + _Internal::set_has_received_size(&has_bits); + received_size_ = ::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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* PacketAcknowledgementFrame::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:location.nearby.mediums.PacketAcknowledgementFrame) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional bytes service_id_hash = 1; + if (cached_has_bits & 0x00000001u) { + target = stream->WriteBytesMaybeAliased( + 1, this->_internal_service_id_hash(), target); + } + + // optional int32 received_size = 2; + if (cached_has_bits & 0x00000002u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_received_size(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:location.nearby.mediums.PacketAcknowledgementFrame) + return target; +} + +size_t PacketAcknowledgementFrame::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:location.nearby.mediums.PacketAcknowledgementFrame) + 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 = _has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + // optional bytes service_id_hash = 1; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_service_id_hash()); + } + + // optional int32 received_size = 2; + if (cached_has_bits & 0x00000002u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_received_size()); + } + + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void PacketAcknowledgementFrame::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void PacketAcknowledgementFrame::MergeFrom(const PacketAcknowledgementFrame& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:location.nearby.mediums.PacketAcknowledgementFrame) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + _internal_set_service_id_hash(from._internal_service_id_hash()); + } + if (cached_has_bits & 0x00000002u) { + received_size_ = from.received_size_; + } + _has_bits_[0] |= cached_has_bits; + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void PacketAcknowledgementFrame::CopyFrom(const PacketAcknowledgementFrame& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:location.nearby.mediums.PacketAcknowledgementFrame) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool PacketAcknowledgementFrame::IsInitialized() const { + return true; +} + +void PacketAcknowledgementFrame::InternalSwap(PacketAcknowledgementFrame* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &service_id_hash_, lhs_arena, + &other->service_id_hash_, rhs_arena + ); + swap(received_size_, other->received_size_); +} + +std::string PacketAcknowledgementFrame::GetTypeName() const { + return "location.nearby.mediums.PacketAcknowledgementFrame"; +} + + +// @@protoc_insertion_point(namespace_scope) +} // namespace mediums +} // namespace nearby +} // namespace location +PROTOBUF_NAMESPACE_OPEN +template<> PROTOBUF_NOINLINE ::location::nearby::mediums::SocketControlFrame* Arena::CreateMaybeMessage< ::location::nearby::mediums::SocketControlFrame >(Arena* arena) { + return Arena::CreateMessageInternal< ::location::nearby::mediums::SocketControlFrame >(arena); +} +template<> PROTOBUF_NOINLINE ::location::nearby::mediums::IntroductionFrame* Arena::CreateMaybeMessage< ::location::nearby::mediums::IntroductionFrame >(Arena* arena) { + return Arena::CreateMessageInternal< ::location::nearby::mediums::IntroductionFrame >(arena); +} +template<> PROTOBUF_NOINLINE ::location::nearby::mediums::DisconnectionFrame* Arena::CreateMaybeMessage< ::location::nearby::mediums::DisconnectionFrame >(Arena* arena) { + return Arena::CreateMessageInternal< ::location::nearby::mediums::DisconnectionFrame >(arena); +} +template<> PROTOBUF_NOINLINE ::location::nearby::mediums::PacketAcknowledgementFrame* Arena::CreateMaybeMessage< ::location::nearby::mediums::PacketAcknowledgementFrame >(Arena* arena) { + return Arena::CreateMessageInternal< ::location::nearby::mediums::PacketAcknowledgementFrame >(arena); +} +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) +#include diff --git a/proto/mediums/ble_frames.pb.h b/proto/mediums/ble_frames.pb.h new file mode 100644 index 00000000..20e3f842 --- /dev/null +++ b/proto/mediums/ble_frames.pb.h @@ -0,0 +1,1438 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: proto/mediums/ble_frames.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_proto_2fmediums_2fble_5fframes_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_proto_2fmediums_2fble_5fframes_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3019000 +#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 3019004 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_proto_2fmediums_2fble_5fframes_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_proto_2fmediums_2fble_5fframes_2eproto { + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::AuxiliaryParseTableField aux[] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[4] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[]; + static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[]; + static const uint32_t offsets[]; +}; +namespace location { +namespace nearby { +namespace mediums { +class DisconnectionFrame; +struct DisconnectionFrameDefaultTypeInternal; +extern DisconnectionFrameDefaultTypeInternal _DisconnectionFrame_default_instance_; +class IntroductionFrame; +struct IntroductionFrameDefaultTypeInternal; +extern IntroductionFrameDefaultTypeInternal _IntroductionFrame_default_instance_; +class PacketAcknowledgementFrame; +struct PacketAcknowledgementFrameDefaultTypeInternal; +extern PacketAcknowledgementFrameDefaultTypeInternal _PacketAcknowledgementFrame_default_instance_; +class SocketControlFrame; +struct SocketControlFrameDefaultTypeInternal; +extern SocketControlFrameDefaultTypeInternal _SocketControlFrame_default_instance_; +} // namespace mediums +} // namespace nearby +} // namespace location +PROTOBUF_NAMESPACE_OPEN +template<> ::location::nearby::mediums::DisconnectionFrame* Arena::CreateMaybeMessage<::location::nearby::mediums::DisconnectionFrame>(Arena*); +template<> ::location::nearby::mediums::IntroductionFrame* Arena::CreateMaybeMessage<::location::nearby::mediums::IntroductionFrame>(Arena*); +template<> ::location::nearby::mediums::PacketAcknowledgementFrame* Arena::CreateMaybeMessage<::location::nearby::mediums::PacketAcknowledgementFrame>(Arena*); +template<> ::location::nearby::mediums::SocketControlFrame* Arena::CreateMaybeMessage<::location::nearby::mediums::SocketControlFrame>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace location { +namespace nearby { +namespace mediums { + +enum SocketControlFrame_ControlFrameType : int { + SocketControlFrame_ControlFrameType_UNKNOWN_CONTROL_FRAME_TYPE = 0, + SocketControlFrame_ControlFrameType_INTRODUCTION = 1, + SocketControlFrame_ControlFrameType_DISCONNECTION = 2, + SocketControlFrame_ControlFrameType_PACKET_ACKNOWLEDGEMENT = 3 +}; +bool SocketControlFrame_ControlFrameType_IsValid(int value); +constexpr SocketControlFrame_ControlFrameType SocketControlFrame_ControlFrameType_ControlFrameType_MIN = SocketControlFrame_ControlFrameType_UNKNOWN_CONTROL_FRAME_TYPE; +constexpr SocketControlFrame_ControlFrameType SocketControlFrame_ControlFrameType_ControlFrameType_MAX = SocketControlFrame_ControlFrameType_PACKET_ACKNOWLEDGEMENT; +constexpr int SocketControlFrame_ControlFrameType_ControlFrameType_ARRAYSIZE = SocketControlFrame_ControlFrameType_ControlFrameType_MAX + 1; + +const std::string& SocketControlFrame_ControlFrameType_Name(SocketControlFrame_ControlFrameType value); +template +inline const std::string& SocketControlFrame_ControlFrameType_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function SocketControlFrame_ControlFrameType_Name."); + return SocketControlFrame_ControlFrameType_Name(static_cast(enum_t_value)); +} +bool SocketControlFrame_ControlFrameType_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, SocketControlFrame_ControlFrameType* value); +enum SocketVersion : int { + UNKNOWN_SOCKET_VERSION = 0, + V1 = 1, + V2 = 2 +}; +bool SocketVersion_IsValid(int value); +constexpr SocketVersion SocketVersion_MIN = UNKNOWN_SOCKET_VERSION; +constexpr SocketVersion SocketVersion_MAX = V2; +constexpr int SocketVersion_ARRAYSIZE = SocketVersion_MAX + 1; + +const std::string& SocketVersion_Name(SocketVersion value); +template +inline const std::string& SocketVersion_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function SocketVersion_Name."); + return SocketVersion_Name(static_cast(enum_t_value)); +} +bool SocketVersion_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, SocketVersion* value); +// =================================================================== + +class SocketControlFrame final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:location.nearby.mediums.SocketControlFrame) */ { + public: + inline SocketControlFrame() : SocketControlFrame(nullptr) {} + ~SocketControlFrame() override; + explicit constexpr SocketControlFrame(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + SocketControlFrame(const SocketControlFrame& from); + SocketControlFrame(SocketControlFrame&& from) noexcept + : SocketControlFrame() { + *this = ::std::move(from); + } + + inline SocketControlFrame& operator=(const SocketControlFrame& from) { + CopyFrom(from); + return *this; + } + inline SocketControlFrame& operator=(SocketControlFrame&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const SocketControlFrame& default_instance() { + return *internal_default_instance(); + } + static inline const SocketControlFrame* internal_default_instance() { + return reinterpret_cast( + &_SocketControlFrame_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(SocketControlFrame& a, SocketControlFrame& b) { + a.Swap(&b); + } + inline void Swap(SocketControlFrame* 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(SocketControlFrame* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + SocketControlFrame* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const SocketControlFrame& from); + void MergeFrom(const SocketControlFrame& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(SocketControlFrame* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "location.nearby.mediums.SocketControlFrame"; + } + protected: + explicit SocketControlFrame(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + typedef SocketControlFrame_ControlFrameType ControlFrameType; + static constexpr ControlFrameType UNKNOWN_CONTROL_FRAME_TYPE = + SocketControlFrame_ControlFrameType_UNKNOWN_CONTROL_FRAME_TYPE; + static constexpr ControlFrameType INTRODUCTION = + SocketControlFrame_ControlFrameType_INTRODUCTION; + static constexpr ControlFrameType DISCONNECTION = + SocketControlFrame_ControlFrameType_DISCONNECTION; + static constexpr ControlFrameType PACKET_ACKNOWLEDGEMENT = + SocketControlFrame_ControlFrameType_PACKET_ACKNOWLEDGEMENT; + static inline bool ControlFrameType_IsValid(int value) { + return SocketControlFrame_ControlFrameType_IsValid(value); + } + static constexpr ControlFrameType ControlFrameType_MIN = + SocketControlFrame_ControlFrameType_ControlFrameType_MIN; + static constexpr ControlFrameType ControlFrameType_MAX = + SocketControlFrame_ControlFrameType_ControlFrameType_MAX; + static constexpr int ControlFrameType_ARRAYSIZE = + SocketControlFrame_ControlFrameType_ControlFrameType_ARRAYSIZE; + template + static inline const std::string& ControlFrameType_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function ControlFrameType_Name."); + return SocketControlFrame_ControlFrameType_Name(enum_t_value); + } + static inline bool ControlFrameType_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name, + ControlFrameType* value) { + return SocketControlFrame_ControlFrameType_Parse(name, value); + } + + // accessors ------------------------------------------------------- + + enum : int { + kIntroductionFieldNumber = 2, + kDisconnectionFieldNumber = 3, + kPacketAcknowledgementFieldNumber = 4, + kTypeFieldNumber = 1, + }; + // optional .location.nearby.mediums.IntroductionFrame introduction = 2; + bool has_introduction() const; + private: + bool _internal_has_introduction() const; + public: + void clear_introduction(); + const ::location::nearby::mediums::IntroductionFrame& introduction() const; + PROTOBUF_NODISCARD ::location::nearby::mediums::IntroductionFrame* release_introduction(); + ::location::nearby::mediums::IntroductionFrame* mutable_introduction(); + void set_allocated_introduction(::location::nearby::mediums::IntroductionFrame* introduction); + private: + const ::location::nearby::mediums::IntroductionFrame& _internal_introduction() const; + ::location::nearby::mediums::IntroductionFrame* _internal_mutable_introduction(); + public: + void unsafe_arena_set_allocated_introduction( + ::location::nearby::mediums::IntroductionFrame* introduction); + ::location::nearby::mediums::IntroductionFrame* unsafe_arena_release_introduction(); + + // optional .location.nearby.mediums.DisconnectionFrame disconnection = 3; + bool has_disconnection() const; + private: + bool _internal_has_disconnection() const; + public: + void clear_disconnection(); + const ::location::nearby::mediums::DisconnectionFrame& disconnection() const; + PROTOBUF_NODISCARD ::location::nearby::mediums::DisconnectionFrame* release_disconnection(); + ::location::nearby::mediums::DisconnectionFrame* mutable_disconnection(); + void set_allocated_disconnection(::location::nearby::mediums::DisconnectionFrame* disconnection); + private: + const ::location::nearby::mediums::DisconnectionFrame& _internal_disconnection() const; + ::location::nearby::mediums::DisconnectionFrame* _internal_mutable_disconnection(); + public: + void unsafe_arena_set_allocated_disconnection( + ::location::nearby::mediums::DisconnectionFrame* disconnection); + ::location::nearby::mediums::DisconnectionFrame* unsafe_arena_release_disconnection(); + + // optional .location.nearby.mediums.PacketAcknowledgementFrame packet_acknowledgement = 4; + bool has_packet_acknowledgement() const; + private: + bool _internal_has_packet_acknowledgement() const; + public: + void clear_packet_acknowledgement(); + const ::location::nearby::mediums::PacketAcknowledgementFrame& packet_acknowledgement() const; + PROTOBUF_NODISCARD ::location::nearby::mediums::PacketAcknowledgementFrame* release_packet_acknowledgement(); + ::location::nearby::mediums::PacketAcknowledgementFrame* mutable_packet_acknowledgement(); + void set_allocated_packet_acknowledgement(::location::nearby::mediums::PacketAcknowledgementFrame* packet_acknowledgement); + private: + const ::location::nearby::mediums::PacketAcknowledgementFrame& _internal_packet_acknowledgement() const; + ::location::nearby::mediums::PacketAcknowledgementFrame* _internal_mutable_packet_acknowledgement(); + public: + void unsafe_arena_set_allocated_packet_acknowledgement( + ::location::nearby::mediums::PacketAcknowledgementFrame* packet_acknowledgement); + ::location::nearby::mediums::PacketAcknowledgementFrame* unsafe_arena_release_packet_acknowledgement(); + + // optional .location.nearby.mediums.SocketControlFrame.ControlFrameType type = 1; + bool has_type() const; + private: + bool _internal_has_type() const; + public: + void clear_type(); + ::location::nearby::mediums::SocketControlFrame_ControlFrameType type() const; + void set_type(::location::nearby::mediums::SocketControlFrame_ControlFrameType value); + private: + ::location::nearby::mediums::SocketControlFrame_ControlFrameType _internal_type() const; + void _internal_set_type(::location::nearby::mediums::SocketControlFrame_ControlFrameType value); + public: + + // @@protoc_insertion_point(class_scope:location.nearby.mediums.SocketControlFrame) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::location::nearby::mediums::IntroductionFrame* introduction_; + ::location::nearby::mediums::DisconnectionFrame* disconnection_; + ::location::nearby::mediums::PacketAcknowledgementFrame* packet_acknowledgement_; + int type_; + friend struct ::TableStruct_proto_2fmediums_2fble_5fframes_2eproto; +}; +// ------------------------------------------------------------------- + +class IntroductionFrame final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:location.nearby.mediums.IntroductionFrame) */ { + public: + inline IntroductionFrame() : IntroductionFrame(nullptr) {} + ~IntroductionFrame() override; + explicit constexpr IntroductionFrame(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + IntroductionFrame(const IntroductionFrame& from); + IntroductionFrame(IntroductionFrame&& from) noexcept + : IntroductionFrame() { + *this = ::std::move(from); + } + + inline IntroductionFrame& operator=(const IntroductionFrame& from) { + CopyFrom(from); + return *this; + } + inline IntroductionFrame& operator=(IntroductionFrame&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const IntroductionFrame& default_instance() { + return *internal_default_instance(); + } + static inline const IntroductionFrame* internal_default_instance() { + return reinterpret_cast( + &_IntroductionFrame_default_instance_); + } + static constexpr int kIndexInFileMessages = + 1; + + friend void swap(IntroductionFrame& a, IntroductionFrame& b) { + a.Swap(&b); + } + inline void Swap(IntroductionFrame* 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(IntroductionFrame* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + IntroductionFrame* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const IntroductionFrame& from); + void MergeFrom(const IntroductionFrame& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(IntroductionFrame* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "location.nearby.mediums.IntroductionFrame"; + } + protected: + explicit IntroductionFrame(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kServiceIdHashFieldNumber = 1, + kSocketVersionFieldNumber = 2, + }; + // optional bytes service_id_hash = 1; + bool has_service_id_hash() const; + private: + bool _internal_has_service_id_hash() const; + public: + void clear_service_id_hash(); + const std::string& service_id_hash() const; + template + void set_service_id_hash(ArgT0&& arg0, ArgT... args); + std::string* mutable_service_id_hash(); + PROTOBUF_NODISCARD std::string* release_service_id_hash(); + void set_allocated_service_id_hash(std::string* service_id_hash); + private: + const std::string& _internal_service_id_hash() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_service_id_hash(const std::string& value); + std::string* _internal_mutable_service_id_hash(); + public: + + // optional .location.nearby.mediums.SocketVersion socket_version = 2; + bool has_socket_version() const; + private: + bool _internal_has_socket_version() const; + public: + void clear_socket_version(); + ::location::nearby::mediums::SocketVersion socket_version() const; + void set_socket_version(::location::nearby::mediums::SocketVersion value); + private: + ::location::nearby::mediums::SocketVersion _internal_socket_version() const; + void _internal_set_socket_version(::location::nearby::mediums::SocketVersion value); + public: + + // @@protoc_insertion_point(class_scope:location.nearby.mediums.IntroductionFrame) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr service_id_hash_; + int socket_version_; + friend struct ::TableStruct_proto_2fmediums_2fble_5fframes_2eproto; +}; +// ------------------------------------------------------------------- + +class DisconnectionFrame final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:location.nearby.mediums.DisconnectionFrame) */ { + public: + inline DisconnectionFrame() : DisconnectionFrame(nullptr) {} + ~DisconnectionFrame() override; + explicit constexpr DisconnectionFrame(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + DisconnectionFrame(const DisconnectionFrame& from); + DisconnectionFrame(DisconnectionFrame&& from) noexcept + : DisconnectionFrame() { + *this = ::std::move(from); + } + + inline DisconnectionFrame& operator=(const DisconnectionFrame& from) { + CopyFrom(from); + return *this; + } + inline DisconnectionFrame& operator=(DisconnectionFrame&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const DisconnectionFrame& default_instance() { + return *internal_default_instance(); + } + static inline const DisconnectionFrame* internal_default_instance() { + return reinterpret_cast( + &_DisconnectionFrame_default_instance_); + } + static constexpr int kIndexInFileMessages = + 2; + + friend void swap(DisconnectionFrame& a, DisconnectionFrame& b) { + a.Swap(&b); + } + inline void Swap(DisconnectionFrame* 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(DisconnectionFrame* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + DisconnectionFrame* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const DisconnectionFrame& from); + void MergeFrom(const DisconnectionFrame& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(DisconnectionFrame* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "location.nearby.mediums.DisconnectionFrame"; + } + protected: + explicit DisconnectionFrame(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kServiceIdHashFieldNumber = 1, + }; + // optional bytes service_id_hash = 1; + bool has_service_id_hash() const; + private: + bool _internal_has_service_id_hash() const; + public: + void clear_service_id_hash(); + const std::string& service_id_hash() const; + template + void set_service_id_hash(ArgT0&& arg0, ArgT... args); + std::string* mutable_service_id_hash(); + PROTOBUF_NODISCARD std::string* release_service_id_hash(); + void set_allocated_service_id_hash(std::string* service_id_hash); + private: + const std::string& _internal_service_id_hash() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_service_id_hash(const std::string& value); + std::string* _internal_mutable_service_id_hash(); + public: + + // @@protoc_insertion_point(class_scope:location.nearby.mediums.DisconnectionFrame) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr service_id_hash_; + friend struct ::TableStruct_proto_2fmediums_2fble_5fframes_2eproto; +}; +// ------------------------------------------------------------------- + +class PacketAcknowledgementFrame final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:location.nearby.mediums.PacketAcknowledgementFrame) */ { + public: + inline PacketAcknowledgementFrame() : PacketAcknowledgementFrame(nullptr) {} + ~PacketAcknowledgementFrame() override; + explicit constexpr PacketAcknowledgementFrame(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + PacketAcknowledgementFrame(const PacketAcknowledgementFrame& from); + PacketAcknowledgementFrame(PacketAcknowledgementFrame&& from) noexcept + : PacketAcknowledgementFrame() { + *this = ::std::move(from); + } + + inline PacketAcknowledgementFrame& operator=(const PacketAcknowledgementFrame& from) { + CopyFrom(from); + return *this; + } + inline PacketAcknowledgementFrame& operator=(PacketAcknowledgementFrame&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const PacketAcknowledgementFrame& default_instance() { + return *internal_default_instance(); + } + static inline const PacketAcknowledgementFrame* internal_default_instance() { + return reinterpret_cast( + &_PacketAcknowledgementFrame_default_instance_); + } + static constexpr int kIndexInFileMessages = + 3; + + friend void swap(PacketAcknowledgementFrame& a, PacketAcknowledgementFrame& b) { + a.Swap(&b); + } + inline void Swap(PacketAcknowledgementFrame* 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(PacketAcknowledgementFrame* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + PacketAcknowledgementFrame* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const PacketAcknowledgementFrame& from); + void MergeFrom(const PacketAcknowledgementFrame& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(PacketAcknowledgementFrame* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "location.nearby.mediums.PacketAcknowledgementFrame"; + } + protected: + explicit PacketAcknowledgementFrame(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kServiceIdHashFieldNumber = 1, + kReceivedSizeFieldNumber = 2, + }; + // optional bytes service_id_hash = 1; + bool has_service_id_hash() const; + private: + bool _internal_has_service_id_hash() const; + public: + void clear_service_id_hash(); + const std::string& service_id_hash() const; + template + void set_service_id_hash(ArgT0&& arg0, ArgT... args); + std::string* mutable_service_id_hash(); + PROTOBUF_NODISCARD std::string* release_service_id_hash(); + void set_allocated_service_id_hash(std::string* service_id_hash); + private: + const std::string& _internal_service_id_hash() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_service_id_hash(const std::string& value); + std::string* _internal_mutable_service_id_hash(); + public: + + // optional int32 received_size = 2; + bool has_received_size() const; + private: + bool _internal_has_received_size() const; + public: + void clear_received_size(); + int32_t received_size() const; + void set_received_size(int32_t value); + private: + int32_t _internal_received_size() const; + void _internal_set_received_size(int32_t value); + public: + + // @@protoc_insertion_point(class_scope:location.nearby.mediums.PacketAcknowledgementFrame) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr service_id_hash_; + int32_t received_size_; + friend struct ::TableStruct_proto_2fmediums_2fble_5fframes_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// SocketControlFrame + +// optional .location.nearby.mediums.SocketControlFrame.ControlFrameType type = 1; +inline bool SocketControlFrame::_internal_has_type() const { + bool value = (_has_bits_[0] & 0x00000008u) != 0; + return value; +} +inline bool SocketControlFrame::has_type() const { + return _internal_has_type(); +} +inline void SocketControlFrame::clear_type() { + type_ = 0; + _has_bits_[0] &= ~0x00000008u; +} +inline ::location::nearby::mediums::SocketControlFrame_ControlFrameType SocketControlFrame::_internal_type() const { + return static_cast< ::location::nearby::mediums::SocketControlFrame_ControlFrameType >(type_); +} +inline ::location::nearby::mediums::SocketControlFrame_ControlFrameType SocketControlFrame::type() const { + // @@protoc_insertion_point(field_get:location.nearby.mediums.SocketControlFrame.type) + return _internal_type(); +} +inline void SocketControlFrame::_internal_set_type(::location::nearby::mediums::SocketControlFrame_ControlFrameType value) { + assert(::location::nearby::mediums::SocketControlFrame_ControlFrameType_IsValid(value)); + _has_bits_[0] |= 0x00000008u; + type_ = value; +} +inline void SocketControlFrame::set_type(::location::nearby::mediums::SocketControlFrame_ControlFrameType value) { + _internal_set_type(value); + // @@protoc_insertion_point(field_set:location.nearby.mediums.SocketControlFrame.type) +} + +// optional .location.nearby.mediums.IntroductionFrame introduction = 2; +inline bool SocketControlFrame::_internal_has_introduction() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + PROTOBUF_ASSUME(!value || introduction_ != nullptr); + return value; +} +inline bool SocketControlFrame::has_introduction() const { + return _internal_has_introduction(); +} +inline void SocketControlFrame::clear_introduction() { + if (introduction_ != nullptr) introduction_->Clear(); + _has_bits_[0] &= ~0x00000001u; +} +inline const ::location::nearby::mediums::IntroductionFrame& SocketControlFrame::_internal_introduction() const { + const ::location::nearby::mediums::IntroductionFrame* p = introduction_; + return p != nullptr ? *p : reinterpret_cast( + ::location::nearby::mediums::_IntroductionFrame_default_instance_); +} +inline const ::location::nearby::mediums::IntroductionFrame& SocketControlFrame::introduction() const { + // @@protoc_insertion_point(field_get:location.nearby.mediums.SocketControlFrame.introduction) + return _internal_introduction(); +} +inline void SocketControlFrame::unsafe_arena_set_allocated_introduction( + ::location::nearby::mediums::IntroductionFrame* introduction) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(introduction_); + } + introduction_ = introduction; + if (introduction) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:location.nearby.mediums.SocketControlFrame.introduction) +} +inline ::location::nearby::mediums::IntroductionFrame* SocketControlFrame::release_introduction() { + _has_bits_[0] &= ~0x00000001u; + ::location::nearby::mediums::IntroductionFrame* temp = introduction_; + introduction_ = 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 ::location::nearby::mediums::IntroductionFrame* SocketControlFrame::unsafe_arena_release_introduction() { + // @@protoc_insertion_point(field_release:location.nearby.mediums.SocketControlFrame.introduction) + _has_bits_[0] &= ~0x00000001u; + ::location::nearby::mediums::IntroductionFrame* temp = introduction_; + introduction_ = nullptr; + return temp; +} +inline ::location::nearby::mediums::IntroductionFrame* SocketControlFrame::_internal_mutable_introduction() { + _has_bits_[0] |= 0x00000001u; + if (introduction_ == nullptr) { + auto* p = CreateMaybeMessage<::location::nearby::mediums::IntroductionFrame>(GetArenaForAllocation()); + introduction_ = p; + } + return introduction_; +} +inline ::location::nearby::mediums::IntroductionFrame* SocketControlFrame::mutable_introduction() { + ::location::nearby::mediums::IntroductionFrame* _msg = _internal_mutable_introduction(); + // @@protoc_insertion_point(field_mutable:location.nearby.mediums.SocketControlFrame.introduction) + return _msg; +} +inline void SocketControlFrame::set_allocated_introduction(::location::nearby::mediums::IntroductionFrame* introduction) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete introduction_; + } + if (introduction) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::location::nearby::mediums::IntroductionFrame>::GetOwningArena(introduction); + if (message_arena != submessage_arena) { + introduction = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, introduction, submessage_arena); + } + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + introduction_ = introduction; + // @@protoc_insertion_point(field_set_allocated:location.nearby.mediums.SocketControlFrame.introduction) +} + +// optional .location.nearby.mediums.DisconnectionFrame disconnection = 3; +inline bool SocketControlFrame::_internal_has_disconnection() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + PROTOBUF_ASSUME(!value || disconnection_ != nullptr); + return value; +} +inline bool SocketControlFrame::has_disconnection() const { + return _internal_has_disconnection(); +} +inline void SocketControlFrame::clear_disconnection() { + if (disconnection_ != nullptr) disconnection_->Clear(); + _has_bits_[0] &= ~0x00000002u; +} +inline const ::location::nearby::mediums::DisconnectionFrame& SocketControlFrame::_internal_disconnection() const { + const ::location::nearby::mediums::DisconnectionFrame* p = disconnection_; + return p != nullptr ? *p : reinterpret_cast( + ::location::nearby::mediums::_DisconnectionFrame_default_instance_); +} +inline const ::location::nearby::mediums::DisconnectionFrame& SocketControlFrame::disconnection() const { + // @@protoc_insertion_point(field_get:location.nearby.mediums.SocketControlFrame.disconnection) + return _internal_disconnection(); +} +inline void SocketControlFrame::unsafe_arena_set_allocated_disconnection( + ::location::nearby::mediums::DisconnectionFrame* disconnection) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(disconnection_); + } + disconnection_ = disconnection; + if (disconnection) { + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:location.nearby.mediums.SocketControlFrame.disconnection) +} +inline ::location::nearby::mediums::DisconnectionFrame* SocketControlFrame::release_disconnection() { + _has_bits_[0] &= ~0x00000002u; + ::location::nearby::mediums::DisconnectionFrame* temp = disconnection_; + disconnection_ = 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 ::location::nearby::mediums::DisconnectionFrame* SocketControlFrame::unsafe_arena_release_disconnection() { + // @@protoc_insertion_point(field_release:location.nearby.mediums.SocketControlFrame.disconnection) + _has_bits_[0] &= ~0x00000002u; + ::location::nearby::mediums::DisconnectionFrame* temp = disconnection_; + disconnection_ = nullptr; + return temp; +} +inline ::location::nearby::mediums::DisconnectionFrame* SocketControlFrame::_internal_mutable_disconnection() { + _has_bits_[0] |= 0x00000002u; + if (disconnection_ == nullptr) { + auto* p = CreateMaybeMessage<::location::nearby::mediums::DisconnectionFrame>(GetArenaForAllocation()); + disconnection_ = p; + } + return disconnection_; +} +inline ::location::nearby::mediums::DisconnectionFrame* SocketControlFrame::mutable_disconnection() { + ::location::nearby::mediums::DisconnectionFrame* _msg = _internal_mutable_disconnection(); + // @@protoc_insertion_point(field_mutable:location.nearby.mediums.SocketControlFrame.disconnection) + return _msg; +} +inline void SocketControlFrame::set_allocated_disconnection(::location::nearby::mediums::DisconnectionFrame* disconnection) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete disconnection_; + } + if (disconnection) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::location::nearby::mediums::DisconnectionFrame>::GetOwningArena(disconnection); + if (message_arena != submessage_arena) { + disconnection = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, disconnection, submessage_arena); + } + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + disconnection_ = disconnection; + // @@protoc_insertion_point(field_set_allocated:location.nearby.mediums.SocketControlFrame.disconnection) +} + +// optional .location.nearby.mediums.PacketAcknowledgementFrame packet_acknowledgement = 4; +inline bool SocketControlFrame::_internal_has_packet_acknowledgement() const { + bool value = (_has_bits_[0] & 0x00000004u) != 0; + PROTOBUF_ASSUME(!value || packet_acknowledgement_ != nullptr); + return value; +} +inline bool SocketControlFrame::has_packet_acknowledgement() const { + return _internal_has_packet_acknowledgement(); +} +inline void SocketControlFrame::clear_packet_acknowledgement() { + if (packet_acknowledgement_ != nullptr) packet_acknowledgement_->Clear(); + _has_bits_[0] &= ~0x00000004u; +} +inline const ::location::nearby::mediums::PacketAcknowledgementFrame& SocketControlFrame::_internal_packet_acknowledgement() const { + const ::location::nearby::mediums::PacketAcknowledgementFrame* p = packet_acknowledgement_; + return p != nullptr ? *p : reinterpret_cast( + ::location::nearby::mediums::_PacketAcknowledgementFrame_default_instance_); +} +inline const ::location::nearby::mediums::PacketAcknowledgementFrame& SocketControlFrame::packet_acknowledgement() const { + // @@protoc_insertion_point(field_get:location.nearby.mediums.SocketControlFrame.packet_acknowledgement) + return _internal_packet_acknowledgement(); +} +inline void SocketControlFrame::unsafe_arena_set_allocated_packet_acknowledgement( + ::location::nearby::mediums::PacketAcknowledgementFrame* packet_acknowledgement) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(packet_acknowledgement_); + } + packet_acknowledgement_ = packet_acknowledgement; + if (packet_acknowledgement) { + _has_bits_[0] |= 0x00000004u; + } else { + _has_bits_[0] &= ~0x00000004u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:location.nearby.mediums.SocketControlFrame.packet_acknowledgement) +} +inline ::location::nearby::mediums::PacketAcknowledgementFrame* SocketControlFrame::release_packet_acknowledgement() { + _has_bits_[0] &= ~0x00000004u; + ::location::nearby::mediums::PacketAcknowledgementFrame* temp = packet_acknowledgement_; + packet_acknowledgement_ = 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 ::location::nearby::mediums::PacketAcknowledgementFrame* SocketControlFrame::unsafe_arena_release_packet_acknowledgement() { + // @@protoc_insertion_point(field_release:location.nearby.mediums.SocketControlFrame.packet_acknowledgement) + _has_bits_[0] &= ~0x00000004u; + ::location::nearby::mediums::PacketAcknowledgementFrame* temp = packet_acknowledgement_; + packet_acknowledgement_ = nullptr; + return temp; +} +inline ::location::nearby::mediums::PacketAcknowledgementFrame* SocketControlFrame::_internal_mutable_packet_acknowledgement() { + _has_bits_[0] |= 0x00000004u; + if (packet_acknowledgement_ == nullptr) { + auto* p = CreateMaybeMessage<::location::nearby::mediums::PacketAcknowledgementFrame>(GetArenaForAllocation()); + packet_acknowledgement_ = p; + } + return packet_acknowledgement_; +} +inline ::location::nearby::mediums::PacketAcknowledgementFrame* SocketControlFrame::mutable_packet_acknowledgement() { + ::location::nearby::mediums::PacketAcknowledgementFrame* _msg = _internal_mutable_packet_acknowledgement(); + // @@protoc_insertion_point(field_mutable:location.nearby.mediums.SocketControlFrame.packet_acknowledgement) + return _msg; +} +inline void SocketControlFrame::set_allocated_packet_acknowledgement(::location::nearby::mediums::PacketAcknowledgementFrame* packet_acknowledgement) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete packet_acknowledgement_; + } + if (packet_acknowledgement) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::location::nearby::mediums::PacketAcknowledgementFrame>::GetOwningArena(packet_acknowledgement); + if (message_arena != submessage_arena) { + packet_acknowledgement = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, packet_acknowledgement, submessage_arena); + } + _has_bits_[0] |= 0x00000004u; + } else { + _has_bits_[0] &= ~0x00000004u; + } + packet_acknowledgement_ = packet_acknowledgement; + // @@protoc_insertion_point(field_set_allocated:location.nearby.mediums.SocketControlFrame.packet_acknowledgement) +} + +// ------------------------------------------------------------------- + +// IntroductionFrame + +// optional bytes service_id_hash = 1; +inline bool IntroductionFrame::_internal_has_service_id_hash() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool IntroductionFrame::has_service_id_hash() const { + return _internal_has_service_id_hash(); +} +inline void IntroductionFrame::clear_service_id_hash() { + service_id_hash_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& IntroductionFrame::service_id_hash() const { + // @@protoc_insertion_point(field_get:location.nearby.mediums.IntroductionFrame.service_id_hash) + return _internal_service_id_hash(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void IntroductionFrame::set_service_id_hash(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + service_id_hash_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:location.nearby.mediums.IntroductionFrame.service_id_hash) +} +inline std::string* IntroductionFrame::mutable_service_id_hash() { + std::string* _s = _internal_mutable_service_id_hash(); + // @@protoc_insertion_point(field_mutable:location.nearby.mediums.IntroductionFrame.service_id_hash) + return _s; +} +inline const std::string& IntroductionFrame::_internal_service_id_hash() const { + return service_id_hash_.Get(); +} +inline void IntroductionFrame::_internal_set_service_id_hash(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + service_id_hash_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* IntroductionFrame::_internal_mutable_service_id_hash() { + _has_bits_[0] |= 0x00000001u; + return service_id_hash_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* IntroductionFrame::release_service_id_hash() { + // @@protoc_insertion_point(field_release:location.nearby.mediums.IntroductionFrame.service_id_hash) + if (!_internal_has_service_id_hash()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = service_id_hash_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (service_id_hash_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + service_id_hash_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void IntroductionFrame::set_allocated_service_id_hash(std::string* service_id_hash) { + if (service_id_hash != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + service_id_hash_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), service_id_hash, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (service_id_hash_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + service_id_hash_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:location.nearby.mediums.IntroductionFrame.service_id_hash) +} + +// optional .location.nearby.mediums.SocketVersion socket_version = 2; +inline bool IntroductionFrame::_internal_has_socket_version() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool IntroductionFrame::has_socket_version() const { + return _internal_has_socket_version(); +} +inline void IntroductionFrame::clear_socket_version() { + socket_version_ = 0; + _has_bits_[0] &= ~0x00000002u; +} +inline ::location::nearby::mediums::SocketVersion IntroductionFrame::_internal_socket_version() const { + return static_cast< ::location::nearby::mediums::SocketVersion >(socket_version_); +} +inline ::location::nearby::mediums::SocketVersion IntroductionFrame::socket_version() const { + // @@protoc_insertion_point(field_get:location.nearby.mediums.IntroductionFrame.socket_version) + return _internal_socket_version(); +} +inline void IntroductionFrame::_internal_set_socket_version(::location::nearby::mediums::SocketVersion value) { + assert(::location::nearby::mediums::SocketVersion_IsValid(value)); + _has_bits_[0] |= 0x00000002u; + socket_version_ = value; +} +inline void IntroductionFrame::set_socket_version(::location::nearby::mediums::SocketVersion value) { + _internal_set_socket_version(value); + // @@protoc_insertion_point(field_set:location.nearby.mediums.IntroductionFrame.socket_version) +} + +// ------------------------------------------------------------------- + +// DisconnectionFrame + +// optional bytes service_id_hash = 1; +inline bool DisconnectionFrame::_internal_has_service_id_hash() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool DisconnectionFrame::has_service_id_hash() const { + return _internal_has_service_id_hash(); +} +inline void DisconnectionFrame::clear_service_id_hash() { + service_id_hash_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& DisconnectionFrame::service_id_hash() const { + // @@protoc_insertion_point(field_get:location.nearby.mediums.DisconnectionFrame.service_id_hash) + return _internal_service_id_hash(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void DisconnectionFrame::set_service_id_hash(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + service_id_hash_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:location.nearby.mediums.DisconnectionFrame.service_id_hash) +} +inline std::string* DisconnectionFrame::mutable_service_id_hash() { + std::string* _s = _internal_mutable_service_id_hash(); + // @@protoc_insertion_point(field_mutable:location.nearby.mediums.DisconnectionFrame.service_id_hash) + return _s; +} +inline const std::string& DisconnectionFrame::_internal_service_id_hash() const { + return service_id_hash_.Get(); +} +inline void DisconnectionFrame::_internal_set_service_id_hash(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + service_id_hash_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* DisconnectionFrame::_internal_mutable_service_id_hash() { + _has_bits_[0] |= 0x00000001u; + return service_id_hash_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* DisconnectionFrame::release_service_id_hash() { + // @@protoc_insertion_point(field_release:location.nearby.mediums.DisconnectionFrame.service_id_hash) + if (!_internal_has_service_id_hash()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = service_id_hash_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (service_id_hash_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + service_id_hash_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void DisconnectionFrame::set_allocated_service_id_hash(std::string* service_id_hash) { + if (service_id_hash != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + service_id_hash_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), service_id_hash, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (service_id_hash_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + service_id_hash_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:location.nearby.mediums.DisconnectionFrame.service_id_hash) +} + +// ------------------------------------------------------------------- + +// PacketAcknowledgementFrame + +// optional bytes service_id_hash = 1; +inline bool PacketAcknowledgementFrame::_internal_has_service_id_hash() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool PacketAcknowledgementFrame::has_service_id_hash() const { + return _internal_has_service_id_hash(); +} +inline void PacketAcknowledgementFrame::clear_service_id_hash() { + service_id_hash_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& PacketAcknowledgementFrame::service_id_hash() const { + // @@protoc_insertion_point(field_get:location.nearby.mediums.PacketAcknowledgementFrame.service_id_hash) + return _internal_service_id_hash(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void PacketAcknowledgementFrame::set_service_id_hash(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + service_id_hash_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:location.nearby.mediums.PacketAcknowledgementFrame.service_id_hash) +} +inline std::string* PacketAcknowledgementFrame::mutable_service_id_hash() { + std::string* _s = _internal_mutable_service_id_hash(); + // @@protoc_insertion_point(field_mutable:location.nearby.mediums.PacketAcknowledgementFrame.service_id_hash) + return _s; +} +inline const std::string& PacketAcknowledgementFrame::_internal_service_id_hash() const { + return service_id_hash_.Get(); +} +inline void PacketAcknowledgementFrame::_internal_set_service_id_hash(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + service_id_hash_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* PacketAcknowledgementFrame::_internal_mutable_service_id_hash() { + _has_bits_[0] |= 0x00000001u; + return service_id_hash_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* PacketAcknowledgementFrame::release_service_id_hash() { + // @@protoc_insertion_point(field_release:location.nearby.mediums.PacketAcknowledgementFrame.service_id_hash) + if (!_internal_has_service_id_hash()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = service_id_hash_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (service_id_hash_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + service_id_hash_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void PacketAcknowledgementFrame::set_allocated_service_id_hash(std::string* service_id_hash) { + if (service_id_hash != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + service_id_hash_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), service_id_hash, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (service_id_hash_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + service_id_hash_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:location.nearby.mediums.PacketAcknowledgementFrame.service_id_hash) +} + +// optional int32 received_size = 2; +inline bool PacketAcknowledgementFrame::_internal_has_received_size() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool PacketAcknowledgementFrame::has_received_size() const { + return _internal_has_received_size(); +} +inline void PacketAcknowledgementFrame::clear_received_size() { + received_size_ = 0; + _has_bits_[0] &= ~0x00000002u; +} +inline int32_t PacketAcknowledgementFrame::_internal_received_size() const { + return received_size_; +} +inline int32_t PacketAcknowledgementFrame::received_size() const { + // @@protoc_insertion_point(field_get:location.nearby.mediums.PacketAcknowledgementFrame.received_size) + return _internal_received_size(); +} +inline void PacketAcknowledgementFrame::_internal_set_received_size(int32_t value) { + _has_bits_[0] |= 0x00000002u; + received_size_ = value; +} +inline void PacketAcknowledgementFrame::set_received_size(int32_t value) { + _internal_set_received_size(value); + // @@protoc_insertion_point(field_set:location.nearby.mediums.PacketAcknowledgementFrame.received_size) +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace mediums +} // namespace nearby +} // namespace location + +PROTOBUF_NAMESPACE_OPEN + +template <> struct is_proto_enum< ::location::nearby::mediums::SocketControlFrame_ControlFrameType> : ::std::true_type {}; +template <> struct is_proto_enum< ::location::nearby::mediums::SocketVersion> : ::std::true_type {}; + +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_proto_2fmediums_2fble_5fframes_2eproto diff --git a/proto/mediums/nfc_frames.pb.cc b/proto/mediums/nfc_frames.pb.cc new file mode 100644 index 00000000..4bf6bbbf --- /dev/null +++ b/proto/mediums/nfc_frames.pb.cc @@ -0,0 +1,646 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: proto/mediums/nfc_frames.proto + +#include "proto/mediums/nfc_frames.pb.h" + +#include + +#include +#include +#include +#include +// @@protoc_insertion_point(includes) +#include + +PROTOBUF_PRAGMA_INIT_SEG +namespace location { +namespace nearby { +namespace mediums { +constexpr AdvertisementData::AdvertisementData( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : tag_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , public_key_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){} +struct AdvertisementDataDefaultTypeInternal { + constexpr AdvertisementDataDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~AdvertisementDataDefaultTypeInternal() {} + union { + AdvertisementData _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT AdvertisementDataDefaultTypeInternal _AdvertisementData_default_instance_; +constexpr AdvertisementRequest::AdvertisementRequest( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : service_id_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , endpoint_id_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , public_key_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){} +struct AdvertisementRequestDefaultTypeInternal { + constexpr AdvertisementRequestDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~AdvertisementRequestDefaultTypeInternal() {} + union { + AdvertisementRequest _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT AdvertisementRequestDefaultTypeInternal _AdvertisementRequest_default_instance_; +} // namespace mediums +} // namespace nearby +} // namespace location +namespace location { +namespace nearby { +namespace mediums { + +// =================================================================== + +class AdvertisementData::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_tag(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_public_key(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } +}; + +AdvertisementData::AdvertisementData(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:location.nearby.mediums.AdvertisementData) +} +AdvertisementData::AdvertisementData(const AdvertisementData& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + tag_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + tag_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_tag()) { + tag_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_tag(), + GetArenaForAllocation()); + } + public_key_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + public_key_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_public_key()) { + public_key_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_public_key(), + GetArenaForAllocation()); + } + // @@protoc_insertion_point(copy_constructor:location.nearby.mediums.AdvertisementData) +} + +inline void AdvertisementData::SharedCtor() { +tag_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + tag_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +public_key_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + public_key_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +AdvertisementData::~AdvertisementData() { + // @@protoc_insertion_point(destructor:location.nearby.mediums.AdvertisementData) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void AdvertisementData::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + tag_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + public_key_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void AdvertisementData::ArenaDtor(void* object) { + AdvertisementData* _this = reinterpret_cast< AdvertisementData* >(object); + (void)_this; +} +void AdvertisementData::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void AdvertisementData::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void AdvertisementData::Clear() { +// @@protoc_insertion_point(message_clear_start:location.nearby.mediums.AdvertisementData) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + tag_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000002u) { + public_key_.ClearNonDefaultToEmpty(); + } + } + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* AdvertisementData::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional bytes tag = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_tag(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional bytes public_key = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + auto str = _internal_mutable_public_key(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* AdvertisementData::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:location.nearby.mediums.AdvertisementData) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional bytes tag = 1; + if (cached_has_bits & 0x00000001u) { + target = stream->WriteBytesMaybeAliased( + 1, this->_internal_tag(), target); + } + + // optional bytes public_key = 2; + if (cached_has_bits & 0x00000002u) { + target = stream->WriteBytesMaybeAliased( + 2, this->_internal_public_key(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:location.nearby.mediums.AdvertisementData) + return target; +} + +size_t AdvertisementData::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:location.nearby.mediums.AdvertisementData) + 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 = _has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + // optional bytes tag = 1; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_tag()); + } + + // optional bytes public_key = 2; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_public_key()); + } + + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void AdvertisementData::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void AdvertisementData::MergeFrom(const AdvertisementData& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:location.nearby.mediums.AdvertisementData) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + _internal_set_tag(from._internal_tag()); + } + if (cached_has_bits & 0x00000002u) { + _internal_set_public_key(from._internal_public_key()); + } + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void AdvertisementData::CopyFrom(const AdvertisementData& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:location.nearby.mediums.AdvertisementData) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool AdvertisementData::IsInitialized() const { + return true; +} + +void AdvertisementData::InternalSwap(AdvertisementData* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &tag_, lhs_arena, + &other->tag_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &public_key_, lhs_arena, + &other->public_key_, rhs_arena + ); +} + +std::string AdvertisementData::GetTypeName() const { + return "location.nearby.mediums.AdvertisementData"; +} + + +// =================================================================== + +class AdvertisementRequest::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_service_id(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_endpoint_id(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static void set_has_public_key(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } +}; + +AdvertisementRequest::AdvertisementRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:location.nearby.mediums.AdvertisementRequest) +} +AdvertisementRequest::AdvertisementRequest(const AdvertisementRequest& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + service_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + service_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_service_id()) { + service_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_service_id(), + GetArenaForAllocation()); + } + endpoint_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + endpoint_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_endpoint_id()) { + endpoint_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_endpoint_id(), + GetArenaForAllocation()); + } + public_key_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + public_key_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_public_key()) { + public_key_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_public_key(), + GetArenaForAllocation()); + } + // @@protoc_insertion_point(copy_constructor:location.nearby.mediums.AdvertisementRequest) +} + +inline void AdvertisementRequest::SharedCtor() { +service_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + service_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +endpoint_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + endpoint_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +public_key_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + public_key_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +AdvertisementRequest::~AdvertisementRequest() { + // @@protoc_insertion_point(destructor:location.nearby.mediums.AdvertisementRequest) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void AdvertisementRequest::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + service_id_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + endpoint_id_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + public_key_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void AdvertisementRequest::ArenaDtor(void* object) { + AdvertisementRequest* _this = reinterpret_cast< AdvertisementRequest* >(object); + (void)_this; +} +void AdvertisementRequest::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void AdvertisementRequest::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void AdvertisementRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:location.nearby.mediums.AdvertisementRequest) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + if (cached_has_bits & 0x00000001u) { + service_id_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000002u) { + endpoint_id_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000004u) { + public_key_.ClearNonDefaultToEmpty(); + } + } + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* AdvertisementRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional string service_id = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_service_id(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional string endpoint_id = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + auto str = _internal_mutable_endpoint_id(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional bytes public_key = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { + auto str = _internal_mutable_public_key(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* AdvertisementRequest::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:location.nearby.mediums.AdvertisementRequest) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional string service_id = 1; + if (cached_has_bits & 0x00000001u) { + target = stream->WriteStringMaybeAliased( + 1, this->_internal_service_id(), target); + } + + // optional string endpoint_id = 2; + if (cached_has_bits & 0x00000002u) { + target = stream->WriteStringMaybeAliased( + 2, this->_internal_endpoint_id(), target); + } + + // optional bytes public_key = 3; + if (cached_has_bits & 0x00000004u) { + target = stream->WriteBytesMaybeAliased( + 3, this->_internal_public_key(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:location.nearby.mediums.AdvertisementRequest) + return target; +} + +size_t AdvertisementRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:location.nearby.mediums.AdvertisementRequest) + 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 = _has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + // optional string service_id = 1; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_service_id()); + } + + // optional string endpoint_id = 2; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_endpoint_id()); + } + + // optional bytes public_key = 3; + if (cached_has_bits & 0x00000004u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_public_key()); + } + + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void AdvertisementRequest::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void AdvertisementRequest::MergeFrom(const AdvertisementRequest& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:location.nearby.mediums.AdvertisementRequest) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + if (cached_has_bits & 0x00000001u) { + _internal_set_service_id(from._internal_service_id()); + } + if (cached_has_bits & 0x00000002u) { + _internal_set_endpoint_id(from._internal_endpoint_id()); + } + if (cached_has_bits & 0x00000004u) { + _internal_set_public_key(from._internal_public_key()); + } + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void AdvertisementRequest::CopyFrom(const AdvertisementRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:location.nearby.mediums.AdvertisementRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool AdvertisementRequest::IsInitialized() const { + return true; +} + +void AdvertisementRequest::InternalSwap(AdvertisementRequest* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &service_id_, lhs_arena, + &other->service_id_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &endpoint_id_, lhs_arena, + &other->endpoint_id_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &public_key_, lhs_arena, + &other->public_key_, rhs_arena + ); +} + +std::string AdvertisementRequest::GetTypeName() const { + return "location.nearby.mediums.AdvertisementRequest"; +} + + +// @@protoc_insertion_point(namespace_scope) +} // namespace mediums +} // namespace nearby +} // namespace location +PROTOBUF_NAMESPACE_OPEN +template<> PROTOBUF_NOINLINE ::location::nearby::mediums::AdvertisementData* Arena::CreateMaybeMessage< ::location::nearby::mediums::AdvertisementData >(Arena* arena) { + return Arena::CreateMessageInternal< ::location::nearby::mediums::AdvertisementData >(arena); +} +template<> PROTOBUF_NOINLINE ::location::nearby::mediums::AdvertisementRequest* Arena::CreateMaybeMessage< ::location::nearby::mediums::AdvertisementRequest >(Arena* arena) { + return Arena::CreateMessageInternal< ::location::nearby::mediums::AdvertisementRequest >(arena); +} +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) +#include diff --git a/proto/mediums/nfc_frames.pb.h b/proto/mediums/nfc_frames.pb.h new file mode 100644 index 00000000..3862ba03 --- /dev/null +++ b/proto/mediums/nfc_frames.pb.h @@ -0,0 +1,802 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: proto/mediums/nfc_frames.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_proto_2fmediums_2fnfc_5fframes_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_proto_2fmediums_2fnfc_5fframes_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3019000 +#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 3019004 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_proto_2fmediums_2fnfc_5fframes_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_proto_2fmediums_2fnfc_5fframes_2eproto { + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::AuxiliaryParseTableField aux[] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[2] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[]; + static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[]; + static const uint32_t offsets[]; +}; +namespace location { +namespace nearby { +namespace mediums { +class AdvertisementData; +struct AdvertisementDataDefaultTypeInternal; +extern AdvertisementDataDefaultTypeInternal _AdvertisementData_default_instance_; +class AdvertisementRequest; +struct AdvertisementRequestDefaultTypeInternal; +extern AdvertisementRequestDefaultTypeInternal _AdvertisementRequest_default_instance_; +} // namespace mediums +} // namespace nearby +} // namespace location +PROTOBUF_NAMESPACE_OPEN +template<> ::location::nearby::mediums::AdvertisementData* Arena::CreateMaybeMessage<::location::nearby::mediums::AdvertisementData>(Arena*); +template<> ::location::nearby::mediums::AdvertisementRequest* Arena::CreateMaybeMessage<::location::nearby::mediums::AdvertisementRequest>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace location { +namespace nearby { +namespace mediums { + +// =================================================================== + +class AdvertisementData final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:location.nearby.mediums.AdvertisementData) */ { + public: + inline AdvertisementData() : AdvertisementData(nullptr) {} + ~AdvertisementData() override; + explicit constexpr AdvertisementData(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + AdvertisementData(const AdvertisementData& from); + AdvertisementData(AdvertisementData&& from) noexcept + : AdvertisementData() { + *this = ::std::move(from); + } + + inline AdvertisementData& operator=(const AdvertisementData& from) { + CopyFrom(from); + return *this; + } + inline AdvertisementData& operator=(AdvertisementData&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const AdvertisementData& default_instance() { + return *internal_default_instance(); + } + static inline const AdvertisementData* internal_default_instance() { + return reinterpret_cast( + &_AdvertisementData_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(AdvertisementData& a, AdvertisementData& b) { + a.Swap(&b); + } + inline void Swap(AdvertisementData* 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(AdvertisementData* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + AdvertisementData* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const AdvertisementData& from); + void MergeFrom(const AdvertisementData& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(AdvertisementData* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "location.nearby.mediums.AdvertisementData"; + } + protected: + explicit AdvertisementData(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kTagFieldNumber = 1, + kPublicKeyFieldNumber = 2, + }; + // optional bytes tag = 1; + bool has_tag() const; + private: + bool _internal_has_tag() const; + public: + void clear_tag(); + const std::string& tag() const; + template + void set_tag(ArgT0&& arg0, ArgT... args); + std::string* mutable_tag(); + PROTOBUF_NODISCARD std::string* release_tag(); + void set_allocated_tag(std::string* tag); + private: + const std::string& _internal_tag() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_tag(const std::string& value); + std::string* _internal_mutable_tag(); + public: + + // optional bytes public_key = 2; + bool has_public_key() const; + private: + bool _internal_has_public_key() const; + public: + void clear_public_key(); + const std::string& public_key() const; + template + void set_public_key(ArgT0&& arg0, ArgT... args); + std::string* mutable_public_key(); + PROTOBUF_NODISCARD std::string* release_public_key(); + void set_allocated_public_key(std::string* public_key); + private: + const std::string& _internal_public_key() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_public_key(const std::string& value); + std::string* _internal_mutable_public_key(); + public: + + // @@protoc_insertion_point(class_scope:location.nearby.mediums.AdvertisementData) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr tag_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr public_key_; + friend struct ::TableStruct_proto_2fmediums_2fnfc_5fframes_2eproto; +}; +// ------------------------------------------------------------------- + +class AdvertisementRequest final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:location.nearby.mediums.AdvertisementRequest) */ { + public: + inline AdvertisementRequest() : AdvertisementRequest(nullptr) {} + ~AdvertisementRequest() override; + explicit constexpr AdvertisementRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + AdvertisementRequest(const AdvertisementRequest& from); + AdvertisementRequest(AdvertisementRequest&& from) noexcept + : AdvertisementRequest() { + *this = ::std::move(from); + } + + inline AdvertisementRequest& operator=(const AdvertisementRequest& from) { + CopyFrom(from); + return *this; + } + inline AdvertisementRequest& operator=(AdvertisementRequest&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const AdvertisementRequest& default_instance() { + return *internal_default_instance(); + } + static inline const AdvertisementRequest* internal_default_instance() { + return reinterpret_cast( + &_AdvertisementRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 1; + + friend void swap(AdvertisementRequest& a, AdvertisementRequest& b) { + a.Swap(&b); + } + inline void Swap(AdvertisementRequest* 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(AdvertisementRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + AdvertisementRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const AdvertisementRequest& from); + void MergeFrom(const AdvertisementRequest& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(AdvertisementRequest* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "location.nearby.mediums.AdvertisementRequest"; + } + protected: + explicit AdvertisementRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kServiceIdFieldNumber = 1, + kEndpointIdFieldNumber = 2, + kPublicKeyFieldNumber = 3, + }; + // optional string service_id = 1; + bool has_service_id() const; + private: + bool _internal_has_service_id() const; + public: + void clear_service_id(); + const std::string& service_id() const; + template + void set_service_id(ArgT0&& arg0, ArgT... args); + std::string* mutable_service_id(); + PROTOBUF_NODISCARD std::string* release_service_id(); + void set_allocated_service_id(std::string* service_id); + private: + const std::string& _internal_service_id() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_service_id(const std::string& value); + std::string* _internal_mutable_service_id(); + public: + + // optional string endpoint_id = 2; + bool has_endpoint_id() const; + private: + bool _internal_has_endpoint_id() const; + public: + void clear_endpoint_id(); + const std::string& endpoint_id() const; + template + void set_endpoint_id(ArgT0&& arg0, ArgT... args); + std::string* mutable_endpoint_id(); + PROTOBUF_NODISCARD std::string* release_endpoint_id(); + void set_allocated_endpoint_id(std::string* endpoint_id); + private: + const std::string& _internal_endpoint_id() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_endpoint_id(const std::string& value); + std::string* _internal_mutable_endpoint_id(); + public: + + // optional bytes public_key = 3; + bool has_public_key() const; + private: + bool _internal_has_public_key() const; + public: + void clear_public_key(); + const std::string& public_key() const; + template + void set_public_key(ArgT0&& arg0, ArgT... args); + std::string* mutable_public_key(); + PROTOBUF_NODISCARD std::string* release_public_key(); + void set_allocated_public_key(std::string* public_key); + private: + const std::string& _internal_public_key() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_public_key(const std::string& value); + std::string* _internal_mutable_public_key(); + public: + + // @@protoc_insertion_point(class_scope:location.nearby.mediums.AdvertisementRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr service_id_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr endpoint_id_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr public_key_; + friend struct ::TableStruct_proto_2fmediums_2fnfc_5fframes_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// AdvertisementData + +// optional bytes tag = 1; +inline bool AdvertisementData::_internal_has_tag() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool AdvertisementData::has_tag() const { + return _internal_has_tag(); +} +inline void AdvertisementData::clear_tag() { + tag_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& AdvertisementData::tag() const { + // @@protoc_insertion_point(field_get:location.nearby.mediums.AdvertisementData.tag) + return _internal_tag(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void AdvertisementData::set_tag(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + tag_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:location.nearby.mediums.AdvertisementData.tag) +} +inline std::string* AdvertisementData::mutable_tag() { + std::string* _s = _internal_mutable_tag(); + // @@protoc_insertion_point(field_mutable:location.nearby.mediums.AdvertisementData.tag) + return _s; +} +inline const std::string& AdvertisementData::_internal_tag() const { + return tag_.Get(); +} +inline void AdvertisementData::_internal_set_tag(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + tag_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* AdvertisementData::_internal_mutable_tag() { + _has_bits_[0] |= 0x00000001u; + return tag_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* AdvertisementData::release_tag() { + // @@protoc_insertion_point(field_release:location.nearby.mediums.AdvertisementData.tag) + if (!_internal_has_tag()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = tag_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (tag_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + tag_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void AdvertisementData::set_allocated_tag(std::string* tag) { + if (tag != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + tag_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), tag, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (tag_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + tag_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:location.nearby.mediums.AdvertisementData.tag) +} + +// optional bytes public_key = 2; +inline bool AdvertisementData::_internal_has_public_key() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool AdvertisementData::has_public_key() const { + return _internal_has_public_key(); +} +inline void AdvertisementData::clear_public_key() { + public_key_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000002u; +} +inline const std::string& AdvertisementData::public_key() const { + // @@protoc_insertion_point(field_get:location.nearby.mediums.AdvertisementData.public_key) + return _internal_public_key(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void AdvertisementData::set_public_key(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000002u; + public_key_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:location.nearby.mediums.AdvertisementData.public_key) +} +inline std::string* AdvertisementData::mutable_public_key() { + std::string* _s = _internal_mutable_public_key(); + // @@protoc_insertion_point(field_mutable:location.nearby.mediums.AdvertisementData.public_key) + return _s; +} +inline const std::string& AdvertisementData::_internal_public_key() const { + return public_key_.Get(); +} +inline void AdvertisementData::_internal_set_public_key(const std::string& value) { + _has_bits_[0] |= 0x00000002u; + public_key_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* AdvertisementData::_internal_mutable_public_key() { + _has_bits_[0] |= 0x00000002u; + return public_key_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* AdvertisementData::release_public_key() { + // @@protoc_insertion_point(field_release:location.nearby.mediums.AdvertisementData.public_key) + if (!_internal_has_public_key()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000002u; + auto* p = public_key_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (public_key_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + public_key_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void AdvertisementData::set_allocated_public_key(std::string* public_key) { + if (public_key != nullptr) { + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + public_key_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), public_key, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (public_key_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + public_key_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:location.nearby.mediums.AdvertisementData.public_key) +} + +// ------------------------------------------------------------------- + +// AdvertisementRequest + +// optional string service_id = 1; +inline bool AdvertisementRequest::_internal_has_service_id() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool AdvertisementRequest::has_service_id() const { + return _internal_has_service_id(); +} +inline void AdvertisementRequest::clear_service_id() { + service_id_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& AdvertisementRequest::service_id() const { + // @@protoc_insertion_point(field_get:location.nearby.mediums.AdvertisementRequest.service_id) + return _internal_service_id(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void AdvertisementRequest::set_service_id(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + service_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:location.nearby.mediums.AdvertisementRequest.service_id) +} +inline std::string* AdvertisementRequest::mutable_service_id() { + std::string* _s = _internal_mutable_service_id(); + // @@protoc_insertion_point(field_mutable:location.nearby.mediums.AdvertisementRequest.service_id) + return _s; +} +inline const std::string& AdvertisementRequest::_internal_service_id() const { + return service_id_.Get(); +} +inline void AdvertisementRequest::_internal_set_service_id(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + service_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* AdvertisementRequest::_internal_mutable_service_id() { + _has_bits_[0] |= 0x00000001u; + return service_id_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* AdvertisementRequest::release_service_id() { + // @@protoc_insertion_point(field_release:location.nearby.mediums.AdvertisementRequest.service_id) + if (!_internal_has_service_id()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = service_id_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (service_id_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + service_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void AdvertisementRequest::set_allocated_service_id(std::string* service_id) { + if (service_id != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + service_id_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), service_id, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (service_id_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + service_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:location.nearby.mediums.AdvertisementRequest.service_id) +} + +// optional string endpoint_id = 2; +inline bool AdvertisementRequest::_internal_has_endpoint_id() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool AdvertisementRequest::has_endpoint_id() const { + return _internal_has_endpoint_id(); +} +inline void AdvertisementRequest::clear_endpoint_id() { + endpoint_id_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000002u; +} +inline const std::string& AdvertisementRequest::endpoint_id() const { + // @@protoc_insertion_point(field_get:location.nearby.mediums.AdvertisementRequest.endpoint_id) + return _internal_endpoint_id(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void AdvertisementRequest::set_endpoint_id(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000002u; + endpoint_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:location.nearby.mediums.AdvertisementRequest.endpoint_id) +} +inline std::string* AdvertisementRequest::mutable_endpoint_id() { + std::string* _s = _internal_mutable_endpoint_id(); + // @@protoc_insertion_point(field_mutable:location.nearby.mediums.AdvertisementRequest.endpoint_id) + return _s; +} +inline const std::string& AdvertisementRequest::_internal_endpoint_id() const { + return endpoint_id_.Get(); +} +inline void AdvertisementRequest::_internal_set_endpoint_id(const std::string& value) { + _has_bits_[0] |= 0x00000002u; + endpoint_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* AdvertisementRequest::_internal_mutable_endpoint_id() { + _has_bits_[0] |= 0x00000002u; + return endpoint_id_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* AdvertisementRequest::release_endpoint_id() { + // @@protoc_insertion_point(field_release:location.nearby.mediums.AdvertisementRequest.endpoint_id) + if (!_internal_has_endpoint_id()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000002u; + auto* p = endpoint_id_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (endpoint_id_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + endpoint_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void AdvertisementRequest::set_allocated_endpoint_id(std::string* endpoint_id) { + if (endpoint_id != nullptr) { + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + endpoint_id_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), endpoint_id, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (endpoint_id_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + endpoint_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:location.nearby.mediums.AdvertisementRequest.endpoint_id) +} + +// optional bytes public_key = 3; +inline bool AdvertisementRequest::_internal_has_public_key() const { + bool value = (_has_bits_[0] & 0x00000004u) != 0; + return value; +} +inline bool AdvertisementRequest::has_public_key() const { + return _internal_has_public_key(); +} +inline void AdvertisementRequest::clear_public_key() { + public_key_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000004u; +} +inline const std::string& AdvertisementRequest::public_key() const { + // @@protoc_insertion_point(field_get:location.nearby.mediums.AdvertisementRequest.public_key) + return _internal_public_key(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void AdvertisementRequest::set_public_key(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000004u; + public_key_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:location.nearby.mediums.AdvertisementRequest.public_key) +} +inline std::string* AdvertisementRequest::mutable_public_key() { + std::string* _s = _internal_mutable_public_key(); + // @@protoc_insertion_point(field_mutable:location.nearby.mediums.AdvertisementRequest.public_key) + return _s; +} +inline const std::string& AdvertisementRequest::_internal_public_key() const { + return public_key_.Get(); +} +inline void AdvertisementRequest::_internal_set_public_key(const std::string& value) { + _has_bits_[0] |= 0x00000004u; + public_key_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* AdvertisementRequest::_internal_mutable_public_key() { + _has_bits_[0] |= 0x00000004u; + return public_key_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* AdvertisementRequest::release_public_key() { + // @@protoc_insertion_point(field_release:location.nearby.mediums.AdvertisementRequest.public_key) + if (!_internal_has_public_key()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000004u; + auto* p = public_key_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (public_key_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + public_key_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void AdvertisementRequest::set_allocated_public_key(std::string* public_key) { + if (public_key != nullptr) { + _has_bits_[0] |= 0x00000004u; + } else { + _has_bits_[0] &= ~0x00000004u; + } + public_key_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), public_key, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (public_key_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + public_key_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:location.nearby.mediums.AdvertisementRequest.public_key) +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace mediums +} // namespace nearby +} // namespace location + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_proto_2fmediums_2fnfc_5fframes_2eproto diff --git a/proto/mediums/web_rtc_signaling_frames.pb.cc b/proto/mediums/web_rtc_signaling_frames.pb.cc new file mode 100644 index 00000000..e5652b3a --- /dev/null +++ b/proto/mediums/web_rtc_signaling_frames.pb.cc @@ -0,0 +1,2192 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: proto/mediums/web_rtc_signaling_frames.proto + +#include "proto/mediums/web_rtc_signaling_frames.pb.h" + +#include + +#include +#include +#include +#include +// @@protoc_insertion_point(includes) +#include + +PROTOBUF_PRAGMA_INIT_SEG +namespace location { +namespace nearby { +namespace mediums { +constexpr WebRtcSignalingFrame::WebRtcSignalingFrame( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : sender_id_(nullptr) + , type_(0) + + , _oneof_case_{}{} +struct WebRtcSignalingFrameDefaultTypeInternal { + constexpr WebRtcSignalingFrameDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~WebRtcSignalingFrameDefaultTypeInternal() {} + union { + WebRtcSignalingFrame _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT WebRtcSignalingFrameDefaultTypeInternal _WebRtcSignalingFrame_default_instance_; +constexpr PeerId::PeerId( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : id_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){} +struct PeerIdDefaultTypeInternal { + constexpr PeerIdDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~PeerIdDefaultTypeInternal() {} + union { + PeerId _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PeerIdDefaultTypeInternal _PeerId_default_instance_; +constexpr SessionDescription::SessionDescription( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : description_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){} +struct SessionDescriptionDefaultTypeInternal { + constexpr SessionDescriptionDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~SessionDescriptionDefaultTypeInternal() {} + union { + SessionDescription _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT SessionDescriptionDefaultTypeInternal _SessionDescription_default_instance_; +constexpr IceCandidate::IceCandidate( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : sdp_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , sdp_mid_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , sdp_m_line_index_(0){} +struct IceCandidateDefaultTypeInternal { + constexpr IceCandidateDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~IceCandidateDefaultTypeInternal() {} + union { + IceCandidate _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT IceCandidateDefaultTypeInternal _IceCandidate_default_instance_; +constexpr IceCandidates::IceCandidates( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : ice_candidates_(){} +struct IceCandidatesDefaultTypeInternal { + constexpr IceCandidatesDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~IceCandidatesDefaultTypeInternal() {} + union { + IceCandidates _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT IceCandidatesDefaultTypeInternal _IceCandidates_default_instance_; +constexpr Offer::Offer( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : session_description_(nullptr){} +struct OfferDefaultTypeInternal { + constexpr OfferDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~OfferDefaultTypeInternal() {} + union { + Offer _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OfferDefaultTypeInternal _Offer_default_instance_; +constexpr Answer::Answer( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : session_description_(nullptr){} +struct AnswerDefaultTypeInternal { + constexpr AnswerDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~AnswerDefaultTypeInternal() {} + union { + Answer _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT AnswerDefaultTypeInternal _Answer_default_instance_; +constexpr ReadyForSignalingPoke::ReadyForSignalingPoke( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized){} +struct ReadyForSignalingPokeDefaultTypeInternal { + constexpr ReadyForSignalingPokeDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~ReadyForSignalingPokeDefaultTypeInternal() {} + union { + ReadyForSignalingPoke _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ReadyForSignalingPokeDefaultTypeInternal _ReadyForSignalingPoke_default_instance_; +} // namespace mediums +} // namespace nearby +} // namespace location +namespace location { +namespace nearby { +namespace mediums { +bool WebRtcSignalingFrame_FrameType_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 WebRtcSignalingFrame_FrameType_strings[5] = {}; + +static const char WebRtcSignalingFrame_FrameType_names[] = + "ANSWER_TYPE" + "ICE_CANDIDATES_TYPE" + "OFFER_TYPE" + "READY_FOR_SIGNALING_POKE_TYPE" + "UNKNOWN_FRAME_TYPE"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry WebRtcSignalingFrame_FrameType_entries[] = { + { {WebRtcSignalingFrame_FrameType_names + 0, 11}, 2 }, + { {WebRtcSignalingFrame_FrameType_names + 11, 19}, 3 }, + { {WebRtcSignalingFrame_FrameType_names + 30, 10}, 1 }, + { {WebRtcSignalingFrame_FrameType_names + 40, 29}, 4 }, + { {WebRtcSignalingFrame_FrameType_names + 69, 18}, 0 }, +}; + +static const int WebRtcSignalingFrame_FrameType_entries_by_number[] = { + 4, // 0 -> UNKNOWN_FRAME_TYPE + 2, // 1 -> OFFER_TYPE + 0, // 2 -> ANSWER_TYPE + 1, // 3 -> ICE_CANDIDATES_TYPE + 3, // 4 -> READY_FOR_SIGNALING_POKE_TYPE +}; + +const std::string& WebRtcSignalingFrame_FrameType_Name( + WebRtcSignalingFrame_FrameType value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + WebRtcSignalingFrame_FrameType_entries, + WebRtcSignalingFrame_FrameType_entries_by_number, + 5, WebRtcSignalingFrame_FrameType_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + WebRtcSignalingFrame_FrameType_entries, + WebRtcSignalingFrame_FrameType_entries_by_number, + 5, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + WebRtcSignalingFrame_FrameType_strings[idx].get(); +} +bool WebRtcSignalingFrame_FrameType_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, WebRtcSignalingFrame_FrameType* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + WebRtcSignalingFrame_FrameType_entries, 5, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} +#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) +constexpr WebRtcSignalingFrame_FrameType WebRtcSignalingFrame::UNKNOWN_FRAME_TYPE; +constexpr WebRtcSignalingFrame_FrameType WebRtcSignalingFrame::OFFER_TYPE; +constexpr WebRtcSignalingFrame_FrameType WebRtcSignalingFrame::ANSWER_TYPE; +constexpr WebRtcSignalingFrame_FrameType WebRtcSignalingFrame::ICE_CANDIDATES_TYPE; +constexpr WebRtcSignalingFrame_FrameType WebRtcSignalingFrame::READY_FOR_SIGNALING_POKE_TYPE; +constexpr WebRtcSignalingFrame_FrameType WebRtcSignalingFrame::FrameType_MIN; +constexpr WebRtcSignalingFrame_FrameType WebRtcSignalingFrame::FrameType_MAX; +constexpr int WebRtcSignalingFrame::FrameType_ARRAYSIZE; +#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) + +// =================================================================== + +class WebRtcSignalingFrame::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static const ::location::nearby::mediums::PeerId& sender_id(const WebRtcSignalingFrame* msg); + static void set_has_sender_id(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_type(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static const ::location::nearby::mediums::Offer& offer(const WebRtcSignalingFrame* msg); + static const ::location::nearby::mediums::Answer& answer(const WebRtcSignalingFrame* msg); + static const ::location::nearby::mediums::IceCandidates& ice_candidates(const WebRtcSignalingFrame* msg); + static const ::location::nearby::mediums::ReadyForSignalingPoke& ready_for_signaling_poke(const WebRtcSignalingFrame* msg); +}; + +const ::location::nearby::mediums::PeerId& +WebRtcSignalingFrame::_Internal::sender_id(const WebRtcSignalingFrame* msg) { + return *msg->sender_id_; +} +const ::location::nearby::mediums::Offer& +WebRtcSignalingFrame::_Internal::offer(const WebRtcSignalingFrame* msg) { + return *msg->Frame_.offer_; +} +const ::location::nearby::mediums::Answer& +WebRtcSignalingFrame::_Internal::answer(const WebRtcSignalingFrame* msg) { + return *msg->Frame_.answer_; +} +const ::location::nearby::mediums::IceCandidates& +WebRtcSignalingFrame::_Internal::ice_candidates(const WebRtcSignalingFrame* msg) { + return *msg->Frame_.ice_candidates_; +} +const ::location::nearby::mediums::ReadyForSignalingPoke& +WebRtcSignalingFrame::_Internal::ready_for_signaling_poke(const WebRtcSignalingFrame* msg) { + return *msg->Frame_.ready_for_signaling_poke_; +} +void WebRtcSignalingFrame::set_allocated_offer(::location::nearby::mediums::Offer* offer) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + clear_Frame(); + if (offer) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::location::nearby::mediums::Offer>::GetOwningArena(offer); + if (message_arena != submessage_arena) { + offer = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, offer, submessage_arena); + } + set_has_offer(); + Frame_.offer_ = offer; + } + // @@protoc_insertion_point(field_set_allocated:location.nearby.mediums.WebRtcSignalingFrame.offer) +} +void WebRtcSignalingFrame::set_allocated_answer(::location::nearby::mediums::Answer* answer) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + clear_Frame(); + if (answer) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::location::nearby::mediums::Answer>::GetOwningArena(answer); + if (message_arena != submessage_arena) { + answer = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, answer, submessage_arena); + } + set_has_answer(); + Frame_.answer_ = answer; + } + // @@protoc_insertion_point(field_set_allocated:location.nearby.mediums.WebRtcSignalingFrame.answer) +} +void WebRtcSignalingFrame::set_allocated_ice_candidates(::location::nearby::mediums::IceCandidates* ice_candidates) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + clear_Frame(); + if (ice_candidates) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::location::nearby::mediums::IceCandidates>::GetOwningArena(ice_candidates); + if (message_arena != submessage_arena) { + ice_candidates = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, ice_candidates, submessage_arena); + } + set_has_ice_candidates(); + Frame_.ice_candidates_ = ice_candidates; + } + // @@protoc_insertion_point(field_set_allocated:location.nearby.mediums.WebRtcSignalingFrame.ice_candidates) +} +void WebRtcSignalingFrame::set_allocated_ready_for_signaling_poke(::location::nearby::mediums::ReadyForSignalingPoke* ready_for_signaling_poke) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + clear_Frame(); + if (ready_for_signaling_poke) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::location::nearby::mediums::ReadyForSignalingPoke>::GetOwningArena(ready_for_signaling_poke); + if (message_arena != submessage_arena) { + ready_for_signaling_poke = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, ready_for_signaling_poke, submessage_arena); + } + set_has_ready_for_signaling_poke(); + Frame_.ready_for_signaling_poke_ = ready_for_signaling_poke; + } + // @@protoc_insertion_point(field_set_allocated:location.nearby.mediums.WebRtcSignalingFrame.ready_for_signaling_poke) +} +WebRtcSignalingFrame::WebRtcSignalingFrame(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:location.nearby.mediums.WebRtcSignalingFrame) +} +WebRtcSignalingFrame::WebRtcSignalingFrame(const WebRtcSignalingFrame& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + if (from._internal_has_sender_id()) { + sender_id_ = new ::location::nearby::mediums::PeerId(*from.sender_id_); + } else { + sender_id_ = nullptr; + } + type_ = from.type_; + clear_has_Frame(); + switch (from.Frame_case()) { + case kOffer: { + _internal_mutable_offer()->::location::nearby::mediums::Offer::MergeFrom(from._internal_offer()); + break; + } + case kAnswer: { + _internal_mutable_answer()->::location::nearby::mediums::Answer::MergeFrom(from._internal_answer()); + break; + } + case kIceCandidates: { + _internal_mutable_ice_candidates()->::location::nearby::mediums::IceCandidates::MergeFrom(from._internal_ice_candidates()); + break; + } + case kReadyForSignalingPoke: { + _internal_mutable_ready_for_signaling_poke()->::location::nearby::mediums::ReadyForSignalingPoke::MergeFrom(from._internal_ready_for_signaling_poke()); + break; + } + case FRAME_NOT_SET: { + break; + } + } + // @@protoc_insertion_point(copy_constructor:location.nearby.mediums.WebRtcSignalingFrame) +} + +inline void WebRtcSignalingFrame::SharedCtor() { +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&sender_id_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&type_) - + reinterpret_cast(&sender_id_)) + sizeof(type_)); +clear_has_Frame(); +} + +WebRtcSignalingFrame::~WebRtcSignalingFrame() { + // @@protoc_insertion_point(destructor:location.nearby.mediums.WebRtcSignalingFrame) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void WebRtcSignalingFrame::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + if (this != internal_default_instance()) delete sender_id_; + if (has_Frame()) { + clear_Frame(); + } +} + +void WebRtcSignalingFrame::ArenaDtor(void* object) { + WebRtcSignalingFrame* _this = reinterpret_cast< WebRtcSignalingFrame* >(object); + (void)_this; +} +void WebRtcSignalingFrame::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void WebRtcSignalingFrame::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void WebRtcSignalingFrame::clear_Frame() { +// @@protoc_insertion_point(one_of_clear_start:location.nearby.mediums.WebRtcSignalingFrame) + switch (Frame_case()) { + case kOffer: { + if (GetArenaForAllocation() == nullptr) { + delete Frame_.offer_; + } + break; + } + case kAnswer: { + if (GetArenaForAllocation() == nullptr) { + delete Frame_.answer_; + } + break; + } + case kIceCandidates: { + if (GetArenaForAllocation() == nullptr) { + delete Frame_.ice_candidates_; + } + break; + } + case kReadyForSignalingPoke: { + if (GetArenaForAllocation() == nullptr) { + delete Frame_.ready_for_signaling_poke_; + } + break; + } + case FRAME_NOT_SET: { + break; + } + } + _oneof_case_[0] = FRAME_NOT_SET; +} + + +void WebRtcSignalingFrame::Clear() { +// @@protoc_insertion_point(message_clear_start:location.nearby.mediums.WebRtcSignalingFrame) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + GOOGLE_DCHECK(sender_id_ != nullptr); + sender_id_->Clear(); + } + type_ = 0; + clear_Frame(); + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* WebRtcSignalingFrame::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional .location.nearby.mediums.PeerId sender_id = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + ptr = ctx->ParseMessage(_internal_mutable_sender_id(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .location.nearby.mediums.WebRtcSignalingFrame.FrameType type = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::location::nearby::mediums::WebRtcSignalingFrame_FrameType_IsValid(val))) { + _internal_set_type(static_cast<::location::nearby::mediums::WebRtcSignalingFrame_FrameType>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(2, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // .location.nearby.mediums.Offer offer = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { + ptr = ctx->ParseMessage(_internal_mutable_offer(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // .location.nearby.mediums.Answer answer = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { + ptr = ctx->ParseMessage(_internal_mutable_answer(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // .location.nearby.mediums.IceCandidates ice_candidates = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 42)) { + ptr = ctx->ParseMessage(_internal_mutable_ice_candidates(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // .location.nearby.mediums.ReadyForSignalingPoke ready_for_signaling_poke = 6; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 50)) { + ptr = ctx->ParseMessage(_internal_mutable_ready_for_signaling_poke(), 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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* WebRtcSignalingFrame::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:location.nearby.mediums.WebRtcSignalingFrame) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional .location.nearby.mediums.PeerId sender_id = 1; + if (cached_has_bits & 0x00000001u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 1, _Internal::sender_id(this), target, stream); + } + + // optional .location.nearby.mediums.WebRtcSignalingFrame.FrameType type = 2; + if (cached_has_bits & 0x00000002u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 2, this->_internal_type(), target); + } + + switch (Frame_case()) { + case kOffer: { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 3, _Internal::offer(this), target, stream); + break; + } + case kAnswer: { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 4, _Internal::answer(this), target, stream); + break; + } + case kIceCandidates: { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 5, _Internal::ice_candidates(this), target, stream); + break; + } + case kReadyForSignalingPoke: { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 6, _Internal::ready_for_signaling_poke(this), target, stream); + break; + } + default: ; + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:location.nearby.mediums.WebRtcSignalingFrame) + return target; +} + +size_t WebRtcSignalingFrame::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:location.nearby.mediums.WebRtcSignalingFrame) + 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 = _has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + // optional .location.nearby.mediums.PeerId sender_id = 1; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *sender_id_); + } + + // optional .location.nearby.mediums.WebRtcSignalingFrame.FrameType type = 2; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_type()); + } + + } + switch (Frame_case()) { + // .location.nearby.mediums.Offer offer = 3; + case kOffer: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *Frame_.offer_); + break; + } + // .location.nearby.mediums.Answer answer = 4; + case kAnswer: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *Frame_.answer_); + break; + } + // .location.nearby.mediums.IceCandidates ice_candidates = 5; + case kIceCandidates: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *Frame_.ice_candidates_); + break; + } + // .location.nearby.mediums.ReadyForSignalingPoke ready_for_signaling_poke = 6; + case kReadyForSignalingPoke: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *Frame_.ready_for_signaling_poke_); + break; + } + case FRAME_NOT_SET: { + break; + } + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void WebRtcSignalingFrame::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void WebRtcSignalingFrame::MergeFrom(const WebRtcSignalingFrame& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:location.nearby.mediums.WebRtcSignalingFrame) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + _internal_mutable_sender_id()->::location::nearby::mediums::PeerId::MergeFrom(from._internal_sender_id()); + } + if (cached_has_bits & 0x00000002u) { + type_ = from.type_; + } + _has_bits_[0] |= cached_has_bits; + } + switch (from.Frame_case()) { + case kOffer: { + _internal_mutable_offer()->::location::nearby::mediums::Offer::MergeFrom(from._internal_offer()); + break; + } + case kAnswer: { + _internal_mutable_answer()->::location::nearby::mediums::Answer::MergeFrom(from._internal_answer()); + break; + } + case kIceCandidates: { + _internal_mutable_ice_candidates()->::location::nearby::mediums::IceCandidates::MergeFrom(from._internal_ice_candidates()); + break; + } + case kReadyForSignalingPoke: { + _internal_mutable_ready_for_signaling_poke()->::location::nearby::mediums::ReadyForSignalingPoke::MergeFrom(from._internal_ready_for_signaling_poke()); + break; + } + case FRAME_NOT_SET: { + break; + } + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void WebRtcSignalingFrame::CopyFrom(const WebRtcSignalingFrame& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:location.nearby.mediums.WebRtcSignalingFrame) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool WebRtcSignalingFrame::IsInitialized() const { + return true; +} + +void WebRtcSignalingFrame::InternalSwap(WebRtcSignalingFrame* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(WebRtcSignalingFrame, type_) + + sizeof(WebRtcSignalingFrame::type_) + - PROTOBUF_FIELD_OFFSET(WebRtcSignalingFrame, sender_id_)>( + reinterpret_cast(&sender_id_), + reinterpret_cast(&other->sender_id_)); + swap(Frame_, other->Frame_); + swap(_oneof_case_[0], other->_oneof_case_[0]); +} + +std::string WebRtcSignalingFrame::GetTypeName() const { + return "location.nearby.mediums.WebRtcSignalingFrame"; +} + + +// =================================================================== + +class PeerId::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_id(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } +}; + +PeerId::PeerId(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:location.nearby.mediums.PeerId) +} +PeerId::PeerId(const PeerId& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_id()) { + id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_id(), + GetArenaForAllocation()); + } + // @@protoc_insertion_point(copy_constructor:location.nearby.mediums.PeerId) +} + +inline void PeerId::SharedCtor() { +id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +PeerId::~PeerId() { + // @@protoc_insertion_point(destructor:location.nearby.mediums.PeerId) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void PeerId::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + id_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void PeerId::ArenaDtor(void* object) { + PeerId* _this = reinterpret_cast< PeerId* >(object); + (void)_this; +} +void PeerId::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void PeerId::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void PeerId::Clear() { +// @@protoc_insertion_point(message_clear_start:location.nearby.mediums.PeerId) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + id_.ClearNonDefaultToEmpty(); + } + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* PeerId::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional string id = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_id(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* PeerId::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:location.nearby.mediums.PeerId) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional string id = 1; + if (cached_has_bits & 0x00000001u) { + target = stream->WriteStringMaybeAliased( + 1, this->_internal_id(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:location.nearby.mediums.PeerId) + return target; +} + +size_t PeerId::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:location.nearby.mediums.PeerId) + 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 string id = 1; + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_id()); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void PeerId::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void PeerId::MergeFrom(const PeerId& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:location.nearby.mediums.PeerId) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_has_id()) { + _internal_set_id(from._internal_id()); + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void PeerId::CopyFrom(const PeerId& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:location.nearby.mediums.PeerId) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool PeerId::IsInitialized() const { + return true; +} + +void PeerId::InternalSwap(PeerId* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &id_, lhs_arena, + &other->id_, rhs_arena + ); +} + +std::string PeerId::GetTypeName() const { + return "location.nearby.mediums.PeerId"; +} + + +// =================================================================== + +class SessionDescription::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_description(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } +}; + +SessionDescription::SessionDescription(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:location.nearby.mediums.SessionDescription) +} +SessionDescription::SessionDescription(const SessionDescription& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + description_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + description_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_description()) { + description_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_description(), + GetArenaForAllocation()); + } + // @@protoc_insertion_point(copy_constructor:location.nearby.mediums.SessionDescription) +} + +inline void SessionDescription::SharedCtor() { +description_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + description_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +SessionDescription::~SessionDescription() { + // @@protoc_insertion_point(destructor:location.nearby.mediums.SessionDescription) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void SessionDescription::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + description_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void SessionDescription::ArenaDtor(void* object) { + SessionDescription* _this = reinterpret_cast< SessionDescription* >(object); + (void)_this; +} +void SessionDescription::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void SessionDescription::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void SessionDescription::Clear() { +// @@protoc_insertion_point(message_clear_start:location.nearby.mediums.SessionDescription) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + description_.ClearNonDefaultToEmpty(); + } + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* SessionDescription::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional string description = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_description(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* SessionDescription::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:location.nearby.mediums.SessionDescription) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional string description = 1; + if (cached_has_bits & 0x00000001u) { + target = stream->WriteStringMaybeAliased( + 1, this->_internal_description(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:location.nearby.mediums.SessionDescription) + return target; +} + +size_t SessionDescription::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:location.nearby.mediums.SessionDescription) + 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 string description = 1; + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_description()); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void SessionDescription::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void SessionDescription::MergeFrom(const SessionDescription& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:location.nearby.mediums.SessionDescription) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_has_description()) { + _internal_set_description(from._internal_description()); + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void SessionDescription::CopyFrom(const SessionDescription& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:location.nearby.mediums.SessionDescription) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool SessionDescription::IsInitialized() const { + return true; +} + +void SessionDescription::InternalSwap(SessionDescription* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &description_, lhs_arena, + &other->description_, rhs_arena + ); +} + +std::string SessionDescription::GetTypeName() const { + return "location.nearby.mediums.SessionDescription"; +} + + +// =================================================================== + +class IceCandidate::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_sdp(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_sdp_mid(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static void set_has_sdp_m_line_index(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } +}; + +IceCandidate::IceCandidate(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:location.nearby.mediums.IceCandidate) +} +IceCandidate::IceCandidate(const IceCandidate& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + sdp_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + sdp_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_sdp()) { + sdp_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_sdp(), + GetArenaForAllocation()); + } + sdp_mid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + sdp_mid_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_sdp_mid()) { + sdp_mid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_sdp_mid(), + GetArenaForAllocation()); + } + sdp_m_line_index_ = from.sdp_m_line_index_; + // @@protoc_insertion_point(copy_constructor:location.nearby.mediums.IceCandidate) +} + +inline void IceCandidate::SharedCtor() { +sdp_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + sdp_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +sdp_mid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + sdp_mid_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +sdp_m_line_index_ = 0; +} + +IceCandidate::~IceCandidate() { + // @@protoc_insertion_point(destructor:location.nearby.mediums.IceCandidate) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void IceCandidate::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + sdp_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + sdp_mid_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void IceCandidate::ArenaDtor(void* object) { + IceCandidate* _this = reinterpret_cast< IceCandidate* >(object); + (void)_this; +} +void IceCandidate::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void IceCandidate::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void IceCandidate::Clear() { +// @@protoc_insertion_point(message_clear_start:location.nearby.mediums.IceCandidate) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + sdp_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000002u) { + sdp_mid_.ClearNonDefaultToEmpty(); + } + } + sdp_m_line_index_ = 0; + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* IceCandidate::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional string sdp = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_sdp(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional string sdp_mid = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + auto str = _internal_mutable_sdp_mid(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional int32 sdp_m_line_index = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { + _Internal::set_has_sdp_m_line_index(&has_bits); + sdp_m_line_index_ = ::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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* IceCandidate::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:location.nearby.mediums.IceCandidate) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional string sdp = 1; + if (cached_has_bits & 0x00000001u) { + target = stream->WriteStringMaybeAliased( + 1, this->_internal_sdp(), target); + } + + // optional string sdp_mid = 2; + if (cached_has_bits & 0x00000002u) { + target = stream->WriteStringMaybeAliased( + 2, this->_internal_sdp_mid(), target); + } + + // optional int32 sdp_m_line_index = 3; + if (cached_has_bits & 0x00000004u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(3, this->_internal_sdp_m_line_index(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:location.nearby.mediums.IceCandidate) + return target; +} + +size_t IceCandidate::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:location.nearby.mediums.IceCandidate) + 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 = _has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + // optional string sdp = 1; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_sdp()); + } + + // optional string sdp_mid = 2; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_sdp_mid()); + } + + // optional int32 sdp_m_line_index = 3; + if (cached_has_bits & 0x00000004u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_sdp_m_line_index()); + } + + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void IceCandidate::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void IceCandidate::MergeFrom(const IceCandidate& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:location.nearby.mediums.IceCandidate) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + if (cached_has_bits & 0x00000001u) { + _internal_set_sdp(from._internal_sdp()); + } + if (cached_has_bits & 0x00000002u) { + _internal_set_sdp_mid(from._internal_sdp_mid()); + } + if (cached_has_bits & 0x00000004u) { + sdp_m_line_index_ = from.sdp_m_line_index_; + } + _has_bits_[0] |= cached_has_bits; + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void IceCandidate::CopyFrom(const IceCandidate& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:location.nearby.mediums.IceCandidate) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool IceCandidate::IsInitialized() const { + return true; +} + +void IceCandidate::InternalSwap(IceCandidate* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &sdp_, lhs_arena, + &other->sdp_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &sdp_mid_, lhs_arena, + &other->sdp_mid_, rhs_arena + ); + swap(sdp_m_line_index_, other->sdp_m_line_index_); +} + +std::string IceCandidate::GetTypeName() const { + return "location.nearby.mediums.IceCandidate"; +} + + +// =================================================================== + +class IceCandidates::_Internal { + public: +}; + +IceCandidates::IceCandidates(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned), + ice_candidates_(arena) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:location.nearby.mediums.IceCandidates) +} +IceCandidates::IceCandidates(const IceCandidates& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + ice_candidates_(from.ice_candidates_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + // @@protoc_insertion_point(copy_constructor:location.nearby.mediums.IceCandidates) +} + +inline void IceCandidates::SharedCtor() { +} + +IceCandidates::~IceCandidates() { + // @@protoc_insertion_point(destructor:location.nearby.mediums.IceCandidates) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void IceCandidates::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); +} + +void IceCandidates::ArenaDtor(void* object) { + IceCandidates* _this = reinterpret_cast< IceCandidates* >(object); + (void)_this; +} +void IceCandidates::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void IceCandidates::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void IceCandidates::Clear() { +// @@protoc_insertion_point(message_clear_start:location.nearby.mediums.IceCandidates) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + ice_candidates_.Clear(); + _internal_metadata_.Clear(); +} + +const char* IceCandidates::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // repeated .location.nearby.mediums.IceCandidate ice_candidates = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_ice_candidates(), 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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* IceCandidates::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:location.nearby.mediums.IceCandidates) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // repeated .location.nearby.mediums.IceCandidate ice_candidates = 1; + for (unsigned int i = 0, + n = static_cast(this->_internal_ice_candidates_size()); i < n; i++) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(1, this->_internal_ice_candidates(i), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:location.nearby.mediums.IceCandidates) + return target; +} + +size_t IceCandidates::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:location.nearby.mediums.IceCandidates) + 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 .location.nearby.mediums.IceCandidate ice_candidates = 1; + total_size += 1UL * this->_internal_ice_candidates_size(); + for (const auto& msg : this->ice_candidates_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void IceCandidates::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void IceCandidates::MergeFrom(const IceCandidates& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:location.nearby.mediums.IceCandidates) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + ice_candidates_.MergeFrom(from.ice_candidates_); + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void IceCandidates::CopyFrom(const IceCandidates& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:location.nearby.mediums.IceCandidates) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool IceCandidates::IsInitialized() const { + return true; +} + +void IceCandidates::InternalSwap(IceCandidates* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ice_candidates_.InternalSwap(&other->ice_candidates_); +} + +std::string IceCandidates::GetTypeName() const { + return "location.nearby.mediums.IceCandidates"; +} + + +// =================================================================== + +class Offer::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static const ::location::nearby::mediums::SessionDescription& session_description(const Offer* msg); + static void set_has_session_description(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } +}; + +const ::location::nearby::mediums::SessionDescription& +Offer::_Internal::session_description(const Offer* msg) { + return *msg->session_description_; +} +Offer::Offer(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:location.nearby.mediums.Offer) +} +Offer::Offer(const Offer& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + if (from._internal_has_session_description()) { + session_description_ = new ::location::nearby::mediums::SessionDescription(*from.session_description_); + } else { + session_description_ = nullptr; + } + // @@protoc_insertion_point(copy_constructor:location.nearby.mediums.Offer) +} + +inline void Offer::SharedCtor() { +session_description_ = nullptr; +} + +Offer::~Offer() { + // @@protoc_insertion_point(destructor:location.nearby.mediums.Offer) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void Offer::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + if (this != internal_default_instance()) delete session_description_; +} + +void Offer::ArenaDtor(void* object) { + Offer* _this = reinterpret_cast< Offer* >(object); + (void)_this; +} +void Offer::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void Offer::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void Offer::Clear() { +// @@protoc_insertion_point(message_clear_start:location.nearby.mediums.Offer) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + GOOGLE_DCHECK(session_description_ != nullptr); + session_description_->Clear(); + } + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* Offer::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional .location.nearby.mediums.SessionDescription session_description = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + ptr = ctx->ParseMessage(_internal_mutable_session_description(), 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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* Offer::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:location.nearby.mediums.Offer) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional .location.nearby.mediums.SessionDescription session_description = 1; + if (cached_has_bits & 0x00000001u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 1, _Internal::session_description(this), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:location.nearby.mediums.Offer) + return target; +} + +size_t Offer::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:location.nearby.mediums.Offer) + 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 .location.nearby.mediums.SessionDescription session_description = 1; + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *session_description_); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void Offer::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void Offer::MergeFrom(const Offer& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:location.nearby.mediums.Offer) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_has_session_description()) { + _internal_mutable_session_description()->::location::nearby::mediums::SessionDescription::MergeFrom(from._internal_session_description()); + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void Offer::CopyFrom(const Offer& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:location.nearby.mediums.Offer) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Offer::IsInitialized() const { + return true; +} + +void Offer::InternalSwap(Offer* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + swap(session_description_, other->session_description_); +} + +std::string Offer::GetTypeName() const { + return "location.nearby.mediums.Offer"; +} + + +// =================================================================== + +class Answer::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static const ::location::nearby::mediums::SessionDescription& session_description(const Answer* msg); + static void set_has_session_description(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } +}; + +const ::location::nearby::mediums::SessionDescription& +Answer::_Internal::session_description(const Answer* msg) { + return *msg->session_description_; +} +Answer::Answer(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:location.nearby.mediums.Answer) +} +Answer::Answer(const Answer& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + if (from._internal_has_session_description()) { + session_description_ = new ::location::nearby::mediums::SessionDescription(*from.session_description_); + } else { + session_description_ = nullptr; + } + // @@protoc_insertion_point(copy_constructor:location.nearby.mediums.Answer) +} + +inline void Answer::SharedCtor() { +session_description_ = nullptr; +} + +Answer::~Answer() { + // @@protoc_insertion_point(destructor:location.nearby.mediums.Answer) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void Answer::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + if (this != internal_default_instance()) delete session_description_; +} + +void Answer::ArenaDtor(void* object) { + Answer* _this = reinterpret_cast< Answer* >(object); + (void)_this; +} +void Answer::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void Answer::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void Answer::Clear() { +// @@protoc_insertion_point(message_clear_start:location.nearby.mediums.Answer) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + GOOGLE_DCHECK(session_description_ != nullptr); + session_description_->Clear(); + } + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* Answer::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional .location.nearby.mediums.SessionDescription session_description = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + ptr = ctx->ParseMessage(_internal_mutable_session_description(), 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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* Answer::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:location.nearby.mediums.Answer) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional .location.nearby.mediums.SessionDescription session_description = 1; + if (cached_has_bits & 0x00000001u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 1, _Internal::session_description(this), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:location.nearby.mediums.Answer) + return target; +} + +size_t Answer::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:location.nearby.mediums.Answer) + 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 .location.nearby.mediums.SessionDescription session_description = 1; + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *session_description_); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void Answer::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void Answer::MergeFrom(const Answer& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:location.nearby.mediums.Answer) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_has_session_description()) { + _internal_mutable_session_description()->::location::nearby::mediums::SessionDescription::MergeFrom(from._internal_session_description()); + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void Answer::CopyFrom(const Answer& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:location.nearby.mediums.Answer) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Answer::IsInitialized() const { + return true; +} + +void Answer::InternalSwap(Answer* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + swap(session_description_, other->session_description_); +} + +std::string Answer::GetTypeName() const { + return "location.nearby.mediums.Answer"; +} + + +// =================================================================== + +class ReadyForSignalingPoke::_Internal { + public: +}; + +ReadyForSignalingPoke::ReadyForSignalingPoke(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:location.nearby.mediums.ReadyForSignalingPoke) +} +ReadyForSignalingPoke::ReadyForSignalingPoke(const ReadyForSignalingPoke& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite() { + _internal_metadata_.MergeFrom(from._internal_metadata_); + // @@protoc_insertion_point(copy_constructor:location.nearby.mediums.ReadyForSignalingPoke) +} + +inline void ReadyForSignalingPoke::SharedCtor() { +} + +ReadyForSignalingPoke::~ReadyForSignalingPoke() { + // @@protoc_insertion_point(destructor:location.nearby.mediums.ReadyForSignalingPoke) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void ReadyForSignalingPoke::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); +} + +void ReadyForSignalingPoke::ArenaDtor(void* object) { + ReadyForSignalingPoke* _this = reinterpret_cast< ReadyForSignalingPoke* >(object); + (void)_this; +} +void ReadyForSignalingPoke::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void ReadyForSignalingPoke::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void ReadyForSignalingPoke::Clear() { +// @@protoc_insertion_point(message_clear_start:location.nearby.mediums.ReadyForSignalingPoke) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _internal_metadata_.Clear(); +} + +const char* ReadyForSignalingPoke::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* ReadyForSignalingPoke::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:location.nearby.mediums.ReadyForSignalingPoke) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:location.nearby.mediums.ReadyForSignalingPoke) + return target; +} + +size_t ReadyForSignalingPoke::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:location.nearby.mediums.ReadyForSignalingPoke) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void ReadyForSignalingPoke::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void ReadyForSignalingPoke::MergeFrom(const ReadyForSignalingPoke& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:location.nearby.mediums.ReadyForSignalingPoke) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void ReadyForSignalingPoke::CopyFrom(const ReadyForSignalingPoke& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:location.nearby.mediums.ReadyForSignalingPoke) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ReadyForSignalingPoke::IsInitialized() const { + return true; +} + +void ReadyForSignalingPoke::InternalSwap(ReadyForSignalingPoke* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); +} + +std::string ReadyForSignalingPoke::GetTypeName() const { + return "location.nearby.mediums.ReadyForSignalingPoke"; +} + + +// @@protoc_insertion_point(namespace_scope) +} // namespace mediums +} // namespace nearby +} // namespace location +PROTOBUF_NAMESPACE_OPEN +template<> PROTOBUF_NOINLINE ::location::nearby::mediums::WebRtcSignalingFrame* Arena::CreateMaybeMessage< ::location::nearby::mediums::WebRtcSignalingFrame >(Arena* arena) { + return Arena::CreateMessageInternal< ::location::nearby::mediums::WebRtcSignalingFrame >(arena); +} +template<> PROTOBUF_NOINLINE ::location::nearby::mediums::PeerId* Arena::CreateMaybeMessage< ::location::nearby::mediums::PeerId >(Arena* arena) { + return Arena::CreateMessageInternal< ::location::nearby::mediums::PeerId >(arena); +} +template<> PROTOBUF_NOINLINE ::location::nearby::mediums::SessionDescription* Arena::CreateMaybeMessage< ::location::nearby::mediums::SessionDescription >(Arena* arena) { + return Arena::CreateMessageInternal< ::location::nearby::mediums::SessionDescription >(arena); +} +template<> PROTOBUF_NOINLINE ::location::nearby::mediums::IceCandidate* Arena::CreateMaybeMessage< ::location::nearby::mediums::IceCandidate >(Arena* arena) { + return Arena::CreateMessageInternal< ::location::nearby::mediums::IceCandidate >(arena); +} +template<> PROTOBUF_NOINLINE ::location::nearby::mediums::IceCandidates* Arena::CreateMaybeMessage< ::location::nearby::mediums::IceCandidates >(Arena* arena) { + return Arena::CreateMessageInternal< ::location::nearby::mediums::IceCandidates >(arena); +} +template<> PROTOBUF_NOINLINE ::location::nearby::mediums::Offer* Arena::CreateMaybeMessage< ::location::nearby::mediums::Offer >(Arena* arena) { + return Arena::CreateMessageInternal< ::location::nearby::mediums::Offer >(arena); +} +template<> PROTOBUF_NOINLINE ::location::nearby::mediums::Answer* Arena::CreateMaybeMessage< ::location::nearby::mediums::Answer >(Arena* arena) { + return Arena::CreateMessageInternal< ::location::nearby::mediums::Answer >(arena); +} +template<> PROTOBUF_NOINLINE ::location::nearby::mediums::ReadyForSignalingPoke* Arena::CreateMaybeMessage< ::location::nearby::mediums::ReadyForSignalingPoke >(Arena* arena) { + return Arena::CreateMessageInternal< ::location::nearby::mediums::ReadyForSignalingPoke >(arena); +} +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) +#include diff --git a/proto/mediums/web_rtc_signaling_frames.pb.h b/proto/mediums/web_rtc_signaling_frames.pb.h new file mode 100644 index 00000000..5111a8f8 --- /dev/null +++ b/proto/mediums/web_rtc_signaling_frames.pb.h @@ -0,0 +1,2477 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: proto/mediums/web_rtc_signaling_frames.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_proto_2fmediums_2fweb_5frtc_5fsignaling_5fframes_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_proto_2fmediums_2fweb_5frtc_5fsignaling_5fframes_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3019000 +#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 3019004 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_proto_2fmediums_2fweb_5frtc_5fsignaling_5fframes_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_proto_2fmediums_2fweb_5frtc_5fsignaling_5fframes_2eproto { + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::AuxiliaryParseTableField aux[] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[8] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[]; + static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[]; + static const uint32_t offsets[]; +}; +namespace location { +namespace nearby { +namespace mediums { +class Answer; +struct AnswerDefaultTypeInternal; +extern AnswerDefaultTypeInternal _Answer_default_instance_; +class IceCandidate; +struct IceCandidateDefaultTypeInternal; +extern IceCandidateDefaultTypeInternal _IceCandidate_default_instance_; +class IceCandidates; +struct IceCandidatesDefaultTypeInternal; +extern IceCandidatesDefaultTypeInternal _IceCandidates_default_instance_; +class Offer; +struct OfferDefaultTypeInternal; +extern OfferDefaultTypeInternal _Offer_default_instance_; +class PeerId; +struct PeerIdDefaultTypeInternal; +extern PeerIdDefaultTypeInternal _PeerId_default_instance_; +class ReadyForSignalingPoke; +struct ReadyForSignalingPokeDefaultTypeInternal; +extern ReadyForSignalingPokeDefaultTypeInternal _ReadyForSignalingPoke_default_instance_; +class SessionDescription; +struct SessionDescriptionDefaultTypeInternal; +extern SessionDescriptionDefaultTypeInternal _SessionDescription_default_instance_; +class WebRtcSignalingFrame; +struct WebRtcSignalingFrameDefaultTypeInternal; +extern WebRtcSignalingFrameDefaultTypeInternal _WebRtcSignalingFrame_default_instance_; +} // namespace mediums +} // namespace nearby +} // namespace location +PROTOBUF_NAMESPACE_OPEN +template<> ::location::nearby::mediums::Answer* Arena::CreateMaybeMessage<::location::nearby::mediums::Answer>(Arena*); +template<> ::location::nearby::mediums::IceCandidate* Arena::CreateMaybeMessage<::location::nearby::mediums::IceCandidate>(Arena*); +template<> ::location::nearby::mediums::IceCandidates* Arena::CreateMaybeMessage<::location::nearby::mediums::IceCandidates>(Arena*); +template<> ::location::nearby::mediums::Offer* Arena::CreateMaybeMessage<::location::nearby::mediums::Offer>(Arena*); +template<> ::location::nearby::mediums::PeerId* Arena::CreateMaybeMessage<::location::nearby::mediums::PeerId>(Arena*); +template<> ::location::nearby::mediums::ReadyForSignalingPoke* Arena::CreateMaybeMessage<::location::nearby::mediums::ReadyForSignalingPoke>(Arena*); +template<> ::location::nearby::mediums::SessionDescription* Arena::CreateMaybeMessage<::location::nearby::mediums::SessionDescription>(Arena*); +template<> ::location::nearby::mediums::WebRtcSignalingFrame* Arena::CreateMaybeMessage<::location::nearby::mediums::WebRtcSignalingFrame>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace location { +namespace nearby { +namespace mediums { + +enum WebRtcSignalingFrame_FrameType : int { + WebRtcSignalingFrame_FrameType_UNKNOWN_FRAME_TYPE = 0, + WebRtcSignalingFrame_FrameType_OFFER_TYPE = 1, + WebRtcSignalingFrame_FrameType_ANSWER_TYPE = 2, + WebRtcSignalingFrame_FrameType_ICE_CANDIDATES_TYPE = 3, + WebRtcSignalingFrame_FrameType_READY_FOR_SIGNALING_POKE_TYPE = 4 +}; +bool WebRtcSignalingFrame_FrameType_IsValid(int value); +constexpr WebRtcSignalingFrame_FrameType WebRtcSignalingFrame_FrameType_FrameType_MIN = WebRtcSignalingFrame_FrameType_UNKNOWN_FRAME_TYPE; +constexpr WebRtcSignalingFrame_FrameType WebRtcSignalingFrame_FrameType_FrameType_MAX = WebRtcSignalingFrame_FrameType_READY_FOR_SIGNALING_POKE_TYPE; +constexpr int WebRtcSignalingFrame_FrameType_FrameType_ARRAYSIZE = WebRtcSignalingFrame_FrameType_FrameType_MAX + 1; + +const std::string& WebRtcSignalingFrame_FrameType_Name(WebRtcSignalingFrame_FrameType value); +template +inline const std::string& WebRtcSignalingFrame_FrameType_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function WebRtcSignalingFrame_FrameType_Name."); + return WebRtcSignalingFrame_FrameType_Name(static_cast(enum_t_value)); +} +bool WebRtcSignalingFrame_FrameType_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, WebRtcSignalingFrame_FrameType* value); +// =================================================================== + +class WebRtcSignalingFrame final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:location.nearby.mediums.WebRtcSignalingFrame) */ { + public: + inline WebRtcSignalingFrame() : WebRtcSignalingFrame(nullptr) {} + ~WebRtcSignalingFrame() override; + explicit constexpr WebRtcSignalingFrame(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + WebRtcSignalingFrame(const WebRtcSignalingFrame& from); + WebRtcSignalingFrame(WebRtcSignalingFrame&& from) noexcept + : WebRtcSignalingFrame() { + *this = ::std::move(from); + } + + inline WebRtcSignalingFrame& operator=(const WebRtcSignalingFrame& from) { + CopyFrom(from); + return *this; + } + inline WebRtcSignalingFrame& operator=(WebRtcSignalingFrame&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const WebRtcSignalingFrame& default_instance() { + return *internal_default_instance(); + } + enum FrameCase { + kOffer = 3, + kAnswer = 4, + kIceCandidates = 5, + kReadyForSignalingPoke = 6, + FRAME_NOT_SET = 0, + }; + + static inline const WebRtcSignalingFrame* internal_default_instance() { + return reinterpret_cast( + &_WebRtcSignalingFrame_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(WebRtcSignalingFrame& a, WebRtcSignalingFrame& b) { + a.Swap(&b); + } + inline void Swap(WebRtcSignalingFrame* 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(WebRtcSignalingFrame* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + WebRtcSignalingFrame* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const WebRtcSignalingFrame& from); + void MergeFrom(const WebRtcSignalingFrame& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(WebRtcSignalingFrame* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "location.nearby.mediums.WebRtcSignalingFrame"; + } + protected: + explicit WebRtcSignalingFrame(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + typedef WebRtcSignalingFrame_FrameType FrameType; + static constexpr FrameType UNKNOWN_FRAME_TYPE = + WebRtcSignalingFrame_FrameType_UNKNOWN_FRAME_TYPE; + static constexpr FrameType OFFER_TYPE = + WebRtcSignalingFrame_FrameType_OFFER_TYPE; + static constexpr FrameType ANSWER_TYPE = + WebRtcSignalingFrame_FrameType_ANSWER_TYPE; + static constexpr FrameType ICE_CANDIDATES_TYPE = + WebRtcSignalingFrame_FrameType_ICE_CANDIDATES_TYPE; + static constexpr FrameType READY_FOR_SIGNALING_POKE_TYPE = + WebRtcSignalingFrame_FrameType_READY_FOR_SIGNALING_POKE_TYPE; + static inline bool FrameType_IsValid(int value) { + return WebRtcSignalingFrame_FrameType_IsValid(value); + } + static constexpr FrameType FrameType_MIN = + WebRtcSignalingFrame_FrameType_FrameType_MIN; + static constexpr FrameType FrameType_MAX = + WebRtcSignalingFrame_FrameType_FrameType_MAX; + static constexpr int FrameType_ARRAYSIZE = + WebRtcSignalingFrame_FrameType_FrameType_ARRAYSIZE; + template + static inline const std::string& FrameType_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function FrameType_Name."); + return WebRtcSignalingFrame_FrameType_Name(enum_t_value); + } + static inline bool FrameType_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name, + FrameType* value) { + return WebRtcSignalingFrame_FrameType_Parse(name, value); + } + + // accessors ------------------------------------------------------- + + enum : int { + kSenderIdFieldNumber = 1, + kTypeFieldNumber = 2, + kOfferFieldNumber = 3, + kAnswerFieldNumber = 4, + kIceCandidatesFieldNumber = 5, + kReadyForSignalingPokeFieldNumber = 6, + }; + // optional .location.nearby.mediums.PeerId sender_id = 1; + bool has_sender_id() const; + private: + bool _internal_has_sender_id() const; + public: + void clear_sender_id(); + const ::location::nearby::mediums::PeerId& sender_id() const; + PROTOBUF_NODISCARD ::location::nearby::mediums::PeerId* release_sender_id(); + ::location::nearby::mediums::PeerId* mutable_sender_id(); + void set_allocated_sender_id(::location::nearby::mediums::PeerId* sender_id); + private: + const ::location::nearby::mediums::PeerId& _internal_sender_id() const; + ::location::nearby::mediums::PeerId* _internal_mutable_sender_id(); + public: + void unsafe_arena_set_allocated_sender_id( + ::location::nearby::mediums::PeerId* sender_id); + ::location::nearby::mediums::PeerId* unsafe_arena_release_sender_id(); + + // optional .location.nearby.mediums.WebRtcSignalingFrame.FrameType type = 2; + bool has_type() const; + private: + bool _internal_has_type() const; + public: + void clear_type(); + ::location::nearby::mediums::WebRtcSignalingFrame_FrameType type() const; + void set_type(::location::nearby::mediums::WebRtcSignalingFrame_FrameType value); + private: + ::location::nearby::mediums::WebRtcSignalingFrame_FrameType _internal_type() const; + void _internal_set_type(::location::nearby::mediums::WebRtcSignalingFrame_FrameType value); + public: + + // .location.nearby.mediums.Offer offer = 3; + bool has_offer() const; + private: + bool _internal_has_offer() const; + public: + void clear_offer(); + const ::location::nearby::mediums::Offer& offer() const; + PROTOBUF_NODISCARD ::location::nearby::mediums::Offer* release_offer(); + ::location::nearby::mediums::Offer* mutable_offer(); + void set_allocated_offer(::location::nearby::mediums::Offer* offer); + private: + const ::location::nearby::mediums::Offer& _internal_offer() const; + ::location::nearby::mediums::Offer* _internal_mutable_offer(); + public: + void unsafe_arena_set_allocated_offer( + ::location::nearby::mediums::Offer* offer); + ::location::nearby::mediums::Offer* unsafe_arena_release_offer(); + + // .location.nearby.mediums.Answer answer = 4; + bool has_answer() const; + private: + bool _internal_has_answer() const; + public: + void clear_answer(); + const ::location::nearby::mediums::Answer& answer() const; + PROTOBUF_NODISCARD ::location::nearby::mediums::Answer* release_answer(); + ::location::nearby::mediums::Answer* mutable_answer(); + void set_allocated_answer(::location::nearby::mediums::Answer* answer); + private: + const ::location::nearby::mediums::Answer& _internal_answer() const; + ::location::nearby::mediums::Answer* _internal_mutable_answer(); + public: + void unsafe_arena_set_allocated_answer( + ::location::nearby::mediums::Answer* answer); + ::location::nearby::mediums::Answer* unsafe_arena_release_answer(); + + // .location.nearby.mediums.IceCandidates ice_candidates = 5; + bool has_ice_candidates() const; + private: + bool _internal_has_ice_candidates() const; + public: + void clear_ice_candidates(); + const ::location::nearby::mediums::IceCandidates& ice_candidates() const; + PROTOBUF_NODISCARD ::location::nearby::mediums::IceCandidates* release_ice_candidates(); + ::location::nearby::mediums::IceCandidates* mutable_ice_candidates(); + void set_allocated_ice_candidates(::location::nearby::mediums::IceCandidates* ice_candidates); + private: + const ::location::nearby::mediums::IceCandidates& _internal_ice_candidates() const; + ::location::nearby::mediums::IceCandidates* _internal_mutable_ice_candidates(); + public: + void unsafe_arena_set_allocated_ice_candidates( + ::location::nearby::mediums::IceCandidates* ice_candidates); + ::location::nearby::mediums::IceCandidates* unsafe_arena_release_ice_candidates(); + + // .location.nearby.mediums.ReadyForSignalingPoke ready_for_signaling_poke = 6; + bool has_ready_for_signaling_poke() const; + private: + bool _internal_has_ready_for_signaling_poke() const; + public: + void clear_ready_for_signaling_poke(); + const ::location::nearby::mediums::ReadyForSignalingPoke& ready_for_signaling_poke() const; + PROTOBUF_NODISCARD ::location::nearby::mediums::ReadyForSignalingPoke* release_ready_for_signaling_poke(); + ::location::nearby::mediums::ReadyForSignalingPoke* mutable_ready_for_signaling_poke(); + void set_allocated_ready_for_signaling_poke(::location::nearby::mediums::ReadyForSignalingPoke* ready_for_signaling_poke); + private: + const ::location::nearby::mediums::ReadyForSignalingPoke& _internal_ready_for_signaling_poke() const; + ::location::nearby::mediums::ReadyForSignalingPoke* _internal_mutable_ready_for_signaling_poke(); + public: + void unsafe_arena_set_allocated_ready_for_signaling_poke( + ::location::nearby::mediums::ReadyForSignalingPoke* ready_for_signaling_poke); + ::location::nearby::mediums::ReadyForSignalingPoke* unsafe_arena_release_ready_for_signaling_poke(); + + void clear_Frame(); + FrameCase Frame_case() const; + // @@protoc_insertion_point(class_scope:location.nearby.mediums.WebRtcSignalingFrame) + private: + class _Internal; + void set_has_offer(); + void set_has_answer(); + void set_has_ice_candidates(); + void set_has_ready_for_signaling_poke(); + + inline bool has_Frame() const; + inline void clear_has_Frame(); + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::location::nearby::mediums::PeerId* sender_id_; + int type_; + union FrameUnion { + constexpr FrameUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + ::location::nearby::mediums::Offer* offer_; + ::location::nearby::mediums::Answer* answer_; + ::location::nearby::mediums::IceCandidates* ice_candidates_; + ::location::nearby::mediums::ReadyForSignalingPoke* ready_for_signaling_poke_; + } Frame_; + uint32_t _oneof_case_[1]; + + friend struct ::TableStruct_proto_2fmediums_2fweb_5frtc_5fsignaling_5fframes_2eproto; +}; +// ------------------------------------------------------------------- + +class PeerId final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:location.nearby.mediums.PeerId) */ { + public: + inline PeerId() : PeerId(nullptr) {} + ~PeerId() override; + explicit constexpr PeerId(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + PeerId(const PeerId& from); + PeerId(PeerId&& from) noexcept + : PeerId() { + *this = ::std::move(from); + } + + inline PeerId& operator=(const PeerId& from) { + CopyFrom(from); + return *this; + } + inline PeerId& operator=(PeerId&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const PeerId& default_instance() { + return *internal_default_instance(); + } + static inline const PeerId* internal_default_instance() { + return reinterpret_cast( + &_PeerId_default_instance_); + } + static constexpr int kIndexInFileMessages = + 1; + + friend void swap(PeerId& a, PeerId& b) { + a.Swap(&b); + } + inline void Swap(PeerId* 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(PeerId* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + PeerId* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const PeerId& from); + void MergeFrom(const PeerId& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(PeerId* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "location.nearby.mediums.PeerId"; + } + protected: + explicit PeerId(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kIdFieldNumber = 1, + }; + // optional string id = 1; + bool has_id() const; + private: + bool _internal_has_id() const; + public: + void clear_id(); + const std::string& id() const; + template + void set_id(ArgT0&& arg0, ArgT... args); + std::string* mutable_id(); + PROTOBUF_NODISCARD std::string* release_id(); + void set_allocated_id(std::string* id); + private: + const std::string& _internal_id() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_id(const std::string& value); + std::string* _internal_mutable_id(); + public: + + // @@protoc_insertion_point(class_scope:location.nearby.mediums.PeerId) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr id_; + friend struct ::TableStruct_proto_2fmediums_2fweb_5frtc_5fsignaling_5fframes_2eproto; +}; +// ------------------------------------------------------------------- + +class SessionDescription final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:location.nearby.mediums.SessionDescription) */ { + public: + inline SessionDescription() : SessionDescription(nullptr) {} + ~SessionDescription() override; + explicit constexpr SessionDescription(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + SessionDescription(const SessionDescription& from); + SessionDescription(SessionDescription&& from) noexcept + : SessionDescription() { + *this = ::std::move(from); + } + + inline SessionDescription& operator=(const SessionDescription& from) { + CopyFrom(from); + return *this; + } + inline SessionDescription& operator=(SessionDescription&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const SessionDescription& default_instance() { + return *internal_default_instance(); + } + static inline const SessionDescription* internal_default_instance() { + return reinterpret_cast( + &_SessionDescription_default_instance_); + } + static constexpr int kIndexInFileMessages = + 2; + + friend void swap(SessionDescription& a, SessionDescription& b) { + a.Swap(&b); + } + inline void Swap(SessionDescription* 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(SessionDescription* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + SessionDescription* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const SessionDescription& from); + void MergeFrom(const SessionDescription& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(SessionDescription* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "location.nearby.mediums.SessionDescription"; + } + protected: + explicit SessionDescription(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kDescriptionFieldNumber = 1, + }; + // optional string description = 1; + bool has_description() const; + private: + bool _internal_has_description() const; + public: + void clear_description(); + const std::string& description() const; + template + void set_description(ArgT0&& arg0, ArgT... args); + std::string* mutable_description(); + PROTOBUF_NODISCARD std::string* release_description(); + void set_allocated_description(std::string* description); + private: + const std::string& _internal_description() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_description(const std::string& value); + std::string* _internal_mutable_description(); + public: + + // @@protoc_insertion_point(class_scope:location.nearby.mediums.SessionDescription) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr description_; + friend struct ::TableStruct_proto_2fmediums_2fweb_5frtc_5fsignaling_5fframes_2eproto; +}; +// ------------------------------------------------------------------- + +class IceCandidate final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:location.nearby.mediums.IceCandidate) */ { + public: + inline IceCandidate() : IceCandidate(nullptr) {} + ~IceCandidate() override; + explicit constexpr IceCandidate(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + IceCandidate(const IceCandidate& from); + IceCandidate(IceCandidate&& from) noexcept + : IceCandidate() { + *this = ::std::move(from); + } + + inline IceCandidate& operator=(const IceCandidate& from) { + CopyFrom(from); + return *this; + } + inline IceCandidate& operator=(IceCandidate&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const IceCandidate& default_instance() { + return *internal_default_instance(); + } + static inline const IceCandidate* internal_default_instance() { + return reinterpret_cast( + &_IceCandidate_default_instance_); + } + static constexpr int kIndexInFileMessages = + 3; + + friend void swap(IceCandidate& a, IceCandidate& b) { + a.Swap(&b); + } + inline void Swap(IceCandidate* 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(IceCandidate* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + IceCandidate* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const IceCandidate& from); + void MergeFrom(const IceCandidate& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(IceCandidate* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "location.nearby.mediums.IceCandidate"; + } + protected: + explicit IceCandidate(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kSdpFieldNumber = 1, + kSdpMidFieldNumber = 2, + kSdpMLineIndexFieldNumber = 3, + }; + // optional string sdp = 1; + bool has_sdp() const; + private: + bool _internal_has_sdp() const; + public: + void clear_sdp(); + const std::string& sdp() const; + template + void set_sdp(ArgT0&& arg0, ArgT... args); + std::string* mutable_sdp(); + PROTOBUF_NODISCARD std::string* release_sdp(); + void set_allocated_sdp(std::string* sdp); + private: + const std::string& _internal_sdp() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_sdp(const std::string& value); + std::string* _internal_mutable_sdp(); + public: + + // optional string sdp_mid = 2; + bool has_sdp_mid() const; + private: + bool _internal_has_sdp_mid() const; + public: + void clear_sdp_mid(); + const std::string& sdp_mid() const; + template + void set_sdp_mid(ArgT0&& arg0, ArgT... args); + std::string* mutable_sdp_mid(); + PROTOBUF_NODISCARD std::string* release_sdp_mid(); + void set_allocated_sdp_mid(std::string* sdp_mid); + private: + const std::string& _internal_sdp_mid() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_sdp_mid(const std::string& value); + std::string* _internal_mutable_sdp_mid(); + public: + + // optional int32 sdp_m_line_index = 3; + bool has_sdp_m_line_index() const; + private: + bool _internal_has_sdp_m_line_index() const; + public: + void clear_sdp_m_line_index(); + int32_t sdp_m_line_index() const; + void set_sdp_m_line_index(int32_t value); + private: + int32_t _internal_sdp_m_line_index() const; + void _internal_set_sdp_m_line_index(int32_t value); + public: + + // @@protoc_insertion_point(class_scope:location.nearby.mediums.IceCandidate) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr sdp_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr sdp_mid_; + int32_t sdp_m_line_index_; + friend struct ::TableStruct_proto_2fmediums_2fweb_5frtc_5fsignaling_5fframes_2eproto; +}; +// ------------------------------------------------------------------- + +class IceCandidates final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:location.nearby.mediums.IceCandidates) */ { + public: + inline IceCandidates() : IceCandidates(nullptr) {} + ~IceCandidates() override; + explicit constexpr IceCandidates(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + IceCandidates(const IceCandidates& from); + IceCandidates(IceCandidates&& from) noexcept + : IceCandidates() { + *this = ::std::move(from); + } + + inline IceCandidates& operator=(const IceCandidates& from) { + CopyFrom(from); + return *this; + } + inline IceCandidates& operator=(IceCandidates&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const IceCandidates& default_instance() { + return *internal_default_instance(); + } + static inline const IceCandidates* internal_default_instance() { + return reinterpret_cast( + &_IceCandidates_default_instance_); + } + static constexpr int kIndexInFileMessages = + 4; + + friend void swap(IceCandidates& a, IceCandidates& b) { + a.Swap(&b); + } + inline void Swap(IceCandidates* 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(IceCandidates* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + IceCandidates* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const IceCandidates& from); + void MergeFrom(const IceCandidates& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(IceCandidates* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "location.nearby.mediums.IceCandidates"; + } + protected: + explicit IceCandidates(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kIceCandidatesFieldNumber = 1, + }; + // repeated .location.nearby.mediums.IceCandidate ice_candidates = 1; + int ice_candidates_size() const; + private: + int _internal_ice_candidates_size() const; + public: + void clear_ice_candidates(); + ::location::nearby::mediums::IceCandidate* mutable_ice_candidates(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::location::nearby::mediums::IceCandidate >* + mutable_ice_candidates(); + private: + const ::location::nearby::mediums::IceCandidate& _internal_ice_candidates(int index) const; + ::location::nearby::mediums::IceCandidate* _internal_add_ice_candidates(); + public: + const ::location::nearby::mediums::IceCandidate& ice_candidates(int index) const; + ::location::nearby::mediums::IceCandidate* add_ice_candidates(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::location::nearby::mediums::IceCandidate >& + ice_candidates() const; + + // @@protoc_insertion_point(class_scope:location.nearby.mediums.IceCandidates) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::location::nearby::mediums::IceCandidate > ice_candidates_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_proto_2fmediums_2fweb_5frtc_5fsignaling_5fframes_2eproto; +}; +// ------------------------------------------------------------------- + +class Offer final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:location.nearby.mediums.Offer) */ { + public: + inline Offer() : Offer(nullptr) {} + ~Offer() override; + explicit constexpr Offer(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + Offer(const Offer& from); + Offer(Offer&& from) noexcept + : Offer() { + *this = ::std::move(from); + } + + inline Offer& operator=(const Offer& from) { + CopyFrom(from); + return *this; + } + inline Offer& operator=(Offer&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const Offer& default_instance() { + return *internal_default_instance(); + } + static inline const Offer* internal_default_instance() { + return reinterpret_cast( + &_Offer_default_instance_); + } + static constexpr int kIndexInFileMessages = + 5; + + friend void swap(Offer& a, Offer& b) { + a.Swap(&b); + } + inline void Swap(Offer* 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(Offer* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + Offer* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const Offer& from); + void MergeFrom(const Offer& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(Offer* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "location.nearby.mediums.Offer"; + } + protected: + explicit Offer(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kSessionDescriptionFieldNumber = 1, + }; + // optional .location.nearby.mediums.SessionDescription session_description = 1; + bool has_session_description() const; + private: + bool _internal_has_session_description() const; + public: + void clear_session_description(); + const ::location::nearby::mediums::SessionDescription& session_description() const; + PROTOBUF_NODISCARD ::location::nearby::mediums::SessionDescription* release_session_description(); + ::location::nearby::mediums::SessionDescription* mutable_session_description(); + void set_allocated_session_description(::location::nearby::mediums::SessionDescription* session_description); + private: + const ::location::nearby::mediums::SessionDescription& _internal_session_description() const; + ::location::nearby::mediums::SessionDescription* _internal_mutable_session_description(); + public: + void unsafe_arena_set_allocated_session_description( + ::location::nearby::mediums::SessionDescription* session_description); + ::location::nearby::mediums::SessionDescription* unsafe_arena_release_session_description(); + + // @@protoc_insertion_point(class_scope:location.nearby.mediums.Offer) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::location::nearby::mediums::SessionDescription* session_description_; + friend struct ::TableStruct_proto_2fmediums_2fweb_5frtc_5fsignaling_5fframes_2eproto; +}; +// ------------------------------------------------------------------- + +class Answer final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:location.nearby.mediums.Answer) */ { + public: + inline Answer() : Answer(nullptr) {} + ~Answer() override; + explicit constexpr Answer(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + Answer(const Answer& from); + Answer(Answer&& from) noexcept + : Answer() { + *this = ::std::move(from); + } + + inline Answer& operator=(const Answer& from) { + CopyFrom(from); + return *this; + } + inline Answer& operator=(Answer&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const Answer& default_instance() { + return *internal_default_instance(); + } + static inline const Answer* internal_default_instance() { + return reinterpret_cast( + &_Answer_default_instance_); + } + static constexpr int kIndexInFileMessages = + 6; + + friend void swap(Answer& a, Answer& b) { + a.Swap(&b); + } + inline void Swap(Answer* 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(Answer* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + Answer* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const Answer& from); + void MergeFrom(const Answer& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(Answer* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "location.nearby.mediums.Answer"; + } + protected: + explicit Answer(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kSessionDescriptionFieldNumber = 1, + }; + // optional .location.nearby.mediums.SessionDescription session_description = 1; + bool has_session_description() const; + private: + bool _internal_has_session_description() const; + public: + void clear_session_description(); + const ::location::nearby::mediums::SessionDescription& session_description() const; + PROTOBUF_NODISCARD ::location::nearby::mediums::SessionDescription* release_session_description(); + ::location::nearby::mediums::SessionDescription* mutable_session_description(); + void set_allocated_session_description(::location::nearby::mediums::SessionDescription* session_description); + private: + const ::location::nearby::mediums::SessionDescription& _internal_session_description() const; + ::location::nearby::mediums::SessionDescription* _internal_mutable_session_description(); + public: + void unsafe_arena_set_allocated_session_description( + ::location::nearby::mediums::SessionDescription* session_description); + ::location::nearby::mediums::SessionDescription* unsafe_arena_release_session_description(); + + // @@protoc_insertion_point(class_scope:location.nearby.mediums.Answer) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::location::nearby::mediums::SessionDescription* session_description_; + friend struct ::TableStruct_proto_2fmediums_2fweb_5frtc_5fsignaling_5fframes_2eproto; +}; +// ------------------------------------------------------------------- + +class ReadyForSignalingPoke final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:location.nearby.mediums.ReadyForSignalingPoke) */ { + public: + inline ReadyForSignalingPoke() : ReadyForSignalingPoke(nullptr) {} + ~ReadyForSignalingPoke() override; + explicit constexpr ReadyForSignalingPoke(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ReadyForSignalingPoke(const ReadyForSignalingPoke& from); + ReadyForSignalingPoke(ReadyForSignalingPoke&& from) noexcept + : ReadyForSignalingPoke() { + *this = ::std::move(from); + } + + inline ReadyForSignalingPoke& operator=(const ReadyForSignalingPoke& from) { + CopyFrom(from); + return *this; + } + inline ReadyForSignalingPoke& operator=(ReadyForSignalingPoke&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const ReadyForSignalingPoke& default_instance() { + return *internal_default_instance(); + } + static inline const ReadyForSignalingPoke* internal_default_instance() { + return reinterpret_cast( + &_ReadyForSignalingPoke_default_instance_); + } + static constexpr int kIndexInFileMessages = + 7; + + friend void swap(ReadyForSignalingPoke& a, ReadyForSignalingPoke& b) { + a.Swap(&b); + } + inline void Swap(ReadyForSignalingPoke* 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(ReadyForSignalingPoke* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ReadyForSignalingPoke* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const ReadyForSignalingPoke& from); + void MergeFrom(const ReadyForSignalingPoke& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(ReadyForSignalingPoke* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "location.nearby.mediums.ReadyForSignalingPoke"; + } + protected: + explicit ReadyForSignalingPoke(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // @@protoc_insertion_point(class_scope:location.nearby.mediums.ReadyForSignalingPoke) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_proto_2fmediums_2fweb_5frtc_5fsignaling_5fframes_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// WebRtcSignalingFrame + +// optional .location.nearby.mediums.PeerId sender_id = 1; +inline bool WebRtcSignalingFrame::_internal_has_sender_id() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + PROTOBUF_ASSUME(!value || sender_id_ != nullptr); + return value; +} +inline bool WebRtcSignalingFrame::has_sender_id() const { + return _internal_has_sender_id(); +} +inline void WebRtcSignalingFrame::clear_sender_id() { + if (sender_id_ != nullptr) sender_id_->Clear(); + _has_bits_[0] &= ~0x00000001u; +} +inline const ::location::nearby::mediums::PeerId& WebRtcSignalingFrame::_internal_sender_id() const { + const ::location::nearby::mediums::PeerId* p = sender_id_; + return p != nullptr ? *p : reinterpret_cast( + ::location::nearby::mediums::_PeerId_default_instance_); +} +inline const ::location::nearby::mediums::PeerId& WebRtcSignalingFrame::sender_id() const { + // @@protoc_insertion_point(field_get:location.nearby.mediums.WebRtcSignalingFrame.sender_id) + return _internal_sender_id(); +} +inline void WebRtcSignalingFrame::unsafe_arena_set_allocated_sender_id( + ::location::nearby::mediums::PeerId* sender_id) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(sender_id_); + } + sender_id_ = sender_id; + if (sender_id) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:location.nearby.mediums.WebRtcSignalingFrame.sender_id) +} +inline ::location::nearby::mediums::PeerId* WebRtcSignalingFrame::release_sender_id() { + _has_bits_[0] &= ~0x00000001u; + ::location::nearby::mediums::PeerId* temp = sender_id_; + sender_id_ = 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 ::location::nearby::mediums::PeerId* WebRtcSignalingFrame::unsafe_arena_release_sender_id() { + // @@protoc_insertion_point(field_release:location.nearby.mediums.WebRtcSignalingFrame.sender_id) + _has_bits_[0] &= ~0x00000001u; + ::location::nearby::mediums::PeerId* temp = sender_id_; + sender_id_ = nullptr; + return temp; +} +inline ::location::nearby::mediums::PeerId* WebRtcSignalingFrame::_internal_mutable_sender_id() { + _has_bits_[0] |= 0x00000001u; + if (sender_id_ == nullptr) { + auto* p = CreateMaybeMessage<::location::nearby::mediums::PeerId>(GetArenaForAllocation()); + sender_id_ = p; + } + return sender_id_; +} +inline ::location::nearby::mediums::PeerId* WebRtcSignalingFrame::mutable_sender_id() { + ::location::nearby::mediums::PeerId* _msg = _internal_mutable_sender_id(); + // @@protoc_insertion_point(field_mutable:location.nearby.mediums.WebRtcSignalingFrame.sender_id) + return _msg; +} +inline void WebRtcSignalingFrame::set_allocated_sender_id(::location::nearby::mediums::PeerId* sender_id) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete sender_id_; + } + if (sender_id) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::location::nearby::mediums::PeerId>::GetOwningArena(sender_id); + if (message_arena != submessage_arena) { + sender_id = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, sender_id, submessage_arena); + } + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + sender_id_ = sender_id; + // @@protoc_insertion_point(field_set_allocated:location.nearby.mediums.WebRtcSignalingFrame.sender_id) +} + +// optional .location.nearby.mediums.WebRtcSignalingFrame.FrameType type = 2; +inline bool WebRtcSignalingFrame::_internal_has_type() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool WebRtcSignalingFrame::has_type() const { + return _internal_has_type(); +} +inline void WebRtcSignalingFrame::clear_type() { + type_ = 0; + _has_bits_[0] &= ~0x00000002u; +} +inline ::location::nearby::mediums::WebRtcSignalingFrame_FrameType WebRtcSignalingFrame::_internal_type() const { + return static_cast< ::location::nearby::mediums::WebRtcSignalingFrame_FrameType >(type_); +} +inline ::location::nearby::mediums::WebRtcSignalingFrame_FrameType WebRtcSignalingFrame::type() const { + // @@protoc_insertion_point(field_get:location.nearby.mediums.WebRtcSignalingFrame.type) + return _internal_type(); +} +inline void WebRtcSignalingFrame::_internal_set_type(::location::nearby::mediums::WebRtcSignalingFrame_FrameType value) { + assert(::location::nearby::mediums::WebRtcSignalingFrame_FrameType_IsValid(value)); + _has_bits_[0] |= 0x00000002u; + type_ = value; +} +inline void WebRtcSignalingFrame::set_type(::location::nearby::mediums::WebRtcSignalingFrame_FrameType value) { + _internal_set_type(value); + // @@protoc_insertion_point(field_set:location.nearby.mediums.WebRtcSignalingFrame.type) +} + +// .location.nearby.mediums.Offer offer = 3; +inline bool WebRtcSignalingFrame::_internal_has_offer() const { + return Frame_case() == kOffer; +} +inline bool WebRtcSignalingFrame::has_offer() const { + return _internal_has_offer(); +} +inline void WebRtcSignalingFrame::set_has_offer() { + _oneof_case_[0] = kOffer; +} +inline void WebRtcSignalingFrame::clear_offer() { + if (_internal_has_offer()) { + if (GetArenaForAllocation() == nullptr) { + delete Frame_.offer_; + } + clear_has_Frame(); + } +} +inline ::location::nearby::mediums::Offer* WebRtcSignalingFrame::release_offer() { + // @@protoc_insertion_point(field_release:location.nearby.mediums.WebRtcSignalingFrame.offer) + if (_internal_has_offer()) { + clear_has_Frame(); + ::location::nearby::mediums::Offer* temp = Frame_.offer_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + Frame_.offer_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::location::nearby::mediums::Offer& WebRtcSignalingFrame::_internal_offer() const { + return _internal_has_offer() + ? *Frame_.offer_ + : reinterpret_cast< ::location::nearby::mediums::Offer&>(::location::nearby::mediums::_Offer_default_instance_); +} +inline const ::location::nearby::mediums::Offer& WebRtcSignalingFrame::offer() const { + // @@protoc_insertion_point(field_get:location.nearby.mediums.WebRtcSignalingFrame.offer) + return _internal_offer(); +} +inline ::location::nearby::mediums::Offer* WebRtcSignalingFrame::unsafe_arena_release_offer() { + // @@protoc_insertion_point(field_unsafe_arena_release:location.nearby.mediums.WebRtcSignalingFrame.offer) + if (_internal_has_offer()) { + clear_has_Frame(); + ::location::nearby::mediums::Offer* temp = Frame_.offer_; + Frame_.offer_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void WebRtcSignalingFrame::unsafe_arena_set_allocated_offer(::location::nearby::mediums::Offer* offer) { + clear_Frame(); + if (offer) { + set_has_offer(); + Frame_.offer_ = offer; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:location.nearby.mediums.WebRtcSignalingFrame.offer) +} +inline ::location::nearby::mediums::Offer* WebRtcSignalingFrame::_internal_mutable_offer() { + if (!_internal_has_offer()) { + clear_Frame(); + set_has_offer(); + Frame_.offer_ = CreateMaybeMessage< ::location::nearby::mediums::Offer >(GetArenaForAllocation()); + } + return Frame_.offer_; +} +inline ::location::nearby::mediums::Offer* WebRtcSignalingFrame::mutable_offer() { + ::location::nearby::mediums::Offer* _msg = _internal_mutable_offer(); + // @@protoc_insertion_point(field_mutable:location.nearby.mediums.WebRtcSignalingFrame.offer) + return _msg; +} + +// .location.nearby.mediums.Answer answer = 4; +inline bool WebRtcSignalingFrame::_internal_has_answer() const { + return Frame_case() == kAnswer; +} +inline bool WebRtcSignalingFrame::has_answer() const { + return _internal_has_answer(); +} +inline void WebRtcSignalingFrame::set_has_answer() { + _oneof_case_[0] = kAnswer; +} +inline void WebRtcSignalingFrame::clear_answer() { + if (_internal_has_answer()) { + if (GetArenaForAllocation() == nullptr) { + delete Frame_.answer_; + } + clear_has_Frame(); + } +} +inline ::location::nearby::mediums::Answer* WebRtcSignalingFrame::release_answer() { + // @@protoc_insertion_point(field_release:location.nearby.mediums.WebRtcSignalingFrame.answer) + if (_internal_has_answer()) { + clear_has_Frame(); + ::location::nearby::mediums::Answer* temp = Frame_.answer_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + Frame_.answer_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::location::nearby::mediums::Answer& WebRtcSignalingFrame::_internal_answer() const { + return _internal_has_answer() + ? *Frame_.answer_ + : reinterpret_cast< ::location::nearby::mediums::Answer&>(::location::nearby::mediums::_Answer_default_instance_); +} +inline const ::location::nearby::mediums::Answer& WebRtcSignalingFrame::answer() const { + // @@protoc_insertion_point(field_get:location.nearby.mediums.WebRtcSignalingFrame.answer) + return _internal_answer(); +} +inline ::location::nearby::mediums::Answer* WebRtcSignalingFrame::unsafe_arena_release_answer() { + // @@protoc_insertion_point(field_unsafe_arena_release:location.nearby.mediums.WebRtcSignalingFrame.answer) + if (_internal_has_answer()) { + clear_has_Frame(); + ::location::nearby::mediums::Answer* temp = Frame_.answer_; + Frame_.answer_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void WebRtcSignalingFrame::unsafe_arena_set_allocated_answer(::location::nearby::mediums::Answer* answer) { + clear_Frame(); + if (answer) { + set_has_answer(); + Frame_.answer_ = answer; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:location.nearby.mediums.WebRtcSignalingFrame.answer) +} +inline ::location::nearby::mediums::Answer* WebRtcSignalingFrame::_internal_mutable_answer() { + if (!_internal_has_answer()) { + clear_Frame(); + set_has_answer(); + Frame_.answer_ = CreateMaybeMessage< ::location::nearby::mediums::Answer >(GetArenaForAllocation()); + } + return Frame_.answer_; +} +inline ::location::nearby::mediums::Answer* WebRtcSignalingFrame::mutable_answer() { + ::location::nearby::mediums::Answer* _msg = _internal_mutable_answer(); + // @@protoc_insertion_point(field_mutable:location.nearby.mediums.WebRtcSignalingFrame.answer) + return _msg; +} + +// .location.nearby.mediums.IceCandidates ice_candidates = 5; +inline bool WebRtcSignalingFrame::_internal_has_ice_candidates() const { + return Frame_case() == kIceCandidates; +} +inline bool WebRtcSignalingFrame::has_ice_candidates() const { + return _internal_has_ice_candidates(); +} +inline void WebRtcSignalingFrame::set_has_ice_candidates() { + _oneof_case_[0] = kIceCandidates; +} +inline void WebRtcSignalingFrame::clear_ice_candidates() { + if (_internal_has_ice_candidates()) { + if (GetArenaForAllocation() == nullptr) { + delete Frame_.ice_candidates_; + } + clear_has_Frame(); + } +} +inline ::location::nearby::mediums::IceCandidates* WebRtcSignalingFrame::release_ice_candidates() { + // @@protoc_insertion_point(field_release:location.nearby.mediums.WebRtcSignalingFrame.ice_candidates) + if (_internal_has_ice_candidates()) { + clear_has_Frame(); + ::location::nearby::mediums::IceCandidates* temp = Frame_.ice_candidates_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + Frame_.ice_candidates_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::location::nearby::mediums::IceCandidates& WebRtcSignalingFrame::_internal_ice_candidates() const { + return _internal_has_ice_candidates() + ? *Frame_.ice_candidates_ + : reinterpret_cast< ::location::nearby::mediums::IceCandidates&>(::location::nearby::mediums::_IceCandidates_default_instance_); +} +inline const ::location::nearby::mediums::IceCandidates& WebRtcSignalingFrame::ice_candidates() const { + // @@protoc_insertion_point(field_get:location.nearby.mediums.WebRtcSignalingFrame.ice_candidates) + return _internal_ice_candidates(); +} +inline ::location::nearby::mediums::IceCandidates* WebRtcSignalingFrame::unsafe_arena_release_ice_candidates() { + // @@protoc_insertion_point(field_unsafe_arena_release:location.nearby.mediums.WebRtcSignalingFrame.ice_candidates) + if (_internal_has_ice_candidates()) { + clear_has_Frame(); + ::location::nearby::mediums::IceCandidates* temp = Frame_.ice_candidates_; + Frame_.ice_candidates_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void WebRtcSignalingFrame::unsafe_arena_set_allocated_ice_candidates(::location::nearby::mediums::IceCandidates* ice_candidates) { + clear_Frame(); + if (ice_candidates) { + set_has_ice_candidates(); + Frame_.ice_candidates_ = ice_candidates; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:location.nearby.mediums.WebRtcSignalingFrame.ice_candidates) +} +inline ::location::nearby::mediums::IceCandidates* WebRtcSignalingFrame::_internal_mutable_ice_candidates() { + if (!_internal_has_ice_candidates()) { + clear_Frame(); + set_has_ice_candidates(); + Frame_.ice_candidates_ = CreateMaybeMessage< ::location::nearby::mediums::IceCandidates >(GetArenaForAllocation()); + } + return Frame_.ice_candidates_; +} +inline ::location::nearby::mediums::IceCandidates* WebRtcSignalingFrame::mutable_ice_candidates() { + ::location::nearby::mediums::IceCandidates* _msg = _internal_mutable_ice_candidates(); + // @@protoc_insertion_point(field_mutable:location.nearby.mediums.WebRtcSignalingFrame.ice_candidates) + return _msg; +} + +// .location.nearby.mediums.ReadyForSignalingPoke ready_for_signaling_poke = 6; +inline bool WebRtcSignalingFrame::_internal_has_ready_for_signaling_poke() const { + return Frame_case() == kReadyForSignalingPoke; +} +inline bool WebRtcSignalingFrame::has_ready_for_signaling_poke() const { + return _internal_has_ready_for_signaling_poke(); +} +inline void WebRtcSignalingFrame::set_has_ready_for_signaling_poke() { + _oneof_case_[0] = kReadyForSignalingPoke; +} +inline void WebRtcSignalingFrame::clear_ready_for_signaling_poke() { + if (_internal_has_ready_for_signaling_poke()) { + if (GetArenaForAllocation() == nullptr) { + delete Frame_.ready_for_signaling_poke_; + } + clear_has_Frame(); + } +} +inline ::location::nearby::mediums::ReadyForSignalingPoke* WebRtcSignalingFrame::release_ready_for_signaling_poke() { + // @@protoc_insertion_point(field_release:location.nearby.mediums.WebRtcSignalingFrame.ready_for_signaling_poke) + if (_internal_has_ready_for_signaling_poke()) { + clear_has_Frame(); + ::location::nearby::mediums::ReadyForSignalingPoke* temp = Frame_.ready_for_signaling_poke_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + Frame_.ready_for_signaling_poke_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::location::nearby::mediums::ReadyForSignalingPoke& WebRtcSignalingFrame::_internal_ready_for_signaling_poke() const { + return _internal_has_ready_for_signaling_poke() + ? *Frame_.ready_for_signaling_poke_ + : reinterpret_cast< ::location::nearby::mediums::ReadyForSignalingPoke&>(::location::nearby::mediums::_ReadyForSignalingPoke_default_instance_); +} +inline const ::location::nearby::mediums::ReadyForSignalingPoke& WebRtcSignalingFrame::ready_for_signaling_poke() const { + // @@protoc_insertion_point(field_get:location.nearby.mediums.WebRtcSignalingFrame.ready_for_signaling_poke) + return _internal_ready_for_signaling_poke(); +} +inline ::location::nearby::mediums::ReadyForSignalingPoke* WebRtcSignalingFrame::unsafe_arena_release_ready_for_signaling_poke() { + // @@protoc_insertion_point(field_unsafe_arena_release:location.nearby.mediums.WebRtcSignalingFrame.ready_for_signaling_poke) + if (_internal_has_ready_for_signaling_poke()) { + clear_has_Frame(); + ::location::nearby::mediums::ReadyForSignalingPoke* temp = Frame_.ready_for_signaling_poke_; + Frame_.ready_for_signaling_poke_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void WebRtcSignalingFrame::unsafe_arena_set_allocated_ready_for_signaling_poke(::location::nearby::mediums::ReadyForSignalingPoke* ready_for_signaling_poke) { + clear_Frame(); + if (ready_for_signaling_poke) { + set_has_ready_for_signaling_poke(); + Frame_.ready_for_signaling_poke_ = ready_for_signaling_poke; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:location.nearby.mediums.WebRtcSignalingFrame.ready_for_signaling_poke) +} +inline ::location::nearby::mediums::ReadyForSignalingPoke* WebRtcSignalingFrame::_internal_mutable_ready_for_signaling_poke() { + if (!_internal_has_ready_for_signaling_poke()) { + clear_Frame(); + set_has_ready_for_signaling_poke(); + Frame_.ready_for_signaling_poke_ = CreateMaybeMessage< ::location::nearby::mediums::ReadyForSignalingPoke >(GetArenaForAllocation()); + } + return Frame_.ready_for_signaling_poke_; +} +inline ::location::nearby::mediums::ReadyForSignalingPoke* WebRtcSignalingFrame::mutable_ready_for_signaling_poke() { + ::location::nearby::mediums::ReadyForSignalingPoke* _msg = _internal_mutable_ready_for_signaling_poke(); + // @@protoc_insertion_point(field_mutable:location.nearby.mediums.WebRtcSignalingFrame.ready_for_signaling_poke) + return _msg; +} + +inline bool WebRtcSignalingFrame::has_Frame() const { + return Frame_case() != FRAME_NOT_SET; +} +inline void WebRtcSignalingFrame::clear_has_Frame() { + _oneof_case_[0] = FRAME_NOT_SET; +} +inline WebRtcSignalingFrame::FrameCase WebRtcSignalingFrame::Frame_case() const { + return WebRtcSignalingFrame::FrameCase(_oneof_case_[0]); +} +// ------------------------------------------------------------------- + +// PeerId + +// optional string id = 1; +inline bool PeerId::_internal_has_id() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool PeerId::has_id() const { + return _internal_has_id(); +} +inline void PeerId::clear_id() { + id_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& PeerId::id() const { + // @@protoc_insertion_point(field_get:location.nearby.mediums.PeerId.id) + return _internal_id(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void PeerId::set_id(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:location.nearby.mediums.PeerId.id) +} +inline std::string* PeerId::mutable_id() { + std::string* _s = _internal_mutable_id(); + // @@protoc_insertion_point(field_mutable:location.nearby.mediums.PeerId.id) + return _s; +} +inline const std::string& PeerId::_internal_id() const { + return id_.Get(); +} +inline void PeerId::_internal_set_id(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* PeerId::_internal_mutable_id() { + _has_bits_[0] |= 0x00000001u; + return id_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* PeerId::release_id() { + // @@protoc_insertion_point(field_release:location.nearby.mediums.PeerId.id) + if (!_internal_has_id()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = id_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (id_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void PeerId::set_allocated_id(std::string* id) { + if (id != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + id_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), id, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (id_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:location.nearby.mediums.PeerId.id) +} + +// ------------------------------------------------------------------- + +// SessionDescription + +// optional string description = 1; +inline bool SessionDescription::_internal_has_description() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool SessionDescription::has_description() const { + return _internal_has_description(); +} +inline void SessionDescription::clear_description() { + description_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& SessionDescription::description() const { + // @@protoc_insertion_point(field_get:location.nearby.mediums.SessionDescription.description) + return _internal_description(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void SessionDescription::set_description(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + description_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:location.nearby.mediums.SessionDescription.description) +} +inline std::string* SessionDescription::mutable_description() { + std::string* _s = _internal_mutable_description(); + // @@protoc_insertion_point(field_mutable:location.nearby.mediums.SessionDescription.description) + return _s; +} +inline const std::string& SessionDescription::_internal_description() const { + return description_.Get(); +} +inline void SessionDescription::_internal_set_description(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + description_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* SessionDescription::_internal_mutable_description() { + _has_bits_[0] |= 0x00000001u; + return description_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* SessionDescription::release_description() { + // @@protoc_insertion_point(field_release:location.nearby.mediums.SessionDescription.description) + if (!_internal_has_description()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = description_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (description_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + description_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void SessionDescription::set_allocated_description(std::string* description) { + if (description != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + description_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), description, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (description_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + description_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:location.nearby.mediums.SessionDescription.description) +} + +// ------------------------------------------------------------------- + +// IceCandidate + +// optional string sdp = 1; +inline bool IceCandidate::_internal_has_sdp() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool IceCandidate::has_sdp() const { + return _internal_has_sdp(); +} +inline void IceCandidate::clear_sdp() { + sdp_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& IceCandidate::sdp() const { + // @@protoc_insertion_point(field_get:location.nearby.mediums.IceCandidate.sdp) + return _internal_sdp(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void IceCandidate::set_sdp(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + sdp_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:location.nearby.mediums.IceCandidate.sdp) +} +inline std::string* IceCandidate::mutable_sdp() { + std::string* _s = _internal_mutable_sdp(); + // @@protoc_insertion_point(field_mutable:location.nearby.mediums.IceCandidate.sdp) + return _s; +} +inline const std::string& IceCandidate::_internal_sdp() const { + return sdp_.Get(); +} +inline void IceCandidate::_internal_set_sdp(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + sdp_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* IceCandidate::_internal_mutable_sdp() { + _has_bits_[0] |= 0x00000001u; + return sdp_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* IceCandidate::release_sdp() { + // @@protoc_insertion_point(field_release:location.nearby.mediums.IceCandidate.sdp) + if (!_internal_has_sdp()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = sdp_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (sdp_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + sdp_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void IceCandidate::set_allocated_sdp(std::string* sdp) { + if (sdp != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + sdp_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), sdp, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (sdp_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + sdp_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:location.nearby.mediums.IceCandidate.sdp) +} + +// optional string sdp_mid = 2; +inline bool IceCandidate::_internal_has_sdp_mid() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool IceCandidate::has_sdp_mid() const { + return _internal_has_sdp_mid(); +} +inline void IceCandidate::clear_sdp_mid() { + sdp_mid_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000002u; +} +inline const std::string& IceCandidate::sdp_mid() const { + // @@protoc_insertion_point(field_get:location.nearby.mediums.IceCandidate.sdp_mid) + return _internal_sdp_mid(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void IceCandidate::set_sdp_mid(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000002u; + sdp_mid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:location.nearby.mediums.IceCandidate.sdp_mid) +} +inline std::string* IceCandidate::mutable_sdp_mid() { + std::string* _s = _internal_mutable_sdp_mid(); + // @@protoc_insertion_point(field_mutable:location.nearby.mediums.IceCandidate.sdp_mid) + return _s; +} +inline const std::string& IceCandidate::_internal_sdp_mid() const { + return sdp_mid_.Get(); +} +inline void IceCandidate::_internal_set_sdp_mid(const std::string& value) { + _has_bits_[0] |= 0x00000002u; + sdp_mid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* IceCandidate::_internal_mutable_sdp_mid() { + _has_bits_[0] |= 0x00000002u; + return sdp_mid_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* IceCandidate::release_sdp_mid() { + // @@protoc_insertion_point(field_release:location.nearby.mediums.IceCandidate.sdp_mid) + if (!_internal_has_sdp_mid()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000002u; + auto* p = sdp_mid_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (sdp_mid_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + sdp_mid_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void IceCandidate::set_allocated_sdp_mid(std::string* sdp_mid) { + if (sdp_mid != nullptr) { + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + sdp_mid_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), sdp_mid, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (sdp_mid_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + sdp_mid_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:location.nearby.mediums.IceCandidate.sdp_mid) +} + +// optional int32 sdp_m_line_index = 3; +inline bool IceCandidate::_internal_has_sdp_m_line_index() const { + bool value = (_has_bits_[0] & 0x00000004u) != 0; + return value; +} +inline bool IceCandidate::has_sdp_m_line_index() const { + return _internal_has_sdp_m_line_index(); +} +inline void IceCandidate::clear_sdp_m_line_index() { + sdp_m_line_index_ = 0; + _has_bits_[0] &= ~0x00000004u; +} +inline int32_t IceCandidate::_internal_sdp_m_line_index() const { + return sdp_m_line_index_; +} +inline int32_t IceCandidate::sdp_m_line_index() const { + // @@protoc_insertion_point(field_get:location.nearby.mediums.IceCandidate.sdp_m_line_index) + return _internal_sdp_m_line_index(); +} +inline void IceCandidate::_internal_set_sdp_m_line_index(int32_t value) { + _has_bits_[0] |= 0x00000004u; + sdp_m_line_index_ = value; +} +inline void IceCandidate::set_sdp_m_line_index(int32_t value) { + _internal_set_sdp_m_line_index(value); + // @@protoc_insertion_point(field_set:location.nearby.mediums.IceCandidate.sdp_m_line_index) +} + +// ------------------------------------------------------------------- + +// IceCandidates + +// repeated .location.nearby.mediums.IceCandidate ice_candidates = 1; +inline int IceCandidates::_internal_ice_candidates_size() const { + return ice_candidates_.size(); +} +inline int IceCandidates::ice_candidates_size() const { + return _internal_ice_candidates_size(); +} +inline void IceCandidates::clear_ice_candidates() { + ice_candidates_.Clear(); +} +inline ::location::nearby::mediums::IceCandidate* IceCandidates::mutable_ice_candidates(int index) { + // @@protoc_insertion_point(field_mutable:location.nearby.mediums.IceCandidates.ice_candidates) + return ice_candidates_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::location::nearby::mediums::IceCandidate >* +IceCandidates::mutable_ice_candidates() { + // @@protoc_insertion_point(field_mutable_list:location.nearby.mediums.IceCandidates.ice_candidates) + return &ice_candidates_; +} +inline const ::location::nearby::mediums::IceCandidate& IceCandidates::_internal_ice_candidates(int index) const { + return ice_candidates_.Get(index); +} +inline const ::location::nearby::mediums::IceCandidate& IceCandidates::ice_candidates(int index) const { + // @@protoc_insertion_point(field_get:location.nearby.mediums.IceCandidates.ice_candidates) + return _internal_ice_candidates(index); +} +inline ::location::nearby::mediums::IceCandidate* IceCandidates::_internal_add_ice_candidates() { + return ice_candidates_.Add(); +} +inline ::location::nearby::mediums::IceCandidate* IceCandidates::add_ice_candidates() { + ::location::nearby::mediums::IceCandidate* _add = _internal_add_ice_candidates(); + // @@protoc_insertion_point(field_add:location.nearby.mediums.IceCandidates.ice_candidates) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::location::nearby::mediums::IceCandidate >& +IceCandidates::ice_candidates() const { + // @@protoc_insertion_point(field_list:location.nearby.mediums.IceCandidates.ice_candidates) + return ice_candidates_; +} + +// ------------------------------------------------------------------- + +// Offer + +// optional .location.nearby.mediums.SessionDescription session_description = 1; +inline bool Offer::_internal_has_session_description() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + PROTOBUF_ASSUME(!value || session_description_ != nullptr); + return value; +} +inline bool Offer::has_session_description() const { + return _internal_has_session_description(); +} +inline void Offer::clear_session_description() { + if (session_description_ != nullptr) session_description_->Clear(); + _has_bits_[0] &= ~0x00000001u; +} +inline const ::location::nearby::mediums::SessionDescription& Offer::_internal_session_description() const { + const ::location::nearby::mediums::SessionDescription* p = session_description_; + return p != nullptr ? *p : reinterpret_cast( + ::location::nearby::mediums::_SessionDescription_default_instance_); +} +inline const ::location::nearby::mediums::SessionDescription& Offer::session_description() const { + // @@protoc_insertion_point(field_get:location.nearby.mediums.Offer.session_description) + return _internal_session_description(); +} +inline void Offer::unsafe_arena_set_allocated_session_description( + ::location::nearby::mediums::SessionDescription* session_description) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(session_description_); + } + session_description_ = session_description; + if (session_description) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:location.nearby.mediums.Offer.session_description) +} +inline ::location::nearby::mediums::SessionDescription* Offer::release_session_description() { + _has_bits_[0] &= ~0x00000001u; + ::location::nearby::mediums::SessionDescription* temp = session_description_; + session_description_ = 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 ::location::nearby::mediums::SessionDescription* Offer::unsafe_arena_release_session_description() { + // @@protoc_insertion_point(field_release:location.nearby.mediums.Offer.session_description) + _has_bits_[0] &= ~0x00000001u; + ::location::nearby::mediums::SessionDescription* temp = session_description_; + session_description_ = nullptr; + return temp; +} +inline ::location::nearby::mediums::SessionDescription* Offer::_internal_mutable_session_description() { + _has_bits_[0] |= 0x00000001u; + if (session_description_ == nullptr) { + auto* p = CreateMaybeMessage<::location::nearby::mediums::SessionDescription>(GetArenaForAllocation()); + session_description_ = p; + } + return session_description_; +} +inline ::location::nearby::mediums::SessionDescription* Offer::mutable_session_description() { + ::location::nearby::mediums::SessionDescription* _msg = _internal_mutable_session_description(); + // @@protoc_insertion_point(field_mutable:location.nearby.mediums.Offer.session_description) + return _msg; +} +inline void Offer::set_allocated_session_description(::location::nearby::mediums::SessionDescription* session_description) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete session_description_; + } + if (session_description) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::location::nearby::mediums::SessionDescription>::GetOwningArena(session_description); + if (message_arena != submessage_arena) { + session_description = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, session_description, submessage_arena); + } + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + session_description_ = session_description; + // @@protoc_insertion_point(field_set_allocated:location.nearby.mediums.Offer.session_description) +} + +// ------------------------------------------------------------------- + +// Answer + +// optional .location.nearby.mediums.SessionDescription session_description = 1; +inline bool Answer::_internal_has_session_description() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + PROTOBUF_ASSUME(!value || session_description_ != nullptr); + return value; +} +inline bool Answer::has_session_description() const { + return _internal_has_session_description(); +} +inline void Answer::clear_session_description() { + if (session_description_ != nullptr) session_description_->Clear(); + _has_bits_[0] &= ~0x00000001u; +} +inline const ::location::nearby::mediums::SessionDescription& Answer::_internal_session_description() const { + const ::location::nearby::mediums::SessionDescription* p = session_description_; + return p != nullptr ? *p : reinterpret_cast( + ::location::nearby::mediums::_SessionDescription_default_instance_); +} +inline const ::location::nearby::mediums::SessionDescription& Answer::session_description() const { + // @@protoc_insertion_point(field_get:location.nearby.mediums.Answer.session_description) + return _internal_session_description(); +} +inline void Answer::unsafe_arena_set_allocated_session_description( + ::location::nearby::mediums::SessionDescription* session_description) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(session_description_); + } + session_description_ = session_description; + if (session_description) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:location.nearby.mediums.Answer.session_description) +} +inline ::location::nearby::mediums::SessionDescription* Answer::release_session_description() { + _has_bits_[0] &= ~0x00000001u; + ::location::nearby::mediums::SessionDescription* temp = session_description_; + session_description_ = 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 ::location::nearby::mediums::SessionDescription* Answer::unsafe_arena_release_session_description() { + // @@protoc_insertion_point(field_release:location.nearby.mediums.Answer.session_description) + _has_bits_[0] &= ~0x00000001u; + ::location::nearby::mediums::SessionDescription* temp = session_description_; + session_description_ = nullptr; + return temp; +} +inline ::location::nearby::mediums::SessionDescription* Answer::_internal_mutable_session_description() { + _has_bits_[0] |= 0x00000001u; + if (session_description_ == nullptr) { + auto* p = CreateMaybeMessage<::location::nearby::mediums::SessionDescription>(GetArenaForAllocation()); + session_description_ = p; + } + return session_description_; +} +inline ::location::nearby::mediums::SessionDescription* Answer::mutable_session_description() { + ::location::nearby::mediums::SessionDescription* _msg = _internal_mutable_session_description(); + // @@protoc_insertion_point(field_mutable:location.nearby.mediums.Answer.session_description) + return _msg; +} +inline void Answer::set_allocated_session_description(::location::nearby::mediums::SessionDescription* session_description) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete session_description_; + } + if (session_description) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::location::nearby::mediums::SessionDescription>::GetOwningArena(session_description); + if (message_arena != submessage_arena) { + session_description = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, session_description, submessage_arena); + } + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + session_description_ = session_description; + // @@protoc_insertion_point(field_set_allocated:location.nearby.mediums.Answer.session_description) +} + +// ------------------------------------------------------------------- + +// ReadyForSignalingPoke + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace mediums +} // namespace nearby +} // namespace location + +PROTOBUF_NAMESPACE_OPEN + +template <> struct is_proto_enum< ::location::nearby::mediums::WebRtcSignalingFrame_FrameType> : ::std::true_type {}; + +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_proto_2fmediums_2fweb_5frtc_5fsignaling_5fframes_2eproto diff --git a/proto/sharing_enums.pb.cc b/proto/sharing_enums.pb.cc new file mode 100644 index 00000000..1bd3caf6 --- /dev/null +++ b/proto/sharing_enums.pb.cc @@ -0,0 +1,1875 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: proto/sharing_enums.proto + +#include "proto/sharing_enums.pb.h" + +#include + +#include +#include +#include +// @@protoc_insertion_point(includes) +#include + +PROTOBUF_PRAGMA_INIT_SEG +namespace location { +namespace nearby { +namespace proto { +namespace sharing { +} // namespace sharing +} // namespace proto +} // namespace nearby +} // namespace location +namespace location { +namespace nearby { +namespace proto { +namespace sharing { +bool EventType_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 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + case 19: + case 20: + case 21: + case 22: + case 23: + case 24: + case 25: + case 26: + case 27: + case 28: + case 29: + case 30: + case 31: + case 32: + case 33: + case 34: + case 35: + case 36: + case 37: + case 38: + case 39: + case 40: + case 41: + case 42: + case 43: + case 44: + case 45: + case 46: + case 47: + case 48: + case 49: + return true; + default: + return false; + } +} + +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed EventType_strings[50] = {}; + +static const char EventType_names[] = + "ACCEPT_AGREEMENTS" + "ACCEPT_FAST_INITIALIZATION" + "ADD_CONTACT" + "ADD_QUICK_SETTINGS_TILE" + "ADVERTISE_DEVICE_PRESENCE_END" + "ADVERTISE_DEVICE_PRESENCE_START" + "CANCEL_CONNECTION" + "CANCEL_RECEIVING_ATTACHMENTS" + "CANCEL_SENDING_ATTACHMENTS" + "DECLINE_AGREEMENTS" + "DESCRIBE_ATTACHMENTS" + "DEVICE_SETTINGS" + "DISCOVER_SHARE_TARGET" + "DISMISS_FAST_INITIALIZATION" + "DISMISS_PRIVACY_NOTIFICATION" + "ENABLE_NEARBY_SHARING" + "ESTABLISH_CONNECTION" + "FAST_SHARE_SERVER_RESPONSE" + "INSTALL_APK" + "LAUNCH_ACTIVITY" + "LAUNCH_CONSENT" + "LAUNCH_PHONE_CONSENT" + "LAUNCH_SETUP_ACTIVITY" + "OPEN_RECEIVED_ATTACHMENTS" + "PROCESS_RECEIVED_ATTACHMENTS_END" + "RECEIVE_ATTACHMENTS_END" + "RECEIVE_ATTACHMENTS_START" + "RECEIVE_FAST_INITIALIZATION" + "RECEIVE_INTRODUCTION" + "REMOVE_CONTACT" + "REMOVE_QUICK_SETTINGS_TILE" + "REQUEST_SETTING_PERMISSIONS" + "RESPOND_TO_INTRODUCTION" + "SCAN_FOR_SHARE_TARGETS_END" + "SCAN_FOR_SHARE_TARGETS_START" + "SEND_ATTACHMENTS_END" + "SEND_ATTACHMENTS_START" + "SEND_FAST_INITIALIZATION" + "SEND_INTRODUCTION" + "SEND_START" + "SET_DATA_USAGE" + "SET_DEVICE_NAME" + "SET_VISIBILITY" + "TAP_FEEDBACK" + "TAP_HELP" + "TAP_PRIVACY_NOTIFICATION" + "TAP_QUICK_SETTINGS_TILE" + "TOGGLE_SHOW_NOTIFICATION" + "UNKNOWN_EVENT_TYPE" + "VERIFY_APK"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry EventType_entries[] = { + { {EventType_names + 0, 17}, 1 }, + { {EventType_names + 17, 26}, 27 }, + { {EventType_names + 43, 11}, 23 }, + { {EventType_names + 54, 23}, 36 }, + { {EventType_names + 77, 29}, 8 }, + { {EventType_names + 106, 31}, 7 }, + { {EventType_names + 137, 17}, 30 }, + { {EventType_names + 154, 28}, 20 }, + { {EventType_names + 182, 26}, 19 }, + { {EventType_names + 208, 18}, 46 }, + { {EventType_names + 226, 20}, 4 }, + { {EventType_names + 246, 15}, 49 }, + { {EventType_names + 261, 21}, 11 }, + { {EventType_names + 282, 27}, 29 }, + { {EventType_names + 309, 28}, 32 }, + { {EventType_names + 337, 21}, 2 }, + { {EventType_names + 358, 20}, 48 }, + { {EventType_names + 378, 26}, 25 }, + { {EventType_names + 404, 11}, 40 }, + { {EventType_names + 415, 15}, 31 }, + { {EventType_names + 430, 14}, 42 }, + { {EventType_names + 444, 20}, 38 }, + { {EventType_names + 464, 21}, 22 }, + { {EventType_names + 485, 25}, 21 }, + { {EventType_names + 510, 32}, 43 }, + { {EventType_names + 542, 23}, 18 }, + { {EventType_names + 565, 25}, 17 }, + { {EventType_names + 590, 27}, 10 }, + { {EventType_names + 617, 20}, 13 }, + { {EventType_names + 637, 14}, 24 }, + { {EventType_names + 651, 26}, 37 }, + { {EventType_names + 677, 27}, 47 }, + { {EventType_names + 704, 23}, 14 }, + { {EventType_names + 727, 26}, 6 }, + { {EventType_names + 753, 28}, 5 }, + { {EventType_names + 781, 20}, 16 }, + { {EventType_names + 801, 22}, 15 }, + { {EventType_names + 823, 24}, 9 }, + { {EventType_names + 847, 17}, 12 }, + { {EventType_names + 864, 10}, 26 }, + { {EventType_names + 874, 14}, 28 }, + { {EventType_names + 888, 15}, 45 }, + { {EventType_names + 903, 14}, 3 }, + { {EventType_names + 917, 12}, 35 }, + { {EventType_names + 929, 8}, 34 }, + { {EventType_names + 937, 24}, 33 }, + { {EventType_names + 961, 23}, 39 }, + { {EventType_names + 984, 24}, 44 }, + { {EventType_names + 1008, 18}, 0 }, + { {EventType_names + 1026, 10}, 41 }, +}; + +static const int EventType_entries_by_number[] = { + 48, // 0 -> UNKNOWN_EVENT_TYPE + 0, // 1 -> ACCEPT_AGREEMENTS + 15, // 2 -> ENABLE_NEARBY_SHARING + 42, // 3 -> SET_VISIBILITY + 10, // 4 -> DESCRIBE_ATTACHMENTS + 34, // 5 -> SCAN_FOR_SHARE_TARGETS_START + 33, // 6 -> SCAN_FOR_SHARE_TARGETS_END + 5, // 7 -> ADVERTISE_DEVICE_PRESENCE_START + 4, // 8 -> ADVERTISE_DEVICE_PRESENCE_END + 37, // 9 -> SEND_FAST_INITIALIZATION + 27, // 10 -> RECEIVE_FAST_INITIALIZATION + 12, // 11 -> DISCOVER_SHARE_TARGET + 38, // 12 -> SEND_INTRODUCTION + 28, // 13 -> RECEIVE_INTRODUCTION + 32, // 14 -> RESPOND_TO_INTRODUCTION + 36, // 15 -> SEND_ATTACHMENTS_START + 35, // 16 -> SEND_ATTACHMENTS_END + 26, // 17 -> RECEIVE_ATTACHMENTS_START + 25, // 18 -> RECEIVE_ATTACHMENTS_END + 8, // 19 -> CANCEL_SENDING_ATTACHMENTS + 7, // 20 -> CANCEL_RECEIVING_ATTACHMENTS + 23, // 21 -> OPEN_RECEIVED_ATTACHMENTS + 22, // 22 -> LAUNCH_SETUP_ACTIVITY + 2, // 23 -> ADD_CONTACT + 29, // 24 -> REMOVE_CONTACT + 17, // 25 -> FAST_SHARE_SERVER_RESPONSE + 39, // 26 -> SEND_START + 1, // 27 -> ACCEPT_FAST_INITIALIZATION + 40, // 28 -> SET_DATA_USAGE + 13, // 29 -> DISMISS_FAST_INITIALIZATION + 6, // 30 -> CANCEL_CONNECTION + 19, // 31 -> LAUNCH_ACTIVITY + 14, // 32 -> DISMISS_PRIVACY_NOTIFICATION + 45, // 33 -> TAP_PRIVACY_NOTIFICATION + 44, // 34 -> TAP_HELP + 43, // 35 -> TAP_FEEDBACK + 3, // 36 -> ADD_QUICK_SETTINGS_TILE + 30, // 37 -> REMOVE_QUICK_SETTINGS_TILE + 21, // 38 -> LAUNCH_PHONE_CONSENT + 46, // 39 -> TAP_QUICK_SETTINGS_TILE + 18, // 40 -> INSTALL_APK + 49, // 41 -> VERIFY_APK + 20, // 42 -> LAUNCH_CONSENT + 24, // 43 -> PROCESS_RECEIVED_ATTACHMENTS_END + 47, // 44 -> TOGGLE_SHOW_NOTIFICATION + 41, // 45 -> SET_DEVICE_NAME + 9, // 46 -> DECLINE_AGREEMENTS + 31, // 47 -> REQUEST_SETTING_PERMISSIONS + 16, // 48 -> ESTABLISH_CONNECTION + 11, // 49 -> DEVICE_SETTINGS +}; + +const std::string& EventType_Name( + EventType value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + EventType_entries, + EventType_entries_by_number, + 50, EventType_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + EventType_entries, + EventType_entries_by_number, + 50, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + EventType_strings[idx].get(); +} +bool EventType_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, EventType* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + EventType_entries, 50, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} +bool EventCategory_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + case 3: + return true; + default: + return false; + } +} + +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed EventCategory_strings[4] = {}; + +static const char EventCategory_names[] = + "RECEIVING_EVENT" + "SENDING_EVENT" + "SETTINGS_EVENT" + "UNKNOWN_EVENT_CATEGORY"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry EventCategory_entries[] = { + { {EventCategory_names + 0, 15}, 2 }, + { {EventCategory_names + 15, 13}, 1 }, + { {EventCategory_names + 28, 14}, 3 }, + { {EventCategory_names + 42, 22}, 0 }, +}; + +static const int EventCategory_entries_by_number[] = { + 3, // 0 -> UNKNOWN_EVENT_CATEGORY + 1, // 1 -> SENDING_EVENT + 0, // 2 -> RECEIVING_EVENT + 2, // 3 -> SETTINGS_EVENT +}; + +const std::string& EventCategory_Name( + EventCategory value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + EventCategory_entries, + EventCategory_entries_by_number, + 4, EventCategory_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + EventCategory_entries, + EventCategory_entries_by_number, + 4, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + EventCategory_strings[idx].get(); +} +bool EventCategory_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, EventCategory* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + EventCategory_entries, 4, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} +bool NearbySharingStatus_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + return true; + default: + return false; + } +} + +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed NearbySharingStatus_strings[3] = {}; + +static const char NearbySharingStatus_names[] = + "OFF" + "ON" + "UNKNOWN_NEARBY_SHARING_STATUS"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry NearbySharingStatus_entries[] = { + { {NearbySharingStatus_names + 0, 3}, 2 }, + { {NearbySharingStatus_names + 3, 2}, 1 }, + { {NearbySharingStatus_names + 5, 29}, 0 }, +}; + +static const int NearbySharingStatus_entries_by_number[] = { + 2, // 0 -> UNKNOWN_NEARBY_SHARING_STATUS + 1, // 1 -> ON + 0, // 2 -> OFF +}; + +const std::string& NearbySharingStatus_Name( + NearbySharingStatus value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + NearbySharingStatus_entries, + NearbySharingStatus_entries_by_number, + 3, NearbySharingStatus_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + NearbySharingStatus_entries, + NearbySharingStatus_entries_by_number, + 3, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + NearbySharingStatus_strings[idx].get(); +} +bool NearbySharingStatus_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, NearbySharingStatus* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + NearbySharingStatus_entries, 3, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} +bool Visibility_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + return true; + default: + return false; + } +} + +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed Visibility_strings[6] = {}; + +static const char Visibility_names[] = + "CONTACTS_ONLY" + "EVERYONE" + "HIDDEN" + "SELECTED_CONTACTS_ONLY" + "SELF_SHARE" + "UNKNOWN_VISIBILITY"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry Visibility_entries[] = { + { {Visibility_names + 0, 13}, 1 }, + { {Visibility_names + 13, 8}, 2 }, + { {Visibility_names + 21, 6}, 4 }, + { {Visibility_names + 27, 22}, 3 }, + { {Visibility_names + 49, 10}, 5 }, + { {Visibility_names + 59, 18}, 0 }, +}; + +static const int Visibility_entries_by_number[] = { + 5, // 0 -> UNKNOWN_VISIBILITY + 0, // 1 -> CONTACTS_ONLY + 1, // 2 -> EVERYONE + 3, // 3 -> SELECTED_CONTACTS_ONLY + 2, // 4 -> HIDDEN + 4, // 5 -> SELF_SHARE +}; + +const std::string& Visibility_Name( + Visibility value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + Visibility_entries, + Visibility_entries_by_number, + 6, Visibility_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + Visibility_entries, + Visibility_entries_by_number, + 6, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + Visibility_strings[idx].get(); +} +bool Visibility_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, Visibility* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + Visibility_entries, 6, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} +bool DataUsage_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + case 3: + return true; + default: + return false; + } +} + +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed DataUsage_strings[4] = {}; + +static const char DataUsage_names[] = + "OFFLINE" + "ONLINE" + "UNKNOWN_DATA_USAGE" + "WIFI_ONLY"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry DataUsage_entries[] = { + { {DataUsage_names + 0, 7}, 3 }, + { {DataUsage_names + 7, 6}, 1 }, + { {DataUsage_names + 13, 18}, 0 }, + { {DataUsage_names + 31, 9}, 2 }, +}; + +static const int DataUsage_entries_by_number[] = { + 2, // 0 -> UNKNOWN_DATA_USAGE + 1, // 1 -> ONLINE + 3, // 2 -> WIFI_ONLY + 0, // 3 -> OFFLINE +}; + +const std::string& DataUsage_Name( + DataUsage value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + DataUsage_entries, + DataUsage_entries_by_number, + 4, DataUsage_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + DataUsage_entries, + DataUsage_entries_by_number, + 4, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + DataUsage_strings[idx].get(); +} +bool DataUsage_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, DataUsage* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + DataUsage_entries, 4, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} +bool EstablishConnectionStatus_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + case 3: + return true; + default: + return false; + } +} + +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed EstablishConnectionStatus_strings[4] = {}; + +static const char EstablishConnectionStatus_names[] = + "CONNECTION_STATUS_CANCELLATION" + "CONNECTION_STATUS_FAILURE" + "CONNECTION_STATUS_SUCCESS" + "CONNECTION_STATUS_UNKNOWN"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry EstablishConnectionStatus_entries[] = { + { {EstablishConnectionStatus_names + 0, 30}, 3 }, + { {EstablishConnectionStatus_names + 30, 25}, 2 }, + { {EstablishConnectionStatus_names + 55, 25}, 1 }, + { {EstablishConnectionStatus_names + 80, 25}, 0 }, +}; + +static const int EstablishConnectionStatus_entries_by_number[] = { + 3, // 0 -> CONNECTION_STATUS_UNKNOWN + 2, // 1 -> CONNECTION_STATUS_SUCCESS + 1, // 2 -> CONNECTION_STATUS_FAILURE + 0, // 3 -> CONNECTION_STATUS_CANCELLATION +}; + +const std::string& EstablishConnectionStatus_Name( + EstablishConnectionStatus value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + EstablishConnectionStatus_entries, + EstablishConnectionStatus_entries_by_number, + 4, EstablishConnectionStatus_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + EstablishConnectionStatus_entries, + EstablishConnectionStatus_entries_by_number, + 4, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + EstablishConnectionStatus_strings[idx].get(); +} +bool EstablishConnectionStatus_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, EstablishConnectionStatus* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + EstablishConnectionStatus_entries, 4, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} +bool AttachmentTransmissionStatus_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 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + return true; + default: + return false; + } +} + +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed AttachmentTransmissionStatus_strings[18] = {}; + +static const char AttachmentTransmissionStatus_names[] = + "AWAITING_REMOTE_ACCEPTANCE_FAILED_ATTACHMENT" + "CANCELED_ATTACHMENT_TRANSMISSION_STATUS" + "COMPLETE_ATTACHMENT_TRANSMISSION_STATUS" + "FAILED_ATTACHMENT_TRANSMISSION_STATUS" + "FAILED_NO_PAYLOAD" + "FAILED_NO_SHARE_TARGET_ENDPOINT" + "FAILED_NO_TRANSFER_UPDATE_CALLBACK" + "FAILED_NULL_CONNECTION" + "FAILED_PAIRED_KEYHANDSHAKE" + "FAILED_UNKNOWN_REMOTE_RESPONSE" + "FAILED_WRITE_INTRODUCTION" + "MEDIA_UNAVAILABLE_ATTACHMENT" + "NOT_ENOUGH_SPACE_ATTACHMENT" + "NO_ATTACHMENT_FOUND" + "REJECTED_ATTACHMENT" + "TIMED_OUT_ATTACHMENT" + "UNKNOWN_ATTACHMENT_TRANSMISSION_STATUS" + "UNSUPPORTED_ATTACHMENT_TYPE_ATTACHMENT"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry AttachmentTransmissionStatus_entries[] = { + { {AttachmentTransmissionStatus_names + 0, 44}, 6 }, + { {AttachmentTransmissionStatus_names + 44, 39}, 2 }, + { {AttachmentTransmissionStatus_names + 83, 39}, 1 }, + { {AttachmentTransmissionStatus_names + 122, 37}, 3 }, + { {AttachmentTransmissionStatus_names + 159, 17}, 15 }, + { {AttachmentTransmissionStatus_names + 176, 31}, 12 }, + { {AttachmentTransmissionStatus_names + 207, 34}, 8 }, + { {AttachmentTransmissionStatus_names + 241, 22}, 14 }, + { {AttachmentTransmissionStatus_names + 263, 26}, 13 }, + { {AttachmentTransmissionStatus_names + 289, 30}, 17 }, + { {AttachmentTransmissionStatus_names + 319, 25}, 16 }, + { {AttachmentTransmissionStatus_names + 344, 28}, 9 }, + { {AttachmentTransmissionStatus_names + 372, 27}, 7 }, + { {AttachmentTransmissionStatus_names + 399, 19}, 11 }, + { {AttachmentTransmissionStatus_names + 418, 19}, 4 }, + { {AttachmentTransmissionStatus_names + 437, 20}, 5 }, + { {AttachmentTransmissionStatus_names + 457, 38}, 0 }, + { {AttachmentTransmissionStatus_names + 495, 38}, 10 }, +}; + +static const int AttachmentTransmissionStatus_entries_by_number[] = { + 16, // 0 -> UNKNOWN_ATTACHMENT_TRANSMISSION_STATUS + 2, // 1 -> COMPLETE_ATTACHMENT_TRANSMISSION_STATUS + 1, // 2 -> CANCELED_ATTACHMENT_TRANSMISSION_STATUS + 3, // 3 -> FAILED_ATTACHMENT_TRANSMISSION_STATUS + 14, // 4 -> REJECTED_ATTACHMENT + 15, // 5 -> TIMED_OUT_ATTACHMENT + 0, // 6 -> AWAITING_REMOTE_ACCEPTANCE_FAILED_ATTACHMENT + 12, // 7 -> NOT_ENOUGH_SPACE_ATTACHMENT + 6, // 8 -> FAILED_NO_TRANSFER_UPDATE_CALLBACK + 11, // 9 -> MEDIA_UNAVAILABLE_ATTACHMENT + 17, // 10 -> UNSUPPORTED_ATTACHMENT_TYPE_ATTACHMENT + 13, // 11 -> NO_ATTACHMENT_FOUND + 5, // 12 -> FAILED_NO_SHARE_TARGET_ENDPOINT + 8, // 13 -> FAILED_PAIRED_KEYHANDSHAKE + 7, // 14 -> FAILED_NULL_CONNECTION + 4, // 15 -> FAILED_NO_PAYLOAD + 10, // 16 -> FAILED_WRITE_INTRODUCTION + 9, // 17 -> FAILED_UNKNOWN_REMOTE_RESPONSE +}; + +const std::string& AttachmentTransmissionStatus_Name( + AttachmentTransmissionStatus value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + AttachmentTransmissionStatus_entries, + AttachmentTransmissionStatus_entries_by_number, + 18, AttachmentTransmissionStatus_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + AttachmentTransmissionStatus_entries, + AttachmentTransmissionStatus_entries_by_number, + 18, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + AttachmentTransmissionStatus_strings[idx].get(); +} +bool AttachmentTransmissionStatus_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, AttachmentTransmissionStatus* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + AttachmentTransmissionStatus_entries, 18, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} +bool ProcessReceivedAttachmentsStatus_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + return true; + default: + return false; + } +} + +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed ProcessReceivedAttachmentsStatus_strings[6] = {}; + +static const char ProcessReceivedAttachmentsStatus_names[] = + "PROCESSING_STATUS_COMPLETE_PROCESSING_ATTACHMENTS" + "PROCESSING_STATUS_FAILED_MOVING_FILES" + "PROCESSING_STATUS_FAILED_RECEIVING_APK" + "PROCESSING_STATUS_FAILED_RECEIVING_TEXT" + "PROCESSING_STATUS_FAILED_RECEIVING_WIFI_CREDENTIALS" + "PROCESSING_STATUS_UNKNOWN"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry ProcessReceivedAttachmentsStatus_entries[] = { + { {ProcessReceivedAttachmentsStatus_names + 0, 49}, 1 }, + { {ProcessReceivedAttachmentsStatus_names + 49, 37}, 2 }, + { {ProcessReceivedAttachmentsStatus_names + 86, 38}, 3 }, + { {ProcessReceivedAttachmentsStatus_names + 124, 39}, 4 }, + { {ProcessReceivedAttachmentsStatus_names + 163, 51}, 5 }, + { {ProcessReceivedAttachmentsStatus_names + 214, 25}, 0 }, +}; + +static const int ProcessReceivedAttachmentsStatus_entries_by_number[] = { + 5, // 0 -> PROCESSING_STATUS_UNKNOWN + 0, // 1 -> PROCESSING_STATUS_COMPLETE_PROCESSING_ATTACHMENTS + 1, // 2 -> PROCESSING_STATUS_FAILED_MOVING_FILES + 2, // 3 -> PROCESSING_STATUS_FAILED_RECEIVING_APK + 3, // 4 -> PROCESSING_STATUS_FAILED_RECEIVING_TEXT + 4, // 5 -> PROCESSING_STATUS_FAILED_RECEIVING_WIFI_CREDENTIALS +}; + +const std::string& ProcessReceivedAttachmentsStatus_Name( + ProcessReceivedAttachmentsStatus value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + ProcessReceivedAttachmentsStatus_entries, + ProcessReceivedAttachmentsStatus_entries_by_number, + 6, ProcessReceivedAttachmentsStatus_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + ProcessReceivedAttachmentsStatus_entries, + ProcessReceivedAttachmentsStatus_entries_by_number, + 6, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + ProcessReceivedAttachmentsStatus_strings[idx].get(); +} +bool ProcessReceivedAttachmentsStatus_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, ProcessReceivedAttachmentsStatus* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + ProcessReceivedAttachmentsStatus_entries, 6, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} +bool SessionStatus_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + return true; + default: + return false; + } +} + +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed SessionStatus_strings[3] = {}; + +static const char SessionStatus_names[] = + "FAILED_SESSION_STATUS" + "SUCCEEDED_SESSION_STATUS" + "UNKNOWN_SESSION_STATUS"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry SessionStatus_entries[] = { + { {SessionStatus_names + 0, 21}, 2 }, + { {SessionStatus_names + 21, 24}, 1 }, + { {SessionStatus_names + 45, 22}, 0 }, +}; + +static const int SessionStatus_entries_by_number[] = { + 2, // 0 -> UNKNOWN_SESSION_STATUS + 1, // 1 -> SUCCEEDED_SESSION_STATUS + 0, // 2 -> FAILED_SESSION_STATUS +}; + +const std::string& SessionStatus_Name( + SessionStatus value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + SessionStatus_entries, + SessionStatus_entries_by_number, + 3, SessionStatus_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + SessionStatus_entries, + SessionStatus_entries_by_number, + 3, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + SessionStatus_strings[idx].get(); +} +bool SessionStatus_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, SessionStatus* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + SessionStatus_entries, 3, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} +bool ResponseToIntroduction_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + case 3: + return true; + default: + return false; + } +} + +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed ResponseToIntroduction_strings[4] = {}; + +static const char ResponseToIntroduction_names[] = + "ACCEPT_INTRODUCTION" + "FAIL_INTRODUCTION" + "REJECT_INTRODUCTION" + "UNKNOWN_RESPONSE_TO_INTRODUCTION"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry ResponseToIntroduction_entries[] = { + { {ResponseToIntroduction_names + 0, 19}, 1 }, + { {ResponseToIntroduction_names + 19, 17}, 3 }, + { {ResponseToIntroduction_names + 36, 19}, 2 }, + { {ResponseToIntroduction_names + 55, 32}, 0 }, +}; + +static const int ResponseToIntroduction_entries_by_number[] = { + 3, // 0 -> UNKNOWN_RESPONSE_TO_INTRODUCTION + 0, // 1 -> ACCEPT_INTRODUCTION + 2, // 2 -> REJECT_INTRODUCTION + 1, // 3 -> FAIL_INTRODUCTION +}; + +const std::string& ResponseToIntroduction_Name( + ResponseToIntroduction value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + ResponseToIntroduction_entries, + ResponseToIntroduction_entries_by_number, + 4, ResponseToIntroduction_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + ResponseToIntroduction_entries, + ResponseToIntroduction_entries_by_number, + 4, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + ResponseToIntroduction_strings[idx].get(); +} +bool ResponseToIntroduction_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, ResponseToIntroduction* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + ResponseToIntroduction_entries, 4, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} +bool DeviceType_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + case 3: + return true; + default: + return false; + } +} + +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed DeviceType_strings[4] = {}; + +static const char DeviceType_names[] = + "LAPTOP" + "PHONE" + "TABLET" + "UNKNOWN_DEVICE_TYPE"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry DeviceType_entries[] = { + { {DeviceType_names + 0, 6}, 3 }, + { {DeviceType_names + 6, 5}, 1 }, + { {DeviceType_names + 11, 6}, 2 }, + { {DeviceType_names + 17, 19}, 0 }, +}; + +static const int DeviceType_entries_by_number[] = { + 3, // 0 -> UNKNOWN_DEVICE_TYPE + 1, // 1 -> PHONE + 2, // 2 -> TABLET + 0, // 3 -> LAPTOP +}; + +const std::string& DeviceType_Name( + DeviceType value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + DeviceType_entries, + DeviceType_entries_by_number, + 4, DeviceType_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + DeviceType_entries, + DeviceType_entries_by_number, + 4, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + DeviceType_strings[idx].get(); +} +bool DeviceType_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, DeviceType* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + DeviceType_entries, 4, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} +bool OSType_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + case 3: + return true; + default: + return false; + } +} + +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed OSType_strings[4] = {}; + +static const char OSType_names[] = + "ANDROID" + "CHROME_OS" + "IOS" + "UNKNOWN_OS_TYPE"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry OSType_entries[] = { + { {OSType_names + 0, 7}, 1 }, + { {OSType_names + 7, 9}, 2 }, + { {OSType_names + 16, 3}, 3 }, + { {OSType_names + 19, 15}, 0 }, +}; + +static const int OSType_entries_by_number[] = { + 3, // 0 -> UNKNOWN_OS_TYPE + 0, // 1 -> ANDROID + 1, // 2 -> CHROME_OS + 2, // 3 -> IOS +}; + +const std::string& OSType_Name( + OSType value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + OSType_entries, + OSType_entries_by_number, + 4, OSType_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + OSType_entries, + OSType_entries_by_number, + 4, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + OSType_strings[idx].get(); +} +bool OSType_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, OSType* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + OSType_entries, 4, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} +bool DeviceRelationship_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + case 3: + return true; + default: + return false; + } +} + +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed DeviceRelationship_strings[4] = {}; + +static const char DeviceRelationship_names[] = + "IS_CONTACT" + "IS_SELF" + "IS_STRANGER" + "UNKNOWN_DEVICE_RELATIONSHIP"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry DeviceRelationship_entries[] = { + { {DeviceRelationship_names + 0, 10}, 2 }, + { {DeviceRelationship_names + 10, 7}, 1 }, + { {DeviceRelationship_names + 17, 11}, 3 }, + { {DeviceRelationship_names + 28, 27}, 0 }, +}; + +static const int DeviceRelationship_entries_by_number[] = { + 3, // 0 -> UNKNOWN_DEVICE_RELATIONSHIP + 1, // 1 -> IS_SELF + 0, // 2 -> IS_CONTACT + 2, // 3 -> IS_STRANGER +}; + +const std::string& DeviceRelationship_Name( + DeviceRelationship value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + DeviceRelationship_entries, + DeviceRelationship_entries_by_number, + 4, DeviceRelationship_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + DeviceRelationship_entries, + DeviceRelationship_entries_by_number, + 4, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + DeviceRelationship_strings[idx].get(); +} +bool DeviceRelationship_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, DeviceRelationship* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + DeviceRelationship_entries, 4, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} +bool LogSource_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + return true; + default: + return false; + } +} + +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed LogSource_strings[6] = {}; + +static const char LogSource_names[] = + "BETA_TESTER_DEVICES" + "DEBUG_DEVICES" + "INTERNAL_DEVICES" + "LAB_DEVICES" + "OEM_DEVICES" + "UNSPECIFIED_SOURCE"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry LogSource_entries[] = { + { {LogSource_names + 0, 19}, 3 }, + { {LogSource_names + 19, 13}, 5 }, + { {LogSource_names + 32, 16}, 2 }, + { {LogSource_names + 48, 11}, 1 }, + { {LogSource_names + 59, 11}, 4 }, + { {LogSource_names + 70, 18}, 0 }, +}; + +static const int LogSource_entries_by_number[] = { + 5, // 0 -> UNSPECIFIED_SOURCE + 3, // 1 -> LAB_DEVICES + 2, // 2 -> INTERNAL_DEVICES + 0, // 3 -> BETA_TESTER_DEVICES + 4, // 4 -> OEM_DEVICES + 1, // 5 -> DEBUG_DEVICES +}; + +const std::string& LogSource_Name( + LogSource value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + LogSource_entries, + LogSource_entries_by_number, + 6, LogSource_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + LogSource_entries, + LogSource_entries_by_number, + 6, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + LogSource_strings[idx].get(); +} +bool LogSource_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, LogSource* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + LogSource_entries, 6, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} +bool ServerActionName_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + return true; + default: + return false; + } +} + +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed ServerActionName_strings[8] = {}; + +static const char ServerActionName_names[] = + "CHECK_REACHABILITY" + "DOWNLOAD_CERTIFICATES" + "DOWNLOAD_SENDER_CERTIFICATES" + "UNKNOWN_SERVER_ACTION" + "UPDATE_DEVICE_NAME" + "UPLOAD_CERTIFICATES" + "UPLOAD_CONTACTS" + "UPLOAD_SENDER_CERTIFICATES"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry ServerActionName_entries[] = { + { {ServerActionName_names + 0, 18}, 3 }, + { {ServerActionName_names + 18, 21}, 2 }, + { {ServerActionName_names + 39, 28}, 7 }, + { {ServerActionName_names + 67, 21}, 0 }, + { {ServerActionName_names + 88, 18}, 5 }, + { {ServerActionName_names + 106, 19}, 1 }, + { {ServerActionName_names + 125, 15}, 4 }, + { {ServerActionName_names + 140, 26}, 6 }, +}; + +static const int ServerActionName_entries_by_number[] = { + 3, // 0 -> UNKNOWN_SERVER_ACTION + 5, // 1 -> UPLOAD_CERTIFICATES + 1, // 2 -> DOWNLOAD_CERTIFICATES + 0, // 3 -> CHECK_REACHABILITY + 6, // 4 -> UPLOAD_CONTACTS + 4, // 5 -> UPDATE_DEVICE_NAME + 7, // 6 -> UPLOAD_SENDER_CERTIFICATES + 2, // 7 -> DOWNLOAD_SENDER_CERTIFICATES +}; + +const std::string& ServerActionName_Name( + ServerActionName value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + ServerActionName_entries, + ServerActionName_entries_by_number, + 8, ServerActionName_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + ServerActionName_entries, + ServerActionName_entries_by_number, + 8, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + ServerActionName_strings[idx].get(); +} +bool ServerActionName_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, ServerActionName* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + ServerActionName_entries, 8, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} +bool ServerResponseState_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: + return true; + default: + return false; + } +} + +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed ServerResponseState_strings[10] = {}; + +static const char ServerResponseState_names[] = + "SERVER_RESPONSE_GOOGLE_AUTH_FAILURE" + "SERVER_RESPONSE_STATUS_DEADLINE_EXCEEDED" + "SERVER_RESPONSE_STATUS_INVALID_ARGUMENT" + "SERVER_RESPONSE_STATUS_OTHER_FAILURE" + "SERVER_RESPONSE_STATUS_PERMISSION_DENIED" + "SERVER_RESPONSE_STATUS_UNAUTHENTICATED" + "SERVER_RESPONSE_STATUS_UNAVAILABLE" + "SERVER_RESPONSE_SUCCESS" + "SERVER_RESPONSE_UNKNOWN_FAILURE" + "UNKNOWN_SERVER_RESPONSE_STATE"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry ServerResponseState_entries[] = { + { {ServerResponseState_names + 0, 35}, 8 }, + { {ServerResponseState_names + 35, 40}, 4 }, + { {ServerResponseState_names + 75, 39}, 9 }, + { {ServerResponseState_names + 114, 36}, 3 }, + { {ServerResponseState_names + 150, 40}, 5 }, + { {ServerResponseState_names + 190, 38}, 7 }, + { {ServerResponseState_names + 228, 34}, 6 }, + { {ServerResponseState_names + 262, 23}, 1 }, + { {ServerResponseState_names + 285, 31}, 2 }, + { {ServerResponseState_names + 316, 29}, 0 }, +}; + +static const int ServerResponseState_entries_by_number[] = { + 9, // 0 -> UNKNOWN_SERVER_RESPONSE_STATE + 7, // 1 -> SERVER_RESPONSE_SUCCESS + 8, // 2 -> SERVER_RESPONSE_UNKNOWN_FAILURE + 3, // 3 -> SERVER_RESPONSE_STATUS_OTHER_FAILURE + 1, // 4 -> SERVER_RESPONSE_STATUS_DEADLINE_EXCEEDED + 4, // 5 -> SERVER_RESPONSE_STATUS_PERMISSION_DENIED + 6, // 6 -> SERVER_RESPONSE_STATUS_UNAVAILABLE + 5, // 7 -> SERVER_RESPONSE_STATUS_UNAUTHENTICATED + 0, // 8 -> SERVER_RESPONSE_GOOGLE_AUTH_FAILURE + 2, // 9 -> SERVER_RESPONSE_STATUS_INVALID_ARGUMENT +}; + +const std::string& ServerResponseState_Name( + ServerResponseState value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + ServerResponseState_entries, + ServerResponseState_entries_by_number, + 10, ServerResponseState_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + ServerResponseState_entries, + ServerResponseState_entries_by_number, + 10, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + ServerResponseState_strings[idx].get(); +} +bool ServerResponseState_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, ServerResponseState* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + ServerResponseState_entries, 10, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} +bool ScanType_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + case 3: + return true; + default: + return false; + } +} + +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed ScanType_strings[4] = {}; + +static const char ScanType_names[] = + "DIRECT_SHARE_SCAN" + "FOREGROUND_RETRY_SCAN" + "FOREGROUND_SCAN" + "UNKNOWN_SCAN_TYPE"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry ScanType_entries[] = { + { {ScanType_names + 0, 17}, 3 }, + { {ScanType_names + 17, 21}, 2 }, + { {ScanType_names + 38, 15}, 1 }, + { {ScanType_names + 53, 17}, 0 }, +}; + +static const int ScanType_entries_by_number[] = { + 3, // 0 -> UNKNOWN_SCAN_TYPE + 2, // 1 -> FOREGROUND_SCAN + 1, // 2 -> FOREGROUND_RETRY_SCAN + 0, // 3 -> DIRECT_SHARE_SCAN +}; + +const std::string& ScanType_Name( + ScanType value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + ScanType_entries, + ScanType_entries_by_number, + 4, ScanType_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + ScanType_entries, + ScanType_entries_by_number, + 4, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + ScanType_strings[idx].get(); +} +bool ScanType_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, ScanType* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + ScanType_entries, 4, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} +bool ActivityName_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 ActivityName_strings[9] = {}; + +static const char ActivityName_names[] = + "CONSENTS_ACTIVITY" + "DEVICE_VISIBILITY_ACTIVITY" + "RECEIVE_SURFACE_ACTIVITY" + "SETTINGS_ACTIVITY" + "SETUP_ACTIVITY" + "SET_DATA_USAGE_DIALOG" + "SET_DEVICE_NAME_DIALOG" + "SHARE_SHEET_ACTIVITY" + "UNKNOWN_ACTIVITY"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry ActivityName_entries[] = { + { {ActivityName_names + 0, 17}, 6 }, + { {ActivityName_names + 17, 26}, 5 }, + { {ActivityName_names + 43, 24}, 3 }, + { {ActivityName_names + 67, 17}, 2 }, + { {ActivityName_names + 84, 14}, 4 }, + { {ActivityName_names + 98, 21}, 8 }, + { {ActivityName_names + 119, 22}, 7 }, + { {ActivityName_names + 141, 20}, 1 }, + { {ActivityName_names + 161, 16}, 0 }, +}; + +static const int ActivityName_entries_by_number[] = { + 8, // 0 -> UNKNOWN_ACTIVITY + 7, // 1 -> SHARE_SHEET_ACTIVITY + 3, // 2 -> SETTINGS_ACTIVITY + 2, // 3 -> RECEIVE_SURFACE_ACTIVITY + 4, // 4 -> SETUP_ACTIVITY + 1, // 5 -> DEVICE_VISIBILITY_ACTIVITY + 0, // 6 -> CONSENTS_ACTIVITY + 6, // 7 -> SET_DEVICE_NAME_DIALOG + 5, // 8 -> SET_DATA_USAGE_DIALOG +}; + +const std::string& ActivityName_Name( + ActivityName value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + ActivityName_entries, + ActivityName_entries_by_number, + 9, ActivityName_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + ActivityName_entries, + ActivityName_entries_by_number, + 9, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + ActivityName_strings[idx].get(); +} +bool ActivityName_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, ActivityName* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + ActivityName_entries, 9, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} +bool ConsentType_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + return true; + default: + return false; + } +} + +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed ConsentType_strings[3] = {}; + +static const char ConsentType_names[] = + "CONSENT_TYPE_C11N" + "CONSENT_TYPE_DEVICE_CONTACT" + "CONSENT_TYPE_UNKNOWN"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry ConsentType_entries[] = { + { {ConsentType_names + 0, 17}, 1 }, + { {ConsentType_names + 17, 27}, 2 }, + { {ConsentType_names + 44, 20}, 0 }, +}; + +static const int ConsentType_entries_by_number[] = { + 2, // 0 -> CONSENT_TYPE_UNKNOWN + 0, // 1 -> CONSENT_TYPE_C11N + 1, // 2 -> CONSENT_TYPE_DEVICE_CONTACT +}; + +const std::string& ConsentType_Name( + ConsentType value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + ConsentType_entries, + ConsentType_entries_by_number, + 3, ConsentType_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + ConsentType_entries, + ConsentType_entries_by_number, + 3, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + ConsentType_strings[idx].get(); +} +bool ConsentType_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, ConsentType* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + ConsentType_entries, 3, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} +bool ConsentAcceptanceStatus_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + case 3: + return true; + default: + return false; + } +} + +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed ConsentAcceptanceStatus_strings[4] = {}; + +static const char ConsentAcceptanceStatus_names[] = + "CONSENT_ACCEPTED" + "CONSENT_DECLINED" + "CONSENT_UNABLE_TO_ENABLE" + "CONSENT_UNKNOWN_ACCEPT_STATUS"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry ConsentAcceptanceStatus_entries[] = { + { {ConsentAcceptanceStatus_names + 0, 16}, 1 }, + { {ConsentAcceptanceStatus_names + 16, 16}, 2 }, + { {ConsentAcceptanceStatus_names + 32, 24}, 3 }, + { {ConsentAcceptanceStatus_names + 56, 29}, 0 }, +}; + +static const int ConsentAcceptanceStatus_entries_by_number[] = { + 3, // 0 -> CONSENT_UNKNOWN_ACCEPT_STATUS + 0, // 1 -> CONSENT_ACCEPTED + 1, // 2 -> CONSENT_DECLINED + 2, // 3 -> CONSENT_UNABLE_TO_ENABLE +}; + +const std::string& ConsentAcceptanceStatus_Name( + ConsentAcceptanceStatus value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + ConsentAcceptanceStatus_entries, + ConsentAcceptanceStatus_entries_by_number, + 4, ConsentAcceptanceStatus_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + ConsentAcceptanceStatus_entries, + ConsentAcceptanceStatus_entries_by_number, + 4, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + ConsentAcceptanceStatus_strings[idx].get(); +} +bool ConsentAcceptanceStatus_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, ConsentAcceptanceStatus* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + ConsentAcceptanceStatus_entries, 4, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} +bool ApkSource_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + return true; + default: + return false; + } +} + +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed ApkSource_strings[3] = {}; + +static const char ApkSource_names[] = + "APK_FROM_SD_CARD" + "INSTALLED_APP" + "UNKNOWN_APK_SOURCE"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry ApkSource_entries[] = { + { {ApkSource_names + 0, 16}, 1 }, + { {ApkSource_names + 16, 13}, 2 }, + { {ApkSource_names + 29, 18}, 0 }, +}; + +static const int ApkSource_entries_by_number[] = { + 2, // 0 -> UNKNOWN_APK_SOURCE + 0, // 1 -> APK_FROM_SD_CARD + 1, // 2 -> INSTALLED_APP +}; + +const std::string& ApkSource_Name( + ApkSource value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + ApkSource_entries, + ApkSource_entries_by_number, + 3, ApkSource_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + ApkSource_entries, + ApkSource_entries_by_number, + 3, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + ApkSource_strings[idx].get(); +} +bool ApkSource_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, ApkSource* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + ApkSource_entries, 3, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} +bool InstallAPKStatus_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + return true; + default: + return false; + } +} + +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed InstallAPKStatus_strings[3] = {}; + +static const char InstallAPKStatus_names[] = + "FAIL_INSTALLATION" + "SUCCESS_INSTALLATION" + "UNKNOWN_INSTALL_APK_STATUS"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry InstallAPKStatus_entries[] = { + { {InstallAPKStatus_names + 0, 17}, 1 }, + { {InstallAPKStatus_names + 17, 20}, 2 }, + { {InstallAPKStatus_names + 37, 26}, 0 }, +}; + +static const int InstallAPKStatus_entries_by_number[] = { + 2, // 0 -> UNKNOWN_INSTALL_APK_STATUS + 0, // 1 -> FAIL_INSTALLATION + 1, // 2 -> SUCCESS_INSTALLATION +}; + +const std::string& InstallAPKStatus_Name( + InstallAPKStatus value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + InstallAPKStatus_entries, + InstallAPKStatus_entries_by_number, + 3, InstallAPKStatus_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + InstallAPKStatus_entries, + InstallAPKStatus_entries_by_number, + 3, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + InstallAPKStatus_strings[idx].get(); +} +bool InstallAPKStatus_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, InstallAPKStatus* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + InstallAPKStatus_entries, 3, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} +bool VerifyAPKStatus_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + case 3: + return true; + default: + return false; + } +} + +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed VerifyAPKStatus_strings[4] = {}; + +static const char VerifyAPKStatus_names[] = + "ALREADY_INSTALLED" + "INSTALLABLE" + "NOT_INSTALLABLE" + "UNKNOWN_VERIFY_APK_STATUS"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry VerifyAPKStatus_entries[] = { + { {VerifyAPKStatus_names + 0, 17}, 3 }, + { {VerifyAPKStatus_names + 17, 11}, 2 }, + { {VerifyAPKStatus_names + 28, 15}, 1 }, + { {VerifyAPKStatus_names + 43, 25}, 0 }, +}; + +static const int VerifyAPKStatus_entries_by_number[] = { + 3, // 0 -> UNKNOWN_VERIFY_APK_STATUS + 2, // 1 -> NOT_INSTALLABLE + 1, // 2 -> INSTALLABLE + 0, // 3 -> ALREADY_INSTALLED +}; + +const std::string& VerifyAPKStatus_Name( + VerifyAPKStatus value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + VerifyAPKStatus_entries, + VerifyAPKStatus_entries_by_number, + 4, VerifyAPKStatus_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + VerifyAPKStatus_entries, + VerifyAPKStatus_entries_by_number, + 4, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + VerifyAPKStatus_strings[idx].get(); +} +bool VerifyAPKStatus_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, VerifyAPKStatus* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + VerifyAPKStatus_entries, 4, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} +bool ShowNotificationStatus_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + return true; + default: + return false; + } +} + +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed ShowNotificationStatus_strings[3] = {}; + +static const char ShowNotificationStatus_names[] = + "NOT_SHOW" + "SHOW" + "UNKNOWN_SHOW_NOTIFICATION_STATUS"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry ShowNotificationStatus_entries[] = { + { {ShowNotificationStatus_names + 0, 8}, 2 }, + { {ShowNotificationStatus_names + 8, 4}, 1 }, + { {ShowNotificationStatus_names + 12, 32}, 0 }, +}; + +static const int ShowNotificationStatus_entries_by_number[] = { + 2, // 0 -> UNKNOWN_SHOW_NOTIFICATION_STATUS + 1, // 1 -> SHOW + 0, // 2 -> NOT_SHOW +}; + +const std::string& ShowNotificationStatus_Name( + ShowNotificationStatus value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + ShowNotificationStatus_entries, + ShowNotificationStatus_entries_by_number, + 3, ShowNotificationStatus_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + ShowNotificationStatus_entries, + ShowNotificationStatus_entries_by_number, + 3, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + ShowNotificationStatus_strings[idx].get(); +} +bool ShowNotificationStatus_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, ShowNotificationStatus* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + ShowNotificationStatus_entries, 3, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} +bool PermissionRequestResult_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + case 3: + return true; + default: + return false; + } +} + +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed PermissionRequestResult_strings[4] = {}; + +static const char PermissionRequestResult_names[] = + "PERMISSION_GRANTED" + "PERMISSION_REJECTED" + "PERMISSION_UNABLE_TO_GRANT" + "PERMISSION_UNKNOWN_REQUEST_RESULT"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry PermissionRequestResult_entries[] = { + { {PermissionRequestResult_names + 0, 18}, 1 }, + { {PermissionRequestResult_names + 18, 19}, 2 }, + { {PermissionRequestResult_names + 37, 26}, 3 }, + { {PermissionRequestResult_names + 63, 33}, 0 }, +}; + +static const int PermissionRequestResult_entries_by_number[] = { + 3, // 0 -> PERMISSION_UNKNOWN_REQUEST_RESULT + 0, // 1 -> PERMISSION_GRANTED + 1, // 2 -> PERMISSION_REJECTED + 2, // 3 -> PERMISSION_UNABLE_TO_GRANT +}; + +const std::string& PermissionRequestResult_Name( + PermissionRequestResult value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + PermissionRequestResult_entries, + PermissionRequestResult_entries_by_number, + 4, PermissionRequestResult_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + PermissionRequestResult_entries, + PermissionRequestResult_entries_by_number, + 4, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + PermissionRequestResult_strings[idx].get(); +} +bool PermissionRequestResult_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, PermissionRequestResult* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + PermissionRequestResult_entries, 4, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} +bool PermissionRequestType_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 PermissionRequestType_strings[5] = {}; + +static const char PermissionRequestType_names[] = + "PERMISSION_AIRPLANE_MODE_OFF" + "PERMISSION_BLUETOOTH" + "PERMISSION_LOCATION" + "PERMISSION_UNKNOWN_TYPE" + "PERMISSION_WIFI"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry PermissionRequestType_entries[] = { + { {PermissionRequestType_names + 0, 28}, 1 }, + { {PermissionRequestType_names + 28, 20}, 3 }, + { {PermissionRequestType_names + 48, 19}, 4 }, + { {PermissionRequestType_names + 67, 23}, 0 }, + { {PermissionRequestType_names + 90, 15}, 2 }, +}; + +static const int PermissionRequestType_entries_by_number[] = { + 3, // 0 -> PERMISSION_UNKNOWN_TYPE + 0, // 1 -> PERMISSION_AIRPLANE_MODE_OFF + 4, // 2 -> PERMISSION_WIFI + 1, // 3 -> PERMISSION_BLUETOOTH + 2, // 4 -> PERMISSION_LOCATION +}; + +const std::string& PermissionRequestType_Name( + PermissionRequestType value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + PermissionRequestType_entries, + PermissionRequestType_entries_by_number, + 5, PermissionRequestType_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + PermissionRequestType_entries, + PermissionRequestType_entries_by_number, + 5, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + PermissionRequestType_strings[idx].get(); +} +bool PermissionRequestType_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, PermissionRequestType* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + PermissionRequestType_entries, 5, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} + +// @@protoc_insertion_point(namespace_scope) +} // namespace sharing +} // namespace proto +} // namespace nearby +} // namespace location +PROTOBUF_NAMESPACE_OPEN +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) +#include diff --git a/proto/sharing_enums.pb.h b/proto/sharing_enums.pb.h new file mode 100644 index 00000000..4bdc9856 --- /dev/null +++ b/proto/sharing_enums.pb.h @@ -0,0 +1,739 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: proto/sharing_enums.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_proto_2fsharing_5fenums_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_proto_2fsharing_5fenums_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3019000 +#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 3019004 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_proto_2fsharing_5fenums_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_proto_2fsharing_5fenums_2eproto { + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::AuxiliaryParseTableField aux[] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[1] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[]; + static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[]; + static const uint32_t offsets[]; +}; +PROTOBUF_NAMESPACE_OPEN +PROTOBUF_NAMESPACE_CLOSE +namespace location { +namespace nearby { +namespace proto { +namespace sharing { + +enum EventType : int { + UNKNOWN_EVENT_TYPE = 0, + ACCEPT_AGREEMENTS = 1, + ENABLE_NEARBY_SHARING = 2, + SET_VISIBILITY = 3, + DESCRIBE_ATTACHMENTS = 4, + SCAN_FOR_SHARE_TARGETS_START = 5, + SCAN_FOR_SHARE_TARGETS_END = 6, + ADVERTISE_DEVICE_PRESENCE_START = 7, + ADVERTISE_DEVICE_PRESENCE_END = 8, + SEND_FAST_INITIALIZATION = 9, + RECEIVE_FAST_INITIALIZATION = 10, + DISCOVER_SHARE_TARGET = 11, + SEND_INTRODUCTION = 12, + RECEIVE_INTRODUCTION = 13, + RESPOND_TO_INTRODUCTION = 14, + SEND_ATTACHMENTS_START = 15, + SEND_ATTACHMENTS_END = 16, + RECEIVE_ATTACHMENTS_START = 17, + RECEIVE_ATTACHMENTS_END = 18, + CANCEL_SENDING_ATTACHMENTS = 19, + CANCEL_RECEIVING_ATTACHMENTS = 20, + OPEN_RECEIVED_ATTACHMENTS = 21, + LAUNCH_SETUP_ACTIVITY PROTOBUF_DEPRECATED_ENUM = 22, + ADD_CONTACT = 23, + REMOVE_CONTACT = 24, + FAST_SHARE_SERVER_RESPONSE = 25, + SEND_START = 26, + ACCEPT_FAST_INITIALIZATION = 27, + SET_DATA_USAGE = 28, + DISMISS_FAST_INITIALIZATION = 29, + CANCEL_CONNECTION = 30, + LAUNCH_ACTIVITY = 31, + DISMISS_PRIVACY_NOTIFICATION = 32, + TAP_PRIVACY_NOTIFICATION = 33, + TAP_HELP = 34, + TAP_FEEDBACK = 35, + ADD_QUICK_SETTINGS_TILE = 36, + REMOVE_QUICK_SETTINGS_TILE = 37, + LAUNCH_PHONE_CONSENT = 38, + TAP_QUICK_SETTINGS_TILE = 39, + INSTALL_APK = 40, + VERIFY_APK = 41, + LAUNCH_CONSENT = 42, + PROCESS_RECEIVED_ATTACHMENTS_END = 43, + TOGGLE_SHOW_NOTIFICATION = 44, + SET_DEVICE_NAME = 45, + DECLINE_AGREEMENTS = 46, + REQUEST_SETTING_PERMISSIONS = 47, + ESTABLISH_CONNECTION = 48, + DEVICE_SETTINGS = 49 +}; +bool EventType_IsValid(int value); +constexpr EventType EventType_MIN = UNKNOWN_EVENT_TYPE; +constexpr EventType EventType_MAX = DEVICE_SETTINGS; +constexpr int EventType_ARRAYSIZE = EventType_MAX + 1; + +const std::string& EventType_Name(EventType value); +template +inline const std::string& EventType_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function EventType_Name."); + return EventType_Name(static_cast(enum_t_value)); +} +bool EventType_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, EventType* value); +enum EventCategory : int { + UNKNOWN_EVENT_CATEGORY = 0, + SENDING_EVENT = 1, + RECEIVING_EVENT = 2, + SETTINGS_EVENT = 3 +}; +bool EventCategory_IsValid(int value); +constexpr EventCategory EventCategory_MIN = UNKNOWN_EVENT_CATEGORY; +constexpr EventCategory EventCategory_MAX = SETTINGS_EVENT; +constexpr int EventCategory_ARRAYSIZE = EventCategory_MAX + 1; + +const std::string& EventCategory_Name(EventCategory value); +template +inline const std::string& EventCategory_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function EventCategory_Name."); + return EventCategory_Name(static_cast(enum_t_value)); +} +bool EventCategory_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, EventCategory* value); +enum NearbySharingStatus : int { + UNKNOWN_NEARBY_SHARING_STATUS = 0, + ON = 1, + OFF = 2 +}; +bool NearbySharingStatus_IsValid(int value); +constexpr NearbySharingStatus NearbySharingStatus_MIN = UNKNOWN_NEARBY_SHARING_STATUS; +constexpr NearbySharingStatus NearbySharingStatus_MAX = OFF; +constexpr int NearbySharingStatus_ARRAYSIZE = NearbySharingStatus_MAX + 1; + +const std::string& NearbySharingStatus_Name(NearbySharingStatus value); +template +inline const std::string& NearbySharingStatus_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function NearbySharingStatus_Name."); + return NearbySharingStatus_Name(static_cast(enum_t_value)); +} +bool NearbySharingStatus_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, NearbySharingStatus* value); +enum Visibility : int { + UNKNOWN_VISIBILITY = 0, + CONTACTS_ONLY = 1, + EVERYONE = 2, + SELECTED_CONTACTS_ONLY = 3, + HIDDEN = 4, + SELF_SHARE = 5 +}; +bool Visibility_IsValid(int value); +constexpr Visibility Visibility_MIN = UNKNOWN_VISIBILITY; +constexpr Visibility Visibility_MAX = SELF_SHARE; +constexpr int Visibility_ARRAYSIZE = Visibility_MAX + 1; + +const std::string& Visibility_Name(Visibility value); +template +inline const std::string& Visibility_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function Visibility_Name."); + return Visibility_Name(static_cast(enum_t_value)); +} +bool Visibility_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, Visibility* value); +enum DataUsage : int { + UNKNOWN_DATA_USAGE = 0, + ONLINE = 1, + WIFI_ONLY = 2, + OFFLINE = 3 +}; +bool DataUsage_IsValid(int value); +constexpr DataUsage DataUsage_MIN = UNKNOWN_DATA_USAGE; +constexpr DataUsage DataUsage_MAX = OFFLINE; +constexpr int DataUsage_ARRAYSIZE = DataUsage_MAX + 1; + +const std::string& DataUsage_Name(DataUsage value); +template +inline const std::string& DataUsage_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function DataUsage_Name."); + return DataUsage_Name(static_cast(enum_t_value)); +} +bool DataUsage_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, DataUsage* value); +enum EstablishConnectionStatus : int { + CONNECTION_STATUS_UNKNOWN = 0, + CONNECTION_STATUS_SUCCESS = 1, + CONNECTION_STATUS_FAILURE = 2, + CONNECTION_STATUS_CANCELLATION = 3 +}; +bool EstablishConnectionStatus_IsValid(int value); +constexpr EstablishConnectionStatus EstablishConnectionStatus_MIN = CONNECTION_STATUS_UNKNOWN; +constexpr EstablishConnectionStatus EstablishConnectionStatus_MAX = CONNECTION_STATUS_CANCELLATION; +constexpr int EstablishConnectionStatus_ARRAYSIZE = EstablishConnectionStatus_MAX + 1; + +const std::string& EstablishConnectionStatus_Name(EstablishConnectionStatus value); +template +inline const std::string& EstablishConnectionStatus_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function EstablishConnectionStatus_Name."); + return EstablishConnectionStatus_Name(static_cast(enum_t_value)); +} +bool EstablishConnectionStatus_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, EstablishConnectionStatus* value); +enum AttachmentTransmissionStatus : int { + UNKNOWN_ATTACHMENT_TRANSMISSION_STATUS = 0, + COMPLETE_ATTACHMENT_TRANSMISSION_STATUS = 1, + CANCELED_ATTACHMENT_TRANSMISSION_STATUS = 2, + FAILED_ATTACHMENT_TRANSMISSION_STATUS = 3, + REJECTED_ATTACHMENT = 4, + TIMED_OUT_ATTACHMENT = 5, + AWAITING_REMOTE_ACCEPTANCE_FAILED_ATTACHMENT PROTOBUF_DEPRECATED_ENUM = 6, + NOT_ENOUGH_SPACE_ATTACHMENT = 7, + FAILED_NO_TRANSFER_UPDATE_CALLBACK = 8, + MEDIA_UNAVAILABLE_ATTACHMENT = 9, + UNSUPPORTED_ATTACHMENT_TYPE_ATTACHMENT = 10, + NO_ATTACHMENT_FOUND = 11, + FAILED_NO_SHARE_TARGET_ENDPOINT = 12, + FAILED_PAIRED_KEYHANDSHAKE = 13, + FAILED_NULL_CONNECTION = 14, + FAILED_NO_PAYLOAD = 15, + FAILED_WRITE_INTRODUCTION = 16, + FAILED_UNKNOWN_REMOTE_RESPONSE = 17 +}; +bool AttachmentTransmissionStatus_IsValid(int value); +constexpr AttachmentTransmissionStatus AttachmentTransmissionStatus_MIN = UNKNOWN_ATTACHMENT_TRANSMISSION_STATUS; +constexpr AttachmentTransmissionStatus AttachmentTransmissionStatus_MAX = FAILED_UNKNOWN_REMOTE_RESPONSE; +constexpr int AttachmentTransmissionStatus_ARRAYSIZE = AttachmentTransmissionStatus_MAX + 1; + +const std::string& AttachmentTransmissionStatus_Name(AttachmentTransmissionStatus value); +template +inline const std::string& AttachmentTransmissionStatus_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function AttachmentTransmissionStatus_Name."); + return AttachmentTransmissionStatus_Name(static_cast(enum_t_value)); +} +bool AttachmentTransmissionStatus_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, AttachmentTransmissionStatus* value); +enum ProcessReceivedAttachmentsStatus : int { + PROCESSING_STATUS_UNKNOWN = 0, + PROCESSING_STATUS_COMPLETE_PROCESSING_ATTACHMENTS = 1, + PROCESSING_STATUS_FAILED_MOVING_FILES = 2, + PROCESSING_STATUS_FAILED_RECEIVING_APK = 3, + PROCESSING_STATUS_FAILED_RECEIVING_TEXT = 4, + PROCESSING_STATUS_FAILED_RECEIVING_WIFI_CREDENTIALS = 5 +}; +bool ProcessReceivedAttachmentsStatus_IsValid(int value); +constexpr ProcessReceivedAttachmentsStatus ProcessReceivedAttachmentsStatus_MIN = PROCESSING_STATUS_UNKNOWN; +constexpr ProcessReceivedAttachmentsStatus ProcessReceivedAttachmentsStatus_MAX = PROCESSING_STATUS_FAILED_RECEIVING_WIFI_CREDENTIALS; +constexpr int ProcessReceivedAttachmentsStatus_ARRAYSIZE = ProcessReceivedAttachmentsStatus_MAX + 1; + +const std::string& ProcessReceivedAttachmentsStatus_Name(ProcessReceivedAttachmentsStatus value); +template +inline const std::string& ProcessReceivedAttachmentsStatus_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function ProcessReceivedAttachmentsStatus_Name."); + return ProcessReceivedAttachmentsStatus_Name(static_cast(enum_t_value)); +} +bool ProcessReceivedAttachmentsStatus_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, ProcessReceivedAttachmentsStatus* value); +enum SessionStatus : int { + UNKNOWN_SESSION_STATUS = 0, + SUCCEEDED_SESSION_STATUS = 1, + FAILED_SESSION_STATUS = 2 +}; +bool SessionStatus_IsValid(int value); +constexpr SessionStatus SessionStatus_MIN = UNKNOWN_SESSION_STATUS; +constexpr SessionStatus SessionStatus_MAX = FAILED_SESSION_STATUS; +constexpr int SessionStatus_ARRAYSIZE = SessionStatus_MAX + 1; + +const std::string& SessionStatus_Name(SessionStatus value); +template +inline const std::string& SessionStatus_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function SessionStatus_Name."); + return SessionStatus_Name(static_cast(enum_t_value)); +} +bool SessionStatus_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, SessionStatus* value); +enum ResponseToIntroduction : int { + UNKNOWN_RESPONSE_TO_INTRODUCTION = 0, + ACCEPT_INTRODUCTION = 1, + REJECT_INTRODUCTION = 2, + FAIL_INTRODUCTION = 3 +}; +bool ResponseToIntroduction_IsValid(int value); +constexpr ResponseToIntroduction ResponseToIntroduction_MIN = UNKNOWN_RESPONSE_TO_INTRODUCTION; +constexpr ResponseToIntroduction ResponseToIntroduction_MAX = FAIL_INTRODUCTION; +constexpr int ResponseToIntroduction_ARRAYSIZE = ResponseToIntroduction_MAX + 1; + +const std::string& ResponseToIntroduction_Name(ResponseToIntroduction value); +template +inline const std::string& ResponseToIntroduction_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function ResponseToIntroduction_Name."); + return ResponseToIntroduction_Name(static_cast(enum_t_value)); +} +bool ResponseToIntroduction_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, ResponseToIntroduction* value); +enum DeviceType : int { + UNKNOWN_DEVICE_TYPE = 0, + PHONE = 1, + TABLET = 2, + LAPTOP = 3 +}; +bool DeviceType_IsValid(int value); +constexpr DeviceType DeviceType_MIN = UNKNOWN_DEVICE_TYPE; +constexpr DeviceType DeviceType_MAX = LAPTOP; +constexpr int DeviceType_ARRAYSIZE = DeviceType_MAX + 1; + +const std::string& DeviceType_Name(DeviceType value); +template +inline const std::string& DeviceType_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function DeviceType_Name."); + return DeviceType_Name(static_cast(enum_t_value)); +} +bool DeviceType_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, DeviceType* value); +enum OSType : int { + UNKNOWN_OS_TYPE = 0, + ANDROID = 1, + CHROME_OS = 2, + IOS = 3 +}; +bool OSType_IsValid(int value); +constexpr OSType OSType_MIN = UNKNOWN_OS_TYPE; +constexpr OSType OSType_MAX = IOS; +constexpr int OSType_ARRAYSIZE = OSType_MAX + 1; + +const std::string& OSType_Name(OSType value); +template +inline const std::string& OSType_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function OSType_Name."); + return OSType_Name(static_cast(enum_t_value)); +} +bool OSType_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, OSType* value); +enum DeviceRelationship : int { + UNKNOWN_DEVICE_RELATIONSHIP = 0, + IS_SELF = 1, + IS_CONTACT = 2, + IS_STRANGER = 3 +}; +bool DeviceRelationship_IsValid(int value); +constexpr DeviceRelationship DeviceRelationship_MIN = UNKNOWN_DEVICE_RELATIONSHIP; +constexpr DeviceRelationship DeviceRelationship_MAX = IS_STRANGER; +constexpr int DeviceRelationship_ARRAYSIZE = DeviceRelationship_MAX + 1; + +const std::string& DeviceRelationship_Name(DeviceRelationship value); +template +inline const std::string& DeviceRelationship_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function DeviceRelationship_Name."); + return DeviceRelationship_Name(static_cast(enum_t_value)); +} +bool DeviceRelationship_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, DeviceRelationship* value); +enum LogSource : int { + UNSPECIFIED_SOURCE = 0, + LAB_DEVICES = 1, + INTERNAL_DEVICES = 2, + BETA_TESTER_DEVICES = 3, + OEM_DEVICES = 4, + DEBUG_DEVICES = 5 +}; +bool LogSource_IsValid(int value); +constexpr LogSource LogSource_MIN = UNSPECIFIED_SOURCE; +constexpr LogSource LogSource_MAX = DEBUG_DEVICES; +constexpr int LogSource_ARRAYSIZE = LogSource_MAX + 1; + +const std::string& LogSource_Name(LogSource value); +template +inline const std::string& LogSource_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function LogSource_Name."); + return LogSource_Name(static_cast(enum_t_value)); +} +bool LogSource_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, LogSource* value); +enum ServerActionName : int { + UNKNOWN_SERVER_ACTION = 0, + UPLOAD_CERTIFICATES = 1, + DOWNLOAD_CERTIFICATES = 2, + CHECK_REACHABILITY = 3, + UPLOAD_CONTACTS = 4, + UPDATE_DEVICE_NAME = 5, + UPLOAD_SENDER_CERTIFICATES = 6, + DOWNLOAD_SENDER_CERTIFICATES = 7 +}; +bool ServerActionName_IsValid(int value); +constexpr ServerActionName ServerActionName_MIN = UNKNOWN_SERVER_ACTION; +constexpr ServerActionName ServerActionName_MAX = DOWNLOAD_SENDER_CERTIFICATES; +constexpr int ServerActionName_ARRAYSIZE = ServerActionName_MAX + 1; + +const std::string& ServerActionName_Name(ServerActionName value); +template +inline const std::string& ServerActionName_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function ServerActionName_Name."); + return ServerActionName_Name(static_cast(enum_t_value)); +} +bool ServerActionName_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, ServerActionName* value); +enum ServerResponseState : int { + UNKNOWN_SERVER_RESPONSE_STATE = 0, + SERVER_RESPONSE_SUCCESS = 1, + SERVER_RESPONSE_UNKNOWN_FAILURE = 2, + SERVER_RESPONSE_STATUS_OTHER_FAILURE = 3, + SERVER_RESPONSE_STATUS_DEADLINE_EXCEEDED = 4, + SERVER_RESPONSE_STATUS_PERMISSION_DENIED = 5, + SERVER_RESPONSE_STATUS_UNAVAILABLE = 6, + SERVER_RESPONSE_STATUS_UNAUTHENTICATED = 7, + SERVER_RESPONSE_STATUS_INVALID_ARGUMENT = 9, + SERVER_RESPONSE_GOOGLE_AUTH_FAILURE = 8 +}; +bool ServerResponseState_IsValid(int value); +constexpr ServerResponseState ServerResponseState_MIN = UNKNOWN_SERVER_RESPONSE_STATE; +constexpr ServerResponseState ServerResponseState_MAX = SERVER_RESPONSE_STATUS_INVALID_ARGUMENT; +constexpr int ServerResponseState_ARRAYSIZE = ServerResponseState_MAX + 1; + +const std::string& ServerResponseState_Name(ServerResponseState value); +template +inline const std::string& ServerResponseState_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function ServerResponseState_Name."); + return ServerResponseState_Name(static_cast(enum_t_value)); +} +bool ServerResponseState_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, ServerResponseState* value); +enum ScanType : int { + UNKNOWN_SCAN_TYPE = 0, + FOREGROUND_SCAN = 1, + FOREGROUND_RETRY_SCAN = 2, + DIRECT_SHARE_SCAN = 3 +}; +bool ScanType_IsValid(int value); +constexpr ScanType ScanType_MIN = UNKNOWN_SCAN_TYPE; +constexpr ScanType ScanType_MAX = DIRECT_SHARE_SCAN; +constexpr int ScanType_ARRAYSIZE = ScanType_MAX + 1; + +const std::string& ScanType_Name(ScanType value); +template +inline const std::string& ScanType_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function ScanType_Name."); + return ScanType_Name(static_cast(enum_t_value)); +} +bool ScanType_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, ScanType* value); +enum ActivityName : int { + UNKNOWN_ACTIVITY = 0, + SHARE_SHEET_ACTIVITY = 1, + SETTINGS_ACTIVITY = 2, + RECEIVE_SURFACE_ACTIVITY = 3, + SETUP_ACTIVITY = 4, + DEVICE_VISIBILITY_ACTIVITY = 5, + CONSENTS_ACTIVITY = 6, + SET_DEVICE_NAME_DIALOG = 7, + SET_DATA_USAGE_DIALOG = 8 +}; +bool ActivityName_IsValid(int value); +constexpr ActivityName ActivityName_MIN = UNKNOWN_ACTIVITY; +constexpr ActivityName ActivityName_MAX = SET_DATA_USAGE_DIALOG; +constexpr int ActivityName_ARRAYSIZE = ActivityName_MAX + 1; + +const std::string& ActivityName_Name(ActivityName value); +template +inline const std::string& ActivityName_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function ActivityName_Name."); + return ActivityName_Name(static_cast(enum_t_value)); +} +bool ActivityName_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, ActivityName* value); +enum ConsentType : int { + CONSENT_TYPE_UNKNOWN = 0, + CONSENT_TYPE_C11N = 1, + CONSENT_TYPE_DEVICE_CONTACT = 2 +}; +bool ConsentType_IsValid(int value); +constexpr ConsentType ConsentType_MIN = CONSENT_TYPE_UNKNOWN; +constexpr ConsentType ConsentType_MAX = CONSENT_TYPE_DEVICE_CONTACT; +constexpr int ConsentType_ARRAYSIZE = ConsentType_MAX + 1; + +const std::string& ConsentType_Name(ConsentType value); +template +inline const std::string& ConsentType_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function ConsentType_Name."); + return ConsentType_Name(static_cast(enum_t_value)); +} +bool ConsentType_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, ConsentType* value); +enum ConsentAcceptanceStatus : int { + CONSENT_UNKNOWN_ACCEPT_STATUS = 0, + CONSENT_ACCEPTED = 1, + CONSENT_DECLINED = 2, + CONSENT_UNABLE_TO_ENABLE = 3 +}; +bool ConsentAcceptanceStatus_IsValid(int value); +constexpr ConsentAcceptanceStatus ConsentAcceptanceStatus_MIN = CONSENT_UNKNOWN_ACCEPT_STATUS; +constexpr ConsentAcceptanceStatus ConsentAcceptanceStatus_MAX = CONSENT_UNABLE_TO_ENABLE; +constexpr int ConsentAcceptanceStatus_ARRAYSIZE = ConsentAcceptanceStatus_MAX + 1; + +const std::string& ConsentAcceptanceStatus_Name(ConsentAcceptanceStatus value); +template +inline const std::string& ConsentAcceptanceStatus_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function ConsentAcceptanceStatus_Name."); + return ConsentAcceptanceStatus_Name(static_cast(enum_t_value)); +} +bool ConsentAcceptanceStatus_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, ConsentAcceptanceStatus* value); +enum ApkSource : int { + UNKNOWN_APK_SOURCE = 0, + APK_FROM_SD_CARD = 1, + INSTALLED_APP = 2 +}; +bool ApkSource_IsValid(int value); +constexpr ApkSource ApkSource_MIN = UNKNOWN_APK_SOURCE; +constexpr ApkSource ApkSource_MAX = INSTALLED_APP; +constexpr int ApkSource_ARRAYSIZE = ApkSource_MAX + 1; + +const std::string& ApkSource_Name(ApkSource value); +template +inline const std::string& ApkSource_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function ApkSource_Name."); + return ApkSource_Name(static_cast(enum_t_value)); +} +bool ApkSource_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, ApkSource* value); +enum InstallAPKStatus : int { + UNKNOWN_INSTALL_APK_STATUS = 0, + FAIL_INSTALLATION = 1, + SUCCESS_INSTALLATION = 2 +}; +bool InstallAPKStatus_IsValid(int value); +constexpr InstallAPKStatus InstallAPKStatus_MIN = UNKNOWN_INSTALL_APK_STATUS; +constexpr InstallAPKStatus InstallAPKStatus_MAX = SUCCESS_INSTALLATION; +constexpr int InstallAPKStatus_ARRAYSIZE = InstallAPKStatus_MAX + 1; + +const std::string& InstallAPKStatus_Name(InstallAPKStatus value); +template +inline const std::string& InstallAPKStatus_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function InstallAPKStatus_Name."); + return InstallAPKStatus_Name(static_cast(enum_t_value)); +} +bool InstallAPKStatus_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, InstallAPKStatus* value); +enum VerifyAPKStatus : int { + UNKNOWN_VERIFY_APK_STATUS = 0, + NOT_INSTALLABLE = 1, + INSTALLABLE = 2, + ALREADY_INSTALLED = 3 +}; +bool VerifyAPKStatus_IsValid(int value); +constexpr VerifyAPKStatus VerifyAPKStatus_MIN = UNKNOWN_VERIFY_APK_STATUS; +constexpr VerifyAPKStatus VerifyAPKStatus_MAX = ALREADY_INSTALLED; +constexpr int VerifyAPKStatus_ARRAYSIZE = VerifyAPKStatus_MAX + 1; + +const std::string& VerifyAPKStatus_Name(VerifyAPKStatus value); +template +inline const std::string& VerifyAPKStatus_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function VerifyAPKStatus_Name."); + return VerifyAPKStatus_Name(static_cast(enum_t_value)); +} +bool VerifyAPKStatus_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, VerifyAPKStatus* value); +enum ShowNotificationStatus : int { + UNKNOWN_SHOW_NOTIFICATION_STATUS = 0, + SHOW = 1, + NOT_SHOW = 2 +}; +bool ShowNotificationStatus_IsValid(int value); +constexpr ShowNotificationStatus ShowNotificationStatus_MIN = UNKNOWN_SHOW_NOTIFICATION_STATUS; +constexpr ShowNotificationStatus ShowNotificationStatus_MAX = NOT_SHOW; +constexpr int ShowNotificationStatus_ARRAYSIZE = ShowNotificationStatus_MAX + 1; + +const std::string& ShowNotificationStatus_Name(ShowNotificationStatus value); +template +inline const std::string& ShowNotificationStatus_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function ShowNotificationStatus_Name."); + return ShowNotificationStatus_Name(static_cast(enum_t_value)); +} +bool ShowNotificationStatus_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, ShowNotificationStatus* value); +enum PermissionRequestResult : int { + PERMISSION_UNKNOWN_REQUEST_RESULT = 0, + PERMISSION_GRANTED = 1, + PERMISSION_REJECTED = 2, + PERMISSION_UNABLE_TO_GRANT = 3 +}; +bool PermissionRequestResult_IsValid(int value); +constexpr PermissionRequestResult PermissionRequestResult_MIN = PERMISSION_UNKNOWN_REQUEST_RESULT; +constexpr PermissionRequestResult PermissionRequestResult_MAX = PERMISSION_UNABLE_TO_GRANT; +constexpr int PermissionRequestResult_ARRAYSIZE = PermissionRequestResult_MAX + 1; + +const std::string& PermissionRequestResult_Name(PermissionRequestResult value); +template +inline const std::string& PermissionRequestResult_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function PermissionRequestResult_Name."); + return PermissionRequestResult_Name(static_cast(enum_t_value)); +} +bool PermissionRequestResult_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, PermissionRequestResult* value); +enum PermissionRequestType : int { + PERMISSION_UNKNOWN_TYPE = 0, + PERMISSION_AIRPLANE_MODE_OFF = 1, + PERMISSION_WIFI = 2, + PERMISSION_BLUETOOTH = 3, + PERMISSION_LOCATION = 4 +}; +bool PermissionRequestType_IsValid(int value); +constexpr PermissionRequestType PermissionRequestType_MIN = PERMISSION_UNKNOWN_TYPE; +constexpr PermissionRequestType PermissionRequestType_MAX = PERMISSION_LOCATION; +constexpr int PermissionRequestType_ARRAYSIZE = PermissionRequestType_MAX + 1; + +const std::string& PermissionRequestType_Name(PermissionRequestType value); +template +inline const std::string& PermissionRequestType_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function PermissionRequestType_Name."); + return PermissionRequestType_Name(static_cast(enum_t_value)); +} +bool PermissionRequestType_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, PermissionRequestType* value); +// =================================================================== + + +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ + +// @@protoc_insertion_point(namespace_scope) + +} // namespace sharing +} // namespace proto +} // namespace nearby +} // namespace location + +PROTOBUF_NAMESPACE_OPEN + +template <> struct is_proto_enum< ::location::nearby::proto::sharing::EventType> : ::std::true_type {}; +template <> struct is_proto_enum< ::location::nearby::proto::sharing::EventCategory> : ::std::true_type {}; +template <> struct is_proto_enum< ::location::nearby::proto::sharing::NearbySharingStatus> : ::std::true_type {}; +template <> struct is_proto_enum< ::location::nearby::proto::sharing::Visibility> : ::std::true_type {}; +template <> struct is_proto_enum< ::location::nearby::proto::sharing::DataUsage> : ::std::true_type {}; +template <> struct is_proto_enum< ::location::nearby::proto::sharing::EstablishConnectionStatus> : ::std::true_type {}; +template <> struct is_proto_enum< ::location::nearby::proto::sharing::AttachmentTransmissionStatus> : ::std::true_type {}; +template <> struct is_proto_enum< ::location::nearby::proto::sharing::ProcessReceivedAttachmentsStatus> : ::std::true_type {}; +template <> struct is_proto_enum< ::location::nearby::proto::sharing::SessionStatus> : ::std::true_type {}; +template <> struct is_proto_enum< ::location::nearby::proto::sharing::ResponseToIntroduction> : ::std::true_type {}; +template <> struct is_proto_enum< ::location::nearby::proto::sharing::DeviceType> : ::std::true_type {}; +template <> struct is_proto_enum< ::location::nearby::proto::sharing::OSType> : ::std::true_type {}; +template <> struct is_proto_enum< ::location::nearby::proto::sharing::DeviceRelationship> : ::std::true_type {}; +template <> struct is_proto_enum< ::location::nearby::proto::sharing::LogSource> : ::std::true_type {}; +template <> struct is_proto_enum< ::location::nearby::proto::sharing::ServerActionName> : ::std::true_type {}; +template <> struct is_proto_enum< ::location::nearby::proto::sharing::ServerResponseState> : ::std::true_type {}; +template <> struct is_proto_enum< ::location::nearby::proto::sharing::ScanType> : ::std::true_type {}; +template <> struct is_proto_enum< ::location::nearby::proto::sharing::ActivityName> : ::std::true_type {}; +template <> struct is_proto_enum< ::location::nearby::proto::sharing::ConsentType> : ::std::true_type {}; +template <> struct is_proto_enum< ::location::nearby::proto::sharing::ConsentAcceptanceStatus> : ::std::true_type {}; +template <> struct is_proto_enum< ::location::nearby::proto::sharing::ApkSource> : ::std::true_type {}; +template <> struct is_proto_enum< ::location::nearby::proto::sharing::InstallAPKStatus> : ::std::true_type {}; +template <> struct is_proto_enum< ::location::nearby::proto::sharing::VerifyAPKStatus> : ::std::true_type {}; +template <> struct is_proto_enum< ::location::nearby::proto::sharing::ShowNotificationStatus> : ::std::true_type {}; +template <> struct is_proto_enum< ::location::nearby::proto::sharing::PermissionRequestResult> : ::std::true_type {}; +template <> struct is_proto_enum< ::location::nearby::proto::sharing::PermissionRequestType> : ::std::true_type {}; + +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_proto_2fsharing_5fenums_2eproto diff --git a/third_party/google-toolbox-for-mac/include/GTMDefines.h b/third_party/google-toolbox-for-mac/include/GTMDefines.h new file mode 100644 index 00000000..c968aa1b --- /dev/null +++ b/third_party/google-toolbox-for-mac/include/GTMDefines.h @@ -0,0 +1,380 @@ +// +// GTMDefines.h +// +// Copyright 2008 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); you may not +// use this file except in compliance with the License. You may obtain a copy +// of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations under +// the License. +// + +// ============================================================================ + +#include +#include + +#ifdef __OBJC__ +#include +#endif // __OBJC__ + +#if TARGET_OS_IPHONE +#include +#endif // TARGET_OS_IPHONE + +// ---------------------------------------------------------------------------- +// CPP symbols that can be overridden in a prefix to control how the toolbox +// is compiled. +// ---------------------------------------------------------------------------- + + +// By setting the GTM_CONTAINERS_VALIDATION_FAILED_LOG and +// GTM_CONTAINERS_VALIDATION_FAILED_ASSERT macros you can control what happens +// when a validation fails. If you implement your own validators, you may want +// to control their internals using the same macros for consistency. +#ifndef GTM_CONTAINERS_VALIDATION_FAILED_ASSERT + #define GTM_CONTAINERS_VALIDATION_FAILED_ASSERT 0 +#endif + +// Ensure __has_feature and __has_extension are safe to use. +// See http://clang-analyzer.llvm.org/annotations.html +#ifndef __has_feature // Optional. + #define __has_feature(x) 0 // Compatibility with non-clang compilers. +#endif + +#ifndef __has_extension + #define __has_extension __has_feature // Compatibility with pre-3.0 compilers. +#endif + +// Give ourselves a consistent way to do inlines. Apple's macros even use +// a few different actual definitions, so we're based off of the foundation +// one. +#if !defined(GTM_INLINE) + #if (defined (__GNUC__) && (__GNUC__ == 4)) || defined (__clang__) + #define GTM_INLINE static __inline__ __attribute__((always_inline)) + #else + #define GTM_INLINE static __inline__ + #endif +#endif + +// Give ourselves a consistent way of doing externs that links up nicely +// when mixing objc and objc++ +#if !defined (GTM_EXTERN) + #if defined __cplusplus + #define GTM_EXTERN extern "C" + #define GTM_EXTERN_C_BEGIN extern "C" { + #define GTM_EXTERN_C_END } + #else + #define GTM_EXTERN extern + #define GTM_EXTERN_C_BEGIN + #define GTM_EXTERN_C_END + #endif +#endif + +// Give ourselves a consistent way of exporting things if we have visibility +// set to hidden. +#if !defined (GTM_EXPORT) + #define GTM_EXPORT __attribute__((visibility("default"))) +#endif + +// Give ourselves a consistent way of declaring something as unused. This +// doesn't use __unused because that is only supported in gcc 4.2 and greater. +#if !defined (GTM_UNUSED) +#define GTM_UNUSED(x) ((void)(x)) +#endif + +// _GTMDevLog & _GTMDevAssert +// +// _GTMDevLog & _GTMDevAssert are meant to be a very lightweight shell for +// developer level errors. This implementation simply macros to NSLog/NSAssert. +// It is not intended to be a general logging/reporting system. +// +// Please see http://code.google.com/p/google-toolbox-for-mac/wiki/DevLogNAssert +// for a little more background on the usage of these macros. +// +// _GTMDevLog log some error/problem in debug builds +// _GTMDevAssert assert if condition isn't met w/in a method/function +// in all builds. +// +// To replace this system, just provide different macro definitions in your +// prefix header. Remember, any implementation you provide *must* be thread +// safe since this could be called by anything in what ever situation it has +// been placed in. +// + +// Ignore the "Macro name is a reserved identifier" warning in this section +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wreserved-id-macro" + +// We only define the simple macros if nothing else has defined this. +#ifndef _GTMDevLog + +#ifdef DEBUG + #define _GTMDevLog(...) NSLog(__VA_ARGS__) +#else + #define _GTMDevLog(...) do { } while (0) +#endif + +#endif // _GTMDevLog + +#ifndef _GTMDevAssert +// we directly invoke the NSAssert handler so we can pass on the varargs +// (NSAssert doesn't have a macro we can use that takes varargs) +#if !defined(NS_BLOCK_ASSERTIONS) + #define _GTMDevAssert(condition, ...) \ + do { \ + if (__builtin_expect(!(condition), 0)) { \ + NSString *__assert_func_name__ = \ + [NSString stringWithUTF8String:__PRETTY_FUNCTION__]; \ + __assert_func_name__ = __assert_func_name__ ?: @""; \ + NSString *__assert_file_name__ = \ + [NSString stringWithUTF8String:__FILE__]; \ + __assert_file_name__ = __assert_file_name__ ?: @""; \ + [[NSAssertionHandler currentHandler] \ + handleFailureInFunction:__assert_func_name__ \ + file:__assert_file_name__ \ + lineNumber:__LINE__ \ + description:__VA_ARGS__]; \ + } \ + } while(0) +#else // !defined(NS_BLOCK_ASSERTIONS) + #define _GTMDevAssert(condition, ...) do { } while (0) +#endif // !defined(NS_BLOCK_ASSERTIONS) + +#endif // _GTMDevAssert + +// _GTMCompileAssert +// +// Note: Software for current compilers should just use _Static_assert directly +// instead of this macro. +// +// _GTMCompileAssert is an assert that is meant to fire at compile time if you +// want to check things at compile instead of runtime. For example if you +// want to check that a wchar is 4 bytes instead of 2 you would use +// _GTMCompileAssert(sizeof(wchar_t) == 4, wchar_t_is_4_bytes_on_OS_X) +// Note that the second "arg" is not in quotes, and must be a valid processor +// symbol in it's own right (no spaces, punctuation etc). + +// Wrapping this in an #ifndef allows external groups to define their own +// compile time assert scheme. +#ifndef _GTMCompileAssert + #if __has_feature(c_static_assert) || __has_extension(c_static_assert) + #define _GTMCompileAssert(test, msg) _Static_assert((test), #msg) + #else + // Pre-Xcode 7 support. + // + // We got this technique from here: + // http://unixjunkie.blogspot.com/2007/10/better-compile-time-asserts_29.html + #define _GTMCompileAssertSymbolInner(line, msg) _GTMCOMPILEASSERT ## line ## __ ## msg + #define _GTMCompileAssertSymbol(line, msg) _GTMCompileAssertSymbolInner(line, msg) + #define _GTMCompileAssert(test, msg) \ + typedef char _GTMCompileAssertSymbol(__LINE__, msg) [ ((test) ? 1 : -1) ] + #endif // __has_feature(c_static_assert) || __has_extension(c_static_assert) +#endif // _GTMCompileAssert + +#pragma clang diagnostic pop + +// ---------------------------------------------------------------------------- +// CPP symbols defined based on the project settings so the GTM code has +// simple things to test against w/o scattering the knowledge of project +// setting through all the code. +// ---------------------------------------------------------------------------- + +// Provide a single constant CPP symbol that all of GTM uses for ifdefing +// iPhone code. +#if TARGET_OS_IPHONE // iPhone SDK + // For iPhone specific stuff + #define GTM_IPHONE_SDK 1 + #if TARGET_IPHONE_SIMULATOR + #define GTM_IPHONE_DEVICE 0 + #define GTM_IPHONE_SIMULATOR 1 + #else + #define GTM_IPHONE_DEVICE 1 + #define GTM_IPHONE_SIMULATOR 0 + #endif // TARGET_IPHONE_SIMULATOR + // By default, GTM has provided it's own unittesting support, define this + // to use the support provided by Xcode, especially for the Xcode4 support + // for unittesting. + #ifndef GTM_USING_XCTEST + #define GTM_USING_XCTEST 0 + #endif + #define GTM_MACOS_SDK 0 +#else + // For MacOS specific stuff + #define GTM_MACOS_SDK 1 + #define GTM_IPHONE_SDK 0 + #define GTM_IPHONE_SIMULATOR 0 + #define GTM_IPHONE_DEVICE 0 + #ifndef GTM_USING_XCTEST + #define GTM_USING_XCTEST 0 + #endif +#endif + +// Some of our own availability macros +#if GTM_MACOS_SDK +#define GTM_AVAILABLE_ONLY_ON_IPHONE UNAVAILABLE_ATTRIBUTE +#define GTM_AVAILABLE_ONLY_ON_MACOS +#else +#define GTM_AVAILABLE_ONLY_ON_IPHONE +#define GTM_AVAILABLE_ONLY_ON_MACOS UNAVAILABLE_ATTRIBUTE +#endif + +// GC was dropped by Apple, define the old constant incase anyone still keys +// off of it. +#ifndef GTM_SUPPORT_GC + #define GTM_SUPPORT_GC 0 +#endif + +// Some support for advanced clang static analysis functionality +#ifndef NS_RETURNS_RETAINED + #if __has_feature(attribute_ns_returns_retained) + #define NS_RETURNS_RETAINED __attribute__((ns_returns_retained)) + #else + #define NS_RETURNS_RETAINED + #endif +#endif + +#ifndef NS_RETURNS_NOT_RETAINED + #if __has_feature(attribute_ns_returns_not_retained) + #define NS_RETURNS_NOT_RETAINED __attribute__((ns_returns_not_retained)) + #else + #define NS_RETURNS_NOT_RETAINED + #endif +#endif + +#ifndef CF_RETURNS_RETAINED + #if __has_feature(attribute_cf_returns_retained) + #define CF_RETURNS_RETAINED __attribute__((cf_returns_retained)) + #else + #define CF_RETURNS_RETAINED + #endif +#endif + +#ifndef CF_RETURNS_NOT_RETAINED + #if __has_feature(attribute_cf_returns_not_retained) + #define CF_RETURNS_NOT_RETAINED __attribute__((cf_returns_not_retained)) + #else + #define CF_RETURNS_NOT_RETAINED + #endif +#endif + +#ifndef NS_CONSUMED + #if __has_feature(attribute_ns_consumed) + #define NS_CONSUMED __attribute__((ns_consumed)) + #else + #define NS_CONSUMED + #endif +#endif + +#ifndef CF_CONSUMED + #if __has_feature(attribute_cf_consumed) + #define CF_CONSUMED __attribute__((cf_consumed)) + #else + #define CF_CONSUMED + #endif +#endif + +#ifndef NS_CONSUMES_SELF + #if __has_feature(attribute_ns_consumes_self) + #define NS_CONSUMES_SELF __attribute__((ns_consumes_self)) + #else + #define NS_CONSUMES_SELF + #endif +#endif + +#ifndef GTM_NONNULL + #if defined(__has_attribute) + #if __has_attribute(nonnull) + #define GTM_NONNULL(x) __attribute__((nonnull x)) + #else + #define GTM_NONNULL(x) + #endif + #else + #define GTM_NONNULL(x) + #endif +#endif + +// Invalidates the initializer from which it's called. +#ifndef GTMInvalidateInitializer + #if __has_feature(objc_arc) + #define GTMInvalidateInitializer() \ + do { \ + [self class]; /* Avoid warning of dead store to |self|. */ \ + _GTMDevAssert(NO, @"Invalid initializer."); \ + return nil; \ + } while (0) + #else + #define GTMInvalidateInitializer() \ + do { \ + [self release]; \ + _GTMDevAssert(NO, @"Invalid initializer."); \ + return nil; \ + } while (0) + #endif +#endif + +#ifndef GTMCFAutorelease + // GTMCFAutorelease returns an id. In contrast, Apple's CFAutorelease returns + // a CFTypeRef. + #if __has_feature(objc_arc) + #define GTMCFAutorelease(x) CFBridgingRelease(x) + #else + #define GTMCFAutorelease(x) ([(id)x autorelease]) + #endif +#endif + +#ifdef __OBJC__ + + +// Macro to allow you to create NSStrings out of other macros. +// #define FOO foo +// NSString *fooString = GTM_NSSTRINGIFY(FOO); +#if !defined (GTM_NSSTRINGIFY) + #define GTM_NSSTRINGIFY_INNER(x) @#x + #define GTM_NSSTRINGIFY(x) GTM_NSSTRINGIFY_INNER(x) +#endif + +// ============================================================================ + +// GTM_SEL_STRING is for specifying selector (usually property) names to KVC +// or KVO methods. +// In debug it will generate warnings for undeclared selectors if +// -Wunknown-selector is turned on. +// In release it will have no runtime overhead. +#ifndef GTM_SEL_STRING + #ifdef DEBUG + #define GTM_SEL_STRING(selName) NSStringFromSelector(@selector(selName)) + #else + #define GTM_SEL_STRING(selName) @#selName + #endif // DEBUG +#endif // GTM_SEL_STRING + +#ifndef GTM_WEAK +#if __has_feature(objc_arc_weak) + // With ARC enabled, __weak means a reference that isn't implicitly + // retained. __weak objects are accessed through runtime functions, so + // they are zeroed out, but this requires OS X 10.7+. + // At clang r251041+, ARC-style zeroing weak references even work in + // non-ARC mode. + #define GTM_WEAK __weak + #elif __has_feature(objc_arc) + // ARC, but targeting 10.6 or older, where zeroing weak references don't + // exist. + #define GTM_WEAK __unsafe_unretained + #else + // With manual reference counting, __weak used to be silently ignored. + // clang r251041 gives it the ARC semantics instead. This means they + // now require a deployment target of 10.7, while some clients of GTM + // still target 10.6. In these cases, expand to __unsafe_unretained instead + #define GTM_WEAK + #endif +#endif + +#endif // __OBJC__ diff --git a/third_party/google-toolbox-for-mac/include/GoogleToolboxForMac/GTMLogger.h b/third_party/google-toolbox-for-mac/include/GoogleToolboxForMac/GTMLogger.h new file mode 100644 index 00000000..0d40e080 --- /dev/null +++ b/third_party/google-toolbox-for-mac/include/GoogleToolboxForMac/GTMLogger.h @@ -0,0 +1,526 @@ +// +// GTMLogger.h +// +// Copyright 2007-2008 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); you may not +// use this file except in compliance with the License. You may obtain a copy +// of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations under +// the License. +// + +// Key Abstractions +// ---------------- +// +// This file declares multiple classes and protocols that are used by the +// GTMLogger logging system. The 4 main abstractions used in this file are the +// following: +// +// * logger (GTMLogger) - The main logging class that users interact with. It +// has methods for logging at different levels and uses a log writer, a log +// formatter, and a log filter to get the job done. +// +// * log writer (GTMLogWriter) - Writes a given string to some log file, where +// a "log file" can be a physical file on disk, a POST over HTTP to some URL, +// or even some in-memory structure (e.g., a ring buffer). +// +// * log formatter (GTMLogFormatter) - Given a format string and arguments as +// a va_list, returns a single formatted NSString. A "formatted string" could +// be a string with the date prepended, a string with values in a CSV format, +// or even a string of XML. +// +// * log filter (GTMLogFilter) - Given a formatted log message as an NSString +// and the level at which the message is to be logged, this class will decide +// whether the given message should be logged or not. This is a flexible way +// to filter out messages logged at a certain level, messages that contain +// certain text, or filter nothing out at all. This gives the caller the +// flexibility to dynamically enable debug logging in Release builds. +// +// This file also declares some classes to handle the common log writer, log +// formatter, and log filter cases. Callers can also create their own writers, +// formatters, and filters and they can even build them on top of the ones +// declared here. Keep in mind that your custom writer/formatter/filter may be +// called from multiple threads, so it must be thread-safe. + +#import +#import "GTMDefines.h" + +// Predeclaration of used protocols that are declared later in this file. +@protocol GTMLogWriter, GTMLogFormatter, GTMLogFilter; + +// GTMLogger +// +// GTMLogger is the primary user-facing class for an object-oriented logging +// system. It is built on the concept of log formatters (GTMLogFormatter), log +// writers (GTMLogWriter), and log filters (GTMLogFilter). When a message is +// sent to a GTMLogger to log a message, the message is formatted using the log +// formatter, then the log filter is consulted to see if the message should be +// logged, and if so, the message is sent to the log writer to be written out. +// +// GTMLogger is intended to be a flexible and thread-safe logging solution. Its +// flexibility comes from the fact that GTMLogger instances can be customized +// with user defined formatters, filters, and writers. And these writers, +// filters, and formatters can be combined, stacked, and customized in arbitrary +// ways to suit the needs at hand. For example, multiple writers can be used at +// the same time, and a GTMLogger instance can even be used as another +// GTMLogger's writer. This allows for arbitrarily deep logging trees. +// +// A standard GTMLogger uses a writer that sends messages to standard out, a +// formatter that smacks a timestamp and a few other bits of interesting +// information on the message, and a filter that filters out debug messages from +// release builds. Using the standard log settings, a log message will look like +// the following: +// +// 2007-12-30 10:29:24.177 myapp[4588/0xa07d0f60] [lvl=1] foo= +// +// The output contains the date and time of the log message, the name of the +// process followed by its process ID/thread ID, the log level at which the +// message was logged (in the previous example the level was 1: +// kGTMLoggerLevelDebug), and finally, the user-specified log message itself (in +// this case, the log message was @"foo=%@", foo). +// +// Multiple instances of GTMLogger can be created, each configured their own +// way. Though GTMLogger is not a singleton (in the GoF sense), it does provide +// access to a shared (i.e., globally accessible) GTMLogger instance. This makes +// it convenient for all code in a process to use the same GTMLogger instance. +// The shared GTMLogger instance can also be configured in an arbitrary, and +// these configuration changes will affect all code that logs through the shared +// instance. + +// +// Log Levels +// ---------- +// GTMLogger has 3 different log levels: Debug, Info, and Error. GTMLogger +// doesn't take any special action based on the log level; it simply forwards +// this information on to formatters, filters, and writers, each of which may +// optionally take action based on the level. Since log level filtering is +// performed at runtime, log messages are typically not filtered out at compile +// time. The exception to this rule is that calls to the GTMLoggerDebug() macro +// *ARE* filtered out of non-DEBUG builds. This is to be backwards compatible +// with behavior that many developers are currently used to. Note that this +// means that GTMLoggerDebug(@"hi") will be compiled out of Release builds, but +// [[GTMLogger sharedLogger] logDebug:@"hi"] will NOT be compiled out. +// +// Standard loggers are created with the GTMLogLevelFilter log filter, which +// filters out certain log messages based on log level, and some other settings. +// +// In addition to the -logDebug:, -logInfo:, and -logError: methods defined on +// GTMLogger itself, there are also C macros that make usage of the shared +// GTMLogger instance very convenient. These macros are: +// +// GTMLoggerDebug(...) +// GTMLoggerInfo(...) +// GTMLoggerError(...) +// +// Again, a notable feature of these macros is that GTMLogDebug() calls *will be +// compiled out of non-DEBUG builds*. +// +// Standard Loggers +// ---------------- +// GTMLogger has the concept of "standard loggers". A standard logger is simply +// a logger that is pre-configured with some standard/common writer, formatter, +// and filter combination. Standard loggers are created using the creation +// methods beginning with "standard". The alternative to a standard logger is a +// regular logger, which will send messages to stdout, with no special +// formatting, and no filtering. +// +// How do I use GTMLogger? +// ---------------------- +// The typical way you will want to use GTMLogger is to simply use the +// GTMLogger*() macros for logging from code. That way we can easily make +// changes to the GTMLogger class and simply update the macros accordingly. Only +// your application startup code (perhaps, somewhere in main()) should use the +// GTMLogger class directly in order to configure the shared logger, which all +// of the code using the macros will be using. Again, this is just the typical +// situation. +// +// To be complete, there are cases where you may want to use GTMLogger directly, +// or even create separate GTMLogger instances for some reason. That's fine, +// too. +// +// Examples +// -------- +// The following show some common GTMLogger use cases. +// +// 1. You want to log something as simply as possible. Also, this call will only +// appear in debug builds. In non-DEBUG builds it will be completely removed. +// +// GTMLoggerDebug(@"foo = %@", foo); +// +// 2. The previous example is similar to the following. The major difference is +// that the previous call (example 1) will be compiled out of Release builds +// but this statement will not be compiled out. +// +// [[GTMLogger sharedLogger] logDebug:@"foo = %@", foo]; +// +// 3. Send all logging output from the shared logger to a file. We do this by +// creating an NSFileHandle for writing associated with a file, and setting +// that file handle as the logger's writer. +// +// NSFileHandle *f = [NSFileHandle fileHandleForWritingAtPath:@"/tmp/f.log" +// create:YES]; +// [[GTMLogger sharedLogger] setWriter:f]; +// GTMLoggerError(@"hi"); // This will be sent to /tmp/f.log +// +// 4. Create a new GTMLogger that will log to a file. This example differs from +// the previous one because here we create a new GTMLogger that is different +// from the shared logger. +// +// GTMLogger *logger = [GTMLogger standardLoggerWithPath:@"/tmp/temp.log"]; +// [logger logInfo:@"hi temp log file"]; +// +// 5. Create a logger that writes to stdout and does NOT do any formatting to +// the log message. This might be useful, for example, when writing a help +// screen for a command-line tool to standard output. +// +// GTMLogger *logger = [GTMLogger logger]; +// [logger logInfo:@"%@ version 0.1 usage", progName]; +// +// 6. Send log output to stdout AND to a log file. The trick here is that +// NSArrays function as composite log writers, which means when an array is +// set as the log writer, it forwards all logging messages to all of its +// contained GTMLogWriters. +// +// // Create array of GTMLogWriters +// NSArray *writers = [NSArray arrayWithObjects: +// [NSFileHandle fileHandleForWritingAtPath:@"/tmp/f.log" create:YES], +// [NSFileHandle fileHandleWithStandardOutput], nil]; +// +// GTMLogger *logger = [GTMLogger standardLogger]; +// [logger setWriter:writers]; +// [logger logInfo:@"hi"]; // Output goes to stdout and /tmp/f.log +// +// For futher details on log writers, formatters, and filters, see the +// documentation below. +// +// NOTE: GTMLogger is application level logging. By default it does nothing +// with _GTMDevLog/_GTMDevAssert (see GTMDefines.h). An application can choose +// to bridge _GTMDevLog/_GTMDevAssert to GTMLogger by providing macro +// definitions in its prefix header (see GTMDefines.h for how one would do +// that). +// +@interface GTMLogger : NSObject { + @private + id writer_; + id formatter_; + id filter_; +} + +// +// Accessors for the shared logger instance +// + +// Returns a shared/global standard GTMLogger instance. Callers should typically +// use this method to get a GTMLogger instance, unless they explicitly want +// their own instance to configure for their own needs. This is the only method +// that returns a shared instance; all the rest return new GTMLogger instances. ++ (id)sharedLogger; + +// Sets the shared logger instance to |logger|. Future calls to +sharedLogger +// will return |logger| instead. ++ (void)setSharedLogger:(GTMLogger *)logger; + +// +// Creation methods +// + +// Returns a new autoreleased GTMLogger instance that will log to stdout, using +// the GTMLogStandardFormatter, and the GTMLogLevelFilter filter. ++ (id)standardLogger; + +// Same as +standardLogger, but logs to stderr. ++ (id)standardLoggerWithStderr; + +// Same as +standardLogger but levels >= kGTMLoggerLevelError are routed to +// stderr, everything else goes to stdout. ++ (id)standardLoggerWithStdoutAndStderr; + +// Returns a new standard GTMLogger instance with a log writer that will +// write to the file at |path|, and will use the GTMLogStandardFormatter and +// GTMLogLevelFilter classes. If |path| does not exist, it will be created. ++ (id)standardLoggerWithPath:(NSString *)path; + +// Returns an autoreleased GTMLogger instance that will use the specified +// |writer|, |formatter|, and |filter|. ++ (id)loggerWithWriter:(id)writer + formatter:(id)formatter + filter:(id)filter; + +// Returns an autoreleased GTMLogger instance that logs to stdout, with the +// basic formatter, and no filter. The returned logger differs from the logger +// returned by +standardLogger because this one does not do any filtering and +// does not do any special log formatting; this is the difference between a +// "regular" logger and a "standard" logger. ++ (id)logger; + +// Designated initializer. This method returns a GTMLogger initialized with the +// specified |writer|, |formatter|, and |filter|. See the setter methods below +// for what values will be used if nil is passed for a parameter. +- (id)initWithWriter:(id)writer + formatter:(id)formatter + filter:(id)filter; + +// +// Logging methods +// + +// Logs a message at the debug level (kGTMLoggerLevelDebug). +- (void)logDebug:(NSString *)fmt, ... NS_FORMAT_FUNCTION(1, 2); +// Logs a message at the info level (kGTMLoggerLevelInfo). +- (void)logInfo:(NSString *)fmt, ... NS_FORMAT_FUNCTION(1, 2); +// Logs a message at the error level (kGTMLoggerLevelError). +- (void)logError:(NSString *)fmt, ... NS_FORMAT_FUNCTION(1, 2); +// Logs a message at the assert level (kGTMLoggerLevelAssert). +- (void)logAssert:(NSString *)fmt, ... NS_FORMAT_FUNCTION(1, 2); + + +// +// Accessors +// + +// Accessor methods for the log writer. If the log writer is set to nil, +// [NSFileHandle fileHandleWithStandardOutput] is used. +- (id)writer; +- (void)setWriter:(id)writer; + +// Accessor methods for the log formatter. If the log formatter is set to nil, +// GTMLogBasicFormatter is used. This formatter will format log messages in a +// plain printf style. +- (id)formatter; +- (void)setFormatter:(id)formatter; + +// Accessor methods for the log filter. If the log filter is set to nil, +// GTMLogNoFilter is used, which allows all log messages through. +- (id)filter; +- (void)setFilter:(id)filter; + +@end // GTMLogger + + +// Helper functions that are used by the convenience GTMLogger*() macros that +// enable the logging of function names. +@interface GTMLogger (GTMLoggerMacroHelpers) +- (void)logFuncDebug:(const char *)func msg:(NSString *)fmt, ... + NS_FORMAT_FUNCTION(2, 3); +- (void)logFuncInfo:(const char *)func msg:(NSString *)fmt, ... + NS_FORMAT_FUNCTION(2, 3); +- (void)logFuncError:(const char *)func msg:(NSString *)fmt, ... + NS_FORMAT_FUNCTION(2, 3); +- (void)logFuncAssert:(const char *)func msg:(NSString *)fmt, ... + NS_FORMAT_FUNCTION(2, 3); +@end // GTMLoggerMacroHelpers + + +// The convenience macros are only defined if they haven't already been defined. +#ifndef GTMLoggerInfo + +// Convenience macros that log to the shared GTMLogger instance. These macros +// are how users should typically log to GTMLogger. Notice that GTMLoggerDebug() +// calls will be compiled out of non-Debug builds. +#define GTMLoggerDebug(...) \ + [[GTMLogger sharedLogger] logFuncDebug:__func__ msg:__VA_ARGS__] +#define GTMLoggerInfo(...) \ + [[GTMLogger sharedLogger] logFuncInfo:__func__ msg:__VA_ARGS__] +#define GTMLoggerError(...) \ + [[GTMLogger sharedLogger] logFuncError:__func__ msg:__VA_ARGS__] +#define GTMLoggerAssert(...) \ + [[GTMLogger sharedLogger] logFuncAssert:__func__ msg:__VA_ARGS__] + +// If we're not in a debug build, remove the GTMLoggerDebug statements. This +// makes calls to GTMLoggerDebug "compile out" of Release builds +#ifndef DEBUG +#undef GTMLoggerDebug +#define GTMLoggerDebug(...) do {} while(0) +#endif + +#endif // !defined(GTMLoggerInfo) + +// Log levels. +typedef enum { + kGTMLoggerLevelUnknown, + kGTMLoggerLevelDebug, + kGTMLoggerLevelInfo, + kGTMLoggerLevelError, + kGTMLoggerLevelAssert, +} GTMLoggerLevel; + + +// +// Log Writers +// + +// Protocol to be implemented by a GTMLogWriter instance. +@protocol GTMLogWriter +// Writes the given log message to where the log writer is configured to write. +- (void)logMessage:(NSString *)msg level:(GTMLoggerLevel)level; +@end // GTMLogWriter + + +// Simple category on NSFileHandle that makes NSFileHandles valid log writers. +// This is convenient because something like, say, +fileHandleWithStandardError +// now becomes a valid log writer. Log messages are written to the file handle +// with a newline appended. +@interface NSFileHandle (GTMFileHandleLogWriter) +// Opens the file at |path| in append mode, and creates the file with |mode| +// if it didn't previously exist. ++ (id)fileHandleForLoggingAtPath:(NSString *)path mode:(mode_t)mode; +@end // NSFileHandle + + +// This category makes NSArray a GTMLogWriter that can be composed of other +// GTMLogWriters. This is the classic Composite GoF design pattern. When the +// GTMLogWriter -logMessage:level: message is sent to the array, the array +// forwards the message to all of its elements that implement the GTMLogWriter +// protocol. +// +// This is useful in situations where you would like to send log output to +// multiple log writers at the same time. Simply create an NSArray of the log +// writers you wish to use, then set the array as the "writer" for your +// GTMLogger instance. +@interface NSArray (GTMArrayCompositeLogWriter) +@end // GTMArrayCompositeLogWriter + + +// This category adapts the GTMLogger interface so that it can be used as a log +// writer; it's an "adapter" in the GoF Adapter pattern sense. +// +// This is useful when you want to configure a logger to log to a specific +// writer with a specific formatter and/or filter. But you want to also compose +// that with a different log writer that may have its own formatter and/or +// filter. +@interface GTMLogger (GTMLoggerLogWriter) +@end // GTMLoggerLogWriter + + +// +// Log Formatters +// + +// Protocol to be implemented by a GTMLogFormatter instance. +@protocol GTMLogFormatter +// Returns a formatted string using the format specified in |fmt| and the va +// args specified in |args|. +- (NSString *)stringForFunc:(NSString *)func + withFormat:(NSString *)fmt + valist:(va_list)args + level:(GTMLoggerLevel)level NS_FORMAT_FUNCTION(2, 0); +@end // GTMLogFormatter + + +// A basic log formatter that formats a string the same way that NSLog (or +// printf) would. It does not do anything fancy, nor does it add any data of its +// own. +@interface GTMLogBasicFormatter : NSObject + +// Helper method for prettying C99 __func__ and GCC __PRETTY_FUNCTION__ +- (NSString *)prettyNameForFunc:(NSString *)func; + +@end // GTMLogBasicFormatter + + +// A log formatter that formats the log string like the basic formatter, but +// also prepends a timestamp and some basic process info to the message, as +// shown in the following sample output. +// 2007-12-30 10:29:24.177 myapp[4588/0xa07d0f60] [lvl=1] log mesage here +@interface GTMLogStandardFormatter : GTMLogBasicFormatter { + @private + NSDateFormatter *dateFormatter_; // yyyy-MM-dd HH:mm:ss.SSS + NSString *pname_; + pid_t pid_; +} +@end // GTMLogStandardFormatter + + +// +// Log Filters +// + +// Protocol to be implemented by a GTMLogFilter instance. +@protocol GTMLogFilter + +// Returns YES if |msg| at |level| should be logged; NO otherwise. +- (BOOL)filterAllowsMessage:(NSString *)msg level:(GTMLoggerLevel)level; + +@optional + +// Optionally implemented by the instance to set up the filter before the logger +// starts to use it. +// +// Filter implementations may require setup/teardown that is not feasible in +// init/dealloc. For example, if the filter uses KVO (say, to observe +// NSUserDefaults), the unregistration must happen before dealloc in order to +// avoid a race condition that could lead to an overrelease of the filter. +- (void)didAttachToLogger; + +// Optionally implemented by the instance to tear down the filter after the +// logger is done using it. +// +// See above didAttachToLogger comments. +- (void)willDetachFromLogger; + +@end // GTMLogFilter + + +// A log filter that filters messages at the kGTMLoggerLevelDebug level out of +// non-debug builds. Messages at the kGTMLoggerLevelInfo level are also filtered +// out of non-debug builds unless GTMVerboseLogging is set in the environment or +// the processes's defaults. Messages at the kGTMLoggerLevelError level are +// never filtered. +@interface GTMLogLevelFilter : NSObject { + @private + NSUserDefaults *userDefaults_; +} +@end // GTMLogLevelFilter + +// A simple log filter that does NOT filter anything out; +// -filterAllowsMessage:level will always return YES. This can be a convenient +// way to enable debug-level logging in release builds (if you so desire). +@interface GTMLogNoFilter : NSObject +@end // GTMLogNoFilter + + +// Base class for custom level filters. Not for direct use, use the minimum +// or maximum level subclasses below. +@interface GTMLogAllowedLevelFilter : NSObject { + @private + NSIndexSet *allowedLevels_; +} +@end + +// A log filter that allows you to set a minimum log level. Messages below this +// level will be filtered. +@interface GTMLogMininumLevelFilter : GTMLogAllowedLevelFilter + +// Designated initializer, logs at levels < |level| will be filtered. +- (id)initWithMinimumLevel:(GTMLoggerLevel)level; + +@end + +// A log filter that allows you to set a maximum log level. Messages whose level +// exceeds this level will be filtered. This is really only useful if you have +// a composite GTMLogger that is sending the other messages elsewhere. +@interface GTMLogMaximumLevelFilter : GTMLogAllowedLevelFilter + +// Designated initializer, logs at levels > |level| will be filtered. +- (id)initWithMaximumLevel:(GTMLoggerLevel)level; + +@end + + +// For subclasses only +@interface GTMLogger (PrivateMethods) + +- (void)logInternalFunc:(const char *)func + format:(NSString *)fmt + valist:(va_list)args + level:(GTMLoggerLevel)level NS_FORMAT_FUNCTION(2, 0); + +@end + diff --git a/third_party/securemessage/compiled_proto/proto/securemessage.pb.cc b/third_party/securemessage/compiled_proto/proto/securemessage.pb.cc new file mode 100644 index 00000000..cabae499 --- /dev/null +++ b/third_party/securemessage/compiled_proto/proto/securemessage.pb.cc @@ -0,0 +1,2773 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: proto/securemessage.proto + +#include "proto/securemessage.pb.h" + +#include + +#include +#include +#include +#include +// @@protoc_insertion_point(includes) +#include + +PROTOBUF_PRAGMA_INIT_SEG +namespace securemessage { +constexpr SecureMessage::SecureMessage( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : header_and_body_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , signature_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){} +struct SecureMessageDefaultTypeInternal { + constexpr SecureMessageDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~SecureMessageDefaultTypeInternal() {} + union { + SecureMessage _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT SecureMessageDefaultTypeInternal _SecureMessage_default_instance_; +constexpr Header::Header( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : verification_key_id_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , decryption_key_id_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , iv_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , public_metadata_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , associated_data_length_(0u) + , signature_scheme_(1) + + , encryption_scheme_(1) +{} +struct HeaderDefaultTypeInternal { + constexpr HeaderDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~HeaderDefaultTypeInternal() {} + union { + Header _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT HeaderDefaultTypeInternal _Header_default_instance_; +constexpr HeaderAndBody::HeaderAndBody( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : body_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , header_(nullptr){} +struct HeaderAndBodyDefaultTypeInternal { + constexpr HeaderAndBodyDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~HeaderAndBodyDefaultTypeInternal() {} + union { + HeaderAndBody _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT HeaderAndBodyDefaultTypeInternal _HeaderAndBody_default_instance_; +constexpr HeaderAndBodyInternal::HeaderAndBodyInternal( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : header_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , body_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){} +struct HeaderAndBodyInternalDefaultTypeInternal { + constexpr HeaderAndBodyInternalDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~HeaderAndBodyInternalDefaultTypeInternal() {} + union { + HeaderAndBodyInternal _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT HeaderAndBodyInternalDefaultTypeInternal _HeaderAndBodyInternal_default_instance_; +constexpr EcP256PublicKey::EcP256PublicKey( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : x_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , y_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){} +struct EcP256PublicKeyDefaultTypeInternal { + constexpr EcP256PublicKeyDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~EcP256PublicKeyDefaultTypeInternal() {} + union { + EcP256PublicKey _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT EcP256PublicKeyDefaultTypeInternal _EcP256PublicKey_default_instance_; +constexpr SimpleRsaPublicKey::SimpleRsaPublicKey( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : n_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , e_(65537){} +struct SimpleRsaPublicKeyDefaultTypeInternal { + constexpr SimpleRsaPublicKeyDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~SimpleRsaPublicKeyDefaultTypeInternal() {} + union { + SimpleRsaPublicKey _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT SimpleRsaPublicKeyDefaultTypeInternal _SimpleRsaPublicKey_default_instance_; +constexpr DhPublicKey::DhPublicKey( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : y_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){} +struct DhPublicKeyDefaultTypeInternal { + constexpr DhPublicKeyDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~DhPublicKeyDefaultTypeInternal() {} + union { + DhPublicKey _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT DhPublicKeyDefaultTypeInternal _DhPublicKey_default_instance_; +constexpr GenericPublicKey::GenericPublicKey( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : ec_p256_public_key_(nullptr) + , rsa2048_public_key_(nullptr) + , dh2048_public_key_(nullptr) + , type_(1) +{} +struct GenericPublicKeyDefaultTypeInternal { + constexpr GenericPublicKeyDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~GenericPublicKeyDefaultTypeInternal() {} + union { + GenericPublicKey _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT GenericPublicKeyDefaultTypeInternal _GenericPublicKey_default_instance_; +} // namespace securemessage +namespace securemessage { +bool SigScheme_IsValid(int value) { + switch (value) { + case 1: + case 2: + case 3: + return true; + default: + return false; + } +} + +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed SigScheme_strings[3] = {}; + +static const char SigScheme_names[] = + "ECDSA_P256_SHA256" + "HMAC_SHA256" + "RSA2048_SHA256"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry SigScheme_entries[] = { + { {SigScheme_names + 0, 17}, 2 }, + { {SigScheme_names + 17, 11}, 1 }, + { {SigScheme_names + 28, 14}, 3 }, +}; + +static const int SigScheme_entries_by_number[] = { + 1, // 1 -> HMAC_SHA256 + 0, // 2 -> ECDSA_P256_SHA256 + 2, // 3 -> RSA2048_SHA256 +}; + +const std::string& SigScheme_Name( + SigScheme value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + SigScheme_entries, + SigScheme_entries_by_number, + 3, SigScheme_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + SigScheme_entries, + SigScheme_entries_by_number, + 3, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + SigScheme_strings[idx].get(); +} +bool SigScheme_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, SigScheme* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + SigScheme_entries, 3, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} +bool EncScheme_IsValid(int value) { + switch (value) { + case 1: + case 2: + return true; + default: + return false; + } +} + +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed EncScheme_strings[2] = {}; + +static const char EncScheme_names[] = + "AES_256_CBC" + "NONE"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry EncScheme_entries[] = { + { {EncScheme_names + 0, 11}, 2 }, + { {EncScheme_names + 11, 4}, 1 }, +}; + +static const int EncScheme_entries_by_number[] = { + 1, // 1 -> NONE + 0, // 2 -> AES_256_CBC +}; + +const std::string& EncScheme_Name( + EncScheme value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + EncScheme_entries, + EncScheme_entries_by_number, + 2, EncScheme_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + EncScheme_entries, + EncScheme_entries_by_number, + 2, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + EncScheme_strings[idx].get(); +} +bool EncScheme_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, EncScheme* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + EncScheme_entries, 2, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} +bool PublicKeyType_IsValid(int value) { + switch (value) { + case 1: + case 2: + case 3: + return true; + default: + return false; + } +} + +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed PublicKeyType_strings[3] = {}; + +static const char PublicKeyType_names[] = + "DH2048_MODP" + "EC_P256" + "RSA2048"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry PublicKeyType_entries[] = { + { {PublicKeyType_names + 0, 11}, 3 }, + { {PublicKeyType_names + 11, 7}, 1 }, + { {PublicKeyType_names + 18, 7}, 2 }, +}; + +static const int PublicKeyType_entries_by_number[] = { + 1, // 1 -> EC_P256 + 2, // 2 -> RSA2048 + 0, // 3 -> DH2048_MODP +}; + +const std::string& PublicKeyType_Name( + PublicKeyType value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + PublicKeyType_entries, + PublicKeyType_entries_by_number, + 3, PublicKeyType_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + PublicKeyType_entries, + PublicKeyType_entries_by_number, + 3, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + PublicKeyType_strings[idx].get(); +} +bool PublicKeyType_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, PublicKeyType* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + PublicKeyType_entries, 3, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} + +// =================================================================== + +class SecureMessage::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_header_and_body(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_signature(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static bool MissingRequiredFields(const HasBits& has_bits) { + return ((has_bits[0] & 0x00000003) ^ 0x00000003) != 0; + } +}; + +SecureMessage::SecureMessage(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:securemessage.SecureMessage) +} +SecureMessage::SecureMessage(const SecureMessage& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + header_and_body_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + header_and_body_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_header_and_body()) { + header_and_body_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_header_and_body(), + GetArenaForAllocation()); + } + signature_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + signature_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_signature()) { + signature_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_signature(), + GetArenaForAllocation()); + } + // @@protoc_insertion_point(copy_constructor:securemessage.SecureMessage) +} + +inline void SecureMessage::SharedCtor() { +header_and_body_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + header_and_body_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +signature_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + signature_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +SecureMessage::~SecureMessage() { + // @@protoc_insertion_point(destructor:securemessage.SecureMessage) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void SecureMessage::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + header_and_body_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + signature_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void SecureMessage::ArenaDtor(void* object) { + SecureMessage* _this = reinterpret_cast< SecureMessage* >(object); + (void)_this; +} +void SecureMessage::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void SecureMessage::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void SecureMessage::Clear() { +// @@protoc_insertion_point(message_clear_start:securemessage.SecureMessage) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + header_and_body_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000002u) { + signature_.ClearNonDefaultToEmpty(); + } + } + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* SecureMessage::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // required bytes header_and_body = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_header_and_body(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // required bytes signature = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + auto str = _internal_mutable_signature(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* SecureMessage::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:securemessage.SecureMessage) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // required bytes header_and_body = 1; + if (cached_has_bits & 0x00000001u) { + target = stream->WriteBytesMaybeAliased( + 1, this->_internal_header_and_body(), target); + } + + // required bytes signature = 2; + if (cached_has_bits & 0x00000002u) { + target = stream->WriteBytesMaybeAliased( + 2, this->_internal_signature(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:securemessage.SecureMessage) + return target; +} + +size_t SecureMessage::RequiredFieldsByteSizeFallback() const { +// @@protoc_insertion_point(required_fields_byte_size_fallback_start:securemessage.SecureMessage) + size_t total_size = 0; + + if (_internal_has_header_and_body()) { + // required bytes header_and_body = 1; + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_header_and_body()); + } + + if (_internal_has_signature()) { + // required bytes signature = 2; + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_signature()); + } + + return total_size; +} +size_t SecureMessage::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:securemessage.SecureMessage) + size_t total_size = 0; + + if (((_has_bits_[0] & 0x00000003) ^ 0x00000003) == 0) { // All required fields are present. + // required bytes header_and_body = 1; + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_header_and_body()); + + // required bytes signature = 2; + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_signature()); + + } else { + total_size += RequiredFieldsByteSizeFallback(); + } + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void SecureMessage::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void SecureMessage::MergeFrom(const SecureMessage& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:securemessage.SecureMessage) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + _internal_set_header_and_body(from._internal_header_and_body()); + } + if (cached_has_bits & 0x00000002u) { + _internal_set_signature(from._internal_signature()); + } + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void SecureMessage::CopyFrom(const SecureMessage& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:securemessage.SecureMessage) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool SecureMessage::IsInitialized() const { + if (_Internal::MissingRequiredFields(_has_bits_)) return false; + return true; +} + +void SecureMessage::InternalSwap(SecureMessage* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &header_and_body_, lhs_arena, + &other->header_and_body_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &signature_, lhs_arena, + &other->signature_, rhs_arena + ); +} + +std::string SecureMessage::GetTypeName() const { + return "securemessage.SecureMessage"; +} + + +// =================================================================== + +class Header::_Internal { + public: + using HasBits = decltype(std::declval
()._has_bits_); + static void set_has_signature_scheme(HasBits* has_bits) { + (*has_bits)[0] |= 32u; + } + static void set_has_encryption_scheme(HasBits* has_bits) { + (*has_bits)[0] |= 64u; + } + static void set_has_verification_key_id(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_decryption_key_id(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static void set_has_iv(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } + static void set_has_public_metadata(HasBits* has_bits) { + (*has_bits)[0] |= 8u; + } + static void set_has_associated_data_length(HasBits* has_bits) { + (*has_bits)[0] |= 16u; + } + static bool MissingRequiredFields(const HasBits& has_bits) { + return ((has_bits[0] & 0x00000060) ^ 0x00000060) != 0; + } +}; + +Header::Header(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:securemessage.Header) +} +Header::Header(const Header& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + verification_key_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + verification_key_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_verification_key_id()) { + verification_key_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_verification_key_id(), + GetArenaForAllocation()); + } + decryption_key_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + decryption_key_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_decryption_key_id()) { + decryption_key_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_decryption_key_id(), + GetArenaForAllocation()); + } + iv_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + iv_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_iv()) { + iv_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_iv(), + GetArenaForAllocation()); + } + public_metadata_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + public_metadata_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_public_metadata()) { + public_metadata_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_public_metadata(), + GetArenaForAllocation()); + } + ::memcpy(&associated_data_length_, &from.associated_data_length_, + static_cast(reinterpret_cast(&encryption_scheme_) - + reinterpret_cast(&associated_data_length_)) + sizeof(encryption_scheme_)); + // @@protoc_insertion_point(copy_constructor:securemessage.Header) +} + +inline void Header::SharedCtor() { +verification_key_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + verification_key_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +decryption_key_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + decryption_key_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +iv_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + iv_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +public_metadata_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + public_metadata_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +associated_data_length_ = 0u; +signature_scheme_ = 1; +encryption_scheme_ = 1; +} + +Header::~Header() { + // @@protoc_insertion_point(destructor:securemessage.Header) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void Header::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + verification_key_id_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + decryption_key_id_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + iv_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + public_metadata_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void Header::ArenaDtor(void* object) { + Header* _this = reinterpret_cast< Header* >(object); + (void)_this; +} +void Header::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void Header::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void Header::Clear() { +// @@protoc_insertion_point(message_clear_start:securemessage.Header) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x0000000fu) { + if (cached_has_bits & 0x00000001u) { + verification_key_id_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000002u) { + decryption_key_id_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000004u) { + iv_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000008u) { + public_metadata_.ClearNonDefaultToEmpty(); + } + } + if (cached_has_bits & 0x00000070u) { + associated_data_length_ = 0u; + signature_scheme_ = 1; + encryption_scheme_ = 1; + } + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* Header::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // required .securemessage.SigScheme signature_scheme = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::securemessage::SigScheme_IsValid(val))) { + _internal_set_signature_scheme(static_cast<::securemessage::SigScheme>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // required .securemessage.EncScheme encryption_scheme = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::securemessage::EncScheme_IsValid(val))) { + _internal_set_encryption_scheme(static_cast<::securemessage::EncScheme>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(2, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // optional bytes verification_key_id = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { + auto str = _internal_mutable_verification_key_id(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional bytes decryption_key_id = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { + auto str = _internal_mutable_decryption_key_id(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional bytes iv = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 42)) { + auto str = _internal_mutable_iv(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional bytes public_metadata = 6; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 50)) { + auto str = _internal_mutable_public_metadata(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional uint32 associated_data_length = 7 [default = 0]; + case 7: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 56)) { + _Internal::set_has_associated_data_length(&has_bits); + associated_data_length_ = ::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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* Header::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:securemessage.Header) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // required .securemessage.SigScheme signature_scheme = 1; + if (cached_has_bits & 0x00000020u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 1, this->_internal_signature_scheme(), target); + } + + // required .securemessage.EncScheme encryption_scheme = 2; + if (cached_has_bits & 0x00000040u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 2, this->_internal_encryption_scheme(), target); + } + + // optional bytes verification_key_id = 3; + if (cached_has_bits & 0x00000001u) { + target = stream->WriteBytesMaybeAliased( + 3, this->_internal_verification_key_id(), target); + } + + // optional bytes decryption_key_id = 4; + if (cached_has_bits & 0x00000002u) { + target = stream->WriteBytesMaybeAliased( + 4, this->_internal_decryption_key_id(), target); + } + + // optional bytes iv = 5; + if (cached_has_bits & 0x00000004u) { + target = stream->WriteBytesMaybeAliased( + 5, this->_internal_iv(), target); + } + + // optional bytes public_metadata = 6; + if (cached_has_bits & 0x00000008u) { + target = stream->WriteBytesMaybeAliased( + 6, this->_internal_public_metadata(), target); + } + + // optional uint32 associated_data_length = 7 [default = 0]; + if (cached_has_bits & 0x00000010u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(7, this->_internal_associated_data_length(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:securemessage.Header) + return target; +} + +size_t Header::RequiredFieldsByteSizeFallback() const { +// @@protoc_insertion_point(required_fields_byte_size_fallback_start:securemessage.Header) + size_t total_size = 0; + + if (_internal_has_signature_scheme()) { + // required .securemessage.SigScheme signature_scheme = 1; + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_signature_scheme()); + } + + if (_internal_has_encryption_scheme()) { + // required .securemessage.EncScheme encryption_scheme = 2; + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_encryption_scheme()); + } + + return total_size; +} +size_t Header::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:securemessage.Header) + size_t total_size = 0; + + if (((_has_bits_[0] & 0x00000060) ^ 0x00000060) == 0) { // All required fields are present. + // required .securemessage.SigScheme signature_scheme = 1; + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_signature_scheme()); + + // required .securemessage.EncScheme encryption_scheme = 2; + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_encryption_scheme()); + + } else { + total_size += RequiredFieldsByteSizeFallback(); + } + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x0000001fu) { + // optional bytes verification_key_id = 3; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_verification_key_id()); + } + + // optional bytes decryption_key_id = 4; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_decryption_key_id()); + } + + // optional bytes iv = 5; + if (cached_has_bits & 0x00000004u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_iv()); + } + + // optional bytes public_metadata = 6; + if (cached_has_bits & 0x00000008u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_public_metadata()); + } + + // optional uint32 associated_data_length = 7 [default = 0]; + if (cached_has_bits & 0x00000010u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_associated_data_length()); + } + + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void Header::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void Header::MergeFrom(const Header& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:securemessage.Header) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x0000007fu) { + if (cached_has_bits & 0x00000001u) { + _internal_set_verification_key_id(from._internal_verification_key_id()); + } + if (cached_has_bits & 0x00000002u) { + _internal_set_decryption_key_id(from._internal_decryption_key_id()); + } + if (cached_has_bits & 0x00000004u) { + _internal_set_iv(from._internal_iv()); + } + if (cached_has_bits & 0x00000008u) { + _internal_set_public_metadata(from._internal_public_metadata()); + } + if (cached_has_bits & 0x00000010u) { + associated_data_length_ = from.associated_data_length_; + } + if (cached_has_bits & 0x00000020u) { + signature_scheme_ = from.signature_scheme_; + } + if (cached_has_bits & 0x00000040u) { + encryption_scheme_ = from.encryption_scheme_; + } + _has_bits_[0] |= cached_has_bits; + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void Header::CopyFrom(const Header& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:securemessage.Header) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Header::IsInitialized() const { + if (_Internal::MissingRequiredFields(_has_bits_)) return false; + return true; +} + +void Header::InternalSwap(Header* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &verification_key_id_, lhs_arena, + &other->verification_key_id_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &decryption_key_id_, lhs_arena, + &other->decryption_key_id_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &iv_, lhs_arena, + &other->iv_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &public_metadata_, lhs_arena, + &other->public_metadata_, rhs_arena + ); + swap(associated_data_length_, other->associated_data_length_); + swap(signature_scheme_, other->signature_scheme_); + swap(encryption_scheme_, other->encryption_scheme_); +} + +std::string Header::GetTypeName() const { + return "securemessage.Header"; +} + + +// =================================================================== + +class HeaderAndBody::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static const ::securemessage::Header& header(const HeaderAndBody* msg); + static void set_has_header(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static void set_has_body(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static bool MissingRequiredFields(const HasBits& has_bits) { + return ((has_bits[0] & 0x00000003) ^ 0x00000003) != 0; + } +}; + +const ::securemessage::Header& +HeaderAndBody::_Internal::header(const HeaderAndBody* msg) { + return *msg->header_; +} +HeaderAndBody::HeaderAndBody(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:securemessage.HeaderAndBody) +} +HeaderAndBody::HeaderAndBody(const HeaderAndBody& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + body_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + body_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_body()) { + body_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_body(), + GetArenaForAllocation()); + } + if (from._internal_has_header()) { + header_ = new ::securemessage::Header(*from.header_); + } else { + header_ = nullptr; + } + // @@protoc_insertion_point(copy_constructor:securemessage.HeaderAndBody) +} + +inline void HeaderAndBody::SharedCtor() { +body_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + body_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +header_ = nullptr; +} + +HeaderAndBody::~HeaderAndBody() { + // @@protoc_insertion_point(destructor:securemessage.HeaderAndBody) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void HeaderAndBody::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + body_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (this != internal_default_instance()) delete header_; +} + +void HeaderAndBody::ArenaDtor(void* object) { + HeaderAndBody* _this = reinterpret_cast< HeaderAndBody* >(object); + (void)_this; +} +void HeaderAndBody::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void HeaderAndBody::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void HeaderAndBody::Clear() { +// @@protoc_insertion_point(message_clear_start:securemessage.HeaderAndBody) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + body_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000002u) { + GOOGLE_DCHECK(header_ != nullptr); + header_->Clear(); + } + } + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* HeaderAndBody::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // required .securemessage.Header header = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + ptr = ctx->ParseMessage(_internal_mutable_header(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // required bytes body = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + auto str = _internal_mutable_body(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* HeaderAndBody::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:securemessage.HeaderAndBody) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // required .securemessage.Header header = 1; + if (cached_has_bits & 0x00000002u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 1, _Internal::header(this), target, stream); + } + + // required bytes body = 2; + if (cached_has_bits & 0x00000001u) { + target = stream->WriteBytesMaybeAliased( + 2, this->_internal_body(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:securemessage.HeaderAndBody) + return target; +} + +size_t HeaderAndBody::RequiredFieldsByteSizeFallback() const { +// @@protoc_insertion_point(required_fields_byte_size_fallback_start:securemessage.HeaderAndBody) + size_t total_size = 0; + + if (_internal_has_body()) { + // required bytes body = 2; + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_body()); + } + + if (_internal_has_header()) { + // required .securemessage.Header header = 1; + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *header_); + } + + return total_size; +} +size_t HeaderAndBody::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:securemessage.HeaderAndBody) + size_t total_size = 0; + + if (((_has_bits_[0] & 0x00000003) ^ 0x00000003) == 0) { // All required fields are present. + // required bytes body = 2; + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_body()); + + // required .securemessage.Header header = 1; + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *header_); + + } else { + total_size += RequiredFieldsByteSizeFallback(); + } + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void HeaderAndBody::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void HeaderAndBody::MergeFrom(const HeaderAndBody& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:securemessage.HeaderAndBody) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + _internal_set_body(from._internal_body()); + } + if (cached_has_bits & 0x00000002u) { + _internal_mutable_header()->::securemessage::Header::MergeFrom(from._internal_header()); + } + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void HeaderAndBody::CopyFrom(const HeaderAndBody& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:securemessage.HeaderAndBody) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool HeaderAndBody::IsInitialized() const { + if (_Internal::MissingRequiredFields(_has_bits_)) return false; + if (_internal_has_header()) { + if (!header_->IsInitialized()) return false; + } + return true; +} + +void HeaderAndBody::InternalSwap(HeaderAndBody* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &body_, lhs_arena, + &other->body_, rhs_arena + ); + swap(header_, other->header_); +} + +std::string HeaderAndBody::GetTypeName() const { + return "securemessage.HeaderAndBody"; +} + + +// =================================================================== + +class HeaderAndBodyInternal::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_header(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_body(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static bool MissingRequiredFields(const HasBits& has_bits) { + return ((has_bits[0] & 0x00000003) ^ 0x00000003) != 0; + } +}; + +HeaderAndBodyInternal::HeaderAndBodyInternal(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:securemessage.HeaderAndBodyInternal) +} +HeaderAndBodyInternal::HeaderAndBodyInternal(const HeaderAndBodyInternal& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + header_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + header_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_header()) { + header_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_header(), + GetArenaForAllocation()); + } + body_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + body_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_body()) { + body_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_body(), + GetArenaForAllocation()); + } + // @@protoc_insertion_point(copy_constructor:securemessage.HeaderAndBodyInternal) +} + +inline void HeaderAndBodyInternal::SharedCtor() { +header_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + header_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +body_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + body_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +HeaderAndBodyInternal::~HeaderAndBodyInternal() { + // @@protoc_insertion_point(destructor:securemessage.HeaderAndBodyInternal) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void HeaderAndBodyInternal::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + header_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + body_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void HeaderAndBodyInternal::ArenaDtor(void* object) { + HeaderAndBodyInternal* _this = reinterpret_cast< HeaderAndBodyInternal* >(object); + (void)_this; +} +void HeaderAndBodyInternal::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void HeaderAndBodyInternal::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void HeaderAndBodyInternal::Clear() { +// @@protoc_insertion_point(message_clear_start:securemessage.HeaderAndBodyInternal) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + header_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000002u) { + body_.ClearNonDefaultToEmpty(); + } + } + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* HeaderAndBodyInternal::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // required bytes header = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_header(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // required bytes body = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + auto str = _internal_mutable_body(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* HeaderAndBodyInternal::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:securemessage.HeaderAndBodyInternal) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // required bytes header = 1; + if (cached_has_bits & 0x00000001u) { + target = stream->WriteBytesMaybeAliased( + 1, this->_internal_header(), target); + } + + // required bytes body = 2; + if (cached_has_bits & 0x00000002u) { + target = stream->WriteBytesMaybeAliased( + 2, this->_internal_body(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:securemessage.HeaderAndBodyInternal) + return target; +} + +size_t HeaderAndBodyInternal::RequiredFieldsByteSizeFallback() const { +// @@protoc_insertion_point(required_fields_byte_size_fallback_start:securemessage.HeaderAndBodyInternal) + size_t total_size = 0; + + if (_internal_has_header()) { + // required bytes header = 1; + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_header()); + } + + if (_internal_has_body()) { + // required bytes body = 2; + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_body()); + } + + return total_size; +} +size_t HeaderAndBodyInternal::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:securemessage.HeaderAndBodyInternal) + size_t total_size = 0; + + if (((_has_bits_[0] & 0x00000003) ^ 0x00000003) == 0) { // All required fields are present. + // required bytes header = 1; + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_header()); + + // required bytes body = 2; + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_body()); + + } else { + total_size += RequiredFieldsByteSizeFallback(); + } + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void HeaderAndBodyInternal::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void HeaderAndBodyInternal::MergeFrom(const HeaderAndBodyInternal& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:securemessage.HeaderAndBodyInternal) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + _internal_set_header(from._internal_header()); + } + if (cached_has_bits & 0x00000002u) { + _internal_set_body(from._internal_body()); + } + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void HeaderAndBodyInternal::CopyFrom(const HeaderAndBodyInternal& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:securemessage.HeaderAndBodyInternal) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool HeaderAndBodyInternal::IsInitialized() const { + if (_Internal::MissingRequiredFields(_has_bits_)) return false; + return true; +} + +void HeaderAndBodyInternal::InternalSwap(HeaderAndBodyInternal* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &header_, lhs_arena, + &other->header_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &body_, lhs_arena, + &other->body_, rhs_arena + ); +} + +std::string HeaderAndBodyInternal::GetTypeName() const { + return "securemessage.HeaderAndBodyInternal"; +} + + +// =================================================================== + +class EcP256PublicKey::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_x(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_y(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static bool MissingRequiredFields(const HasBits& has_bits) { + return ((has_bits[0] & 0x00000003) ^ 0x00000003) != 0; + } +}; + +EcP256PublicKey::EcP256PublicKey(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:securemessage.EcP256PublicKey) +} +EcP256PublicKey::EcP256PublicKey(const EcP256PublicKey& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + x_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + x_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_x()) { + x_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_x(), + GetArenaForAllocation()); + } + y_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + y_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_y()) { + y_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_y(), + GetArenaForAllocation()); + } + // @@protoc_insertion_point(copy_constructor:securemessage.EcP256PublicKey) +} + +inline void EcP256PublicKey::SharedCtor() { +x_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + x_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +y_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + y_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +EcP256PublicKey::~EcP256PublicKey() { + // @@protoc_insertion_point(destructor:securemessage.EcP256PublicKey) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void EcP256PublicKey::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + x_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + y_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void EcP256PublicKey::ArenaDtor(void* object) { + EcP256PublicKey* _this = reinterpret_cast< EcP256PublicKey* >(object); + (void)_this; +} +void EcP256PublicKey::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void EcP256PublicKey::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void EcP256PublicKey::Clear() { +// @@protoc_insertion_point(message_clear_start:securemessage.EcP256PublicKey) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + x_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000002u) { + y_.ClearNonDefaultToEmpty(); + } + } + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* EcP256PublicKey::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // required bytes x = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_x(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // required bytes y = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + auto str = _internal_mutable_y(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* EcP256PublicKey::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:securemessage.EcP256PublicKey) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // required bytes x = 1; + if (cached_has_bits & 0x00000001u) { + target = stream->WriteBytesMaybeAliased( + 1, this->_internal_x(), target); + } + + // required bytes y = 2; + if (cached_has_bits & 0x00000002u) { + target = stream->WriteBytesMaybeAliased( + 2, this->_internal_y(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:securemessage.EcP256PublicKey) + return target; +} + +size_t EcP256PublicKey::RequiredFieldsByteSizeFallback() const { +// @@protoc_insertion_point(required_fields_byte_size_fallback_start:securemessage.EcP256PublicKey) + size_t total_size = 0; + + if (_internal_has_x()) { + // required bytes x = 1; + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_x()); + } + + if (_internal_has_y()) { + // required bytes y = 2; + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_y()); + } + + return total_size; +} +size_t EcP256PublicKey::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:securemessage.EcP256PublicKey) + size_t total_size = 0; + + if (((_has_bits_[0] & 0x00000003) ^ 0x00000003) == 0) { // All required fields are present. + // required bytes x = 1; + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_x()); + + // required bytes y = 2; + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_y()); + + } else { + total_size += RequiredFieldsByteSizeFallback(); + } + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void EcP256PublicKey::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void EcP256PublicKey::MergeFrom(const EcP256PublicKey& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:securemessage.EcP256PublicKey) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + _internal_set_x(from._internal_x()); + } + if (cached_has_bits & 0x00000002u) { + _internal_set_y(from._internal_y()); + } + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void EcP256PublicKey::CopyFrom(const EcP256PublicKey& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:securemessage.EcP256PublicKey) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool EcP256PublicKey::IsInitialized() const { + if (_Internal::MissingRequiredFields(_has_bits_)) return false; + return true; +} + +void EcP256PublicKey::InternalSwap(EcP256PublicKey* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &x_, lhs_arena, + &other->x_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &y_, lhs_arena, + &other->y_, rhs_arena + ); +} + +std::string EcP256PublicKey::GetTypeName() const { + return "securemessage.EcP256PublicKey"; +} + + +// =================================================================== + +class SimpleRsaPublicKey::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_n(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_e(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static bool MissingRequiredFields(const HasBits& has_bits) { + return ((has_bits[0] & 0x00000001) ^ 0x00000001) != 0; + } +}; + +SimpleRsaPublicKey::SimpleRsaPublicKey(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:securemessage.SimpleRsaPublicKey) +} +SimpleRsaPublicKey::SimpleRsaPublicKey(const SimpleRsaPublicKey& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + n_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + n_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_n()) { + n_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_n(), + GetArenaForAllocation()); + } + e_ = from.e_; + // @@protoc_insertion_point(copy_constructor:securemessage.SimpleRsaPublicKey) +} + +inline void SimpleRsaPublicKey::SharedCtor() { +n_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + n_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +e_ = 65537; +} + +SimpleRsaPublicKey::~SimpleRsaPublicKey() { + // @@protoc_insertion_point(destructor:securemessage.SimpleRsaPublicKey) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void SimpleRsaPublicKey::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + n_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void SimpleRsaPublicKey::ArenaDtor(void* object) { + SimpleRsaPublicKey* _this = reinterpret_cast< SimpleRsaPublicKey* >(object); + (void)_this; +} +void SimpleRsaPublicKey::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void SimpleRsaPublicKey::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void SimpleRsaPublicKey::Clear() { +// @@protoc_insertion_point(message_clear_start:securemessage.SimpleRsaPublicKey) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + n_.ClearNonDefaultToEmpty(); + } + e_ = 65537; + } + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* SimpleRsaPublicKey::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // required bytes n = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_n(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional int32 e = 2 [default = 65537]; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { + _Internal::set_has_e(&has_bits); + e_ = ::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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* SimpleRsaPublicKey::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:securemessage.SimpleRsaPublicKey) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // required bytes n = 1; + if (cached_has_bits & 0x00000001u) { + target = stream->WriteBytesMaybeAliased( + 1, this->_internal_n(), target); + } + + // optional int32 e = 2 [default = 65537]; + if (cached_has_bits & 0x00000002u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_e(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:securemessage.SimpleRsaPublicKey) + return target; +} + +size_t SimpleRsaPublicKey::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:securemessage.SimpleRsaPublicKey) + size_t total_size = 0; + + // required bytes n = 1; + if (_internal_has_n()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_n()); + } + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // optional int32 e = 2 [default = 65537]; + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000002u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_e()); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void SimpleRsaPublicKey::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void SimpleRsaPublicKey::MergeFrom(const SimpleRsaPublicKey& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:securemessage.SimpleRsaPublicKey) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + _internal_set_n(from._internal_n()); + } + if (cached_has_bits & 0x00000002u) { + e_ = from.e_; + } + _has_bits_[0] |= cached_has_bits; + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void SimpleRsaPublicKey::CopyFrom(const SimpleRsaPublicKey& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:securemessage.SimpleRsaPublicKey) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool SimpleRsaPublicKey::IsInitialized() const { + if (_Internal::MissingRequiredFields(_has_bits_)) return false; + return true; +} + +void SimpleRsaPublicKey::InternalSwap(SimpleRsaPublicKey* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &n_, lhs_arena, + &other->n_, rhs_arena + ); + swap(e_, other->e_); +} + +std::string SimpleRsaPublicKey::GetTypeName() const { + return "securemessage.SimpleRsaPublicKey"; +} + + +// =================================================================== + +class DhPublicKey::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_y(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static bool MissingRequiredFields(const HasBits& has_bits) { + return ((has_bits[0] & 0x00000001) ^ 0x00000001) != 0; + } +}; + +DhPublicKey::DhPublicKey(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:securemessage.DhPublicKey) +} +DhPublicKey::DhPublicKey(const DhPublicKey& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + y_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + y_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_y()) { + y_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_y(), + GetArenaForAllocation()); + } + // @@protoc_insertion_point(copy_constructor:securemessage.DhPublicKey) +} + +inline void DhPublicKey::SharedCtor() { +y_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + y_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +DhPublicKey::~DhPublicKey() { + // @@protoc_insertion_point(destructor:securemessage.DhPublicKey) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void DhPublicKey::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + y_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void DhPublicKey::ArenaDtor(void* object) { + DhPublicKey* _this = reinterpret_cast< DhPublicKey* >(object); + (void)_this; +} +void DhPublicKey::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void DhPublicKey::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void DhPublicKey::Clear() { +// @@protoc_insertion_point(message_clear_start:securemessage.DhPublicKey) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + y_.ClearNonDefaultToEmpty(); + } + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* DhPublicKey::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // required bytes y = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_y(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* DhPublicKey::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:securemessage.DhPublicKey) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // required bytes y = 1; + if (cached_has_bits & 0x00000001u) { + target = stream->WriteBytesMaybeAliased( + 1, this->_internal_y(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:securemessage.DhPublicKey) + return target; +} + +size_t DhPublicKey::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:securemessage.DhPublicKey) + size_t total_size = 0; + + // required bytes y = 1; + if (_internal_has_y()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_y()); + } + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void DhPublicKey::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void DhPublicKey::MergeFrom(const DhPublicKey& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:securemessage.DhPublicKey) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_has_y()) { + _internal_set_y(from._internal_y()); + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void DhPublicKey::CopyFrom(const DhPublicKey& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:securemessage.DhPublicKey) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool DhPublicKey::IsInitialized() const { + if (_Internal::MissingRequiredFields(_has_bits_)) return false; + return true; +} + +void DhPublicKey::InternalSwap(DhPublicKey* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &y_, lhs_arena, + &other->y_, rhs_arena + ); +} + +std::string DhPublicKey::GetTypeName() const { + return "securemessage.DhPublicKey"; +} + + +// =================================================================== + +class GenericPublicKey::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_type(HasBits* has_bits) { + (*has_bits)[0] |= 8u; + } + static const ::securemessage::EcP256PublicKey& ec_p256_public_key(const GenericPublicKey* msg); + static void set_has_ec_p256_public_key(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static const ::securemessage::SimpleRsaPublicKey& rsa2048_public_key(const GenericPublicKey* msg); + static void set_has_rsa2048_public_key(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static const ::securemessage::DhPublicKey& dh2048_public_key(const GenericPublicKey* msg); + static void set_has_dh2048_public_key(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } + static bool MissingRequiredFields(const HasBits& has_bits) { + return ((has_bits[0] & 0x00000008) ^ 0x00000008) != 0; + } +}; + +const ::securemessage::EcP256PublicKey& +GenericPublicKey::_Internal::ec_p256_public_key(const GenericPublicKey* msg) { + return *msg->ec_p256_public_key_; +} +const ::securemessage::SimpleRsaPublicKey& +GenericPublicKey::_Internal::rsa2048_public_key(const GenericPublicKey* msg) { + return *msg->rsa2048_public_key_; +} +const ::securemessage::DhPublicKey& +GenericPublicKey::_Internal::dh2048_public_key(const GenericPublicKey* msg) { + return *msg->dh2048_public_key_; +} +GenericPublicKey::GenericPublicKey(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:securemessage.GenericPublicKey) +} +GenericPublicKey::GenericPublicKey(const GenericPublicKey& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + if (from._internal_has_ec_p256_public_key()) { + ec_p256_public_key_ = new ::securemessage::EcP256PublicKey(*from.ec_p256_public_key_); + } else { + ec_p256_public_key_ = nullptr; + } + if (from._internal_has_rsa2048_public_key()) { + rsa2048_public_key_ = new ::securemessage::SimpleRsaPublicKey(*from.rsa2048_public_key_); + } else { + rsa2048_public_key_ = nullptr; + } + if (from._internal_has_dh2048_public_key()) { + dh2048_public_key_ = new ::securemessage::DhPublicKey(*from.dh2048_public_key_); + } else { + dh2048_public_key_ = nullptr; + } + type_ = from.type_; + // @@protoc_insertion_point(copy_constructor:securemessage.GenericPublicKey) +} + +inline void GenericPublicKey::SharedCtor() { +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&ec_p256_public_key_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&dh2048_public_key_) - + reinterpret_cast(&ec_p256_public_key_)) + sizeof(dh2048_public_key_)); +type_ = 1; +} + +GenericPublicKey::~GenericPublicKey() { + // @@protoc_insertion_point(destructor:securemessage.GenericPublicKey) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void GenericPublicKey::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + if (this != internal_default_instance()) delete ec_p256_public_key_; + if (this != internal_default_instance()) delete rsa2048_public_key_; + if (this != internal_default_instance()) delete dh2048_public_key_; +} + +void GenericPublicKey::ArenaDtor(void* object) { + GenericPublicKey* _this = reinterpret_cast< GenericPublicKey* >(object); + (void)_this; +} +void GenericPublicKey::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void GenericPublicKey::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void GenericPublicKey::Clear() { +// @@protoc_insertion_point(message_clear_start:securemessage.GenericPublicKey) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x0000000fu) { + if (cached_has_bits & 0x00000001u) { + GOOGLE_DCHECK(ec_p256_public_key_ != nullptr); + ec_p256_public_key_->Clear(); + } + if (cached_has_bits & 0x00000002u) { + GOOGLE_DCHECK(rsa2048_public_key_ != nullptr); + rsa2048_public_key_->Clear(); + } + if (cached_has_bits & 0x00000004u) { + GOOGLE_DCHECK(dh2048_public_key_ != nullptr); + dh2048_public_key_->Clear(); + } + type_ = 1; + } + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* GenericPublicKey::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // required .securemessage.PublicKeyType type = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::securemessage::PublicKeyType_IsValid(val))) { + _internal_set_type(static_cast<::securemessage::PublicKeyType>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // optional .securemessage.EcP256PublicKey ec_p256_public_key = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + ptr = ctx->ParseMessage(_internal_mutable_ec_p256_public_key(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .securemessage.SimpleRsaPublicKey rsa2048_public_key = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { + ptr = ctx->ParseMessage(_internal_mutable_rsa2048_public_key(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .securemessage.DhPublicKey dh2048_public_key = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { + ptr = ctx->ParseMessage(_internal_mutable_dh2048_public_key(), 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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* GenericPublicKey::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:securemessage.GenericPublicKey) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // required .securemessage.PublicKeyType type = 1; + if (cached_has_bits & 0x00000008u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 1, this->_internal_type(), target); + } + + // optional .securemessage.EcP256PublicKey ec_p256_public_key = 2; + if (cached_has_bits & 0x00000001u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 2, _Internal::ec_p256_public_key(this), target, stream); + } + + // optional .securemessage.SimpleRsaPublicKey rsa2048_public_key = 3; + if (cached_has_bits & 0x00000002u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 3, _Internal::rsa2048_public_key(this), target, stream); + } + + // optional .securemessage.DhPublicKey dh2048_public_key = 4; + if (cached_has_bits & 0x00000004u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 4, _Internal::dh2048_public_key(this), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:securemessage.GenericPublicKey) + return target; +} + +size_t GenericPublicKey::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:securemessage.GenericPublicKey) + size_t total_size = 0; + + // required .securemessage.PublicKeyType type = 1; + if (_internal_has_type()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_type()); + } + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + // optional .securemessage.EcP256PublicKey ec_p256_public_key = 2; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *ec_p256_public_key_); + } + + // optional .securemessage.SimpleRsaPublicKey rsa2048_public_key = 3; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *rsa2048_public_key_); + } + + // optional .securemessage.DhPublicKey dh2048_public_key = 4; + if (cached_has_bits & 0x00000004u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *dh2048_public_key_); + } + + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void GenericPublicKey::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void GenericPublicKey::MergeFrom(const GenericPublicKey& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:securemessage.GenericPublicKey) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x0000000fu) { + if (cached_has_bits & 0x00000001u) { + _internal_mutable_ec_p256_public_key()->::securemessage::EcP256PublicKey::MergeFrom(from._internal_ec_p256_public_key()); + } + if (cached_has_bits & 0x00000002u) { + _internal_mutable_rsa2048_public_key()->::securemessage::SimpleRsaPublicKey::MergeFrom(from._internal_rsa2048_public_key()); + } + if (cached_has_bits & 0x00000004u) { + _internal_mutable_dh2048_public_key()->::securemessage::DhPublicKey::MergeFrom(from._internal_dh2048_public_key()); + } + if (cached_has_bits & 0x00000008u) { + type_ = from.type_; + } + _has_bits_[0] |= cached_has_bits; + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void GenericPublicKey::CopyFrom(const GenericPublicKey& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:securemessage.GenericPublicKey) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool GenericPublicKey::IsInitialized() const { + if (_Internal::MissingRequiredFields(_has_bits_)) return false; + if (_internal_has_ec_p256_public_key()) { + if (!ec_p256_public_key_->IsInitialized()) return false; + } + if (_internal_has_rsa2048_public_key()) { + if (!rsa2048_public_key_->IsInitialized()) return false; + } + if (_internal_has_dh2048_public_key()) { + if (!dh2048_public_key_->IsInitialized()) return false; + } + return true; +} + +void GenericPublicKey::InternalSwap(GenericPublicKey* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(GenericPublicKey, dh2048_public_key_) + + sizeof(GenericPublicKey::dh2048_public_key_) + - PROTOBUF_FIELD_OFFSET(GenericPublicKey, ec_p256_public_key_)>( + reinterpret_cast(&ec_p256_public_key_), + reinterpret_cast(&other->ec_p256_public_key_)); + swap(type_, other->type_); +} + +std::string GenericPublicKey::GetTypeName() const { + return "securemessage.GenericPublicKey"; +} + + +// @@protoc_insertion_point(namespace_scope) +} // namespace securemessage +PROTOBUF_NAMESPACE_OPEN +template<> PROTOBUF_NOINLINE ::securemessage::SecureMessage* Arena::CreateMaybeMessage< ::securemessage::SecureMessage >(Arena* arena) { + return Arena::CreateMessageInternal< ::securemessage::SecureMessage >(arena); +} +template<> PROTOBUF_NOINLINE ::securemessage::Header* Arena::CreateMaybeMessage< ::securemessage::Header >(Arena* arena) { + return Arena::CreateMessageInternal< ::securemessage::Header >(arena); +} +template<> PROTOBUF_NOINLINE ::securemessage::HeaderAndBody* Arena::CreateMaybeMessage< ::securemessage::HeaderAndBody >(Arena* arena) { + return Arena::CreateMessageInternal< ::securemessage::HeaderAndBody >(arena); +} +template<> PROTOBUF_NOINLINE ::securemessage::HeaderAndBodyInternal* Arena::CreateMaybeMessage< ::securemessage::HeaderAndBodyInternal >(Arena* arena) { + return Arena::CreateMessageInternal< ::securemessage::HeaderAndBodyInternal >(arena); +} +template<> PROTOBUF_NOINLINE ::securemessage::EcP256PublicKey* Arena::CreateMaybeMessage< ::securemessage::EcP256PublicKey >(Arena* arena) { + return Arena::CreateMessageInternal< ::securemessage::EcP256PublicKey >(arena); +} +template<> PROTOBUF_NOINLINE ::securemessage::SimpleRsaPublicKey* Arena::CreateMaybeMessage< ::securemessage::SimpleRsaPublicKey >(Arena* arena) { + return Arena::CreateMessageInternal< ::securemessage::SimpleRsaPublicKey >(arena); +} +template<> PROTOBUF_NOINLINE ::securemessage::DhPublicKey* Arena::CreateMaybeMessage< ::securemessage::DhPublicKey >(Arena* arena) { + return Arena::CreateMessageInternal< ::securemessage::DhPublicKey >(arena); +} +template<> PROTOBUF_NOINLINE ::securemessage::GenericPublicKey* Arena::CreateMaybeMessage< ::securemessage::GenericPublicKey >(Arena* arena) { + return Arena::CreateMessageInternal< ::securemessage::GenericPublicKey >(arena); +} +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) +#include diff --git a/third_party/securemessage/compiled_proto/proto/securemessage.pb.h b/third_party/securemessage/compiled_proto/proto/securemessage.pb.h new file mode 100644 index 00000000..de0cf362 --- /dev/null +++ b/third_party/securemessage/compiled_proto/proto/securemessage.pb.h @@ -0,0 +1,3069 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: proto/securemessage.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_proto_2fsecuremessage_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_proto_2fsecuremessage_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3019000 +#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 3019004 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_proto_2fsecuremessage_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_proto_2fsecuremessage_2eproto { + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::AuxiliaryParseTableField aux[] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[8] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[]; + static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[]; + static const uint32_t offsets[]; +}; +namespace securemessage { +class DhPublicKey; +struct DhPublicKeyDefaultTypeInternal; +extern DhPublicKeyDefaultTypeInternal _DhPublicKey_default_instance_; +class EcP256PublicKey; +struct EcP256PublicKeyDefaultTypeInternal; +extern EcP256PublicKeyDefaultTypeInternal _EcP256PublicKey_default_instance_; +class GenericPublicKey; +struct GenericPublicKeyDefaultTypeInternal; +extern GenericPublicKeyDefaultTypeInternal _GenericPublicKey_default_instance_; +class Header; +struct HeaderDefaultTypeInternal; +extern HeaderDefaultTypeInternal _Header_default_instance_; +class HeaderAndBody; +struct HeaderAndBodyDefaultTypeInternal; +extern HeaderAndBodyDefaultTypeInternal _HeaderAndBody_default_instance_; +class HeaderAndBodyInternal; +struct HeaderAndBodyInternalDefaultTypeInternal; +extern HeaderAndBodyInternalDefaultTypeInternal _HeaderAndBodyInternal_default_instance_; +class SecureMessage; +struct SecureMessageDefaultTypeInternal; +extern SecureMessageDefaultTypeInternal _SecureMessage_default_instance_; +class SimpleRsaPublicKey; +struct SimpleRsaPublicKeyDefaultTypeInternal; +extern SimpleRsaPublicKeyDefaultTypeInternal _SimpleRsaPublicKey_default_instance_; +} // namespace securemessage +PROTOBUF_NAMESPACE_OPEN +template<> ::securemessage::DhPublicKey* Arena::CreateMaybeMessage<::securemessage::DhPublicKey>(Arena*); +template<> ::securemessage::EcP256PublicKey* Arena::CreateMaybeMessage<::securemessage::EcP256PublicKey>(Arena*); +template<> ::securemessage::GenericPublicKey* Arena::CreateMaybeMessage<::securemessage::GenericPublicKey>(Arena*); +template<> ::securemessage::Header* Arena::CreateMaybeMessage<::securemessage::Header>(Arena*); +template<> ::securemessage::HeaderAndBody* Arena::CreateMaybeMessage<::securemessage::HeaderAndBody>(Arena*); +template<> ::securemessage::HeaderAndBodyInternal* Arena::CreateMaybeMessage<::securemessage::HeaderAndBodyInternal>(Arena*); +template<> ::securemessage::SecureMessage* Arena::CreateMaybeMessage<::securemessage::SecureMessage>(Arena*); +template<> ::securemessage::SimpleRsaPublicKey* Arena::CreateMaybeMessage<::securemessage::SimpleRsaPublicKey>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace securemessage { + +enum SigScheme : int { + HMAC_SHA256 = 1, + ECDSA_P256_SHA256 = 2, + RSA2048_SHA256 = 3 +}; +bool SigScheme_IsValid(int value); +constexpr SigScheme SigScheme_MIN = HMAC_SHA256; +constexpr SigScheme SigScheme_MAX = RSA2048_SHA256; +constexpr int SigScheme_ARRAYSIZE = SigScheme_MAX + 1; + +const std::string& SigScheme_Name(SigScheme value); +template +inline const std::string& SigScheme_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function SigScheme_Name."); + return SigScheme_Name(static_cast(enum_t_value)); +} +bool SigScheme_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, SigScheme* value); +enum EncScheme : int { + NONE = 1, + AES_256_CBC = 2 +}; +bool EncScheme_IsValid(int value); +constexpr EncScheme EncScheme_MIN = NONE; +constexpr EncScheme EncScheme_MAX = AES_256_CBC; +constexpr int EncScheme_ARRAYSIZE = EncScheme_MAX + 1; + +const std::string& EncScheme_Name(EncScheme value); +template +inline const std::string& EncScheme_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function EncScheme_Name."); + return EncScheme_Name(static_cast(enum_t_value)); +} +bool EncScheme_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, EncScheme* value); +enum PublicKeyType : int { + EC_P256 = 1, + RSA2048 = 2, + DH2048_MODP = 3 +}; +bool PublicKeyType_IsValid(int value); +constexpr PublicKeyType PublicKeyType_MIN = EC_P256; +constexpr PublicKeyType PublicKeyType_MAX = DH2048_MODP; +constexpr int PublicKeyType_ARRAYSIZE = PublicKeyType_MAX + 1; + +const std::string& PublicKeyType_Name(PublicKeyType value); +template +inline const std::string& PublicKeyType_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function PublicKeyType_Name."); + return PublicKeyType_Name(static_cast(enum_t_value)); +} +bool PublicKeyType_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, PublicKeyType* value); +// =================================================================== + +class SecureMessage final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:securemessage.SecureMessage) */ { + public: + inline SecureMessage() : SecureMessage(nullptr) {} + ~SecureMessage() override; + explicit constexpr SecureMessage(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + SecureMessage(const SecureMessage& from); + SecureMessage(SecureMessage&& from) noexcept + : SecureMessage() { + *this = ::std::move(from); + } + + inline SecureMessage& operator=(const SecureMessage& from) { + CopyFrom(from); + return *this; + } + inline SecureMessage& operator=(SecureMessage&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const SecureMessage& default_instance() { + return *internal_default_instance(); + } + static inline const SecureMessage* internal_default_instance() { + return reinterpret_cast( + &_SecureMessage_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(SecureMessage& a, SecureMessage& b) { + a.Swap(&b); + } + inline void Swap(SecureMessage* 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(SecureMessage* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + SecureMessage* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const SecureMessage& from); + void MergeFrom(const SecureMessage& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(SecureMessage* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "securemessage.SecureMessage"; + } + protected: + explicit SecureMessage(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kHeaderAndBodyFieldNumber = 1, + kSignatureFieldNumber = 2, + }; + // required bytes header_and_body = 1; + bool has_header_and_body() const; + private: + bool _internal_has_header_and_body() const; + public: + void clear_header_and_body(); + const std::string& header_and_body() const; + template + void set_header_and_body(ArgT0&& arg0, ArgT... args); + std::string* mutable_header_and_body(); + PROTOBUF_NODISCARD std::string* release_header_and_body(); + void set_allocated_header_and_body(std::string* header_and_body); + private: + const std::string& _internal_header_and_body() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_header_and_body(const std::string& value); + std::string* _internal_mutable_header_and_body(); + public: + + // required bytes signature = 2; + bool has_signature() const; + private: + bool _internal_has_signature() const; + public: + void clear_signature(); + const std::string& signature() const; + template + void set_signature(ArgT0&& arg0, ArgT... args); + std::string* mutable_signature(); + PROTOBUF_NODISCARD std::string* release_signature(); + void set_allocated_signature(std::string* signature); + private: + const std::string& _internal_signature() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_signature(const std::string& value); + std::string* _internal_mutable_signature(); + public: + + // @@protoc_insertion_point(class_scope:securemessage.SecureMessage) + private: + class _Internal; + + // helper for ByteSizeLong() + size_t RequiredFieldsByteSizeFallback() const; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr header_and_body_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr signature_; + friend struct ::TableStruct_proto_2fsecuremessage_2eproto; +}; +// ------------------------------------------------------------------- + +class Header final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:securemessage.Header) */ { + public: + inline Header() : Header(nullptr) {} + ~Header() override; + explicit constexpr Header(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + Header(const Header& from); + Header(Header&& from) noexcept + : Header() { + *this = ::std::move(from); + } + + inline Header& operator=(const Header& from) { + CopyFrom(from); + return *this; + } + inline Header& operator=(Header&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const Header& default_instance() { + return *internal_default_instance(); + } + static inline const Header* internal_default_instance() { + return reinterpret_cast( + &_Header_default_instance_); + } + static constexpr int kIndexInFileMessages = + 1; + + friend void swap(Header& a, Header& b) { + a.Swap(&b); + } + inline void Swap(Header* 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(Header* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + Header* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage
(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const Header& from); + void MergeFrom(const Header& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(Header* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "securemessage.Header"; + } + protected: + explicit Header(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kVerificationKeyIdFieldNumber = 3, + kDecryptionKeyIdFieldNumber = 4, + kIvFieldNumber = 5, + kPublicMetadataFieldNumber = 6, + kAssociatedDataLengthFieldNumber = 7, + kSignatureSchemeFieldNumber = 1, + kEncryptionSchemeFieldNumber = 2, + }; + // optional bytes verification_key_id = 3; + bool has_verification_key_id() const; + private: + bool _internal_has_verification_key_id() const; + public: + void clear_verification_key_id(); + const std::string& verification_key_id() const; + template + void set_verification_key_id(ArgT0&& arg0, ArgT... args); + std::string* mutable_verification_key_id(); + PROTOBUF_NODISCARD std::string* release_verification_key_id(); + void set_allocated_verification_key_id(std::string* verification_key_id); + private: + const std::string& _internal_verification_key_id() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_verification_key_id(const std::string& value); + std::string* _internal_mutable_verification_key_id(); + public: + + // optional bytes decryption_key_id = 4; + bool has_decryption_key_id() const; + private: + bool _internal_has_decryption_key_id() const; + public: + void clear_decryption_key_id(); + const std::string& decryption_key_id() const; + template + void set_decryption_key_id(ArgT0&& arg0, ArgT... args); + std::string* mutable_decryption_key_id(); + PROTOBUF_NODISCARD std::string* release_decryption_key_id(); + void set_allocated_decryption_key_id(std::string* decryption_key_id); + private: + const std::string& _internal_decryption_key_id() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_decryption_key_id(const std::string& value); + std::string* _internal_mutable_decryption_key_id(); + public: + + // optional bytes iv = 5; + bool has_iv() const; + private: + bool _internal_has_iv() const; + public: + void clear_iv(); + const std::string& iv() const; + template + void set_iv(ArgT0&& arg0, ArgT... args); + std::string* mutable_iv(); + PROTOBUF_NODISCARD std::string* release_iv(); + void set_allocated_iv(std::string* iv); + private: + const std::string& _internal_iv() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_iv(const std::string& value); + std::string* _internal_mutable_iv(); + public: + + // optional bytes public_metadata = 6; + bool has_public_metadata() const; + private: + bool _internal_has_public_metadata() const; + public: + void clear_public_metadata(); + const std::string& public_metadata() const; + template + void set_public_metadata(ArgT0&& arg0, ArgT... args); + std::string* mutable_public_metadata(); + PROTOBUF_NODISCARD std::string* release_public_metadata(); + void set_allocated_public_metadata(std::string* public_metadata); + private: + const std::string& _internal_public_metadata() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_public_metadata(const std::string& value); + std::string* _internal_mutable_public_metadata(); + public: + + // optional uint32 associated_data_length = 7 [default = 0]; + bool has_associated_data_length() const; + private: + bool _internal_has_associated_data_length() const; + public: + void clear_associated_data_length(); + uint32_t associated_data_length() const; + void set_associated_data_length(uint32_t value); + private: + uint32_t _internal_associated_data_length() const; + void _internal_set_associated_data_length(uint32_t value); + public: + + // required .securemessage.SigScheme signature_scheme = 1; + bool has_signature_scheme() const; + private: + bool _internal_has_signature_scheme() const; + public: + void clear_signature_scheme(); + ::securemessage::SigScheme signature_scheme() const; + void set_signature_scheme(::securemessage::SigScheme value); + private: + ::securemessage::SigScheme _internal_signature_scheme() const; + void _internal_set_signature_scheme(::securemessage::SigScheme value); + public: + + // required .securemessage.EncScheme encryption_scheme = 2; + bool has_encryption_scheme() const; + private: + bool _internal_has_encryption_scheme() const; + public: + void clear_encryption_scheme(); + ::securemessage::EncScheme encryption_scheme() const; + void set_encryption_scheme(::securemessage::EncScheme value); + private: + ::securemessage::EncScheme _internal_encryption_scheme() const; + void _internal_set_encryption_scheme(::securemessage::EncScheme value); + public: + + // @@protoc_insertion_point(class_scope:securemessage.Header) + private: + class _Internal; + + // helper for ByteSizeLong() + size_t RequiredFieldsByteSizeFallback() const; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr verification_key_id_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr decryption_key_id_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr iv_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr public_metadata_; + uint32_t associated_data_length_; + int signature_scheme_; + int encryption_scheme_; + friend struct ::TableStruct_proto_2fsecuremessage_2eproto; +}; +// ------------------------------------------------------------------- + +class HeaderAndBody final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:securemessage.HeaderAndBody) */ { + public: + inline HeaderAndBody() : HeaderAndBody(nullptr) {} + ~HeaderAndBody() override; + explicit constexpr HeaderAndBody(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + HeaderAndBody(const HeaderAndBody& from); + HeaderAndBody(HeaderAndBody&& from) noexcept + : HeaderAndBody() { + *this = ::std::move(from); + } + + inline HeaderAndBody& operator=(const HeaderAndBody& from) { + CopyFrom(from); + return *this; + } + inline HeaderAndBody& operator=(HeaderAndBody&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const HeaderAndBody& default_instance() { + return *internal_default_instance(); + } + static inline const HeaderAndBody* internal_default_instance() { + return reinterpret_cast( + &_HeaderAndBody_default_instance_); + } + static constexpr int kIndexInFileMessages = + 2; + + friend void swap(HeaderAndBody& a, HeaderAndBody& b) { + a.Swap(&b); + } + inline void Swap(HeaderAndBody* 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(HeaderAndBody* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + HeaderAndBody* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const HeaderAndBody& from); + void MergeFrom(const HeaderAndBody& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(HeaderAndBody* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "securemessage.HeaderAndBody"; + } + protected: + explicit HeaderAndBody(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kBodyFieldNumber = 2, + kHeaderFieldNumber = 1, + }; + // required bytes body = 2; + bool has_body() const; + private: + bool _internal_has_body() const; + public: + void clear_body(); + const std::string& body() const; + template + void set_body(ArgT0&& arg0, ArgT... args); + std::string* mutable_body(); + PROTOBUF_NODISCARD std::string* release_body(); + void set_allocated_body(std::string* body); + private: + const std::string& _internal_body() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_body(const std::string& value); + std::string* _internal_mutable_body(); + public: + + // required .securemessage.Header header = 1; + bool has_header() const; + private: + bool _internal_has_header() const; + public: + void clear_header(); + const ::securemessage::Header& header() const; + PROTOBUF_NODISCARD ::securemessage::Header* release_header(); + ::securemessage::Header* mutable_header(); + void set_allocated_header(::securemessage::Header* header); + private: + const ::securemessage::Header& _internal_header() const; + ::securemessage::Header* _internal_mutable_header(); + public: + void unsafe_arena_set_allocated_header( + ::securemessage::Header* header); + ::securemessage::Header* unsafe_arena_release_header(); + + // @@protoc_insertion_point(class_scope:securemessage.HeaderAndBody) + private: + class _Internal; + + // helper for ByteSizeLong() + size_t RequiredFieldsByteSizeFallback() const; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr body_; + ::securemessage::Header* header_; + friend struct ::TableStruct_proto_2fsecuremessage_2eproto; +}; +// ------------------------------------------------------------------- + +class HeaderAndBodyInternal final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:securemessage.HeaderAndBodyInternal) */ { + public: + inline HeaderAndBodyInternal() : HeaderAndBodyInternal(nullptr) {} + ~HeaderAndBodyInternal() override; + explicit constexpr HeaderAndBodyInternal(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + HeaderAndBodyInternal(const HeaderAndBodyInternal& from); + HeaderAndBodyInternal(HeaderAndBodyInternal&& from) noexcept + : HeaderAndBodyInternal() { + *this = ::std::move(from); + } + + inline HeaderAndBodyInternal& operator=(const HeaderAndBodyInternal& from) { + CopyFrom(from); + return *this; + } + inline HeaderAndBodyInternal& operator=(HeaderAndBodyInternal&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const HeaderAndBodyInternal& default_instance() { + return *internal_default_instance(); + } + static inline const HeaderAndBodyInternal* internal_default_instance() { + return reinterpret_cast( + &_HeaderAndBodyInternal_default_instance_); + } + static constexpr int kIndexInFileMessages = + 3; + + friend void swap(HeaderAndBodyInternal& a, HeaderAndBodyInternal& b) { + a.Swap(&b); + } + inline void Swap(HeaderAndBodyInternal* 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(HeaderAndBodyInternal* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + HeaderAndBodyInternal* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const HeaderAndBodyInternal& from); + void MergeFrom(const HeaderAndBodyInternal& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(HeaderAndBodyInternal* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "securemessage.HeaderAndBodyInternal"; + } + protected: + explicit HeaderAndBodyInternal(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kHeaderFieldNumber = 1, + kBodyFieldNumber = 2, + }; + // required bytes header = 1; + bool has_header() const; + private: + bool _internal_has_header() const; + public: + void clear_header(); + const std::string& header() const; + template + void set_header(ArgT0&& arg0, ArgT... args); + std::string* mutable_header(); + PROTOBUF_NODISCARD std::string* release_header(); + void set_allocated_header(std::string* header); + private: + const std::string& _internal_header() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_header(const std::string& value); + std::string* _internal_mutable_header(); + public: + + // required bytes body = 2; + bool has_body() const; + private: + bool _internal_has_body() const; + public: + void clear_body(); + const std::string& body() const; + template + void set_body(ArgT0&& arg0, ArgT... args); + std::string* mutable_body(); + PROTOBUF_NODISCARD std::string* release_body(); + void set_allocated_body(std::string* body); + private: + const std::string& _internal_body() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_body(const std::string& value); + std::string* _internal_mutable_body(); + public: + + // @@protoc_insertion_point(class_scope:securemessage.HeaderAndBodyInternal) + private: + class _Internal; + + // helper for ByteSizeLong() + size_t RequiredFieldsByteSizeFallback() const; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr header_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr body_; + friend struct ::TableStruct_proto_2fsecuremessage_2eproto; +}; +// ------------------------------------------------------------------- + +class EcP256PublicKey final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:securemessage.EcP256PublicKey) */ { + public: + inline EcP256PublicKey() : EcP256PublicKey(nullptr) {} + ~EcP256PublicKey() override; + explicit constexpr EcP256PublicKey(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + EcP256PublicKey(const EcP256PublicKey& from); + EcP256PublicKey(EcP256PublicKey&& from) noexcept + : EcP256PublicKey() { + *this = ::std::move(from); + } + + inline EcP256PublicKey& operator=(const EcP256PublicKey& from) { + CopyFrom(from); + return *this; + } + inline EcP256PublicKey& operator=(EcP256PublicKey&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const EcP256PublicKey& default_instance() { + return *internal_default_instance(); + } + static inline const EcP256PublicKey* internal_default_instance() { + return reinterpret_cast( + &_EcP256PublicKey_default_instance_); + } + static constexpr int kIndexInFileMessages = + 4; + + friend void swap(EcP256PublicKey& a, EcP256PublicKey& b) { + a.Swap(&b); + } + inline void Swap(EcP256PublicKey* 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(EcP256PublicKey* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + EcP256PublicKey* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const EcP256PublicKey& from); + void MergeFrom(const EcP256PublicKey& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(EcP256PublicKey* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "securemessage.EcP256PublicKey"; + } + protected: + explicit EcP256PublicKey(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kXFieldNumber = 1, + kYFieldNumber = 2, + }; + // required bytes x = 1; + bool has_x() const; + private: + bool _internal_has_x() const; + public: + void clear_x(); + const std::string& x() const; + template + void set_x(ArgT0&& arg0, ArgT... args); + std::string* mutable_x(); + PROTOBUF_NODISCARD std::string* release_x(); + void set_allocated_x(std::string* x); + private: + const std::string& _internal_x() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_x(const std::string& value); + std::string* _internal_mutable_x(); + public: + + // required bytes y = 2; + bool has_y() const; + private: + bool _internal_has_y() const; + public: + void clear_y(); + const std::string& y() const; + template + void set_y(ArgT0&& arg0, ArgT... args); + std::string* mutable_y(); + PROTOBUF_NODISCARD std::string* release_y(); + void set_allocated_y(std::string* y); + private: + const std::string& _internal_y() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_y(const std::string& value); + std::string* _internal_mutable_y(); + public: + + // @@protoc_insertion_point(class_scope:securemessage.EcP256PublicKey) + private: + class _Internal; + + // helper for ByteSizeLong() + size_t RequiredFieldsByteSizeFallback() const; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr x_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr y_; + friend struct ::TableStruct_proto_2fsecuremessage_2eproto; +}; +// ------------------------------------------------------------------- + +class SimpleRsaPublicKey final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:securemessage.SimpleRsaPublicKey) */ { + public: + inline SimpleRsaPublicKey() : SimpleRsaPublicKey(nullptr) {} + ~SimpleRsaPublicKey() override; + explicit constexpr SimpleRsaPublicKey(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + SimpleRsaPublicKey(const SimpleRsaPublicKey& from); + SimpleRsaPublicKey(SimpleRsaPublicKey&& from) noexcept + : SimpleRsaPublicKey() { + *this = ::std::move(from); + } + + inline SimpleRsaPublicKey& operator=(const SimpleRsaPublicKey& from) { + CopyFrom(from); + return *this; + } + inline SimpleRsaPublicKey& operator=(SimpleRsaPublicKey&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const SimpleRsaPublicKey& default_instance() { + return *internal_default_instance(); + } + static inline const SimpleRsaPublicKey* internal_default_instance() { + return reinterpret_cast( + &_SimpleRsaPublicKey_default_instance_); + } + static constexpr int kIndexInFileMessages = + 5; + + friend void swap(SimpleRsaPublicKey& a, SimpleRsaPublicKey& b) { + a.Swap(&b); + } + inline void Swap(SimpleRsaPublicKey* 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(SimpleRsaPublicKey* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + SimpleRsaPublicKey* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const SimpleRsaPublicKey& from); + void MergeFrom(const SimpleRsaPublicKey& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(SimpleRsaPublicKey* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "securemessage.SimpleRsaPublicKey"; + } + protected: + explicit SimpleRsaPublicKey(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kNFieldNumber = 1, + kEFieldNumber = 2, + }; + // required bytes n = 1; + bool has_n() const; + private: + bool _internal_has_n() const; + public: + void clear_n(); + const std::string& n() const; + template + void set_n(ArgT0&& arg0, ArgT... args); + std::string* mutable_n(); + PROTOBUF_NODISCARD std::string* release_n(); + void set_allocated_n(std::string* n); + private: + const std::string& _internal_n() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_n(const std::string& value); + std::string* _internal_mutable_n(); + public: + + // optional int32 e = 2 [default = 65537]; + bool has_e() const; + private: + bool _internal_has_e() const; + public: + void clear_e(); + int32_t e() const; + void set_e(int32_t value); + private: + int32_t _internal_e() const; + void _internal_set_e(int32_t value); + public: + + // @@protoc_insertion_point(class_scope:securemessage.SimpleRsaPublicKey) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr n_; + int32_t e_; + friend struct ::TableStruct_proto_2fsecuremessage_2eproto; +}; +// ------------------------------------------------------------------- + +class DhPublicKey final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:securemessage.DhPublicKey) */ { + public: + inline DhPublicKey() : DhPublicKey(nullptr) {} + ~DhPublicKey() override; + explicit constexpr DhPublicKey(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + DhPublicKey(const DhPublicKey& from); + DhPublicKey(DhPublicKey&& from) noexcept + : DhPublicKey() { + *this = ::std::move(from); + } + + inline DhPublicKey& operator=(const DhPublicKey& from) { + CopyFrom(from); + return *this; + } + inline DhPublicKey& operator=(DhPublicKey&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const DhPublicKey& default_instance() { + return *internal_default_instance(); + } + static inline const DhPublicKey* internal_default_instance() { + return reinterpret_cast( + &_DhPublicKey_default_instance_); + } + static constexpr int kIndexInFileMessages = + 6; + + friend void swap(DhPublicKey& a, DhPublicKey& b) { + a.Swap(&b); + } + inline void Swap(DhPublicKey* 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(DhPublicKey* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + DhPublicKey* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const DhPublicKey& from); + void MergeFrom(const DhPublicKey& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(DhPublicKey* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "securemessage.DhPublicKey"; + } + protected: + explicit DhPublicKey(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kYFieldNumber = 1, + }; + // required bytes y = 1; + bool has_y() const; + private: + bool _internal_has_y() const; + public: + void clear_y(); + const std::string& y() const; + template + void set_y(ArgT0&& arg0, ArgT... args); + std::string* mutable_y(); + PROTOBUF_NODISCARD std::string* release_y(); + void set_allocated_y(std::string* y); + private: + const std::string& _internal_y() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_y(const std::string& value); + std::string* _internal_mutable_y(); + public: + + // @@protoc_insertion_point(class_scope:securemessage.DhPublicKey) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr y_; + friend struct ::TableStruct_proto_2fsecuremessage_2eproto; +}; +// ------------------------------------------------------------------- + +class GenericPublicKey final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:securemessage.GenericPublicKey) */ { + public: + inline GenericPublicKey() : GenericPublicKey(nullptr) {} + ~GenericPublicKey() override; + explicit constexpr GenericPublicKey(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + GenericPublicKey(const GenericPublicKey& from); + GenericPublicKey(GenericPublicKey&& from) noexcept + : GenericPublicKey() { + *this = ::std::move(from); + } + + inline GenericPublicKey& operator=(const GenericPublicKey& from) { + CopyFrom(from); + return *this; + } + inline GenericPublicKey& operator=(GenericPublicKey&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const GenericPublicKey& default_instance() { + return *internal_default_instance(); + } + static inline const GenericPublicKey* internal_default_instance() { + return reinterpret_cast( + &_GenericPublicKey_default_instance_); + } + static constexpr int kIndexInFileMessages = + 7; + + friend void swap(GenericPublicKey& a, GenericPublicKey& b) { + a.Swap(&b); + } + inline void Swap(GenericPublicKey* 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(GenericPublicKey* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + GenericPublicKey* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const GenericPublicKey& from); + void MergeFrom(const GenericPublicKey& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(GenericPublicKey* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "securemessage.GenericPublicKey"; + } + protected: + explicit GenericPublicKey(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kEcP256PublicKeyFieldNumber = 2, + kRsa2048PublicKeyFieldNumber = 3, + kDh2048PublicKeyFieldNumber = 4, + kTypeFieldNumber = 1, + }; + // optional .securemessage.EcP256PublicKey ec_p256_public_key = 2; + bool has_ec_p256_public_key() const; + private: + bool _internal_has_ec_p256_public_key() const; + public: + void clear_ec_p256_public_key(); + const ::securemessage::EcP256PublicKey& ec_p256_public_key() const; + PROTOBUF_NODISCARD ::securemessage::EcP256PublicKey* release_ec_p256_public_key(); + ::securemessage::EcP256PublicKey* mutable_ec_p256_public_key(); + void set_allocated_ec_p256_public_key(::securemessage::EcP256PublicKey* ec_p256_public_key); + private: + const ::securemessage::EcP256PublicKey& _internal_ec_p256_public_key() const; + ::securemessage::EcP256PublicKey* _internal_mutable_ec_p256_public_key(); + public: + void unsafe_arena_set_allocated_ec_p256_public_key( + ::securemessage::EcP256PublicKey* ec_p256_public_key); + ::securemessage::EcP256PublicKey* unsafe_arena_release_ec_p256_public_key(); + + // optional .securemessage.SimpleRsaPublicKey rsa2048_public_key = 3; + bool has_rsa2048_public_key() const; + private: + bool _internal_has_rsa2048_public_key() const; + public: + void clear_rsa2048_public_key(); + const ::securemessage::SimpleRsaPublicKey& rsa2048_public_key() const; + PROTOBUF_NODISCARD ::securemessage::SimpleRsaPublicKey* release_rsa2048_public_key(); + ::securemessage::SimpleRsaPublicKey* mutable_rsa2048_public_key(); + void set_allocated_rsa2048_public_key(::securemessage::SimpleRsaPublicKey* rsa2048_public_key); + private: + const ::securemessage::SimpleRsaPublicKey& _internal_rsa2048_public_key() const; + ::securemessage::SimpleRsaPublicKey* _internal_mutable_rsa2048_public_key(); + public: + void unsafe_arena_set_allocated_rsa2048_public_key( + ::securemessage::SimpleRsaPublicKey* rsa2048_public_key); + ::securemessage::SimpleRsaPublicKey* unsafe_arena_release_rsa2048_public_key(); + + // optional .securemessage.DhPublicKey dh2048_public_key = 4; + bool has_dh2048_public_key() const; + private: + bool _internal_has_dh2048_public_key() const; + public: + void clear_dh2048_public_key(); + const ::securemessage::DhPublicKey& dh2048_public_key() const; + PROTOBUF_NODISCARD ::securemessage::DhPublicKey* release_dh2048_public_key(); + ::securemessage::DhPublicKey* mutable_dh2048_public_key(); + void set_allocated_dh2048_public_key(::securemessage::DhPublicKey* dh2048_public_key); + private: + const ::securemessage::DhPublicKey& _internal_dh2048_public_key() const; + ::securemessage::DhPublicKey* _internal_mutable_dh2048_public_key(); + public: + void unsafe_arena_set_allocated_dh2048_public_key( + ::securemessage::DhPublicKey* dh2048_public_key); + ::securemessage::DhPublicKey* unsafe_arena_release_dh2048_public_key(); + + // required .securemessage.PublicKeyType type = 1; + bool has_type() const; + private: + bool _internal_has_type() const; + public: + void clear_type(); + ::securemessage::PublicKeyType type() const; + void set_type(::securemessage::PublicKeyType value); + private: + ::securemessage::PublicKeyType _internal_type() const; + void _internal_set_type(::securemessage::PublicKeyType value); + public: + + // @@protoc_insertion_point(class_scope:securemessage.GenericPublicKey) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::securemessage::EcP256PublicKey* ec_p256_public_key_; + ::securemessage::SimpleRsaPublicKey* rsa2048_public_key_; + ::securemessage::DhPublicKey* dh2048_public_key_; + int type_; + friend struct ::TableStruct_proto_2fsecuremessage_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// SecureMessage + +// required bytes header_and_body = 1; +inline bool SecureMessage::_internal_has_header_and_body() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool SecureMessage::has_header_and_body() const { + return _internal_has_header_and_body(); +} +inline void SecureMessage::clear_header_and_body() { + header_and_body_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& SecureMessage::header_and_body() const { + // @@protoc_insertion_point(field_get:securemessage.SecureMessage.header_and_body) + return _internal_header_and_body(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void SecureMessage::set_header_and_body(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + header_and_body_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:securemessage.SecureMessage.header_and_body) +} +inline std::string* SecureMessage::mutable_header_and_body() { + std::string* _s = _internal_mutable_header_and_body(); + // @@protoc_insertion_point(field_mutable:securemessage.SecureMessage.header_and_body) + return _s; +} +inline const std::string& SecureMessage::_internal_header_and_body() const { + return header_and_body_.Get(); +} +inline void SecureMessage::_internal_set_header_and_body(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + header_and_body_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* SecureMessage::_internal_mutable_header_and_body() { + _has_bits_[0] |= 0x00000001u; + return header_and_body_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* SecureMessage::release_header_and_body() { + // @@protoc_insertion_point(field_release:securemessage.SecureMessage.header_and_body) + if (!_internal_has_header_and_body()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = header_and_body_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (header_and_body_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + header_and_body_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void SecureMessage::set_allocated_header_and_body(std::string* header_and_body) { + if (header_and_body != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + header_and_body_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), header_and_body, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (header_and_body_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + header_and_body_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:securemessage.SecureMessage.header_and_body) +} + +// required bytes signature = 2; +inline bool SecureMessage::_internal_has_signature() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool SecureMessage::has_signature() const { + return _internal_has_signature(); +} +inline void SecureMessage::clear_signature() { + signature_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000002u; +} +inline const std::string& SecureMessage::signature() const { + // @@protoc_insertion_point(field_get:securemessage.SecureMessage.signature) + return _internal_signature(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void SecureMessage::set_signature(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000002u; + signature_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:securemessage.SecureMessage.signature) +} +inline std::string* SecureMessage::mutable_signature() { + std::string* _s = _internal_mutable_signature(); + // @@protoc_insertion_point(field_mutable:securemessage.SecureMessage.signature) + return _s; +} +inline const std::string& SecureMessage::_internal_signature() const { + return signature_.Get(); +} +inline void SecureMessage::_internal_set_signature(const std::string& value) { + _has_bits_[0] |= 0x00000002u; + signature_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* SecureMessage::_internal_mutable_signature() { + _has_bits_[0] |= 0x00000002u; + return signature_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* SecureMessage::release_signature() { + // @@protoc_insertion_point(field_release:securemessage.SecureMessage.signature) + if (!_internal_has_signature()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000002u; + auto* p = signature_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (signature_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + signature_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void SecureMessage::set_allocated_signature(std::string* signature) { + if (signature != nullptr) { + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + signature_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), signature, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (signature_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + signature_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:securemessage.SecureMessage.signature) +} + +// ------------------------------------------------------------------- + +// Header + +// required .securemessage.SigScheme signature_scheme = 1; +inline bool Header::_internal_has_signature_scheme() const { + bool value = (_has_bits_[0] & 0x00000020u) != 0; + return value; +} +inline bool Header::has_signature_scheme() const { + return _internal_has_signature_scheme(); +} +inline void Header::clear_signature_scheme() { + signature_scheme_ = 1; + _has_bits_[0] &= ~0x00000020u; +} +inline ::securemessage::SigScheme Header::_internal_signature_scheme() const { + return static_cast< ::securemessage::SigScheme >(signature_scheme_); +} +inline ::securemessage::SigScheme Header::signature_scheme() const { + // @@protoc_insertion_point(field_get:securemessage.Header.signature_scheme) + return _internal_signature_scheme(); +} +inline void Header::_internal_set_signature_scheme(::securemessage::SigScheme value) { + assert(::securemessage::SigScheme_IsValid(value)); + _has_bits_[0] |= 0x00000020u; + signature_scheme_ = value; +} +inline void Header::set_signature_scheme(::securemessage::SigScheme value) { + _internal_set_signature_scheme(value); + // @@protoc_insertion_point(field_set:securemessage.Header.signature_scheme) +} + +// required .securemessage.EncScheme encryption_scheme = 2; +inline bool Header::_internal_has_encryption_scheme() const { + bool value = (_has_bits_[0] & 0x00000040u) != 0; + return value; +} +inline bool Header::has_encryption_scheme() const { + return _internal_has_encryption_scheme(); +} +inline void Header::clear_encryption_scheme() { + encryption_scheme_ = 1; + _has_bits_[0] &= ~0x00000040u; +} +inline ::securemessage::EncScheme Header::_internal_encryption_scheme() const { + return static_cast< ::securemessage::EncScheme >(encryption_scheme_); +} +inline ::securemessage::EncScheme Header::encryption_scheme() const { + // @@protoc_insertion_point(field_get:securemessage.Header.encryption_scheme) + return _internal_encryption_scheme(); +} +inline void Header::_internal_set_encryption_scheme(::securemessage::EncScheme value) { + assert(::securemessage::EncScheme_IsValid(value)); + _has_bits_[0] |= 0x00000040u; + encryption_scheme_ = value; +} +inline void Header::set_encryption_scheme(::securemessage::EncScheme value) { + _internal_set_encryption_scheme(value); + // @@protoc_insertion_point(field_set:securemessage.Header.encryption_scheme) +} + +// optional bytes verification_key_id = 3; +inline bool Header::_internal_has_verification_key_id() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool Header::has_verification_key_id() const { + return _internal_has_verification_key_id(); +} +inline void Header::clear_verification_key_id() { + verification_key_id_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& Header::verification_key_id() const { + // @@protoc_insertion_point(field_get:securemessage.Header.verification_key_id) + return _internal_verification_key_id(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void Header::set_verification_key_id(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + verification_key_id_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:securemessage.Header.verification_key_id) +} +inline std::string* Header::mutable_verification_key_id() { + std::string* _s = _internal_mutable_verification_key_id(); + // @@protoc_insertion_point(field_mutable:securemessage.Header.verification_key_id) + return _s; +} +inline const std::string& Header::_internal_verification_key_id() const { + return verification_key_id_.Get(); +} +inline void Header::_internal_set_verification_key_id(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + verification_key_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* Header::_internal_mutable_verification_key_id() { + _has_bits_[0] |= 0x00000001u; + return verification_key_id_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* Header::release_verification_key_id() { + // @@protoc_insertion_point(field_release:securemessage.Header.verification_key_id) + if (!_internal_has_verification_key_id()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = verification_key_id_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (verification_key_id_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + verification_key_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void Header::set_allocated_verification_key_id(std::string* verification_key_id) { + if (verification_key_id != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + verification_key_id_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), verification_key_id, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (verification_key_id_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + verification_key_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:securemessage.Header.verification_key_id) +} + +// optional bytes decryption_key_id = 4; +inline bool Header::_internal_has_decryption_key_id() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool Header::has_decryption_key_id() const { + return _internal_has_decryption_key_id(); +} +inline void Header::clear_decryption_key_id() { + decryption_key_id_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000002u; +} +inline const std::string& Header::decryption_key_id() const { + // @@protoc_insertion_point(field_get:securemessage.Header.decryption_key_id) + return _internal_decryption_key_id(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void Header::set_decryption_key_id(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000002u; + decryption_key_id_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:securemessage.Header.decryption_key_id) +} +inline std::string* Header::mutable_decryption_key_id() { + std::string* _s = _internal_mutable_decryption_key_id(); + // @@protoc_insertion_point(field_mutable:securemessage.Header.decryption_key_id) + return _s; +} +inline const std::string& Header::_internal_decryption_key_id() const { + return decryption_key_id_.Get(); +} +inline void Header::_internal_set_decryption_key_id(const std::string& value) { + _has_bits_[0] |= 0x00000002u; + decryption_key_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* Header::_internal_mutable_decryption_key_id() { + _has_bits_[0] |= 0x00000002u; + return decryption_key_id_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* Header::release_decryption_key_id() { + // @@protoc_insertion_point(field_release:securemessage.Header.decryption_key_id) + if (!_internal_has_decryption_key_id()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000002u; + auto* p = decryption_key_id_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (decryption_key_id_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + decryption_key_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void Header::set_allocated_decryption_key_id(std::string* decryption_key_id) { + if (decryption_key_id != nullptr) { + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + decryption_key_id_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), decryption_key_id, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (decryption_key_id_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + decryption_key_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:securemessage.Header.decryption_key_id) +} + +// optional bytes iv = 5; +inline bool Header::_internal_has_iv() const { + bool value = (_has_bits_[0] & 0x00000004u) != 0; + return value; +} +inline bool Header::has_iv() const { + return _internal_has_iv(); +} +inline void Header::clear_iv() { + iv_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000004u; +} +inline const std::string& Header::iv() const { + // @@protoc_insertion_point(field_get:securemessage.Header.iv) + return _internal_iv(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void Header::set_iv(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000004u; + iv_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:securemessage.Header.iv) +} +inline std::string* Header::mutable_iv() { + std::string* _s = _internal_mutable_iv(); + // @@protoc_insertion_point(field_mutable:securemessage.Header.iv) + return _s; +} +inline const std::string& Header::_internal_iv() const { + return iv_.Get(); +} +inline void Header::_internal_set_iv(const std::string& value) { + _has_bits_[0] |= 0x00000004u; + iv_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* Header::_internal_mutable_iv() { + _has_bits_[0] |= 0x00000004u; + return iv_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* Header::release_iv() { + // @@protoc_insertion_point(field_release:securemessage.Header.iv) + if (!_internal_has_iv()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000004u; + auto* p = iv_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (iv_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + iv_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void Header::set_allocated_iv(std::string* iv) { + if (iv != nullptr) { + _has_bits_[0] |= 0x00000004u; + } else { + _has_bits_[0] &= ~0x00000004u; + } + iv_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), iv, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (iv_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + iv_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:securemessage.Header.iv) +} + +// optional bytes public_metadata = 6; +inline bool Header::_internal_has_public_metadata() const { + bool value = (_has_bits_[0] & 0x00000008u) != 0; + return value; +} +inline bool Header::has_public_metadata() const { + return _internal_has_public_metadata(); +} +inline void Header::clear_public_metadata() { + public_metadata_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000008u; +} +inline const std::string& Header::public_metadata() const { + // @@protoc_insertion_point(field_get:securemessage.Header.public_metadata) + return _internal_public_metadata(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void Header::set_public_metadata(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000008u; + public_metadata_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:securemessage.Header.public_metadata) +} +inline std::string* Header::mutable_public_metadata() { + std::string* _s = _internal_mutable_public_metadata(); + // @@protoc_insertion_point(field_mutable:securemessage.Header.public_metadata) + return _s; +} +inline const std::string& Header::_internal_public_metadata() const { + return public_metadata_.Get(); +} +inline void Header::_internal_set_public_metadata(const std::string& value) { + _has_bits_[0] |= 0x00000008u; + public_metadata_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* Header::_internal_mutable_public_metadata() { + _has_bits_[0] |= 0x00000008u; + return public_metadata_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* Header::release_public_metadata() { + // @@protoc_insertion_point(field_release:securemessage.Header.public_metadata) + if (!_internal_has_public_metadata()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000008u; + auto* p = public_metadata_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (public_metadata_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + public_metadata_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void Header::set_allocated_public_metadata(std::string* public_metadata) { + if (public_metadata != nullptr) { + _has_bits_[0] |= 0x00000008u; + } else { + _has_bits_[0] &= ~0x00000008u; + } + public_metadata_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), public_metadata, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (public_metadata_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + public_metadata_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:securemessage.Header.public_metadata) +} + +// optional uint32 associated_data_length = 7 [default = 0]; +inline bool Header::_internal_has_associated_data_length() const { + bool value = (_has_bits_[0] & 0x00000010u) != 0; + return value; +} +inline bool Header::has_associated_data_length() const { + return _internal_has_associated_data_length(); +} +inline void Header::clear_associated_data_length() { + associated_data_length_ = 0u; + _has_bits_[0] &= ~0x00000010u; +} +inline uint32_t Header::_internal_associated_data_length() const { + return associated_data_length_; +} +inline uint32_t Header::associated_data_length() const { + // @@protoc_insertion_point(field_get:securemessage.Header.associated_data_length) + return _internal_associated_data_length(); +} +inline void Header::_internal_set_associated_data_length(uint32_t value) { + _has_bits_[0] |= 0x00000010u; + associated_data_length_ = value; +} +inline void Header::set_associated_data_length(uint32_t value) { + _internal_set_associated_data_length(value); + // @@protoc_insertion_point(field_set:securemessage.Header.associated_data_length) +} + +// ------------------------------------------------------------------- + +// HeaderAndBody + +// required .securemessage.Header header = 1; +inline bool HeaderAndBody::_internal_has_header() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + PROTOBUF_ASSUME(!value || header_ != nullptr); + return value; +} +inline bool HeaderAndBody::has_header() const { + return _internal_has_header(); +} +inline void HeaderAndBody::clear_header() { + if (header_ != nullptr) header_->Clear(); + _has_bits_[0] &= ~0x00000002u; +} +inline const ::securemessage::Header& HeaderAndBody::_internal_header() const { + const ::securemessage::Header* p = header_; + return p != nullptr ? *p : reinterpret_cast( + ::securemessage::_Header_default_instance_); +} +inline const ::securemessage::Header& HeaderAndBody::header() const { + // @@protoc_insertion_point(field_get:securemessage.HeaderAndBody.header) + return _internal_header(); +} +inline void HeaderAndBody::unsafe_arena_set_allocated_header( + ::securemessage::Header* header) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(header_); + } + header_ = header; + if (header) { + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:securemessage.HeaderAndBody.header) +} +inline ::securemessage::Header* HeaderAndBody::release_header() { + _has_bits_[0] &= ~0x00000002u; + ::securemessage::Header* temp = header_; + header_ = 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 ::securemessage::Header* HeaderAndBody::unsafe_arena_release_header() { + // @@protoc_insertion_point(field_release:securemessage.HeaderAndBody.header) + _has_bits_[0] &= ~0x00000002u; + ::securemessage::Header* temp = header_; + header_ = nullptr; + return temp; +} +inline ::securemessage::Header* HeaderAndBody::_internal_mutable_header() { + _has_bits_[0] |= 0x00000002u; + if (header_ == nullptr) { + auto* p = CreateMaybeMessage<::securemessage::Header>(GetArenaForAllocation()); + header_ = p; + } + return header_; +} +inline ::securemessage::Header* HeaderAndBody::mutable_header() { + ::securemessage::Header* _msg = _internal_mutable_header(); + // @@protoc_insertion_point(field_mutable:securemessage.HeaderAndBody.header) + return _msg; +} +inline void HeaderAndBody::set_allocated_header(::securemessage::Header* header) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete header_; + } + if (header) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::securemessage::Header>::GetOwningArena(header); + if (message_arena != submessage_arena) { + header = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, header, submessage_arena); + } + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + header_ = header; + // @@protoc_insertion_point(field_set_allocated:securemessage.HeaderAndBody.header) +} + +// required bytes body = 2; +inline bool HeaderAndBody::_internal_has_body() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool HeaderAndBody::has_body() const { + return _internal_has_body(); +} +inline void HeaderAndBody::clear_body() { + body_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& HeaderAndBody::body() const { + // @@protoc_insertion_point(field_get:securemessage.HeaderAndBody.body) + return _internal_body(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void HeaderAndBody::set_body(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + body_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:securemessage.HeaderAndBody.body) +} +inline std::string* HeaderAndBody::mutable_body() { + std::string* _s = _internal_mutable_body(); + // @@protoc_insertion_point(field_mutable:securemessage.HeaderAndBody.body) + return _s; +} +inline const std::string& HeaderAndBody::_internal_body() const { + return body_.Get(); +} +inline void HeaderAndBody::_internal_set_body(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + body_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* HeaderAndBody::_internal_mutable_body() { + _has_bits_[0] |= 0x00000001u; + return body_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* HeaderAndBody::release_body() { + // @@protoc_insertion_point(field_release:securemessage.HeaderAndBody.body) + if (!_internal_has_body()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = body_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (body_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + body_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void HeaderAndBody::set_allocated_body(std::string* body) { + if (body != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + body_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), body, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (body_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + body_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:securemessage.HeaderAndBody.body) +} + +// ------------------------------------------------------------------- + +// HeaderAndBodyInternal + +// required bytes header = 1; +inline bool HeaderAndBodyInternal::_internal_has_header() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool HeaderAndBodyInternal::has_header() const { + return _internal_has_header(); +} +inline void HeaderAndBodyInternal::clear_header() { + header_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& HeaderAndBodyInternal::header() const { + // @@protoc_insertion_point(field_get:securemessage.HeaderAndBodyInternal.header) + return _internal_header(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void HeaderAndBodyInternal::set_header(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + header_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:securemessage.HeaderAndBodyInternal.header) +} +inline std::string* HeaderAndBodyInternal::mutable_header() { + std::string* _s = _internal_mutable_header(); + // @@protoc_insertion_point(field_mutable:securemessage.HeaderAndBodyInternal.header) + return _s; +} +inline const std::string& HeaderAndBodyInternal::_internal_header() const { + return header_.Get(); +} +inline void HeaderAndBodyInternal::_internal_set_header(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + header_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* HeaderAndBodyInternal::_internal_mutable_header() { + _has_bits_[0] |= 0x00000001u; + return header_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* HeaderAndBodyInternal::release_header() { + // @@protoc_insertion_point(field_release:securemessage.HeaderAndBodyInternal.header) + if (!_internal_has_header()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = header_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (header_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + header_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void HeaderAndBodyInternal::set_allocated_header(std::string* header) { + if (header != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + header_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), header, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (header_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + header_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:securemessage.HeaderAndBodyInternal.header) +} + +// required bytes body = 2; +inline bool HeaderAndBodyInternal::_internal_has_body() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool HeaderAndBodyInternal::has_body() const { + return _internal_has_body(); +} +inline void HeaderAndBodyInternal::clear_body() { + body_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000002u; +} +inline const std::string& HeaderAndBodyInternal::body() const { + // @@protoc_insertion_point(field_get:securemessage.HeaderAndBodyInternal.body) + return _internal_body(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void HeaderAndBodyInternal::set_body(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000002u; + body_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:securemessage.HeaderAndBodyInternal.body) +} +inline std::string* HeaderAndBodyInternal::mutable_body() { + std::string* _s = _internal_mutable_body(); + // @@protoc_insertion_point(field_mutable:securemessage.HeaderAndBodyInternal.body) + return _s; +} +inline const std::string& HeaderAndBodyInternal::_internal_body() const { + return body_.Get(); +} +inline void HeaderAndBodyInternal::_internal_set_body(const std::string& value) { + _has_bits_[0] |= 0x00000002u; + body_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* HeaderAndBodyInternal::_internal_mutable_body() { + _has_bits_[0] |= 0x00000002u; + return body_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* HeaderAndBodyInternal::release_body() { + // @@protoc_insertion_point(field_release:securemessage.HeaderAndBodyInternal.body) + if (!_internal_has_body()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000002u; + auto* p = body_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (body_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + body_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void HeaderAndBodyInternal::set_allocated_body(std::string* body) { + if (body != nullptr) { + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + body_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), body, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (body_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + body_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:securemessage.HeaderAndBodyInternal.body) +} + +// ------------------------------------------------------------------- + +// EcP256PublicKey + +// required bytes x = 1; +inline bool EcP256PublicKey::_internal_has_x() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool EcP256PublicKey::has_x() const { + return _internal_has_x(); +} +inline void EcP256PublicKey::clear_x() { + x_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& EcP256PublicKey::x() const { + // @@protoc_insertion_point(field_get:securemessage.EcP256PublicKey.x) + return _internal_x(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void EcP256PublicKey::set_x(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + x_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:securemessage.EcP256PublicKey.x) +} +inline std::string* EcP256PublicKey::mutable_x() { + std::string* _s = _internal_mutable_x(); + // @@protoc_insertion_point(field_mutable:securemessage.EcP256PublicKey.x) + return _s; +} +inline const std::string& EcP256PublicKey::_internal_x() const { + return x_.Get(); +} +inline void EcP256PublicKey::_internal_set_x(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + x_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* EcP256PublicKey::_internal_mutable_x() { + _has_bits_[0] |= 0x00000001u; + return x_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* EcP256PublicKey::release_x() { + // @@protoc_insertion_point(field_release:securemessage.EcP256PublicKey.x) + if (!_internal_has_x()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = x_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (x_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + x_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void EcP256PublicKey::set_allocated_x(std::string* x) { + if (x != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + x_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), x, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (x_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + x_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:securemessage.EcP256PublicKey.x) +} + +// required bytes y = 2; +inline bool EcP256PublicKey::_internal_has_y() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool EcP256PublicKey::has_y() const { + return _internal_has_y(); +} +inline void EcP256PublicKey::clear_y() { + y_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000002u; +} +inline const std::string& EcP256PublicKey::y() const { + // @@protoc_insertion_point(field_get:securemessage.EcP256PublicKey.y) + return _internal_y(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void EcP256PublicKey::set_y(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000002u; + y_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:securemessage.EcP256PublicKey.y) +} +inline std::string* EcP256PublicKey::mutable_y() { + std::string* _s = _internal_mutable_y(); + // @@protoc_insertion_point(field_mutable:securemessage.EcP256PublicKey.y) + return _s; +} +inline const std::string& EcP256PublicKey::_internal_y() const { + return y_.Get(); +} +inline void EcP256PublicKey::_internal_set_y(const std::string& value) { + _has_bits_[0] |= 0x00000002u; + y_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* EcP256PublicKey::_internal_mutable_y() { + _has_bits_[0] |= 0x00000002u; + return y_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* EcP256PublicKey::release_y() { + // @@protoc_insertion_point(field_release:securemessage.EcP256PublicKey.y) + if (!_internal_has_y()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000002u; + auto* p = y_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (y_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + y_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void EcP256PublicKey::set_allocated_y(std::string* y) { + if (y != nullptr) { + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + y_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), y, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (y_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + y_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:securemessage.EcP256PublicKey.y) +} + +// ------------------------------------------------------------------- + +// SimpleRsaPublicKey + +// required bytes n = 1; +inline bool SimpleRsaPublicKey::_internal_has_n() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool SimpleRsaPublicKey::has_n() const { + return _internal_has_n(); +} +inline void SimpleRsaPublicKey::clear_n() { + n_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& SimpleRsaPublicKey::n() const { + // @@protoc_insertion_point(field_get:securemessage.SimpleRsaPublicKey.n) + return _internal_n(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void SimpleRsaPublicKey::set_n(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + n_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:securemessage.SimpleRsaPublicKey.n) +} +inline std::string* SimpleRsaPublicKey::mutable_n() { + std::string* _s = _internal_mutable_n(); + // @@protoc_insertion_point(field_mutable:securemessage.SimpleRsaPublicKey.n) + return _s; +} +inline const std::string& SimpleRsaPublicKey::_internal_n() const { + return n_.Get(); +} +inline void SimpleRsaPublicKey::_internal_set_n(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + n_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* SimpleRsaPublicKey::_internal_mutable_n() { + _has_bits_[0] |= 0x00000001u; + return n_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* SimpleRsaPublicKey::release_n() { + // @@protoc_insertion_point(field_release:securemessage.SimpleRsaPublicKey.n) + if (!_internal_has_n()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = n_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (n_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + n_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void SimpleRsaPublicKey::set_allocated_n(std::string* n) { + if (n != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + n_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), n, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (n_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + n_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:securemessage.SimpleRsaPublicKey.n) +} + +// optional int32 e = 2 [default = 65537]; +inline bool SimpleRsaPublicKey::_internal_has_e() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool SimpleRsaPublicKey::has_e() const { + return _internal_has_e(); +} +inline void SimpleRsaPublicKey::clear_e() { + e_ = 65537; + _has_bits_[0] &= ~0x00000002u; +} +inline int32_t SimpleRsaPublicKey::_internal_e() const { + return e_; +} +inline int32_t SimpleRsaPublicKey::e() const { + // @@protoc_insertion_point(field_get:securemessage.SimpleRsaPublicKey.e) + return _internal_e(); +} +inline void SimpleRsaPublicKey::_internal_set_e(int32_t value) { + _has_bits_[0] |= 0x00000002u; + e_ = value; +} +inline void SimpleRsaPublicKey::set_e(int32_t value) { + _internal_set_e(value); + // @@protoc_insertion_point(field_set:securemessage.SimpleRsaPublicKey.e) +} + +// ------------------------------------------------------------------- + +// DhPublicKey + +// required bytes y = 1; +inline bool DhPublicKey::_internal_has_y() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool DhPublicKey::has_y() const { + return _internal_has_y(); +} +inline void DhPublicKey::clear_y() { + y_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& DhPublicKey::y() const { + // @@protoc_insertion_point(field_get:securemessage.DhPublicKey.y) + return _internal_y(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void DhPublicKey::set_y(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + y_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:securemessage.DhPublicKey.y) +} +inline std::string* DhPublicKey::mutable_y() { + std::string* _s = _internal_mutable_y(); + // @@protoc_insertion_point(field_mutable:securemessage.DhPublicKey.y) + return _s; +} +inline const std::string& DhPublicKey::_internal_y() const { + return y_.Get(); +} +inline void DhPublicKey::_internal_set_y(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + y_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* DhPublicKey::_internal_mutable_y() { + _has_bits_[0] |= 0x00000001u; + return y_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* DhPublicKey::release_y() { + // @@protoc_insertion_point(field_release:securemessage.DhPublicKey.y) + if (!_internal_has_y()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = y_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (y_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + y_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void DhPublicKey::set_allocated_y(std::string* y) { + if (y != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + y_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), y, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (y_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + y_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:securemessage.DhPublicKey.y) +} + +// ------------------------------------------------------------------- + +// GenericPublicKey + +// required .securemessage.PublicKeyType type = 1; +inline bool GenericPublicKey::_internal_has_type() const { + bool value = (_has_bits_[0] & 0x00000008u) != 0; + return value; +} +inline bool GenericPublicKey::has_type() const { + return _internal_has_type(); +} +inline void GenericPublicKey::clear_type() { + type_ = 1; + _has_bits_[0] &= ~0x00000008u; +} +inline ::securemessage::PublicKeyType GenericPublicKey::_internal_type() const { + return static_cast< ::securemessage::PublicKeyType >(type_); +} +inline ::securemessage::PublicKeyType GenericPublicKey::type() const { + // @@protoc_insertion_point(field_get:securemessage.GenericPublicKey.type) + return _internal_type(); +} +inline void GenericPublicKey::_internal_set_type(::securemessage::PublicKeyType value) { + assert(::securemessage::PublicKeyType_IsValid(value)); + _has_bits_[0] |= 0x00000008u; + type_ = value; +} +inline void GenericPublicKey::set_type(::securemessage::PublicKeyType value) { + _internal_set_type(value); + // @@protoc_insertion_point(field_set:securemessage.GenericPublicKey.type) +} + +// optional .securemessage.EcP256PublicKey ec_p256_public_key = 2; +inline bool GenericPublicKey::_internal_has_ec_p256_public_key() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + PROTOBUF_ASSUME(!value || ec_p256_public_key_ != nullptr); + return value; +} +inline bool GenericPublicKey::has_ec_p256_public_key() const { + return _internal_has_ec_p256_public_key(); +} +inline void GenericPublicKey::clear_ec_p256_public_key() { + if (ec_p256_public_key_ != nullptr) ec_p256_public_key_->Clear(); + _has_bits_[0] &= ~0x00000001u; +} +inline const ::securemessage::EcP256PublicKey& GenericPublicKey::_internal_ec_p256_public_key() const { + const ::securemessage::EcP256PublicKey* p = ec_p256_public_key_; + return p != nullptr ? *p : reinterpret_cast( + ::securemessage::_EcP256PublicKey_default_instance_); +} +inline const ::securemessage::EcP256PublicKey& GenericPublicKey::ec_p256_public_key() const { + // @@protoc_insertion_point(field_get:securemessage.GenericPublicKey.ec_p256_public_key) + return _internal_ec_p256_public_key(); +} +inline void GenericPublicKey::unsafe_arena_set_allocated_ec_p256_public_key( + ::securemessage::EcP256PublicKey* ec_p256_public_key) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(ec_p256_public_key_); + } + ec_p256_public_key_ = ec_p256_public_key; + if (ec_p256_public_key) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:securemessage.GenericPublicKey.ec_p256_public_key) +} +inline ::securemessage::EcP256PublicKey* GenericPublicKey::release_ec_p256_public_key() { + _has_bits_[0] &= ~0x00000001u; + ::securemessage::EcP256PublicKey* temp = ec_p256_public_key_; + ec_p256_public_key_ = 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 ::securemessage::EcP256PublicKey* GenericPublicKey::unsafe_arena_release_ec_p256_public_key() { + // @@protoc_insertion_point(field_release:securemessage.GenericPublicKey.ec_p256_public_key) + _has_bits_[0] &= ~0x00000001u; + ::securemessage::EcP256PublicKey* temp = ec_p256_public_key_; + ec_p256_public_key_ = nullptr; + return temp; +} +inline ::securemessage::EcP256PublicKey* GenericPublicKey::_internal_mutable_ec_p256_public_key() { + _has_bits_[0] |= 0x00000001u; + if (ec_p256_public_key_ == nullptr) { + auto* p = CreateMaybeMessage<::securemessage::EcP256PublicKey>(GetArenaForAllocation()); + ec_p256_public_key_ = p; + } + return ec_p256_public_key_; +} +inline ::securemessage::EcP256PublicKey* GenericPublicKey::mutable_ec_p256_public_key() { + ::securemessage::EcP256PublicKey* _msg = _internal_mutable_ec_p256_public_key(); + // @@protoc_insertion_point(field_mutable:securemessage.GenericPublicKey.ec_p256_public_key) + return _msg; +} +inline void GenericPublicKey::set_allocated_ec_p256_public_key(::securemessage::EcP256PublicKey* ec_p256_public_key) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete ec_p256_public_key_; + } + if (ec_p256_public_key) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::securemessage::EcP256PublicKey>::GetOwningArena(ec_p256_public_key); + if (message_arena != submessage_arena) { + ec_p256_public_key = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, ec_p256_public_key, submessage_arena); + } + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + ec_p256_public_key_ = ec_p256_public_key; + // @@protoc_insertion_point(field_set_allocated:securemessage.GenericPublicKey.ec_p256_public_key) +} + +// optional .securemessage.SimpleRsaPublicKey rsa2048_public_key = 3; +inline bool GenericPublicKey::_internal_has_rsa2048_public_key() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + PROTOBUF_ASSUME(!value || rsa2048_public_key_ != nullptr); + return value; +} +inline bool GenericPublicKey::has_rsa2048_public_key() const { + return _internal_has_rsa2048_public_key(); +} +inline void GenericPublicKey::clear_rsa2048_public_key() { + if (rsa2048_public_key_ != nullptr) rsa2048_public_key_->Clear(); + _has_bits_[0] &= ~0x00000002u; +} +inline const ::securemessage::SimpleRsaPublicKey& GenericPublicKey::_internal_rsa2048_public_key() const { + const ::securemessage::SimpleRsaPublicKey* p = rsa2048_public_key_; + return p != nullptr ? *p : reinterpret_cast( + ::securemessage::_SimpleRsaPublicKey_default_instance_); +} +inline const ::securemessage::SimpleRsaPublicKey& GenericPublicKey::rsa2048_public_key() const { + // @@protoc_insertion_point(field_get:securemessage.GenericPublicKey.rsa2048_public_key) + return _internal_rsa2048_public_key(); +} +inline void GenericPublicKey::unsafe_arena_set_allocated_rsa2048_public_key( + ::securemessage::SimpleRsaPublicKey* rsa2048_public_key) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(rsa2048_public_key_); + } + rsa2048_public_key_ = rsa2048_public_key; + if (rsa2048_public_key) { + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:securemessage.GenericPublicKey.rsa2048_public_key) +} +inline ::securemessage::SimpleRsaPublicKey* GenericPublicKey::release_rsa2048_public_key() { + _has_bits_[0] &= ~0x00000002u; + ::securemessage::SimpleRsaPublicKey* temp = rsa2048_public_key_; + rsa2048_public_key_ = 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 ::securemessage::SimpleRsaPublicKey* GenericPublicKey::unsafe_arena_release_rsa2048_public_key() { + // @@protoc_insertion_point(field_release:securemessage.GenericPublicKey.rsa2048_public_key) + _has_bits_[0] &= ~0x00000002u; + ::securemessage::SimpleRsaPublicKey* temp = rsa2048_public_key_; + rsa2048_public_key_ = nullptr; + return temp; +} +inline ::securemessage::SimpleRsaPublicKey* GenericPublicKey::_internal_mutable_rsa2048_public_key() { + _has_bits_[0] |= 0x00000002u; + if (rsa2048_public_key_ == nullptr) { + auto* p = CreateMaybeMessage<::securemessage::SimpleRsaPublicKey>(GetArenaForAllocation()); + rsa2048_public_key_ = p; + } + return rsa2048_public_key_; +} +inline ::securemessage::SimpleRsaPublicKey* GenericPublicKey::mutable_rsa2048_public_key() { + ::securemessage::SimpleRsaPublicKey* _msg = _internal_mutable_rsa2048_public_key(); + // @@protoc_insertion_point(field_mutable:securemessage.GenericPublicKey.rsa2048_public_key) + return _msg; +} +inline void GenericPublicKey::set_allocated_rsa2048_public_key(::securemessage::SimpleRsaPublicKey* rsa2048_public_key) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete rsa2048_public_key_; + } + if (rsa2048_public_key) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::securemessage::SimpleRsaPublicKey>::GetOwningArena(rsa2048_public_key); + if (message_arena != submessage_arena) { + rsa2048_public_key = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, rsa2048_public_key, submessage_arena); + } + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + rsa2048_public_key_ = rsa2048_public_key; + // @@protoc_insertion_point(field_set_allocated:securemessage.GenericPublicKey.rsa2048_public_key) +} + +// optional .securemessage.DhPublicKey dh2048_public_key = 4; +inline bool GenericPublicKey::_internal_has_dh2048_public_key() const { + bool value = (_has_bits_[0] & 0x00000004u) != 0; + PROTOBUF_ASSUME(!value || dh2048_public_key_ != nullptr); + return value; +} +inline bool GenericPublicKey::has_dh2048_public_key() const { + return _internal_has_dh2048_public_key(); +} +inline void GenericPublicKey::clear_dh2048_public_key() { + if (dh2048_public_key_ != nullptr) dh2048_public_key_->Clear(); + _has_bits_[0] &= ~0x00000004u; +} +inline const ::securemessage::DhPublicKey& GenericPublicKey::_internal_dh2048_public_key() const { + const ::securemessage::DhPublicKey* p = dh2048_public_key_; + return p != nullptr ? *p : reinterpret_cast( + ::securemessage::_DhPublicKey_default_instance_); +} +inline const ::securemessage::DhPublicKey& GenericPublicKey::dh2048_public_key() const { + // @@protoc_insertion_point(field_get:securemessage.GenericPublicKey.dh2048_public_key) + return _internal_dh2048_public_key(); +} +inline void GenericPublicKey::unsafe_arena_set_allocated_dh2048_public_key( + ::securemessage::DhPublicKey* dh2048_public_key) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(dh2048_public_key_); + } + dh2048_public_key_ = dh2048_public_key; + if (dh2048_public_key) { + _has_bits_[0] |= 0x00000004u; + } else { + _has_bits_[0] &= ~0x00000004u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:securemessage.GenericPublicKey.dh2048_public_key) +} +inline ::securemessage::DhPublicKey* GenericPublicKey::release_dh2048_public_key() { + _has_bits_[0] &= ~0x00000004u; + ::securemessage::DhPublicKey* temp = dh2048_public_key_; + dh2048_public_key_ = 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 ::securemessage::DhPublicKey* GenericPublicKey::unsafe_arena_release_dh2048_public_key() { + // @@protoc_insertion_point(field_release:securemessage.GenericPublicKey.dh2048_public_key) + _has_bits_[0] &= ~0x00000004u; + ::securemessage::DhPublicKey* temp = dh2048_public_key_; + dh2048_public_key_ = nullptr; + return temp; +} +inline ::securemessage::DhPublicKey* GenericPublicKey::_internal_mutable_dh2048_public_key() { + _has_bits_[0] |= 0x00000004u; + if (dh2048_public_key_ == nullptr) { + auto* p = CreateMaybeMessage<::securemessage::DhPublicKey>(GetArenaForAllocation()); + dh2048_public_key_ = p; + } + return dh2048_public_key_; +} +inline ::securemessage::DhPublicKey* GenericPublicKey::mutable_dh2048_public_key() { + ::securemessage::DhPublicKey* _msg = _internal_mutable_dh2048_public_key(); + // @@protoc_insertion_point(field_mutable:securemessage.GenericPublicKey.dh2048_public_key) + return _msg; +} +inline void GenericPublicKey::set_allocated_dh2048_public_key(::securemessage::DhPublicKey* dh2048_public_key) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete dh2048_public_key_; + } + if (dh2048_public_key) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::securemessage::DhPublicKey>::GetOwningArena(dh2048_public_key); + if (message_arena != submessage_arena) { + dh2048_public_key = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, dh2048_public_key, submessage_arena); + } + _has_bits_[0] |= 0x00000004u; + } else { + _has_bits_[0] &= ~0x00000004u; + } + dh2048_public_key_ = dh2048_public_key; + // @@protoc_insertion_point(field_set_allocated:securemessage.GenericPublicKey.dh2048_public_key) +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace securemessage + +PROTOBUF_NAMESPACE_OPEN + +template <> struct is_proto_enum< ::securemessage::SigScheme> : ::std::true_type {}; +template <> struct is_proto_enum< ::securemessage::EncScheme> : ::std::true_type {}; +template <> struct is_proto_enum< ::securemessage::PublicKeyType> : ::std::true_type {}; + +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_proto_2fsecuremessage_2eproto diff --git a/third_party/securemessage/include/securemessage/byte_buffer.h b/third_party/securemessage/include/securemessage/byte_buffer.h new file mode 100644 index 00000000..9df49484 --- /dev/null +++ b/third_party/securemessage/include/securemessage/byte_buffer.h @@ -0,0 +1,140 @@ +/* + * Copyright 2014 Google Inc. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// A utility class for helping to interact with contiguous memory regions in a +// way that's both c++ friendly and works with OpenSSL's legacy C requirements. +// +// Will securely destroy enclosed data when deallocated +// + +#ifndef SECUREMESSAGE_BYTE_BUFFER_H_ +#define SECUREMESSAGE_BYTE_BUFFER_H_ + +#include +#include +#include +#include + +#include "securemessage/common.h" + +namespace securemessage { + +class ByteBuffer { + public: + // Create an empty byte buffer + ByteBuffer(); + + // Create a buffer of a certain size. Buffer will be filled with zeros. + explicit ByteBuffer(size_t size); + + // Create a buffer initialized with bytes from a string + explicit ByteBuffer(const string& source_data); + + // Create a buffer initialized with data from a const char* and a length + explicit ByteBuffer(const char* source_data, size_t length); + + // Create a buffer initialized with data from a const char* (assumes null + // termination) + explicit ByteBuffer(const char* source_data); + + // Create a buffer initialized with data from a uint8_t + explicit ByteBuffer(const uint8_t* source_data, size_t length); + + // Fill with the specified data. Any old data is discarded + void SetData(const uint8_t* source_data, size_t length); + + // Appends num_bytes of value byte to the end of the existing data + // Currently may violate secure memory guarantees by leaking some data on the + // heap + void Append(size_t num_bytes, const uint8_t byte); + + // Prepends a string to the beginning of this ByteBuffer + // Currently may violate secure memory guarantees by leaking some data on the + // heap + void Prepend(const string& str); + + // Concatenates two byte buffers. Placing a before b. If a is empty, then + // the result will be b. If b is empty, the result will be a. If both are + // empty, the result will be an empty byte buffer. + static ByteBuffer Concat(const ByteBuffer& a, const ByteBuffer& b); + + // Get size of internal buffer + size_t size() const; + + // Returns a unique pointer to new ByteBuffer of a given length starting from + // a given offset. + // Returns a unique pointer to an empty ByteBuffer if length is 0. + // Returns a nullptr if the specified parameters are invalid. + // Note that valid offset begins at 0 + std::unique_ptr SubArray(size_t offset, size_t length) const; + + // Get mutable memory as unsigned char* + unsigned char* MutableUChar(); + + // Get immutable memory as unsigned char* + unsigned const char* ImmutableUChar() const; + + // Get mutable memory as uint8_t* + uint8_t* MutableUInt8(); + + // Get immutable memory as uint8_t* + const uint8_t* ImmutableUInt8() const; + + // Get a copy of the memory in a C++ string + string String() const; + + // Get a copy of the memory in a C++ vector + std::vector Vector() const; + + // Returns true if the bytes in the other buffer are the same as in this + // buffer, false otherwise. Note: This function does NOT perform an early exit + // when it encounters a mismatching element in order to guard against timing + // attacks. + bool Equals(const ByteBuffer& other) const; + + // Returns true if the bytes in the other string are the same as in this + // buffer, false otherwise. Note: This function does NOT perform an early exit + // when it encounters a mismatching element in order to guard against timing + // attacks. + bool Equals(const string& other) const; + + // Returns a copy of the data as a printable hex string -- for easy debugging + string AsDebugHexString() const; + + // Securely resets the ByteBuffer by securely deleting any stored data. + void Clear(); + + // Securely destroys the ByteBuffer + ~ByteBuffer(); + + private: + // We rely on the fact that vectors are guaranteed to use contiguous memory + // for storing elements. + // TODO(aczeskis): define a custom version of vector that has a wiping + // deallocator. + std::vector data_; + + // Overwrites all elements in data vector one time. Does not resize data + // vector. + void Wipe(); + + // Helper function to wipe a specified buffer. + void WipeBuffer(uint8_t* buffer, size_t length); +}; + +} // namespace securemessage +#endif // SECUREMESSAGE_BYTE_BUFFER_H_ diff --git a/third_party/securemessage/include/securemessage/common.h b/third_party/securemessage/include/securemessage/common.h new file mode 100644 index 00000000..130925f0 --- /dev/null +++ b/third_party/securemessage/include/securemessage/common.h @@ -0,0 +1,26 @@ +/* + * Copyright 2014 Google Inc. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef SECUREMESSAGE_COMMON_H_ +#define SECUREMESSAGE_COMMON_H_ + +#include + +#ifndef HAS_GLOBAL_STRING +using std::string; +#endif + +#endif // SECUREMESSAGE_COMMON_H_ diff --git a/third_party/securemessage/include/securemessage/crypto_ops.h b/third_party/securemessage/include/securemessage/crypto_ops.h new file mode 100644 index 00000000..1fb7cde3 --- /dev/null +++ b/third_party/securemessage/include/securemessage/crypto_ops.h @@ -0,0 +1,503 @@ +/* + * Copyright 2014 Google Inc. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef SECUREMESSAGE_CRYPTO_OPS_H_ +#define SECUREMESSAGE_CRYPTO_OPS_H_ + +#include +#include +#include + +#include "securemessage/byte_buffer.h" +#include "securemessage/common.h" + +namespace securemessage { + +// +// Encapsulates the cryptographic operations used by the {@code SecureMessage*} +// classes. +// +class CryptoOps { + public: + // + // Enum of supported signature schemes. + // + enum SigType { + HMAC_SHA256, + ECDSA_P256_SHA256, + RSA2048_SHA256, + SIG_TYPE_END // used for testing + }; + + // + // Enum of supported encryption types + // + enum EncType { + NONE, + AES_256_CBC, + ENC_TYPE_END // used for testing + }; + + // + // Key Algorithms we support + // + enum KeyAlgorithm { + AES_256_KEY, + ECDSA_KEY, + RSA_KEY + }; + + // + // Key Types we believe to exist + // + enum KeyType { + PUBLIC, + PRIVATE, + SECRET + }; + + // + // Represents a base key class, SecretKey and PublicKey are derived from this + // class + // + class Key { + public: + // + // The default constructor is deleted so that class consumers cannot create + // a generic key class. They must use a particular key type class. + // + Key() = delete; + + ByteBuffer data() { return data_; } + const ByteBuffer& data() const { return data_; } + KeyAlgorithm algorithm() const { return algorithm_; } + KeyType type() const { return type_; } + + protected: + // + // Constructor cannot be called so that consumers can't simply create a + // generic key. Instead, they must use a particular key type class. + // + Key(const ByteBuffer& data, KeyAlgorithm algorithm, KeyType type) { + data_ = data; + algorithm_ = algorithm; + type_ = type; + } + + ByteBuffer data_; + KeyAlgorithm algorithm_; + KeyType type_; + }; + + // + // We have three key types: Public, Private, and Secret (symmetric) + // + class PublicKey : public Key { + public: + PublicKey(const string& data, KeyAlgorithm algorithm) + : Key(ByteBuffer(data), algorithm, PUBLIC) {} + PublicKey(const ByteBuffer& data, KeyAlgorithm algorithm) + : Key(data, algorithm, PUBLIC) {} + }; + + class PrivateKey : public Key { + public: + PrivateKey(const string& data, KeyAlgorithm algorithm) + : Key(ByteBuffer(data), algorithm, PRIVATE) {} + PrivateKey(const ByteBuffer& data, KeyAlgorithm algorithm) + : Key(data, algorithm, PRIVATE) {} + }; + + class SecretKey : public Key { + public: + SecretKey(const string& data, KeyAlgorithm algorithm) + : Key(ByteBuffer(data), algorithm, SECRET) {} + SecretKey(const ByteBuffer& data, KeyAlgorithm algorithm) + : Key(data, algorithm, SECRET) {} + }; + + struct KeyPair { + std::unique_ptr private_key; + std::unique_ptr public_key; + + KeyPair(std::unique_ptr pub, + std::unique_ptr priv) { + public_key = std::move(pub); + private_key = std::move(priv); + } + }; + + // + // Implements HKDF (RFC 5869) with the SHA-256 hash and a 256-bit output key + // length. + // + // @param inputKeyMaterial master key from which to derive sub-keys + // @param salt a (public) randomly generated 256-bit input that can be re-used + // @param info arbitrary information that is bound to the derived key (i.e., + // used in its creation) + // @return a std::unique_ptr holding the derived key bytes = + // HKDF-SHA256(inputKeyMaterial, salt, info) on success or nullptr on error + // + static std::unique_ptr Hkdf(const string& inputKeyMaterial, + const string& salt, + const string& info); + + // + // A key derivation function specific to this library, which accepts a {@code + // masterKey} and an arbitrary {@code purpose} describing the intended + // application of the derived sub-key, and produces a derived AES - 256 key + // safe to use as if it were independent of any other derived key which used + // a different {@code purpose}. + // + // @param masterKey any key suitable for use with HmacSHA256 + // @param purpose a UTF-8 encoded string describing the intended purpose of + // derived key + // @return a derived Key suitable for use with AES-256 + // + static std::unique_ptr DeriveAes256KeyFor( + const SecretKey& masterKey, const string& purpose); + + // + // SHA 256 length, in bytes + // + static const unsigned int kSha256DigestSize = 32; + + // + // Salt length, in bytes + // + static const unsigned int kSaltSize = 32; + + // AES 256 key length, in bytes + static const unsigned int kAesKeySize = 32; + + // + // Truncated hash output length, in bytes. + // + static const unsigned int kDigestLength = 20; + + // + // Computes a collision-resistant hash of {@link #kDigestLength} bytes + // (using a truncated SHA-256 output). + // + // @return a std::unique_ptr holding the digest or a nullptr on error + // + static std::unique_ptr Digest(const string& data); + + // + // Decrypts {@code ciphertext} using the algorithm specified in {@code + // encType}, with the specified {@code iv} and {@code decryptionKey}. + // + // @return a std::unique_ptr holding the decrypted data or a nullptr on error + // + static std::unique_ptr Decrypt(const SecretKey& decryptionKey, + EncType encType, + const string& iv, + const string& ciphertext); + + // + // Encrypts {@code plaintext} using the algorithm specified in {@code + // encType}, with the specified * {@code iv} and {@code encryptionKey}. + // + // @param rng source of randomness to be used with the specified cipher, if + // necessary + // @return a std::unique_ptr holding the encrypted data or nullptr on error + static std::unique_ptr Encrypt(const SecretKey& encryptionKey, + EncType encType, + const string& iv, + const string& plaintext); + + // + // Runs the Diffie-Hellman algorithm. + // + // @param private_key must have the same algorithm as the peer_key + // @param peer_key must be the matching public key + // @return an AES secret key created from the SHA-256 of the secret created + // here or nullptr on error. + // + static std::unique_ptr KeyAgreementSha256( + const PrivateKey& private_key, + const PublicKey& peer_key); + + // + // Generate a random IV appropriate for use with the algorithm specified in + // {@code encType}. + // + // @return a freshly generated IV (a random byte sequence of appropriate + // length) + // + static std::unique_ptr GenerateIv(EncType encType); + + // + // Signs {@code data} using the algorithm specified by {@code sigType} with + // {@code signingKey}. + // + // @param rng is required for public key signature schemes + // @return a std::unique_ptr holding a string that represents the raw + // signature or a nullptr on error + // + static std::unique_ptr Sign(SigType sigType, + const Key& signingKey, + const string& data); + + // + // Verifies the {@code signature} on {@code data} using the algorithm + // specified by {@code sigType} with {@code verificationKey}. + // + // @return true iff the signature is verified + // + static bool Verify(SigType sigType, + const Key& verificationKey, + const string& signature, + const string& data); + + // + // Imports a P256 EC Public Key using the x and y coordinates of the curve. + // + // @return nullptr if the point is invalid + // + static std::unique_ptr ImportEcP256Key(const string& x, + const string& y); + + // + // Exports the x and y coordinates of a P256 EC Public Key. + // + // @return false iff the key cannot be exported (for example, incorrect type) + // + static bool ExportEcP256Key(const PublicKey& key, string *x, string *y); + + // + // Imports a 2048 bit RSA Public Key using the modulus {@code n} and exponent + // {@code e}. + // + // @return nullptr if the parameters are invalid + // + static std::unique_ptr ImportRsa2048Key(const string& n, + int32_t e); + + // + // Exports the modulus and exponent of a 2048 bit RSA Public Key. + // + // @return false iff the key cannot be exported (for example, incorrect type) + // + static bool ExportRsa2048Key(const PublicKey& key, string* n, int32_t* e); + + // + // Returns true if a sigType is a public key scheme + // + static bool IsPublicKeyScheme(SigType sigType); + + // + // Indicates whether a "tag" is needed next to the plaintext body inside the + // ciphertext, to prevent the same ciphertext from being reused with someone + // else's signature on it. + // + static bool TaggedPlaintextRequired(const Key& signing_key, + SigType sig_type, + const Key& encryption_key); + + // Generates a 256 bit AES secret key + static std::unique_ptr GenerateAes256SecretKey(); + + // Generates a P256 EC key pair + static std::unique_ptr GenerateEcP256KeyPair(); + + // Generates a 2048 bit RSA key pair + static std::unique_ptr GenerateRsa2048KeyPair(); + + // + // @return SHA-256(UTF-8 encoded input) + // + // Will return a 32 byte ByteBuffer representing the SHA256 of the input bytes + // Will return a nullptr if an internal error occurs + // + static std::unique_ptr Sha256(const ByteBuffer& message); + + // + // @return SHA-512(UTF-8 encoded input) + // + // Will return a 64 byte ByteBuffer representing the SHA512 of the input bytes + // Will return a nullptr if an internal error occurs + // + static std::unique_ptr Sha512(const ByteBuffer& message); + + // Returns a ByteBuffer of |length|, which is filled with securely generated + // random values. + static std::unique_ptr SecureRandom(size_t length); + + private: + // + // @return SHA256HMAC of specified message using provided key or nullptr on + // error + static std::unique_ptr Sha256hmac(const ByteBuffer& key, + const ByteBuffer& message); + + // + // A salt value specific to this library, generated as + // SHA-256("SecureMessage") + // + // We have to initialize salt in crypto_ops.cc because C++ doesn't allow + // initialization and declaration in the same place. + // + static const uint8_t kSalt[kSaltSize]; + + // + // The HKDF (RFC 5869) extraction function, using the SHA-256 hash + // function. This function is used to pre-process the inputKeyMaterial and mix + // it with the salt, producing output suitable for use with HKDF expansion + // function (which produces the actual derived key). + // + // @see #hkdfSha256Expand(ByteBuffer, ByteBuffer) + // @return a std::unique_ptr with HMAC-SHA256(salt, + // inputKeyMaterial) (salt is the "key" for the HMAC) on success or a nullptr + // on error + // + static std::unique_ptr HkdfSha256Extract( + const ByteBuffer& inputKeyMaterial, const ByteBuffer& salt); + + // + // Special case of HKDF (RFC 5869) expansion function, using the SHA-256 + // hash function and allowing for a maximum output length of 256 bits. + // + // @param pseudoRandomKey should be generated by + // {@link #hkdfSha256Expand(ByteBuffer, ByteBuffer} + // @param info arbitrary information the derived key should be bound to + // @return a std::unique_ptr holding derived key bytes = + // HMAC-SHA256(pseudoRandomKey, info | 0x01) on success or a nullptr on + // error + // + static std::unique_ptr HkdfSha256Expand( + const ByteBuffer& pseudoRandomKey, const ByteBuffer& info); + + // + // Performs AES 256 CBC decryption of {@code ciphertext} with the specified + // {@code iv} and {@code decryptionKey}. Assumes PKCS#5 padding is used + // + // @return a std::unique_ptr holding the plaintext (decrypted) data or a + // nullptr on error + // + static std::unique_ptr Aes256CBCDecrypt( + const SecretKey& decryptionKey, + const ByteBuffer& iv, + const ByteBuffer& ciphertext); + + // + // Performs AES 256 CBC encryption of {@code plaintext} with the specified + // {@code iv} and {@code encryptionKey}. PKCS#5 is used. + // + // @return a std::unique_ptr holding the ciphertext (encrypted) data or a + // nullptr on error + // + static std::unique_ptr Aes256CBCEncrypt( + const SecretKey& encryptionKey, + const ByteBuffer& iv, + const ByteBuffer& ciphertext); + + // + // Get the purpose of an encryption scheme. Basically a string representation + // of the enum. + // + static string GetPurpose(EncType encType); + + // + // Get the purpose of a signature scheme. Basically a string representation + // of the enum. + // + static string GetPurpose(SigType sigType); + + // Computes the ECDSA P256 SHA 256 MAC + // + // @param data the data to be signed + // @param signingKey the ECDSA private key used for signing. + // @return std::unique_ptr holding string that represents the MAC or nullptr + // on error + // + static std::unique_ptr EcdsaP256Sha256Sign( + const PrivateKey& private_key, + const ByteBuffer& data); + + // Verifies the ECDSA P256 SHA 256 signature + // + // @param signature to be verified + // @param data the data over which the signature was computed + // @param verificationKey the ECDSA public key used for verification. + // @return bool true if signature is valid, false otherwise + // + static bool EcdsaP256Sha256Verify(const PublicKey& public_key, + const ByteBuffer& signature, + const ByteBuffer& data); + + // + // Runs the Elliptic Curve variant of the Diffie-Hellman algorithm. + // + // @param private_key must have the algorithm ECDSA_KEY + // @param peer_key must have the algorithm ECDSA_KEY + // @return an AES secret key created from the SHA-256 of the secret created + // by applying ECDH to the private_key and the peer_key. + // + static std::unique_ptr EcdhKeyAgreement( + const PrivateKey& private_key, + const PublicKey& peer_key); + + + // Computes the RSA 2048 SHA 256 signature + // + // @param data the data to be signed + // @param signingKey the RSA Private key used to sign the data. The key + // should be in DER form. + // @return std::unique_ptr holding string that represents the MAC or nullptr + // on error + // + // TODO(aczeskis): refactor sign and verify to be virtual functions of key + // objects + // + static std::unique_ptr Rsa2048Sha256Sign( + const PrivateKey& private_key, const ByteBuffer& data); + + // Verifies the RSA 2048 SHA 256 MAC + // + // @param signature to be verified + // @param data the data over which the signature was computed + // @param verificationKey the RSA public key used for verification + // @return bool true if signature is valid, false otherwise + // + static bool Rsa2048Sha256Verify(const PublicKey& public_key, + const ByteBuffer& signature, + const ByteBuffer& data); + + static bool IsValidEcP256CoordinateEncoding(const string& bytes); + + static bool IsValidRsa2048ModulusEncoding(const string& bytes); + + // + // Converts int32 value to an array of bytes represented as a string. The + // bytes are in big-endian order. + // + static string Int32BytesToString(int32_t value); + + // + // Converts a string of bytes to an int32 value. Fails if the bytes do not fit + // in the int32 type. The bytes are in big-endian order. + // + static bool StringToInt32Bytes(const string& value, int32_t* result); + + // For testing private helper functions + friend class CryptoOpsTest; + + virtual ~CryptoOps(); +}; + +} // namespace securemessage +#endif // SECUREMESSAGE_CRYPTO_OPS_H_ diff --git a/third_party/securemessage/include/securemessage/proto/securemessage.pb.h b/third_party/securemessage/include/securemessage/proto/securemessage.pb.h new file mode 100644 index 00000000..de0cf362 --- /dev/null +++ b/third_party/securemessage/include/securemessage/proto/securemessage.pb.h @@ -0,0 +1,3069 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: proto/securemessage.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_proto_2fsecuremessage_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_proto_2fsecuremessage_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3019000 +#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 3019004 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_proto_2fsecuremessage_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_proto_2fsecuremessage_2eproto { + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::AuxiliaryParseTableField aux[] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[8] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[]; + static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[]; + static const uint32_t offsets[]; +}; +namespace securemessage { +class DhPublicKey; +struct DhPublicKeyDefaultTypeInternal; +extern DhPublicKeyDefaultTypeInternal _DhPublicKey_default_instance_; +class EcP256PublicKey; +struct EcP256PublicKeyDefaultTypeInternal; +extern EcP256PublicKeyDefaultTypeInternal _EcP256PublicKey_default_instance_; +class GenericPublicKey; +struct GenericPublicKeyDefaultTypeInternal; +extern GenericPublicKeyDefaultTypeInternal _GenericPublicKey_default_instance_; +class Header; +struct HeaderDefaultTypeInternal; +extern HeaderDefaultTypeInternal _Header_default_instance_; +class HeaderAndBody; +struct HeaderAndBodyDefaultTypeInternal; +extern HeaderAndBodyDefaultTypeInternal _HeaderAndBody_default_instance_; +class HeaderAndBodyInternal; +struct HeaderAndBodyInternalDefaultTypeInternal; +extern HeaderAndBodyInternalDefaultTypeInternal _HeaderAndBodyInternal_default_instance_; +class SecureMessage; +struct SecureMessageDefaultTypeInternal; +extern SecureMessageDefaultTypeInternal _SecureMessage_default_instance_; +class SimpleRsaPublicKey; +struct SimpleRsaPublicKeyDefaultTypeInternal; +extern SimpleRsaPublicKeyDefaultTypeInternal _SimpleRsaPublicKey_default_instance_; +} // namespace securemessage +PROTOBUF_NAMESPACE_OPEN +template<> ::securemessage::DhPublicKey* Arena::CreateMaybeMessage<::securemessage::DhPublicKey>(Arena*); +template<> ::securemessage::EcP256PublicKey* Arena::CreateMaybeMessage<::securemessage::EcP256PublicKey>(Arena*); +template<> ::securemessage::GenericPublicKey* Arena::CreateMaybeMessage<::securemessage::GenericPublicKey>(Arena*); +template<> ::securemessage::Header* Arena::CreateMaybeMessage<::securemessage::Header>(Arena*); +template<> ::securemessage::HeaderAndBody* Arena::CreateMaybeMessage<::securemessage::HeaderAndBody>(Arena*); +template<> ::securemessage::HeaderAndBodyInternal* Arena::CreateMaybeMessage<::securemessage::HeaderAndBodyInternal>(Arena*); +template<> ::securemessage::SecureMessage* Arena::CreateMaybeMessage<::securemessage::SecureMessage>(Arena*); +template<> ::securemessage::SimpleRsaPublicKey* Arena::CreateMaybeMessage<::securemessage::SimpleRsaPublicKey>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace securemessage { + +enum SigScheme : int { + HMAC_SHA256 = 1, + ECDSA_P256_SHA256 = 2, + RSA2048_SHA256 = 3 +}; +bool SigScheme_IsValid(int value); +constexpr SigScheme SigScheme_MIN = HMAC_SHA256; +constexpr SigScheme SigScheme_MAX = RSA2048_SHA256; +constexpr int SigScheme_ARRAYSIZE = SigScheme_MAX + 1; + +const std::string& SigScheme_Name(SigScheme value); +template +inline const std::string& SigScheme_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function SigScheme_Name."); + return SigScheme_Name(static_cast(enum_t_value)); +} +bool SigScheme_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, SigScheme* value); +enum EncScheme : int { + NONE = 1, + AES_256_CBC = 2 +}; +bool EncScheme_IsValid(int value); +constexpr EncScheme EncScheme_MIN = NONE; +constexpr EncScheme EncScheme_MAX = AES_256_CBC; +constexpr int EncScheme_ARRAYSIZE = EncScheme_MAX + 1; + +const std::string& EncScheme_Name(EncScheme value); +template +inline const std::string& EncScheme_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function EncScheme_Name."); + return EncScheme_Name(static_cast(enum_t_value)); +} +bool EncScheme_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, EncScheme* value); +enum PublicKeyType : int { + EC_P256 = 1, + RSA2048 = 2, + DH2048_MODP = 3 +}; +bool PublicKeyType_IsValid(int value); +constexpr PublicKeyType PublicKeyType_MIN = EC_P256; +constexpr PublicKeyType PublicKeyType_MAX = DH2048_MODP; +constexpr int PublicKeyType_ARRAYSIZE = PublicKeyType_MAX + 1; + +const std::string& PublicKeyType_Name(PublicKeyType value); +template +inline const std::string& PublicKeyType_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function PublicKeyType_Name."); + return PublicKeyType_Name(static_cast(enum_t_value)); +} +bool PublicKeyType_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, PublicKeyType* value); +// =================================================================== + +class SecureMessage final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:securemessage.SecureMessage) */ { + public: + inline SecureMessage() : SecureMessage(nullptr) {} + ~SecureMessage() override; + explicit constexpr SecureMessage(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + SecureMessage(const SecureMessage& from); + SecureMessage(SecureMessage&& from) noexcept + : SecureMessage() { + *this = ::std::move(from); + } + + inline SecureMessage& operator=(const SecureMessage& from) { + CopyFrom(from); + return *this; + } + inline SecureMessage& operator=(SecureMessage&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const SecureMessage& default_instance() { + return *internal_default_instance(); + } + static inline const SecureMessage* internal_default_instance() { + return reinterpret_cast( + &_SecureMessage_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(SecureMessage& a, SecureMessage& b) { + a.Swap(&b); + } + inline void Swap(SecureMessage* 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(SecureMessage* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + SecureMessage* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const SecureMessage& from); + void MergeFrom(const SecureMessage& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(SecureMessage* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "securemessage.SecureMessage"; + } + protected: + explicit SecureMessage(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kHeaderAndBodyFieldNumber = 1, + kSignatureFieldNumber = 2, + }; + // required bytes header_and_body = 1; + bool has_header_and_body() const; + private: + bool _internal_has_header_and_body() const; + public: + void clear_header_and_body(); + const std::string& header_and_body() const; + template + void set_header_and_body(ArgT0&& arg0, ArgT... args); + std::string* mutable_header_and_body(); + PROTOBUF_NODISCARD std::string* release_header_and_body(); + void set_allocated_header_and_body(std::string* header_and_body); + private: + const std::string& _internal_header_and_body() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_header_and_body(const std::string& value); + std::string* _internal_mutable_header_and_body(); + public: + + // required bytes signature = 2; + bool has_signature() const; + private: + bool _internal_has_signature() const; + public: + void clear_signature(); + const std::string& signature() const; + template + void set_signature(ArgT0&& arg0, ArgT... args); + std::string* mutable_signature(); + PROTOBUF_NODISCARD std::string* release_signature(); + void set_allocated_signature(std::string* signature); + private: + const std::string& _internal_signature() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_signature(const std::string& value); + std::string* _internal_mutable_signature(); + public: + + // @@protoc_insertion_point(class_scope:securemessage.SecureMessage) + private: + class _Internal; + + // helper for ByteSizeLong() + size_t RequiredFieldsByteSizeFallback() const; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr header_and_body_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr signature_; + friend struct ::TableStruct_proto_2fsecuremessage_2eproto; +}; +// ------------------------------------------------------------------- + +class Header final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:securemessage.Header) */ { + public: + inline Header() : Header(nullptr) {} + ~Header() override; + explicit constexpr Header(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + Header(const Header& from); + Header(Header&& from) noexcept + : Header() { + *this = ::std::move(from); + } + + inline Header& operator=(const Header& from) { + CopyFrom(from); + return *this; + } + inline Header& operator=(Header&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const Header& default_instance() { + return *internal_default_instance(); + } + static inline const Header* internal_default_instance() { + return reinterpret_cast( + &_Header_default_instance_); + } + static constexpr int kIndexInFileMessages = + 1; + + friend void swap(Header& a, Header& b) { + a.Swap(&b); + } + inline void Swap(Header* 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(Header* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + Header* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage
(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const Header& from); + void MergeFrom(const Header& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(Header* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "securemessage.Header"; + } + protected: + explicit Header(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kVerificationKeyIdFieldNumber = 3, + kDecryptionKeyIdFieldNumber = 4, + kIvFieldNumber = 5, + kPublicMetadataFieldNumber = 6, + kAssociatedDataLengthFieldNumber = 7, + kSignatureSchemeFieldNumber = 1, + kEncryptionSchemeFieldNumber = 2, + }; + // optional bytes verification_key_id = 3; + bool has_verification_key_id() const; + private: + bool _internal_has_verification_key_id() const; + public: + void clear_verification_key_id(); + const std::string& verification_key_id() const; + template + void set_verification_key_id(ArgT0&& arg0, ArgT... args); + std::string* mutable_verification_key_id(); + PROTOBUF_NODISCARD std::string* release_verification_key_id(); + void set_allocated_verification_key_id(std::string* verification_key_id); + private: + const std::string& _internal_verification_key_id() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_verification_key_id(const std::string& value); + std::string* _internal_mutable_verification_key_id(); + public: + + // optional bytes decryption_key_id = 4; + bool has_decryption_key_id() const; + private: + bool _internal_has_decryption_key_id() const; + public: + void clear_decryption_key_id(); + const std::string& decryption_key_id() const; + template + void set_decryption_key_id(ArgT0&& arg0, ArgT... args); + std::string* mutable_decryption_key_id(); + PROTOBUF_NODISCARD std::string* release_decryption_key_id(); + void set_allocated_decryption_key_id(std::string* decryption_key_id); + private: + const std::string& _internal_decryption_key_id() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_decryption_key_id(const std::string& value); + std::string* _internal_mutable_decryption_key_id(); + public: + + // optional bytes iv = 5; + bool has_iv() const; + private: + bool _internal_has_iv() const; + public: + void clear_iv(); + const std::string& iv() const; + template + void set_iv(ArgT0&& arg0, ArgT... args); + std::string* mutable_iv(); + PROTOBUF_NODISCARD std::string* release_iv(); + void set_allocated_iv(std::string* iv); + private: + const std::string& _internal_iv() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_iv(const std::string& value); + std::string* _internal_mutable_iv(); + public: + + // optional bytes public_metadata = 6; + bool has_public_metadata() const; + private: + bool _internal_has_public_metadata() const; + public: + void clear_public_metadata(); + const std::string& public_metadata() const; + template + void set_public_metadata(ArgT0&& arg0, ArgT... args); + std::string* mutable_public_metadata(); + PROTOBUF_NODISCARD std::string* release_public_metadata(); + void set_allocated_public_metadata(std::string* public_metadata); + private: + const std::string& _internal_public_metadata() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_public_metadata(const std::string& value); + std::string* _internal_mutable_public_metadata(); + public: + + // optional uint32 associated_data_length = 7 [default = 0]; + bool has_associated_data_length() const; + private: + bool _internal_has_associated_data_length() const; + public: + void clear_associated_data_length(); + uint32_t associated_data_length() const; + void set_associated_data_length(uint32_t value); + private: + uint32_t _internal_associated_data_length() const; + void _internal_set_associated_data_length(uint32_t value); + public: + + // required .securemessage.SigScheme signature_scheme = 1; + bool has_signature_scheme() const; + private: + bool _internal_has_signature_scheme() const; + public: + void clear_signature_scheme(); + ::securemessage::SigScheme signature_scheme() const; + void set_signature_scheme(::securemessage::SigScheme value); + private: + ::securemessage::SigScheme _internal_signature_scheme() const; + void _internal_set_signature_scheme(::securemessage::SigScheme value); + public: + + // required .securemessage.EncScheme encryption_scheme = 2; + bool has_encryption_scheme() const; + private: + bool _internal_has_encryption_scheme() const; + public: + void clear_encryption_scheme(); + ::securemessage::EncScheme encryption_scheme() const; + void set_encryption_scheme(::securemessage::EncScheme value); + private: + ::securemessage::EncScheme _internal_encryption_scheme() const; + void _internal_set_encryption_scheme(::securemessage::EncScheme value); + public: + + // @@protoc_insertion_point(class_scope:securemessage.Header) + private: + class _Internal; + + // helper for ByteSizeLong() + size_t RequiredFieldsByteSizeFallback() const; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr verification_key_id_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr decryption_key_id_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr iv_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr public_metadata_; + uint32_t associated_data_length_; + int signature_scheme_; + int encryption_scheme_; + friend struct ::TableStruct_proto_2fsecuremessage_2eproto; +}; +// ------------------------------------------------------------------- + +class HeaderAndBody final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:securemessage.HeaderAndBody) */ { + public: + inline HeaderAndBody() : HeaderAndBody(nullptr) {} + ~HeaderAndBody() override; + explicit constexpr HeaderAndBody(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + HeaderAndBody(const HeaderAndBody& from); + HeaderAndBody(HeaderAndBody&& from) noexcept + : HeaderAndBody() { + *this = ::std::move(from); + } + + inline HeaderAndBody& operator=(const HeaderAndBody& from) { + CopyFrom(from); + return *this; + } + inline HeaderAndBody& operator=(HeaderAndBody&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const HeaderAndBody& default_instance() { + return *internal_default_instance(); + } + static inline const HeaderAndBody* internal_default_instance() { + return reinterpret_cast( + &_HeaderAndBody_default_instance_); + } + static constexpr int kIndexInFileMessages = + 2; + + friend void swap(HeaderAndBody& a, HeaderAndBody& b) { + a.Swap(&b); + } + inline void Swap(HeaderAndBody* 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(HeaderAndBody* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + HeaderAndBody* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const HeaderAndBody& from); + void MergeFrom(const HeaderAndBody& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(HeaderAndBody* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "securemessage.HeaderAndBody"; + } + protected: + explicit HeaderAndBody(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kBodyFieldNumber = 2, + kHeaderFieldNumber = 1, + }; + // required bytes body = 2; + bool has_body() const; + private: + bool _internal_has_body() const; + public: + void clear_body(); + const std::string& body() const; + template + void set_body(ArgT0&& arg0, ArgT... args); + std::string* mutable_body(); + PROTOBUF_NODISCARD std::string* release_body(); + void set_allocated_body(std::string* body); + private: + const std::string& _internal_body() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_body(const std::string& value); + std::string* _internal_mutable_body(); + public: + + // required .securemessage.Header header = 1; + bool has_header() const; + private: + bool _internal_has_header() const; + public: + void clear_header(); + const ::securemessage::Header& header() const; + PROTOBUF_NODISCARD ::securemessage::Header* release_header(); + ::securemessage::Header* mutable_header(); + void set_allocated_header(::securemessage::Header* header); + private: + const ::securemessage::Header& _internal_header() const; + ::securemessage::Header* _internal_mutable_header(); + public: + void unsafe_arena_set_allocated_header( + ::securemessage::Header* header); + ::securemessage::Header* unsafe_arena_release_header(); + + // @@protoc_insertion_point(class_scope:securemessage.HeaderAndBody) + private: + class _Internal; + + // helper for ByteSizeLong() + size_t RequiredFieldsByteSizeFallback() const; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr body_; + ::securemessage::Header* header_; + friend struct ::TableStruct_proto_2fsecuremessage_2eproto; +}; +// ------------------------------------------------------------------- + +class HeaderAndBodyInternal final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:securemessage.HeaderAndBodyInternal) */ { + public: + inline HeaderAndBodyInternal() : HeaderAndBodyInternal(nullptr) {} + ~HeaderAndBodyInternal() override; + explicit constexpr HeaderAndBodyInternal(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + HeaderAndBodyInternal(const HeaderAndBodyInternal& from); + HeaderAndBodyInternal(HeaderAndBodyInternal&& from) noexcept + : HeaderAndBodyInternal() { + *this = ::std::move(from); + } + + inline HeaderAndBodyInternal& operator=(const HeaderAndBodyInternal& from) { + CopyFrom(from); + return *this; + } + inline HeaderAndBodyInternal& operator=(HeaderAndBodyInternal&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const HeaderAndBodyInternal& default_instance() { + return *internal_default_instance(); + } + static inline const HeaderAndBodyInternal* internal_default_instance() { + return reinterpret_cast( + &_HeaderAndBodyInternal_default_instance_); + } + static constexpr int kIndexInFileMessages = + 3; + + friend void swap(HeaderAndBodyInternal& a, HeaderAndBodyInternal& b) { + a.Swap(&b); + } + inline void Swap(HeaderAndBodyInternal* 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(HeaderAndBodyInternal* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + HeaderAndBodyInternal* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const HeaderAndBodyInternal& from); + void MergeFrom(const HeaderAndBodyInternal& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(HeaderAndBodyInternal* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "securemessage.HeaderAndBodyInternal"; + } + protected: + explicit HeaderAndBodyInternal(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kHeaderFieldNumber = 1, + kBodyFieldNumber = 2, + }; + // required bytes header = 1; + bool has_header() const; + private: + bool _internal_has_header() const; + public: + void clear_header(); + const std::string& header() const; + template + void set_header(ArgT0&& arg0, ArgT... args); + std::string* mutable_header(); + PROTOBUF_NODISCARD std::string* release_header(); + void set_allocated_header(std::string* header); + private: + const std::string& _internal_header() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_header(const std::string& value); + std::string* _internal_mutable_header(); + public: + + // required bytes body = 2; + bool has_body() const; + private: + bool _internal_has_body() const; + public: + void clear_body(); + const std::string& body() const; + template + void set_body(ArgT0&& arg0, ArgT... args); + std::string* mutable_body(); + PROTOBUF_NODISCARD std::string* release_body(); + void set_allocated_body(std::string* body); + private: + const std::string& _internal_body() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_body(const std::string& value); + std::string* _internal_mutable_body(); + public: + + // @@protoc_insertion_point(class_scope:securemessage.HeaderAndBodyInternal) + private: + class _Internal; + + // helper for ByteSizeLong() + size_t RequiredFieldsByteSizeFallback() const; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr header_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr body_; + friend struct ::TableStruct_proto_2fsecuremessage_2eproto; +}; +// ------------------------------------------------------------------- + +class EcP256PublicKey final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:securemessage.EcP256PublicKey) */ { + public: + inline EcP256PublicKey() : EcP256PublicKey(nullptr) {} + ~EcP256PublicKey() override; + explicit constexpr EcP256PublicKey(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + EcP256PublicKey(const EcP256PublicKey& from); + EcP256PublicKey(EcP256PublicKey&& from) noexcept + : EcP256PublicKey() { + *this = ::std::move(from); + } + + inline EcP256PublicKey& operator=(const EcP256PublicKey& from) { + CopyFrom(from); + return *this; + } + inline EcP256PublicKey& operator=(EcP256PublicKey&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const EcP256PublicKey& default_instance() { + return *internal_default_instance(); + } + static inline const EcP256PublicKey* internal_default_instance() { + return reinterpret_cast( + &_EcP256PublicKey_default_instance_); + } + static constexpr int kIndexInFileMessages = + 4; + + friend void swap(EcP256PublicKey& a, EcP256PublicKey& b) { + a.Swap(&b); + } + inline void Swap(EcP256PublicKey* 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(EcP256PublicKey* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + EcP256PublicKey* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const EcP256PublicKey& from); + void MergeFrom(const EcP256PublicKey& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(EcP256PublicKey* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "securemessage.EcP256PublicKey"; + } + protected: + explicit EcP256PublicKey(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kXFieldNumber = 1, + kYFieldNumber = 2, + }; + // required bytes x = 1; + bool has_x() const; + private: + bool _internal_has_x() const; + public: + void clear_x(); + const std::string& x() const; + template + void set_x(ArgT0&& arg0, ArgT... args); + std::string* mutable_x(); + PROTOBUF_NODISCARD std::string* release_x(); + void set_allocated_x(std::string* x); + private: + const std::string& _internal_x() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_x(const std::string& value); + std::string* _internal_mutable_x(); + public: + + // required bytes y = 2; + bool has_y() const; + private: + bool _internal_has_y() const; + public: + void clear_y(); + const std::string& y() const; + template + void set_y(ArgT0&& arg0, ArgT... args); + std::string* mutable_y(); + PROTOBUF_NODISCARD std::string* release_y(); + void set_allocated_y(std::string* y); + private: + const std::string& _internal_y() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_y(const std::string& value); + std::string* _internal_mutable_y(); + public: + + // @@protoc_insertion_point(class_scope:securemessage.EcP256PublicKey) + private: + class _Internal; + + // helper for ByteSizeLong() + size_t RequiredFieldsByteSizeFallback() const; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr x_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr y_; + friend struct ::TableStruct_proto_2fsecuremessage_2eproto; +}; +// ------------------------------------------------------------------- + +class SimpleRsaPublicKey final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:securemessage.SimpleRsaPublicKey) */ { + public: + inline SimpleRsaPublicKey() : SimpleRsaPublicKey(nullptr) {} + ~SimpleRsaPublicKey() override; + explicit constexpr SimpleRsaPublicKey(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + SimpleRsaPublicKey(const SimpleRsaPublicKey& from); + SimpleRsaPublicKey(SimpleRsaPublicKey&& from) noexcept + : SimpleRsaPublicKey() { + *this = ::std::move(from); + } + + inline SimpleRsaPublicKey& operator=(const SimpleRsaPublicKey& from) { + CopyFrom(from); + return *this; + } + inline SimpleRsaPublicKey& operator=(SimpleRsaPublicKey&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const SimpleRsaPublicKey& default_instance() { + return *internal_default_instance(); + } + static inline const SimpleRsaPublicKey* internal_default_instance() { + return reinterpret_cast( + &_SimpleRsaPublicKey_default_instance_); + } + static constexpr int kIndexInFileMessages = + 5; + + friend void swap(SimpleRsaPublicKey& a, SimpleRsaPublicKey& b) { + a.Swap(&b); + } + inline void Swap(SimpleRsaPublicKey* 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(SimpleRsaPublicKey* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + SimpleRsaPublicKey* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const SimpleRsaPublicKey& from); + void MergeFrom(const SimpleRsaPublicKey& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(SimpleRsaPublicKey* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "securemessage.SimpleRsaPublicKey"; + } + protected: + explicit SimpleRsaPublicKey(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kNFieldNumber = 1, + kEFieldNumber = 2, + }; + // required bytes n = 1; + bool has_n() const; + private: + bool _internal_has_n() const; + public: + void clear_n(); + const std::string& n() const; + template + void set_n(ArgT0&& arg0, ArgT... args); + std::string* mutable_n(); + PROTOBUF_NODISCARD std::string* release_n(); + void set_allocated_n(std::string* n); + private: + const std::string& _internal_n() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_n(const std::string& value); + std::string* _internal_mutable_n(); + public: + + // optional int32 e = 2 [default = 65537]; + bool has_e() const; + private: + bool _internal_has_e() const; + public: + void clear_e(); + int32_t e() const; + void set_e(int32_t value); + private: + int32_t _internal_e() const; + void _internal_set_e(int32_t value); + public: + + // @@protoc_insertion_point(class_scope:securemessage.SimpleRsaPublicKey) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr n_; + int32_t e_; + friend struct ::TableStruct_proto_2fsecuremessage_2eproto; +}; +// ------------------------------------------------------------------- + +class DhPublicKey final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:securemessage.DhPublicKey) */ { + public: + inline DhPublicKey() : DhPublicKey(nullptr) {} + ~DhPublicKey() override; + explicit constexpr DhPublicKey(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + DhPublicKey(const DhPublicKey& from); + DhPublicKey(DhPublicKey&& from) noexcept + : DhPublicKey() { + *this = ::std::move(from); + } + + inline DhPublicKey& operator=(const DhPublicKey& from) { + CopyFrom(from); + return *this; + } + inline DhPublicKey& operator=(DhPublicKey&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const DhPublicKey& default_instance() { + return *internal_default_instance(); + } + static inline const DhPublicKey* internal_default_instance() { + return reinterpret_cast( + &_DhPublicKey_default_instance_); + } + static constexpr int kIndexInFileMessages = + 6; + + friend void swap(DhPublicKey& a, DhPublicKey& b) { + a.Swap(&b); + } + inline void Swap(DhPublicKey* 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(DhPublicKey* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + DhPublicKey* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const DhPublicKey& from); + void MergeFrom(const DhPublicKey& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(DhPublicKey* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "securemessage.DhPublicKey"; + } + protected: + explicit DhPublicKey(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kYFieldNumber = 1, + }; + // required bytes y = 1; + bool has_y() const; + private: + bool _internal_has_y() const; + public: + void clear_y(); + const std::string& y() const; + template + void set_y(ArgT0&& arg0, ArgT... args); + std::string* mutable_y(); + PROTOBUF_NODISCARD std::string* release_y(); + void set_allocated_y(std::string* y); + private: + const std::string& _internal_y() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_y(const std::string& value); + std::string* _internal_mutable_y(); + public: + + // @@protoc_insertion_point(class_scope:securemessage.DhPublicKey) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr y_; + friend struct ::TableStruct_proto_2fsecuremessage_2eproto; +}; +// ------------------------------------------------------------------- + +class GenericPublicKey final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:securemessage.GenericPublicKey) */ { + public: + inline GenericPublicKey() : GenericPublicKey(nullptr) {} + ~GenericPublicKey() override; + explicit constexpr GenericPublicKey(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + GenericPublicKey(const GenericPublicKey& from); + GenericPublicKey(GenericPublicKey&& from) noexcept + : GenericPublicKey() { + *this = ::std::move(from); + } + + inline GenericPublicKey& operator=(const GenericPublicKey& from) { + CopyFrom(from); + return *this; + } + inline GenericPublicKey& operator=(GenericPublicKey&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const GenericPublicKey& default_instance() { + return *internal_default_instance(); + } + static inline const GenericPublicKey* internal_default_instance() { + return reinterpret_cast( + &_GenericPublicKey_default_instance_); + } + static constexpr int kIndexInFileMessages = + 7; + + friend void swap(GenericPublicKey& a, GenericPublicKey& b) { + a.Swap(&b); + } + inline void Swap(GenericPublicKey* 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(GenericPublicKey* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + GenericPublicKey* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const GenericPublicKey& from); + void MergeFrom(const GenericPublicKey& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(GenericPublicKey* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "securemessage.GenericPublicKey"; + } + protected: + explicit GenericPublicKey(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kEcP256PublicKeyFieldNumber = 2, + kRsa2048PublicKeyFieldNumber = 3, + kDh2048PublicKeyFieldNumber = 4, + kTypeFieldNumber = 1, + }; + // optional .securemessage.EcP256PublicKey ec_p256_public_key = 2; + bool has_ec_p256_public_key() const; + private: + bool _internal_has_ec_p256_public_key() const; + public: + void clear_ec_p256_public_key(); + const ::securemessage::EcP256PublicKey& ec_p256_public_key() const; + PROTOBUF_NODISCARD ::securemessage::EcP256PublicKey* release_ec_p256_public_key(); + ::securemessage::EcP256PublicKey* mutable_ec_p256_public_key(); + void set_allocated_ec_p256_public_key(::securemessage::EcP256PublicKey* ec_p256_public_key); + private: + const ::securemessage::EcP256PublicKey& _internal_ec_p256_public_key() const; + ::securemessage::EcP256PublicKey* _internal_mutable_ec_p256_public_key(); + public: + void unsafe_arena_set_allocated_ec_p256_public_key( + ::securemessage::EcP256PublicKey* ec_p256_public_key); + ::securemessage::EcP256PublicKey* unsafe_arena_release_ec_p256_public_key(); + + // optional .securemessage.SimpleRsaPublicKey rsa2048_public_key = 3; + bool has_rsa2048_public_key() const; + private: + bool _internal_has_rsa2048_public_key() const; + public: + void clear_rsa2048_public_key(); + const ::securemessage::SimpleRsaPublicKey& rsa2048_public_key() const; + PROTOBUF_NODISCARD ::securemessage::SimpleRsaPublicKey* release_rsa2048_public_key(); + ::securemessage::SimpleRsaPublicKey* mutable_rsa2048_public_key(); + void set_allocated_rsa2048_public_key(::securemessage::SimpleRsaPublicKey* rsa2048_public_key); + private: + const ::securemessage::SimpleRsaPublicKey& _internal_rsa2048_public_key() const; + ::securemessage::SimpleRsaPublicKey* _internal_mutable_rsa2048_public_key(); + public: + void unsafe_arena_set_allocated_rsa2048_public_key( + ::securemessage::SimpleRsaPublicKey* rsa2048_public_key); + ::securemessage::SimpleRsaPublicKey* unsafe_arena_release_rsa2048_public_key(); + + // optional .securemessage.DhPublicKey dh2048_public_key = 4; + bool has_dh2048_public_key() const; + private: + bool _internal_has_dh2048_public_key() const; + public: + void clear_dh2048_public_key(); + const ::securemessage::DhPublicKey& dh2048_public_key() const; + PROTOBUF_NODISCARD ::securemessage::DhPublicKey* release_dh2048_public_key(); + ::securemessage::DhPublicKey* mutable_dh2048_public_key(); + void set_allocated_dh2048_public_key(::securemessage::DhPublicKey* dh2048_public_key); + private: + const ::securemessage::DhPublicKey& _internal_dh2048_public_key() const; + ::securemessage::DhPublicKey* _internal_mutable_dh2048_public_key(); + public: + void unsafe_arena_set_allocated_dh2048_public_key( + ::securemessage::DhPublicKey* dh2048_public_key); + ::securemessage::DhPublicKey* unsafe_arena_release_dh2048_public_key(); + + // required .securemessage.PublicKeyType type = 1; + bool has_type() const; + private: + bool _internal_has_type() const; + public: + void clear_type(); + ::securemessage::PublicKeyType type() const; + void set_type(::securemessage::PublicKeyType value); + private: + ::securemessage::PublicKeyType _internal_type() const; + void _internal_set_type(::securemessage::PublicKeyType value); + public: + + // @@protoc_insertion_point(class_scope:securemessage.GenericPublicKey) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::securemessage::EcP256PublicKey* ec_p256_public_key_; + ::securemessage::SimpleRsaPublicKey* rsa2048_public_key_; + ::securemessage::DhPublicKey* dh2048_public_key_; + int type_; + friend struct ::TableStruct_proto_2fsecuremessage_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// SecureMessage + +// required bytes header_and_body = 1; +inline bool SecureMessage::_internal_has_header_and_body() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool SecureMessage::has_header_and_body() const { + return _internal_has_header_and_body(); +} +inline void SecureMessage::clear_header_and_body() { + header_and_body_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& SecureMessage::header_and_body() const { + // @@protoc_insertion_point(field_get:securemessage.SecureMessage.header_and_body) + return _internal_header_and_body(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void SecureMessage::set_header_and_body(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + header_and_body_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:securemessage.SecureMessage.header_and_body) +} +inline std::string* SecureMessage::mutable_header_and_body() { + std::string* _s = _internal_mutable_header_and_body(); + // @@protoc_insertion_point(field_mutable:securemessage.SecureMessage.header_and_body) + return _s; +} +inline const std::string& SecureMessage::_internal_header_and_body() const { + return header_and_body_.Get(); +} +inline void SecureMessage::_internal_set_header_and_body(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + header_and_body_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* SecureMessage::_internal_mutable_header_and_body() { + _has_bits_[0] |= 0x00000001u; + return header_and_body_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* SecureMessage::release_header_and_body() { + // @@protoc_insertion_point(field_release:securemessage.SecureMessage.header_and_body) + if (!_internal_has_header_and_body()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = header_and_body_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (header_and_body_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + header_and_body_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void SecureMessage::set_allocated_header_and_body(std::string* header_and_body) { + if (header_and_body != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + header_and_body_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), header_and_body, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (header_and_body_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + header_and_body_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:securemessage.SecureMessage.header_and_body) +} + +// required bytes signature = 2; +inline bool SecureMessage::_internal_has_signature() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool SecureMessage::has_signature() const { + return _internal_has_signature(); +} +inline void SecureMessage::clear_signature() { + signature_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000002u; +} +inline const std::string& SecureMessage::signature() const { + // @@protoc_insertion_point(field_get:securemessage.SecureMessage.signature) + return _internal_signature(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void SecureMessage::set_signature(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000002u; + signature_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:securemessage.SecureMessage.signature) +} +inline std::string* SecureMessage::mutable_signature() { + std::string* _s = _internal_mutable_signature(); + // @@protoc_insertion_point(field_mutable:securemessage.SecureMessage.signature) + return _s; +} +inline const std::string& SecureMessage::_internal_signature() const { + return signature_.Get(); +} +inline void SecureMessage::_internal_set_signature(const std::string& value) { + _has_bits_[0] |= 0x00000002u; + signature_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* SecureMessage::_internal_mutable_signature() { + _has_bits_[0] |= 0x00000002u; + return signature_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* SecureMessage::release_signature() { + // @@protoc_insertion_point(field_release:securemessage.SecureMessage.signature) + if (!_internal_has_signature()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000002u; + auto* p = signature_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (signature_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + signature_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void SecureMessage::set_allocated_signature(std::string* signature) { + if (signature != nullptr) { + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + signature_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), signature, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (signature_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + signature_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:securemessage.SecureMessage.signature) +} + +// ------------------------------------------------------------------- + +// Header + +// required .securemessage.SigScheme signature_scheme = 1; +inline bool Header::_internal_has_signature_scheme() const { + bool value = (_has_bits_[0] & 0x00000020u) != 0; + return value; +} +inline bool Header::has_signature_scheme() const { + return _internal_has_signature_scheme(); +} +inline void Header::clear_signature_scheme() { + signature_scheme_ = 1; + _has_bits_[0] &= ~0x00000020u; +} +inline ::securemessage::SigScheme Header::_internal_signature_scheme() const { + return static_cast< ::securemessage::SigScheme >(signature_scheme_); +} +inline ::securemessage::SigScheme Header::signature_scheme() const { + // @@protoc_insertion_point(field_get:securemessage.Header.signature_scheme) + return _internal_signature_scheme(); +} +inline void Header::_internal_set_signature_scheme(::securemessage::SigScheme value) { + assert(::securemessage::SigScheme_IsValid(value)); + _has_bits_[0] |= 0x00000020u; + signature_scheme_ = value; +} +inline void Header::set_signature_scheme(::securemessage::SigScheme value) { + _internal_set_signature_scheme(value); + // @@protoc_insertion_point(field_set:securemessage.Header.signature_scheme) +} + +// required .securemessage.EncScheme encryption_scheme = 2; +inline bool Header::_internal_has_encryption_scheme() const { + bool value = (_has_bits_[0] & 0x00000040u) != 0; + return value; +} +inline bool Header::has_encryption_scheme() const { + return _internal_has_encryption_scheme(); +} +inline void Header::clear_encryption_scheme() { + encryption_scheme_ = 1; + _has_bits_[0] &= ~0x00000040u; +} +inline ::securemessage::EncScheme Header::_internal_encryption_scheme() const { + return static_cast< ::securemessage::EncScheme >(encryption_scheme_); +} +inline ::securemessage::EncScheme Header::encryption_scheme() const { + // @@protoc_insertion_point(field_get:securemessage.Header.encryption_scheme) + return _internal_encryption_scheme(); +} +inline void Header::_internal_set_encryption_scheme(::securemessage::EncScheme value) { + assert(::securemessage::EncScheme_IsValid(value)); + _has_bits_[0] |= 0x00000040u; + encryption_scheme_ = value; +} +inline void Header::set_encryption_scheme(::securemessage::EncScheme value) { + _internal_set_encryption_scheme(value); + // @@protoc_insertion_point(field_set:securemessage.Header.encryption_scheme) +} + +// optional bytes verification_key_id = 3; +inline bool Header::_internal_has_verification_key_id() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool Header::has_verification_key_id() const { + return _internal_has_verification_key_id(); +} +inline void Header::clear_verification_key_id() { + verification_key_id_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& Header::verification_key_id() const { + // @@protoc_insertion_point(field_get:securemessage.Header.verification_key_id) + return _internal_verification_key_id(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void Header::set_verification_key_id(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + verification_key_id_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:securemessage.Header.verification_key_id) +} +inline std::string* Header::mutable_verification_key_id() { + std::string* _s = _internal_mutable_verification_key_id(); + // @@protoc_insertion_point(field_mutable:securemessage.Header.verification_key_id) + return _s; +} +inline const std::string& Header::_internal_verification_key_id() const { + return verification_key_id_.Get(); +} +inline void Header::_internal_set_verification_key_id(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + verification_key_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* Header::_internal_mutable_verification_key_id() { + _has_bits_[0] |= 0x00000001u; + return verification_key_id_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* Header::release_verification_key_id() { + // @@protoc_insertion_point(field_release:securemessage.Header.verification_key_id) + if (!_internal_has_verification_key_id()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = verification_key_id_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (verification_key_id_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + verification_key_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void Header::set_allocated_verification_key_id(std::string* verification_key_id) { + if (verification_key_id != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + verification_key_id_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), verification_key_id, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (verification_key_id_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + verification_key_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:securemessage.Header.verification_key_id) +} + +// optional bytes decryption_key_id = 4; +inline bool Header::_internal_has_decryption_key_id() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool Header::has_decryption_key_id() const { + return _internal_has_decryption_key_id(); +} +inline void Header::clear_decryption_key_id() { + decryption_key_id_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000002u; +} +inline const std::string& Header::decryption_key_id() const { + // @@protoc_insertion_point(field_get:securemessage.Header.decryption_key_id) + return _internal_decryption_key_id(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void Header::set_decryption_key_id(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000002u; + decryption_key_id_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:securemessage.Header.decryption_key_id) +} +inline std::string* Header::mutable_decryption_key_id() { + std::string* _s = _internal_mutable_decryption_key_id(); + // @@protoc_insertion_point(field_mutable:securemessage.Header.decryption_key_id) + return _s; +} +inline const std::string& Header::_internal_decryption_key_id() const { + return decryption_key_id_.Get(); +} +inline void Header::_internal_set_decryption_key_id(const std::string& value) { + _has_bits_[0] |= 0x00000002u; + decryption_key_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* Header::_internal_mutable_decryption_key_id() { + _has_bits_[0] |= 0x00000002u; + return decryption_key_id_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* Header::release_decryption_key_id() { + // @@protoc_insertion_point(field_release:securemessage.Header.decryption_key_id) + if (!_internal_has_decryption_key_id()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000002u; + auto* p = decryption_key_id_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (decryption_key_id_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + decryption_key_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void Header::set_allocated_decryption_key_id(std::string* decryption_key_id) { + if (decryption_key_id != nullptr) { + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + decryption_key_id_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), decryption_key_id, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (decryption_key_id_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + decryption_key_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:securemessage.Header.decryption_key_id) +} + +// optional bytes iv = 5; +inline bool Header::_internal_has_iv() const { + bool value = (_has_bits_[0] & 0x00000004u) != 0; + return value; +} +inline bool Header::has_iv() const { + return _internal_has_iv(); +} +inline void Header::clear_iv() { + iv_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000004u; +} +inline const std::string& Header::iv() const { + // @@protoc_insertion_point(field_get:securemessage.Header.iv) + return _internal_iv(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void Header::set_iv(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000004u; + iv_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:securemessage.Header.iv) +} +inline std::string* Header::mutable_iv() { + std::string* _s = _internal_mutable_iv(); + // @@protoc_insertion_point(field_mutable:securemessage.Header.iv) + return _s; +} +inline const std::string& Header::_internal_iv() const { + return iv_.Get(); +} +inline void Header::_internal_set_iv(const std::string& value) { + _has_bits_[0] |= 0x00000004u; + iv_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* Header::_internal_mutable_iv() { + _has_bits_[0] |= 0x00000004u; + return iv_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* Header::release_iv() { + // @@protoc_insertion_point(field_release:securemessage.Header.iv) + if (!_internal_has_iv()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000004u; + auto* p = iv_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (iv_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + iv_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void Header::set_allocated_iv(std::string* iv) { + if (iv != nullptr) { + _has_bits_[0] |= 0x00000004u; + } else { + _has_bits_[0] &= ~0x00000004u; + } + iv_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), iv, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (iv_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + iv_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:securemessage.Header.iv) +} + +// optional bytes public_metadata = 6; +inline bool Header::_internal_has_public_metadata() const { + bool value = (_has_bits_[0] & 0x00000008u) != 0; + return value; +} +inline bool Header::has_public_metadata() const { + return _internal_has_public_metadata(); +} +inline void Header::clear_public_metadata() { + public_metadata_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000008u; +} +inline const std::string& Header::public_metadata() const { + // @@protoc_insertion_point(field_get:securemessage.Header.public_metadata) + return _internal_public_metadata(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void Header::set_public_metadata(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000008u; + public_metadata_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:securemessage.Header.public_metadata) +} +inline std::string* Header::mutable_public_metadata() { + std::string* _s = _internal_mutable_public_metadata(); + // @@protoc_insertion_point(field_mutable:securemessage.Header.public_metadata) + return _s; +} +inline const std::string& Header::_internal_public_metadata() const { + return public_metadata_.Get(); +} +inline void Header::_internal_set_public_metadata(const std::string& value) { + _has_bits_[0] |= 0x00000008u; + public_metadata_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* Header::_internal_mutable_public_metadata() { + _has_bits_[0] |= 0x00000008u; + return public_metadata_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* Header::release_public_metadata() { + // @@protoc_insertion_point(field_release:securemessage.Header.public_metadata) + if (!_internal_has_public_metadata()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000008u; + auto* p = public_metadata_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (public_metadata_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + public_metadata_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void Header::set_allocated_public_metadata(std::string* public_metadata) { + if (public_metadata != nullptr) { + _has_bits_[0] |= 0x00000008u; + } else { + _has_bits_[0] &= ~0x00000008u; + } + public_metadata_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), public_metadata, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (public_metadata_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + public_metadata_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:securemessage.Header.public_metadata) +} + +// optional uint32 associated_data_length = 7 [default = 0]; +inline bool Header::_internal_has_associated_data_length() const { + bool value = (_has_bits_[0] & 0x00000010u) != 0; + return value; +} +inline bool Header::has_associated_data_length() const { + return _internal_has_associated_data_length(); +} +inline void Header::clear_associated_data_length() { + associated_data_length_ = 0u; + _has_bits_[0] &= ~0x00000010u; +} +inline uint32_t Header::_internal_associated_data_length() const { + return associated_data_length_; +} +inline uint32_t Header::associated_data_length() const { + // @@protoc_insertion_point(field_get:securemessage.Header.associated_data_length) + return _internal_associated_data_length(); +} +inline void Header::_internal_set_associated_data_length(uint32_t value) { + _has_bits_[0] |= 0x00000010u; + associated_data_length_ = value; +} +inline void Header::set_associated_data_length(uint32_t value) { + _internal_set_associated_data_length(value); + // @@protoc_insertion_point(field_set:securemessage.Header.associated_data_length) +} + +// ------------------------------------------------------------------- + +// HeaderAndBody + +// required .securemessage.Header header = 1; +inline bool HeaderAndBody::_internal_has_header() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + PROTOBUF_ASSUME(!value || header_ != nullptr); + return value; +} +inline bool HeaderAndBody::has_header() const { + return _internal_has_header(); +} +inline void HeaderAndBody::clear_header() { + if (header_ != nullptr) header_->Clear(); + _has_bits_[0] &= ~0x00000002u; +} +inline const ::securemessage::Header& HeaderAndBody::_internal_header() const { + const ::securemessage::Header* p = header_; + return p != nullptr ? *p : reinterpret_cast( + ::securemessage::_Header_default_instance_); +} +inline const ::securemessage::Header& HeaderAndBody::header() const { + // @@protoc_insertion_point(field_get:securemessage.HeaderAndBody.header) + return _internal_header(); +} +inline void HeaderAndBody::unsafe_arena_set_allocated_header( + ::securemessage::Header* header) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(header_); + } + header_ = header; + if (header) { + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:securemessage.HeaderAndBody.header) +} +inline ::securemessage::Header* HeaderAndBody::release_header() { + _has_bits_[0] &= ~0x00000002u; + ::securemessage::Header* temp = header_; + header_ = 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 ::securemessage::Header* HeaderAndBody::unsafe_arena_release_header() { + // @@protoc_insertion_point(field_release:securemessage.HeaderAndBody.header) + _has_bits_[0] &= ~0x00000002u; + ::securemessage::Header* temp = header_; + header_ = nullptr; + return temp; +} +inline ::securemessage::Header* HeaderAndBody::_internal_mutable_header() { + _has_bits_[0] |= 0x00000002u; + if (header_ == nullptr) { + auto* p = CreateMaybeMessage<::securemessage::Header>(GetArenaForAllocation()); + header_ = p; + } + return header_; +} +inline ::securemessage::Header* HeaderAndBody::mutable_header() { + ::securemessage::Header* _msg = _internal_mutable_header(); + // @@protoc_insertion_point(field_mutable:securemessage.HeaderAndBody.header) + return _msg; +} +inline void HeaderAndBody::set_allocated_header(::securemessage::Header* header) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete header_; + } + if (header) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::securemessage::Header>::GetOwningArena(header); + if (message_arena != submessage_arena) { + header = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, header, submessage_arena); + } + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + header_ = header; + // @@protoc_insertion_point(field_set_allocated:securemessage.HeaderAndBody.header) +} + +// required bytes body = 2; +inline bool HeaderAndBody::_internal_has_body() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool HeaderAndBody::has_body() const { + return _internal_has_body(); +} +inline void HeaderAndBody::clear_body() { + body_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& HeaderAndBody::body() const { + // @@protoc_insertion_point(field_get:securemessage.HeaderAndBody.body) + return _internal_body(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void HeaderAndBody::set_body(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + body_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:securemessage.HeaderAndBody.body) +} +inline std::string* HeaderAndBody::mutable_body() { + std::string* _s = _internal_mutable_body(); + // @@protoc_insertion_point(field_mutable:securemessage.HeaderAndBody.body) + return _s; +} +inline const std::string& HeaderAndBody::_internal_body() const { + return body_.Get(); +} +inline void HeaderAndBody::_internal_set_body(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + body_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* HeaderAndBody::_internal_mutable_body() { + _has_bits_[0] |= 0x00000001u; + return body_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* HeaderAndBody::release_body() { + // @@protoc_insertion_point(field_release:securemessage.HeaderAndBody.body) + if (!_internal_has_body()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = body_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (body_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + body_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void HeaderAndBody::set_allocated_body(std::string* body) { + if (body != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + body_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), body, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (body_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + body_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:securemessage.HeaderAndBody.body) +} + +// ------------------------------------------------------------------- + +// HeaderAndBodyInternal + +// required bytes header = 1; +inline bool HeaderAndBodyInternal::_internal_has_header() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool HeaderAndBodyInternal::has_header() const { + return _internal_has_header(); +} +inline void HeaderAndBodyInternal::clear_header() { + header_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& HeaderAndBodyInternal::header() const { + // @@protoc_insertion_point(field_get:securemessage.HeaderAndBodyInternal.header) + return _internal_header(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void HeaderAndBodyInternal::set_header(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + header_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:securemessage.HeaderAndBodyInternal.header) +} +inline std::string* HeaderAndBodyInternal::mutable_header() { + std::string* _s = _internal_mutable_header(); + // @@protoc_insertion_point(field_mutable:securemessage.HeaderAndBodyInternal.header) + return _s; +} +inline const std::string& HeaderAndBodyInternal::_internal_header() const { + return header_.Get(); +} +inline void HeaderAndBodyInternal::_internal_set_header(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + header_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* HeaderAndBodyInternal::_internal_mutable_header() { + _has_bits_[0] |= 0x00000001u; + return header_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* HeaderAndBodyInternal::release_header() { + // @@protoc_insertion_point(field_release:securemessage.HeaderAndBodyInternal.header) + if (!_internal_has_header()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = header_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (header_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + header_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void HeaderAndBodyInternal::set_allocated_header(std::string* header) { + if (header != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + header_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), header, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (header_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + header_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:securemessage.HeaderAndBodyInternal.header) +} + +// required bytes body = 2; +inline bool HeaderAndBodyInternal::_internal_has_body() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool HeaderAndBodyInternal::has_body() const { + return _internal_has_body(); +} +inline void HeaderAndBodyInternal::clear_body() { + body_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000002u; +} +inline const std::string& HeaderAndBodyInternal::body() const { + // @@protoc_insertion_point(field_get:securemessage.HeaderAndBodyInternal.body) + return _internal_body(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void HeaderAndBodyInternal::set_body(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000002u; + body_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:securemessage.HeaderAndBodyInternal.body) +} +inline std::string* HeaderAndBodyInternal::mutable_body() { + std::string* _s = _internal_mutable_body(); + // @@protoc_insertion_point(field_mutable:securemessage.HeaderAndBodyInternal.body) + return _s; +} +inline const std::string& HeaderAndBodyInternal::_internal_body() const { + return body_.Get(); +} +inline void HeaderAndBodyInternal::_internal_set_body(const std::string& value) { + _has_bits_[0] |= 0x00000002u; + body_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* HeaderAndBodyInternal::_internal_mutable_body() { + _has_bits_[0] |= 0x00000002u; + return body_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* HeaderAndBodyInternal::release_body() { + // @@protoc_insertion_point(field_release:securemessage.HeaderAndBodyInternal.body) + if (!_internal_has_body()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000002u; + auto* p = body_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (body_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + body_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void HeaderAndBodyInternal::set_allocated_body(std::string* body) { + if (body != nullptr) { + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + body_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), body, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (body_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + body_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:securemessage.HeaderAndBodyInternal.body) +} + +// ------------------------------------------------------------------- + +// EcP256PublicKey + +// required bytes x = 1; +inline bool EcP256PublicKey::_internal_has_x() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool EcP256PublicKey::has_x() const { + return _internal_has_x(); +} +inline void EcP256PublicKey::clear_x() { + x_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& EcP256PublicKey::x() const { + // @@protoc_insertion_point(field_get:securemessage.EcP256PublicKey.x) + return _internal_x(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void EcP256PublicKey::set_x(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + x_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:securemessage.EcP256PublicKey.x) +} +inline std::string* EcP256PublicKey::mutable_x() { + std::string* _s = _internal_mutable_x(); + // @@protoc_insertion_point(field_mutable:securemessage.EcP256PublicKey.x) + return _s; +} +inline const std::string& EcP256PublicKey::_internal_x() const { + return x_.Get(); +} +inline void EcP256PublicKey::_internal_set_x(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + x_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* EcP256PublicKey::_internal_mutable_x() { + _has_bits_[0] |= 0x00000001u; + return x_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* EcP256PublicKey::release_x() { + // @@protoc_insertion_point(field_release:securemessage.EcP256PublicKey.x) + if (!_internal_has_x()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = x_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (x_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + x_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void EcP256PublicKey::set_allocated_x(std::string* x) { + if (x != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + x_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), x, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (x_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + x_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:securemessage.EcP256PublicKey.x) +} + +// required bytes y = 2; +inline bool EcP256PublicKey::_internal_has_y() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool EcP256PublicKey::has_y() const { + return _internal_has_y(); +} +inline void EcP256PublicKey::clear_y() { + y_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000002u; +} +inline const std::string& EcP256PublicKey::y() const { + // @@protoc_insertion_point(field_get:securemessage.EcP256PublicKey.y) + return _internal_y(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void EcP256PublicKey::set_y(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000002u; + y_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:securemessage.EcP256PublicKey.y) +} +inline std::string* EcP256PublicKey::mutable_y() { + std::string* _s = _internal_mutable_y(); + // @@protoc_insertion_point(field_mutable:securemessage.EcP256PublicKey.y) + return _s; +} +inline const std::string& EcP256PublicKey::_internal_y() const { + return y_.Get(); +} +inline void EcP256PublicKey::_internal_set_y(const std::string& value) { + _has_bits_[0] |= 0x00000002u; + y_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* EcP256PublicKey::_internal_mutable_y() { + _has_bits_[0] |= 0x00000002u; + return y_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* EcP256PublicKey::release_y() { + // @@protoc_insertion_point(field_release:securemessage.EcP256PublicKey.y) + if (!_internal_has_y()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000002u; + auto* p = y_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (y_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + y_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void EcP256PublicKey::set_allocated_y(std::string* y) { + if (y != nullptr) { + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + y_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), y, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (y_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + y_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:securemessage.EcP256PublicKey.y) +} + +// ------------------------------------------------------------------- + +// SimpleRsaPublicKey + +// required bytes n = 1; +inline bool SimpleRsaPublicKey::_internal_has_n() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool SimpleRsaPublicKey::has_n() const { + return _internal_has_n(); +} +inline void SimpleRsaPublicKey::clear_n() { + n_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& SimpleRsaPublicKey::n() const { + // @@protoc_insertion_point(field_get:securemessage.SimpleRsaPublicKey.n) + return _internal_n(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void SimpleRsaPublicKey::set_n(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + n_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:securemessage.SimpleRsaPublicKey.n) +} +inline std::string* SimpleRsaPublicKey::mutable_n() { + std::string* _s = _internal_mutable_n(); + // @@protoc_insertion_point(field_mutable:securemessage.SimpleRsaPublicKey.n) + return _s; +} +inline const std::string& SimpleRsaPublicKey::_internal_n() const { + return n_.Get(); +} +inline void SimpleRsaPublicKey::_internal_set_n(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + n_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* SimpleRsaPublicKey::_internal_mutable_n() { + _has_bits_[0] |= 0x00000001u; + return n_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* SimpleRsaPublicKey::release_n() { + // @@protoc_insertion_point(field_release:securemessage.SimpleRsaPublicKey.n) + if (!_internal_has_n()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = n_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (n_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + n_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void SimpleRsaPublicKey::set_allocated_n(std::string* n) { + if (n != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + n_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), n, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (n_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + n_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:securemessage.SimpleRsaPublicKey.n) +} + +// optional int32 e = 2 [default = 65537]; +inline bool SimpleRsaPublicKey::_internal_has_e() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool SimpleRsaPublicKey::has_e() const { + return _internal_has_e(); +} +inline void SimpleRsaPublicKey::clear_e() { + e_ = 65537; + _has_bits_[0] &= ~0x00000002u; +} +inline int32_t SimpleRsaPublicKey::_internal_e() const { + return e_; +} +inline int32_t SimpleRsaPublicKey::e() const { + // @@protoc_insertion_point(field_get:securemessage.SimpleRsaPublicKey.e) + return _internal_e(); +} +inline void SimpleRsaPublicKey::_internal_set_e(int32_t value) { + _has_bits_[0] |= 0x00000002u; + e_ = value; +} +inline void SimpleRsaPublicKey::set_e(int32_t value) { + _internal_set_e(value); + // @@protoc_insertion_point(field_set:securemessage.SimpleRsaPublicKey.e) +} + +// ------------------------------------------------------------------- + +// DhPublicKey + +// required bytes y = 1; +inline bool DhPublicKey::_internal_has_y() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool DhPublicKey::has_y() const { + return _internal_has_y(); +} +inline void DhPublicKey::clear_y() { + y_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& DhPublicKey::y() const { + // @@protoc_insertion_point(field_get:securemessage.DhPublicKey.y) + return _internal_y(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void DhPublicKey::set_y(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + y_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:securemessage.DhPublicKey.y) +} +inline std::string* DhPublicKey::mutable_y() { + std::string* _s = _internal_mutable_y(); + // @@protoc_insertion_point(field_mutable:securemessage.DhPublicKey.y) + return _s; +} +inline const std::string& DhPublicKey::_internal_y() const { + return y_.Get(); +} +inline void DhPublicKey::_internal_set_y(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + y_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* DhPublicKey::_internal_mutable_y() { + _has_bits_[0] |= 0x00000001u; + return y_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* DhPublicKey::release_y() { + // @@protoc_insertion_point(field_release:securemessage.DhPublicKey.y) + if (!_internal_has_y()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = y_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (y_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + y_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void DhPublicKey::set_allocated_y(std::string* y) { + if (y != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + y_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), y, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (y_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + y_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:securemessage.DhPublicKey.y) +} + +// ------------------------------------------------------------------- + +// GenericPublicKey + +// required .securemessage.PublicKeyType type = 1; +inline bool GenericPublicKey::_internal_has_type() const { + bool value = (_has_bits_[0] & 0x00000008u) != 0; + return value; +} +inline bool GenericPublicKey::has_type() const { + return _internal_has_type(); +} +inline void GenericPublicKey::clear_type() { + type_ = 1; + _has_bits_[0] &= ~0x00000008u; +} +inline ::securemessage::PublicKeyType GenericPublicKey::_internal_type() const { + return static_cast< ::securemessage::PublicKeyType >(type_); +} +inline ::securemessage::PublicKeyType GenericPublicKey::type() const { + // @@protoc_insertion_point(field_get:securemessage.GenericPublicKey.type) + return _internal_type(); +} +inline void GenericPublicKey::_internal_set_type(::securemessage::PublicKeyType value) { + assert(::securemessage::PublicKeyType_IsValid(value)); + _has_bits_[0] |= 0x00000008u; + type_ = value; +} +inline void GenericPublicKey::set_type(::securemessage::PublicKeyType value) { + _internal_set_type(value); + // @@protoc_insertion_point(field_set:securemessage.GenericPublicKey.type) +} + +// optional .securemessage.EcP256PublicKey ec_p256_public_key = 2; +inline bool GenericPublicKey::_internal_has_ec_p256_public_key() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + PROTOBUF_ASSUME(!value || ec_p256_public_key_ != nullptr); + return value; +} +inline bool GenericPublicKey::has_ec_p256_public_key() const { + return _internal_has_ec_p256_public_key(); +} +inline void GenericPublicKey::clear_ec_p256_public_key() { + if (ec_p256_public_key_ != nullptr) ec_p256_public_key_->Clear(); + _has_bits_[0] &= ~0x00000001u; +} +inline const ::securemessage::EcP256PublicKey& GenericPublicKey::_internal_ec_p256_public_key() const { + const ::securemessage::EcP256PublicKey* p = ec_p256_public_key_; + return p != nullptr ? *p : reinterpret_cast( + ::securemessage::_EcP256PublicKey_default_instance_); +} +inline const ::securemessage::EcP256PublicKey& GenericPublicKey::ec_p256_public_key() const { + // @@protoc_insertion_point(field_get:securemessage.GenericPublicKey.ec_p256_public_key) + return _internal_ec_p256_public_key(); +} +inline void GenericPublicKey::unsafe_arena_set_allocated_ec_p256_public_key( + ::securemessage::EcP256PublicKey* ec_p256_public_key) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(ec_p256_public_key_); + } + ec_p256_public_key_ = ec_p256_public_key; + if (ec_p256_public_key) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:securemessage.GenericPublicKey.ec_p256_public_key) +} +inline ::securemessage::EcP256PublicKey* GenericPublicKey::release_ec_p256_public_key() { + _has_bits_[0] &= ~0x00000001u; + ::securemessage::EcP256PublicKey* temp = ec_p256_public_key_; + ec_p256_public_key_ = 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 ::securemessage::EcP256PublicKey* GenericPublicKey::unsafe_arena_release_ec_p256_public_key() { + // @@protoc_insertion_point(field_release:securemessage.GenericPublicKey.ec_p256_public_key) + _has_bits_[0] &= ~0x00000001u; + ::securemessage::EcP256PublicKey* temp = ec_p256_public_key_; + ec_p256_public_key_ = nullptr; + return temp; +} +inline ::securemessage::EcP256PublicKey* GenericPublicKey::_internal_mutable_ec_p256_public_key() { + _has_bits_[0] |= 0x00000001u; + if (ec_p256_public_key_ == nullptr) { + auto* p = CreateMaybeMessage<::securemessage::EcP256PublicKey>(GetArenaForAllocation()); + ec_p256_public_key_ = p; + } + return ec_p256_public_key_; +} +inline ::securemessage::EcP256PublicKey* GenericPublicKey::mutable_ec_p256_public_key() { + ::securemessage::EcP256PublicKey* _msg = _internal_mutable_ec_p256_public_key(); + // @@protoc_insertion_point(field_mutable:securemessage.GenericPublicKey.ec_p256_public_key) + return _msg; +} +inline void GenericPublicKey::set_allocated_ec_p256_public_key(::securemessage::EcP256PublicKey* ec_p256_public_key) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete ec_p256_public_key_; + } + if (ec_p256_public_key) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::securemessage::EcP256PublicKey>::GetOwningArena(ec_p256_public_key); + if (message_arena != submessage_arena) { + ec_p256_public_key = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, ec_p256_public_key, submessage_arena); + } + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + ec_p256_public_key_ = ec_p256_public_key; + // @@protoc_insertion_point(field_set_allocated:securemessage.GenericPublicKey.ec_p256_public_key) +} + +// optional .securemessage.SimpleRsaPublicKey rsa2048_public_key = 3; +inline bool GenericPublicKey::_internal_has_rsa2048_public_key() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + PROTOBUF_ASSUME(!value || rsa2048_public_key_ != nullptr); + return value; +} +inline bool GenericPublicKey::has_rsa2048_public_key() const { + return _internal_has_rsa2048_public_key(); +} +inline void GenericPublicKey::clear_rsa2048_public_key() { + if (rsa2048_public_key_ != nullptr) rsa2048_public_key_->Clear(); + _has_bits_[0] &= ~0x00000002u; +} +inline const ::securemessage::SimpleRsaPublicKey& GenericPublicKey::_internal_rsa2048_public_key() const { + const ::securemessage::SimpleRsaPublicKey* p = rsa2048_public_key_; + return p != nullptr ? *p : reinterpret_cast( + ::securemessage::_SimpleRsaPublicKey_default_instance_); +} +inline const ::securemessage::SimpleRsaPublicKey& GenericPublicKey::rsa2048_public_key() const { + // @@protoc_insertion_point(field_get:securemessage.GenericPublicKey.rsa2048_public_key) + return _internal_rsa2048_public_key(); +} +inline void GenericPublicKey::unsafe_arena_set_allocated_rsa2048_public_key( + ::securemessage::SimpleRsaPublicKey* rsa2048_public_key) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(rsa2048_public_key_); + } + rsa2048_public_key_ = rsa2048_public_key; + if (rsa2048_public_key) { + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:securemessage.GenericPublicKey.rsa2048_public_key) +} +inline ::securemessage::SimpleRsaPublicKey* GenericPublicKey::release_rsa2048_public_key() { + _has_bits_[0] &= ~0x00000002u; + ::securemessage::SimpleRsaPublicKey* temp = rsa2048_public_key_; + rsa2048_public_key_ = 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 ::securemessage::SimpleRsaPublicKey* GenericPublicKey::unsafe_arena_release_rsa2048_public_key() { + // @@protoc_insertion_point(field_release:securemessage.GenericPublicKey.rsa2048_public_key) + _has_bits_[0] &= ~0x00000002u; + ::securemessage::SimpleRsaPublicKey* temp = rsa2048_public_key_; + rsa2048_public_key_ = nullptr; + return temp; +} +inline ::securemessage::SimpleRsaPublicKey* GenericPublicKey::_internal_mutable_rsa2048_public_key() { + _has_bits_[0] |= 0x00000002u; + if (rsa2048_public_key_ == nullptr) { + auto* p = CreateMaybeMessage<::securemessage::SimpleRsaPublicKey>(GetArenaForAllocation()); + rsa2048_public_key_ = p; + } + return rsa2048_public_key_; +} +inline ::securemessage::SimpleRsaPublicKey* GenericPublicKey::mutable_rsa2048_public_key() { + ::securemessage::SimpleRsaPublicKey* _msg = _internal_mutable_rsa2048_public_key(); + // @@protoc_insertion_point(field_mutable:securemessage.GenericPublicKey.rsa2048_public_key) + return _msg; +} +inline void GenericPublicKey::set_allocated_rsa2048_public_key(::securemessage::SimpleRsaPublicKey* rsa2048_public_key) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete rsa2048_public_key_; + } + if (rsa2048_public_key) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::securemessage::SimpleRsaPublicKey>::GetOwningArena(rsa2048_public_key); + if (message_arena != submessage_arena) { + rsa2048_public_key = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, rsa2048_public_key, submessage_arena); + } + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + rsa2048_public_key_ = rsa2048_public_key; + // @@protoc_insertion_point(field_set_allocated:securemessage.GenericPublicKey.rsa2048_public_key) +} + +// optional .securemessage.DhPublicKey dh2048_public_key = 4; +inline bool GenericPublicKey::_internal_has_dh2048_public_key() const { + bool value = (_has_bits_[0] & 0x00000004u) != 0; + PROTOBUF_ASSUME(!value || dh2048_public_key_ != nullptr); + return value; +} +inline bool GenericPublicKey::has_dh2048_public_key() const { + return _internal_has_dh2048_public_key(); +} +inline void GenericPublicKey::clear_dh2048_public_key() { + if (dh2048_public_key_ != nullptr) dh2048_public_key_->Clear(); + _has_bits_[0] &= ~0x00000004u; +} +inline const ::securemessage::DhPublicKey& GenericPublicKey::_internal_dh2048_public_key() const { + const ::securemessage::DhPublicKey* p = dh2048_public_key_; + return p != nullptr ? *p : reinterpret_cast( + ::securemessage::_DhPublicKey_default_instance_); +} +inline const ::securemessage::DhPublicKey& GenericPublicKey::dh2048_public_key() const { + // @@protoc_insertion_point(field_get:securemessage.GenericPublicKey.dh2048_public_key) + return _internal_dh2048_public_key(); +} +inline void GenericPublicKey::unsafe_arena_set_allocated_dh2048_public_key( + ::securemessage::DhPublicKey* dh2048_public_key) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(dh2048_public_key_); + } + dh2048_public_key_ = dh2048_public_key; + if (dh2048_public_key) { + _has_bits_[0] |= 0x00000004u; + } else { + _has_bits_[0] &= ~0x00000004u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:securemessage.GenericPublicKey.dh2048_public_key) +} +inline ::securemessage::DhPublicKey* GenericPublicKey::release_dh2048_public_key() { + _has_bits_[0] &= ~0x00000004u; + ::securemessage::DhPublicKey* temp = dh2048_public_key_; + dh2048_public_key_ = 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 ::securemessage::DhPublicKey* GenericPublicKey::unsafe_arena_release_dh2048_public_key() { + // @@protoc_insertion_point(field_release:securemessage.GenericPublicKey.dh2048_public_key) + _has_bits_[0] &= ~0x00000004u; + ::securemessage::DhPublicKey* temp = dh2048_public_key_; + dh2048_public_key_ = nullptr; + return temp; +} +inline ::securemessage::DhPublicKey* GenericPublicKey::_internal_mutable_dh2048_public_key() { + _has_bits_[0] |= 0x00000004u; + if (dh2048_public_key_ == nullptr) { + auto* p = CreateMaybeMessage<::securemessage::DhPublicKey>(GetArenaForAllocation()); + dh2048_public_key_ = p; + } + return dh2048_public_key_; +} +inline ::securemessage::DhPublicKey* GenericPublicKey::mutable_dh2048_public_key() { + ::securemessage::DhPublicKey* _msg = _internal_mutable_dh2048_public_key(); + // @@protoc_insertion_point(field_mutable:securemessage.GenericPublicKey.dh2048_public_key) + return _msg; +} +inline void GenericPublicKey::set_allocated_dh2048_public_key(::securemessage::DhPublicKey* dh2048_public_key) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete dh2048_public_key_; + } + if (dh2048_public_key) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::securemessage::DhPublicKey>::GetOwningArena(dh2048_public_key); + if (message_arena != submessage_arena) { + dh2048_public_key = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, dh2048_public_key, submessage_arena); + } + _has_bits_[0] |= 0x00000004u; + } else { + _has_bits_[0] &= ~0x00000004u; + } + dh2048_public_key_ = dh2048_public_key; + // @@protoc_insertion_point(field_set_allocated:securemessage.GenericPublicKey.dh2048_public_key) +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace securemessage + +PROTOBUF_NAMESPACE_OPEN + +template <> struct is_proto_enum< ::securemessage::SigScheme> : ::std::true_type {}; +template <> struct is_proto_enum< ::securemessage::EncScheme> : ::std::true_type {}; +template <> struct is_proto_enum< ::securemessage::PublicKeyType> : ::std::true_type {}; + +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_proto_2fsecuremessage_2eproto diff --git a/third_party/securemessage/include/securemessage/public_key_proto_util.h b/third_party/securemessage/include/securemessage/public_key_proto_util.h new file mode 100644 index 00000000..3947462f --- /dev/null +++ b/third_party/securemessage/include/securemessage/public_key_proto_util.h @@ -0,0 +1,68 @@ +/* + * Copyright 2014 Google Inc. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef SECUREMESSAGE_PUBLIC_KEY_PROTO_UTIL_H_ +#define SECUREMESSAGE_PUBLIC_KEY_PROTO_UTIL_H_ + +#include +#include "securemessage/common.h" +#include "securemessage/crypto_ops.h" +#include "proto/securemessage.pb.h" + +namespace securemessage { + +class PublicKeyProtoUtil { + public: + // + // Encodes the internal implementation of the PublicKey into the appropriate + // protobuf format. + // + // @return nullptr if the PublicKey is not supported + // + static std::unique_ptr EncodePublicKey( + const CryptoOps::PublicKey& key); + + // + // Transforms the protobuf format into a internal representation of a + // PublicKey. + // + // @return nullptr if the GenericPublicKey protobuf type is not supported + // + static std::unique_ptr ParsePublicKey( + const GenericPublicKey& key); + + private: + virtual ~PublicKeyProtoUtil() {} + + // @return nullptr if the PublicKey is not supported + static std::unique_ptr EncodeEcPublicKey( + const CryptoOps::PublicKey& key); + + // @return nullptr if the EcP256PublicKey is invalid + static std::unique_ptr ParseEcPublicKey( + const EcP256PublicKey& key); + + // @return nullptr if the PublicKey is not supported + static std::unique_ptr EncodeRsaPublicKey( + const CryptoOps::PublicKey& key); + + // @return nullptr if the SimpleRsaPublicKey is invalid + static std::unique_ptr ParseRsaPublicKey( + const SimpleRsaPublicKey& key); +}; + +} // namespace securemessage +#endif // SECUREMESSAGE_PUBLIC_KEY_PROTO_UTIL_H_ diff --git a/third_party/securemessage/include/securemessage/raw_secure_message_parser.h b/third_party/securemessage/include/securemessage/raw_secure_message_parser.h new file mode 100644 index 00000000..eef4becd --- /dev/null +++ b/third_party/securemessage/include/securemessage/raw_secure_message_parser.h @@ -0,0 +1,90 @@ +/* + * Copyright 2014 Google Inc. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef SECUREMESSAGE_RAW_SECURE_MESSAGE_PARSER_H_ +#define SECUREMESSAGE_RAW_SECURE_MESSAGE_PARSER_H_ + +#include + +#include "securemessage/common.h" +#include "securemessage/crypto_ops.h" + +namespace securemessage { + +// Utility class to parse and verify raw byte {@link SecureMessage} protos. +// Verifies the signature on the message, and decrypts "signcrypted" messages +// (while simultaneously verifying the signature). +// +// @see RawSecureMessageBuilder +class RawSecureMessageParser { + public: + // + // Parses a raw {@link SecureMessage} that is already separated out into + // signature and headerAndBody, containing a cleartext payload body, and + // verifies the signature. + // + // @param associated_data optional associated data bound to the signature (but + // not in the message). Send an empty string when not using. + // @return a string to the raw {@link HeaderAndBody} pair (which + // is fully verified) or a nullptr on error @see + // SecureMessageBuilder#BuildSignedCleartextMessage + // + static std::unique_ptr ParseSignedCleartextMessage( + const string& signature, + const string& header_and_body, + const CryptoOps::Key& verification_key, + CryptoOps::SigType sig_type, + const string& associated_data); + + // + // Parses a raw {@link SecureMessage} that is already separated out into + // signature and headerAndBody, containing an encrypted payload body, + // extracting a decryption of the payload body and verifying the signature. + // + // @return a string to the the raw {@link HeaderAndBody} pair + // (which is fully verified and decrypted or a nullptr on error + // @see SecureMessageBuilder#BuildSignCryptedMessage + // + static std::unique_ptr ParseSignCryptedMessage( + const string& signature, + const string& header_and_body, + const CryptoOps::Key& verification_key, + CryptoOps::SigType sig_type, + const CryptoOps::SecretKey& decryption_key, + CryptoOps::EncType enc_type, + const string& associated_data); + + private: + RawSecureMessageParser(); // Do not instantiate + ~RawSecureMessageParser(); + + // + // Verifies the components of a raw {@link HeaderAndBody}. + // + // @return true if the header_and_body can be verified. + // + static bool VerifyHeaderAndBody( + const string& signature, + const string& header_and_body, + const CryptoOps::Key& verification_key, + CryptoOps::SigType sig_type, + CryptoOps::EncType enc_type, + const string& associated_data, + bool suppress_associated_data); +}; + +} // namespace securemessage +#endif // SECUREMESSAGE_RAW_SECURE_MESSAGE_PARSER_H_ diff --git a/third_party/securemessage/include/securemessage/secure_message_builder.h b/third_party/securemessage/include/securemessage/secure_message_builder.h new file mode 100644 index 00000000..3b4053e7 --- /dev/null +++ b/third_party/securemessage/include/securemessage/secure_message_builder.h @@ -0,0 +1,177 @@ +/* + * Copyright 2014 Google Inc. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef SECUREMESSAGE_SECURE_MESSAGE_BUILDER_H_ +#define SECUREMESSAGE_SECURE_MESSAGE_BUILDER_H_ + +#include + +#include "proto/securemessage.pb.h" + +#include "securemessage/byte_buffer.h" +#include "securemessage/common.h" +#include "securemessage/crypto_ops.h" + +namespace securemessage { + +// +// Builder for {@link SecureMessage} protos. Can be used to create either signed +// messages, or "signcrypted" (encrypted then signed) messages that include a +// tight binding between the ciphertext portion and a verification key identity. +// +// All the language non-specific work is done from within the +// {@link RawSecureMessageBuilder} class. +// +// @see SecureMessageParser +// @see RawSecureMessageBuilder +// +class SecureMessageBuilder { + public: + SecureMessageBuilder(); + + virtual ~SecureMessageBuilder(); + + // + // Resets this {@link SecureMessageBuilder} instance to a blank configuration + // (and returns it). + // + SecureMessageBuilder* Reset(); + + // + // Optional metadata to be sent along with the header information in this + // {@link SecureMessage}. + //

+ // Note that this value will be sent UNENCRYPTED in all cases. + //

+ // Can be used with either cleartext or signcrypted messages, but is intended + // primarily for use with signcrypted messages. + // + SecureMessageBuilder* SetPublicMetadata(const std::string& public_metadata); + + // + // The recipient of the {@link SecureMessage} should be able to uniquely + // determine the correct verification key, given only this value. + //

+ // Can be used with either cleartext or signcrypted messages. Setting this is + // mandatory for signcrypted messages using a public key CryptoOps::SigType, + // in order to bind the encrypted body to a specific verification key. + //

+ // Note that this value is sent UNENCRYPTED in all cases. + // + SecureMessageBuilder* SetVerificationKeyId( + const std::string& verification_key_id); + + // + // To be used only with {@link #BuildSignCryptedMessage(CryptoOps::Key, + // CryptoOps::SigType, CryptoOps::Key, CryptoOps::EncType, string)}, + // this value is sent UNENCRYPTED as part of the header. It should be + // used by the recipient of the {@link SecureMessage} to identify an + // appropriate key to use for decrypting the message body. + // + SecureMessageBuilder* SetDecryptionKeyId( + const std::string& decryption_key_id); + + // + // Additional data is "associated" with this {@link SecureMessage}, but will + // not be sent as part of it. The recipient of the {@link SecureMessage} will + // need to provide the same data in order to verify the message body. Setting + // this to {@code null} is equivalent to using an empty array (unlike the + // behavior of {@code VerificationKeyId} and {@code DecryptionKeyId}). + //

+ // Note that the size (length in bytes) of the associated data will + // be sent in the UNENCRYPTED header information, even if you are + // using encryption. + //

+ // If you will be using {@link #BuildSignedCleartextMessage(CryptoOps::Key, + // CryptoOps::SigType, string)}, then anyone observing the + // {@link SecureMessage} may be able to infer this associated data via an + // "offline dictionary attack". That is, when no encryption is used, you will + // not be hiding this data simply because it is not being sent over the wire. + // + SecureMessageBuilder* SetAssociatedData(const std::string& associated_data); + + // + // Generates a signed {@link SecureMessage} with the payload {@code body} left + // UNENCRYPTED. + //

+ // Note that if you have used {@link #SetAssociatedData(string)}, the + // associated data will + // be subject to offline dictionary attacks if you use a public key {@link + // CryptoOps::SigType}. + //

+ // Doesn't currently support symmetric keys stored in a TPM + //

+ // Can return nullptr on error + // + // @see SecureMessageParser#ParseSignedCleartextMessage + // + std::unique_ptr BuildSignedCleartextMessage( + const CryptoOps::Key& signing_key, CryptoOps::SigType sig_type, + const std::string& body); + + // + // Generates a signed and encrypted {@link SecureMessage}. If the signature + // type requires a public key, such as with ECDSA_P256_SHA256, then the caller + // must set a verification id using the + // {@link #SetVerificationKeyId(string)} method. The verification key + // id will be bound to the encrypted {@code body}, preventing attacks that + // involve stripping the signature and then re-signing the encrypted + // {@code body} as if it was originally sent by the attacker. + // + //

It is safe to re-use one {@link SecretKey} as both + // {@code signingKey} and {@code encryptionKey}, even if that key is also used + // for {@link #buildSignedCleartextMessage(Key, SigType, byte[])}. In fact, + // the resulting output encoding will be more compact when the same symmetric + // key is used for both. + // + //

Note that PublicMetadata and other header fields are left + // UNENCRYPTED. + // + //

Doesn't currently support symmetric keys stored in a TPM + // + //

Can return nullptr on error + // + // @param encType must not be set to {@link EncType#NONE} + // @see SecureMessageParser#parseSignCryptedMessage(SecureMessage, + // CryptoOps::Key, CryptoOps::SigType, CryptoOps::Key, + // CryptoOps::EncType) + // + std::unique_ptr BuildSignCryptedMessage( + const CryptoOps::Key& signing_key, CryptoOps::SigType sig_type, + const CryptoOps::SecretKey& encryption_key, CryptoOps::EncType enc_type, + const std::string& body); + + private: + std::unique_ptr public_metadata_; + std::unique_ptr decryption_key_id_; + std::unique_ptr verification_key_id_; + std::unique_ptr associated_data_; + + // @param iv IV or {@code null} if IV to be left unset in the Header + std::unique_ptr

BuildHeader(CryptoOps::SigType sig_type, + CryptoOps::EncType enc_type, + const std::unique_ptr& iv); + + ByteBuffer SerializeHeaderAndBody(const std::string& header, + const std::string& body); + + std::unique_ptr CreateSignedResult( + const CryptoOps::Key& signing_key, const CryptoOps::SigType& sig_type, + const ByteBuffer& header_and_body, const ByteBuffer& associated_data); +}; + +} // namespace securemessage +#endif // SECUREMESSAGE_SECURE_MESSAGE_BUILDER_H_ diff --git a/third_party/securemessage/include/securemessage/secure_message_parser.h b/third_party/securemessage/include/securemessage/secure_message_parser.h new file mode 100644 index 00000000..a827a99d --- /dev/null +++ b/third_party/securemessage/include/securemessage/secure_message_parser.h @@ -0,0 +1,99 @@ +/* + * Copyright 2014 Google Inc. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef SECUREMESSAGE_SECURE_MESSAGE_PARSER_H_ +#define SECUREMESSAGE_SECURE_MESSAGE_PARSER_H_ + +#include + +#include "proto/securemessage.pb.h" + +#include "securemessage/common.h" +#include "securemessage/crypto_ops.h" + +namespace securemessage { + +// This is a light wrapper on {@link RawSecureMessageParser} that binds to +// the c++ protobuf implementation. +// Utility class to parse and verify {@link SecureMessage} protos. Verifies the +// signature on the message, and decrypts "signcrypted" messages (while +// simultaneously verifying the signature). +// +// @see SecureMessageBuilder +class SecureMessageParser { + public: + // Extracts the {@link Header} component from a {@link SecureMessage} but + // DOES NOT VERIFY the signature when doing so. Callers should not + // trust the resulting output until after a subsequent {@code parse*()} call + // has succeeded. + // + //

The intention is to allow the caller to determine the type of the + // protocol message and which keys are in use, prior to attempting to verify + // (and possibly decrypt) the payload body. + // + //

The call will return a std::unique_ptr on success and a nullptr on error + static std::unique_ptr

GetUnverifiedHeader( + const SecureMessage& secmsg); + + // + // Parses a {@link SecureMessage} containing a cleartext payload body, and + // verifies the signature. + // + // @return a std::unique_ptr to the parsed {@link HeaderAndBody} pair (which + // is fully verified) or a nullptr on error @see + // SecureMessageBuilder#BuildSignedCleartextMessage + // + static std::unique_ptr ParseSignedCleartextMessage( + const SecureMessage& secmsg, const CryptoOps::Key& verification_key, + CryptoOps::SigType sig_type); + + // + // Parses a {@link SecureMessage} containing a cleartext payload body, and + // verifies the signature. + // + // @param assocaited_data optional associated data bound to the signature (but + // not in the message). Pass an empty string when not using. + // @return a std::unique_ptr to the parsed {@link HeaderAndBody} pair (which + // is fully verified) or a nullptr on error @see + // SecureMessageBuilder#BuildSignedCleartextMessage + // + static std::unique_ptr ParseSignedCleartextMessage( + const SecureMessage& secmsg, const CryptoOps::Key& verification_key, + CryptoOps::SigType sig_type, const string& associated_data); + + // + // Parses a {@link SecureMessage} containing an encrypted payload body, + // extracting a decryption of the payload body and verifying the signature. + // + // @param associated_data optional associated data bound to the signature + // (but not in the message). Pass an empty string when not using. + // @return a std::unique_ptr to the the parsed {@link HeaderAndBody} pair + // (which is fully verified and decrypted or a nullptr on error + // @see SecureMessageBuilder#BuildSignCryptedMessage + // + static std::unique_ptr ParseSignCryptedMessage( + const SecureMessage& secmsg, const CryptoOps::Key& verification_key, + CryptoOps::SigType sig_type, const CryptoOps::SecretKey& decryption_key, + CryptoOps::EncType enc_type, const string& associated_data); + + private: + SecureMessageParser(); // Do not instantiate + + ~SecureMessageParser(); +}; + +} // namespace securemessage +#endif // SECUREMESSAGE_SECURE_MESSAGE_PARSER_H_ diff --git a/third_party/securemessage/include/securemessage/secure_message_wrapper.h b/third_party/securemessage/include/securemessage/secure_message_wrapper.h new file mode 100644 index 00000000..24df25a3 --- /dev/null +++ b/third_party/securemessage/include/securemessage/secure_message_wrapper.h @@ -0,0 +1,103 @@ +/* + * Copyright 2014 Google Inc. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef SECUREMESSAGE_SECURE_MESSAGE_WRAPPER_H_ +#define SECUREMESSAGE_SECURE_MESSAGE_WRAPPER_H_ + +#include + +#include "securemessage/common.h" +#include "securemessage/crypto_ops.h" + +namespace securemessage { + +// Utility class to allow alternate implementations of the securemessage +// protobuf to be used (for example, an objective-c implementation). +// +// @see SecureMessage +class SecureMessageWrapper { + public: + // Takes the byte representation of the {@link HeaderAndBody} and returns + // the iv field from the {@link Header}. If this does not exist, this + // function will return nullptr. + static std::unique_ptr ParseHeaderIv( + const string& header_and_body_bytes); + + // Takes the byte representation of the {@link HeaderAndBody} and returns the + // byte representation of the {@link Header}. If this does not exist, this + // function will return nullptr. + static std::unique_ptr ParseHeader( + const string& header_and_body_bytes); + + // Takes the byte representation of the {@link HeaderAndBodyInternal} and + // returns the byte representation of the {@link Header}. If this does not + // exist, this function will return nullptr. + static std::unique_ptr ParseInternalHeader( + const string& header_and_body_bytes); + + // Takes the byte representation of the {@link HeaderAndBody} and returns + // the {@link Body}. If this does not exist, this function will return + // nullptr. + static std::unique_ptr ParseBody(const string& header_and_body_bytes); + + // Takes the byte representation of the {@link Header} and {@link Body} and + // returns the byte representation of {@link HeaderAndBody}. + static std::unique_ptr BuildHeaderAndBody( + const string& header_bytes, const string& body_bytes); + + // Takes the byte representation of the header and returns the int value + // for the SigScheme enum + static int GetSignatureScheme(const string& header_bytes); + + // Takes the byte representation of the header and returns the int value + // for the EncScheme enum + static int GetEncryptionScheme(const string& header_bytes); + + // Takes the byte representation of the header and returns the length of the + // associated data stored in the header + static uint32_t GetAssociatedDataLength(const string& header_bytes); + + // Tests if the byte representation of the header has a decryption key id + static bool HasDecryptionKeyId(const string& header_bytes); + + // Tests if the byte representation of the header has a verification key id + static bool HasVerificationKeyId(const string& header_bytes); + + // + // Returns the constant exposed enums that are found in the + // {@link SecureMessage} protobuf. + // + // A return value of 0 would be considered an error. + // + // @see SigScheme + static int GetSigScheme(CryptoOps::SigType sig_type); + + // + // Returns the constant exposed enums that are found in the + // {@link SecureMessage} protobuf. + // + // A return value of 0 would be considered an error. + // + // @see EncScheme + static int GetEncScheme(CryptoOps::EncType enc_type); + + private: + SecureMessageWrapper(); // Do not instantiate + ~SecureMessageWrapper(); +}; + +} // namespace securemessage +#endif // SECUREMESSAGE_SECURE_MESSAGE_WRAPPER_H_ diff --git a/third_party/securemessage/include/securemessage/util.h b/third_party/securemessage/include/securemessage/util.h new file mode 100644 index 00000000..3eaf974b --- /dev/null +++ b/third_party/securemessage/include/securemessage/util.h @@ -0,0 +1,60 @@ +/* + * Copyright 2014 Google Inc. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef SECUREMESSAGE_UTIL_H_ +#define SECUREMESSAGE_UTIL_H_ + +#include +#include + +#include "securemessage/common.h" + +namespace securemessage { + +class Util { + public: + // + // Makes a new std::unique_ptr by taking input data and a length + // + static std::unique_ptr MakeUniquePtrString(const void* data, + size_t length); + + // + // Providing a level of indirection when logging error message. The idea + // being that this can be swapped out in platforms that log error messages in + // some more useful way. + // + static void LogError(const std::string& error_message); + + // + // Provides a level of indirection for managing really bad errors. A call of + // this function indicates that an unrecoverable error happened -- perhaps + // because of an attack or a bug in an underlying crypto provider. The + // invocation of this function indicates that any subsequent behavior will be + // undefined. This level of indirection is meant to let users of this library + // figure out how they want to deal with such bad errors. + // + // This function should never return. + // + static void LogErrorAndAbort [[noreturn]] (const std::string& error_message); + + private: + virtual ~Util(); +}; + +} // namespace securemessage + +#endif // SECUREMESSAGE_UTIL_H_ diff --git a/third_party/smhasher/include/src/MurmurHash3.h b/third_party/smhasher/include/src/MurmurHash3.h new file mode 100644 index 00000000..e1c6d349 --- /dev/null +++ b/third_party/smhasher/include/src/MurmurHash3.h @@ -0,0 +1,37 @@ +//----------------------------------------------------------------------------- +// MurmurHash3 was written by Austin Appleby, and is placed in the public +// domain. The author hereby disclaims copyright to this source code. + +#ifndef _MURMURHASH3_H_ +#define _MURMURHASH3_H_ + +//----------------------------------------------------------------------------- +// Platform-specific functions and macros + +// Microsoft Visual Studio + +#if defined(_MSC_VER) && (_MSC_VER < 1600) + +typedef unsigned char uint8_t; +typedef unsigned int uint32_t; +typedef unsigned __int64 uint64_t; + +// Other compilers + +#else // defined(_MSC_VER) + +#include + +#endif // !defined(_MSC_VER) + +//----------------------------------------------------------------------------- + +void MurmurHash3_x86_32 ( const void * key, int len, uint32_t seed, void * out ); + +void MurmurHash3_x86_128 ( const void * key, int len, uint32_t seed, void * out ); + +void MurmurHash3_x64_128 ( const void * key, int len, uint32_t seed, void * out ); + +//----------------------------------------------------------------------------- + +#endif // _MURMURHASH3_H_ diff --git a/third_party/ukey2/compiled_proto/proto/device_to_device_messages.pb.cc b/third_party/ukey2/compiled_proto/proto/device_to_device_messages.pb.cc new file mode 100644 index 00000000..09acd422 --- /dev/null +++ b/third_party/ukey2/compiled_proto/proto/device_to_device_messages.pb.cc @@ -0,0 +1,1586 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: proto/device_to_device_messages.proto + +#include "proto/device_to_device_messages.pb.h" + +#include + +#include +#include +#include +#include +// @@protoc_insertion_point(includes) +#include + +PROTOBUF_PRAGMA_INIT_SEG +namespace securegcm { +constexpr DeviceToDeviceMessage::DeviceToDeviceMessage( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : message_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , sequence_number_(0){} +struct DeviceToDeviceMessageDefaultTypeInternal { + constexpr DeviceToDeviceMessageDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~DeviceToDeviceMessageDefaultTypeInternal() {} + union { + DeviceToDeviceMessage _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT DeviceToDeviceMessageDefaultTypeInternal _DeviceToDeviceMessage_default_instance_; +constexpr InitiatorHello::InitiatorHello( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : public_dh_key_(nullptr) + , protocol_version_(0){} +struct InitiatorHelloDefaultTypeInternal { + constexpr InitiatorHelloDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~InitiatorHelloDefaultTypeInternal() {} + union { + InitiatorHello _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT InitiatorHelloDefaultTypeInternal _InitiatorHello_default_instance_; +constexpr ResponderHello::ResponderHello( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : public_dh_key_(nullptr) + , protocol_version_(0){} +struct ResponderHelloDefaultTypeInternal { + constexpr ResponderHelloDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~ResponderHelloDefaultTypeInternal() {} + union { + ResponderHello _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ResponderHelloDefaultTypeInternal _ResponderHello_default_instance_; +constexpr EcPoint::EcPoint( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : x_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , y_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , curve_(1) +{} +struct EcPointDefaultTypeInternal { + constexpr EcPointDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~EcPointDefaultTypeInternal() {} + union { + EcPoint _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT EcPointDefaultTypeInternal _EcPoint_default_instance_; +constexpr SpakeHandshakeMessage::SpakeHandshakeMessage( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : hash_value_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , payload_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , ec_point_(nullptr) + , flow_number_(0){} +struct SpakeHandshakeMessageDefaultTypeInternal { + constexpr SpakeHandshakeMessageDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~SpakeHandshakeMessageDefaultTypeInternal() {} + union { + SpakeHandshakeMessage _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT SpakeHandshakeMessageDefaultTypeInternal _SpakeHandshakeMessage_default_instance_; +} // namespace securegcm +namespace securegcm { +bool Curve_IsValid(int value) { + switch (value) { + case 1: + return true; + default: + return false; + } +} + +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed Curve_strings[1] = {}; + +static const char Curve_names[] = + "ED_25519"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry Curve_entries[] = { + { {Curve_names + 0, 8}, 1 }, +}; + +static const int Curve_entries_by_number[] = { + 0, // 1 -> ED_25519 +}; + +const std::string& Curve_Name( + Curve value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + Curve_entries, + Curve_entries_by_number, + 1, Curve_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + Curve_entries, + Curve_entries_by_number, + 1, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + Curve_strings[idx].get(); +} +bool Curve_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, Curve* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + Curve_entries, 1, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} + +// =================================================================== + +class DeviceToDeviceMessage::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_message(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_sequence_number(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } +}; + +DeviceToDeviceMessage::DeviceToDeviceMessage(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:securegcm.DeviceToDeviceMessage) +} +DeviceToDeviceMessage::DeviceToDeviceMessage(const DeviceToDeviceMessage& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + message_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + message_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_message()) { + message_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_message(), + GetArenaForAllocation()); + } + sequence_number_ = from.sequence_number_; + // @@protoc_insertion_point(copy_constructor:securegcm.DeviceToDeviceMessage) +} + +inline void DeviceToDeviceMessage::SharedCtor() { +message_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + message_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +sequence_number_ = 0; +} + +DeviceToDeviceMessage::~DeviceToDeviceMessage() { + // @@protoc_insertion_point(destructor:securegcm.DeviceToDeviceMessage) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void DeviceToDeviceMessage::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + message_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void DeviceToDeviceMessage::ArenaDtor(void* object) { + DeviceToDeviceMessage* _this = reinterpret_cast< DeviceToDeviceMessage* >(object); + (void)_this; +} +void DeviceToDeviceMessage::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void DeviceToDeviceMessage::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void DeviceToDeviceMessage::Clear() { +// @@protoc_insertion_point(message_clear_start:securegcm.DeviceToDeviceMessage) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + message_.ClearNonDefaultToEmpty(); + } + sequence_number_ = 0; + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* DeviceToDeviceMessage::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional bytes message = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_message(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional int32 sequence_number = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { + _Internal::set_has_sequence_number(&has_bits); + sequence_number_ = ::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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* DeviceToDeviceMessage::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:securegcm.DeviceToDeviceMessage) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional bytes message = 1; + if (cached_has_bits & 0x00000001u) { + target = stream->WriteBytesMaybeAliased( + 1, this->_internal_message(), target); + } + + // optional int32 sequence_number = 2; + if (cached_has_bits & 0x00000002u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_sequence_number(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:securegcm.DeviceToDeviceMessage) + return target; +} + +size_t DeviceToDeviceMessage::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:securegcm.DeviceToDeviceMessage) + 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 = _has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + // optional bytes message = 1; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_message()); + } + + // optional int32 sequence_number = 2; + if (cached_has_bits & 0x00000002u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_sequence_number()); + } + + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void DeviceToDeviceMessage::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void DeviceToDeviceMessage::MergeFrom(const DeviceToDeviceMessage& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:securegcm.DeviceToDeviceMessage) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + _internal_set_message(from._internal_message()); + } + if (cached_has_bits & 0x00000002u) { + sequence_number_ = from.sequence_number_; + } + _has_bits_[0] |= cached_has_bits; + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void DeviceToDeviceMessage::CopyFrom(const DeviceToDeviceMessage& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:securegcm.DeviceToDeviceMessage) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool DeviceToDeviceMessage::IsInitialized() const { + return true; +} + +void DeviceToDeviceMessage::InternalSwap(DeviceToDeviceMessage* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &message_, lhs_arena, + &other->message_, rhs_arena + ); + swap(sequence_number_, other->sequence_number_); +} + +std::string DeviceToDeviceMessage::GetTypeName() const { + return "securegcm.DeviceToDeviceMessage"; +} + + +// =================================================================== + +class InitiatorHello::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static const ::securemessage::GenericPublicKey& public_dh_key(const InitiatorHello* msg); + static void set_has_public_dh_key(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_protocol_version(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } +}; + +const ::securemessage::GenericPublicKey& +InitiatorHello::_Internal::public_dh_key(const InitiatorHello* msg) { + return *msg->public_dh_key_; +} +void InitiatorHello::clear_public_dh_key() { + if (public_dh_key_ != nullptr) public_dh_key_->Clear(); + _has_bits_[0] &= ~0x00000001u; +} +InitiatorHello::InitiatorHello(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:securegcm.InitiatorHello) +} +InitiatorHello::InitiatorHello(const InitiatorHello& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + if (from._internal_has_public_dh_key()) { + public_dh_key_ = new ::securemessage::GenericPublicKey(*from.public_dh_key_); + } else { + public_dh_key_ = nullptr; + } + protocol_version_ = from.protocol_version_; + // @@protoc_insertion_point(copy_constructor:securegcm.InitiatorHello) +} + +inline void InitiatorHello::SharedCtor() { +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&public_dh_key_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&protocol_version_) - + reinterpret_cast(&public_dh_key_)) + sizeof(protocol_version_)); +} + +InitiatorHello::~InitiatorHello() { + // @@protoc_insertion_point(destructor:securegcm.InitiatorHello) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void InitiatorHello::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + if (this != internal_default_instance()) delete public_dh_key_; +} + +void InitiatorHello::ArenaDtor(void* object) { + InitiatorHello* _this = reinterpret_cast< InitiatorHello* >(object); + (void)_this; +} +void InitiatorHello::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void InitiatorHello::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void InitiatorHello::Clear() { +// @@protoc_insertion_point(message_clear_start:securegcm.InitiatorHello) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + GOOGLE_DCHECK(public_dh_key_ != nullptr); + public_dh_key_->Clear(); + } + protocol_version_ = 0; + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* InitiatorHello::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional .securemessage.GenericPublicKey public_dh_key = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + ptr = ctx->ParseMessage(_internal_mutable_public_dh_key(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional int32 protocol_version = 2 [default = 0]; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { + _Internal::set_has_protocol_version(&has_bits); + protocol_version_ = ::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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* InitiatorHello::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:securegcm.InitiatorHello) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional .securemessage.GenericPublicKey public_dh_key = 1; + if (cached_has_bits & 0x00000001u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 1, _Internal::public_dh_key(this), target, stream); + } + + // optional int32 protocol_version = 2 [default = 0]; + if (cached_has_bits & 0x00000002u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_protocol_version(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:securegcm.InitiatorHello) + return target; +} + +size_t InitiatorHello::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:securegcm.InitiatorHello) + 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 = _has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + // optional .securemessage.GenericPublicKey public_dh_key = 1; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *public_dh_key_); + } + + // optional int32 protocol_version = 2 [default = 0]; + if (cached_has_bits & 0x00000002u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_protocol_version()); + } + + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void InitiatorHello::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void InitiatorHello::MergeFrom(const InitiatorHello& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:securegcm.InitiatorHello) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + _internal_mutable_public_dh_key()->::securemessage::GenericPublicKey::MergeFrom(from._internal_public_dh_key()); + } + if (cached_has_bits & 0x00000002u) { + protocol_version_ = from.protocol_version_; + } + _has_bits_[0] |= cached_has_bits; + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void InitiatorHello::CopyFrom(const InitiatorHello& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:securegcm.InitiatorHello) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool InitiatorHello::IsInitialized() const { + if (_internal_has_public_dh_key()) { + if (!public_dh_key_->IsInitialized()) return false; + } + return true; +} + +void InitiatorHello::InternalSwap(InitiatorHello* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(InitiatorHello, protocol_version_) + + sizeof(InitiatorHello::protocol_version_) + - PROTOBUF_FIELD_OFFSET(InitiatorHello, public_dh_key_)>( + reinterpret_cast(&public_dh_key_), + reinterpret_cast(&other->public_dh_key_)); +} + +std::string InitiatorHello::GetTypeName() const { + return "securegcm.InitiatorHello"; +} + + +// =================================================================== + +class ResponderHello::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static const ::securemessage::GenericPublicKey& public_dh_key(const ResponderHello* msg); + static void set_has_public_dh_key(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_protocol_version(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } +}; + +const ::securemessage::GenericPublicKey& +ResponderHello::_Internal::public_dh_key(const ResponderHello* msg) { + return *msg->public_dh_key_; +} +void ResponderHello::clear_public_dh_key() { + if (public_dh_key_ != nullptr) public_dh_key_->Clear(); + _has_bits_[0] &= ~0x00000001u; +} +ResponderHello::ResponderHello(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:securegcm.ResponderHello) +} +ResponderHello::ResponderHello(const ResponderHello& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + if (from._internal_has_public_dh_key()) { + public_dh_key_ = new ::securemessage::GenericPublicKey(*from.public_dh_key_); + } else { + public_dh_key_ = nullptr; + } + protocol_version_ = from.protocol_version_; + // @@protoc_insertion_point(copy_constructor:securegcm.ResponderHello) +} + +inline void ResponderHello::SharedCtor() { +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&public_dh_key_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&protocol_version_) - + reinterpret_cast(&public_dh_key_)) + sizeof(protocol_version_)); +} + +ResponderHello::~ResponderHello() { + // @@protoc_insertion_point(destructor:securegcm.ResponderHello) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void ResponderHello::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + if (this != internal_default_instance()) delete public_dh_key_; +} + +void ResponderHello::ArenaDtor(void* object) { + ResponderHello* _this = reinterpret_cast< ResponderHello* >(object); + (void)_this; +} +void ResponderHello::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void ResponderHello::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void ResponderHello::Clear() { +// @@protoc_insertion_point(message_clear_start:securegcm.ResponderHello) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + GOOGLE_DCHECK(public_dh_key_ != nullptr); + public_dh_key_->Clear(); + } + protocol_version_ = 0; + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* ResponderHello::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional .securemessage.GenericPublicKey public_dh_key = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + ptr = ctx->ParseMessage(_internal_mutable_public_dh_key(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional int32 protocol_version = 2 [default = 0]; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { + _Internal::set_has_protocol_version(&has_bits); + protocol_version_ = ::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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* ResponderHello::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:securegcm.ResponderHello) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional .securemessage.GenericPublicKey public_dh_key = 1; + if (cached_has_bits & 0x00000001u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 1, _Internal::public_dh_key(this), target, stream); + } + + // optional int32 protocol_version = 2 [default = 0]; + if (cached_has_bits & 0x00000002u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_protocol_version(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:securegcm.ResponderHello) + return target; +} + +size_t ResponderHello::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:securegcm.ResponderHello) + 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 = _has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + // optional .securemessage.GenericPublicKey public_dh_key = 1; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *public_dh_key_); + } + + // optional int32 protocol_version = 2 [default = 0]; + if (cached_has_bits & 0x00000002u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_protocol_version()); + } + + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void ResponderHello::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void ResponderHello::MergeFrom(const ResponderHello& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:securegcm.ResponderHello) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + _internal_mutable_public_dh_key()->::securemessage::GenericPublicKey::MergeFrom(from._internal_public_dh_key()); + } + if (cached_has_bits & 0x00000002u) { + protocol_version_ = from.protocol_version_; + } + _has_bits_[0] |= cached_has_bits; + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void ResponderHello::CopyFrom(const ResponderHello& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:securegcm.ResponderHello) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ResponderHello::IsInitialized() const { + if (_internal_has_public_dh_key()) { + if (!public_dh_key_->IsInitialized()) return false; + } + return true; +} + +void ResponderHello::InternalSwap(ResponderHello* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(ResponderHello, protocol_version_) + + sizeof(ResponderHello::protocol_version_) + - PROTOBUF_FIELD_OFFSET(ResponderHello, public_dh_key_)>( + reinterpret_cast(&public_dh_key_), + reinterpret_cast(&other->public_dh_key_)); +} + +std::string ResponderHello::GetTypeName() const { + return "securegcm.ResponderHello"; +} + + +// =================================================================== + +class EcPoint::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_curve(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } + static void set_has_x(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_y(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static bool MissingRequiredFields(const HasBits& has_bits) { + return ((has_bits[0] & 0x00000007) ^ 0x00000007) != 0; + } +}; + +EcPoint::EcPoint(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:securegcm.EcPoint) +} +EcPoint::EcPoint(const EcPoint& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + x_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + x_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_x()) { + x_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_x(), + GetArenaForAllocation()); + } + y_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + y_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_y()) { + y_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_y(), + GetArenaForAllocation()); + } + curve_ = from.curve_; + // @@protoc_insertion_point(copy_constructor:securegcm.EcPoint) +} + +inline void EcPoint::SharedCtor() { +x_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + x_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +y_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + y_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +curve_ = 1; +} + +EcPoint::~EcPoint() { + // @@protoc_insertion_point(destructor:securegcm.EcPoint) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void EcPoint::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + x_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + y_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void EcPoint::ArenaDtor(void* object) { + EcPoint* _this = reinterpret_cast< EcPoint* >(object); + (void)_this; +} +void EcPoint::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void EcPoint::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void EcPoint::Clear() { +// @@protoc_insertion_point(message_clear_start:securegcm.EcPoint) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + if (cached_has_bits & 0x00000001u) { + x_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000002u) { + y_.ClearNonDefaultToEmpty(); + } + curve_ = 1; + } + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* EcPoint::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // required .securegcm.Curve curve = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::securegcm::Curve_IsValid(val))) { + _internal_set_curve(static_cast<::securegcm::Curve>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // required bytes x = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + auto str = _internal_mutable_x(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // required bytes y = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { + auto str = _internal_mutable_y(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* EcPoint::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:securegcm.EcPoint) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // required .securegcm.Curve curve = 1; + if (cached_has_bits & 0x00000004u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 1, this->_internal_curve(), target); + } + + // required bytes x = 2; + if (cached_has_bits & 0x00000001u) { + target = stream->WriteBytesMaybeAliased( + 2, this->_internal_x(), target); + } + + // required bytes y = 3; + if (cached_has_bits & 0x00000002u) { + target = stream->WriteBytesMaybeAliased( + 3, this->_internal_y(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:securegcm.EcPoint) + return target; +} + +size_t EcPoint::RequiredFieldsByteSizeFallback() const { +// @@protoc_insertion_point(required_fields_byte_size_fallback_start:securegcm.EcPoint) + size_t total_size = 0; + + if (_internal_has_x()) { + // required bytes x = 2; + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_x()); + } + + if (_internal_has_y()) { + // required bytes y = 3; + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_y()); + } + + if (_internal_has_curve()) { + // required .securegcm.Curve curve = 1; + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_curve()); + } + + return total_size; +} +size_t EcPoint::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:securegcm.EcPoint) + size_t total_size = 0; + + if (((_has_bits_[0] & 0x00000007) ^ 0x00000007) == 0) { // All required fields are present. + // required bytes x = 2; + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_x()); + + // required bytes y = 3; + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_y()); + + // required .securegcm.Curve curve = 1; + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_curve()); + + } else { + total_size += RequiredFieldsByteSizeFallback(); + } + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void EcPoint::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void EcPoint::MergeFrom(const EcPoint& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:securegcm.EcPoint) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + if (cached_has_bits & 0x00000001u) { + _internal_set_x(from._internal_x()); + } + if (cached_has_bits & 0x00000002u) { + _internal_set_y(from._internal_y()); + } + if (cached_has_bits & 0x00000004u) { + curve_ = from.curve_; + } + _has_bits_[0] |= cached_has_bits; + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void EcPoint::CopyFrom(const EcPoint& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:securegcm.EcPoint) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool EcPoint::IsInitialized() const { + if (_Internal::MissingRequiredFields(_has_bits_)) return false; + return true; +} + +void EcPoint::InternalSwap(EcPoint* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &x_, lhs_arena, + &other->x_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &y_, lhs_arena, + &other->y_, rhs_arena + ); + swap(curve_, other->curve_); +} + +std::string EcPoint::GetTypeName() const { + return "securegcm.EcPoint"; +} + + +// =================================================================== + +class SpakeHandshakeMessage::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_flow_number(HasBits* has_bits) { + (*has_bits)[0] |= 8u; + } + static const ::securegcm::EcPoint& ec_point(const SpakeHandshakeMessage* msg); + static void set_has_ec_point(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } + static void set_has_hash_value(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_payload(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } +}; + +const ::securegcm::EcPoint& +SpakeHandshakeMessage::_Internal::ec_point(const SpakeHandshakeMessage* msg) { + return *msg->ec_point_; +} +SpakeHandshakeMessage::SpakeHandshakeMessage(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:securegcm.SpakeHandshakeMessage) +} +SpakeHandshakeMessage::SpakeHandshakeMessage(const SpakeHandshakeMessage& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + hash_value_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + hash_value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_hash_value()) { + hash_value_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_hash_value(), + GetArenaForAllocation()); + } + payload_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + payload_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_payload()) { + payload_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_payload(), + GetArenaForAllocation()); + } + if (from._internal_has_ec_point()) { + ec_point_ = new ::securegcm::EcPoint(*from.ec_point_); + } else { + ec_point_ = nullptr; + } + flow_number_ = from.flow_number_; + // @@protoc_insertion_point(copy_constructor:securegcm.SpakeHandshakeMessage) +} + +inline void SpakeHandshakeMessage::SharedCtor() { +hash_value_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + hash_value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +payload_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + payload_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&ec_point_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&flow_number_) - + reinterpret_cast(&ec_point_)) + sizeof(flow_number_)); +} + +SpakeHandshakeMessage::~SpakeHandshakeMessage() { + // @@protoc_insertion_point(destructor:securegcm.SpakeHandshakeMessage) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void SpakeHandshakeMessage::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + hash_value_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + payload_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (this != internal_default_instance()) delete ec_point_; +} + +void SpakeHandshakeMessage::ArenaDtor(void* object) { + SpakeHandshakeMessage* _this = reinterpret_cast< SpakeHandshakeMessage* >(object); + (void)_this; +} +void SpakeHandshakeMessage::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void SpakeHandshakeMessage::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void SpakeHandshakeMessage::Clear() { +// @@protoc_insertion_point(message_clear_start:securegcm.SpakeHandshakeMessage) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + if (cached_has_bits & 0x00000001u) { + hash_value_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000002u) { + payload_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000004u) { + GOOGLE_DCHECK(ec_point_ != nullptr); + ec_point_->Clear(); + } + } + flow_number_ = 0; + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* SpakeHandshakeMessage::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional int32 flow_number = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + _Internal::set_has_flow_number(&has_bits); + flow_number_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .securegcm.EcPoint ec_point = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + ptr = ctx->ParseMessage(_internal_mutable_ec_point(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional bytes hash_value = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { + auto str = _internal_mutable_hash_value(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional bytes payload = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { + auto str = _internal_mutable_payload(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* SpakeHandshakeMessage::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:securegcm.SpakeHandshakeMessage) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional int32 flow_number = 1; + if (cached_has_bits & 0x00000008u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_flow_number(), target); + } + + // optional .securegcm.EcPoint ec_point = 2; + if (cached_has_bits & 0x00000004u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 2, _Internal::ec_point(this), target, stream); + } + + // optional bytes hash_value = 3; + if (cached_has_bits & 0x00000001u) { + target = stream->WriteBytesMaybeAliased( + 3, this->_internal_hash_value(), target); + } + + // optional bytes payload = 4; + if (cached_has_bits & 0x00000002u) { + target = stream->WriteBytesMaybeAliased( + 4, this->_internal_payload(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:securegcm.SpakeHandshakeMessage) + return target; +} + +size_t SpakeHandshakeMessage::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:securegcm.SpakeHandshakeMessage) + 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 = _has_bits_[0]; + if (cached_has_bits & 0x0000000fu) { + // optional bytes hash_value = 3; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_hash_value()); + } + + // optional bytes payload = 4; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_payload()); + } + + // optional .securegcm.EcPoint ec_point = 2; + if (cached_has_bits & 0x00000004u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *ec_point_); + } + + // optional int32 flow_number = 1; + if (cached_has_bits & 0x00000008u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_flow_number()); + } + + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void SpakeHandshakeMessage::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void SpakeHandshakeMessage::MergeFrom(const SpakeHandshakeMessage& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:securegcm.SpakeHandshakeMessage) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x0000000fu) { + if (cached_has_bits & 0x00000001u) { + _internal_set_hash_value(from._internal_hash_value()); + } + if (cached_has_bits & 0x00000002u) { + _internal_set_payload(from._internal_payload()); + } + if (cached_has_bits & 0x00000004u) { + _internal_mutable_ec_point()->::securegcm::EcPoint::MergeFrom(from._internal_ec_point()); + } + if (cached_has_bits & 0x00000008u) { + flow_number_ = from.flow_number_; + } + _has_bits_[0] |= cached_has_bits; + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void SpakeHandshakeMessage::CopyFrom(const SpakeHandshakeMessage& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:securegcm.SpakeHandshakeMessage) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool SpakeHandshakeMessage::IsInitialized() const { + if (_internal_has_ec_point()) { + if (!ec_point_->IsInitialized()) return false; + } + return true; +} + +void SpakeHandshakeMessage::InternalSwap(SpakeHandshakeMessage* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &hash_value_, lhs_arena, + &other->hash_value_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &payload_, lhs_arena, + &other->payload_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(SpakeHandshakeMessage, flow_number_) + + sizeof(SpakeHandshakeMessage::flow_number_) + - PROTOBUF_FIELD_OFFSET(SpakeHandshakeMessage, ec_point_)>( + reinterpret_cast(&ec_point_), + reinterpret_cast(&other->ec_point_)); +} + +std::string SpakeHandshakeMessage::GetTypeName() const { + return "securegcm.SpakeHandshakeMessage"; +} + + +// @@protoc_insertion_point(namespace_scope) +} // namespace securegcm +PROTOBUF_NAMESPACE_OPEN +template<> PROTOBUF_NOINLINE ::securegcm::DeviceToDeviceMessage* Arena::CreateMaybeMessage< ::securegcm::DeviceToDeviceMessage >(Arena* arena) { + return Arena::CreateMessageInternal< ::securegcm::DeviceToDeviceMessage >(arena); +} +template<> PROTOBUF_NOINLINE ::securegcm::InitiatorHello* Arena::CreateMaybeMessage< ::securegcm::InitiatorHello >(Arena* arena) { + return Arena::CreateMessageInternal< ::securegcm::InitiatorHello >(arena); +} +template<> PROTOBUF_NOINLINE ::securegcm::ResponderHello* Arena::CreateMaybeMessage< ::securegcm::ResponderHello >(Arena* arena) { + return Arena::CreateMessageInternal< ::securegcm::ResponderHello >(arena); +} +template<> PROTOBUF_NOINLINE ::securegcm::EcPoint* Arena::CreateMaybeMessage< ::securegcm::EcPoint >(Arena* arena) { + return Arena::CreateMessageInternal< ::securegcm::EcPoint >(arena); +} +template<> PROTOBUF_NOINLINE ::securegcm::SpakeHandshakeMessage* Arena::CreateMaybeMessage< ::securegcm::SpakeHandshakeMessage >(Arena* arena) { + return Arena::CreateMessageInternal< ::securegcm::SpakeHandshakeMessage >(arena); +} +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) +#include diff --git a/third_party/ukey2/compiled_proto/proto/device_to_device_messages.pb.h b/third_party/ukey2/compiled_proto/proto/device_to_device_messages.pb.h new file mode 100644 index 00000000..e6f048a6 --- /dev/null +++ b/third_party/ukey2/compiled_proto/proto/device_to_device_messages.pb.h @@ -0,0 +1,1776 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: proto/device_to_device_messages.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_proto_2fdevice_5fto_5fdevice_5fmessages_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_proto_2fdevice_5fto_5fdevice_5fmessages_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3019000 +#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 3019004 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +#include "securemessage.pb.h" +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_proto_2fdevice_5fto_5fdevice_5fmessages_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_proto_2fdevice_5fto_5fdevice_5fmessages_2eproto { + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::AuxiliaryParseTableField aux[] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[5] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[]; + static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[]; + static const uint32_t offsets[]; +}; +namespace securegcm { +class DeviceToDeviceMessage; +struct DeviceToDeviceMessageDefaultTypeInternal; +extern DeviceToDeviceMessageDefaultTypeInternal _DeviceToDeviceMessage_default_instance_; +class EcPoint; +struct EcPointDefaultTypeInternal; +extern EcPointDefaultTypeInternal _EcPoint_default_instance_; +class InitiatorHello; +struct InitiatorHelloDefaultTypeInternal; +extern InitiatorHelloDefaultTypeInternal _InitiatorHello_default_instance_; +class ResponderHello; +struct ResponderHelloDefaultTypeInternal; +extern ResponderHelloDefaultTypeInternal _ResponderHello_default_instance_; +class SpakeHandshakeMessage; +struct SpakeHandshakeMessageDefaultTypeInternal; +extern SpakeHandshakeMessageDefaultTypeInternal _SpakeHandshakeMessage_default_instance_; +} // namespace securegcm +PROTOBUF_NAMESPACE_OPEN +template<> ::securegcm::DeviceToDeviceMessage* Arena::CreateMaybeMessage<::securegcm::DeviceToDeviceMessage>(Arena*); +template<> ::securegcm::EcPoint* Arena::CreateMaybeMessage<::securegcm::EcPoint>(Arena*); +template<> ::securegcm::InitiatorHello* Arena::CreateMaybeMessage<::securegcm::InitiatorHello>(Arena*); +template<> ::securegcm::ResponderHello* Arena::CreateMaybeMessage<::securegcm::ResponderHello>(Arena*); +template<> ::securegcm::SpakeHandshakeMessage* Arena::CreateMaybeMessage<::securegcm::SpakeHandshakeMessage>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace securegcm { + +enum Curve : int { + ED_25519 = 1 +}; +bool Curve_IsValid(int value); +constexpr Curve Curve_MIN = ED_25519; +constexpr Curve Curve_MAX = ED_25519; +constexpr int Curve_ARRAYSIZE = Curve_MAX + 1; + +const std::string& Curve_Name(Curve value); +template +inline const std::string& Curve_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function Curve_Name."); + return Curve_Name(static_cast(enum_t_value)); +} +bool Curve_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, Curve* value); +// =================================================================== + +class DeviceToDeviceMessage final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:securegcm.DeviceToDeviceMessage) */ { + public: + inline DeviceToDeviceMessage() : DeviceToDeviceMessage(nullptr) {} + ~DeviceToDeviceMessage() override; + explicit constexpr DeviceToDeviceMessage(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + DeviceToDeviceMessage(const DeviceToDeviceMessage& from); + DeviceToDeviceMessage(DeviceToDeviceMessage&& from) noexcept + : DeviceToDeviceMessage() { + *this = ::std::move(from); + } + + inline DeviceToDeviceMessage& operator=(const DeviceToDeviceMessage& from) { + CopyFrom(from); + return *this; + } + inline DeviceToDeviceMessage& operator=(DeviceToDeviceMessage&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const DeviceToDeviceMessage& default_instance() { + return *internal_default_instance(); + } + static inline const DeviceToDeviceMessage* internal_default_instance() { + return reinterpret_cast( + &_DeviceToDeviceMessage_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(DeviceToDeviceMessage& a, DeviceToDeviceMessage& b) { + a.Swap(&b); + } + inline void Swap(DeviceToDeviceMessage* 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(DeviceToDeviceMessage* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + DeviceToDeviceMessage* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const DeviceToDeviceMessage& from); + void MergeFrom(const DeviceToDeviceMessage& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(DeviceToDeviceMessage* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "securegcm.DeviceToDeviceMessage"; + } + protected: + explicit DeviceToDeviceMessage(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kMessageFieldNumber = 1, + kSequenceNumberFieldNumber = 2, + }; + // optional bytes message = 1; + bool has_message() const; + private: + bool _internal_has_message() const; + public: + void clear_message(); + const std::string& message() const; + template + void set_message(ArgT0&& arg0, ArgT... args); + std::string* mutable_message(); + PROTOBUF_NODISCARD std::string* release_message(); + void set_allocated_message(std::string* message); + private: + const std::string& _internal_message() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_message(const std::string& value); + std::string* _internal_mutable_message(); + public: + + // optional int32 sequence_number = 2; + bool has_sequence_number() const; + private: + bool _internal_has_sequence_number() const; + public: + void clear_sequence_number(); + int32_t sequence_number() const; + void set_sequence_number(int32_t value); + private: + int32_t _internal_sequence_number() const; + void _internal_set_sequence_number(int32_t value); + public: + + // @@protoc_insertion_point(class_scope:securegcm.DeviceToDeviceMessage) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr message_; + int32_t sequence_number_; + friend struct ::TableStruct_proto_2fdevice_5fto_5fdevice_5fmessages_2eproto; +}; +// ------------------------------------------------------------------- + +class InitiatorHello final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:securegcm.InitiatorHello) */ { + public: + inline InitiatorHello() : InitiatorHello(nullptr) {} + ~InitiatorHello() override; + explicit constexpr InitiatorHello(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + InitiatorHello(const InitiatorHello& from); + InitiatorHello(InitiatorHello&& from) noexcept + : InitiatorHello() { + *this = ::std::move(from); + } + + inline InitiatorHello& operator=(const InitiatorHello& from) { + CopyFrom(from); + return *this; + } + inline InitiatorHello& operator=(InitiatorHello&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const InitiatorHello& default_instance() { + return *internal_default_instance(); + } + static inline const InitiatorHello* internal_default_instance() { + return reinterpret_cast( + &_InitiatorHello_default_instance_); + } + static constexpr int kIndexInFileMessages = + 1; + + friend void swap(InitiatorHello& a, InitiatorHello& b) { + a.Swap(&b); + } + inline void Swap(InitiatorHello* 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(InitiatorHello* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + InitiatorHello* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const InitiatorHello& from); + void MergeFrom(const InitiatorHello& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(InitiatorHello* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "securegcm.InitiatorHello"; + } + protected: + explicit InitiatorHello(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kPublicDhKeyFieldNumber = 1, + kProtocolVersionFieldNumber = 2, + }; + // optional .securemessage.GenericPublicKey public_dh_key = 1; + bool has_public_dh_key() const; + private: + bool _internal_has_public_dh_key() const; + public: + void clear_public_dh_key(); + const ::securemessage::GenericPublicKey& public_dh_key() const; + PROTOBUF_NODISCARD ::securemessage::GenericPublicKey* release_public_dh_key(); + ::securemessage::GenericPublicKey* mutable_public_dh_key(); + void set_allocated_public_dh_key(::securemessage::GenericPublicKey* public_dh_key); + private: + const ::securemessage::GenericPublicKey& _internal_public_dh_key() const; + ::securemessage::GenericPublicKey* _internal_mutable_public_dh_key(); + public: + void unsafe_arena_set_allocated_public_dh_key( + ::securemessage::GenericPublicKey* public_dh_key); + ::securemessage::GenericPublicKey* unsafe_arena_release_public_dh_key(); + + // optional int32 protocol_version = 2 [default = 0]; + bool has_protocol_version() const; + private: + bool _internal_has_protocol_version() const; + public: + void clear_protocol_version(); + int32_t protocol_version() const; + void set_protocol_version(int32_t value); + private: + int32_t _internal_protocol_version() const; + void _internal_set_protocol_version(int32_t value); + public: + + // @@protoc_insertion_point(class_scope:securegcm.InitiatorHello) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::securemessage::GenericPublicKey* public_dh_key_; + int32_t protocol_version_; + friend struct ::TableStruct_proto_2fdevice_5fto_5fdevice_5fmessages_2eproto; +}; +// ------------------------------------------------------------------- + +class ResponderHello final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:securegcm.ResponderHello) */ { + public: + inline ResponderHello() : ResponderHello(nullptr) {} + ~ResponderHello() override; + explicit constexpr ResponderHello(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ResponderHello(const ResponderHello& from); + ResponderHello(ResponderHello&& from) noexcept + : ResponderHello() { + *this = ::std::move(from); + } + + inline ResponderHello& operator=(const ResponderHello& from) { + CopyFrom(from); + return *this; + } + inline ResponderHello& operator=(ResponderHello&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const ResponderHello& default_instance() { + return *internal_default_instance(); + } + static inline const ResponderHello* internal_default_instance() { + return reinterpret_cast( + &_ResponderHello_default_instance_); + } + static constexpr int kIndexInFileMessages = + 2; + + friend void swap(ResponderHello& a, ResponderHello& b) { + a.Swap(&b); + } + inline void Swap(ResponderHello* 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(ResponderHello* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ResponderHello* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const ResponderHello& from); + void MergeFrom(const ResponderHello& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(ResponderHello* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "securegcm.ResponderHello"; + } + protected: + explicit ResponderHello(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kPublicDhKeyFieldNumber = 1, + kProtocolVersionFieldNumber = 2, + }; + // optional .securemessage.GenericPublicKey public_dh_key = 1; + bool has_public_dh_key() const; + private: + bool _internal_has_public_dh_key() const; + public: + void clear_public_dh_key(); + const ::securemessage::GenericPublicKey& public_dh_key() const; + PROTOBUF_NODISCARD ::securemessage::GenericPublicKey* release_public_dh_key(); + ::securemessage::GenericPublicKey* mutable_public_dh_key(); + void set_allocated_public_dh_key(::securemessage::GenericPublicKey* public_dh_key); + private: + const ::securemessage::GenericPublicKey& _internal_public_dh_key() const; + ::securemessage::GenericPublicKey* _internal_mutable_public_dh_key(); + public: + void unsafe_arena_set_allocated_public_dh_key( + ::securemessage::GenericPublicKey* public_dh_key); + ::securemessage::GenericPublicKey* unsafe_arena_release_public_dh_key(); + + // optional int32 protocol_version = 2 [default = 0]; + bool has_protocol_version() const; + private: + bool _internal_has_protocol_version() const; + public: + void clear_protocol_version(); + int32_t protocol_version() const; + void set_protocol_version(int32_t value); + private: + int32_t _internal_protocol_version() const; + void _internal_set_protocol_version(int32_t value); + public: + + // @@protoc_insertion_point(class_scope:securegcm.ResponderHello) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::securemessage::GenericPublicKey* public_dh_key_; + int32_t protocol_version_; + friend struct ::TableStruct_proto_2fdevice_5fto_5fdevice_5fmessages_2eproto; +}; +// ------------------------------------------------------------------- + +class EcPoint final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:securegcm.EcPoint) */ { + public: + inline EcPoint() : EcPoint(nullptr) {} + ~EcPoint() override; + explicit constexpr EcPoint(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + EcPoint(const EcPoint& from); + EcPoint(EcPoint&& from) noexcept + : EcPoint() { + *this = ::std::move(from); + } + + inline EcPoint& operator=(const EcPoint& from) { + CopyFrom(from); + return *this; + } + inline EcPoint& operator=(EcPoint&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const EcPoint& default_instance() { + return *internal_default_instance(); + } + static inline const EcPoint* internal_default_instance() { + return reinterpret_cast( + &_EcPoint_default_instance_); + } + static constexpr int kIndexInFileMessages = + 3; + + friend void swap(EcPoint& a, EcPoint& b) { + a.Swap(&b); + } + inline void Swap(EcPoint* 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(EcPoint* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + EcPoint* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const EcPoint& from); + void MergeFrom(const EcPoint& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(EcPoint* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "securegcm.EcPoint"; + } + protected: + explicit EcPoint(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kXFieldNumber = 2, + kYFieldNumber = 3, + kCurveFieldNumber = 1, + }; + // required bytes x = 2; + bool has_x() const; + private: + bool _internal_has_x() const; + public: + void clear_x(); + const std::string& x() const; + template + void set_x(ArgT0&& arg0, ArgT... args); + std::string* mutable_x(); + PROTOBUF_NODISCARD std::string* release_x(); + void set_allocated_x(std::string* x); + private: + const std::string& _internal_x() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_x(const std::string& value); + std::string* _internal_mutable_x(); + public: + + // required bytes y = 3; + bool has_y() const; + private: + bool _internal_has_y() const; + public: + void clear_y(); + const std::string& y() const; + template + void set_y(ArgT0&& arg0, ArgT... args); + std::string* mutable_y(); + PROTOBUF_NODISCARD std::string* release_y(); + void set_allocated_y(std::string* y); + private: + const std::string& _internal_y() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_y(const std::string& value); + std::string* _internal_mutable_y(); + public: + + // required .securegcm.Curve curve = 1; + bool has_curve() const; + private: + bool _internal_has_curve() const; + public: + void clear_curve(); + ::securegcm::Curve curve() const; + void set_curve(::securegcm::Curve value); + private: + ::securegcm::Curve _internal_curve() const; + void _internal_set_curve(::securegcm::Curve value); + public: + + // @@protoc_insertion_point(class_scope:securegcm.EcPoint) + private: + class _Internal; + + // helper for ByteSizeLong() + size_t RequiredFieldsByteSizeFallback() const; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr x_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr y_; + int curve_; + friend struct ::TableStruct_proto_2fdevice_5fto_5fdevice_5fmessages_2eproto; +}; +// ------------------------------------------------------------------- + +class SpakeHandshakeMessage final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:securegcm.SpakeHandshakeMessage) */ { + public: + inline SpakeHandshakeMessage() : SpakeHandshakeMessage(nullptr) {} + ~SpakeHandshakeMessage() override; + explicit constexpr SpakeHandshakeMessage(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + SpakeHandshakeMessage(const SpakeHandshakeMessage& from); + SpakeHandshakeMessage(SpakeHandshakeMessage&& from) noexcept + : SpakeHandshakeMessage() { + *this = ::std::move(from); + } + + inline SpakeHandshakeMessage& operator=(const SpakeHandshakeMessage& from) { + CopyFrom(from); + return *this; + } + inline SpakeHandshakeMessage& operator=(SpakeHandshakeMessage&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const SpakeHandshakeMessage& default_instance() { + return *internal_default_instance(); + } + static inline const SpakeHandshakeMessage* internal_default_instance() { + return reinterpret_cast( + &_SpakeHandshakeMessage_default_instance_); + } + static constexpr int kIndexInFileMessages = + 4; + + friend void swap(SpakeHandshakeMessage& a, SpakeHandshakeMessage& b) { + a.Swap(&b); + } + inline void Swap(SpakeHandshakeMessage* 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(SpakeHandshakeMessage* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + SpakeHandshakeMessage* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const SpakeHandshakeMessage& from); + void MergeFrom(const SpakeHandshakeMessage& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(SpakeHandshakeMessage* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "securegcm.SpakeHandshakeMessage"; + } + protected: + explicit SpakeHandshakeMessage(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kHashValueFieldNumber = 3, + kPayloadFieldNumber = 4, + kEcPointFieldNumber = 2, + kFlowNumberFieldNumber = 1, + }; + // optional bytes hash_value = 3; + bool has_hash_value() const; + private: + bool _internal_has_hash_value() const; + public: + void clear_hash_value(); + const std::string& hash_value() const; + template + void set_hash_value(ArgT0&& arg0, ArgT... args); + std::string* mutable_hash_value(); + PROTOBUF_NODISCARD std::string* release_hash_value(); + void set_allocated_hash_value(std::string* hash_value); + private: + const std::string& _internal_hash_value() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_hash_value(const std::string& value); + std::string* _internal_mutable_hash_value(); + public: + + // optional bytes payload = 4; + bool has_payload() const; + private: + bool _internal_has_payload() const; + public: + void clear_payload(); + const std::string& payload() const; + template + void set_payload(ArgT0&& arg0, ArgT... args); + std::string* mutable_payload(); + PROTOBUF_NODISCARD std::string* release_payload(); + void set_allocated_payload(std::string* payload); + private: + const std::string& _internal_payload() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_payload(const std::string& value); + std::string* _internal_mutable_payload(); + public: + + // optional .securegcm.EcPoint ec_point = 2; + bool has_ec_point() const; + private: + bool _internal_has_ec_point() const; + public: + void clear_ec_point(); + const ::securegcm::EcPoint& ec_point() const; + PROTOBUF_NODISCARD ::securegcm::EcPoint* release_ec_point(); + ::securegcm::EcPoint* mutable_ec_point(); + void set_allocated_ec_point(::securegcm::EcPoint* ec_point); + private: + const ::securegcm::EcPoint& _internal_ec_point() const; + ::securegcm::EcPoint* _internal_mutable_ec_point(); + public: + void unsafe_arena_set_allocated_ec_point( + ::securegcm::EcPoint* ec_point); + ::securegcm::EcPoint* unsafe_arena_release_ec_point(); + + // optional int32 flow_number = 1; + bool has_flow_number() const; + private: + bool _internal_has_flow_number() const; + public: + void clear_flow_number(); + int32_t flow_number() const; + void set_flow_number(int32_t value); + private: + int32_t _internal_flow_number() const; + void _internal_set_flow_number(int32_t value); + public: + + // @@protoc_insertion_point(class_scope:securegcm.SpakeHandshakeMessage) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr hash_value_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr payload_; + ::securegcm::EcPoint* ec_point_; + int32_t flow_number_; + friend struct ::TableStruct_proto_2fdevice_5fto_5fdevice_5fmessages_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// DeviceToDeviceMessage + +// optional bytes message = 1; +inline bool DeviceToDeviceMessage::_internal_has_message() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool DeviceToDeviceMessage::has_message() const { + return _internal_has_message(); +} +inline void DeviceToDeviceMessage::clear_message() { + message_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& DeviceToDeviceMessage::message() const { + // @@protoc_insertion_point(field_get:securegcm.DeviceToDeviceMessage.message) + return _internal_message(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void DeviceToDeviceMessage::set_message(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + message_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:securegcm.DeviceToDeviceMessage.message) +} +inline std::string* DeviceToDeviceMessage::mutable_message() { + std::string* _s = _internal_mutable_message(); + // @@protoc_insertion_point(field_mutable:securegcm.DeviceToDeviceMessage.message) + return _s; +} +inline const std::string& DeviceToDeviceMessage::_internal_message() const { + return message_.Get(); +} +inline void DeviceToDeviceMessage::_internal_set_message(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + message_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* DeviceToDeviceMessage::_internal_mutable_message() { + _has_bits_[0] |= 0x00000001u; + return message_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* DeviceToDeviceMessage::release_message() { + // @@protoc_insertion_point(field_release:securegcm.DeviceToDeviceMessage.message) + if (!_internal_has_message()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = message_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (message_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + message_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void DeviceToDeviceMessage::set_allocated_message(std::string* message) { + if (message != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + message_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), message, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (message_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + message_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:securegcm.DeviceToDeviceMessage.message) +} + +// optional int32 sequence_number = 2; +inline bool DeviceToDeviceMessage::_internal_has_sequence_number() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool DeviceToDeviceMessage::has_sequence_number() const { + return _internal_has_sequence_number(); +} +inline void DeviceToDeviceMessage::clear_sequence_number() { + sequence_number_ = 0; + _has_bits_[0] &= ~0x00000002u; +} +inline int32_t DeviceToDeviceMessage::_internal_sequence_number() const { + return sequence_number_; +} +inline int32_t DeviceToDeviceMessage::sequence_number() const { + // @@protoc_insertion_point(field_get:securegcm.DeviceToDeviceMessage.sequence_number) + return _internal_sequence_number(); +} +inline void DeviceToDeviceMessage::_internal_set_sequence_number(int32_t value) { + _has_bits_[0] |= 0x00000002u; + sequence_number_ = value; +} +inline void DeviceToDeviceMessage::set_sequence_number(int32_t value) { + _internal_set_sequence_number(value); + // @@protoc_insertion_point(field_set:securegcm.DeviceToDeviceMessage.sequence_number) +} + +// ------------------------------------------------------------------- + +// InitiatorHello + +// optional .securemessage.GenericPublicKey public_dh_key = 1; +inline bool InitiatorHello::_internal_has_public_dh_key() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + PROTOBUF_ASSUME(!value || public_dh_key_ != nullptr); + return value; +} +inline bool InitiatorHello::has_public_dh_key() const { + return _internal_has_public_dh_key(); +} +inline const ::securemessage::GenericPublicKey& InitiatorHello::_internal_public_dh_key() const { + const ::securemessage::GenericPublicKey* p = public_dh_key_; + return p != nullptr ? *p : reinterpret_cast( + ::securemessage::_GenericPublicKey_default_instance_); +} +inline const ::securemessage::GenericPublicKey& InitiatorHello::public_dh_key() const { + // @@protoc_insertion_point(field_get:securegcm.InitiatorHello.public_dh_key) + return _internal_public_dh_key(); +} +inline void InitiatorHello::unsafe_arena_set_allocated_public_dh_key( + ::securemessage::GenericPublicKey* public_dh_key) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(public_dh_key_); + } + public_dh_key_ = public_dh_key; + if (public_dh_key) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:securegcm.InitiatorHello.public_dh_key) +} +inline ::securemessage::GenericPublicKey* InitiatorHello::release_public_dh_key() { + _has_bits_[0] &= ~0x00000001u; + ::securemessage::GenericPublicKey* temp = public_dh_key_; + public_dh_key_ = 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 ::securemessage::GenericPublicKey* InitiatorHello::unsafe_arena_release_public_dh_key() { + // @@protoc_insertion_point(field_release:securegcm.InitiatorHello.public_dh_key) + _has_bits_[0] &= ~0x00000001u; + ::securemessage::GenericPublicKey* temp = public_dh_key_; + public_dh_key_ = nullptr; + return temp; +} +inline ::securemessage::GenericPublicKey* InitiatorHello::_internal_mutable_public_dh_key() { + _has_bits_[0] |= 0x00000001u; + if (public_dh_key_ == nullptr) { + auto* p = CreateMaybeMessage<::securemessage::GenericPublicKey>(GetArenaForAllocation()); + public_dh_key_ = p; + } + return public_dh_key_; +} +inline ::securemessage::GenericPublicKey* InitiatorHello::mutable_public_dh_key() { + ::securemessage::GenericPublicKey* _msg = _internal_mutable_public_dh_key(); + // @@protoc_insertion_point(field_mutable:securegcm.InitiatorHello.public_dh_key) + return _msg; +} +inline void InitiatorHello::set_allocated_public_dh_key(::securemessage::GenericPublicKey* public_dh_key) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(public_dh_key_); + } + if (public_dh_key) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper< + ::PROTOBUF_NAMESPACE_ID::MessageLite>::GetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(public_dh_key)); + if (message_arena != submessage_arena) { + public_dh_key = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, public_dh_key, submessage_arena); + } + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + public_dh_key_ = public_dh_key; + // @@protoc_insertion_point(field_set_allocated:securegcm.InitiatorHello.public_dh_key) +} + +// optional int32 protocol_version = 2 [default = 0]; +inline bool InitiatorHello::_internal_has_protocol_version() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool InitiatorHello::has_protocol_version() const { + return _internal_has_protocol_version(); +} +inline void InitiatorHello::clear_protocol_version() { + protocol_version_ = 0; + _has_bits_[0] &= ~0x00000002u; +} +inline int32_t InitiatorHello::_internal_protocol_version() const { + return protocol_version_; +} +inline int32_t InitiatorHello::protocol_version() const { + // @@protoc_insertion_point(field_get:securegcm.InitiatorHello.protocol_version) + return _internal_protocol_version(); +} +inline void InitiatorHello::_internal_set_protocol_version(int32_t value) { + _has_bits_[0] |= 0x00000002u; + protocol_version_ = value; +} +inline void InitiatorHello::set_protocol_version(int32_t value) { + _internal_set_protocol_version(value); + // @@protoc_insertion_point(field_set:securegcm.InitiatorHello.protocol_version) +} + +// ------------------------------------------------------------------- + +// ResponderHello + +// optional .securemessage.GenericPublicKey public_dh_key = 1; +inline bool ResponderHello::_internal_has_public_dh_key() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + PROTOBUF_ASSUME(!value || public_dh_key_ != nullptr); + return value; +} +inline bool ResponderHello::has_public_dh_key() const { + return _internal_has_public_dh_key(); +} +inline const ::securemessage::GenericPublicKey& ResponderHello::_internal_public_dh_key() const { + const ::securemessage::GenericPublicKey* p = public_dh_key_; + return p != nullptr ? *p : reinterpret_cast( + ::securemessage::_GenericPublicKey_default_instance_); +} +inline const ::securemessage::GenericPublicKey& ResponderHello::public_dh_key() const { + // @@protoc_insertion_point(field_get:securegcm.ResponderHello.public_dh_key) + return _internal_public_dh_key(); +} +inline void ResponderHello::unsafe_arena_set_allocated_public_dh_key( + ::securemessage::GenericPublicKey* public_dh_key) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(public_dh_key_); + } + public_dh_key_ = public_dh_key; + if (public_dh_key) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:securegcm.ResponderHello.public_dh_key) +} +inline ::securemessage::GenericPublicKey* ResponderHello::release_public_dh_key() { + _has_bits_[0] &= ~0x00000001u; + ::securemessage::GenericPublicKey* temp = public_dh_key_; + public_dh_key_ = 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 ::securemessage::GenericPublicKey* ResponderHello::unsafe_arena_release_public_dh_key() { + // @@protoc_insertion_point(field_release:securegcm.ResponderHello.public_dh_key) + _has_bits_[0] &= ~0x00000001u; + ::securemessage::GenericPublicKey* temp = public_dh_key_; + public_dh_key_ = nullptr; + return temp; +} +inline ::securemessage::GenericPublicKey* ResponderHello::_internal_mutable_public_dh_key() { + _has_bits_[0] |= 0x00000001u; + if (public_dh_key_ == nullptr) { + auto* p = CreateMaybeMessage<::securemessage::GenericPublicKey>(GetArenaForAllocation()); + public_dh_key_ = p; + } + return public_dh_key_; +} +inline ::securemessage::GenericPublicKey* ResponderHello::mutable_public_dh_key() { + ::securemessage::GenericPublicKey* _msg = _internal_mutable_public_dh_key(); + // @@protoc_insertion_point(field_mutable:securegcm.ResponderHello.public_dh_key) + return _msg; +} +inline void ResponderHello::set_allocated_public_dh_key(::securemessage::GenericPublicKey* public_dh_key) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(public_dh_key_); + } + if (public_dh_key) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper< + ::PROTOBUF_NAMESPACE_ID::MessageLite>::GetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(public_dh_key)); + if (message_arena != submessage_arena) { + public_dh_key = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, public_dh_key, submessage_arena); + } + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + public_dh_key_ = public_dh_key; + // @@protoc_insertion_point(field_set_allocated:securegcm.ResponderHello.public_dh_key) +} + +// optional int32 protocol_version = 2 [default = 0]; +inline bool ResponderHello::_internal_has_protocol_version() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool ResponderHello::has_protocol_version() const { + return _internal_has_protocol_version(); +} +inline void ResponderHello::clear_protocol_version() { + protocol_version_ = 0; + _has_bits_[0] &= ~0x00000002u; +} +inline int32_t ResponderHello::_internal_protocol_version() const { + return protocol_version_; +} +inline int32_t ResponderHello::protocol_version() const { + // @@protoc_insertion_point(field_get:securegcm.ResponderHello.protocol_version) + return _internal_protocol_version(); +} +inline void ResponderHello::_internal_set_protocol_version(int32_t value) { + _has_bits_[0] |= 0x00000002u; + protocol_version_ = value; +} +inline void ResponderHello::set_protocol_version(int32_t value) { + _internal_set_protocol_version(value); + // @@protoc_insertion_point(field_set:securegcm.ResponderHello.protocol_version) +} + +// ------------------------------------------------------------------- + +// EcPoint + +// required .securegcm.Curve curve = 1; +inline bool EcPoint::_internal_has_curve() const { + bool value = (_has_bits_[0] & 0x00000004u) != 0; + return value; +} +inline bool EcPoint::has_curve() const { + return _internal_has_curve(); +} +inline void EcPoint::clear_curve() { + curve_ = 1; + _has_bits_[0] &= ~0x00000004u; +} +inline ::securegcm::Curve EcPoint::_internal_curve() const { + return static_cast< ::securegcm::Curve >(curve_); +} +inline ::securegcm::Curve EcPoint::curve() const { + // @@protoc_insertion_point(field_get:securegcm.EcPoint.curve) + return _internal_curve(); +} +inline void EcPoint::_internal_set_curve(::securegcm::Curve value) { + assert(::securegcm::Curve_IsValid(value)); + _has_bits_[0] |= 0x00000004u; + curve_ = value; +} +inline void EcPoint::set_curve(::securegcm::Curve value) { + _internal_set_curve(value); + // @@protoc_insertion_point(field_set:securegcm.EcPoint.curve) +} + +// required bytes x = 2; +inline bool EcPoint::_internal_has_x() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool EcPoint::has_x() const { + return _internal_has_x(); +} +inline void EcPoint::clear_x() { + x_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& EcPoint::x() const { + // @@protoc_insertion_point(field_get:securegcm.EcPoint.x) + return _internal_x(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void EcPoint::set_x(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + x_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:securegcm.EcPoint.x) +} +inline std::string* EcPoint::mutable_x() { + std::string* _s = _internal_mutable_x(); + // @@protoc_insertion_point(field_mutable:securegcm.EcPoint.x) + return _s; +} +inline const std::string& EcPoint::_internal_x() const { + return x_.Get(); +} +inline void EcPoint::_internal_set_x(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + x_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* EcPoint::_internal_mutable_x() { + _has_bits_[0] |= 0x00000001u; + return x_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* EcPoint::release_x() { + // @@protoc_insertion_point(field_release:securegcm.EcPoint.x) + if (!_internal_has_x()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = x_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (x_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + x_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void EcPoint::set_allocated_x(std::string* x) { + if (x != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + x_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), x, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (x_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + x_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:securegcm.EcPoint.x) +} + +// required bytes y = 3; +inline bool EcPoint::_internal_has_y() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool EcPoint::has_y() const { + return _internal_has_y(); +} +inline void EcPoint::clear_y() { + y_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000002u; +} +inline const std::string& EcPoint::y() const { + // @@protoc_insertion_point(field_get:securegcm.EcPoint.y) + return _internal_y(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void EcPoint::set_y(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000002u; + y_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:securegcm.EcPoint.y) +} +inline std::string* EcPoint::mutable_y() { + std::string* _s = _internal_mutable_y(); + // @@protoc_insertion_point(field_mutable:securegcm.EcPoint.y) + return _s; +} +inline const std::string& EcPoint::_internal_y() const { + return y_.Get(); +} +inline void EcPoint::_internal_set_y(const std::string& value) { + _has_bits_[0] |= 0x00000002u; + y_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* EcPoint::_internal_mutable_y() { + _has_bits_[0] |= 0x00000002u; + return y_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* EcPoint::release_y() { + // @@protoc_insertion_point(field_release:securegcm.EcPoint.y) + if (!_internal_has_y()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000002u; + auto* p = y_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (y_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + y_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void EcPoint::set_allocated_y(std::string* y) { + if (y != nullptr) { + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + y_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), y, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (y_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + y_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:securegcm.EcPoint.y) +} + +// ------------------------------------------------------------------- + +// SpakeHandshakeMessage + +// optional int32 flow_number = 1; +inline bool SpakeHandshakeMessage::_internal_has_flow_number() const { + bool value = (_has_bits_[0] & 0x00000008u) != 0; + return value; +} +inline bool SpakeHandshakeMessage::has_flow_number() const { + return _internal_has_flow_number(); +} +inline void SpakeHandshakeMessage::clear_flow_number() { + flow_number_ = 0; + _has_bits_[0] &= ~0x00000008u; +} +inline int32_t SpakeHandshakeMessage::_internal_flow_number() const { + return flow_number_; +} +inline int32_t SpakeHandshakeMessage::flow_number() const { + // @@protoc_insertion_point(field_get:securegcm.SpakeHandshakeMessage.flow_number) + return _internal_flow_number(); +} +inline void SpakeHandshakeMessage::_internal_set_flow_number(int32_t value) { + _has_bits_[0] |= 0x00000008u; + flow_number_ = value; +} +inline void SpakeHandshakeMessage::set_flow_number(int32_t value) { + _internal_set_flow_number(value); + // @@protoc_insertion_point(field_set:securegcm.SpakeHandshakeMessage.flow_number) +} + +// optional .securegcm.EcPoint ec_point = 2; +inline bool SpakeHandshakeMessage::_internal_has_ec_point() const { + bool value = (_has_bits_[0] & 0x00000004u) != 0; + PROTOBUF_ASSUME(!value || ec_point_ != nullptr); + return value; +} +inline bool SpakeHandshakeMessage::has_ec_point() const { + return _internal_has_ec_point(); +} +inline void SpakeHandshakeMessage::clear_ec_point() { + if (ec_point_ != nullptr) ec_point_->Clear(); + _has_bits_[0] &= ~0x00000004u; +} +inline const ::securegcm::EcPoint& SpakeHandshakeMessage::_internal_ec_point() const { + const ::securegcm::EcPoint* p = ec_point_; + return p != nullptr ? *p : reinterpret_cast( + ::securegcm::_EcPoint_default_instance_); +} +inline const ::securegcm::EcPoint& SpakeHandshakeMessage::ec_point() const { + // @@protoc_insertion_point(field_get:securegcm.SpakeHandshakeMessage.ec_point) + return _internal_ec_point(); +} +inline void SpakeHandshakeMessage::unsafe_arena_set_allocated_ec_point( + ::securegcm::EcPoint* ec_point) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(ec_point_); + } + ec_point_ = ec_point; + if (ec_point) { + _has_bits_[0] |= 0x00000004u; + } else { + _has_bits_[0] &= ~0x00000004u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:securegcm.SpakeHandshakeMessage.ec_point) +} +inline ::securegcm::EcPoint* SpakeHandshakeMessage::release_ec_point() { + _has_bits_[0] &= ~0x00000004u; + ::securegcm::EcPoint* temp = ec_point_; + ec_point_ = 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 ::securegcm::EcPoint* SpakeHandshakeMessage::unsafe_arena_release_ec_point() { + // @@protoc_insertion_point(field_release:securegcm.SpakeHandshakeMessage.ec_point) + _has_bits_[0] &= ~0x00000004u; + ::securegcm::EcPoint* temp = ec_point_; + ec_point_ = nullptr; + return temp; +} +inline ::securegcm::EcPoint* SpakeHandshakeMessage::_internal_mutable_ec_point() { + _has_bits_[0] |= 0x00000004u; + if (ec_point_ == nullptr) { + auto* p = CreateMaybeMessage<::securegcm::EcPoint>(GetArenaForAllocation()); + ec_point_ = p; + } + return ec_point_; +} +inline ::securegcm::EcPoint* SpakeHandshakeMessage::mutable_ec_point() { + ::securegcm::EcPoint* _msg = _internal_mutable_ec_point(); + // @@protoc_insertion_point(field_mutable:securegcm.SpakeHandshakeMessage.ec_point) + return _msg; +} +inline void SpakeHandshakeMessage::set_allocated_ec_point(::securegcm::EcPoint* ec_point) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete ec_point_; + } + if (ec_point) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::securegcm::EcPoint>::GetOwningArena(ec_point); + if (message_arena != submessage_arena) { + ec_point = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, ec_point, submessage_arena); + } + _has_bits_[0] |= 0x00000004u; + } else { + _has_bits_[0] &= ~0x00000004u; + } + ec_point_ = ec_point; + // @@protoc_insertion_point(field_set_allocated:securegcm.SpakeHandshakeMessage.ec_point) +} + +// optional bytes hash_value = 3; +inline bool SpakeHandshakeMessage::_internal_has_hash_value() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool SpakeHandshakeMessage::has_hash_value() const { + return _internal_has_hash_value(); +} +inline void SpakeHandshakeMessage::clear_hash_value() { + hash_value_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& SpakeHandshakeMessage::hash_value() const { + // @@protoc_insertion_point(field_get:securegcm.SpakeHandshakeMessage.hash_value) + return _internal_hash_value(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void SpakeHandshakeMessage::set_hash_value(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + hash_value_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:securegcm.SpakeHandshakeMessage.hash_value) +} +inline std::string* SpakeHandshakeMessage::mutable_hash_value() { + std::string* _s = _internal_mutable_hash_value(); + // @@protoc_insertion_point(field_mutable:securegcm.SpakeHandshakeMessage.hash_value) + return _s; +} +inline const std::string& SpakeHandshakeMessage::_internal_hash_value() const { + return hash_value_.Get(); +} +inline void SpakeHandshakeMessage::_internal_set_hash_value(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + hash_value_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* SpakeHandshakeMessage::_internal_mutable_hash_value() { + _has_bits_[0] |= 0x00000001u; + return hash_value_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* SpakeHandshakeMessage::release_hash_value() { + // @@protoc_insertion_point(field_release:securegcm.SpakeHandshakeMessage.hash_value) + if (!_internal_has_hash_value()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = hash_value_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (hash_value_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + hash_value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void SpakeHandshakeMessage::set_allocated_hash_value(std::string* hash_value) { + if (hash_value != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + hash_value_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), hash_value, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (hash_value_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + hash_value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:securegcm.SpakeHandshakeMessage.hash_value) +} + +// optional bytes payload = 4; +inline bool SpakeHandshakeMessage::_internal_has_payload() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool SpakeHandshakeMessage::has_payload() const { + return _internal_has_payload(); +} +inline void SpakeHandshakeMessage::clear_payload() { + payload_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000002u; +} +inline const std::string& SpakeHandshakeMessage::payload() const { + // @@protoc_insertion_point(field_get:securegcm.SpakeHandshakeMessage.payload) + return _internal_payload(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void SpakeHandshakeMessage::set_payload(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000002u; + payload_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:securegcm.SpakeHandshakeMessage.payload) +} +inline std::string* SpakeHandshakeMessage::mutable_payload() { + std::string* _s = _internal_mutable_payload(); + // @@protoc_insertion_point(field_mutable:securegcm.SpakeHandshakeMessage.payload) + return _s; +} +inline const std::string& SpakeHandshakeMessage::_internal_payload() const { + return payload_.Get(); +} +inline void SpakeHandshakeMessage::_internal_set_payload(const std::string& value) { + _has_bits_[0] |= 0x00000002u; + payload_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* SpakeHandshakeMessage::_internal_mutable_payload() { + _has_bits_[0] |= 0x00000002u; + return payload_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* SpakeHandshakeMessage::release_payload() { + // @@protoc_insertion_point(field_release:securegcm.SpakeHandshakeMessage.payload) + if (!_internal_has_payload()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000002u; + auto* p = payload_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (payload_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + payload_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void SpakeHandshakeMessage::set_allocated_payload(std::string* payload) { + if (payload != nullptr) { + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + payload_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), payload, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (payload_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + payload_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:securegcm.SpakeHandshakeMessage.payload) +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace securegcm + +PROTOBUF_NAMESPACE_OPEN + +template <> struct is_proto_enum< ::securegcm::Curve> : ::std::true_type {}; + +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_proto_2fdevice_5fto_5fdevice_5fmessages_2eproto diff --git a/third_party/ukey2/compiled_proto/proto/passwordless_auth_payloads.pb.cc b/third_party/ukey2/compiled_proto/proto/passwordless_auth_payloads.pb.cc new file mode 100644 index 00000000..754a9d8b --- /dev/null +++ b/third_party/ukey2/compiled_proto/proto/passwordless_auth_payloads.pb.cc @@ -0,0 +1,328 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: proto/passwordless_auth_payloads.proto + +#include "proto/passwordless_auth_payloads.pb.h" + +#include + +#include +#include +#include +#include +// @@protoc_insertion_point(includes) +#include + +PROTOBUF_PRAGMA_INIT_SEG +namespace securegcm { +constexpr IdentityAssertion::IdentityAssertion( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : browser_data_hash_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , counter_(int64_t{0}) + , user_approval_(0){} +struct IdentityAssertionDefaultTypeInternal { + constexpr IdentityAssertionDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~IdentityAssertionDefaultTypeInternal() {} + union { + IdentityAssertion _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT IdentityAssertionDefaultTypeInternal _IdentityAssertion_default_instance_; +} // namespace securegcm +namespace securegcm { + +// =================================================================== + +class IdentityAssertion::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_browser_data_hash(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_counter(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static void set_has_user_approval(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } +}; + +IdentityAssertion::IdentityAssertion(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:securegcm.IdentityAssertion) +} +IdentityAssertion::IdentityAssertion(const IdentityAssertion& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + browser_data_hash_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + browser_data_hash_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_browser_data_hash()) { + browser_data_hash_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_browser_data_hash(), + GetArenaForAllocation()); + } + ::memcpy(&counter_, &from.counter_, + static_cast(reinterpret_cast(&user_approval_) - + reinterpret_cast(&counter_)) + sizeof(user_approval_)); + // @@protoc_insertion_point(copy_constructor:securegcm.IdentityAssertion) +} + +inline void IdentityAssertion::SharedCtor() { +browser_data_hash_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + browser_data_hash_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&counter_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&user_approval_) - + reinterpret_cast(&counter_)) + sizeof(user_approval_)); +} + +IdentityAssertion::~IdentityAssertion() { + // @@protoc_insertion_point(destructor:securegcm.IdentityAssertion) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void IdentityAssertion::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + browser_data_hash_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void IdentityAssertion::ArenaDtor(void* object) { + IdentityAssertion* _this = reinterpret_cast< IdentityAssertion* >(object); + (void)_this; +} +void IdentityAssertion::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void IdentityAssertion::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void IdentityAssertion::Clear() { +// @@protoc_insertion_point(message_clear_start:securegcm.IdentityAssertion) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + browser_data_hash_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000006u) { + ::memset(&counter_, 0, static_cast( + reinterpret_cast(&user_approval_) - + reinterpret_cast(&counter_)) + sizeof(user_approval_)); + } + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* IdentityAssertion::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional bytes browser_data_hash = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_browser_data_hash(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional int64 counter = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { + _Internal::set_has_counter(&has_bits); + counter_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional int32 user_approval = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { + _Internal::set_has_user_approval(&has_bits); + user_approval_ = ::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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* IdentityAssertion::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:securegcm.IdentityAssertion) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional bytes browser_data_hash = 1; + if (cached_has_bits & 0x00000001u) { + target = stream->WriteBytesMaybeAliased( + 1, this->_internal_browser_data_hash(), target); + } + + // optional int64 counter = 2; + if (cached_has_bits & 0x00000002u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(2, this->_internal_counter(), target); + } + + // optional int32 user_approval = 3; + if (cached_has_bits & 0x00000004u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(3, this->_internal_user_approval(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:securegcm.IdentityAssertion) + return target; +} + +size_t IdentityAssertion::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:securegcm.IdentityAssertion) + 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 = _has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + // optional bytes browser_data_hash = 1; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_browser_data_hash()); + } + + // optional int64 counter = 2; + if (cached_has_bits & 0x00000002u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_counter()); + } + + // optional int32 user_approval = 3; + if (cached_has_bits & 0x00000004u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_user_approval()); + } + + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void IdentityAssertion::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void IdentityAssertion::MergeFrom(const IdentityAssertion& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:securegcm.IdentityAssertion) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + if (cached_has_bits & 0x00000001u) { + _internal_set_browser_data_hash(from._internal_browser_data_hash()); + } + if (cached_has_bits & 0x00000002u) { + counter_ = from.counter_; + } + if (cached_has_bits & 0x00000004u) { + user_approval_ = from.user_approval_; + } + _has_bits_[0] |= cached_has_bits; + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void IdentityAssertion::CopyFrom(const IdentityAssertion& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:securegcm.IdentityAssertion) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool IdentityAssertion::IsInitialized() const { + return true; +} + +void IdentityAssertion::InternalSwap(IdentityAssertion* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &browser_data_hash_, lhs_arena, + &other->browser_data_hash_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(IdentityAssertion, user_approval_) + + sizeof(IdentityAssertion::user_approval_) + - PROTOBUF_FIELD_OFFSET(IdentityAssertion, counter_)>( + reinterpret_cast(&counter_), + reinterpret_cast(&other->counter_)); +} + +std::string IdentityAssertion::GetTypeName() const { + return "securegcm.IdentityAssertion"; +} + + +// @@protoc_insertion_point(namespace_scope) +} // namespace securegcm +PROTOBUF_NAMESPACE_OPEN +template<> PROTOBUF_NOINLINE ::securegcm::IdentityAssertion* Arena::CreateMaybeMessage< ::securegcm::IdentityAssertion >(Arena* arena) { + return Arena::CreateMessageInternal< ::securegcm::IdentityAssertion >(arena); +} +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) +#include diff --git a/third_party/ukey2/compiled_proto/proto/passwordless_auth_payloads.pb.h b/third_party/ukey2/compiled_proto/proto/passwordless_auth_payloads.pb.h new file mode 100644 index 00000000..46aa66b9 --- /dev/null +++ b/third_party/ukey2/compiled_proto/proto/passwordless_auth_payloads.pb.h @@ -0,0 +1,387 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: proto/passwordless_auth_payloads.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_proto_2fpasswordless_5fauth_5fpayloads_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_proto_2fpasswordless_5fauth_5fpayloads_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3019000 +#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 3019004 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_proto_2fpasswordless_5fauth_5fpayloads_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_proto_2fpasswordless_5fauth_5fpayloads_2eproto { + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::AuxiliaryParseTableField aux[] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[1] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[]; + static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[]; + static const uint32_t offsets[]; +}; +namespace securegcm { +class IdentityAssertion; +struct IdentityAssertionDefaultTypeInternal; +extern IdentityAssertionDefaultTypeInternal _IdentityAssertion_default_instance_; +} // namespace securegcm +PROTOBUF_NAMESPACE_OPEN +template<> ::securegcm::IdentityAssertion* Arena::CreateMaybeMessage<::securegcm::IdentityAssertion>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace securegcm { + +// =================================================================== + +class IdentityAssertion final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:securegcm.IdentityAssertion) */ { + public: + inline IdentityAssertion() : IdentityAssertion(nullptr) {} + ~IdentityAssertion() override; + explicit constexpr IdentityAssertion(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + IdentityAssertion(const IdentityAssertion& from); + IdentityAssertion(IdentityAssertion&& from) noexcept + : IdentityAssertion() { + *this = ::std::move(from); + } + + inline IdentityAssertion& operator=(const IdentityAssertion& from) { + CopyFrom(from); + return *this; + } + inline IdentityAssertion& operator=(IdentityAssertion&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const IdentityAssertion& default_instance() { + return *internal_default_instance(); + } + static inline const IdentityAssertion* internal_default_instance() { + return reinterpret_cast( + &_IdentityAssertion_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(IdentityAssertion& a, IdentityAssertion& b) { + a.Swap(&b); + } + inline void Swap(IdentityAssertion* 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(IdentityAssertion* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + IdentityAssertion* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const IdentityAssertion& from); + void MergeFrom(const IdentityAssertion& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(IdentityAssertion* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "securegcm.IdentityAssertion"; + } + protected: + explicit IdentityAssertion(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kBrowserDataHashFieldNumber = 1, + kCounterFieldNumber = 2, + kUserApprovalFieldNumber = 3, + }; + // optional bytes browser_data_hash = 1; + bool has_browser_data_hash() const; + private: + bool _internal_has_browser_data_hash() const; + public: + void clear_browser_data_hash(); + const std::string& browser_data_hash() const; + template + void set_browser_data_hash(ArgT0&& arg0, ArgT... args); + std::string* mutable_browser_data_hash(); + PROTOBUF_NODISCARD std::string* release_browser_data_hash(); + void set_allocated_browser_data_hash(std::string* browser_data_hash); + private: + const std::string& _internal_browser_data_hash() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_browser_data_hash(const std::string& value); + std::string* _internal_mutable_browser_data_hash(); + public: + + // optional int64 counter = 2; + bool has_counter() const; + private: + bool _internal_has_counter() const; + public: + void clear_counter(); + int64_t counter() const; + void set_counter(int64_t value); + private: + int64_t _internal_counter() const; + void _internal_set_counter(int64_t value); + public: + + // optional int32 user_approval = 3; + bool has_user_approval() const; + private: + bool _internal_has_user_approval() const; + public: + void clear_user_approval(); + int32_t user_approval() const; + void set_user_approval(int32_t value); + private: + int32_t _internal_user_approval() const; + void _internal_set_user_approval(int32_t value); + public: + + // @@protoc_insertion_point(class_scope:securegcm.IdentityAssertion) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr browser_data_hash_; + int64_t counter_; + int32_t user_approval_; + friend struct ::TableStruct_proto_2fpasswordless_5fauth_5fpayloads_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// IdentityAssertion + +// optional bytes browser_data_hash = 1; +inline bool IdentityAssertion::_internal_has_browser_data_hash() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool IdentityAssertion::has_browser_data_hash() const { + return _internal_has_browser_data_hash(); +} +inline void IdentityAssertion::clear_browser_data_hash() { + browser_data_hash_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& IdentityAssertion::browser_data_hash() const { + // @@protoc_insertion_point(field_get:securegcm.IdentityAssertion.browser_data_hash) + return _internal_browser_data_hash(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void IdentityAssertion::set_browser_data_hash(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + browser_data_hash_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:securegcm.IdentityAssertion.browser_data_hash) +} +inline std::string* IdentityAssertion::mutable_browser_data_hash() { + std::string* _s = _internal_mutable_browser_data_hash(); + // @@protoc_insertion_point(field_mutable:securegcm.IdentityAssertion.browser_data_hash) + return _s; +} +inline const std::string& IdentityAssertion::_internal_browser_data_hash() const { + return browser_data_hash_.Get(); +} +inline void IdentityAssertion::_internal_set_browser_data_hash(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + browser_data_hash_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* IdentityAssertion::_internal_mutable_browser_data_hash() { + _has_bits_[0] |= 0x00000001u; + return browser_data_hash_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* IdentityAssertion::release_browser_data_hash() { + // @@protoc_insertion_point(field_release:securegcm.IdentityAssertion.browser_data_hash) + if (!_internal_has_browser_data_hash()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = browser_data_hash_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (browser_data_hash_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + browser_data_hash_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void IdentityAssertion::set_allocated_browser_data_hash(std::string* browser_data_hash) { + if (browser_data_hash != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + browser_data_hash_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), browser_data_hash, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (browser_data_hash_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + browser_data_hash_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:securegcm.IdentityAssertion.browser_data_hash) +} + +// optional int64 counter = 2; +inline bool IdentityAssertion::_internal_has_counter() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool IdentityAssertion::has_counter() const { + return _internal_has_counter(); +} +inline void IdentityAssertion::clear_counter() { + counter_ = int64_t{0}; + _has_bits_[0] &= ~0x00000002u; +} +inline int64_t IdentityAssertion::_internal_counter() const { + return counter_; +} +inline int64_t IdentityAssertion::counter() const { + // @@protoc_insertion_point(field_get:securegcm.IdentityAssertion.counter) + return _internal_counter(); +} +inline void IdentityAssertion::_internal_set_counter(int64_t value) { + _has_bits_[0] |= 0x00000002u; + counter_ = value; +} +inline void IdentityAssertion::set_counter(int64_t value) { + _internal_set_counter(value); + // @@protoc_insertion_point(field_set:securegcm.IdentityAssertion.counter) +} + +// optional int32 user_approval = 3; +inline bool IdentityAssertion::_internal_has_user_approval() const { + bool value = (_has_bits_[0] & 0x00000004u) != 0; + return value; +} +inline bool IdentityAssertion::has_user_approval() const { + return _internal_has_user_approval(); +} +inline void IdentityAssertion::clear_user_approval() { + user_approval_ = 0; + _has_bits_[0] &= ~0x00000004u; +} +inline int32_t IdentityAssertion::_internal_user_approval() const { + return user_approval_; +} +inline int32_t IdentityAssertion::user_approval() const { + // @@protoc_insertion_point(field_get:securegcm.IdentityAssertion.user_approval) + return _internal_user_approval(); +} +inline void IdentityAssertion::_internal_set_user_approval(int32_t value) { + _has_bits_[0] |= 0x00000004u; + user_approval_ = value; +} +inline void IdentityAssertion::set_user_approval(int32_t value) { + _internal_set_user_approval(value); + // @@protoc_insertion_point(field_set:securegcm.IdentityAssertion.user_approval) +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ + +// @@protoc_insertion_point(namespace_scope) + +} // namespace securegcm + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_proto_2fpasswordless_5fauth_5fpayloads_2eproto diff --git a/third_party/ukey2/compiled_proto/proto/proximity_payloads.pb.cc b/third_party/ukey2/compiled_proto/proto/proximity_payloads.pb.cc new file mode 100644 index 00000000..2700dcd8 --- /dev/null +++ b/third_party/ukey2/compiled_proto/proto/proximity_payloads.pb.cc @@ -0,0 +1,716 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: proto/proximity_payloads.proto + +#include "proto/proximity_payloads.pb.h" + +#include + +#include +#include +#include +#include +// @@protoc_insertion_point(includes) +#include + +PROTOBUF_PRAGMA_INIT_SEG +namespace securegcm { +constexpr CloudToDeviceProximityAuthPairing::CloudToDeviceProximityAuthPairing( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : initiating_device_name_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , initiating_device_bt_address_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , ephemeral_symmetric_key_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , additional_metadata_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){} +struct CloudToDeviceProximityAuthPairingDefaultTypeInternal { + constexpr CloudToDeviceProximityAuthPairingDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~CloudToDeviceProximityAuthPairingDefaultTypeInternal() {} + union { + CloudToDeviceProximityAuthPairing _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT CloudToDeviceProximityAuthPairingDefaultTypeInternal _CloudToDeviceProximityAuthPairing_default_instance_; +constexpr DeviceProximityCallback::DeviceProximityCallback( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : callback_bluetooth_address_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , source_device_type_(0) + + , protocol_version_(0){} +struct DeviceProximityCallbackDefaultTypeInternal { + constexpr DeviceProximityCallbackDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~DeviceProximityCallbackDefaultTypeInternal() {} + union { + DeviceProximityCallback _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT DeviceProximityCallbackDefaultTypeInternal _DeviceProximityCallback_default_instance_; +} // namespace securegcm +namespace securegcm { + +// =================================================================== + +class CloudToDeviceProximityAuthPairing::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_initiating_device_name(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_initiating_device_bt_address(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static void set_has_ephemeral_symmetric_key(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } + static void set_has_additional_metadata(HasBits* has_bits) { + (*has_bits)[0] |= 8u; + } +}; + +CloudToDeviceProximityAuthPairing::CloudToDeviceProximityAuthPairing(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:securegcm.CloudToDeviceProximityAuthPairing) +} +CloudToDeviceProximityAuthPairing::CloudToDeviceProximityAuthPairing(const CloudToDeviceProximityAuthPairing& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + initiating_device_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + initiating_device_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_initiating_device_name()) { + initiating_device_name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_initiating_device_name(), + GetArenaForAllocation()); + } + initiating_device_bt_address_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + initiating_device_bt_address_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_initiating_device_bt_address()) { + initiating_device_bt_address_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_initiating_device_bt_address(), + GetArenaForAllocation()); + } + ephemeral_symmetric_key_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + ephemeral_symmetric_key_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_ephemeral_symmetric_key()) { + ephemeral_symmetric_key_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_ephemeral_symmetric_key(), + GetArenaForAllocation()); + } + additional_metadata_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + additional_metadata_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_additional_metadata()) { + additional_metadata_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_additional_metadata(), + GetArenaForAllocation()); + } + // @@protoc_insertion_point(copy_constructor:securegcm.CloudToDeviceProximityAuthPairing) +} + +inline void CloudToDeviceProximityAuthPairing::SharedCtor() { +initiating_device_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + initiating_device_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +initiating_device_bt_address_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + initiating_device_bt_address_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +ephemeral_symmetric_key_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + ephemeral_symmetric_key_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +additional_metadata_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + additional_metadata_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +CloudToDeviceProximityAuthPairing::~CloudToDeviceProximityAuthPairing() { + // @@protoc_insertion_point(destructor:securegcm.CloudToDeviceProximityAuthPairing) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void CloudToDeviceProximityAuthPairing::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + initiating_device_name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + initiating_device_bt_address_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + ephemeral_symmetric_key_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + additional_metadata_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void CloudToDeviceProximityAuthPairing::ArenaDtor(void* object) { + CloudToDeviceProximityAuthPairing* _this = reinterpret_cast< CloudToDeviceProximityAuthPairing* >(object); + (void)_this; +} +void CloudToDeviceProximityAuthPairing::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void CloudToDeviceProximityAuthPairing::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void CloudToDeviceProximityAuthPairing::Clear() { +// @@protoc_insertion_point(message_clear_start:securegcm.CloudToDeviceProximityAuthPairing) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x0000000fu) { + if (cached_has_bits & 0x00000001u) { + initiating_device_name_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000002u) { + initiating_device_bt_address_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000004u) { + ephemeral_symmetric_key_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000008u) { + additional_metadata_.ClearNonDefaultToEmpty(); + } + } + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* CloudToDeviceProximityAuthPairing::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional string initiating_device_name = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_initiating_device_name(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional string initiating_device_bt_address = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + auto str = _internal_mutable_initiating_device_bt_address(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional bytes ephemeral_symmetric_key = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { + auto str = _internal_mutable_ephemeral_symmetric_key(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional bytes additional_metadata = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { + auto str = _internal_mutable_additional_metadata(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* CloudToDeviceProximityAuthPairing::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:securegcm.CloudToDeviceProximityAuthPairing) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional string initiating_device_name = 1; + if (cached_has_bits & 0x00000001u) { + target = stream->WriteStringMaybeAliased( + 1, this->_internal_initiating_device_name(), target); + } + + // optional string initiating_device_bt_address = 2; + if (cached_has_bits & 0x00000002u) { + target = stream->WriteStringMaybeAliased( + 2, this->_internal_initiating_device_bt_address(), target); + } + + // optional bytes ephemeral_symmetric_key = 3; + if (cached_has_bits & 0x00000004u) { + target = stream->WriteBytesMaybeAliased( + 3, this->_internal_ephemeral_symmetric_key(), target); + } + + // optional bytes additional_metadata = 4; + if (cached_has_bits & 0x00000008u) { + target = stream->WriteBytesMaybeAliased( + 4, this->_internal_additional_metadata(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:securegcm.CloudToDeviceProximityAuthPairing) + return target; +} + +size_t CloudToDeviceProximityAuthPairing::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:securegcm.CloudToDeviceProximityAuthPairing) + 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 = _has_bits_[0]; + if (cached_has_bits & 0x0000000fu) { + // optional string initiating_device_name = 1; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_initiating_device_name()); + } + + // optional string initiating_device_bt_address = 2; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_initiating_device_bt_address()); + } + + // optional bytes ephemeral_symmetric_key = 3; + if (cached_has_bits & 0x00000004u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_ephemeral_symmetric_key()); + } + + // optional bytes additional_metadata = 4; + if (cached_has_bits & 0x00000008u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_additional_metadata()); + } + + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void CloudToDeviceProximityAuthPairing::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void CloudToDeviceProximityAuthPairing::MergeFrom(const CloudToDeviceProximityAuthPairing& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:securegcm.CloudToDeviceProximityAuthPairing) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x0000000fu) { + if (cached_has_bits & 0x00000001u) { + _internal_set_initiating_device_name(from._internal_initiating_device_name()); + } + if (cached_has_bits & 0x00000002u) { + _internal_set_initiating_device_bt_address(from._internal_initiating_device_bt_address()); + } + if (cached_has_bits & 0x00000004u) { + _internal_set_ephemeral_symmetric_key(from._internal_ephemeral_symmetric_key()); + } + if (cached_has_bits & 0x00000008u) { + _internal_set_additional_metadata(from._internal_additional_metadata()); + } + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void CloudToDeviceProximityAuthPairing::CopyFrom(const CloudToDeviceProximityAuthPairing& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:securegcm.CloudToDeviceProximityAuthPairing) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool CloudToDeviceProximityAuthPairing::IsInitialized() const { + return true; +} + +void CloudToDeviceProximityAuthPairing::InternalSwap(CloudToDeviceProximityAuthPairing* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &initiating_device_name_, lhs_arena, + &other->initiating_device_name_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &initiating_device_bt_address_, lhs_arena, + &other->initiating_device_bt_address_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &ephemeral_symmetric_key_, lhs_arena, + &other->ephemeral_symmetric_key_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &additional_metadata_, lhs_arena, + &other->additional_metadata_, rhs_arena + ); +} + +std::string CloudToDeviceProximityAuthPairing::GetTypeName() const { + return "securegcm.CloudToDeviceProximityAuthPairing"; +} + + +// =================================================================== + +class DeviceProximityCallback::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_callback_bluetooth_address(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_source_device_type(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static void set_has_protocol_version(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } +}; + +DeviceProximityCallback::DeviceProximityCallback(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:securegcm.DeviceProximityCallback) +} +DeviceProximityCallback::DeviceProximityCallback(const DeviceProximityCallback& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + callback_bluetooth_address_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + callback_bluetooth_address_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_callback_bluetooth_address()) { + callback_bluetooth_address_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_callback_bluetooth_address(), + GetArenaForAllocation()); + } + ::memcpy(&source_device_type_, &from.source_device_type_, + static_cast(reinterpret_cast(&protocol_version_) - + reinterpret_cast(&source_device_type_)) + sizeof(protocol_version_)); + // @@protoc_insertion_point(copy_constructor:securegcm.DeviceProximityCallback) +} + +inline void DeviceProximityCallback::SharedCtor() { +callback_bluetooth_address_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + callback_bluetooth_address_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&source_device_type_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&protocol_version_) - + reinterpret_cast(&source_device_type_)) + sizeof(protocol_version_)); +} + +DeviceProximityCallback::~DeviceProximityCallback() { + // @@protoc_insertion_point(destructor:securegcm.DeviceProximityCallback) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void DeviceProximityCallback::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + callback_bluetooth_address_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void DeviceProximityCallback::ArenaDtor(void* object) { + DeviceProximityCallback* _this = reinterpret_cast< DeviceProximityCallback* >(object); + (void)_this; +} +void DeviceProximityCallback::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void DeviceProximityCallback::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void DeviceProximityCallback::Clear() { +// @@protoc_insertion_point(message_clear_start:securegcm.DeviceProximityCallback) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + callback_bluetooth_address_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000006u) { + ::memset(&source_device_type_, 0, static_cast( + reinterpret_cast(&protocol_version_) - + reinterpret_cast(&source_device_type_)) + sizeof(protocol_version_)); + } + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* DeviceProximityCallback::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional string callback_bluetooth_address = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_callback_bluetooth_address(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .securegcm.DeviceType source_device_type = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::securegcm::DeviceType_IsValid(val))) { + _internal_set_source_device_type(static_cast<::securegcm::DeviceType>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(2, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // optional int32 protocol_version = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { + _Internal::set_has_protocol_version(&has_bits); + protocol_version_ = ::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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* DeviceProximityCallback::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:securegcm.DeviceProximityCallback) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional string callback_bluetooth_address = 1; + if (cached_has_bits & 0x00000001u) { + target = stream->WriteStringMaybeAliased( + 1, this->_internal_callback_bluetooth_address(), target); + } + + // optional .securegcm.DeviceType source_device_type = 2; + if (cached_has_bits & 0x00000002u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 2, this->_internal_source_device_type(), target); + } + + // optional int32 protocol_version = 3; + if (cached_has_bits & 0x00000004u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(3, this->_internal_protocol_version(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:securegcm.DeviceProximityCallback) + return target; +} + +size_t DeviceProximityCallback::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:securegcm.DeviceProximityCallback) + 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 = _has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + // optional string callback_bluetooth_address = 1; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_callback_bluetooth_address()); + } + + // optional .securegcm.DeviceType source_device_type = 2; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_source_device_type()); + } + + // optional int32 protocol_version = 3; + if (cached_has_bits & 0x00000004u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_protocol_version()); + } + + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void DeviceProximityCallback::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void DeviceProximityCallback::MergeFrom(const DeviceProximityCallback& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:securegcm.DeviceProximityCallback) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + if (cached_has_bits & 0x00000001u) { + _internal_set_callback_bluetooth_address(from._internal_callback_bluetooth_address()); + } + if (cached_has_bits & 0x00000002u) { + source_device_type_ = from.source_device_type_; + } + if (cached_has_bits & 0x00000004u) { + protocol_version_ = from.protocol_version_; + } + _has_bits_[0] |= cached_has_bits; + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void DeviceProximityCallback::CopyFrom(const DeviceProximityCallback& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:securegcm.DeviceProximityCallback) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool DeviceProximityCallback::IsInitialized() const { + return true; +} + +void DeviceProximityCallback::InternalSwap(DeviceProximityCallback* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &callback_bluetooth_address_, lhs_arena, + &other->callback_bluetooth_address_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(DeviceProximityCallback, protocol_version_) + + sizeof(DeviceProximityCallback::protocol_version_) + - PROTOBUF_FIELD_OFFSET(DeviceProximityCallback, source_device_type_)>( + reinterpret_cast(&source_device_type_), + reinterpret_cast(&other->source_device_type_)); +} + +std::string DeviceProximityCallback::GetTypeName() const { + return "securegcm.DeviceProximityCallback"; +} + + +// @@protoc_insertion_point(namespace_scope) +} // namespace securegcm +PROTOBUF_NAMESPACE_OPEN +template<> PROTOBUF_NOINLINE ::securegcm::CloudToDeviceProximityAuthPairing* Arena::CreateMaybeMessage< ::securegcm::CloudToDeviceProximityAuthPairing >(Arena* arena) { + return Arena::CreateMessageInternal< ::securegcm::CloudToDeviceProximityAuthPairing >(arena); +} +template<> PROTOBUF_NOINLINE ::securegcm::DeviceProximityCallback* Arena::CreateMaybeMessage< ::securegcm::DeviceProximityCallback >(Arena* arena) { + return Arena::CreateMessageInternal< ::securegcm::DeviceProximityCallback >(arena); +} +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) +#include diff --git a/third_party/ukey2/compiled_proto/proto/proximity_payloads.pb.h b/third_party/ukey2/compiled_proto/proto/proximity_payloads.pb.h new file mode 100644 index 00000000..f1a14b2e --- /dev/null +++ b/third_party/ukey2/compiled_proto/proto/proximity_payloads.pb.h @@ -0,0 +1,882 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: proto/proximity_payloads.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_proto_2fproximity_5fpayloads_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_proto_2fproximity_5fpayloads_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3019000 +#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 3019004 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include "securegcm.pb.h" +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_proto_2fproximity_5fpayloads_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_proto_2fproximity_5fpayloads_2eproto { + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::AuxiliaryParseTableField aux[] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[2] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[]; + static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[]; + static const uint32_t offsets[]; +}; +namespace securegcm { +class CloudToDeviceProximityAuthPairing; +struct CloudToDeviceProximityAuthPairingDefaultTypeInternal; +extern CloudToDeviceProximityAuthPairingDefaultTypeInternal _CloudToDeviceProximityAuthPairing_default_instance_; +class DeviceProximityCallback; +struct DeviceProximityCallbackDefaultTypeInternal; +extern DeviceProximityCallbackDefaultTypeInternal _DeviceProximityCallback_default_instance_; +} // namespace securegcm +PROTOBUF_NAMESPACE_OPEN +template<> ::securegcm::CloudToDeviceProximityAuthPairing* Arena::CreateMaybeMessage<::securegcm::CloudToDeviceProximityAuthPairing>(Arena*); +template<> ::securegcm::DeviceProximityCallback* Arena::CreateMaybeMessage<::securegcm::DeviceProximityCallback>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace securegcm { + +// =================================================================== + +class CloudToDeviceProximityAuthPairing final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:securegcm.CloudToDeviceProximityAuthPairing) */ { + public: + inline CloudToDeviceProximityAuthPairing() : CloudToDeviceProximityAuthPairing(nullptr) {} + ~CloudToDeviceProximityAuthPairing() override; + explicit constexpr CloudToDeviceProximityAuthPairing(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + CloudToDeviceProximityAuthPairing(const CloudToDeviceProximityAuthPairing& from); + CloudToDeviceProximityAuthPairing(CloudToDeviceProximityAuthPairing&& from) noexcept + : CloudToDeviceProximityAuthPairing() { + *this = ::std::move(from); + } + + inline CloudToDeviceProximityAuthPairing& operator=(const CloudToDeviceProximityAuthPairing& from) { + CopyFrom(from); + return *this; + } + inline CloudToDeviceProximityAuthPairing& operator=(CloudToDeviceProximityAuthPairing&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const CloudToDeviceProximityAuthPairing& default_instance() { + return *internal_default_instance(); + } + static inline const CloudToDeviceProximityAuthPairing* internal_default_instance() { + return reinterpret_cast( + &_CloudToDeviceProximityAuthPairing_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(CloudToDeviceProximityAuthPairing& a, CloudToDeviceProximityAuthPairing& b) { + a.Swap(&b); + } + inline void Swap(CloudToDeviceProximityAuthPairing* 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(CloudToDeviceProximityAuthPairing* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + CloudToDeviceProximityAuthPairing* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const CloudToDeviceProximityAuthPairing& from); + void MergeFrom(const CloudToDeviceProximityAuthPairing& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(CloudToDeviceProximityAuthPairing* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "securegcm.CloudToDeviceProximityAuthPairing"; + } + protected: + explicit CloudToDeviceProximityAuthPairing(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kInitiatingDeviceNameFieldNumber = 1, + kInitiatingDeviceBtAddressFieldNumber = 2, + kEphemeralSymmetricKeyFieldNumber = 3, + kAdditionalMetadataFieldNumber = 4, + }; + // optional string initiating_device_name = 1; + bool has_initiating_device_name() const; + private: + bool _internal_has_initiating_device_name() const; + public: + void clear_initiating_device_name(); + const std::string& initiating_device_name() const; + template + void set_initiating_device_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_initiating_device_name(); + PROTOBUF_NODISCARD std::string* release_initiating_device_name(); + void set_allocated_initiating_device_name(std::string* initiating_device_name); + private: + const std::string& _internal_initiating_device_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_initiating_device_name(const std::string& value); + std::string* _internal_mutable_initiating_device_name(); + public: + + // optional string initiating_device_bt_address = 2; + bool has_initiating_device_bt_address() const; + private: + bool _internal_has_initiating_device_bt_address() const; + public: + void clear_initiating_device_bt_address(); + const std::string& initiating_device_bt_address() const; + template + void set_initiating_device_bt_address(ArgT0&& arg0, ArgT... args); + std::string* mutable_initiating_device_bt_address(); + PROTOBUF_NODISCARD std::string* release_initiating_device_bt_address(); + void set_allocated_initiating_device_bt_address(std::string* initiating_device_bt_address); + private: + const std::string& _internal_initiating_device_bt_address() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_initiating_device_bt_address(const std::string& value); + std::string* _internal_mutable_initiating_device_bt_address(); + public: + + // optional bytes ephemeral_symmetric_key = 3; + bool has_ephemeral_symmetric_key() const; + private: + bool _internal_has_ephemeral_symmetric_key() const; + public: + void clear_ephemeral_symmetric_key(); + const std::string& ephemeral_symmetric_key() const; + template + void set_ephemeral_symmetric_key(ArgT0&& arg0, ArgT... args); + std::string* mutable_ephemeral_symmetric_key(); + PROTOBUF_NODISCARD std::string* release_ephemeral_symmetric_key(); + void set_allocated_ephemeral_symmetric_key(std::string* ephemeral_symmetric_key); + private: + const std::string& _internal_ephemeral_symmetric_key() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_ephemeral_symmetric_key(const std::string& value); + std::string* _internal_mutable_ephemeral_symmetric_key(); + public: + + // optional bytes additional_metadata = 4; + bool has_additional_metadata() const; + private: + bool _internal_has_additional_metadata() const; + public: + void clear_additional_metadata(); + const std::string& additional_metadata() const; + template + void set_additional_metadata(ArgT0&& arg0, ArgT... args); + std::string* mutable_additional_metadata(); + PROTOBUF_NODISCARD std::string* release_additional_metadata(); + void set_allocated_additional_metadata(std::string* additional_metadata); + private: + const std::string& _internal_additional_metadata() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_additional_metadata(const std::string& value); + std::string* _internal_mutable_additional_metadata(); + public: + + // @@protoc_insertion_point(class_scope:securegcm.CloudToDeviceProximityAuthPairing) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr initiating_device_name_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr initiating_device_bt_address_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr ephemeral_symmetric_key_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr additional_metadata_; + friend struct ::TableStruct_proto_2fproximity_5fpayloads_2eproto; +}; +// ------------------------------------------------------------------- + +class DeviceProximityCallback final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:securegcm.DeviceProximityCallback) */ { + public: + inline DeviceProximityCallback() : DeviceProximityCallback(nullptr) {} + ~DeviceProximityCallback() override; + explicit constexpr DeviceProximityCallback(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + DeviceProximityCallback(const DeviceProximityCallback& from); + DeviceProximityCallback(DeviceProximityCallback&& from) noexcept + : DeviceProximityCallback() { + *this = ::std::move(from); + } + + inline DeviceProximityCallback& operator=(const DeviceProximityCallback& from) { + CopyFrom(from); + return *this; + } + inline DeviceProximityCallback& operator=(DeviceProximityCallback&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const DeviceProximityCallback& default_instance() { + return *internal_default_instance(); + } + static inline const DeviceProximityCallback* internal_default_instance() { + return reinterpret_cast( + &_DeviceProximityCallback_default_instance_); + } + static constexpr int kIndexInFileMessages = + 1; + + friend void swap(DeviceProximityCallback& a, DeviceProximityCallback& b) { + a.Swap(&b); + } + inline void Swap(DeviceProximityCallback* 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(DeviceProximityCallback* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + DeviceProximityCallback* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const DeviceProximityCallback& from); + void MergeFrom(const DeviceProximityCallback& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(DeviceProximityCallback* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "securegcm.DeviceProximityCallback"; + } + protected: + explicit DeviceProximityCallback(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kCallbackBluetoothAddressFieldNumber = 1, + kSourceDeviceTypeFieldNumber = 2, + kProtocolVersionFieldNumber = 3, + }; + // optional string callback_bluetooth_address = 1; + bool has_callback_bluetooth_address() const; + private: + bool _internal_has_callback_bluetooth_address() const; + public: + void clear_callback_bluetooth_address(); + const std::string& callback_bluetooth_address() const; + template + void set_callback_bluetooth_address(ArgT0&& arg0, ArgT... args); + std::string* mutable_callback_bluetooth_address(); + PROTOBUF_NODISCARD std::string* release_callback_bluetooth_address(); + void set_allocated_callback_bluetooth_address(std::string* callback_bluetooth_address); + private: + const std::string& _internal_callback_bluetooth_address() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_callback_bluetooth_address(const std::string& value); + std::string* _internal_mutable_callback_bluetooth_address(); + public: + + // optional .securegcm.DeviceType source_device_type = 2; + bool has_source_device_type() const; + private: + bool _internal_has_source_device_type() const; + public: + void clear_source_device_type(); + ::securegcm::DeviceType source_device_type() const; + void set_source_device_type(::securegcm::DeviceType value); + private: + ::securegcm::DeviceType _internal_source_device_type() const; + void _internal_set_source_device_type(::securegcm::DeviceType value); + public: + + // optional int32 protocol_version = 3; + bool has_protocol_version() const; + private: + bool _internal_has_protocol_version() const; + public: + void clear_protocol_version(); + int32_t protocol_version() const; + void set_protocol_version(int32_t value); + private: + int32_t _internal_protocol_version() const; + void _internal_set_protocol_version(int32_t value); + public: + + // @@protoc_insertion_point(class_scope:securegcm.DeviceProximityCallback) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr callback_bluetooth_address_; + int source_device_type_; + int32_t protocol_version_; + friend struct ::TableStruct_proto_2fproximity_5fpayloads_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// CloudToDeviceProximityAuthPairing + +// optional string initiating_device_name = 1; +inline bool CloudToDeviceProximityAuthPairing::_internal_has_initiating_device_name() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool CloudToDeviceProximityAuthPairing::has_initiating_device_name() const { + return _internal_has_initiating_device_name(); +} +inline void CloudToDeviceProximityAuthPairing::clear_initiating_device_name() { + initiating_device_name_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& CloudToDeviceProximityAuthPairing::initiating_device_name() const { + // @@protoc_insertion_point(field_get:securegcm.CloudToDeviceProximityAuthPairing.initiating_device_name) + return _internal_initiating_device_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void CloudToDeviceProximityAuthPairing::set_initiating_device_name(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + initiating_device_name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:securegcm.CloudToDeviceProximityAuthPairing.initiating_device_name) +} +inline std::string* CloudToDeviceProximityAuthPairing::mutable_initiating_device_name() { + std::string* _s = _internal_mutable_initiating_device_name(); + // @@protoc_insertion_point(field_mutable:securegcm.CloudToDeviceProximityAuthPairing.initiating_device_name) + return _s; +} +inline const std::string& CloudToDeviceProximityAuthPairing::_internal_initiating_device_name() const { + return initiating_device_name_.Get(); +} +inline void CloudToDeviceProximityAuthPairing::_internal_set_initiating_device_name(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + initiating_device_name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* CloudToDeviceProximityAuthPairing::_internal_mutable_initiating_device_name() { + _has_bits_[0] |= 0x00000001u; + return initiating_device_name_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* CloudToDeviceProximityAuthPairing::release_initiating_device_name() { + // @@protoc_insertion_point(field_release:securegcm.CloudToDeviceProximityAuthPairing.initiating_device_name) + if (!_internal_has_initiating_device_name()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = initiating_device_name_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (initiating_device_name_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + initiating_device_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void CloudToDeviceProximityAuthPairing::set_allocated_initiating_device_name(std::string* initiating_device_name) { + if (initiating_device_name != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + initiating_device_name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), initiating_device_name, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (initiating_device_name_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + initiating_device_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:securegcm.CloudToDeviceProximityAuthPairing.initiating_device_name) +} + +// optional string initiating_device_bt_address = 2; +inline bool CloudToDeviceProximityAuthPairing::_internal_has_initiating_device_bt_address() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool CloudToDeviceProximityAuthPairing::has_initiating_device_bt_address() const { + return _internal_has_initiating_device_bt_address(); +} +inline void CloudToDeviceProximityAuthPairing::clear_initiating_device_bt_address() { + initiating_device_bt_address_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000002u; +} +inline const std::string& CloudToDeviceProximityAuthPairing::initiating_device_bt_address() const { + // @@protoc_insertion_point(field_get:securegcm.CloudToDeviceProximityAuthPairing.initiating_device_bt_address) + return _internal_initiating_device_bt_address(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void CloudToDeviceProximityAuthPairing::set_initiating_device_bt_address(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000002u; + initiating_device_bt_address_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:securegcm.CloudToDeviceProximityAuthPairing.initiating_device_bt_address) +} +inline std::string* CloudToDeviceProximityAuthPairing::mutable_initiating_device_bt_address() { + std::string* _s = _internal_mutable_initiating_device_bt_address(); + // @@protoc_insertion_point(field_mutable:securegcm.CloudToDeviceProximityAuthPairing.initiating_device_bt_address) + return _s; +} +inline const std::string& CloudToDeviceProximityAuthPairing::_internal_initiating_device_bt_address() const { + return initiating_device_bt_address_.Get(); +} +inline void CloudToDeviceProximityAuthPairing::_internal_set_initiating_device_bt_address(const std::string& value) { + _has_bits_[0] |= 0x00000002u; + initiating_device_bt_address_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* CloudToDeviceProximityAuthPairing::_internal_mutable_initiating_device_bt_address() { + _has_bits_[0] |= 0x00000002u; + return initiating_device_bt_address_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* CloudToDeviceProximityAuthPairing::release_initiating_device_bt_address() { + // @@protoc_insertion_point(field_release:securegcm.CloudToDeviceProximityAuthPairing.initiating_device_bt_address) + if (!_internal_has_initiating_device_bt_address()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000002u; + auto* p = initiating_device_bt_address_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (initiating_device_bt_address_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + initiating_device_bt_address_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void CloudToDeviceProximityAuthPairing::set_allocated_initiating_device_bt_address(std::string* initiating_device_bt_address) { + if (initiating_device_bt_address != nullptr) { + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + initiating_device_bt_address_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), initiating_device_bt_address, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (initiating_device_bt_address_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + initiating_device_bt_address_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:securegcm.CloudToDeviceProximityAuthPairing.initiating_device_bt_address) +} + +// optional bytes ephemeral_symmetric_key = 3; +inline bool CloudToDeviceProximityAuthPairing::_internal_has_ephemeral_symmetric_key() const { + bool value = (_has_bits_[0] & 0x00000004u) != 0; + return value; +} +inline bool CloudToDeviceProximityAuthPairing::has_ephemeral_symmetric_key() const { + return _internal_has_ephemeral_symmetric_key(); +} +inline void CloudToDeviceProximityAuthPairing::clear_ephemeral_symmetric_key() { + ephemeral_symmetric_key_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000004u; +} +inline const std::string& CloudToDeviceProximityAuthPairing::ephemeral_symmetric_key() const { + // @@protoc_insertion_point(field_get:securegcm.CloudToDeviceProximityAuthPairing.ephemeral_symmetric_key) + return _internal_ephemeral_symmetric_key(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void CloudToDeviceProximityAuthPairing::set_ephemeral_symmetric_key(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000004u; + ephemeral_symmetric_key_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:securegcm.CloudToDeviceProximityAuthPairing.ephemeral_symmetric_key) +} +inline std::string* CloudToDeviceProximityAuthPairing::mutable_ephemeral_symmetric_key() { + std::string* _s = _internal_mutable_ephemeral_symmetric_key(); + // @@protoc_insertion_point(field_mutable:securegcm.CloudToDeviceProximityAuthPairing.ephemeral_symmetric_key) + return _s; +} +inline const std::string& CloudToDeviceProximityAuthPairing::_internal_ephemeral_symmetric_key() const { + return ephemeral_symmetric_key_.Get(); +} +inline void CloudToDeviceProximityAuthPairing::_internal_set_ephemeral_symmetric_key(const std::string& value) { + _has_bits_[0] |= 0x00000004u; + ephemeral_symmetric_key_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* CloudToDeviceProximityAuthPairing::_internal_mutable_ephemeral_symmetric_key() { + _has_bits_[0] |= 0x00000004u; + return ephemeral_symmetric_key_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* CloudToDeviceProximityAuthPairing::release_ephemeral_symmetric_key() { + // @@protoc_insertion_point(field_release:securegcm.CloudToDeviceProximityAuthPairing.ephemeral_symmetric_key) + if (!_internal_has_ephemeral_symmetric_key()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000004u; + auto* p = ephemeral_symmetric_key_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (ephemeral_symmetric_key_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + ephemeral_symmetric_key_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void CloudToDeviceProximityAuthPairing::set_allocated_ephemeral_symmetric_key(std::string* ephemeral_symmetric_key) { + if (ephemeral_symmetric_key != nullptr) { + _has_bits_[0] |= 0x00000004u; + } else { + _has_bits_[0] &= ~0x00000004u; + } + ephemeral_symmetric_key_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ephemeral_symmetric_key, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (ephemeral_symmetric_key_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + ephemeral_symmetric_key_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:securegcm.CloudToDeviceProximityAuthPairing.ephemeral_symmetric_key) +} + +// optional bytes additional_metadata = 4; +inline bool CloudToDeviceProximityAuthPairing::_internal_has_additional_metadata() const { + bool value = (_has_bits_[0] & 0x00000008u) != 0; + return value; +} +inline bool CloudToDeviceProximityAuthPairing::has_additional_metadata() const { + return _internal_has_additional_metadata(); +} +inline void CloudToDeviceProximityAuthPairing::clear_additional_metadata() { + additional_metadata_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000008u; +} +inline const std::string& CloudToDeviceProximityAuthPairing::additional_metadata() const { + // @@protoc_insertion_point(field_get:securegcm.CloudToDeviceProximityAuthPairing.additional_metadata) + return _internal_additional_metadata(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void CloudToDeviceProximityAuthPairing::set_additional_metadata(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000008u; + additional_metadata_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:securegcm.CloudToDeviceProximityAuthPairing.additional_metadata) +} +inline std::string* CloudToDeviceProximityAuthPairing::mutable_additional_metadata() { + std::string* _s = _internal_mutable_additional_metadata(); + // @@protoc_insertion_point(field_mutable:securegcm.CloudToDeviceProximityAuthPairing.additional_metadata) + return _s; +} +inline const std::string& CloudToDeviceProximityAuthPairing::_internal_additional_metadata() const { + return additional_metadata_.Get(); +} +inline void CloudToDeviceProximityAuthPairing::_internal_set_additional_metadata(const std::string& value) { + _has_bits_[0] |= 0x00000008u; + additional_metadata_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* CloudToDeviceProximityAuthPairing::_internal_mutable_additional_metadata() { + _has_bits_[0] |= 0x00000008u; + return additional_metadata_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* CloudToDeviceProximityAuthPairing::release_additional_metadata() { + // @@protoc_insertion_point(field_release:securegcm.CloudToDeviceProximityAuthPairing.additional_metadata) + if (!_internal_has_additional_metadata()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000008u; + auto* p = additional_metadata_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (additional_metadata_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + additional_metadata_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void CloudToDeviceProximityAuthPairing::set_allocated_additional_metadata(std::string* additional_metadata) { + if (additional_metadata != nullptr) { + _has_bits_[0] |= 0x00000008u; + } else { + _has_bits_[0] &= ~0x00000008u; + } + additional_metadata_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), additional_metadata, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (additional_metadata_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + additional_metadata_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:securegcm.CloudToDeviceProximityAuthPairing.additional_metadata) +} + +// ------------------------------------------------------------------- + +// DeviceProximityCallback + +// optional string callback_bluetooth_address = 1; +inline bool DeviceProximityCallback::_internal_has_callback_bluetooth_address() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool DeviceProximityCallback::has_callback_bluetooth_address() const { + return _internal_has_callback_bluetooth_address(); +} +inline void DeviceProximityCallback::clear_callback_bluetooth_address() { + callback_bluetooth_address_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& DeviceProximityCallback::callback_bluetooth_address() const { + // @@protoc_insertion_point(field_get:securegcm.DeviceProximityCallback.callback_bluetooth_address) + return _internal_callback_bluetooth_address(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void DeviceProximityCallback::set_callback_bluetooth_address(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + callback_bluetooth_address_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:securegcm.DeviceProximityCallback.callback_bluetooth_address) +} +inline std::string* DeviceProximityCallback::mutable_callback_bluetooth_address() { + std::string* _s = _internal_mutable_callback_bluetooth_address(); + // @@protoc_insertion_point(field_mutable:securegcm.DeviceProximityCallback.callback_bluetooth_address) + return _s; +} +inline const std::string& DeviceProximityCallback::_internal_callback_bluetooth_address() const { + return callback_bluetooth_address_.Get(); +} +inline void DeviceProximityCallback::_internal_set_callback_bluetooth_address(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + callback_bluetooth_address_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* DeviceProximityCallback::_internal_mutable_callback_bluetooth_address() { + _has_bits_[0] |= 0x00000001u; + return callback_bluetooth_address_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* DeviceProximityCallback::release_callback_bluetooth_address() { + // @@protoc_insertion_point(field_release:securegcm.DeviceProximityCallback.callback_bluetooth_address) + if (!_internal_has_callback_bluetooth_address()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = callback_bluetooth_address_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (callback_bluetooth_address_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + callback_bluetooth_address_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void DeviceProximityCallback::set_allocated_callback_bluetooth_address(std::string* callback_bluetooth_address) { + if (callback_bluetooth_address != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + callback_bluetooth_address_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), callback_bluetooth_address, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (callback_bluetooth_address_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + callback_bluetooth_address_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:securegcm.DeviceProximityCallback.callback_bluetooth_address) +} + +// optional .securegcm.DeviceType source_device_type = 2; +inline bool DeviceProximityCallback::_internal_has_source_device_type() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool DeviceProximityCallback::has_source_device_type() const { + return _internal_has_source_device_type(); +} +inline void DeviceProximityCallback::clear_source_device_type() { + source_device_type_ = 0; + _has_bits_[0] &= ~0x00000002u; +} +inline ::securegcm::DeviceType DeviceProximityCallback::_internal_source_device_type() const { + return static_cast< ::securegcm::DeviceType >(source_device_type_); +} +inline ::securegcm::DeviceType DeviceProximityCallback::source_device_type() const { + // @@protoc_insertion_point(field_get:securegcm.DeviceProximityCallback.source_device_type) + return _internal_source_device_type(); +} +inline void DeviceProximityCallback::_internal_set_source_device_type(::securegcm::DeviceType value) { + assert(::securegcm::DeviceType_IsValid(value)); + _has_bits_[0] |= 0x00000002u; + source_device_type_ = value; +} +inline void DeviceProximityCallback::set_source_device_type(::securegcm::DeviceType value) { + _internal_set_source_device_type(value); + // @@protoc_insertion_point(field_set:securegcm.DeviceProximityCallback.source_device_type) +} + +// optional int32 protocol_version = 3; +inline bool DeviceProximityCallback::_internal_has_protocol_version() const { + bool value = (_has_bits_[0] & 0x00000004u) != 0; + return value; +} +inline bool DeviceProximityCallback::has_protocol_version() const { + return _internal_has_protocol_version(); +} +inline void DeviceProximityCallback::clear_protocol_version() { + protocol_version_ = 0; + _has_bits_[0] &= ~0x00000004u; +} +inline int32_t DeviceProximityCallback::_internal_protocol_version() const { + return protocol_version_; +} +inline int32_t DeviceProximityCallback::protocol_version() const { + // @@protoc_insertion_point(field_get:securegcm.DeviceProximityCallback.protocol_version) + return _internal_protocol_version(); +} +inline void DeviceProximityCallback::_internal_set_protocol_version(int32_t value) { + _has_bits_[0] |= 0x00000004u; + protocol_version_ = value; +} +inline void DeviceProximityCallback::set_protocol_version(int32_t value) { + _internal_set_protocol_version(value); + // @@protoc_insertion_point(field_set:securegcm.DeviceProximityCallback.protocol_version) +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace securegcm + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_proto_2fproximity_5fpayloads_2eproto diff --git a/third_party/ukey2/compiled_proto/proto/securegcm.pb.cc b/third_party/ukey2/compiled_proto/proto/securegcm.pb.cc new file mode 100644 index 00000000..e26324e4 --- /dev/null +++ b/third_party/ukey2/compiled_proto/proto/securegcm.pb.cc @@ -0,0 +1,3021 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: proto/securegcm.proto + +#include "proto/securegcm.pb.h" + +#include + +#include +#include +#include +#include +// @@protoc_insertion_point(includes) +#include + +PROTOBUF_PRAGMA_INIT_SEG +namespace securegcm { +constexpr GcmDeviceInfo::GcmDeviceInfo( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : supported_software_features_() + , enabled_software_features_() + , user_public_key_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , device_model_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , locale_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , key_handle_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , device_os_version_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , device_os_release_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , device_os_codename_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , device_software_version_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , device_software_package_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , long_device_id_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , device_manufacturer_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , gcm_registration_id_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , device_master_key_hash_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , apn_registration_id_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , bluetooth_mac_address_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , enrollment_session_id_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , oauth_token_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , android_device_id_(uint64_t{0u}) + , counter_(int64_t{0}) + , device_os_version_code_(int64_t{0}) + , device_software_version_code_(int64_t{0}) + , device_display_diagonal_mils_(0) + , device_authzen_version_(0) + , pixel_experience_(false) + , arc_plus_plus_(false) + , is_screenlock_state_flaky_(false) + , using_secure_screenlock_(false) + , auto_unlock_screenlock_supported_(false) + , auto_unlock_screenlock_enabled_(false) + , bluetooth_radio_supported_(false) + , bluetooth_radio_enabled_(false) + , mobile_data_supported_(false) + , tethering_supported_(false) + , ble_radio_supported_(false) + , device_type_(1) + + , notification_enabled_(true){} +struct GcmDeviceInfoDefaultTypeInternal { + constexpr GcmDeviceInfoDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~GcmDeviceInfoDefaultTypeInternal() {} + union { + GcmDeviceInfo _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT GcmDeviceInfoDefaultTypeInternal _GcmDeviceInfo_default_instance_; +constexpr GcmMetadata::GcmMetadata( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : type_(0) + + , version_(0){} +struct GcmMetadataDefaultTypeInternal { + constexpr GcmMetadataDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~GcmMetadataDefaultTypeInternal() {} + union { + GcmMetadata _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT GcmMetadataDefaultTypeInternal _GcmMetadata_default_instance_; +constexpr Tickle::Tickle( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : expiry_time_(uint64_t{0u}){} +struct TickleDefaultTypeInternal { + constexpr TickleDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~TickleDefaultTypeInternal() {} + union { + Tickle _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT TickleDefaultTypeInternal _Tickle_default_instance_; +constexpr LoginNotificationInfo::LoginNotificationInfo( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : email_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , host_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , source_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , event_type_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , creation_time_(uint64_t{0u}){} +struct LoginNotificationInfoDefaultTypeInternal { + constexpr LoginNotificationInfoDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~LoginNotificationInfoDefaultTypeInternal() {} + union { + LoginNotificationInfo _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT LoginNotificationInfoDefaultTypeInternal _LoginNotificationInfo_default_instance_; +} // namespace securegcm +namespace securegcm { +bool AppleDeviceDiagonalMils_IsValid(int value) { + switch (value) { + case 4000: + case 7900: + return true; + default: + return false; + } +} + +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed AppleDeviceDiagonalMils_strings[2] = {}; + +static const char AppleDeviceDiagonalMils_names[] = + "APPLE_PAD" + "APPLE_PHONE"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry AppleDeviceDiagonalMils_entries[] = { + { {AppleDeviceDiagonalMils_names + 0, 9}, 7900 }, + { {AppleDeviceDiagonalMils_names + 9, 11}, 4000 }, +}; + +static const int AppleDeviceDiagonalMils_entries_by_number[] = { + 1, // 4000 -> APPLE_PHONE + 0, // 7900 -> APPLE_PAD +}; + +const std::string& AppleDeviceDiagonalMils_Name( + AppleDeviceDiagonalMils value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + AppleDeviceDiagonalMils_entries, + AppleDeviceDiagonalMils_entries_by_number, + 2, AppleDeviceDiagonalMils_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + AppleDeviceDiagonalMils_entries, + AppleDeviceDiagonalMils_entries_by_number, + 2, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + AppleDeviceDiagonalMils_strings[idx].get(); +} +bool AppleDeviceDiagonalMils_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, AppleDeviceDiagonalMils* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + AppleDeviceDiagonalMils_entries, 2, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} +bool DeviceType_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + return true; + default: + return false; + } +} + +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed DeviceType_strings[6] = {}; + +static const char DeviceType_names[] = + "ANDROID" + "BROWSER" + "CHROME" + "IOS" + "OSX" + "UNKNOWN"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry DeviceType_entries[] = { + { {DeviceType_names + 0, 7}, 1 }, + { {DeviceType_names + 7, 7}, 4 }, + { {DeviceType_names + 14, 6}, 2 }, + { {DeviceType_names + 20, 3}, 3 }, + { {DeviceType_names + 23, 3}, 5 }, + { {DeviceType_names + 26, 7}, 0 }, +}; + +static const int DeviceType_entries_by_number[] = { + 5, // 0 -> UNKNOWN + 0, // 1 -> ANDROID + 2, // 2 -> CHROME + 3, // 3 -> IOS + 1, // 4 -> BROWSER + 4, // 5 -> OSX +}; + +const std::string& DeviceType_Name( + DeviceType value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + DeviceType_entries, + DeviceType_entries_by_number, + 6, DeviceType_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + DeviceType_entries, + DeviceType_entries_by_number, + 6, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + DeviceType_strings[idx].get(); +} +bool DeviceType_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, DeviceType* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + DeviceType_entries, 6, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} +bool SoftwareFeature_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 SoftwareFeature_strings[9] = {}; + +static const char SoftwareFeature_names[] = + "BETTER_TOGETHER_CLIENT" + "BETTER_TOGETHER_HOST" + "EASY_UNLOCK_CLIENT" + "EASY_UNLOCK_HOST" + "MAGIC_TETHER_CLIENT" + "MAGIC_TETHER_HOST" + "SMS_CONNECT_CLIENT" + "SMS_CONNECT_HOST" + "UNKNOWN_FEATURE"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry SoftwareFeature_entries[] = { + { {SoftwareFeature_names + 0, 22}, 2 }, + { {SoftwareFeature_names + 22, 20}, 1 }, + { {SoftwareFeature_names + 42, 18}, 4 }, + { {SoftwareFeature_names + 60, 16}, 3 }, + { {SoftwareFeature_names + 76, 19}, 6 }, + { {SoftwareFeature_names + 95, 17}, 5 }, + { {SoftwareFeature_names + 112, 18}, 8 }, + { {SoftwareFeature_names + 130, 16}, 7 }, + { {SoftwareFeature_names + 146, 15}, 0 }, +}; + +static const int SoftwareFeature_entries_by_number[] = { + 8, // 0 -> UNKNOWN_FEATURE + 1, // 1 -> BETTER_TOGETHER_HOST + 0, // 2 -> BETTER_TOGETHER_CLIENT + 3, // 3 -> EASY_UNLOCK_HOST + 2, // 4 -> EASY_UNLOCK_CLIENT + 5, // 5 -> MAGIC_TETHER_HOST + 4, // 6 -> MAGIC_TETHER_CLIENT + 7, // 7 -> SMS_CONNECT_HOST + 6, // 8 -> SMS_CONNECT_CLIENT +}; + +const std::string& SoftwareFeature_Name( + SoftwareFeature value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + SoftwareFeature_entries, + SoftwareFeature_entries_by_number, + 9, SoftwareFeature_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + SoftwareFeature_entries, + SoftwareFeature_entries_by_number, + 9, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + SoftwareFeature_strings[idx].get(); +} +bool SoftwareFeature_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, SoftwareFeature* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + SoftwareFeature_entries, 9, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} +bool InvocationReason_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 11: + case 12: + case 13: + case 14: + case 15: + return true; + default: + return false; + } +} + +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed InvocationReason_strings[16] = {}; + +static const char InvocationReason_names[] = + "REASON_ADDRESS_CHANGE" + "REASON_CHANGED_ACCOUNT" + "REASON_CUSTOM_KEY_INVALIDATION" + "REASON_EXPIRATION" + "REASON_FAILURE_RECOVERY" + "REASON_FAST_PERIODIC" + "REASON_FEATURE_TOGGLED" + "REASON_INITIALIZATION" + "REASON_MANUAL" + "REASON_NEW_ACCOUNT" + "REASON_PERIODIC" + "REASON_PROXIMITY_PERIODIC" + "REASON_SERVER_INITIATED" + "REASON_SLOW_PERIODIC" + "REASON_SOFTWARE_UPDATE" + "REASON_UNKNOWN"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry InvocationReason_entries[] = { + { {InvocationReason_names + 0, 21}, 11 }, + { {InvocationReason_names + 21, 22}, 8 }, + { {InvocationReason_names + 43, 30}, 14 }, + { {InvocationReason_names + 73, 17}, 5 }, + { {InvocationReason_names + 90, 23}, 6 }, + { {InvocationReason_names + 113, 20}, 4 }, + { {InvocationReason_names + 133, 22}, 9 }, + { {InvocationReason_names + 155, 21}, 1 }, + { {InvocationReason_names + 176, 13}, 13 }, + { {InvocationReason_names + 189, 18}, 7 }, + { {InvocationReason_names + 207, 15}, 2 }, + { {InvocationReason_names + 222, 25}, 15 }, + { {InvocationReason_names + 247, 23}, 10 }, + { {InvocationReason_names + 270, 20}, 3 }, + { {InvocationReason_names + 290, 22}, 12 }, + { {InvocationReason_names + 312, 14}, 0 }, +}; + +static const int InvocationReason_entries_by_number[] = { + 15, // 0 -> REASON_UNKNOWN + 7, // 1 -> REASON_INITIALIZATION + 10, // 2 -> REASON_PERIODIC + 13, // 3 -> REASON_SLOW_PERIODIC + 5, // 4 -> REASON_FAST_PERIODIC + 3, // 5 -> REASON_EXPIRATION + 4, // 6 -> REASON_FAILURE_RECOVERY + 9, // 7 -> REASON_NEW_ACCOUNT + 1, // 8 -> REASON_CHANGED_ACCOUNT + 6, // 9 -> REASON_FEATURE_TOGGLED + 12, // 10 -> REASON_SERVER_INITIATED + 0, // 11 -> REASON_ADDRESS_CHANGE + 14, // 12 -> REASON_SOFTWARE_UPDATE + 8, // 13 -> REASON_MANUAL + 2, // 14 -> REASON_CUSTOM_KEY_INVALIDATION + 11, // 15 -> REASON_PROXIMITY_PERIODIC +}; + +const std::string& InvocationReason_Name( + InvocationReason value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + InvocationReason_entries, + InvocationReason_entries_by_number, + 16, InvocationReason_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + InvocationReason_entries, + InvocationReason_entries_by_number, + 16, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + InvocationReason_strings[idx].get(); +} +bool InvocationReason_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, InvocationReason* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + InvocationReason_entries, 16, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} +bool Type_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 101: + return true; + default: + return false; + } +} + +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed Type_strings[16] = {}; + +static const char Type_names[] = + "DEVICE_INFO_UPDATE" + "DEVICE_PROXIMITY_CALLBACK" + "DEVICE_TO_DEVICE_MESSAGE" + "DEVICE_TO_DEVICE_RESPONDER_HELLO_PAYLOAD" + "ENROLLMENT" + "GCMV1_IDENTITY_ASSERTION" + "LOGIN_NOTIFICATION" + "PROXIMITYAUTH_PAIRING" + "TICKLE" + "TX_CANCEL_REQUEST" + "TX_PING" + "TX_REPLY" + "TX_REQUEST" + "TX_SYNC_REQUEST" + "TX_SYNC_RESPONSE" + "UNLOCK_KEY_SIGNED_CHALLENGE"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry Type_entries[] = { + { {Type_names + 0, 18}, 7 }, + { {Type_names + 18, 25}, 14 }, + { {Type_names + 43, 24}, 13 }, + { {Type_names + 67, 40}, 12 }, + { {Type_names + 107, 10}, 0 }, + { {Type_names + 117, 24}, 11 }, + { {Type_names + 141, 18}, 101 }, + { {Type_names + 159, 21}, 10 }, + { {Type_names + 180, 6}, 1 }, + { {Type_names + 186, 17}, 8 }, + { {Type_names + 203, 7}, 6 }, + { {Type_names + 210, 8}, 3 }, + { {Type_names + 218, 10}, 2 }, + { {Type_names + 228, 15}, 4 }, + { {Type_names + 243, 16}, 5 }, + { {Type_names + 259, 27}, 15 }, +}; + +static const int Type_entries_by_number[] = { + 4, // 0 -> ENROLLMENT + 8, // 1 -> TICKLE + 12, // 2 -> TX_REQUEST + 11, // 3 -> TX_REPLY + 13, // 4 -> TX_SYNC_REQUEST + 14, // 5 -> TX_SYNC_RESPONSE + 10, // 6 -> TX_PING + 0, // 7 -> DEVICE_INFO_UPDATE + 9, // 8 -> TX_CANCEL_REQUEST + 7, // 10 -> PROXIMITYAUTH_PAIRING + 5, // 11 -> GCMV1_IDENTITY_ASSERTION + 3, // 12 -> DEVICE_TO_DEVICE_RESPONDER_HELLO_PAYLOAD + 2, // 13 -> DEVICE_TO_DEVICE_MESSAGE + 1, // 14 -> DEVICE_PROXIMITY_CALLBACK + 15, // 15 -> UNLOCK_KEY_SIGNED_CHALLENGE + 6, // 101 -> LOGIN_NOTIFICATION +}; + +const std::string& Type_Name( + Type value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + Type_entries, + Type_entries_by_number, + 16, Type_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + Type_entries, + Type_entries_by_number, + 16, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + Type_strings[idx].get(); +} +bool Type_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, Type* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + Type_entries, 16, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} + +// =================================================================== + +class GcmDeviceInfo::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_android_device_id(HasBits* has_bits) { + (*has_bits)[0] |= 131072u; + } + static void set_has_gcm_registration_id(HasBits* has_bits) { + (*has_bits)[0] |= 2048u; + } + static void set_has_apn_registration_id(HasBits* has_bits) { + (*has_bits)[0] |= 8192u; + } + static void set_has_notification_enabled(HasBits* has_bits) { + (*has_bits)[1] |= 8u; + } + static void set_has_bluetooth_mac_address(HasBits* has_bits) { + (*has_bits)[0] |= 16384u; + } + static void set_has_device_master_key_hash(HasBits* has_bits) { + (*has_bits)[0] |= 4096u; + } + static void set_has_user_public_key(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_device_model(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static void set_has_locale(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } + static void set_has_key_handle(HasBits* has_bits) { + (*has_bits)[0] |= 8u; + } + static void set_has_counter(HasBits* has_bits) { + (*has_bits)[0] |= 262144u; + } + static void set_has_device_os_version(HasBits* has_bits) { + (*has_bits)[0] |= 16u; + } + static void set_has_device_os_version_code(HasBits* has_bits) { + (*has_bits)[0] |= 524288u; + } + static void set_has_device_os_release(HasBits* has_bits) { + (*has_bits)[0] |= 32u; + } + static void set_has_device_os_codename(HasBits* has_bits) { + (*has_bits)[0] |= 64u; + } + static void set_has_device_software_version(HasBits* has_bits) { + (*has_bits)[0] |= 128u; + } + static void set_has_device_software_version_code(HasBits* has_bits) { + (*has_bits)[0] |= 1048576u; + } + static void set_has_device_software_package(HasBits* has_bits) { + (*has_bits)[0] |= 256u; + } + static void set_has_device_display_diagonal_mils(HasBits* has_bits) { + (*has_bits)[0] |= 2097152u; + } + static void set_has_device_authzen_version(HasBits* has_bits) { + (*has_bits)[0] |= 4194304u; + } + static void set_has_long_device_id(HasBits* has_bits) { + (*has_bits)[0] |= 512u; + } + static void set_has_device_manufacturer(HasBits* has_bits) { + (*has_bits)[0] |= 1024u; + } + static void set_has_device_type(HasBits* has_bits) { + (*has_bits)[1] |= 4u; + } + static void set_has_using_secure_screenlock(HasBits* has_bits) { + (*has_bits)[0] |= 67108864u; + } + static void set_has_auto_unlock_screenlock_supported(HasBits* has_bits) { + (*has_bits)[0] |= 134217728u; + } + static void set_has_auto_unlock_screenlock_enabled(HasBits* has_bits) { + (*has_bits)[0] |= 268435456u; + } + static void set_has_bluetooth_radio_supported(HasBits* has_bits) { + (*has_bits)[0] |= 536870912u; + } + static void set_has_bluetooth_radio_enabled(HasBits* has_bits) { + (*has_bits)[0] |= 1073741824u; + } + static void set_has_mobile_data_supported(HasBits* has_bits) { + (*has_bits)[0] |= 2147483648u; + } + static void set_has_tethering_supported(HasBits* has_bits) { + (*has_bits)[1] |= 1u; + } + static void set_has_ble_radio_supported(HasBits* has_bits) { + (*has_bits)[1] |= 2u; + } + static void set_has_pixel_experience(HasBits* has_bits) { + (*has_bits)[0] |= 8388608u; + } + static void set_has_arc_plus_plus(HasBits* has_bits) { + (*has_bits)[0] |= 16777216u; + } + static void set_has_is_screenlock_state_flaky(HasBits* has_bits) { + (*has_bits)[0] |= 33554432u; + } + static void set_has_enrollment_session_id(HasBits* has_bits) { + (*has_bits)[0] |= 32768u; + } + static void set_has_oauth_token(HasBits* has_bits) { + (*has_bits)[0] |= 65536u; + } + static bool MissingRequiredFields(const HasBits& has_bits) { + return ((has_bits[0] & 0x00000001) ^ 0x00000001) != 0; + } +}; + +GcmDeviceInfo::GcmDeviceInfo(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned), + supported_software_features_(arena), + enabled_software_features_(arena) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:securegcm.GcmDeviceInfo) +} +GcmDeviceInfo::GcmDeviceInfo(const GcmDeviceInfo& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_), + supported_software_features_(from.supported_software_features_), + enabled_software_features_(from.enabled_software_features_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + user_public_key_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + user_public_key_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_user_public_key()) { + user_public_key_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_user_public_key(), + GetArenaForAllocation()); + } + device_model_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + device_model_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_device_model()) { + device_model_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_device_model(), + GetArenaForAllocation()); + } + locale_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + locale_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_locale()) { + locale_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_locale(), + GetArenaForAllocation()); + } + key_handle_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + key_handle_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_key_handle()) { + key_handle_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_key_handle(), + GetArenaForAllocation()); + } + device_os_version_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + device_os_version_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_device_os_version()) { + device_os_version_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_device_os_version(), + GetArenaForAllocation()); + } + device_os_release_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + device_os_release_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_device_os_release()) { + device_os_release_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_device_os_release(), + GetArenaForAllocation()); + } + device_os_codename_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + device_os_codename_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_device_os_codename()) { + device_os_codename_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_device_os_codename(), + GetArenaForAllocation()); + } + device_software_version_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + device_software_version_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_device_software_version()) { + device_software_version_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_device_software_version(), + GetArenaForAllocation()); + } + device_software_package_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + device_software_package_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_device_software_package()) { + device_software_package_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_device_software_package(), + GetArenaForAllocation()); + } + long_device_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + long_device_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_long_device_id()) { + long_device_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_long_device_id(), + GetArenaForAllocation()); + } + device_manufacturer_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + device_manufacturer_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_device_manufacturer()) { + device_manufacturer_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_device_manufacturer(), + GetArenaForAllocation()); + } + gcm_registration_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + gcm_registration_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_gcm_registration_id()) { + gcm_registration_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_gcm_registration_id(), + GetArenaForAllocation()); + } + device_master_key_hash_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + device_master_key_hash_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_device_master_key_hash()) { + device_master_key_hash_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_device_master_key_hash(), + GetArenaForAllocation()); + } + apn_registration_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + apn_registration_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_apn_registration_id()) { + apn_registration_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_apn_registration_id(), + GetArenaForAllocation()); + } + bluetooth_mac_address_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + bluetooth_mac_address_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_bluetooth_mac_address()) { + bluetooth_mac_address_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_bluetooth_mac_address(), + GetArenaForAllocation()); + } + enrollment_session_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + enrollment_session_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_enrollment_session_id()) { + enrollment_session_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_enrollment_session_id(), + GetArenaForAllocation()); + } + oauth_token_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + oauth_token_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_oauth_token()) { + oauth_token_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_oauth_token(), + GetArenaForAllocation()); + } + ::memcpy(&android_device_id_, &from.android_device_id_, + static_cast(reinterpret_cast(¬ification_enabled_) - + reinterpret_cast(&android_device_id_)) + sizeof(notification_enabled_)); + // @@protoc_insertion_point(copy_constructor:securegcm.GcmDeviceInfo) +} + +inline void GcmDeviceInfo::SharedCtor() { +user_public_key_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + user_public_key_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +device_model_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + device_model_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +locale_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + locale_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +key_handle_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + key_handle_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +device_os_version_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + device_os_version_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +device_os_release_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + device_os_release_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +device_os_codename_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + device_os_codename_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +device_software_version_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + device_software_version_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +device_software_package_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + device_software_package_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +long_device_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + long_device_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +device_manufacturer_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + device_manufacturer_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +gcm_registration_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + gcm_registration_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +device_master_key_hash_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + device_master_key_hash_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +apn_registration_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + apn_registration_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +bluetooth_mac_address_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + bluetooth_mac_address_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +enrollment_session_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + enrollment_session_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +oauth_token_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + oauth_token_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&android_device_id_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&ble_radio_supported_) - + reinterpret_cast(&android_device_id_)) + sizeof(ble_radio_supported_)); +device_type_ = 1; +notification_enabled_ = true; +} + +GcmDeviceInfo::~GcmDeviceInfo() { + // @@protoc_insertion_point(destructor:securegcm.GcmDeviceInfo) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void GcmDeviceInfo::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + user_public_key_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + device_model_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + locale_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + key_handle_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + device_os_version_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + device_os_release_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + device_os_codename_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + device_software_version_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + device_software_package_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + long_device_id_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + device_manufacturer_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + gcm_registration_id_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + device_master_key_hash_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + apn_registration_id_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + bluetooth_mac_address_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + enrollment_session_id_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + oauth_token_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void GcmDeviceInfo::ArenaDtor(void* object) { + GcmDeviceInfo* _this = reinterpret_cast< GcmDeviceInfo* >(object); + (void)_this; +} +void GcmDeviceInfo::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void GcmDeviceInfo::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void GcmDeviceInfo::Clear() { +// @@protoc_insertion_point(message_clear_start:securegcm.GcmDeviceInfo) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + supported_software_features_.Clear(); + enabled_software_features_.Clear(); + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x000000ffu) { + if (cached_has_bits & 0x00000001u) { + user_public_key_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000002u) { + device_model_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000004u) { + locale_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000008u) { + key_handle_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000010u) { + device_os_version_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000020u) { + device_os_release_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000040u) { + device_os_codename_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000080u) { + device_software_version_.ClearNonDefaultToEmpty(); + } + } + if (cached_has_bits & 0x0000ff00u) { + if (cached_has_bits & 0x00000100u) { + device_software_package_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000200u) { + long_device_id_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000400u) { + device_manufacturer_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000800u) { + gcm_registration_id_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00001000u) { + device_master_key_hash_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00002000u) { + apn_registration_id_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00004000u) { + bluetooth_mac_address_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00008000u) { + enrollment_session_id_.ClearNonDefaultToEmpty(); + } + } + if (cached_has_bits & 0x00010000u) { + oauth_token_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00fe0000u) { + ::memset(&android_device_id_, 0, static_cast( + reinterpret_cast(&pixel_experience_) - + reinterpret_cast(&android_device_id_)) + sizeof(pixel_experience_)); + } + if (cached_has_bits & 0xff000000u) { + ::memset(&arc_plus_plus_, 0, static_cast( + reinterpret_cast(&mobile_data_supported_) - + reinterpret_cast(&arc_plus_plus_)) + sizeof(mobile_data_supported_)); + } + cached_has_bits = _has_bits_[1]; + if (cached_has_bits & 0x0000000fu) { + ::memset(&tethering_supported_, 0, static_cast( + reinterpret_cast(&ble_radio_supported_) - + reinterpret_cast(&tethering_supported_)) + sizeof(ble_radio_supported_)); + device_type_ = 1; + notification_enabled_ = true; + } + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* GcmDeviceInfo::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional fixed64 android_device_id = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 9)) { + _Internal::set_has_android_device_id(&_has_bits_); + android_device_id_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + ptr += sizeof(uint64_t); + } else + goto handle_unusual; + continue; + // required bytes user_public_key = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { + auto str = _internal_mutable_user_public_key(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional string device_model = 7; + case 7: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 58)) { + auto str = _internal_mutable_device_model(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional string locale = 8; + case 8: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 66)) { + auto str = _internal_mutable_locale(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional bytes key_handle = 9; + case 9: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 74)) { + auto str = _internal_mutable_key_handle(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional int64 counter = 12 [default = 0]; + case 12: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 96)) { + _Internal::set_has_counter(&_has_bits_); + counter_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional string device_os_version = 13; + case 13: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 106)) { + auto str = _internal_mutable_device_os_version(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional int64 device_os_version_code = 14; + case 14: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 112)) { + _Internal::set_has_device_os_version_code(&_has_bits_); + device_os_version_code_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional string device_os_release = 15; + case 15: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 122)) { + auto str = _internal_mutable_device_os_release(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional string device_os_codename = 16; + case 16: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 130)) { + auto str = _internal_mutable_device_os_codename(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional string device_software_version = 17; + case 17: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 138)) { + auto str = _internal_mutable_device_software_version(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional int64 device_software_version_code = 18; + case 18: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 144)) { + _Internal::set_has_device_software_version_code(&_has_bits_); + device_software_version_code_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional string device_software_package = 19; + case 19: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 154)) { + auto str = _internal_mutable_device_software_package(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional int32 device_display_diagonal_mils = 22; + case 22: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 176)) { + _Internal::set_has_device_display_diagonal_mils(&_has_bits_); + device_display_diagonal_mils_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional int32 device_authzen_version = 24; + case 24: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 192)) { + _Internal::set_has_device_authzen_version(&_has_bits_); + device_authzen_version_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional bytes long_device_id = 29; + case 29: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 234)) { + auto str = _internal_mutable_long_device_id(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional string device_manufacturer = 31; + case 31: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 250)) { + auto str = _internal_mutable_device_manufacturer(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .securegcm.DeviceType device_type = 32 [default = ANDROID]; + case 32: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 0)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::securegcm::DeviceType_IsValid(val))) { + _internal_set_device_type(static_cast<::securegcm::DeviceType>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(32, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // optional bytes gcm_registration_id = 102; + case 102: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 50)) { + auto str = _internal_mutable_gcm_registration_id(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional bytes device_master_key_hash = 103; + case 103: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 58)) { + auto str = _internal_mutable_device_master_key_hash(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional bytes apn_registration_id = 202; + case 202: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 82)) { + auto str = _internal_mutable_apn_registration_id(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional bool notification_enabled = 203 [default = true]; + case 203: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 88)) { + _Internal::set_has_notification_enabled(&_has_bits_); + notification_enabled_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional string bluetooth_mac_address = 302; + case 302: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 114)) { + auto str = _internal_mutable_bluetooth_mac_address(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional bool using_secure_screenlock = 400 [default = false]; + case 400: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 128)) { + _Internal::set_has_using_secure_screenlock(&_has_bits_); + using_secure_screenlock_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional bool auto_unlock_screenlock_supported = 401 [default = false]; + case 401: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 136)) { + _Internal::set_has_auto_unlock_screenlock_supported(&_has_bits_); + auto_unlock_screenlock_supported_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional bool auto_unlock_screenlock_enabled = 402 [default = false]; + case 402: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 144)) { + _Internal::set_has_auto_unlock_screenlock_enabled(&_has_bits_); + auto_unlock_screenlock_enabled_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional bool bluetooth_radio_supported = 403 [default = false]; + case 403: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 152)) { + _Internal::set_has_bluetooth_radio_supported(&_has_bits_); + bluetooth_radio_supported_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional bool bluetooth_radio_enabled = 404 [default = false]; + case 404: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 160)) { + _Internal::set_has_bluetooth_radio_enabled(&_has_bits_); + bluetooth_radio_enabled_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional bool mobile_data_supported = 405 [default = false]; + case 405: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 168)) { + _Internal::set_has_mobile_data_supported(&_has_bits_); + mobile_data_supported_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional bool tethering_supported = 406 [default = false]; + case 406: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 176)) { + _Internal::set_has_tethering_supported(&_has_bits_); + tethering_supported_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional bool ble_radio_supported = 407 [default = false]; + case 407: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 184)) { + _Internal::set_has_ble_radio_supported(&_has_bits_); + ble_radio_supported_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional bool pixel_experience = 408 [default = false]; + case 408: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 192)) { + _Internal::set_has_pixel_experience(&_has_bits_); + pixel_experience_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional bool arc_plus_plus = 409 [default = false]; + case 409: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 200)) { + _Internal::set_has_arc_plus_plus(&_has_bits_); + arc_plus_plus_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional bool is_screenlock_state_flaky = 410 [default = false]; + case 410: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 208)) { + _Internal::set_has_is_screenlock_state_flaky(&_has_bits_); + is_screenlock_state_flaky_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // repeated .securegcm.SoftwareFeature supported_software_features = 411; + case 411: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 216)) { + ptr -= 2; + do { + ptr += 2; + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::securegcm::SoftwareFeature_IsValid(val))) { + _internal_add_supported_software_features(static_cast<::securegcm::SoftwareFeature>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(411, val, mutable_unknown_fields()); + } + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<3288>(ptr)); + } else if (static_cast(tag) == 218) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedEnumParser(_internal_mutable_supported_software_features(), ptr, ctx, ::securegcm::SoftwareFeature_IsValid, &_internal_metadata_, 411); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // repeated .securegcm.SoftwareFeature enabled_software_features = 412; + case 412: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 224)) { + ptr -= 2; + do { + ptr += 2; + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::securegcm::SoftwareFeature_IsValid(val))) { + _internal_add_enabled_software_features(static_cast<::securegcm::SoftwareFeature>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(412, val, mutable_unknown_fields()); + } + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<3296>(ptr)); + } else if (static_cast(tag) == 226) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedEnumParser(_internal_mutable_enabled_software_features(), ptr, ctx, ::securegcm::SoftwareFeature_IsValid, &_internal_metadata_, 412); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional bytes enrollment_session_id = 1000; + case 1000: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 66)) { + auto str = _internal_mutable_enrollment_session_id(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional string oauth_token = 1001; + case 1001: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 74)) { + auto str = _internal_mutable_oauth_token(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* GcmDeviceInfo::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:securegcm.GcmDeviceInfo) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional fixed64 android_device_id = 1; + if (cached_has_bits & 0x00020000u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFixed64ToArray(1, this->_internal_android_device_id(), target); + } + + // required bytes user_public_key = 4; + if (cached_has_bits & 0x00000001u) { + target = stream->WriteBytesMaybeAliased( + 4, this->_internal_user_public_key(), target); + } + + // optional string device_model = 7; + if (cached_has_bits & 0x00000002u) { + target = stream->WriteStringMaybeAliased( + 7, this->_internal_device_model(), target); + } + + // optional string locale = 8; + if (cached_has_bits & 0x00000004u) { + target = stream->WriteStringMaybeAliased( + 8, this->_internal_locale(), target); + } + + // optional bytes key_handle = 9; + if (cached_has_bits & 0x00000008u) { + target = stream->WriteBytesMaybeAliased( + 9, this->_internal_key_handle(), target); + } + + // optional int64 counter = 12 [default = 0]; + if (cached_has_bits & 0x00040000u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(12, this->_internal_counter(), target); + } + + // optional string device_os_version = 13; + if (cached_has_bits & 0x00000010u) { + target = stream->WriteStringMaybeAliased( + 13, this->_internal_device_os_version(), target); + } + + // optional int64 device_os_version_code = 14; + if (cached_has_bits & 0x00080000u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(14, this->_internal_device_os_version_code(), target); + } + + // optional string device_os_release = 15; + if (cached_has_bits & 0x00000020u) { + target = stream->WriteStringMaybeAliased( + 15, this->_internal_device_os_release(), target); + } + + // optional string device_os_codename = 16; + if (cached_has_bits & 0x00000040u) { + target = stream->WriteStringMaybeAliased( + 16, this->_internal_device_os_codename(), target); + } + + // optional string device_software_version = 17; + if (cached_has_bits & 0x00000080u) { + target = stream->WriteStringMaybeAliased( + 17, this->_internal_device_software_version(), target); + } + + // optional int64 device_software_version_code = 18; + if (cached_has_bits & 0x00100000u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(18, this->_internal_device_software_version_code(), target); + } + + // optional string device_software_package = 19; + if (cached_has_bits & 0x00000100u) { + target = stream->WriteStringMaybeAliased( + 19, this->_internal_device_software_package(), target); + } + + // optional int32 device_display_diagonal_mils = 22; + if (cached_has_bits & 0x00200000u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(22, this->_internal_device_display_diagonal_mils(), target); + } + + // optional int32 device_authzen_version = 24; + if (cached_has_bits & 0x00400000u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(24, this->_internal_device_authzen_version(), target); + } + + // optional bytes long_device_id = 29; + if (cached_has_bits & 0x00000200u) { + target = stream->WriteBytesMaybeAliased( + 29, this->_internal_long_device_id(), target); + } + + // optional string device_manufacturer = 31; + if (cached_has_bits & 0x00000400u) { + target = stream->WriteStringMaybeAliased( + 31, this->_internal_device_manufacturer(), target); + } + + cached_has_bits = _has_bits_[1]; + // optional .securegcm.DeviceType device_type = 32 [default = ANDROID]; + if (cached_has_bits & 0x00000004u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 32, this->_internal_device_type(), target); + } + + cached_has_bits = _has_bits_[0]; + // optional bytes gcm_registration_id = 102; + if (cached_has_bits & 0x00000800u) { + target = stream->WriteBytesMaybeAliased( + 102, this->_internal_gcm_registration_id(), target); + } + + // optional bytes device_master_key_hash = 103; + if (cached_has_bits & 0x00001000u) { + target = stream->WriteBytesMaybeAliased( + 103, this->_internal_device_master_key_hash(), target); + } + + // optional bytes apn_registration_id = 202; + if (cached_has_bits & 0x00002000u) { + target = stream->WriteBytesMaybeAliased( + 202, this->_internal_apn_registration_id(), target); + } + + cached_has_bits = _has_bits_[1]; + // optional bool notification_enabled = 203 [default = true]; + if (cached_has_bits & 0x00000008u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(203, this->_internal_notification_enabled(), target); + } + + cached_has_bits = _has_bits_[0]; + // optional string bluetooth_mac_address = 302; + if (cached_has_bits & 0x00004000u) { + target = stream->WriteStringMaybeAliased( + 302, this->_internal_bluetooth_mac_address(), target); + } + + // optional bool using_secure_screenlock = 400 [default = false]; + if (cached_has_bits & 0x04000000u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(400, this->_internal_using_secure_screenlock(), target); + } + + // optional bool auto_unlock_screenlock_supported = 401 [default = false]; + if (cached_has_bits & 0x08000000u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(401, this->_internal_auto_unlock_screenlock_supported(), target); + } + + // optional bool auto_unlock_screenlock_enabled = 402 [default = false]; + if (cached_has_bits & 0x10000000u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(402, this->_internal_auto_unlock_screenlock_enabled(), target); + } + + // optional bool bluetooth_radio_supported = 403 [default = false]; + if (cached_has_bits & 0x20000000u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(403, this->_internal_bluetooth_radio_supported(), target); + } + + // optional bool bluetooth_radio_enabled = 404 [default = false]; + if (cached_has_bits & 0x40000000u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(404, this->_internal_bluetooth_radio_enabled(), target); + } + + // optional bool mobile_data_supported = 405 [default = false]; + if (cached_has_bits & 0x80000000u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(405, this->_internal_mobile_data_supported(), target); + } + + cached_has_bits = _has_bits_[1]; + // optional bool tethering_supported = 406 [default = false]; + if (cached_has_bits & 0x00000001u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(406, this->_internal_tethering_supported(), target); + } + + // optional bool ble_radio_supported = 407 [default = false]; + if (cached_has_bits & 0x00000002u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(407, this->_internal_ble_radio_supported(), target); + } + + cached_has_bits = _has_bits_[0]; + // optional bool pixel_experience = 408 [default = false]; + if (cached_has_bits & 0x00800000u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(408, this->_internal_pixel_experience(), target); + } + + // optional bool arc_plus_plus = 409 [default = false]; + if (cached_has_bits & 0x01000000u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(409, this->_internal_arc_plus_plus(), target); + } + + // optional bool is_screenlock_state_flaky = 410 [default = false]; + if (cached_has_bits & 0x02000000u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(410, this->_internal_is_screenlock_state_flaky(), target); + } + + // repeated .securegcm.SoftwareFeature supported_software_features = 411; + for (int i = 0, n = this->_internal_supported_software_features_size(); i < n; i++) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 411, this->_internal_supported_software_features(i), target); + } + + // repeated .securegcm.SoftwareFeature enabled_software_features = 412; + for (int i = 0, n = this->_internal_enabled_software_features_size(); i < n; i++) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 412, this->_internal_enabled_software_features(i), target); + } + + // optional bytes enrollment_session_id = 1000; + if (cached_has_bits & 0x00008000u) { + target = stream->WriteBytesMaybeAliased( + 1000, this->_internal_enrollment_session_id(), target); + } + + // optional string oauth_token = 1001; + if (cached_has_bits & 0x00010000u) { + target = stream->WriteStringMaybeAliased( + 1001, this->_internal_oauth_token(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:securegcm.GcmDeviceInfo) + return target; +} + +size_t GcmDeviceInfo::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:securegcm.GcmDeviceInfo) + size_t total_size = 0; + + // required bytes user_public_key = 4; + if (_internal_has_user_public_key()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_user_public_key()); + } + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated .securegcm.SoftwareFeature supported_software_features = 411; + { + size_t data_size = 0; + unsigned int count = static_cast(this->_internal_supported_software_features_size());for (unsigned int i = 0; i < count; i++) { + data_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize( + this->_internal_supported_software_features(static_cast(i))); + } + total_size += (2UL * count) + data_size; + } + + // repeated .securegcm.SoftwareFeature enabled_software_features = 412; + { + size_t data_size = 0; + unsigned int count = static_cast(this->_internal_enabled_software_features_size());for (unsigned int i = 0; i < count; i++) { + data_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize( + this->_internal_enabled_software_features(static_cast(i))); + } + total_size += (2UL * count) + data_size; + } + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x000000feu) { + // optional string device_model = 7; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_device_model()); + } + + // optional string locale = 8; + if (cached_has_bits & 0x00000004u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_locale()); + } + + // optional bytes key_handle = 9; + if (cached_has_bits & 0x00000008u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_key_handle()); + } + + // optional string device_os_version = 13; + if (cached_has_bits & 0x00000010u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_device_os_version()); + } + + // optional string device_os_release = 15; + if (cached_has_bits & 0x00000020u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_device_os_release()); + } + + // optional string device_os_codename = 16; + if (cached_has_bits & 0x00000040u) { + total_size += 2 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_device_os_codename()); + } + + // optional string device_software_version = 17; + if (cached_has_bits & 0x00000080u) { + total_size += 2 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_device_software_version()); + } + + } + if (cached_has_bits & 0x0000ff00u) { + // optional string device_software_package = 19; + if (cached_has_bits & 0x00000100u) { + total_size += 2 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_device_software_package()); + } + + // optional bytes long_device_id = 29; + if (cached_has_bits & 0x00000200u) { + total_size += 2 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_long_device_id()); + } + + // optional string device_manufacturer = 31; + if (cached_has_bits & 0x00000400u) { + total_size += 2 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_device_manufacturer()); + } + + // optional bytes gcm_registration_id = 102; + if (cached_has_bits & 0x00000800u) { + total_size += 2 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_gcm_registration_id()); + } + + // optional bytes device_master_key_hash = 103; + if (cached_has_bits & 0x00001000u) { + total_size += 2 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_device_master_key_hash()); + } + + // optional bytes apn_registration_id = 202; + if (cached_has_bits & 0x00002000u) { + total_size += 2 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_apn_registration_id()); + } + + // optional string bluetooth_mac_address = 302; + if (cached_has_bits & 0x00004000u) { + total_size += 2 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_bluetooth_mac_address()); + } + + // optional bytes enrollment_session_id = 1000; + if (cached_has_bits & 0x00008000u) { + total_size += 2 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_enrollment_session_id()); + } + + } + if (cached_has_bits & 0x00ff0000u) { + // optional string oauth_token = 1001; + if (cached_has_bits & 0x00010000u) { + total_size += 2 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_oauth_token()); + } + + // optional fixed64 android_device_id = 1; + if (cached_has_bits & 0x00020000u) { + total_size += 1 + 8; + } + + // optional int64 counter = 12 [default = 0]; + if (cached_has_bits & 0x00040000u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_counter()); + } + + // optional int64 device_os_version_code = 14; + if (cached_has_bits & 0x00080000u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_device_os_version_code()); + } + + // optional int64 device_software_version_code = 18; + if (cached_has_bits & 0x00100000u) { + total_size += 2 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( + this->_internal_device_software_version_code()); + } + + // optional int32 device_display_diagonal_mils = 22; + if (cached_has_bits & 0x00200000u) { + total_size += 2 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( + this->_internal_device_display_diagonal_mils()); + } + + // optional int32 device_authzen_version = 24; + if (cached_has_bits & 0x00400000u) { + total_size += 2 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( + this->_internal_device_authzen_version()); + } + + // optional bool pixel_experience = 408 [default = false]; + if (cached_has_bits & 0x00800000u) { + total_size += 2 + 1; + } + + } + if (cached_has_bits & 0xff000000u) { + // optional bool arc_plus_plus = 409 [default = false]; + if (cached_has_bits & 0x01000000u) { + total_size += 2 + 1; + } + + // optional bool is_screenlock_state_flaky = 410 [default = false]; + if (cached_has_bits & 0x02000000u) { + total_size += 2 + 1; + } + + // optional bool using_secure_screenlock = 400 [default = false]; + if (cached_has_bits & 0x04000000u) { + total_size += 2 + 1; + } + + // optional bool auto_unlock_screenlock_supported = 401 [default = false]; + if (cached_has_bits & 0x08000000u) { + total_size += 2 + 1; + } + + // optional bool auto_unlock_screenlock_enabled = 402 [default = false]; + if (cached_has_bits & 0x10000000u) { + total_size += 2 + 1; + } + + // optional bool bluetooth_radio_supported = 403 [default = false]; + if (cached_has_bits & 0x20000000u) { + total_size += 2 + 1; + } + + // optional bool bluetooth_radio_enabled = 404 [default = false]; + if (cached_has_bits & 0x40000000u) { + total_size += 2 + 1; + } + + // optional bool mobile_data_supported = 405 [default = false]; + if (cached_has_bits & 0x80000000u) { + total_size += 2 + 1; + } + + } + cached_has_bits = _has_bits_[1]; + if (cached_has_bits & 0x0000000fu) { + // optional bool tethering_supported = 406 [default = false]; + if (cached_has_bits & 0x00000001u) { + total_size += 2 + 1; + } + + // optional bool ble_radio_supported = 407 [default = false]; + if (cached_has_bits & 0x00000002u) { + total_size += 2 + 1; + } + + // optional .securegcm.DeviceType device_type = 32 [default = ANDROID]; + if (cached_has_bits & 0x00000004u) { + total_size += 2 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_device_type()); + } + + // optional bool notification_enabled = 203 [default = true]; + if (cached_has_bits & 0x00000008u) { + total_size += 2 + 1; + } + + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void GcmDeviceInfo::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void GcmDeviceInfo::MergeFrom(const GcmDeviceInfo& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:securegcm.GcmDeviceInfo) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + supported_software_features_.MergeFrom(from.supported_software_features_); + enabled_software_features_.MergeFrom(from.enabled_software_features_); + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x000000ffu) { + if (cached_has_bits & 0x00000001u) { + _internal_set_user_public_key(from._internal_user_public_key()); + } + if (cached_has_bits & 0x00000002u) { + _internal_set_device_model(from._internal_device_model()); + } + if (cached_has_bits & 0x00000004u) { + _internal_set_locale(from._internal_locale()); + } + if (cached_has_bits & 0x00000008u) { + _internal_set_key_handle(from._internal_key_handle()); + } + if (cached_has_bits & 0x00000010u) { + _internal_set_device_os_version(from._internal_device_os_version()); + } + if (cached_has_bits & 0x00000020u) { + _internal_set_device_os_release(from._internal_device_os_release()); + } + if (cached_has_bits & 0x00000040u) { + _internal_set_device_os_codename(from._internal_device_os_codename()); + } + if (cached_has_bits & 0x00000080u) { + _internal_set_device_software_version(from._internal_device_software_version()); + } + } + if (cached_has_bits & 0x0000ff00u) { + if (cached_has_bits & 0x00000100u) { + _internal_set_device_software_package(from._internal_device_software_package()); + } + if (cached_has_bits & 0x00000200u) { + _internal_set_long_device_id(from._internal_long_device_id()); + } + if (cached_has_bits & 0x00000400u) { + _internal_set_device_manufacturer(from._internal_device_manufacturer()); + } + if (cached_has_bits & 0x00000800u) { + _internal_set_gcm_registration_id(from._internal_gcm_registration_id()); + } + if (cached_has_bits & 0x00001000u) { + _internal_set_device_master_key_hash(from._internal_device_master_key_hash()); + } + if (cached_has_bits & 0x00002000u) { + _internal_set_apn_registration_id(from._internal_apn_registration_id()); + } + if (cached_has_bits & 0x00004000u) { + _internal_set_bluetooth_mac_address(from._internal_bluetooth_mac_address()); + } + if (cached_has_bits & 0x00008000u) { + _internal_set_enrollment_session_id(from._internal_enrollment_session_id()); + } + } + if (cached_has_bits & 0x00ff0000u) { + if (cached_has_bits & 0x00010000u) { + _internal_set_oauth_token(from._internal_oauth_token()); + } + if (cached_has_bits & 0x00020000u) { + android_device_id_ = from.android_device_id_; + } + if (cached_has_bits & 0x00040000u) { + counter_ = from.counter_; + } + if (cached_has_bits & 0x00080000u) { + device_os_version_code_ = from.device_os_version_code_; + } + if (cached_has_bits & 0x00100000u) { + device_software_version_code_ = from.device_software_version_code_; + } + if (cached_has_bits & 0x00200000u) { + device_display_diagonal_mils_ = from.device_display_diagonal_mils_; + } + if (cached_has_bits & 0x00400000u) { + device_authzen_version_ = from.device_authzen_version_; + } + if (cached_has_bits & 0x00800000u) { + pixel_experience_ = from.pixel_experience_; + } + _has_bits_[0] |= cached_has_bits; + } + if (cached_has_bits & 0xff000000u) { + if (cached_has_bits & 0x01000000u) { + arc_plus_plus_ = from.arc_plus_plus_; + } + if (cached_has_bits & 0x02000000u) { + is_screenlock_state_flaky_ = from.is_screenlock_state_flaky_; + } + if (cached_has_bits & 0x04000000u) { + using_secure_screenlock_ = from.using_secure_screenlock_; + } + if (cached_has_bits & 0x08000000u) { + auto_unlock_screenlock_supported_ = from.auto_unlock_screenlock_supported_; + } + if (cached_has_bits & 0x10000000u) { + auto_unlock_screenlock_enabled_ = from.auto_unlock_screenlock_enabled_; + } + if (cached_has_bits & 0x20000000u) { + bluetooth_radio_supported_ = from.bluetooth_radio_supported_; + } + if (cached_has_bits & 0x40000000u) { + bluetooth_radio_enabled_ = from.bluetooth_radio_enabled_; + } + if (cached_has_bits & 0x80000000u) { + mobile_data_supported_ = from.mobile_data_supported_; + } + _has_bits_[0] |= cached_has_bits; + } + cached_has_bits = from._has_bits_[1]; + if (cached_has_bits & 0x0000000fu) { + if (cached_has_bits & 0x00000001u) { + tethering_supported_ = from.tethering_supported_; + } + if (cached_has_bits & 0x00000002u) { + ble_radio_supported_ = from.ble_radio_supported_; + } + if (cached_has_bits & 0x00000004u) { + device_type_ = from.device_type_; + } + if (cached_has_bits & 0x00000008u) { + notification_enabled_ = from.notification_enabled_; + } + _has_bits_[1] |= cached_has_bits; + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void GcmDeviceInfo::CopyFrom(const GcmDeviceInfo& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:securegcm.GcmDeviceInfo) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool GcmDeviceInfo::IsInitialized() const { + if (_Internal::MissingRequiredFields(_has_bits_)) return false; + return true; +} + +void GcmDeviceInfo::InternalSwap(GcmDeviceInfo* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + swap(_has_bits_[1], other->_has_bits_[1]); + supported_software_features_.InternalSwap(&other->supported_software_features_); + enabled_software_features_.InternalSwap(&other->enabled_software_features_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &user_public_key_, lhs_arena, + &other->user_public_key_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &device_model_, lhs_arena, + &other->device_model_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &locale_, lhs_arena, + &other->locale_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &key_handle_, lhs_arena, + &other->key_handle_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &device_os_version_, lhs_arena, + &other->device_os_version_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &device_os_release_, lhs_arena, + &other->device_os_release_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &device_os_codename_, lhs_arena, + &other->device_os_codename_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &device_software_version_, lhs_arena, + &other->device_software_version_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &device_software_package_, lhs_arena, + &other->device_software_package_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &long_device_id_, lhs_arena, + &other->long_device_id_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &device_manufacturer_, lhs_arena, + &other->device_manufacturer_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &gcm_registration_id_, lhs_arena, + &other->gcm_registration_id_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &device_master_key_hash_, lhs_arena, + &other->device_master_key_hash_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &apn_registration_id_, lhs_arena, + &other->apn_registration_id_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &bluetooth_mac_address_, lhs_arena, + &other->bluetooth_mac_address_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &enrollment_session_id_, lhs_arena, + &other->enrollment_session_id_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &oauth_token_, lhs_arena, + &other->oauth_token_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(GcmDeviceInfo, ble_radio_supported_) + + sizeof(GcmDeviceInfo::ble_radio_supported_) + - PROTOBUF_FIELD_OFFSET(GcmDeviceInfo, android_device_id_)>( + reinterpret_cast(&android_device_id_), + reinterpret_cast(&other->android_device_id_)); + swap(device_type_, other->device_type_); + swap(notification_enabled_, other->notification_enabled_); +} + +std::string GcmDeviceInfo::GetTypeName() const { + return "securegcm.GcmDeviceInfo"; +} + + +// =================================================================== + +class GcmMetadata::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_type(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_version(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static bool MissingRequiredFields(const HasBits& has_bits) { + return ((has_bits[0] & 0x00000001) ^ 0x00000001) != 0; + } +}; + +GcmMetadata::GcmMetadata(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:securegcm.GcmMetadata) +} +GcmMetadata::GcmMetadata(const GcmMetadata& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::memcpy(&type_, &from.type_, + static_cast(reinterpret_cast(&version_) - + reinterpret_cast(&type_)) + sizeof(version_)); + // @@protoc_insertion_point(copy_constructor:securegcm.GcmMetadata) +} + +inline void GcmMetadata::SharedCtor() { +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&type_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&version_) - + reinterpret_cast(&type_)) + sizeof(version_)); +} + +GcmMetadata::~GcmMetadata() { + // @@protoc_insertion_point(destructor:securegcm.GcmMetadata) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void GcmMetadata::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); +} + +void GcmMetadata::ArenaDtor(void* object) { + GcmMetadata* _this = reinterpret_cast< GcmMetadata* >(object); + (void)_this; +} +void GcmMetadata::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void GcmMetadata::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void GcmMetadata::Clear() { +// @@protoc_insertion_point(message_clear_start:securegcm.GcmMetadata) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + ::memset(&type_, 0, static_cast( + reinterpret_cast(&version_) - + reinterpret_cast(&type_)) + sizeof(version_)); + } + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* GcmMetadata::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // required .securegcm.Type type = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::securegcm::Type_IsValid(val))) { + _internal_set_type(static_cast<::securegcm::Type>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // optional int32 version = 2 [default = 0]; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { + _Internal::set_has_version(&has_bits); + version_ = ::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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* GcmMetadata::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:securegcm.GcmMetadata) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // required .securegcm.Type type = 1; + if (cached_has_bits & 0x00000001u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 1, this->_internal_type(), target); + } + + // optional int32 version = 2 [default = 0]; + if (cached_has_bits & 0x00000002u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_version(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:securegcm.GcmMetadata) + return target; +} + +size_t GcmMetadata::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:securegcm.GcmMetadata) + size_t total_size = 0; + + // required .securegcm.Type type = 1; + if (_internal_has_type()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_type()); + } + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // optional int32 version = 2 [default = 0]; + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000002u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_version()); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void GcmMetadata::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void GcmMetadata::MergeFrom(const GcmMetadata& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:securegcm.GcmMetadata) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + type_ = from.type_; + } + if (cached_has_bits & 0x00000002u) { + version_ = from.version_; + } + _has_bits_[0] |= cached_has_bits; + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void GcmMetadata::CopyFrom(const GcmMetadata& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:securegcm.GcmMetadata) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool GcmMetadata::IsInitialized() const { + if (_Internal::MissingRequiredFields(_has_bits_)) return false; + return true; +} + +void GcmMetadata::InternalSwap(GcmMetadata* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(GcmMetadata, version_) + + sizeof(GcmMetadata::version_) + - PROTOBUF_FIELD_OFFSET(GcmMetadata, type_)>( + reinterpret_cast(&type_), + reinterpret_cast(&other->type_)); +} + +std::string GcmMetadata::GetTypeName() const { + return "securegcm.GcmMetadata"; +} + + +// =================================================================== + +class Tickle::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_expiry_time(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } +}; + +Tickle::Tickle(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:securegcm.Tickle) +} +Tickle::Tickle(const Tickle& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + expiry_time_ = from.expiry_time_; + // @@protoc_insertion_point(copy_constructor:securegcm.Tickle) +} + +inline void Tickle::SharedCtor() { +expiry_time_ = uint64_t{0u}; +} + +Tickle::~Tickle() { + // @@protoc_insertion_point(destructor:securegcm.Tickle) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void Tickle::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); +} + +void Tickle::ArenaDtor(void* object) { + Tickle* _this = reinterpret_cast< Tickle* >(object); + (void)_this; +} +void Tickle::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void Tickle::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void Tickle::Clear() { +// @@protoc_insertion_point(message_clear_start:securegcm.Tickle) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + expiry_time_ = uint64_t{0u}; + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* Tickle::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional fixed64 expiry_time = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 9)) { + _Internal::set_has_expiry_time(&has_bits); + expiry_time_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + ptr += sizeof(uint64_t); + } 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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* Tickle::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:securegcm.Tickle) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional fixed64 expiry_time = 1; + if (cached_has_bits & 0x00000001u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFixed64ToArray(1, this->_internal_expiry_time(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:securegcm.Tickle) + return target; +} + +size_t Tickle::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:securegcm.Tickle) + 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 fixed64 expiry_time = 1; + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + 8; + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void Tickle::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void Tickle::MergeFrom(const Tickle& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:securegcm.Tickle) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_has_expiry_time()) { + _internal_set_expiry_time(from._internal_expiry_time()); + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void Tickle::CopyFrom(const Tickle& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:securegcm.Tickle) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Tickle::IsInitialized() const { + return true; +} + +void Tickle::InternalSwap(Tickle* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + swap(expiry_time_, other->expiry_time_); +} + +std::string Tickle::GetTypeName() const { + return "securegcm.Tickle"; +} + + +// =================================================================== + +class LoginNotificationInfo::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_creation_time(HasBits* has_bits) { + (*has_bits)[0] |= 16u; + } + static void set_has_email(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_host(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static void set_has_source(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } + static void set_has_event_type(HasBits* has_bits) { + (*has_bits)[0] |= 8u; + } +}; + +LoginNotificationInfo::LoginNotificationInfo(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:securegcm.LoginNotificationInfo) +} +LoginNotificationInfo::LoginNotificationInfo(const LoginNotificationInfo& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + email_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + email_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_email()) { + email_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_email(), + GetArenaForAllocation()); + } + host_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + host_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_host()) { + host_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_host(), + GetArenaForAllocation()); + } + source_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + source_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_source()) { + source_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_source(), + GetArenaForAllocation()); + } + event_type_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + event_type_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_event_type()) { + event_type_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_event_type(), + GetArenaForAllocation()); + } + creation_time_ = from.creation_time_; + // @@protoc_insertion_point(copy_constructor:securegcm.LoginNotificationInfo) +} + +inline void LoginNotificationInfo::SharedCtor() { +email_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + email_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +host_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + host_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +source_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + source_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +event_type_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + event_type_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +creation_time_ = uint64_t{0u}; +} + +LoginNotificationInfo::~LoginNotificationInfo() { + // @@protoc_insertion_point(destructor:securegcm.LoginNotificationInfo) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void LoginNotificationInfo::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + email_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + host_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + source_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + event_type_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void LoginNotificationInfo::ArenaDtor(void* object) { + LoginNotificationInfo* _this = reinterpret_cast< LoginNotificationInfo* >(object); + (void)_this; +} +void LoginNotificationInfo::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void LoginNotificationInfo::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void LoginNotificationInfo::Clear() { +// @@protoc_insertion_point(message_clear_start:securegcm.LoginNotificationInfo) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x0000000fu) { + if (cached_has_bits & 0x00000001u) { + email_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000002u) { + host_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000004u) { + source_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000008u) { + event_type_.ClearNonDefaultToEmpty(); + } + } + creation_time_ = uint64_t{0u}; + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* LoginNotificationInfo::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional fixed64 creation_time = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 17)) { + _Internal::set_has_creation_time(&has_bits); + creation_time_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + ptr += sizeof(uint64_t); + } else + goto handle_unusual; + continue; + // optional string email = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { + auto str = _internal_mutable_email(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional string host = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { + auto str = _internal_mutable_host(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional string source = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 42)) { + auto str = _internal_mutable_source(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional string event_type = 6; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 50)) { + auto str = _internal_mutable_event_type(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* LoginNotificationInfo::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:securegcm.LoginNotificationInfo) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional fixed64 creation_time = 2; + if (cached_has_bits & 0x00000010u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFixed64ToArray(2, this->_internal_creation_time(), target); + } + + // optional string email = 3; + if (cached_has_bits & 0x00000001u) { + target = stream->WriteStringMaybeAliased( + 3, this->_internal_email(), target); + } + + // optional string host = 4; + if (cached_has_bits & 0x00000002u) { + target = stream->WriteStringMaybeAliased( + 4, this->_internal_host(), target); + } + + // optional string source = 5; + if (cached_has_bits & 0x00000004u) { + target = stream->WriteStringMaybeAliased( + 5, this->_internal_source(), target); + } + + // optional string event_type = 6; + if (cached_has_bits & 0x00000008u) { + target = stream->WriteStringMaybeAliased( + 6, this->_internal_event_type(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:securegcm.LoginNotificationInfo) + return target; +} + +size_t LoginNotificationInfo::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:securegcm.LoginNotificationInfo) + 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 = _has_bits_[0]; + if (cached_has_bits & 0x0000001fu) { + // optional string email = 3; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_email()); + } + + // optional string host = 4; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_host()); + } + + // optional string source = 5; + if (cached_has_bits & 0x00000004u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_source()); + } + + // optional string event_type = 6; + if (cached_has_bits & 0x00000008u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_event_type()); + } + + // optional fixed64 creation_time = 2; + if (cached_has_bits & 0x00000010u) { + total_size += 1 + 8; + } + + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void LoginNotificationInfo::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void LoginNotificationInfo::MergeFrom(const LoginNotificationInfo& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:securegcm.LoginNotificationInfo) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x0000001fu) { + if (cached_has_bits & 0x00000001u) { + _internal_set_email(from._internal_email()); + } + if (cached_has_bits & 0x00000002u) { + _internal_set_host(from._internal_host()); + } + if (cached_has_bits & 0x00000004u) { + _internal_set_source(from._internal_source()); + } + if (cached_has_bits & 0x00000008u) { + _internal_set_event_type(from._internal_event_type()); + } + if (cached_has_bits & 0x00000010u) { + creation_time_ = from.creation_time_; + } + _has_bits_[0] |= cached_has_bits; + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void LoginNotificationInfo::CopyFrom(const LoginNotificationInfo& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:securegcm.LoginNotificationInfo) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool LoginNotificationInfo::IsInitialized() const { + return true; +} + +void LoginNotificationInfo::InternalSwap(LoginNotificationInfo* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &email_, lhs_arena, + &other->email_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &host_, lhs_arena, + &other->host_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &source_, lhs_arena, + &other->source_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &event_type_, lhs_arena, + &other->event_type_, rhs_arena + ); + swap(creation_time_, other->creation_time_); +} + +std::string LoginNotificationInfo::GetTypeName() const { + return "securegcm.LoginNotificationInfo"; +} + + +// @@protoc_insertion_point(namespace_scope) +} // namespace securegcm +PROTOBUF_NAMESPACE_OPEN +template<> PROTOBUF_NOINLINE ::securegcm::GcmDeviceInfo* Arena::CreateMaybeMessage< ::securegcm::GcmDeviceInfo >(Arena* arena) { + return Arena::CreateMessageInternal< ::securegcm::GcmDeviceInfo >(arena); +} +template<> PROTOBUF_NOINLINE ::securegcm::GcmMetadata* Arena::CreateMaybeMessage< ::securegcm::GcmMetadata >(Arena* arena) { + return Arena::CreateMessageInternal< ::securegcm::GcmMetadata >(arena); +} +template<> PROTOBUF_NOINLINE ::securegcm::Tickle* Arena::CreateMaybeMessage< ::securegcm::Tickle >(Arena* arena) { + return Arena::CreateMessageInternal< ::securegcm::Tickle >(arena); +} +template<> PROTOBUF_NOINLINE ::securegcm::LoginNotificationInfo* Arena::CreateMaybeMessage< ::securegcm::LoginNotificationInfo >(Arena* arena) { + return Arena::CreateMessageInternal< ::securegcm::LoginNotificationInfo >(arena); +} +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) +#include diff --git a/third_party/ukey2/compiled_proto/proto/securegcm.pb.h b/third_party/ukey2/compiled_proto/proto/securegcm.pb.h new file mode 100644 index 00000000..b56caf75 --- /dev/null +++ b/third_party/ukey2/compiled_proto/proto/securegcm.pb.h @@ -0,0 +1,3756 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: proto/securegcm.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_proto_2fsecuregcm_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_proto_2fsecuregcm_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3019000 +#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 3019004 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_proto_2fsecuregcm_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_proto_2fsecuregcm_2eproto { + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::AuxiliaryParseTableField aux[] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[4] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[]; + static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[]; + static const uint32_t offsets[]; +}; +namespace securegcm { +class GcmDeviceInfo; +struct GcmDeviceInfoDefaultTypeInternal; +extern GcmDeviceInfoDefaultTypeInternal _GcmDeviceInfo_default_instance_; +class GcmMetadata; +struct GcmMetadataDefaultTypeInternal; +extern GcmMetadataDefaultTypeInternal _GcmMetadata_default_instance_; +class LoginNotificationInfo; +struct LoginNotificationInfoDefaultTypeInternal; +extern LoginNotificationInfoDefaultTypeInternal _LoginNotificationInfo_default_instance_; +class Tickle; +struct TickleDefaultTypeInternal; +extern TickleDefaultTypeInternal _Tickle_default_instance_; +} // namespace securegcm +PROTOBUF_NAMESPACE_OPEN +template<> ::securegcm::GcmDeviceInfo* Arena::CreateMaybeMessage<::securegcm::GcmDeviceInfo>(Arena*); +template<> ::securegcm::GcmMetadata* Arena::CreateMaybeMessage<::securegcm::GcmMetadata>(Arena*); +template<> ::securegcm::LoginNotificationInfo* Arena::CreateMaybeMessage<::securegcm::LoginNotificationInfo>(Arena*); +template<> ::securegcm::Tickle* Arena::CreateMaybeMessage<::securegcm::Tickle>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace securegcm { + +enum AppleDeviceDiagonalMils : int { + APPLE_PHONE = 4000, + APPLE_PAD = 7900 +}; +bool AppleDeviceDiagonalMils_IsValid(int value); +constexpr AppleDeviceDiagonalMils AppleDeviceDiagonalMils_MIN = APPLE_PHONE; +constexpr AppleDeviceDiagonalMils AppleDeviceDiagonalMils_MAX = APPLE_PAD; +constexpr int AppleDeviceDiagonalMils_ARRAYSIZE = AppleDeviceDiagonalMils_MAX + 1; + +const std::string& AppleDeviceDiagonalMils_Name(AppleDeviceDiagonalMils value); +template +inline const std::string& AppleDeviceDiagonalMils_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function AppleDeviceDiagonalMils_Name."); + return AppleDeviceDiagonalMils_Name(static_cast(enum_t_value)); +} +bool AppleDeviceDiagonalMils_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, AppleDeviceDiagonalMils* value); +enum DeviceType : int { + UNKNOWN = 0, + ANDROID = 1, + CHROME = 2, + IOS = 3, + BROWSER = 4, + OSX = 5 +}; +bool DeviceType_IsValid(int value); +constexpr DeviceType DeviceType_MIN = UNKNOWN; +constexpr DeviceType DeviceType_MAX = OSX; +constexpr int DeviceType_ARRAYSIZE = DeviceType_MAX + 1; + +const std::string& DeviceType_Name(DeviceType value); +template +inline const std::string& DeviceType_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function DeviceType_Name."); + return DeviceType_Name(static_cast(enum_t_value)); +} +bool DeviceType_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, DeviceType* value); +enum SoftwareFeature : int { + UNKNOWN_FEATURE = 0, + BETTER_TOGETHER_HOST = 1, + BETTER_TOGETHER_CLIENT = 2, + EASY_UNLOCK_HOST = 3, + EASY_UNLOCK_CLIENT = 4, + MAGIC_TETHER_HOST = 5, + MAGIC_TETHER_CLIENT = 6, + SMS_CONNECT_HOST = 7, + SMS_CONNECT_CLIENT = 8 +}; +bool SoftwareFeature_IsValid(int value); +constexpr SoftwareFeature SoftwareFeature_MIN = UNKNOWN_FEATURE; +constexpr SoftwareFeature SoftwareFeature_MAX = SMS_CONNECT_CLIENT; +constexpr int SoftwareFeature_ARRAYSIZE = SoftwareFeature_MAX + 1; + +const std::string& SoftwareFeature_Name(SoftwareFeature value); +template +inline const std::string& SoftwareFeature_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function SoftwareFeature_Name."); + return SoftwareFeature_Name(static_cast(enum_t_value)); +} +bool SoftwareFeature_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, SoftwareFeature* value); +enum InvocationReason : int { + REASON_UNKNOWN = 0, + REASON_INITIALIZATION = 1, + REASON_PERIODIC = 2, + REASON_SLOW_PERIODIC = 3, + REASON_FAST_PERIODIC = 4, + REASON_EXPIRATION = 5, + REASON_FAILURE_RECOVERY = 6, + REASON_NEW_ACCOUNT = 7, + REASON_CHANGED_ACCOUNT = 8, + REASON_FEATURE_TOGGLED = 9, + REASON_SERVER_INITIATED = 10, + REASON_ADDRESS_CHANGE = 11, + REASON_SOFTWARE_UPDATE = 12, + REASON_MANUAL = 13, + REASON_CUSTOM_KEY_INVALIDATION = 14, + REASON_PROXIMITY_PERIODIC = 15 +}; +bool InvocationReason_IsValid(int value); +constexpr InvocationReason InvocationReason_MIN = REASON_UNKNOWN; +constexpr InvocationReason InvocationReason_MAX = REASON_PROXIMITY_PERIODIC; +constexpr int InvocationReason_ARRAYSIZE = InvocationReason_MAX + 1; + +const std::string& InvocationReason_Name(InvocationReason value); +template +inline const std::string& InvocationReason_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function InvocationReason_Name."); + return InvocationReason_Name(static_cast(enum_t_value)); +} +bool InvocationReason_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, InvocationReason* value); +enum Type : int { + ENROLLMENT = 0, + TICKLE = 1, + TX_REQUEST = 2, + TX_REPLY = 3, + TX_SYNC_REQUEST = 4, + TX_SYNC_RESPONSE = 5, + TX_PING = 6, + DEVICE_INFO_UPDATE = 7, + TX_CANCEL_REQUEST = 8, + PROXIMITYAUTH_PAIRING = 10, + GCMV1_IDENTITY_ASSERTION = 11, + DEVICE_TO_DEVICE_RESPONDER_HELLO_PAYLOAD = 12, + DEVICE_TO_DEVICE_MESSAGE = 13, + DEVICE_PROXIMITY_CALLBACK = 14, + UNLOCK_KEY_SIGNED_CHALLENGE = 15, + LOGIN_NOTIFICATION = 101 +}; +bool Type_IsValid(int value); +constexpr Type Type_MIN = ENROLLMENT; +constexpr Type Type_MAX = LOGIN_NOTIFICATION; +constexpr int Type_ARRAYSIZE = Type_MAX + 1; + +const std::string& Type_Name(Type value); +template +inline const std::string& Type_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function Type_Name."); + return Type_Name(static_cast(enum_t_value)); +} +bool Type_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, Type* value); +// =================================================================== + +class GcmDeviceInfo final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:securegcm.GcmDeviceInfo) */ { + public: + inline GcmDeviceInfo() : GcmDeviceInfo(nullptr) {} + ~GcmDeviceInfo() override; + explicit constexpr GcmDeviceInfo(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + GcmDeviceInfo(const GcmDeviceInfo& from); + GcmDeviceInfo(GcmDeviceInfo&& from) noexcept + : GcmDeviceInfo() { + *this = ::std::move(from); + } + + inline GcmDeviceInfo& operator=(const GcmDeviceInfo& from) { + CopyFrom(from); + return *this; + } + inline GcmDeviceInfo& operator=(GcmDeviceInfo&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const GcmDeviceInfo& default_instance() { + return *internal_default_instance(); + } + static inline const GcmDeviceInfo* internal_default_instance() { + return reinterpret_cast( + &_GcmDeviceInfo_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(GcmDeviceInfo& a, GcmDeviceInfo& b) { + a.Swap(&b); + } + inline void Swap(GcmDeviceInfo* 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(GcmDeviceInfo* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + GcmDeviceInfo* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const GcmDeviceInfo& from); + void MergeFrom(const GcmDeviceInfo& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(GcmDeviceInfo* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "securegcm.GcmDeviceInfo"; + } + protected: + explicit GcmDeviceInfo(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kSupportedSoftwareFeaturesFieldNumber = 411, + kEnabledSoftwareFeaturesFieldNumber = 412, + kUserPublicKeyFieldNumber = 4, + kDeviceModelFieldNumber = 7, + kLocaleFieldNumber = 8, + kKeyHandleFieldNumber = 9, + kDeviceOsVersionFieldNumber = 13, + kDeviceOsReleaseFieldNumber = 15, + kDeviceOsCodenameFieldNumber = 16, + kDeviceSoftwareVersionFieldNumber = 17, + kDeviceSoftwarePackageFieldNumber = 19, + kLongDeviceIdFieldNumber = 29, + kDeviceManufacturerFieldNumber = 31, + kGcmRegistrationIdFieldNumber = 102, + kDeviceMasterKeyHashFieldNumber = 103, + kApnRegistrationIdFieldNumber = 202, + kBluetoothMacAddressFieldNumber = 302, + kEnrollmentSessionIdFieldNumber = 1000, + kOauthTokenFieldNumber = 1001, + kAndroidDeviceIdFieldNumber = 1, + kCounterFieldNumber = 12, + kDeviceOsVersionCodeFieldNumber = 14, + kDeviceSoftwareVersionCodeFieldNumber = 18, + kDeviceDisplayDiagonalMilsFieldNumber = 22, + kDeviceAuthzenVersionFieldNumber = 24, + kPixelExperienceFieldNumber = 408, + kArcPlusPlusFieldNumber = 409, + kIsScreenlockStateFlakyFieldNumber = 410, + kUsingSecureScreenlockFieldNumber = 400, + kAutoUnlockScreenlockSupportedFieldNumber = 401, + kAutoUnlockScreenlockEnabledFieldNumber = 402, + kBluetoothRadioSupportedFieldNumber = 403, + kBluetoothRadioEnabledFieldNumber = 404, + kMobileDataSupportedFieldNumber = 405, + kTetheringSupportedFieldNumber = 406, + kBleRadioSupportedFieldNumber = 407, + kDeviceTypeFieldNumber = 32, + kNotificationEnabledFieldNumber = 203, + }; + // repeated .securegcm.SoftwareFeature supported_software_features = 411; + int supported_software_features_size() const; + private: + int _internal_supported_software_features_size() const; + public: + void clear_supported_software_features(); + private: + ::securegcm::SoftwareFeature _internal_supported_software_features(int index) const; + void _internal_add_supported_software_features(::securegcm::SoftwareFeature value); + ::PROTOBUF_NAMESPACE_ID::RepeatedField* _internal_mutable_supported_software_features(); + public: + ::securegcm::SoftwareFeature supported_software_features(int index) const; + void set_supported_software_features(int index, ::securegcm::SoftwareFeature value); + void add_supported_software_features(::securegcm::SoftwareFeature value); + const ::PROTOBUF_NAMESPACE_ID::RepeatedField& supported_software_features() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedField* mutable_supported_software_features(); + + // repeated .securegcm.SoftwareFeature enabled_software_features = 412; + int enabled_software_features_size() const; + private: + int _internal_enabled_software_features_size() const; + public: + void clear_enabled_software_features(); + private: + ::securegcm::SoftwareFeature _internal_enabled_software_features(int index) const; + void _internal_add_enabled_software_features(::securegcm::SoftwareFeature value); + ::PROTOBUF_NAMESPACE_ID::RepeatedField* _internal_mutable_enabled_software_features(); + public: + ::securegcm::SoftwareFeature enabled_software_features(int index) const; + void set_enabled_software_features(int index, ::securegcm::SoftwareFeature value); + void add_enabled_software_features(::securegcm::SoftwareFeature value); + const ::PROTOBUF_NAMESPACE_ID::RepeatedField& enabled_software_features() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedField* mutable_enabled_software_features(); + + // required bytes user_public_key = 4; + bool has_user_public_key() const; + private: + bool _internal_has_user_public_key() const; + public: + void clear_user_public_key(); + const std::string& user_public_key() const; + template + void set_user_public_key(ArgT0&& arg0, ArgT... args); + std::string* mutable_user_public_key(); + PROTOBUF_NODISCARD std::string* release_user_public_key(); + void set_allocated_user_public_key(std::string* user_public_key); + private: + const std::string& _internal_user_public_key() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_user_public_key(const std::string& value); + std::string* _internal_mutable_user_public_key(); + public: + + // optional string device_model = 7; + bool has_device_model() const; + private: + bool _internal_has_device_model() const; + public: + void clear_device_model(); + const std::string& device_model() const; + template + void set_device_model(ArgT0&& arg0, ArgT... args); + std::string* mutable_device_model(); + PROTOBUF_NODISCARD std::string* release_device_model(); + void set_allocated_device_model(std::string* device_model); + private: + const std::string& _internal_device_model() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_device_model(const std::string& value); + std::string* _internal_mutable_device_model(); + public: + + // optional string locale = 8; + bool has_locale() const; + private: + bool _internal_has_locale() const; + public: + void clear_locale(); + const std::string& locale() const; + template + void set_locale(ArgT0&& arg0, ArgT... args); + std::string* mutable_locale(); + PROTOBUF_NODISCARD std::string* release_locale(); + void set_allocated_locale(std::string* locale); + private: + const std::string& _internal_locale() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_locale(const std::string& value); + std::string* _internal_mutable_locale(); + public: + + // optional bytes key_handle = 9; + bool has_key_handle() const; + private: + bool _internal_has_key_handle() const; + public: + void clear_key_handle(); + const std::string& key_handle() const; + template + void set_key_handle(ArgT0&& arg0, ArgT... args); + std::string* mutable_key_handle(); + PROTOBUF_NODISCARD std::string* release_key_handle(); + void set_allocated_key_handle(std::string* key_handle); + private: + const std::string& _internal_key_handle() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_key_handle(const std::string& value); + std::string* _internal_mutable_key_handle(); + public: + + // optional string device_os_version = 13; + bool has_device_os_version() const; + private: + bool _internal_has_device_os_version() const; + public: + void clear_device_os_version(); + const std::string& device_os_version() const; + template + void set_device_os_version(ArgT0&& arg0, ArgT... args); + std::string* mutable_device_os_version(); + PROTOBUF_NODISCARD std::string* release_device_os_version(); + void set_allocated_device_os_version(std::string* device_os_version); + private: + const std::string& _internal_device_os_version() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_device_os_version(const std::string& value); + std::string* _internal_mutable_device_os_version(); + public: + + // optional string device_os_release = 15; + bool has_device_os_release() const; + private: + bool _internal_has_device_os_release() const; + public: + void clear_device_os_release(); + const std::string& device_os_release() const; + template + void set_device_os_release(ArgT0&& arg0, ArgT... args); + std::string* mutable_device_os_release(); + PROTOBUF_NODISCARD std::string* release_device_os_release(); + void set_allocated_device_os_release(std::string* device_os_release); + private: + const std::string& _internal_device_os_release() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_device_os_release(const std::string& value); + std::string* _internal_mutable_device_os_release(); + public: + + // optional string device_os_codename = 16; + bool has_device_os_codename() const; + private: + bool _internal_has_device_os_codename() const; + public: + void clear_device_os_codename(); + const std::string& device_os_codename() const; + template + void set_device_os_codename(ArgT0&& arg0, ArgT... args); + std::string* mutable_device_os_codename(); + PROTOBUF_NODISCARD std::string* release_device_os_codename(); + void set_allocated_device_os_codename(std::string* device_os_codename); + private: + const std::string& _internal_device_os_codename() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_device_os_codename(const std::string& value); + std::string* _internal_mutable_device_os_codename(); + public: + + // optional string device_software_version = 17; + bool has_device_software_version() const; + private: + bool _internal_has_device_software_version() const; + public: + void clear_device_software_version(); + const std::string& device_software_version() const; + template + void set_device_software_version(ArgT0&& arg0, ArgT... args); + std::string* mutable_device_software_version(); + PROTOBUF_NODISCARD std::string* release_device_software_version(); + void set_allocated_device_software_version(std::string* device_software_version); + private: + const std::string& _internal_device_software_version() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_device_software_version(const std::string& value); + std::string* _internal_mutable_device_software_version(); + public: + + // optional string device_software_package = 19; + bool has_device_software_package() const; + private: + bool _internal_has_device_software_package() const; + public: + void clear_device_software_package(); + const std::string& device_software_package() const; + template + void set_device_software_package(ArgT0&& arg0, ArgT... args); + std::string* mutable_device_software_package(); + PROTOBUF_NODISCARD std::string* release_device_software_package(); + void set_allocated_device_software_package(std::string* device_software_package); + private: + const std::string& _internal_device_software_package() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_device_software_package(const std::string& value); + std::string* _internal_mutable_device_software_package(); + public: + + // optional bytes long_device_id = 29; + bool has_long_device_id() const; + private: + bool _internal_has_long_device_id() const; + public: + void clear_long_device_id(); + const std::string& long_device_id() const; + template + void set_long_device_id(ArgT0&& arg0, ArgT... args); + std::string* mutable_long_device_id(); + PROTOBUF_NODISCARD std::string* release_long_device_id(); + void set_allocated_long_device_id(std::string* long_device_id); + private: + const std::string& _internal_long_device_id() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_long_device_id(const std::string& value); + std::string* _internal_mutable_long_device_id(); + public: + + // optional string device_manufacturer = 31; + bool has_device_manufacturer() const; + private: + bool _internal_has_device_manufacturer() const; + public: + void clear_device_manufacturer(); + const std::string& device_manufacturer() const; + template + void set_device_manufacturer(ArgT0&& arg0, ArgT... args); + std::string* mutable_device_manufacturer(); + PROTOBUF_NODISCARD std::string* release_device_manufacturer(); + void set_allocated_device_manufacturer(std::string* device_manufacturer); + private: + const std::string& _internal_device_manufacturer() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_device_manufacturer(const std::string& value); + std::string* _internal_mutable_device_manufacturer(); + public: + + // optional bytes gcm_registration_id = 102; + bool has_gcm_registration_id() const; + private: + bool _internal_has_gcm_registration_id() const; + public: + void clear_gcm_registration_id(); + const std::string& gcm_registration_id() const; + template + void set_gcm_registration_id(ArgT0&& arg0, ArgT... args); + std::string* mutable_gcm_registration_id(); + PROTOBUF_NODISCARD std::string* release_gcm_registration_id(); + void set_allocated_gcm_registration_id(std::string* gcm_registration_id); + private: + const std::string& _internal_gcm_registration_id() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_gcm_registration_id(const std::string& value); + std::string* _internal_mutable_gcm_registration_id(); + public: + + // optional bytes device_master_key_hash = 103; + bool has_device_master_key_hash() const; + private: + bool _internal_has_device_master_key_hash() const; + public: + void clear_device_master_key_hash(); + const std::string& device_master_key_hash() const; + template + void set_device_master_key_hash(ArgT0&& arg0, ArgT... args); + std::string* mutable_device_master_key_hash(); + PROTOBUF_NODISCARD std::string* release_device_master_key_hash(); + void set_allocated_device_master_key_hash(std::string* device_master_key_hash); + private: + const std::string& _internal_device_master_key_hash() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_device_master_key_hash(const std::string& value); + std::string* _internal_mutable_device_master_key_hash(); + public: + + // optional bytes apn_registration_id = 202; + bool has_apn_registration_id() const; + private: + bool _internal_has_apn_registration_id() const; + public: + void clear_apn_registration_id(); + const std::string& apn_registration_id() const; + template + void set_apn_registration_id(ArgT0&& arg0, ArgT... args); + std::string* mutable_apn_registration_id(); + PROTOBUF_NODISCARD std::string* release_apn_registration_id(); + void set_allocated_apn_registration_id(std::string* apn_registration_id); + private: + const std::string& _internal_apn_registration_id() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_apn_registration_id(const std::string& value); + std::string* _internal_mutable_apn_registration_id(); + public: + + // optional string bluetooth_mac_address = 302; + bool has_bluetooth_mac_address() const; + private: + bool _internal_has_bluetooth_mac_address() const; + public: + void clear_bluetooth_mac_address(); + const std::string& bluetooth_mac_address() const; + template + void set_bluetooth_mac_address(ArgT0&& arg0, ArgT... args); + std::string* mutable_bluetooth_mac_address(); + PROTOBUF_NODISCARD std::string* release_bluetooth_mac_address(); + void set_allocated_bluetooth_mac_address(std::string* bluetooth_mac_address); + private: + const std::string& _internal_bluetooth_mac_address() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_bluetooth_mac_address(const std::string& value); + std::string* _internal_mutable_bluetooth_mac_address(); + public: + + // optional bytes enrollment_session_id = 1000; + bool has_enrollment_session_id() const; + private: + bool _internal_has_enrollment_session_id() const; + public: + void clear_enrollment_session_id(); + const std::string& enrollment_session_id() const; + template + void set_enrollment_session_id(ArgT0&& arg0, ArgT... args); + std::string* mutable_enrollment_session_id(); + PROTOBUF_NODISCARD std::string* release_enrollment_session_id(); + void set_allocated_enrollment_session_id(std::string* enrollment_session_id); + private: + const std::string& _internal_enrollment_session_id() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_enrollment_session_id(const std::string& value); + std::string* _internal_mutable_enrollment_session_id(); + public: + + // optional string oauth_token = 1001; + bool has_oauth_token() const; + private: + bool _internal_has_oauth_token() const; + public: + void clear_oauth_token(); + const std::string& oauth_token() const; + template + void set_oauth_token(ArgT0&& arg0, ArgT... args); + std::string* mutable_oauth_token(); + PROTOBUF_NODISCARD std::string* release_oauth_token(); + void set_allocated_oauth_token(std::string* oauth_token); + private: + const std::string& _internal_oauth_token() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_oauth_token(const std::string& value); + std::string* _internal_mutable_oauth_token(); + public: + + // optional fixed64 android_device_id = 1; + bool has_android_device_id() const; + private: + bool _internal_has_android_device_id() const; + public: + void clear_android_device_id(); + uint64_t android_device_id() const; + void set_android_device_id(uint64_t value); + private: + uint64_t _internal_android_device_id() const; + void _internal_set_android_device_id(uint64_t value); + public: + + // optional int64 counter = 12 [default = 0]; + bool has_counter() const; + private: + bool _internal_has_counter() const; + public: + void clear_counter(); + int64_t counter() const; + void set_counter(int64_t value); + private: + int64_t _internal_counter() const; + void _internal_set_counter(int64_t value); + public: + + // optional int64 device_os_version_code = 14; + bool has_device_os_version_code() const; + private: + bool _internal_has_device_os_version_code() const; + public: + void clear_device_os_version_code(); + int64_t device_os_version_code() const; + void set_device_os_version_code(int64_t value); + private: + int64_t _internal_device_os_version_code() const; + void _internal_set_device_os_version_code(int64_t value); + public: + + // optional int64 device_software_version_code = 18; + bool has_device_software_version_code() const; + private: + bool _internal_has_device_software_version_code() const; + public: + void clear_device_software_version_code(); + int64_t device_software_version_code() const; + void set_device_software_version_code(int64_t value); + private: + int64_t _internal_device_software_version_code() const; + void _internal_set_device_software_version_code(int64_t value); + public: + + // optional int32 device_display_diagonal_mils = 22; + bool has_device_display_diagonal_mils() const; + private: + bool _internal_has_device_display_diagonal_mils() const; + public: + void clear_device_display_diagonal_mils(); + int32_t device_display_diagonal_mils() const; + void set_device_display_diagonal_mils(int32_t value); + private: + int32_t _internal_device_display_diagonal_mils() const; + void _internal_set_device_display_diagonal_mils(int32_t value); + public: + + // optional int32 device_authzen_version = 24; + bool has_device_authzen_version() const; + private: + bool _internal_has_device_authzen_version() const; + public: + void clear_device_authzen_version(); + int32_t device_authzen_version() const; + void set_device_authzen_version(int32_t value); + private: + int32_t _internal_device_authzen_version() const; + void _internal_set_device_authzen_version(int32_t value); + public: + + // optional bool pixel_experience = 408 [default = false]; + bool has_pixel_experience() const; + private: + bool _internal_has_pixel_experience() const; + public: + void clear_pixel_experience(); + bool pixel_experience() const; + void set_pixel_experience(bool value); + private: + bool _internal_pixel_experience() const; + void _internal_set_pixel_experience(bool value); + public: + + // optional bool arc_plus_plus = 409 [default = false]; + bool has_arc_plus_plus() const; + private: + bool _internal_has_arc_plus_plus() const; + public: + void clear_arc_plus_plus(); + bool arc_plus_plus() const; + void set_arc_plus_plus(bool value); + private: + bool _internal_arc_plus_plus() const; + void _internal_set_arc_plus_plus(bool value); + public: + + // optional bool is_screenlock_state_flaky = 410 [default = false]; + bool has_is_screenlock_state_flaky() const; + private: + bool _internal_has_is_screenlock_state_flaky() const; + public: + void clear_is_screenlock_state_flaky(); + bool is_screenlock_state_flaky() const; + void set_is_screenlock_state_flaky(bool value); + private: + bool _internal_is_screenlock_state_flaky() const; + void _internal_set_is_screenlock_state_flaky(bool value); + public: + + // optional bool using_secure_screenlock = 400 [default = false]; + bool has_using_secure_screenlock() const; + private: + bool _internal_has_using_secure_screenlock() const; + public: + void clear_using_secure_screenlock(); + bool using_secure_screenlock() const; + void set_using_secure_screenlock(bool value); + private: + bool _internal_using_secure_screenlock() const; + void _internal_set_using_secure_screenlock(bool value); + public: + + // optional bool auto_unlock_screenlock_supported = 401 [default = false]; + bool has_auto_unlock_screenlock_supported() const; + private: + bool _internal_has_auto_unlock_screenlock_supported() const; + public: + void clear_auto_unlock_screenlock_supported(); + bool auto_unlock_screenlock_supported() const; + void set_auto_unlock_screenlock_supported(bool value); + private: + bool _internal_auto_unlock_screenlock_supported() const; + void _internal_set_auto_unlock_screenlock_supported(bool value); + public: + + // optional bool auto_unlock_screenlock_enabled = 402 [default = false]; + bool has_auto_unlock_screenlock_enabled() const; + private: + bool _internal_has_auto_unlock_screenlock_enabled() const; + public: + void clear_auto_unlock_screenlock_enabled(); + bool auto_unlock_screenlock_enabled() const; + void set_auto_unlock_screenlock_enabled(bool value); + private: + bool _internal_auto_unlock_screenlock_enabled() const; + void _internal_set_auto_unlock_screenlock_enabled(bool value); + public: + + // optional bool bluetooth_radio_supported = 403 [default = false]; + bool has_bluetooth_radio_supported() const; + private: + bool _internal_has_bluetooth_radio_supported() const; + public: + void clear_bluetooth_radio_supported(); + bool bluetooth_radio_supported() const; + void set_bluetooth_radio_supported(bool value); + private: + bool _internal_bluetooth_radio_supported() const; + void _internal_set_bluetooth_radio_supported(bool value); + public: + + // optional bool bluetooth_radio_enabled = 404 [default = false]; + bool has_bluetooth_radio_enabled() const; + private: + bool _internal_has_bluetooth_radio_enabled() const; + public: + void clear_bluetooth_radio_enabled(); + bool bluetooth_radio_enabled() const; + void set_bluetooth_radio_enabled(bool value); + private: + bool _internal_bluetooth_radio_enabled() const; + void _internal_set_bluetooth_radio_enabled(bool value); + public: + + // optional bool mobile_data_supported = 405 [default = false]; + bool has_mobile_data_supported() const; + private: + bool _internal_has_mobile_data_supported() const; + public: + void clear_mobile_data_supported(); + bool mobile_data_supported() const; + void set_mobile_data_supported(bool value); + private: + bool _internal_mobile_data_supported() const; + void _internal_set_mobile_data_supported(bool value); + public: + + // optional bool tethering_supported = 406 [default = false]; + bool has_tethering_supported() const; + private: + bool _internal_has_tethering_supported() const; + public: + void clear_tethering_supported(); + bool tethering_supported() const; + void set_tethering_supported(bool value); + private: + bool _internal_tethering_supported() const; + void _internal_set_tethering_supported(bool value); + public: + + // optional bool ble_radio_supported = 407 [default = false]; + bool has_ble_radio_supported() const; + private: + bool _internal_has_ble_radio_supported() const; + public: + void clear_ble_radio_supported(); + bool ble_radio_supported() const; + void set_ble_radio_supported(bool value); + private: + bool _internal_ble_radio_supported() const; + void _internal_set_ble_radio_supported(bool value); + public: + + // optional .securegcm.DeviceType device_type = 32 [default = ANDROID]; + bool has_device_type() const; + private: + bool _internal_has_device_type() const; + public: + void clear_device_type(); + ::securegcm::DeviceType device_type() const; + void set_device_type(::securegcm::DeviceType value); + private: + ::securegcm::DeviceType _internal_device_type() const; + void _internal_set_device_type(::securegcm::DeviceType value); + public: + + // optional bool notification_enabled = 203 [default = true]; + bool has_notification_enabled() const; + private: + bool _internal_has_notification_enabled() const; + public: + void clear_notification_enabled(); + bool notification_enabled() const; + void set_notification_enabled(bool value); + private: + bool _internal_notification_enabled() const; + void _internal_set_notification_enabled(bool value); + public: + + // @@protoc_insertion_point(class_scope:securegcm.GcmDeviceInfo) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<2> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::RepeatedField supported_software_features_; + ::PROTOBUF_NAMESPACE_ID::RepeatedField enabled_software_features_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr user_public_key_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr device_model_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr locale_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr key_handle_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr device_os_version_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr device_os_release_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr device_os_codename_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr device_software_version_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr device_software_package_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr long_device_id_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr device_manufacturer_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr gcm_registration_id_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr device_master_key_hash_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr apn_registration_id_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr bluetooth_mac_address_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr enrollment_session_id_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr oauth_token_; + uint64_t android_device_id_; + int64_t counter_; + int64_t device_os_version_code_; + int64_t device_software_version_code_; + int32_t device_display_diagonal_mils_; + int32_t device_authzen_version_; + bool pixel_experience_; + bool arc_plus_plus_; + bool is_screenlock_state_flaky_; + bool using_secure_screenlock_; + bool auto_unlock_screenlock_supported_; + bool auto_unlock_screenlock_enabled_; + bool bluetooth_radio_supported_; + bool bluetooth_radio_enabled_; + bool mobile_data_supported_; + bool tethering_supported_; + bool ble_radio_supported_; + int device_type_; + bool notification_enabled_; + friend struct ::TableStruct_proto_2fsecuregcm_2eproto; +}; +// ------------------------------------------------------------------- + +class GcmMetadata final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:securegcm.GcmMetadata) */ { + public: + inline GcmMetadata() : GcmMetadata(nullptr) {} + ~GcmMetadata() override; + explicit constexpr GcmMetadata(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + GcmMetadata(const GcmMetadata& from); + GcmMetadata(GcmMetadata&& from) noexcept + : GcmMetadata() { + *this = ::std::move(from); + } + + inline GcmMetadata& operator=(const GcmMetadata& from) { + CopyFrom(from); + return *this; + } + inline GcmMetadata& operator=(GcmMetadata&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const GcmMetadata& default_instance() { + return *internal_default_instance(); + } + static inline const GcmMetadata* internal_default_instance() { + return reinterpret_cast( + &_GcmMetadata_default_instance_); + } + static constexpr int kIndexInFileMessages = + 1; + + friend void swap(GcmMetadata& a, GcmMetadata& b) { + a.Swap(&b); + } + inline void Swap(GcmMetadata* 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(GcmMetadata* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + GcmMetadata* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const GcmMetadata& from); + void MergeFrom(const GcmMetadata& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(GcmMetadata* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "securegcm.GcmMetadata"; + } + protected: + explicit GcmMetadata(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kTypeFieldNumber = 1, + kVersionFieldNumber = 2, + }; + // required .securegcm.Type type = 1; + bool has_type() const; + private: + bool _internal_has_type() const; + public: + void clear_type(); + ::securegcm::Type type() const; + void set_type(::securegcm::Type value); + private: + ::securegcm::Type _internal_type() const; + void _internal_set_type(::securegcm::Type value); + public: + + // optional int32 version = 2 [default = 0]; + bool has_version() const; + private: + bool _internal_has_version() const; + public: + void clear_version(); + int32_t version() const; + void set_version(int32_t value); + private: + int32_t _internal_version() const; + void _internal_set_version(int32_t value); + public: + + // @@protoc_insertion_point(class_scope:securegcm.GcmMetadata) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + int type_; + int32_t version_; + friend struct ::TableStruct_proto_2fsecuregcm_2eproto; +}; +// ------------------------------------------------------------------- + +class Tickle final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:securegcm.Tickle) */ { + public: + inline Tickle() : Tickle(nullptr) {} + ~Tickle() override; + explicit constexpr Tickle(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + Tickle(const Tickle& from); + Tickle(Tickle&& from) noexcept + : Tickle() { + *this = ::std::move(from); + } + + inline Tickle& operator=(const Tickle& from) { + CopyFrom(from); + return *this; + } + inline Tickle& operator=(Tickle&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const Tickle& default_instance() { + return *internal_default_instance(); + } + static inline const Tickle* internal_default_instance() { + return reinterpret_cast( + &_Tickle_default_instance_); + } + static constexpr int kIndexInFileMessages = + 2; + + friend void swap(Tickle& a, Tickle& b) { + a.Swap(&b); + } + inline void Swap(Tickle* 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(Tickle* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + Tickle* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const Tickle& from); + void MergeFrom(const Tickle& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(Tickle* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "securegcm.Tickle"; + } + protected: + explicit Tickle(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kExpiryTimeFieldNumber = 1, + }; + // optional fixed64 expiry_time = 1; + bool has_expiry_time() const; + private: + bool _internal_has_expiry_time() const; + public: + void clear_expiry_time(); + uint64_t expiry_time() const; + void set_expiry_time(uint64_t value); + private: + uint64_t _internal_expiry_time() const; + void _internal_set_expiry_time(uint64_t value); + public: + + // @@protoc_insertion_point(class_scope:securegcm.Tickle) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + uint64_t expiry_time_; + friend struct ::TableStruct_proto_2fsecuregcm_2eproto; +}; +// ------------------------------------------------------------------- + +class LoginNotificationInfo final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:securegcm.LoginNotificationInfo) */ { + public: + inline LoginNotificationInfo() : LoginNotificationInfo(nullptr) {} + ~LoginNotificationInfo() override; + explicit constexpr LoginNotificationInfo(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + LoginNotificationInfo(const LoginNotificationInfo& from); + LoginNotificationInfo(LoginNotificationInfo&& from) noexcept + : LoginNotificationInfo() { + *this = ::std::move(from); + } + + inline LoginNotificationInfo& operator=(const LoginNotificationInfo& from) { + CopyFrom(from); + return *this; + } + inline LoginNotificationInfo& operator=(LoginNotificationInfo&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const LoginNotificationInfo& default_instance() { + return *internal_default_instance(); + } + static inline const LoginNotificationInfo* internal_default_instance() { + return reinterpret_cast( + &_LoginNotificationInfo_default_instance_); + } + static constexpr int kIndexInFileMessages = + 3; + + friend void swap(LoginNotificationInfo& a, LoginNotificationInfo& b) { + a.Swap(&b); + } + inline void Swap(LoginNotificationInfo* 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(LoginNotificationInfo* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + LoginNotificationInfo* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const LoginNotificationInfo& from); + void MergeFrom(const LoginNotificationInfo& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(LoginNotificationInfo* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "securegcm.LoginNotificationInfo"; + } + protected: + explicit LoginNotificationInfo(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kEmailFieldNumber = 3, + kHostFieldNumber = 4, + kSourceFieldNumber = 5, + kEventTypeFieldNumber = 6, + kCreationTimeFieldNumber = 2, + }; + // optional string email = 3; + bool has_email() const; + private: + bool _internal_has_email() const; + public: + void clear_email(); + const std::string& email() const; + template + void set_email(ArgT0&& arg0, ArgT... args); + std::string* mutable_email(); + PROTOBUF_NODISCARD std::string* release_email(); + void set_allocated_email(std::string* email); + private: + const std::string& _internal_email() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_email(const std::string& value); + std::string* _internal_mutable_email(); + public: + + // optional string host = 4; + bool has_host() const; + private: + bool _internal_has_host() const; + public: + void clear_host(); + const std::string& host() const; + template + void set_host(ArgT0&& arg0, ArgT... args); + std::string* mutable_host(); + PROTOBUF_NODISCARD std::string* release_host(); + void set_allocated_host(std::string* host); + private: + const std::string& _internal_host() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_host(const std::string& value); + std::string* _internal_mutable_host(); + public: + + // optional string source = 5; + bool has_source() const; + private: + bool _internal_has_source() const; + public: + void clear_source(); + const std::string& source() const; + template + void set_source(ArgT0&& arg0, ArgT... args); + std::string* mutable_source(); + PROTOBUF_NODISCARD std::string* release_source(); + void set_allocated_source(std::string* source); + private: + const std::string& _internal_source() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_source(const std::string& value); + std::string* _internal_mutable_source(); + public: + + // optional string event_type = 6; + bool has_event_type() const; + private: + bool _internal_has_event_type() const; + public: + void clear_event_type(); + const std::string& event_type() const; + template + void set_event_type(ArgT0&& arg0, ArgT... args); + std::string* mutable_event_type(); + PROTOBUF_NODISCARD std::string* release_event_type(); + void set_allocated_event_type(std::string* event_type); + private: + const std::string& _internal_event_type() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_event_type(const std::string& value); + std::string* _internal_mutable_event_type(); + public: + + // optional fixed64 creation_time = 2; + bool has_creation_time() const; + private: + bool _internal_has_creation_time() const; + public: + void clear_creation_time(); + uint64_t creation_time() const; + void set_creation_time(uint64_t value); + private: + uint64_t _internal_creation_time() const; + void _internal_set_creation_time(uint64_t value); + public: + + // @@protoc_insertion_point(class_scope:securegcm.LoginNotificationInfo) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr email_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr host_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr source_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr event_type_; + uint64_t creation_time_; + friend struct ::TableStruct_proto_2fsecuregcm_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// GcmDeviceInfo + +// optional fixed64 android_device_id = 1; +inline bool GcmDeviceInfo::_internal_has_android_device_id() const { + bool value = (_has_bits_[0] & 0x00020000u) != 0; + return value; +} +inline bool GcmDeviceInfo::has_android_device_id() const { + return _internal_has_android_device_id(); +} +inline void GcmDeviceInfo::clear_android_device_id() { + android_device_id_ = uint64_t{0u}; + _has_bits_[0] &= ~0x00020000u; +} +inline uint64_t GcmDeviceInfo::_internal_android_device_id() const { + return android_device_id_; +} +inline uint64_t GcmDeviceInfo::android_device_id() const { + // @@protoc_insertion_point(field_get:securegcm.GcmDeviceInfo.android_device_id) + return _internal_android_device_id(); +} +inline void GcmDeviceInfo::_internal_set_android_device_id(uint64_t value) { + _has_bits_[0] |= 0x00020000u; + android_device_id_ = value; +} +inline void GcmDeviceInfo::set_android_device_id(uint64_t value) { + _internal_set_android_device_id(value); + // @@protoc_insertion_point(field_set:securegcm.GcmDeviceInfo.android_device_id) +} + +// optional bytes gcm_registration_id = 102; +inline bool GcmDeviceInfo::_internal_has_gcm_registration_id() const { + bool value = (_has_bits_[0] & 0x00000800u) != 0; + return value; +} +inline bool GcmDeviceInfo::has_gcm_registration_id() const { + return _internal_has_gcm_registration_id(); +} +inline void GcmDeviceInfo::clear_gcm_registration_id() { + gcm_registration_id_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000800u; +} +inline const std::string& GcmDeviceInfo::gcm_registration_id() const { + // @@protoc_insertion_point(field_get:securegcm.GcmDeviceInfo.gcm_registration_id) + return _internal_gcm_registration_id(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void GcmDeviceInfo::set_gcm_registration_id(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000800u; + gcm_registration_id_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:securegcm.GcmDeviceInfo.gcm_registration_id) +} +inline std::string* GcmDeviceInfo::mutable_gcm_registration_id() { + std::string* _s = _internal_mutable_gcm_registration_id(); + // @@protoc_insertion_point(field_mutable:securegcm.GcmDeviceInfo.gcm_registration_id) + return _s; +} +inline const std::string& GcmDeviceInfo::_internal_gcm_registration_id() const { + return gcm_registration_id_.Get(); +} +inline void GcmDeviceInfo::_internal_set_gcm_registration_id(const std::string& value) { + _has_bits_[0] |= 0x00000800u; + gcm_registration_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* GcmDeviceInfo::_internal_mutable_gcm_registration_id() { + _has_bits_[0] |= 0x00000800u; + return gcm_registration_id_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* GcmDeviceInfo::release_gcm_registration_id() { + // @@protoc_insertion_point(field_release:securegcm.GcmDeviceInfo.gcm_registration_id) + if (!_internal_has_gcm_registration_id()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000800u; + auto* p = gcm_registration_id_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (gcm_registration_id_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + gcm_registration_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void GcmDeviceInfo::set_allocated_gcm_registration_id(std::string* gcm_registration_id) { + if (gcm_registration_id != nullptr) { + _has_bits_[0] |= 0x00000800u; + } else { + _has_bits_[0] &= ~0x00000800u; + } + gcm_registration_id_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), gcm_registration_id, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (gcm_registration_id_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + gcm_registration_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:securegcm.GcmDeviceInfo.gcm_registration_id) +} + +// optional bytes apn_registration_id = 202; +inline bool GcmDeviceInfo::_internal_has_apn_registration_id() const { + bool value = (_has_bits_[0] & 0x00002000u) != 0; + return value; +} +inline bool GcmDeviceInfo::has_apn_registration_id() const { + return _internal_has_apn_registration_id(); +} +inline void GcmDeviceInfo::clear_apn_registration_id() { + apn_registration_id_.ClearToEmpty(); + _has_bits_[0] &= ~0x00002000u; +} +inline const std::string& GcmDeviceInfo::apn_registration_id() const { + // @@protoc_insertion_point(field_get:securegcm.GcmDeviceInfo.apn_registration_id) + return _internal_apn_registration_id(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void GcmDeviceInfo::set_apn_registration_id(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00002000u; + apn_registration_id_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:securegcm.GcmDeviceInfo.apn_registration_id) +} +inline std::string* GcmDeviceInfo::mutable_apn_registration_id() { + std::string* _s = _internal_mutable_apn_registration_id(); + // @@protoc_insertion_point(field_mutable:securegcm.GcmDeviceInfo.apn_registration_id) + return _s; +} +inline const std::string& GcmDeviceInfo::_internal_apn_registration_id() const { + return apn_registration_id_.Get(); +} +inline void GcmDeviceInfo::_internal_set_apn_registration_id(const std::string& value) { + _has_bits_[0] |= 0x00002000u; + apn_registration_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* GcmDeviceInfo::_internal_mutable_apn_registration_id() { + _has_bits_[0] |= 0x00002000u; + return apn_registration_id_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* GcmDeviceInfo::release_apn_registration_id() { + // @@protoc_insertion_point(field_release:securegcm.GcmDeviceInfo.apn_registration_id) + if (!_internal_has_apn_registration_id()) { + return nullptr; + } + _has_bits_[0] &= ~0x00002000u; + auto* p = apn_registration_id_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (apn_registration_id_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + apn_registration_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void GcmDeviceInfo::set_allocated_apn_registration_id(std::string* apn_registration_id) { + if (apn_registration_id != nullptr) { + _has_bits_[0] |= 0x00002000u; + } else { + _has_bits_[0] &= ~0x00002000u; + } + apn_registration_id_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), apn_registration_id, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (apn_registration_id_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + apn_registration_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:securegcm.GcmDeviceInfo.apn_registration_id) +} + +// optional bool notification_enabled = 203 [default = true]; +inline bool GcmDeviceInfo::_internal_has_notification_enabled() const { + bool value = (_has_bits_[1] & 0x00000008u) != 0; + return value; +} +inline bool GcmDeviceInfo::has_notification_enabled() const { + return _internal_has_notification_enabled(); +} +inline void GcmDeviceInfo::clear_notification_enabled() { + notification_enabled_ = true; + _has_bits_[1] &= ~0x00000008u; +} +inline bool GcmDeviceInfo::_internal_notification_enabled() const { + return notification_enabled_; +} +inline bool GcmDeviceInfo::notification_enabled() const { + // @@protoc_insertion_point(field_get:securegcm.GcmDeviceInfo.notification_enabled) + return _internal_notification_enabled(); +} +inline void GcmDeviceInfo::_internal_set_notification_enabled(bool value) { + _has_bits_[1] |= 0x00000008u; + notification_enabled_ = value; +} +inline void GcmDeviceInfo::set_notification_enabled(bool value) { + _internal_set_notification_enabled(value); + // @@protoc_insertion_point(field_set:securegcm.GcmDeviceInfo.notification_enabled) +} + +// optional string bluetooth_mac_address = 302; +inline bool GcmDeviceInfo::_internal_has_bluetooth_mac_address() const { + bool value = (_has_bits_[0] & 0x00004000u) != 0; + return value; +} +inline bool GcmDeviceInfo::has_bluetooth_mac_address() const { + return _internal_has_bluetooth_mac_address(); +} +inline void GcmDeviceInfo::clear_bluetooth_mac_address() { + bluetooth_mac_address_.ClearToEmpty(); + _has_bits_[0] &= ~0x00004000u; +} +inline const std::string& GcmDeviceInfo::bluetooth_mac_address() const { + // @@protoc_insertion_point(field_get:securegcm.GcmDeviceInfo.bluetooth_mac_address) + return _internal_bluetooth_mac_address(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void GcmDeviceInfo::set_bluetooth_mac_address(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00004000u; + bluetooth_mac_address_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:securegcm.GcmDeviceInfo.bluetooth_mac_address) +} +inline std::string* GcmDeviceInfo::mutable_bluetooth_mac_address() { + std::string* _s = _internal_mutable_bluetooth_mac_address(); + // @@protoc_insertion_point(field_mutable:securegcm.GcmDeviceInfo.bluetooth_mac_address) + return _s; +} +inline const std::string& GcmDeviceInfo::_internal_bluetooth_mac_address() const { + return bluetooth_mac_address_.Get(); +} +inline void GcmDeviceInfo::_internal_set_bluetooth_mac_address(const std::string& value) { + _has_bits_[0] |= 0x00004000u; + bluetooth_mac_address_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* GcmDeviceInfo::_internal_mutable_bluetooth_mac_address() { + _has_bits_[0] |= 0x00004000u; + return bluetooth_mac_address_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* GcmDeviceInfo::release_bluetooth_mac_address() { + // @@protoc_insertion_point(field_release:securegcm.GcmDeviceInfo.bluetooth_mac_address) + if (!_internal_has_bluetooth_mac_address()) { + return nullptr; + } + _has_bits_[0] &= ~0x00004000u; + auto* p = bluetooth_mac_address_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (bluetooth_mac_address_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + bluetooth_mac_address_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void GcmDeviceInfo::set_allocated_bluetooth_mac_address(std::string* bluetooth_mac_address) { + if (bluetooth_mac_address != nullptr) { + _has_bits_[0] |= 0x00004000u; + } else { + _has_bits_[0] &= ~0x00004000u; + } + bluetooth_mac_address_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), bluetooth_mac_address, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (bluetooth_mac_address_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + bluetooth_mac_address_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:securegcm.GcmDeviceInfo.bluetooth_mac_address) +} + +// optional bytes device_master_key_hash = 103; +inline bool GcmDeviceInfo::_internal_has_device_master_key_hash() const { + bool value = (_has_bits_[0] & 0x00001000u) != 0; + return value; +} +inline bool GcmDeviceInfo::has_device_master_key_hash() const { + return _internal_has_device_master_key_hash(); +} +inline void GcmDeviceInfo::clear_device_master_key_hash() { + device_master_key_hash_.ClearToEmpty(); + _has_bits_[0] &= ~0x00001000u; +} +inline const std::string& GcmDeviceInfo::device_master_key_hash() const { + // @@protoc_insertion_point(field_get:securegcm.GcmDeviceInfo.device_master_key_hash) + return _internal_device_master_key_hash(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void GcmDeviceInfo::set_device_master_key_hash(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00001000u; + device_master_key_hash_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:securegcm.GcmDeviceInfo.device_master_key_hash) +} +inline std::string* GcmDeviceInfo::mutable_device_master_key_hash() { + std::string* _s = _internal_mutable_device_master_key_hash(); + // @@protoc_insertion_point(field_mutable:securegcm.GcmDeviceInfo.device_master_key_hash) + return _s; +} +inline const std::string& GcmDeviceInfo::_internal_device_master_key_hash() const { + return device_master_key_hash_.Get(); +} +inline void GcmDeviceInfo::_internal_set_device_master_key_hash(const std::string& value) { + _has_bits_[0] |= 0x00001000u; + device_master_key_hash_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* GcmDeviceInfo::_internal_mutable_device_master_key_hash() { + _has_bits_[0] |= 0x00001000u; + return device_master_key_hash_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* GcmDeviceInfo::release_device_master_key_hash() { + // @@protoc_insertion_point(field_release:securegcm.GcmDeviceInfo.device_master_key_hash) + if (!_internal_has_device_master_key_hash()) { + return nullptr; + } + _has_bits_[0] &= ~0x00001000u; + auto* p = device_master_key_hash_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (device_master_key_hash_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + device_master_key_hash_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void GcmDeviceInfo::set_allocated_device_master_key_hash(std::string* device_master_key_hash) { + if (device_master_key_hash != nullptr) { + _has_bits_[0] |= 0x00001000u; + } else { + _has_bits_[0] &= ~0x00001000u; + } + device_master_key_hash_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), device_master_key_hash, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (device_master_key_hash_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + device_master_key_hash_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:securegcm.GcmDeviceInfo.device_master_key_hash) +} + +// required bytes user_public_key = 4; +inline bool GcmDeviceInfo::_internal_has_user_public_key() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool GcmDeviceInfo::has_user_public_key() const { + return _internal_has_user_public_key(); +} +inline void GcmDeviceInfo::clear_user_public_key() { + user_public_key_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& GcmDeviceInfo::user_public_key() const { + // @@protoc_insertion_point(field_get:securegcm.GcmDeviceInfo.user_public_key) + return _internal_user_public_key(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void GcmDeviceInfo::set_user_public_key(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + user_public_key_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:securegcm.GcmDeviceInfo.user_public_key) +} +inline std::string* GcmDeviceInfo::mutable_user_public_key() { + std::string* _s = _internal_mutable_user_public_key(); + // @@protoc_insertion_point(field_mutable:securegcm.GcmDeviceInfo.user_public_key) + return _s; +} +inline const std::string& GcmDeviceInfo::_internal_user_public_key() const { + return user_public_key_.Get(); +} +inline void GcmDeviceInfo::_internal_set_user_public_key(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + user_public_key_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* GcmDeviceInfo::_internal_mutable_user_public_key() { + _has_bits_[0] |= 0x00000001u; + return user_public_key_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* GcmDeviceInfo::release_user_public_key() { + // @@protoc_insertion_point(field_release:securegcm.GcmDeviceInfo.user_public_key) + if (!_internal_has_user_public_key()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = user_public_key_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (user_public_key_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + user_public_key_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void GcmDeviceInfo::set_allocated_user_public_key(std::string* user_public_key) { + if (user_public_key != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + user_public_key_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), user_public_key, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (user_public_key_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + user_public_key_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:securegcm.GcmDeviceInfo.user_public_key) +} + +// optional string device_model = 7; +inline bool GcmDeviceInfo::_internal_has_device_model() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool GcmDeviceInfo::has_device_model() const { + return _internal_has_device_model(); +} +inline void GcmDeviceInfo::clear_device_model() { + device_model_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000002u; +} +inline const std::string& GcmDeviceInfo::device_model() const { + // @@protoc_insertion_point(field_get:securegcm.GcmDeviceInfo.device_model) + return _internal_device_model(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void GcmDeviceInfo::set_device_model(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000002u; + device_model_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:securegcm.GcmDeviceInfo.device_model) +} +inline std::string* GcmDeviceInfo::mutable_device_model() { + std::string* _s = _internal_mutable_device_model(); + // @@protoc_insertion_point(field_mutable:securegcm.GcmDeviceInfo.device_model) + return _s; +} +inline const std::string& GcmDeviceInfo::_internal_device_model() const { + return device_model_.Get(); +} +inline void GcmDeviceInfo::_internal_set_device_model(const std::string& value) { + _has_bits_[0] |= 0x00000002u; + device_model_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* GcmDeviceInfo::_internal_mutable_device_model() { + _has_bits_[0] |= 0x00000002u; + return device_model_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* GcmDeviceInfo::release_device_model() { + // @@protoc_insertion_point(field_release:securegcm.GcmDeviceInfo.device_model) + if (!_internal_has_device_model()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000002u; + auto* p = device_model_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (device_model_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + device_model_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void GcmDeviceInfo::set_allocated_device_model(std::string* device_model) { + if (device_model != nullptr) { + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + device_model_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), device_model, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (device_model_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + device_model_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:securegcm.GcmDeviceInfo.device_model) +} + +// optional string locale = 8; +inline bool GcmDeviceInfo::_internal_has_locale() const { + bool value = (_has_bits_[0] & 0x00000004u) != 0; + return value; +} +inline bool GcmDeviceInfo::has_locale() const { + return _internal_has_locale(); +} +inline void GcmDeviceInfo::clear_locale() { + locale_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000004u; +} +inline const std::string& GcmDeviceInfo::locale() const { + // @@protoc_insertion_point(field_get:securegcm.GcmDeviceInfo.locale) + return _internal_locale(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void GcmDeviceInfo::set_locale(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000004u; + locale_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:securegcm.GcmDeviceInfo.locale) +} +inline std::string* GcmDeviceInfo::mutable_locale() { + std::string* _s = _internal_mutable_locale(); + // @@protoc_insertion_point(field_mutable:securegcm.GcmDeviceInfo.locale) + return _s; +} +inline const std::string& GcmDeviceInfo::_internal_locale() const { + return locale_.Get(); +} +inline void GcmDeviceInfo::_internal_set_locale(const std::string& value) { + _has_bits_[0] |= 0x00000004u; + locale_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* GcmDeviceInfo::_internal_mutable_locale() { + _has_bits_[0] |= 0x00000004u; + return locale_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* GcmDeviceInfo::release_locale() { + // @@protoc_insertion_point(field_release:securegcm.GcmDeviceInfo.locale) + if (!_internal_has_locale()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000004u; + auto* p = locale_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (locale_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + locale_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void GcmDeviceInfo::set_allocated_locale(std::string* locale) { + if (locale != nullptr) { + _has_bits_[0] |= 0x00000004u; + } else { + _has_bits_[0] &= ~0x00000004u; + } + locale_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), locale, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (locale_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + locale_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:securegcm.GcmDeviceInfo.locale) +} + +// optional bytes key_handle = 9; +inline bool GcmDeviceInfo::_internal_has_key_handle() const { + bool value = (_has_bits_[0] & 0x00000008u) != 0; + return value; +} +inline bool GcmDeviceInfo::has_key_handle() const { + return _internal_has_key_handle(); +} +inline void GcmDeviceInfo::clear_key_handle() { + key_handle_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000008u; +} +inline const std::string& GcmDeviceInfo::key_handle() const { + // @@protoc_insertion_point(field_get:securegcm.GcmDeviceInfo.key_handle) + return _internal_key_handle(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void GcmDeviceInfo::set_key_handle(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000008u; + key_handle_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:securegcm.GcmDeviceInfo.key_handle) +} +inline std::string* GcmDeviceInfo::mutable_key_handle() { + std::string* _s = _internal_mutable_key_handle(); + // @@protoc_insertion_point(field_mutable:securegcm.GcmDeviceInfo.key_handle) + return _s; +} +inline const std::string& GcmDeviceInfo::_internal_key_handle() const { + return key_handle_.Get(); +} +inline void GcmDeviceInfo::_internal_set_key_handle(const std::string& value) { + _has_bits_[0] |= 0x00000008u; + key_handle_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* GcmDeviceInfo::_internal_mutable_key_handle() { + _has_bits_[0] |= 0x00000008u; + return key_handle_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* GcmDeviceInfo::release_key_handle() { + // @@protoc_insertion_point(field_release:securegcm.GcmDeviceInfo.key_handle) + if (!_internal_has_key_handle()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000008u; + auto* p = key_handle_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (key_handle_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + key_handle_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void GcmDeviceInfo::set_allocated_key_handle(std::string* key_handle) { + if (key_handle != nullptr) { + _has_bits_[0] |= 0x00000008u; + } else { + _has_bits_[0] &= ~0x00000008u; + } + key_handle_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), key_handle, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (key_handle_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + key_handle_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:securegcm.GcmDeviceInfo.key_handle) +} + +// optional int64 counter = 12 [default = 0]; +inline bool GcmDeviceInfo::_internal_has_counter() const { + bool value = (_has_bits_[0] & 0x00040000u) != 0; + return value; +} +inline bool GcmDeviceInfo::has_counter() const { + return _internal_has_counter(); +} +inline void GcmDeviceInfo::clear_counter() { + counter_ = int64_t{0}; + _has_bits_[0] &= ~0x00040000u; +} +inline int64_t GcmDeviceInfo::_internal_counter() const { + return counter_; +} +inline int64_t GcmDeviceInfo::counter() const { + // @@protoc_insertion_point(field_get:securegcm.GcmDeviceInfo.counter) + return _internal_counter(); +} +inline void GcmDeviceInfo::_internal_set_counter(int64_t value) { + _has_bits_[0] |= 0x00040000u; + counter_ = value; +} +inline void GcmDeviceInfo::set_counter(int64_t value) { + _internal_set_counter(value); + // @@protoc_insertion_point(field_set:securegcm.GcmDeviceInfo.counter) +} + +// optional string device_os_version = 13; +inline bool GcmDeviceInfo::_internal_has_device_os_version() const { + bool value = (_has_bits_[0] & 0x00000010u) != 0; + return value; +} +inline bool GcmDeviceInfo::has_device_os_version() const { + return _internal_has_device_os_version(); +} +inline void GcmDeviceInfo::clear_device_os_version() { + device_os_version_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000010u; +} +inline const std::string& GcmDeviceInfo::device_os_version() const { + // @@protoc_insertion_point(field_get:securegcm.GcmDeviceInfo.device_os_version) + return _internal_device_os_version(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void GcmDeviceInfo::set_device_os_version(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000010u; + device_os_version_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:securegcm.GcmDeviceInfo.device_os_version) +} +inline std::string* GcmDeviceInfo::mutable_device_os_version() { + std::string* _s = _internal_mutable_device_os_version(); + // @@protoc_insertion_point(field_mutable:securegcm.GcmDeviceInfo.device_os_version) + return _s; +} +inline const std::string& GcmDeviceInfo::_internal_device_os_version() const { + return device_os_version_.Get(); +} +inline void GcmDeviceInfo::_internal_set_device_os_version(const std::string& value) { + _has_bits_[0] |= 0x00000010u; + device_os_version_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* GcmDeviceInfo::_internal_mutable_device_os_version() { + _has_bits_[0] |= 0x00000010u; + return device_os_version_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* GcmDeviceInfo::release_device_os_version() { + // @@protoc_insertion_point(field_release:securegcm.GcmDeviceInfo.device_os_version) + if (!_internal_has_device_os_version()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000010u; + auto* p = device_os_version_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (device_os_version_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + device_os_version_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void GcmDeviceInfo::set_allocated_device_os_version(std::string* device_os_version) { + if (device_os_version != nullptr) { + _has_bits_[0] |= 0x00000010u; + } else { + _has_bits_[0] &= ~0x00000010u; + } + device_os_version_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), device_os_version, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (device_os_version_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + device_os_version_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:securegcm.GcmDeviceInfo.device_os_version) +} + +// optional int64 device_os_version_code = 14; +inline bool GcmDeviceInfo::_internal_has_device_os_version_code() const { + bool value = (_has_bits_[0] & 0x00080000u) != 0; + return value; +} +inline bool GcmDeviceInfo::has_device_os_version_code() const { + return _internal_has_device_os_version_code(); +} +inline void GcmDeviceInfo::clear_device_os_version_code() { + device_os_version_code_ = int64_t{0}; + _has_bits_[0] &= ~0x00080000u; +} +inline int64_t GcmDeviceInfo::_internal_device_os_version_code() const { + return device_os_version_code_; +} +inline int64_t GcmDeviceInfo::device_os_version_code() const { + // @@protoc_insertion_point(field_get:securegcm.GcmDeviceInfo.device_os_version_code) + return _internal_device_os_version_code(); +} +inline void GcmDeviceInfo::_internal_set_device_os_version_code(int64_t value) { + _has_bits_[0] |= 0x00080000u; + device_os_version_code_ = value; +} +inline void GcmDeviceInfo::set_device_os_version_code(int64_t value) { + _internal_set_device_os_version_code(value); + // @@protoc_insertion_point(field_set:securegcm.GcmDeviceInfo.device_os_version_code) +} + +// optional string device_os_release = 15; +inline bool GcmDeviceInfo::_internal_has_device_os_release() const { + bool value = (_has_bits_[0] & 0x00000020u) != 0; + return value; +} +inline bool GcmDeviceInfo::has_device_os_release() const { + return _internal_has_device_os_release(); +} +inline void GcmDeviceInfo::clear_device_os_release() { + device_os_release_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000020u; +} +inline const std::string& GcmDeviceInfo::device_os_release() const { + // @@protoc_insertion_point(field_get:securegcm.GcmDeviceInfo.device_os_release) + return _internal_device_os_release(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void GcmDeviceInfo::set_device_os_release(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000020u; + device_os_release_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:securegcm.GcmDeviceInfo.device_os_release) +} +inline std::string* GcmDeviceInfo::mutable_device_os_release() { + std::string* _s = _internal_mutable_device_os_release(); + // @@protoc_insertion_point(field_mutable:securegcm.GcmDeviceInfo.device_os_release) + return _s; +} +inline const std::string& GcmDeviceInfo::_internal_device_os_release() const { + return device_os_release_.Get(); +} +inline void GcmDeviceInfo::_internal_set_device_os_release(const std::string& value) { + _has_bits_[0] |= 0x00000020u; + device_os_release_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* GcmDeviceInfo::_internal_mutable_device_os_release() { + _has_bits_[0] |= 0x00000020u; + return device_os_release_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* GcmDeviceInfo::release_device_os_release() { + // @@protoc_insertion_point(field_release:securegcm.GcmDeviceInfo.device_os_release) + if (!_internal_has_device_os_release()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000020u; + auto* p = device_os_release_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (device_os_release_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + device_os_release_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void GcmDeviceInfo::set_allocated_device_os_release(std::string* device_os_release) { + if (device_os_release != nullptr) { + _has_bits_[0] |= 0x00000020u; + } else { + _has_bits_[0] &= ~0x00000020u; + } + device_os_release_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), device_os_release, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (device_os_release_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + device_os_release_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:securegcm.GcmDeviceInfo.device_os_release) +} + +// optional string device_os_codename = 16; +inline bool GcmDeviceInfo::_internal_has_device_os_codename() const { + bool value = (_has_bits_[0] & 0x00000040u) != 0; + return value; +} +inline bool GcmDeviceInfo::has_device_os_codename() const { + return _internal_has_device_os_codename(); +} +inline void GcmDeviceInfo::clear_device_os_codename() { + device_os_codename_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000040u; +} +inline const std::string& GcmDeviceInfo::device_os_codename() const { + // @@protoc_insertion_point(field_get:securegcm.GcmDeviceInfo.device_os_codename) + return _internal_device_os_codename(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void GcmDeviceInfo::set_device_os_codename(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000040u; + device_os_codename_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:securegcm.GcmDeviceInfo.device_os_codename) +} +inline std::string* GcmDeviceInfo::mutable_device_os_codename() { + std::string* _s = _internal_mutable_device_os_codename(); + // @@protoc_insertion_point(field_mutable:securegcm.GcmDeviceInfo.device_os_codename) + return _s; +} +inline const std::string& GcmDeviceInfo::_internal_device_os_codename() const { + return device_os_codename_.Get(); +} +inline void GcmDeviceInfo::_internal_set_device_os_codename(const std::string& value) { + _has_bits_[0] |= 0x00000040u; + device_os_codename_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* GcmDeviceInfo::_internal_mutable_device_os_codename() { + _has_bits_[0] |= 0x00000040u; + return device_os_codename_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* GcmDeviceInfo::release_device_os_codename() { + // @@protoc_insertion_point(field_release:securegcm.GcmDeviceInfo.device_os_codename) + if (!_internal_has_device_os_codename()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000040u; + auto* p = device_os_codename_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (device_os_codename_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + device_os_codename_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void GcmDeviceInfo::set_allocated_device_os_codename(std::string* device_os_codename) { + if (device_os_codename != nullptr) { + _has_bits_[0] |= 0x00000040u; + } else { + _has_bits_[0] &= ~0x00000040u; + } + device_os_codename_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), device_os_codename, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (device_os_codename_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + device_os_codename_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:securegcm.GcmDeviceInfo.device_os_codename) +} + +// optional string device_software_version = 17; +inline bool GcmDeviceInfo::_internal_has_device_software_version() const { + bool value = (_has_bits_[0] & 0x00000080u) != 0; + return value; +} +inline bool GcmDeviceInfo::has_device_software_version() const { + return _internal_has_device_software_version(); +} +inline void GcmDeviceInfo::clear_device_software_version() { + device_software_version_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000080u; +} +inline const std::string& GcmDeviceInfo::device_software_version() const { + // @@protoc_insertion_point(field_get:securegcm.GcmDeviceInfo.device_software_version) + return _internal_device_software_version(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void GcmDeviceInfo::set_device_software_version(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000080u; + device_software_version_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:securegcm.GcmDeviceInfo.device_software_version) +} +inline std::string* GcmDeviceInfo::mutable_device_software_version() { + std::string* _s = _internal_mutable_device_software_version(); + // @@protoc_insertion_point(field_mutable:securegcm.GcmDeviceInfo.device_software_version) + return _s; +} +inline const std::string& GcmDeviceInfo::_internal_device_software_version() const { + return device_software_version_.Get(); +} +inline void GcmDeviceInfo::_internal_set_device_software_version(const std::string& value) { + _has_bits_[0] |= 0x00000080u; + device_software_version_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* GcmDeviceInfo::_internal_mutable_device_software_version() { + _has_bits_[0] |= 0x00000080u; + return device_software_version_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* GcmDeviceInfo::release_device_software_version() { + // @@protoc_insertion_point(field_release:securegcm.GcmDeviceInfo.device_software_version) + if (!_internal_has_device_software_version()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000080u; + auto* p = device_software_version_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (device_software_version_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + device_software_version_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void GcmDeviceInfo::set_allocated_device_software_version(std::string* device_software_version) { + if (device_software_version != nullptr) { + _has_bits_[0] |= 0x00000080u; + } else { + _has_bits_[0] &= ~0x00000080u; + } + device_software_version_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), device_software_version, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (device_software_version_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + device_software_version_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:securegcm.GcmDeviceInfo.device_software_version) +} + +// optional int64 device_software_version_code = 18; +inline bool GcmDeviceInfo::_internal_has_device_software_version_code() const { + bool value = (_has_bits_[0] & 0x00100000u) != 0; + return value; +} +inline bool GcmDeviceInfo::has_device_software_version_code() const { + return _internal_has_device_software_version_code(); +} +inline void GcmDeviceInfo::clear_device_software_version_code() { + device_software_version_code_ = int64_t{0}; + _has_bits_[0] &= ~0x00100000u; +} +inline int64_t GcmDeviceInfo::_internal_device_software_version_code() const { + return device_software_version_code_; +} +inline int64_t GcmDeviceInfo::device_software_version_code() const { + // @@protoc_insertion_point(field_get:securegcm.GcmDeviceInfo.device_software_version_code) + return _internal_device_software_version_code(); +} +inline void GcmDeviceInfo::_internal_set_device_software_version_code(int64_t value) { + _has_bits_[0] |= 0x00100000u; + device_software_version_code_ = value; +} +inline void GcmDeviceInfo::set_device_software_version_code(int64_t value) { + _internal_set_device_software_version_code(value); + // @@protoc_insertion_point(field_set:securegcm.GcmDeviceInfo.device_software_version_code) +} + +// optional string device_software_package = 19; +inline bool GcmDeviceInfo::_internal_has_device_software_package() const { + bool value = (_has_bits_[0] & 0x00000100u) != 0; + return value; +} +inline bool GcmDeviceInfo::has_device_software_package() const { + return _internal_has_device_software_package(); +} +inline void GcmDeviceInfo::clear_device_software_package() { + device_software_package_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000100u; +} +inline const std::string& GcmDeviceInfo::device_software_package() const { + // @@protoc_insertion_point(field_get:securegcm.GcmDeviceInfo.device_software_package) + return _internal_device_software_package(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void GcmDeviceInfo::set_device_software_package(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000100u; + device_software_package_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:securegcm.GcmDeviceInfo.device_software_package) +} +inline std::string* GcmDeviceInfo::mutable_device_software_package() { + std::string* _s = _internal_mutable_device_software_package(); + // @@protoc_insertion_point(field_mutable:securegcm.GcmDeviceInfo.device_software_package) + return _s; +} +inline const std::string& GcmDeviceInfo::_internal_device_software_package() const { + return device_software_package_.Get(); +} +inline void GcmDeviceInfo::_internal_set_device_software_package(const std::string& value) { + _has_bits_[0] |= 0x00000100u; + device_software_package_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* GcmDeviceInfo::_internal_mutable_device_software_package() { + _has_bits_[0] |= 0x00000100u; + return device_software_package_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* GcmDeviceInfo::release_device_software_package() { + // @@protoc_insertion_point(field_release:securegcm.GcmDeviceInfo.device_software_package) + if (!_internal_has_device_software_package()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000100u; + auto* p = device_software_package_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (device_software_package_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + device_software_package_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void GcmDeviceInfo::set_allocated_device_software_package(std::string* device_software_package) { + if (device_software_package != nullptr) { + _has_bits_[0] |= 0x00000100u; + } else { + _has_bits_[0] &= ~0x00000100u; + } + device_software_package_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), device_software_package, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (device_software_package_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + device_software_package_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:securegcm.GcmDeviceInfo.device_software_package) +} + +// optional int32 device_display_diagonal_mils = 22; +inline bool GcmDeviceInfo::_internal_has_device_display_diagonal_mils() const { + bool value = (_has_bits_[0] & 0x00200000u) != 0; + return value; +} +inline bool GcmDeviceInfo::has_device_display_diagonal_mils() const { + return _internal_has_device_display_diagonal_mils(); +} +inline void GcmDeviceInfo::clear_device_display_diagonal_mils() { + device_display_diagonal_mils_ = 0; + _has_bits_[0] &= ~0x00200000u; +} +inline int32_t GcmDeviceInfo::_internal_device_display_diagonal_mils() const { + return device_display_diagonal_mils_; +} +inline int32_t GcmDeviceInfo::device_display_diagonal_mils() const { + // @@protoc_insertion_point(field_get:securegcm.GcmDeviceInfo.device_display_diagonal_mils) + return _internal_device_display_diagonal_mils(); +} +inline void GcmDeviceInfo::_internal_set_device_display_diagonal_mils(int32_t value) { + _has_bits_[0] |= 0x00200000u; + device_display_diagonal_mils_ = value; +} +inline void GcmDeviceInfo::set_device_display_diagonal_mils(int32_t value) { + _internal_set_device_display_diagonal_mils(value); + // @@protoc_insertion_point(field_set:securegcm.GcmDeviceInfo.device_display_diagonal_mils) +} + +// optional int32 device_authzen_version = 24; +inline bool GcmDeviceInfo::_internal_has_device_authzen_version() const { + bool value = (_has_bits_[0] & 0x00400000u) != 0; + return value; +} +inline bool GcmDeviceInfo::has_device_authzen_version() const { + return _internal_has_device_authzen_version(); +} +inline void GcmDeviceInfo::clear_device_authzen_version() { + device_authzen_version_ = 0; + _has_bits_[0] &= ~0x00400000u; +} +inline int32_t GcmDeviceInfo::_internal_device_authzen_version() const { + return device_authzen_version_; +} +inline int32_t GcmDeviceInfo::device_authzen_version() const { + // @@protoc_insertion_point(field_get:securegcm.GcmDeviceInfo.device_authzen_version) + return _internal_device_authzen_version(); +} +inline void GcmDeviceInfo::_internal_set_device_authzen_version(int32_t value) { + _has_bits_[0] |= 0x00400000u; + device_authzen_version_ = value; +} +inline void GcmDeviceInfo::set_device_authzen_version(int32_t value) { + _internal_set_device_authzen_version(value); + // @@protoc_insertion_point(field_set:securegcm.GcmDeviceInfo.device_authzen_version) +} + +// optional bytes long_device_id = 29; +inline bool GcmDeviceInfo::_internal_has_long_device_id() const { + bool value = (_has_bits_[0] & 0x00000200u) != 0; + return value; +} +inline bool GcmDeviceInfo::has_long_device_id() const { + return _internal_has_long_device_id(); +} +inline void GcmDeviceInfo::clear_long_device_id() { + long_device_id_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000200u; +} +inline const std::string& GcmDeviceInfo::long_device_id() const { + // @@protoc_insertion_point(field_get:securegcm.GcmDeviceInfo.long_device_id) + return _internal_long_device_id(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void GcmDeviceInfo::set_long_device_id(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000200u; + long_device_id_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:securegcm.GcmDeviceInfo.long_device_id) +} +inline std::string* GcmDeviceInfo::mutable_long_device_id() { + std::string* _s = _internal_mutable_long_device_id(); + // @@protoc_insertion_point(field_mutable:securegcm.GcmDeviceInfo.long_device_id) + return _s; +} +inline const std::string& GcmDeviceInfo::_internal_long_device_id() const { + return long_device_id_.Get(); +} +inline void GcmDeviceInfo::_internal_set_long_device_id(const std::string& value) { + _has_bits_[0] |= 0x00000200u; + long_device_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* GcmDeviceInfo::_internal_mutable_long_device_id() { + _has_bits_[0] |= 0x00000200u; + return long_device_id_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* GcmDeviceInfo::release_long_device_id() { + // @@protoc_insertion_point(field_release:securegcm.GcmDeviceInfo.long_device_id) + if (!_internal_has_long_device_id()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000200u; + auto* p = long_device_id_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (long_device_id_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + long_device_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void GcmDeviceInfo::set_allocated_long_device_id(std::string* long_device_id) { + if (long_device_id != nullptr) { + _has_bits_[0] |= 0x00000200u; + } else { + _has_bits_[0] &= ~0x00000200u; + } + long_device_id_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), long_device_id, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (long_device_id_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + long_device_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:securegcm.GcmDeviceInfo.long_device_id) +} + +// optional string device_manufacturer = 31; +inline bool GcmDeviceInfo::_internal_has_device_manufacturer() const { + bool value = (_has_bits_[0] & 0x00000400u) != 0; + return value; +} +inline bool GcmDeviceInfo::has_device_manufacturer() const { + return _internal_has_device_manufacturer(); +} +inline void GcmDeviceInfo::clear_device_manufacturer() { + device_manufacturer_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000400u; +} +inline const std::string& GcmDeviceInfo::device_manufacturer() const { + // @@protoc_insertion_point(field_get:securegcm.GcmDeviceInfo.device_manufacturer) + return _internal_device_manufacturer(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void GcmDeviceInfo::set_device_manufacturer(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000400u; + device_manufacturer_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:securegcm.GcmDeviceInfo.device_manufacturer) +} +inline std::string* GcmDeviceInfo::mutable_device_manufacturer() { + std::string* _s = _internal_mutable_device_manufacturer(); + // @@protoc_insertion_point(field_mutable:securegcm.GcmDeviceInfo.device_manufacturer) + return _s; +} +inline const std::string& GcmDeviceInfo::_internal_device_manufacturer() const { + return device_manufacturer_.Get(); +} +inline void GcmDeviceInfo::_internal_set_device_manufacturer(const std::string& value) { + _has_bits_[0] |= 0x00000400u; + device_manufacturer_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* GcmDeviceInfo::_internal_mutable_device_manufacturer() { + _has_bits_[0] |= 0x00000400u; + return device_manufacturer_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* GcmDeviceInfo::release_device_manufacturer() { + // @@protoc_insertion_point(field_release:securegcm.GcmDeviceInfo.device_manufacturer) + if (!_internal_has_device_manufacturer()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000400u; + auto* p = device_manufacturer_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (device_manufacturer_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + device_manufacturer_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void GcmDeviceInfo::set_allocated_device_manufacturer(std::string* device_manufacturer) { + if (device_manufacturer != nullptr) { + _has_bits_[0] |= 0x00000400u; + } else { + _has_bits_[0] &= ~0x00000400u; + } + device_manufacturer_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), device_manufacturer, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (device_manufacturer_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + device_manufacturer_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:securegcm.GcmDeviceInfo.device_manufacturer) +} + +// optional .securegcm.DeviceType device_type = 32 [default = ANDROID]; +inline bool GcmDeviceInfo::_internal_has_device_type() const { + bool value = (_has_bits_[1] & 0x00000004u) != 0; + return value; +} +inline bool GcmDeviceInfo::has_device_type() const { + return _internal_has_device_type(); +} +inline void GcmDeviceInfo::clear_device_type() { + device_type_ = 1; + _has_bits_[1] &= ~0x00000004u; +} +inline ::securegcm::DeviceType GcmDeviceInfo::_internal_device_type() const { + return static_cast< ::securegcm::DeviceType >(device_type_); +} +inline ::securegcm::DeviceType GcmDeviceInfo::device_type() const { + // @@protoc_insertion_point(field_get:securegcm.GcmDeviceInfo.device_type) + return _internal_device_type(); +} +inline void GcmDeviceInfo::_internal_set_device_type(::securegcm::DeviceType value) { + assert(::securegcm::DeviceType_IsValid(value)); + _has_bits_[1] |= 0x00000004u; + device_type_ = value; +} +inline void GcmDeviceInfo::set_device_type(::securegcm::DeviceType value) { + _internal_set_device_type(value); + // @@protoc_insertion_point(field_set:securegcm.GcmDeviceInfo.device_type) +} + +// optional bool using_secure_screenlock = 400 [default = false]; +inline bool GcmDeviceInfo::_internal_has_using_secure_screenlock() const { + bool value = (_has_bits_[0] & 0x04000000u) != 0; + return value; +} +inline bool GcmDeviceInfo::has_using_secure_screenlock() const { + return _internal_has_using_secure_screenlock(); +} +inline void GcmDeviceInfo::clear_using_secure_screenlock() { + using_secure_screenlock_ = false; + _has_bits_[0] &= ~0x04000000u; +} +inline bool GcmDeviceInfo::_internal_using_secure_screenlock() const { + return using_secure_screenlock_; +} +inline bool GcmDeviceInfo::using_secure_screenlock() const { + // @@protoc_insertion_point(field_get:securegcm.GcmDeviceInfo.using_secure_screenlock) + return _internal_using_secure_screenlock(); +} +inline void GcmDeviceInfo::_internal_set_using_secure_screenlock(bool value) { + _has_bits_[0] |= 0x04000000u; + using_secure_screenlock_ = value; +} +inline void GcmDeviceInfo::set_using_secure_screenlock(bool value) { + _internal_set_using_secure_screenlock(value); + // @@protoc_insertion_point(field_set:securegcm.GcmDeviceInfo.using_secure_screenlock) +} + +// optional bool auto_unlock_screenlock_supported = 401 [default = false]; +inline bool GcmDeviceInfo::_internal_has_auto_unlock_screenlock_supported() const { + bool value = (_has_bits_[0] & 0x08000000u) != 0; + return value; +} +inline bool GcmDeviceInfo::has_auto_unlock_screenlock_supported() const { + return _internal_has_auto_unlock_screenlock_supported(); +} +inline void GcmDeviceInfo::clear_auto_unlock_screenlock_supported() { + auto_unlock_screenlock_supported_ = false; + _has_bits_[0] &= ~0x08000000u; +} +inline bool GcmDeviceInfo::_internal_auto_unlock_screenlock_supported() const { + return auto_unlock_screenlock_supported_; +} +inline bool GcmDeviceInfo::auto_unlock_screenlock_supported() const { + // @@protoc_insertion_point(field_get:securegcm.GcmDeviceInfo.auto_unlock_screenlock_supported) + return _internal_auto_unlock_screenlock_supported(); +} +inline void GcmDeviceInfo::_internal_set_auto_unlock_screenlock_supported(bool value) { + _has_bits_[0] |= 0x08000000u; + auto_unlock_screenlock_supported_ = value; +} +inline void GcmDeviceInfo::set_auto_unlock_screenlock_supported(bool value) { + _internal_set_auto_unlock_screenlock_supported(value); + // @@protoc_insertion_point(field_set:securegcm.GcmDeviceInfo.auto_unlock_screenlock_supported) +} + +// optional bool auto_unlock_screenlock_enabled = 402 [default = false]; +inline bool GcmDeviceInfo::_internal_has_auto_unlock_screenlock_enabled() const { + bool value = (_has_bits_[0] & 0x10000000u) != 0; + return value; +} +inline bool GcmDeviceInfo::has_auto_unlock_screenlock_enabled() const { + return _internal_has_auto_unlock_screenlock_enabled(); +} +inline void GcmDeviceInfo::clear_auto_unlock_screenlock_enabled() { + auto_unlock_screenlock_enabled_ = false; + _has_bits_[0] &= ~0x10000000u; +} +inline bool GcmDeviceInfo::_internal_auto_unlock_screenlock_enabled() const { + return auto_unlock_screenlock_enabled_; +} +inline bool GcmDeviceInfo::auto_unlock_screenlock_enabled() const { + // @@protoc_insertion_point(field_get:securegcm.GcmDeviceInfo.auto_unlock_screenlock_enabled) + return _internal_auto_unlock_screenlock_enabled(); +} +inline void GcmDeviceInfo::_internal_set_auto_unlock_screenlock_enabled(bool value) { + _has_bits_[0] |= 0x10000000u; + auto_unlock_screenlock_enabled_ = value; +} +inline void GcmDeviceInfo::set_auto_unlock_screenlock_enabled(bool value) { + _internal_set_auto_unlock_screenlock_enabled(value); + // @@protoc_insertion_point(field_set:securegcm.GcmDeviceInfo.auto_unlock_screenlock_enabled) +} + +// optional bool bluetooth_radio_supported = 403 [default = false]; +inline bool GcmDeviceInfo::_internal_has_bluetooth_radio_supported() const { + bool value = (_has_bits_[0] & 0x20000000u) != 0; + return value; +} +inline bool GcmDeviceInfo::has_bluetooth_radio_supported() const { + return _internal_has_bluetooth_radio_supported(); +} +inline void GcmDeviceInfo::clear_bluetooth_radio_supported() { + bluetooth_radio_supported_ = false; + _has_bits_[0] &= ~0x20000000u; +} +inline bool GcmDeviceInfo::_internal_bluetooth_radio_supported() const { + return bluetooth_radio_supported_; +} +inline bool GcmDeviceInfo::bluetooth_radio_supported() const { + // @@protoc_insertion_point(field_get:securegcm.GcmDeviceInfo.bluetooth_radio_supported) + return _internal_bluetooth_radio_supported(); +} +inline void GcmDeviceInfo::_internal_set_bluetooth_radio_supported(bool value) { + _has_bits_[0] |= 0x20000000u; + bluetooth_radio_supported_ = value; +} +inline void GcmDeviceInfo::set_bluetooth_radio_supported(bool value) { + _internal_set_bluetooth_radio_supported(value); + // @@protoc_insertion_point(field_set:securegcm.GcmDeviceInfo.bluetooth_radio_supported) +} + +// optional bool bluetooth_radio_enabled = 404 [default = false]; +inline bool GcmDeviceInfo::_internal_has_bluetooth_radio_enabled() const { + bool value = (_has_bits_[0] & 0x40000000u) != 0; + return value; +} +inline bool GcmDeviceInfo::has_bluetooth_radio_enabled() const { + return _internal_has_bluetooth_radio_enabled(); +} +inline void GcmDeviceInfo::clear_bluetooth_radio_enabled() { + bluetooth_radio_enabled_ = false; + _has_bits_[0] &= ~0x40000000u; +} +inline bool GcmDeviceInfo::_internal_bluetooth_radio_enabled() const { + return bluetooth_radio_enabled_; +} +inline bool GcmDeviceInfo::bluetooth_radio_enabled() const { + // @@protoc_insertion_point(field_get:securegcm.GcmDeviceInfo.bluetooth_radio_enabled) + return _internal_bluetooth_radio_enabled(); +} +inline void GcmDeviceInfo::_internal_set_bluetooth_radio_enabled(bool value) { + _has_bits_[0] |= 0x40000000u; + bluetooth_radio_enabled_ = value; +} +inline void GcmDeviceInfo::set_bluetooth_radio_enabled(bool value) { + _internal_set_bluetooth_radio_enabled(value); + // @@protoc_insertion_point(field_set:securegcm.GcmDeviceInfo.bluetooth_radio_enabled) +} + +// optional bool mobile_data_supported = 405 [default = false]; +inline bool GcmDeviceInfo::_internal_has_mobile_data_supported() const { + bool value = (_has_bits_[0] & 0x80000000u) != 0; + return value; +} +inline bool GcmDeviceInfo::has_mobile_data_supported() const { + return _internal_has_mobile_data_supported(); +} +inline void GcmDeviceInfo::clear_mobile_data_supported() { + mobile_data_supported_ = false; + _has_bits_[0] &= ~0x80000000u; +} +inline bool GcmDeviceInfo::_internal_mobile_data_supported() const { + return mobile_data_supported_; +} +inline bool GcmDeviceInfo::mobile_data_supported() const { + // @@protoc_insertion_point(field_get:securegcm.GcmDeviceInfo.mobile_data_supported) + return _internal_mobile_data_supported(); +} +inline void GcmDeviceInfo::_internal_set_mobile_data_supported(bool value) { + _has_bits_[0] |= 0x80000000u; + mobile_data_supported_ = value; +} +inline void GcmDeviceInfo::set_mobile_data_supported(bool value) { + _internal_set_mobile_data_supported(value); + // @@protoc_insertion_point(field_set:securegcm.GcmDeviceInfo.mobile_data_supported) +} + +// optional bool tethering_supported = 406 [default = false]; +inline bool GcmDeviceInfo::_internal_has_tethering_supported() const { + bool value = (_has_bits_[1] & 0x00000001u) != 0; + return value; +} +inline bool GcmDeviceInfo::has_tethering_supported() const { + return _internal_has_tethering_supported(); +} +inline void GcmDeviceInfo::clear_tethering_supported() { + tethering_supported_ = false; + _has_bits_[1] &= ~0x00000001u; +} +inline bool GcmDeviceInfo::_internal_tethering_supported() const { + return tethering_supported_; +} +inline bool GcmDeviceInfo::tethering_supported() const { + // @@protoc_insertion_point(field_get:securegcm.GcmDeviceInfo.tethering_supported) + return _internal_tethering_supported(); +} +inline void GcmDeviceInfo::_internal_set_tethering_supported(bool value) { + _has_bits_[1] |= 0x00000001u; + tethering_supported_ = value; +} +inline void GcmDeviceInfo::set_tethering_supported(bool value) { + _internal_set_tethering_supported(value); + // @@protoc_insertion_point(field_set:securegcm.GcmDeviceInfo.tethering_supported) +} + +// optional bool ble_radio_supported = 407 [default = false]; +inline bool GcmDeviceInfo::_internal_has_ble_radio_supported() const { + bool value = (_has_bits_[1] & 0x00000002u) != 0; + return value; +} +inline bool GcmDeviceInfo::has_ble_radio_supported() const { + return _internal_has_ble_radio_supported(); +} +inline void GcmDeviceInfo::clear_ble_radio_supported() { + ble_radio_supported_ = false; + _has_bits_[1] &= ~0x00000002u; +} +inline bool GcmDeviceInfo::_internal_ble_radio_supported() const { + return ble_radio_supported_; +} +inline bool GcmDeviceInfo::ble_radio_supported() const { + // @@protoc_insertion_point(field_get:securegcm.GcmDeviceInfo.ble_radio_supported) + return _internal_ble_radio_supported(); +} +inline void GcmDeviceInfo::_internal_set_ble_radio_supported(bool value) { + _has_bits_[1] |= 0x00000002u; + ble_radio_supported_ = value; +} +inline void GcmDeviceInfo::set_ble_radio_supported(bool value) { + _internal_set_ble_radio_supported(value); + // @@protoc_insertion_point(field_set:securegcm.GcmDeviceInfo.ble_radio_supported) +} + +// optional bool pixel_experience = 408 [default = false]; +inline bool GcmDeviceInfo::_internal_has_pixel_experience() const { + bool value = (_has_bits_[0] & 0x00800000u) != 0; + return value; +} +inline bool GcmDeviceInfo::has_pixel_experience() const { + return _internal_has_pixel_experience(); +} +inline void GcmDeviceInfo::clear_pixel_experience() { + pixel_experience_ = false; + _has_bits_[0] &= ~0x00800000u; +} +inline bool GcmDeviceInfo::_internal_pixel_experience() const { + return pixel_experience_; +} +inline bool GcmDeviceInfo::pixel_experience() const { + // @@protoc_insertion_point(field_get:securegcm.GcmDeviceInfo.pixel_experience) + return _internal_pixel_experience(); +} +inline void GcmDeviceInfo::_internal_set_pixel_experience(bool value) { + _has_bits_[0] |= 0x00800000u; + pixel_experience_ = value; +} +inline void GcmDeviceInfo::set_pixel_experience(bool value) { + _internal_set_pixel_experience(value); + // @@protoc_insertion_point(field_set:securegcm.GcmDeviceInfo.pixel_experience) +} + +// optional bool arc_plus_plus = 409 [default = false]; +inline bool GcmDeviceInfo::_internal_has_arc_plus_plus() const { + bool value = (_has_bits_[0] & 0x01000000u) != 0; + return value; +} +inline bool GcmDeviceInfo::has_arc_plus_plus() const { + return _internal_has_arc_plus_plus(); +} +inline void GcmDeviceInfo::clear_arc_plus_plus() { + arc_plus_plus_ = false; + _has_bits_[0] &= ~0x01000000u; +} +inline bool GcmDeviceInfo::_internal_arc_plus_plus() const { + return arc_plus_plus_; +} +inline bool GcmDeviceInfo::arc_plus_plus() const { + // @@protoc_insertion_point(field_get:securegcm.GcmDeviceInfo.arc_plus_plus) + return _internal_arc_plus_plus(); +} +inline void GcmDeviceInfo::_internal_set_arc_plus_plus(bool value) { + _has_bits_[0] |= 0x01000000u; + arc_plus_plus_ = value; +} +inline void GcmDeviceInfo::set_arc_plus_plus(bool value) { + _internal_set_arc_plus_plus(value); + // @@protoc_insertion_point(field_set:securegcm.GcmDeviceInfo.arc_plus_plus) +} + +// optional bool is_screenlock_state_flaky = 410 [default = false]; +inline bool GcmDeviceInfo::_internal_has_is_screenlock_state_flaky() const { + bool value = (_has_bits_[0] & 0x02000000u) != 0; + return value; +} +inline bool GcmDeviceInfo::has_is_screenlock_state_flaky() const { + return _internal_has_is_screenlock_state_flaky(); +} +inline void GcmDeviceInfo::clear_is_screenlock_state_flaky() { + is_screenlock_state_flaky_ = false; + _has_bits_[0] &= ~0x02000000u; +} +inline bool GcmDeviceInfo::_internal_is_screenlock_state_flaky() const { + return is_screenlock_state_flaky_; +} +inline bool GcmDeviceInfo::is_screenlock_state_flaky() const { + // @@protoc_insertion_point(field_get:securegcm.GcmDeviceInfo.is_screenlock_state_flaky) + return _internal_is_screenlock_state_flaky(); +} +inline void GcmDeviceInfo::_internal_set_is_screenlock_state_flaky(bool value) { + _has_bits_[0] |= 0x02000000u; + is_screenlock_state_flaky_ = value; +} +inline void GcmDeviceInfo::set_is_screenlock_state_flaky(bool value) { + _internal_set_is_screenlock_state_flaky(value); + // @@protoc_insertion_point(field_set:securegcm.GcmDeviceInfo.is_screenlock_state_flaky) +} + +// repeated .securegcm.SoftwareFeature supported_software_features = 411; +inline int GcmDeviceInfo::_internal_supported_software_features_size() const { + return supported_software_features_.size(); +} +inline int GcmDeviceInfo::supported_software_features_size() const { + return _internal_supported_software_features_size(); +} +inline void GcmDeviceInfo::clear_supported_software_features() { + supported_software_features_.Clear(); +} +inline ::securegcm::SoftwareFeature GcmDeviceInfo::_internal_supported_software_features(int index) const { + return static_cast< ::securegcm::SoftwareFeature >(supported_software_features_.Get(index)); +} +inline ::securegcm::SoftwareFeature GcmDeviceInfo::supported_software_features(int index) const { + // @@protoc_insertion_point(field_get:securegcm.GcmDeviceInfo.supported_software_features) + return _internal_supported_software_features(index); +} +inline void GcmDeviceInfo::set_supported_software_features(int index, ::securegcm::SoftwareFeature value) { + assert(::securegcm::SoftwareFeature_IsValid(value)); + supported_software_features_.Set(index, value); + // @@protoc_insertion_point(field_set:securegcm.GcmDeviceInfo.supported_software_features) +} +inline void GcmDeviceInfo::_internal_add_supported_software_features(::securegcm::SoftwareFeature value) { + assert(::securegcm::SoftwareFeature_IsValid(value)); + supported_software_features_.Add(value); +} +inline void GcmDeviceInfo::add_supported_software_features(::securegcm::SoftwareFeature value) { + _internal_add_supported_software_features(value); + // @@protoc_insertion_point(field_add:securegcm.GcmDeviceInfo.supported_software_features) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField& +GcmDeviceInfo::supported_software_features() const { + // @@protoc_insertion_point(field_list:securegcm.GcmDeviceInfo.supported_software_features) + return supported_software_features_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField* +GcmDeviceInfo::_internal_mutable_supported_software_features() { + return &supported_software_features_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField* +GcmDeviceInfo::mutable_supported_software_features() { + // @@protoc_insertion_point(field_mutable_list:securegcm.GcmDeviceInfo.supported_software_features) + return _internal_mutable_supported_software_features(); +} + +// repeated .securegcm.SoftwareFeature enabled_software_features = 412; +inline int GcmDeviceInfo::_internal_enabled_software_features_size() const { + return enabled_software_features_.size(); +} +inline int GcmDeviceInfo::enabled_software_features_size() const { + return _internal_enabled_software_features_size(); +} +inline void GcmDeviceInfo::clear_enabled_software_features() { + enabled_software_features_.Clear(); +} +inline ::securegcm::SoftwareFeature GcmDeviceInfo::_internal_enabled_software_features(int index) const { + return static_cast< ::securegcm::SoftwareFeature >(enabled_software_features_.Get(index)); +} +inline ::securegcm::SoftwareFeature GcmDeviceInfo::enabled_software_features(int index) const { + // @@protoc_insertion_point(field_get:securegcm.GcmDeviceInfo.enabled_software_features) + return _internal_enabled_software_features(index); +} +inline void GcmDeviceInfo::set_enabled_software_features(int index, ::securegcm::SoftwareFeature value) { + assert(::securegcm::SoftwareFeature_IsValid(value)); + enabled_software_features_.Set(index, value); + // @@protoc_insertion_point(field_set:securegcm.GcmDeviceInfo.enabled_software_features) +} +inline void GcmDeviceInfo::_internal_add_enabled_software_features(::securegcm::SoftwareFeature value) { + assert(::securegcm::SoftwareFeature_IsValid(value)); + enabled_software_features_.Add(value); +} +inline void GcmDeviceInfo::add_enabled_software_features(::securegcm::SoftwareFeature value) { + _internal_add_enabled_software_features(value); + // @@protoc_insertion_point(field_add:securegcm.GcmDeviceInfo.enabled_software_features) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField& +GcmDeviceInfo::enabled_software_features() const { + // @@protoc_insertion_point(field_list:securegcm.GcmDeviceInfo.enabled_software_features) + return enabled_software_features_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField* +GcmDeviceInfo::_internal_mutable_enabled_software_features() { + return &enabled_software_features_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField* +GcmDeviceInfo::mutable_enabled_software_features() { + // @@protoc_insertion_point(field_mutable_list:securegcm.GcmDeviceInfo.enabled_software_features) + return _internal_mutable_enabled_software_features(); +} + +// optional bytes enrollment_session_id = 1000; +inline bool GcmDeviceInfo::_internal_has_enrollment_session_id() const { + bool value = (_has_bits_[0] & 0x00008000u) != 0; + return value; +} +inline bool GcmDeviceInfo::has_enrollment_session_id() const { + return _internal_has_enrollment_session_id(); +} +inline void GcmDeviceInfo::clear_enrollment_session_id() { + enrollment_session_id_.ClearToEmpty(); + _has_bits_[0] &= ~0x00008000u; +} +inline const std::string& GcmDeviceInfo::enrollment_session_id() const { + // @@protoc_insertion_point(field_get:securegcm.GcmDeviceInfo.enrollment_session_id) + return _internal_enrollment_session_id(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void GcmDeviceInfo::set_enrollment_session_id(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00008000u; + enrollment_session_id_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:securegcm.GcmDeviceInfo.enrollment_session_id) +} +inline std::string* GcmDeviceInfo::mutable_enrollment_session_id() { + std::string* _s = _internal_mutable_enrollment_session_id(); + // @@protoc_insertion_point(field_mutable:securegcm.GcmDeviceInfo.enrollment_session_id) + return _s; +} +inline const std::string& GcmDeviceInfo::_internal_enrollment_session_id() const { + return enrollment_session_id_.Get(); +} +inline void GcmDeviceInfo::_internal_set_enrollment_session_id(const std::string& value) { + _has_bits_[0] |= 0x00008000u; + enrollment_session_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* GcmDeviceInfo::_internal_mutable_enrollment_session_id() { + _has_bits_[0] |= 0x00008000u; + return enrollment_session_id_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* GcmDeviceInfo::release_enrollment_session_id() { + // @@protoc_insertion_point(field_release:securegcm.GcmDeviceInfo.enrollment_session_id) + if (!_internal_has_enrollment_session_id()) { + return nullptr; + } + _has_bits_[0] &= ~0x00008000u; + auto* p = enrollment_session_id_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (enrollment_session_id_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + enrollment_session_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void GcmDeviceInfo::set_allocated_enrollment_session_id(std::string* enrollment_session_id) { + if (enrollment_session_id != nullptr) { + _has_bits_[0] |= 0x00008000u; + } else { + _has_bits_[0] &= ~0x00008000u; + } + enrollment_session_id_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), enrollment_session_id, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (enrollment_session_id_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + enrollment_session_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:securegcm.GcmDeviceInfo.enrollment_session_id) +} + +// optional string oauth_token = 1001; +inline bool GcmDeviceInfo::_internal_has_oauth_token() const { + bool value = (_has_bits_[0] & 0x00010000u) != 0; + return value; +} +inline bool GcmDeviceInfo::has_oauth_token() const { + return _internal_has_oauth_token(); +} +inline void GcmDeviceInfo::clear_oauth_token() { + oauth_token_.ClearToEmpty(); + _has_bits_[0] &= ~0x00010000u; +} +inline const std::string& GcmDeviceInfo::oauth_token() const { + // @@protoc_insertion_point(field_get:securegcm.GcmDeviceInfo.oauth_token) + return _internal_oauth_token(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void GcmDeviceInfo::set_oauth_token(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00010000u; + oauth_token_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:securegcm.GcmDeviceInfo.oauth_token) +} +inline std::string* GcmDeviceInfo::mutable_oauth_token() { + std::string* _s = _internal_mutable_oauth_token(); + // @@protoc_insertion_point(field_mutable:securegcm.GcmDeviceInfo.oauth_token) + return _s; +} +inline const std::string& GcmDeviceInfo::_internal_oauth_token() const { + return oauth_token_.Get(); +} +inline void GcmDeviceInfo::_internal_set_oauth_token(const std::string& value) { + _has_bits_[0] |= 0x00010000u; + oauth_token_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* GcmDeviceInfo::_internal_mutable_oauth_token() { + _has_bits_[0] |= 0x00010000u; + return oauth_token_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* GcmDeviceInfo::release_oauth_token() { + // @@protoc_insertion_point(field_release:securegcm.GcmDeviceInfo.oauth_token) + if (!_internal_has_oauth_token()) { + return nullptr; + } + _has_bits_[0] &= ~0x00010000u; + auto* p = oauth_token_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (oauth_token_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + oauth_token_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void GcmDeviceInfo::set_allocated_oauth_token(std::string* oauth_token) { + if (oauth_token != nullptr) { + _has_bits_[0] |= 0x00010000u; + } else { + _has_bits_[0] &= ~0x00010000u; + } + oauth_token_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), oauth_token, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (oauth_token_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + oauth_token_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:securegcm.GcmDeviceInfo.oauth_token) +} + +// ------------------------------------------------------------------- + +// GcmMetadata + +// required .securegcm.Type type = 1; +inline bool GcmMetadata::_internal_has_type() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool GcmMetadata::has_type() const { + return _internal_has_type(); +} +inline void GcmMetadata::clear_type() { + type_ = 0; + _has_bits_[0] &= ~0x00000001u; +} +inline ::securegcm::Type GcmMetadata::_internal_type() const { + return static_cast< ::securegcm::Type >(type_); +} +inline ::securegcm::Type GcmMetadata::type() const { + // @@protoc_insertion_point(field_get:securegcm.GcmMetadata.type) + return _internal_type(); +} +inline void GcmMetadata::_internal_set_type(::securegcm::Type value) { + assert(::securegcm::Type_IsValid(value)); + _has_bits_[0] |= 0x00000001u; + type_ = value; +} +inline void GcmMetadata::set_type(::securegcm::Type value) { + _internal_set_type(value); + // @@protoc_insertion_point(field_set:securegcm.GcmMetadata.type) +} + +// optional int32 version = 2 [default = 0]; +inline bool GcmMetadata::_internal_has_version() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool GcmMetadata::has_version() const { + return _internal_has_version(); +} +inline void GcmMetadata::clear_version() { + version_ = 0; + _has_bits_[0] &= ~0x00000002u; +} +inline int32_t GcmMetadata::_internal_version() const { + return version_; +} +inline int32_t GcmMetadata::version() const { + // @@protoc_insertion_point(field_get:securegcm.GcmMetadata.version) + return _internal_version(); +} +inline void GcmMetadata::_internal_set_version(int32_t value) { + _has_bits_[0] |= 0x00000002u; + version_ = value; +} +inline void GcmMetadata::set_version(int32_t value) { + _internal_set_version(value); + // @@protoc_insertion_point(field_set:securegcm.GcmMetadata.version) +} + +// ------------------------------------------------------------------- + +// Tickle + +// optional fixed64 expiry_time = 1; +inline bool Tickle::_internal_has_expiry_time() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool Tickle::has_expiry_time() const { + return _internal_has_expiry_time(); +} +inline void Tickle::clear_expiry_time() { + expiry_time_ = uint64_t{0u}; + _has_bits_[0] &= ~0x00000001u; +} +inline uint64_t Tickle::_internal_expiry_time() const { + return expiry_time_; +} +inline uint64_t Tickle::expiry_time() const { + // @@protoc_insertion_point(field_get:securegcm.Tickle.expiry_time) + return _internal_expiry_time(); +} +inline void Tickle::_internal_set_expiry_time(uint64_t value) { + _has_bits_[0] |= 0x00000001u; + expiry_time_ = value; +} +inline void Tickle::set_expiry_time(uint64_t value) { + _internal_set_expiry_time(value); + // @@protoc_insertion_point(field_set:securegcm.Tickle.expiry_time) +} + +// ------------------------------------------------------------------- + +// LoginNotificationInfo + +// optional fixed64 creation_time = 2; +inline bool LoginNotificationInfo::_internal_has_creation_time() const { + bool value = (_has_bits_[0] & 0x00000010u) != 0; + return value; +} +inline bool LoginNotificationInfo::has_creation_time() const { + return _internal_has_creation_time(); +} +inline void LoginNotificationInfo::clear_creation_time() { + creation_time_ = uint64_t{0u}; + _has_bits_[0] &= ~0x00000010u; +} +inline uint64_t LoginNotificationInfo::_internal_creation_time() const { + return creation_time_; +} +inline uint64_t LoginNotificationInfo::creation_time() const { + // @@protoc_insertion_point(field_get:securegcm.LoginNotificationInfo.creation_time) + return _internal_creation_time(); +} +inline void LoginNotificationInfo::_internal_set_creation_time(uint64_t value) { + _has_bits_[0] |= 0x00000010u; + creation_time_ = value; +} +inline void LoginNotificationInfo::set_creation_time(uint64_t value) { + _internal_set_creation_time(value); + // @@protoc_insertion_point(field_set:securegcm.LoginNotificationInfo.creation_time) +} + +// optional string email = 3; +inline bool LoginNotificationInfo::_internal_has_email() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool LoginNotificationInfo::has_email() const { + return _internal_has_email(); +} +inline void LoginNotificationInfo::clear_email() { + email_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& LoginNotificationInfo::email() const { + // @@protoc_insertion_point(field_get:securegcm.LoginNotificationInfo.email) + return _internal_email(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void LoginNotificationInfo::set_email(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + email_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:securegcm.LoginNotificationInfo.email) +} +inline std::string* LoginNotificationInfo::mutable_email() { + std::string* _s = _internal_mutable_email(); + // @@protoc_insertion_point(field_mutable:securegcm.LoginNotificationInfo.email) + return _s; +} +inline const std::string& LoginNotificationInfo::_internal_email() const { + return email_.Get(); +} +inline void LoginNotificationInfo::_internal_set_email(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + email_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* LoginNotificationInfo::_internal_mutable_email() { + _has_bits_[0] |= 0x00000001u; + return email_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* LoginNotificationInfo::release_email() { + // @@protoc_insertion_point(field_release:securegcm.LoginNotificationInfo.email) + if (!_internal_has_email()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = email_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (email_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + email_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void LoginNotificationInfo::set_allocated_email(std::string* email) { + if (email != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + email_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), email, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (email_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + email_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:securegcm.LoginNotificationInfo.email) +} + +// optional string host = 4; +inline bool LoginNotificationInfo::_internal_has_host() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool LoginNotificationInfo::has_host() const { + return _internal_has_host(); +} +inline void LoginNotificationInfo::clear_host() { + host_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000002u; +} +inline const std::string& LoginNotificationInfo::host() const { + // @@protoc_insertion_point(field_get:securegcm.LoginNotificationInfo.host) + return _internal_host(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void LoginNotificationInfo::set_host(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000002u; + host_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:securegcm.LoginNotificationInfo.host) +} +inline std::string* LoginNotificationInfo::mutable_host() { + std::string* _s = _internal_mutable_host(); + // @@protoc_insertion_point(field_mutable:securegcm.LoginNotificationInfo.host) + return _s; +} +inline const std::string& LoginNotificationInfo::_internal_host() const { + return host_.Get(); +} +inline void LoginNotificationInfo::_internal_set_host(const std::string& value) { + _has_bits_[0] |= 0x00000002u; + host_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* LoginNotificationInfo::_internal_mutable_host() { + _has_bits_[0] |= 0x00000002u; + return host_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* LoginNotificationInfo::release_host() { + // @@protoc_insertion_point(field_release:securegcm.LoginNotificationInfo.host) + if (!_internal_has_host()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000002u; + auto* p = host_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (host_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + host_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void LoginNotificationInfo::set_allocated_host(std::string* host) { + if (host != nullptr) { + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + host_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), host, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (host_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + host_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:securegcm.LoginNotificationInfo.host) +} + +// optional string source = 5; +inline bool LoginNotificationInfo::_internal_has_source() const { + bool value = (_has_bits_[0] & 0x00000004u) != 0; + return value; +} +inline bool LoginNotificationInfo::has_source() const { + return _internal_has_source(); +} +inline void LoginNotificationInfo::clear_source() { + source_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000004u; +} +inline const std::string& LoginNotificationInfo::source() const { + // @@protoc_insertion_point(field_get:securegcm.LoginNotificationInfo.source) + return _internal_source(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void LoginNotificationInfo::set_source(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000004u; + source_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:securegcm.LoginNotificationInfo.source) +} +inline std::string* LoginNotificationInfo::mutable_source() { + std::string* _s = _internal_mutable_source(); + // @@protoc_insertion_point(field_mutable:securegcm.LoginNotificationInfo.source) + return _s; +} +inline const std::string& LoginNotificationInfo::_internal_source() const { + return source_.Get(); +} +inline void LoginNotificationInfo::_internal_set_source(const std::string& value) { + _has_bits_[0] |= 0x00000004u; + source_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* LoginNotificationInfo::_internal_mutable_source() { + _has_bits_[0] |= 0x00000004u; + return source_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* LoginNotificationInfo::release_source() { + // @@protoc_insertion_point(field_release:securegcm.LoginNotificationInfo.source) + if (!_internal_has_source()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000004u; + auto* p = source_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (source_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + source_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void LoginNotificationInfo::set_allocated_source(std::string* source) { + if (source != nullptr) { + _has_bits_[0] |= 0x00000004u; + } else { + _has_bits_[0] &= ~0x00000004u; + } + source_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), source, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (source_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + source_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:securegcm.LoginNotificationInfo.source) +} + +// optional string event_type = 6; +inline bool LoginNotificationInfo::_internal_has_event_type() const { + bool value = (_has_bits_[0] & 0x00000008u) != 0; + return value; +} +inline bool LoginNotificationInfo::has_event_type() const { + return _internal_has_event_type(); +} +inline void LoginNotificationInfo::clear_event_type() { + event_type_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000008u; +} +inline const std::string& LoginNotificationInfo::event_type() const { + // @@protoc_insertion_point(field_get:securegcm.LoginNotificationInfo.event_type) + return _internal_event_type(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void LoginNotificationInfo::set_event_type(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000008u; + event_type_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:securegcm.LoginNotificationInfo.event_type) +} +inline std::string* LoginNotificationInfo::mutable_event_type() { + std::string* _s = _internal_mutable_event_type(); + // @@protoc_insertion_point(field_mutable:securegcm.LoginNotificationInfo.event_type) + return _s; +} +inline const std::string& LoginNotificationInfo::_internal_event_type() const { + return event_type_.Get(); +} +inline void LoginNotificationInfo::_internal_set_event_type(const std::string& value) { + _has_bits_[0] |= 0x00000008u; + event_type_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* LoginNotificationInfo::_internal_mutable_event_type() { + _has_bits_[0] |= 0x00000008u; + return event_type_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* LoginNotificationInfo::release_event_type() { + // @@protoc_insertion_point(field_release:securegcm.LoginNotificationInfo.event_type) + if (!_internal_has_event_type()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000008u; + auto* p = event_type_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (event_type_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + event_type_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void LoginNotificationInfo::set_allocated_event_type(std::string* event_type) { + if (event_type != nullptr) { + _has_bits_[0] |= 0x00000008u; + } else { + _has_bits_[0] &= ~0x00000008u; + } + event_type_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), event_type, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (event_type_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + event_type_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:securegcm.LoginNotificationInfo.event_type) +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace securegcm + +PROTOBUF_NAMESPACE_OPEN + +template <> struct is_proto_enum< ::securegcm::AppleDeviceDiagonalMils> : ::std::true_type {}; +template <> struct is_proto_enum< ::securegcm::DeviceType> : ::std::true_type {}; +template <> struct is_proto_enum< ::securegcm::SoftwareFeature> : ::std::true_type {}; +template <> struct is_proto_enum< ::securegcm::InvocationReason> : ::std::true_type {}; +template <> struct is_proto_enum< ::securegcm::Type> : ::std::true_type {}; + +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_proto_2fsecuregcm_2eproto diff --git a/third_party/ukey2/compiled_proto/proto/securemessage.pb.cc b/third_party/ukey2/compiled_proto/proto/securemessage.pb.cc new file mode 100644 index 00000000..cabae499 --- /dev/null +++ b/third_party/ukey2/compiled_proto/proto/securemessage.pb.cc @@ -0,0 +1,2773 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: proto/securemessage.proto + +#include "proto/securemessage.pb.h" + +#include + +#include +#include +#include +#include +// @@protoc_insertion_point(includes) +#include + +PROTOBUF_PRAGMA_INIT_SEG +namespace securemessage { +constexpr SecureMessage::SecureMessage( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : header_and_body_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , signature_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){} +struct SecureMessageDefaultTypeInternal { + constexpr SecureMessageDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~SecureMessageDefaultTypeInternal() {} + union { + SecureMessage _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT SecureMessageDefaultTypeInternal _SecureMessage_default_instance_; +constexpr Header::Header( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : verification_key_id_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , decryption_key_id_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , iv_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , public_metadata_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , associated_data_length_(0u) + , signature_scheme_(1) + + , encryption_scheme_(1) +{} +struct HeaderDefaultTypeInternal { + constexpr HeaderDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~HeaderDefaultTypeInternal() {} + union { + Header _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT HeaderDefaultTypeInternal _Header_default_instance_; +constexpr HeaderAndBody::HeaderAndBody( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : body_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , header_(nullptr){} +struct HeaderAndBodyDefaultTypeInternal { + constexpr HeaderAndBodyDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~HeaderAndBodyDefaultTypeInternal() {} + union { + HeaderAndBody _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT HeaderAndBodyDefaultTypeInternal _HeaderAndBody_default_instance_; +constexpr HeaderAndBodyInternal::HeaderAndBodyInternal( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : header_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , body_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){} +struct HeaderAndBodyInternalDefaultTypeInternal { + constexpr HeaderAndBodyInternalDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~HeaderAndBodyInternalDefaultTypeInternal() {} + union { + HeaderAndBodyInternal _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT HeaderAndBodyInternalDefaultTypeInternal _HeaderAndBodyInternal_default_instance_; +constexpr EcP256PublicKey::EcP256PublicKey( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : x_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , y_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){} +struct EcP256PublicKeyDefaultTypeInternal { + constexpr EcP256PublicKeyDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~EcP256PublicKeyDefaultTypeInternal() {} + union { + EcP256PublicKey _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT EcP256PublicKeyDefaultTypeInternal _EcP256PublicKey_default_instance_; +constexpr SimpleRsaPublicKey::SimpleRsaPublicKey( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : n_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , e_(65537){} +struct SimpleRsaPublicKeyDefaultTypeInternal { + constexpr SimpleRsaPublicKeyDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~SimpleRsaPublicKeyDefaultTypeInternal() {} + union { + SimpleRsaPublicKey _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT SimpleRsaPublicKeyDefaultTypeInternal _SimpleRsaPublicKey_default_instance_; +constexpr DhPublicKey::DhPublicKey( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : y_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){} +struct DhPublicKeyDefaultTypeInternal { + constexpr DhPublicKeyDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~DhPublicKeyDefaultTypeInternal() {} + union { + DhPublicKey _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT DhPublicKeyDefaultTypeInternal _DhPublicKey_default_instance_; +constexpr GenericPublicKey::GenericPublicKey( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : ec_p256_public_key_(nullptr) + , rsa2048_public_key_(nullptr) + , dh2048_public_key_(nullptr) + , type_(1) +{} +struct GenericPublicKeyDefaultTypeInternal { + constexpr GenericPublicKeyDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~GenericPublicKeyDefaultTypeInternal() {} + union { + GenericPublicKey _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT GenericPublicKeyDefaultTypeInternal _GenericPublicKey_default_instance_; +} // namespace securemessage +namespace securemessage { +bool SigScheme_IsValid(int value) { + switch (value) { + case 1: + case 2: + case 3: + return true; + default: + return false; + } +} + +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed SigScheme_strings[3] = {}; + +static const char SigScheme_names[] = + "ECDSA_P256_SHA256" + "HMAC_SHA256" + "RSA2048_SHA256"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry SigScheme_entries[] = { + { {SigScheme_names + 0, 17}, 2 }, + { {SigScheme_names + 17, 11}, 1 }, + { {SigScheme_names + 28, 14}, 3 }, +}; + +static const int SigScheme_entries_by_number[] = { + 1, // 1 -> HMAC_SHA256 + 0, // 2 -> ECDSA_P256_SHA256 + 2, // 3 -> RSA2048_SHA256 +}; + +const std::string& SigScheme_Name( + SigScheme value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + SigScheme_entries, + SigScheme_entries_by_number, + 3, SigScheme_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + SigScheme_entries, + SigScheme_entries_by_number, + 3, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + SigScheme_strings[idx].get(); +} +bool SigScheme_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, SigScheme* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + SigScheme_entries, 3, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} +bool EncScheme_IsValid(int value) { + switch (value) { + case 1: + case 2: + return true; + default: + return false; + } +} + +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed EncScheme_strings[2] = {}; + +static const char EncScheme_names[] = + "AES_256_CBC" + "NONE"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry EncScheme_entries[] = { + { {EncScheme_names + 0, 11}, 2 }, + { {EncScheme_names + 11, 4}, 1 }, +}; + +static const int EncScheme_entries_by_number[] = { + 1, // 1 -> NONE + 0, // 2 -> AES_256_CBC +}; + +const std::string& EncScheme_Name( + EncScheme value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + EncScheme_entries, + EncScheme_entries_by_number, + 2, EncScheme_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + EncScheme_entries, + EncScheme_entries_by_number, + 2, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + EncScheme_strings[idx].get(); +} +bool EncScheme_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, EncScheme* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + EncScheme_entries, 2, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} +bool PublicKeyType_IsValid(int value) { + switch (value) { + case 1: + case 2: + case 3: + return true; + default: + return false; + } +} + +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed PublicKeyType_strings[3] = {}; + +static const char PublicKeyType_names[] = + "DH2048_MODP" + "EC_P256" + "RSA2048"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry PublicKeyType_entries[] = { + { {PublicKeyType_names + 0, 11}, 3 }, + { {PublicKeyType_names + 11, 7}, 1 }, + { {PublicKeyType_names + 18, 7}, 2 }, +}; + +static const int PublicKeyType_entries_by_number[] = { + 1, // 1 -> EC_P256 + 2, // 2 -> RSA2048 + 0, // 3 -> DH2048_MODP +}; + +const std::string& PublicKeyType_Name( + PublicKeyType value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + PublicKeyType_entries, + PublicKeyType_entries_by_number, + 3, PublicKeyType_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + PublicKeyType_entries, + PublicKeyType_entries_by_number, + 3, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + PublicKeyType_strings[idx].get(); +} +bool PublicKeyType_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, PublicKeyType* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + PublicKeyType_entries, 3, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} + +// =================================================================== + +class SecureMessage::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_header_and_body(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_signature(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static bool MissingRequiredFields(const HasBits& has_bits) { + return ((has_bits[0] & 0x00000003) ^ 0x00000003) != 0; + } +}; + +SecureMessage::SecureMessage(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:securemessage.SecureMessage) +} +SecureMessage::SecureMessage(const SecureMessage& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + header_and_body_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + header_and_body_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_header_and_body()) { + header_and_body_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_header_and_body(), + GetArenaForAllocation()); + } + signature_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + signature_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_signature()) { + signature_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_signature(), + GetArenaForAllocation()); + } + // @@protoc_insertion_point(copy_constructor:securemessage.SecureMessage) +} + +inline void SecureMessage::SharedCtor() { +header_and_body_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + header_and_body_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +signature_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + signature_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +SecureMessage::~SecureMessage() { + // @@protoc_insertion_point(destructor:securemessage.SecureMessage) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void SecureMessage::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + header_and_body_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + signature_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void SecureMessage::ArenaDtor(void* object) { + SecureMessage* _this = reinterpret_cast< SecureMessage* >(object); + (void)_this; +} +void SecureMessage::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void SecureMessage::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void SecureMessage::Clear() { +// @@protoc_insertion_point(message_clear_start:securemessage.SecureMessage) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + header_and_body_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000002u) { + signature_.ClearNonDefaultToEmpty(); + } + } + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* SecureMessage::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // required bytes header_and_body = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_header_and_body(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // required bytes signature = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + auto str = _internal_mutable_signature(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* SecureMessage::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:securemessage.SecureMessage) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // required bytes header_and_body = 1; + if (cached_has_bits & 0x00000001u) { + target = stream->WriteBytesMaybeAliased( + 1, this->_internal_header_and_body(), target); + } + + // required bytes signature = 2; + if (cached_has_bits & 0x00000002u) { + target = stream->WriteBytesMaybeAliased( + 2, this->_internal_signature(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:securemessage.SecureMessage) + return target; +} + +size_t SecureMessage::RequiredFieldsByteSizeFallback() const { +// @@protoc_insertion_point(required_fields_byte_size_fallback_start:securemessage.SecureMessage) + size_t total_size = 0; + + if (_internal_has_header_and_body()) { + // required bytes header_and_body = 1; + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_header_and_body()); + } + + if (_internal_has_signature()) { + // required bytes signature = 2; + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_signature()); + } + + return total_size; +} +size_t SecureMessage::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:securemessage.SecureMessage) + size_t total_size = 0; + + if (((_has_bits_[0] & 0x00000003) ^ 0x00000003) == 0) { // All required fields are present. + // required bytes header_and_body = 1; + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_header_and_body()); + + // required bytes signature = 2; + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_signature()); + + } else { + total_size += RequiredFieldsByteSizeFallback(); + } + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void SecureMessage::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void SecureMessage::MergeFrom(const SecureMessage& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:securemessage.SecureMessage) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + _internal_set_header_and_body(from._internal_header_and_body()); + } + if (cached_has_bits & 0x00000002u) { + _internal_set_signature(from._internal_signature()); + } + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void SecureMessage::CopyFrom(const SecureMessage& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:securemessage.SecureMessage) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool SecureMessage::IsInitialized() const { + if (_Internal::MissingRequiredFields(_has_bits_)) return false; + return true; +} + +void SecureMessage::InternalSwap(SecureMessage* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &header_and_body_, lhs_arena, + &other->header_and_body_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &signature_, lhs_arena, + &other->signature_, rhs_arena + ); +} + +std::string SecureMessage::GetTypeName() const { + return "securemessage.SecureMessage"; +} + + +// =================================================================== + +class Header::_Internal { + public: + using HasBits = decltype(std::declval
()._has_bits_); + static void set_has_signature_scheme(HasBits* has_bits) { + (*has_bits)[0] |= 32u; + } + static void set_has_encryption_scheme(HasBits* has_bits) { + (*has_bits)[0] |= 64u; + } + static void set_has_verification_key_id(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_decryption_key_id(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static void set_has_iv(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } + static void set_has_public_metadata(HasBits* has_bits) { + (*has_bits)[0] |= 8u; + } + static void set_has_associated_data_length(HasBits* has_bits) { + (*has_bits)[0] |= 16u; + } + static bool MissingRequiredFields(const HasBits& has_bits) { + return ((has_bits[0] & 0x00000060) ^ 0x00000060) != 0; + } +}; + +Header::Header(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:securemessage.Header) +} +Header::Header(const Header& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + verification_key_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + verification_key_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_verification_key_id()) { + verification_key_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_verification_key_id(), + GetArenaForAllocation()); + } + decryption_key_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + decryption_key_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_decryption_key_id()) { + decryption_key_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_decryption_key_id(), + GetArenaForAllocation()); + } + iv_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + iv_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_iv()) { + iv_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_iv(), + GetArenaForAllocation()); + } + public_metadata_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + public_metadata_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_public_metadata()) { + public_metadata_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_public_metadata(), + GetArenaForAllocation()); + } + ::memcpy(&associated_data_length_, &from.associated_data_length_, + static_cast(reinterpret_cast(&encryption_scheme_) - + reinterpret_cast(&associated_data_length_)) + sizeof(encryption_scheme_)); + // @@protoc_insertion_point(copy_constructor:securemessage.Header) +} + +inline void Header::SharedCtor() { +verification_key_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + verification_key_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +decryption_key_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + decryption_key_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +iv_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + iv_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +public_metadata_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + public_metadata_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +associated_data_length_ = 0u; +signature_scheme_ = 1; +encryption_scheme_ = 1; +} + +Header::~Header() { + // @@protoc_insertion_point(destructor:securemessage.Header) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void Header::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + verification_key_id_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + decryption_key_id_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + iv_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + public_metadata_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void Header::ArenaDtor(void* object) { + Header* _this = reinterpret_cast< Header* >(object); + (void)_this; +} +void Header::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void Header::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void Header::Clear() { +// @@protoc_insertion_point(message_clear_start:securemessage.Header) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x0000000fu) { + if (cached_has_bits & 0x00000001u) { + verification_key_id_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000002u) { + decryption_key_id_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000004u) { + iv_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000008u) { + public_metadata_.ClearNonDefaultToEmpty(); + } + } + if (cached_has_bits & 0x00000070u) { + associated_data_length_ = 0u; + signature_scheme_ = 1; + encryption_scheme_ = 1; + } + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* Header::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // required .securemessage.SigScheme signature_scheme = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::securemessage::SigScheme_IsValid(val))) { + _internal_set_signature_scheme(static_cast<::securemessage::SigScheme>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // required .securemessage.EncScheme encryption_scheme = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::securemessage::EncScheme_IsValid(val))) { + _internal_set_encryption_scheme(static_cast<::securemessage::EncScheme>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(2, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // optional bytes verification_key_id = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { + auto str = _internal_mutable_verification_key_id(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional bytes decryption_key_id = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { + auto str = _internal_mutable_decryption_key_id(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional bytes iv = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 42)) { + auto str = _internal_mutable_iv(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional bytes public_metadata = 6; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 50)) { + auto str = _internal_mutable_public_metadata(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional uint32 associated_data_length = 7 [default = 0]; + case 7: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 56)) { + _Internal::set_has_associated_data_length(&has_bits); + associated_data_length_ = ::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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* Header::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:securemessage.Header) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // required .securemessage.SigScheme signature_scheme = 1; + if (cached_has_bits & 0x00000020u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 1, this->_internal_signature_scheme(), target); + } + + // required .securemessage.EncScheme encryption_scheme = 2; + if (cached_has_bits & 0x00000040u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 2, this->_internal_encryption_scheme(), target); + } + + // optional bytes verification_key_id = 3; + if (cached_has_bits & 0x00000001u) { + target = stream->WriteBytesMaybeAliased( + 3, this->_internal_verification_key_id(), target); + } + + // optional bytes decryption_key_id = 4; + if (cached_has_bits & 0x00000002u) { + target = stream->WriteBytesMaybeAliased( + 4, this->_internal_decryption_key_id(), target); + } + + // optional bytes iv = 5; + if (cached_has_bits & 0x00000004u) { + target = stream->WriteBytesMaybeAliased( + 5, this->_internal_iv(), target); + } + + // optional bytes public_metadata = 6; + if (cached_has_bits & 0x00000008u) { + target = stream->WriteBytesMaybeAliased( + 6, this->_internal_public_metadata(), target); + } + + // optional uint32 associated_data_length = 7 [default = 0]; + if (cached_has_bits & 0x00000010u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(7, this->_internal_associated_data_length(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:securemessage.Header) + return target; +} + +size_t Header::RequiredFieldsByteSizeFallback() const { +// @@protoc_insertion_point(required_fields_byte_size_fallback_start:securemessage.Header) + size_t total_size = 0; + + if (_internal_has_signature_scheme()) { + // required .securemessage.SigScheme signature_scheme = 1; + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_signature_scheme()); + } + + if (_internal_has_encryption_scheme()) { + // required .securemessage.EncScheme encryption_scheme = 2; + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_encryption_scheme()); + } + + return total_size; +} +size_t Header::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:securemessage.Header) + size_t total_size = 0; + + if (((_has_bits_[0] & 0x00000060) ^ 0x00000060) == 0) { // All required fields are present. + // required .securemessage.SigScheme signature_scheme = 1; + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_signature_scheme()); + + // required .securemessage.EncScheme encryption_scheme = 2; + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_encryption_scheme()); + + } else { + total_size += RequiredFieldsByteSizeFallback(); + } + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x0000001fu) { + // optional bytes verification_key_id = 3; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_verification_key_id()); + } + + // optional bytes decryption_key_id = 4; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_decryption_key_id()); + } + + // optional bytes iv = 5; + if (cached_has_bits & 0x00000004u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_iv()); + } + + // optional bytes public_metadata = 6; + if (cached_has_bits & 0x00000008u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_public_metadata()); + } + + // optional uint32 associated_data_length = 7 [default = 0]; + if (cached_has_bits & 0x00000010u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_associated_data_length()); + } + + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void Header::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void Header::MergeFrom(const Header& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:securemessage.Header) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x0000007fu) { + if (cached_has_bits & 0x00000001u) { + _internal_set_verification_key_id(from._internal_verification_key_id()); + } + if (cached_has_bits & 0x00000002u) { + _internal_set_decryption_key_id(from._internal_decryption_key_id()); + } + if (cached_has_bits & 0x00000004u) { + _internal_set_iv(from._internal_iv()); + } + if (cached_has_bits & 0x00000008u) { + _internal_set_public_metadata(from._internal_public_metadata()); + } + if (cached_has_bits & 0x00000010u) { + associated_data_length_ = from.associated_data_length_; + } + if (cached_has_bits & 0x00000020u) { + signature_scheme_ = from.signature_scheme_; + } + if (cached_has_bits & 0x00000040u) { + encryption_scheme_ = from.encryption_scheme_; + } + _has_bits_[0] |= cached_has_bits; + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void Header::CopyFrom(const Header& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:securemessage.Header) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Header::IsInitialized() const { + if (_Internal::MissingRequiredFields(_has_bits_)) return false; + return true; +} + +void Header::InternalSwap(Header* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &verification_key_id_, lhs_arena, + &other->verification_key_id_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &decryption_key_id_, lhs_arena, + &other->decryption_key_id_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &iv_, lhs_arena, + &other->iv_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &public_metadata_, lhs_arena, + &other->public_metadata_, rhs_arena + ); + swap(associated_data_length_, other->associated_data_length_); + swap(signature_scheme_, other->signature_scheme_); + swap(encryption_scheme_, other->encryption_scheme_); +} + +std::string Header::GetTypeName() const { + return "securemessage.Header"; +} + + +// =================================================================== + +class HeaderAndBody::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static const ::securemessage::Header& header(const HeaderAndBody* msg); + static void set_has_header(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static void set_has_body(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static bool MissingRequiredFields(const HasBits& has_bits) { + return ((has_bits[0] & 0x00000003) ^ 0x00000003) != 0; + } +}; + +const ::securemessage::Header& +HeaderAndBody::_Internal::header(const HeaderAndBody* msg) { + return *msg->header_; +} +HeaderAndBody::HeaderAndBody(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:securemessage.HeaderAndBody) +} +HeaderAndBody::HeaderAndBody(const HeaderAndBody& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + body_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + body_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_body()) { + body_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_body(), + GetArenaForAllocation()); + } + if (from._internal_has_header()) { + header_ = new ::securemessage::Header(*from.header_); + } else { + header_ = nullptr; + } + // @@protoc_insertion_point(copy_constructor:securemessage.HeaderAndBody) +} + +inline void HeaderAndBody::SharedCtor() { +body_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + body_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +header_ = nullptr; +} + +HeaderAndBody::~HeaderAndBody() { + // @@protoc_insertion_point(destructor:securemessage.HeaderAndBody) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void HeaderAndBody::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + body_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (this != internal_default_instance()) delete header_; +} + +void HeaderAndBody::ArenaDtor(void* object) { + HeaderAndBody* _this = reinterpret_cast< HeaderAndBody* >(object); + (void)_this; +} +void HeaderAndBody::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void HeaderAndBody::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void HeaderAndBody::Clear() { +// @@protoc_insertion_point(message_clear_start:securemessage.HeaderAndBody) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + body_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000002u) { + GOOGLE_DCHECK(header_ != nullptr); + header_->Clear(); + } + } + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* HeaderAndBody::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // required .securemessage.Header header = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + ptr = ctx->ParseMessage(_internal_mutable_header(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // required bytes body = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + auto str = _internal_mutable_body(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* HeaderAndBody::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:securemessage.HeaderAndBody) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // required .securemessage.Header header = 1; + if (cached_has_bits & 0x00000002u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 1, _Internal::header(this), target, stream); + } + + // required bytes body = 2; + if (cached_has_bits & 0x00000001u) { + target = stream->WriteBytesMaybeAliased( + 2, this->_internal_body(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:securemessage.HeaderAndBody) + return target; +} + +size_t HeaderAndBody::RequiredFieldsByteSizeFallback() const { +// @@protoc_insertion_point(required_fields_byte_size_fallback_start:securemessage.HeaderAndBody) + size_t total_size = 0; + + if (_internal_has_body()) { + // required bytes body = 2; + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_body()); + } + + if (_internal_has_header()) { + // required .securemessage.Header header = 1; + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *header_); + } + + return total_size; +} +size_t HeaderAndBody::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:securemessage.HeaderAndBody) + size_t total_size = 0; + + if (((_has_bits_[0] & 0x00000003) ^ 0x00000003) == 0) { // All required fields are present. + // required bytes body = 2; + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_body()); + + // required .securemessage.Header header = 1; + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *header_); + + } else { + total_size += RequiredFieldsByteSizeFallback(); + } + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void HeaderAndBody::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void HeaderAndBody::MergeFrom(const HeaderAndBody& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:securemessage.HeaderAndBody) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + _internal_set_body(from._internal_body()); + } + if (cached_has_bits & 0x00000002u) { + _internal_mutable_header()->::securemessage::Header::MergeFrom(from._internal_header()); + } + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void HeaderAndBody::CopyFrom(const HeaderAndBody& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:securemessage.HeaderAndBody) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool HeaderAndBody::IsInitialized() const { + if (_Internal::MissingRequiredFields(_has_bits_)) return false; + if (_internal_has_header()) { + if (!header_->IsInitialized()) return false; + } + return true; +} + +void HeaderAndBody::InternalSwap(HeaderAndBody* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &body_, lhs_arena, + &other->body_, rhs_arena + ); + swap(header_, other->header_); +} + +std::string HeaderAndBody::GetTypeName() const { + return "securemessage.HeaderAndBody"; +} + + +// =================================================================== + +class HeaderAndBodyInternal::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_header(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_body(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static bool MissingRequiredFields(const HasBits& has_bits) { + return ((has_bits[0] & 0x00000003) ^ 0x00000003) != 0; + } +}; + +HeaderAndBodyInternal::HeaderAndBodyInternal(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:securemessage.HeaderAndBodyInternal) +} +HeaderAndBodyInternal::HeaderAndBodyInternal(const HeaderAndBodyInternal& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + header_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + header_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_header()) { + header_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_header(), + GetArenaForAllocation()); + } + body_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + body_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_body()) { + body_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_body(), + GetArenaForAllocation()); + } + // @@protoc_insertion_point(copy_constructor:securemessage.HeaderAndBodyInternal) +} + +inline void HeaderAndBodyInternal::SharedCtor() { +header_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + header_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +body_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + body_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +HeaderAndBodyInternal::~HeaderAndBodyInternal() { + // @@protoc_insertion_point(destructor:securemessage.HeaderAndBodyInternal) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void HeaderAndBodyInternal::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + header_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + body_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void HeaderAndBodyInternal::ArenaDtor(void* object) { + HeaderAndBodyInternal* _this = reinterpret_cast< HeaderAndBodyInternal* >(object); + (void)_this; +} +void HeaderAndBodyInternal::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void HeaderAndBodyInternal::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void HeaderAndBodyInternal::Clear() { +// @@protoc_insertion_point(message_clear_start:securemessage.HeaderAndBodyInternal) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + header_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000002u) { + body_.ClearNonDefaultToEmpty(); + } + } + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* HeaderAndBodyInternal::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // required bytes header = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_header(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // required bytes body = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + auto str = _internal_mutable_body(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* HeaderAndBodyInternal::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:securemessage.HeaderAndBodyInternal) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // required bytes header = 1; + if (cached_has_bits & 0x00000001u) { + target = stream->WriteBytesMaybeAliased( + 1, this->_internal_header(), target); + } + + // required bytes body = 2; + if (cached_has_bits & 0x00000002u) { + target = stream->WriteBytesMaybeAliased( + 2, this->_internal_body(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:securemessage.HeaderAndBodyInternal) + return target; +} + +size_t HeaderAndBodyInternal::RequiredFieldsByteSizeFallback() const { +// @@protoc_insertion_point(required_fields_byte_size_fallback_start:securemessage.HeaderAndBodyInternal) + size_t total_size = 0; + + if (_internal_has_header()) { + // required bytes header = 1; + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_header()); + } + + if (_internal_has_body()) { + // required bytes body = 2; + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_body()); + } + + return total_size; +} +size_t HeaderAndBodyInternal::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:securemessage.HeaderAndBodyInternal) + size_t total_size = 0; + + if (((_has_bits_[0] & 0x00000003) ^ 0x00000003) == 0) { // All required fields are present. + // required bytes header = 1; + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_header()); + + // required bytes body = 2; + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_body()); + + } else { + total_size += RequiredFieldsByteSizeFallback(); + } + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void HeaderAndBodyInternal::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void HeaderAndBodyInternal::MergeFrom(const HeaderAndBodyInternal& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:securemessage.HeaderAndBodyInternal) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + _internal_set_header(from._internal_header()); + } + if (cached_has_bits & 0x00000002u) { + _internal_set_body(from._internal_body()); + } + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void HeaderAndBodyInternal::CopyFrom(const HeaderAndBodyInternal& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:securemessage.HeaderAndBodyInternal) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool HeaderAndBodyInternal::IsInitialized() const { + if (_Internal::MissingRequiredFields(_has_bits_)) return false; + return true; +} + +void HeaderAndBodyInternal::InternalSwap(HeaderAndBodyInternal* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &header_, lhs_arena, + &other->header_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &body_, lhs_arena, + &other->body_, rhs_arena + ); +} + +std::string HeaderAndBodyInternal::GetTypeName() const { + return "securemessage.HeaderAndBodyInternal"; +} + + +// =================================================================== + +class EcP256PublicKey::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_x(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_y(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static bool MissingRequiredFields(const HasBits& has_bits) { + return ((has_bits[0] & 0x00000003) ^ 0x00000003) != 0; + } +}; + +EcP256PublicKey::EcP256PublicKey(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:securemessage.EcP256PublicKey) +} +EcP256PublicKey::EcP256PublicKey(const EcP256PublicKey& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + x_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + x_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_x()) { + x_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_x(), + GetArenaForAllocation()); + } + y_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + y_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_y()) { + y_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_y(), + GetArenaForAllocation()); + } + // @@protoc_insertion_point(copy_constructor:securemessage.EcP256PublicKey) +} + +inline void EcP256PublicKey::SharedCtor() { +x_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + x_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +y_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + y_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +EcP256PublicKey::~EcP256PublicKey() { + // @@protoc_insertion_point(destructor:securemessage.EcP256PublicKey) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void EcP256PublicKey::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + x_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + y_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void EcP256PublicKey::ArenaDtor(void* object) { + EcP256PublicKey* _this = reinterpret_cast< EcP256PublicKey* >(object); + (void)_this; +} +void EcP256PublicKey::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void EcP256PublicKey::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void EcP256PublicKey::Clear() { +// @@protoc_insertion_point(message_clear_start:securemessage.EcP256PublicKey) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + x_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000002u) { + y_.ClearNonDefaultToEmpty(); + } + } + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* EcP256PublicKey::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // required bytes x = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_x(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // required bytes y = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + auto str = _internal_mutable_y(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* EcP256PublicKey::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:securemessage.EcP256PublicKey) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // required bytes x = 1; + if (cached_has_bits & 0x00000001u) { + target = stream->WriteBytesMaybeAliased( + 1, this->_internal_x(), target); + } + + // required bytes y = 2; + if (cached_has_bits & 0x00000002u) { + target = stream->WriteBytesMaybeAliased( + 2, this->_internal_y(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:securemessage.EcP256PublicKey) + return target; +} + +size_t EcP256PublicKey::RequiredFieldsByteSizeFallback() const { +// @@protoc_insertion_point(required_fields_byte_size_fallback_start:securemessage.EcP256PublicKey) + size_t total_size = 0; + + if (_internal_has_x()) { + // required bytes x = 1; + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_x()); + } + + if (_internal_has_y()) { + // required bytes y = 2; + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_y()); + } + + return total_size; +} +size_t EcP256PublicKey::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:securemessage.EcP256PublicKey) + size_t total_size = 0; + + if (((_has_bits_[0] & 0x00000003) ^ 0x00000003) == 0) { // All required fields are present. + // required bytes x = 1; + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_x()); + + // required bytes y = 2; + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_y()); + + } else { + total_size += RequiredFieldsByteSizeFallback(); + } + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void EcP256PublicKey::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void EcP256PublicKey::MergeFrom(const EcP256PublicKey& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:securemessage.EcP256PublicKey) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + _internal_set_x(from._internal_x()); + } + if (cached_has_bits & 0x00000002u) { + _internal_set_y(from._internal_y()); + } + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void EcP256PublicKey::CopyFrom(const EcP256PublicKey& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:securemessage.EcP256PublicKey) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool EcP256PublicKey::IsInitialized() const { + if (_Internal::MissingRequiredFields(_has_bits_)) return false; + return true; +} + +void EcP256PublicKey::InternalSwap(EcP256PublicKey* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &x_, lhs_arena, + &other->x_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &y_, lhs_arena, + &other->y_, rhs_arena + ); +} + +std::string EcP256PublicKey::GetTypeName() const { + return "securemessage.EcP256PublicKey"; +} + + +// =================================================================== + +class SimpleRsaPublicKey::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_n(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_e(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static bool MissingRequiredFields(const HasBits& has_bits) { + return ((has_bits[0] & 0x00000001) ^ 0x00000001) != 0; + } +}; + +SimpleRsaPublicKey::SimpleRsaPublicKey(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:securemessage.SimpleRsaPublicKey) +} +SimpleRsaPublicKey::SimpleRsaPublicKey(const SimpleRsaPublicKey& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + n_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + n_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_n()) { + n_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_n(), + GetArenaForAllocation()); + } + e_ = from.e_; + // @@protoc_insertion_point(copy_constructor:securemessage.SimpleRsaPublicKey) +} + +inline void SimpleRsaPublicKey::SharedCtor() { +n_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + n_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +e_ = 65537; +} + +SimpleRsaPublicKey::~SimpleRsaPublicKey() { + // @@protoc_insertion_point(destructor:securemessage.SimpleRsaPublicKey) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void SimpleRsaPublicKey::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + n_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void SimpleRsaPublicKey::ArenaDtor(void* object) { + SimpleRsaPublicKey* _this = reinterpret_cast< SimpleRsaPublicKey* >(object); + (void)_this; +} +void SimpleRsaPublicKey::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void SimpleRsaPublicKey::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void SimpleRsaPublicKey::Clear() { +// @@protoc_insertion_point(message_clear_start:securemessage.SimpleRsaPublicKey) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + n_.ClearNonDefaultToEmpty(); + } + e_ = 65537; + } + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* SimpleRsaPublicKey::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // required bytes n = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_n(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional int32 e = 2 [default = 65537]; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { + _Internal::set_has_e(&has_bits); + e_ = ::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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* SimpleRsaPublicKey::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:securemessage.SimpleRsaPublicKey) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // required bytes n = 1; + if (cached_has_bits & 0x00000001u) { + target = stream->WriteBytesMaybeAliased( + 1, this->_internal_n(), target); + } + + // optional int32 e = 2 [default = 65537]; + if (cached_has_bits & 0x00000002u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_e(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:securemessage.SimpleRsaPublicKey) + return target; +} + +size_t SimpleRsaPublicKey::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:securemessage.SimpleRsaPublicKey) + size_t total_size = 0; + + // required bytes n = 1; + if (_internal_has_n()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_n()); + } + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // optional int32 e = 2 [default = 65537]; + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000002u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_e()); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void SimpleRsaPublicKey::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void SimpleRsaPublicKey::MergeFrom(const SimpleRsaPublicKey& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:securemessage.SimpleRsaPublicKey) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + _internal_set_n(from._internal_n()); + } + if (cached_has_bits & 0x00000002u) { + e_ = from.e_; + } + _has_bits_[0] |= cached_has_bits; + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void SimpleRsaPublicKey::CopyFrom(const SimpleRsaPublicKey& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:securemessage.SimpleRsaPublicKey) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool SimpleRsaPublicKey::IsInitialized() const { + if (_Internal::MissingRequiredFields(_has_bits_)) return false; + return true; +} + +void SimpleRsaPublicKey::InternalSwap(SimpleRsaPublicKey* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &n_, lhs_arena, + &other->n_, rhs_arena + ); + swap(e_, other->e_); +} + +std::string SimpleRsaPublicKey::GetTypeName() const { + return "securemessage.SimpleRsaPublicKey"; +} + + +// =================================================================== + +class DhPublicKey::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_y(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static bool MissingRequiredFields(const HasBits& has_bits) { + return ((has_bits[0] & 0x00000001) ^ 0x00000001) != 0; + } +}; + +DhPublicKey::DhPublicKey(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:securemessage.DhPublicKey) +} +DhPublicKey::DhPublicKey(const DhPublicKey& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + y_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + y_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_y()) { + y_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_y(), + GetArenaForAllocation()); + } + // @@protoc_insertion_point(copy_constructor:securemessage.DhPublicKey) +} + +inline void DhPublicKey::SharedCtor() { +y_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + y_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +DhPublicKey::~DhPublicKey() { + // @@protoc_insertion_point(destructor:securemessage.DhPublicKey) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void DhPublicKey::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + y_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void DhPublicKey::ArenaDtor(void* object) { + DhPublicKey* _this = reinterpret_cast< DhPublicKey* >(object); + (void)_this; +} +void DhPublicKey::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void DhPublicKey::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void DhPublicKey::Clear() { +// @@protoc_insertion_point(message_clear_start:securemessage.DhPublicKey) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + y_.ClearNonDefaultToEmpty(); + } + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* DhPublicKey::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // required bytes y = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_y(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* DhPublicKey::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:securemessage.DhPublicKey) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // required bytes y = 1; + if (cached_has_bits & 0x00000001u) { + target = stream->WriteBytesMaybeAliased( + 1, this->_internal_y(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:securemessage.DhPublicKey) + return target; +} + +size_t DhPublicKey::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:securemessage.DhPublicKey) + size_t total_size = 0; + + // required bytes y = 1; + if (_internal_has_y()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_y()); + } + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void DhPublicKey::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void DhPublicKey::MergeFrom(const DhPublicKey& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:securemessage.DhPublicKey) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_has_y()) { + _internal_set_y(from._internal_y()); + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void DhPublicKey::CopyFrom(const DhPublicKey& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:securemessage.DhPublicKey) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool DhPublicKey::IsInitialized() const { + if (_Internal::MissingRequiredFields(_has_bits_)) return false; + return true; +} + +void DhPublicKey::InternalSwap(DhPublicKey* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &y_, lhs_arena, + &other->y_, rhs_arena + ); +} + +std::string DhPublicKey::GetTypeName() const { + return "securemessage.DhPublicKey"; +} + + +// =================================================================== + +class GenericPublicKey::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_type(HasBits* has_bits) { + (*has_bits)[0] |= 8u; + } + static const ::securemessage::EcP256PublicKey& ec_p256_public_key(const GenericPublicKey* msg); + static void set_has_ec_p256_public_key(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static const ::securemessage::SimpleRsaPublicKey& rsa2048_public_key(const GenericPublicKey* msg); + static void set_has_rsa2048_public_key(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static const ::securemessage::DhPublicKey& dh2048_public_key(const GenericPublicKey* msg); + static void set_has_dh2048_public_key(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } + static bool MissingRequiredFields(const HasBits& has_bits) { + return ((has_bits[0] & 0x00000008) ^ 0x00000008) != 0; + } +}; + +const ::securemessage::EcP256PublicKey& +GenericPublicKey::_Internal::ec_p256_public_key(const GenericPublicKey* msg) { + return *msg->ec_p256_public_key_; +} +const ::securemessage::SimpleRsaPublicKey& +GenericPublicKey::_Internal::rsa2048_public_key(const GenericPublicKey* msg) { + return *msg->rsa2048_public_key_; +} +const ::securemessage::DhPublicKey& +GenericPublicKey::_Internal::dh2048_public_key(const GenericPublicKey* msg) { + return *msg->dh2048_public_key_; +} +GenericPublicKey::GenericPublicKey(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:securemessage.GenericPublicKey) +} +GenericPublicKey::GenericPublicKey(const GenericPublicKey& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + if (from._internal_has_ec_p256_public_key()) { + ec_p256_public_key_ = new ::securemessage::EcP256PublicKey(*from.ec_p256_public_key_); + } else { + ec_p256_public_key_ = nullptr; + } + if (from._internal_has_rsa2048_public_key()) { + rsa2048_public_key_ = new ::securemessage::SimpleRsaPublicKey(*from.rsa2048_public_key_); + } else { + rsa2048_public_key_ = nullptr; + } + if (from._internal_has_dh2048_public_key()) { + dh2048_public_key_ = new ::securemessage::DhPublicKey(*from.dh2048_public_key_); + } else { + dh2048_public_key_ = nullptr; + } + type_ = from.type_; + // @@protoc_insertion_point(copy_constructor:securemessage.GenericPublicKey) +} + +inline void GenericPublicKey::SharedCtor() { +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&ec_p256_public_key_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&dh2048_public_key_) - + reinterpret_cast(&ec_p256_public_key_)) + sizeof(dh2048_public_key_)); +type_ = 1; +} + +GenericPublicKey::~GenericPublicKey() { + // @@protoc_insertion_point(destructor:securemessage.GenericPublicKey) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void GenericPublicKey::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + if (this != internal_default_instance()) delete ec_p256_public_key_; + if (this != internal_default_instance()) delete rsa2048_public_key_; + if (this != internal_default_instance()) delete dh2048_public_key_; +} + +void GenericPublicKey::ArenaDtor(void* object) { + GenericPublicKey* _this = reinterpret_cast< GenericPublicKey* >(object); + (void)_this; +} +void GenericPublicKey::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void GenericPublicKey::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void GenericPublicKey::Clear() { +// @@protoc_insertion_point(message_clear_start:securemessage.GenericPublicKey) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x0000000fu) { + if (cached_has_bits & 0x00000001u) { + GOOGLE_DCHECK(ec_p256_public_key_ != nullptr); + ec_p256_public_key_->Clear(); + } + if (cached_has_bits & 0x00000002u) { + GOOGLE_DCHECK(rsa2048_public_key_ != nullptr); + rsa2048_public_key_->Clear(); + } + if (cached_has_bits & 0x00000004u) { + GOOGLE_DCHECK(dh2048_public_key_ != nullptr); + dh2048_public_key_->Clear(); + } + type_ = 1; + } + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* GenericPublicKey::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // required .securemessage.PublicKeyType type = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::securemessage::PublicKeyType_IsValid(val))) { + _internal_set_type(static_cast<::securemessage::PublicKeyType>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // optional .securemessage.EcP256PublicKey ec_p256_public_key = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + ptr = ctx->ParseMessage(_internal_mutable_ec_p256_public_key(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .securemessage.SimpleRsaPublicKey rsa2048_public_key = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { + ptr = ctx->ParseMessage(_internal_mutable_rsa2048_public_key(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .securemessage.DhPublicKey dh2048_public_key = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { + ptr = ctx->ParseMessage(_internal_mutable_dh2048_public_key(), 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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* GenericPublicKey::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:securemessage.GenericPublicKey) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // required .securemessage.PublicKeyType type = 1; + if (cached_has_bits & 0x00000008u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 1, this->_internal_type(), target); + } + + // optional .securemessage.EcP256PublicKey ec_p256_public_key = 2; + if (cached_has_bits & 0x00000001u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 2, _Internal::ec_p256_public_key(this), target, stream); + } + + // optional .securemessage.SimpleRsaPublicKey rsa2048_public_key = 3; + if (cached_has_bits & 0x00000002u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 3, _Internal::rsa2048_public_key(this), target, stream); + } + + // optional .securemessage.DhPublicKey dh2048_public_key = 4; + if (cached_has_bits & 0x00000004u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 4, _Internal::dh2048_public_key(this), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:securemessage.GenericPublicKey) + return target; +} + +size_t GenericPublicKey::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:securemessage.GenericPublicKey) + size_t total_size = 0; + + // required .securemessage.PublicKeyType type = 1; + if (_internal_has_type()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_type()); + } + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + // optional .securemessage.EcP256PublicKey ec_p256_public_key = 2; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *ec_p256_public_key_); + } + + // optional .securemessage.SimpleRsaPublicKey rsa2048_public_key = 3; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *rsa2048_public_key_); + } + + // optional .securemessage.DhPublicKey dh2048_public_key = 4; + if (cached_has_bits & 0x00000004u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *dh2048_public_key_); + } + + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void GenericPublicKey::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void GenericPublicKey::MergeFrom(const GenericPublicKey& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:securemessage.GenericPublicKey) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x0000000fu) { + if (cached_has_bits & 0x00000001u) { + _internal_mutable_ec_p256_public_key()->::securemessage::EcP256PublicKey::MergeFrom(from._internal_ec_p256_public_key()); + } + if (cached_has_bits & 0x00000002u) { + _internal_mutable_rsa2048_public_key()->::securemessage::SimpleRsaPublicKey::MergeFrom(from._internal_rsa2048_public_key()); + } + if (cached_has_bits & 0x00000004u) { + _internal_mutable_dh2048_public_key()->::securemessage::DhPublicKey::MergeFrom(from._internal_dh2048_public_key()); + } + if (cached_has_bits & 0x00000008u) { + type_ = from.type_; + } + _has_bits_[0] |= cached_has_bits; + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void GenericPublicKey::CopyFrom(const GenericPublicKey& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:securemessage.GenericPublicKey) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool GenericPublicKey::IsInitialized() const { + if (_Internal::MissingRequiredFields(_has_bits_)) return false; + if (_internal_has_ec_p256_public_key()) { + if (!ec_p256_public_key_->IsInitialized()) return false; + } + if (_internal_has_rsa2048_public_key()) { + if (!rsa2048_public_key_->IsInitialized()) return false; + } + if (_internal_has_dh2048_public_key()) { + if (!dh2048_public_key_->IsInitialized()) return false; + } + return true; +} + +void GenericPublicKey::InternalSwap(GenericPublicKey* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(GenericPublicKey, dh2048_public_key_) + + sizeof(GenericPublicKey::dh2048_public_key_) + - PROTOBUF_FIELD_OFFSET(GenericPublicKey, ec_p256_public_key_)>( + reinterpret_cast(&ec_p256_public_key_), + reinterpret_cast(&other->ec_p256_public_key_)); + swap(type_, other->type_); +} + +std::string GenericPublicKey::GetTypeName() const { + return "securemessage.GenericPublicKey"; +} + + +// @@protoc_insertion_point(namespace_scope) +} // namespace securemessage +PROTOBUF_NAMESPACE_OPEN +template<> PROTOBUF_NOINLINE ::securemessage::SecureMessage* Arena::CreateMaybeMessage< ::securemessage::SecureMessage >(Arena* arena) { + return Arena::CreateMessageInternal< ::securemessage::SecureMessage >(arena); +} +template<> PROTOBUF_NOINLINE ::securemessage::Header* Arena::CreateMaybeMessage< ::securemessage::Header >(Arena* arena) { + return Arena::CreateMessageInternal< ::securemessage::Header >(arena); +} +template<> PROTOBUF_NOINLINE ::securemessage::HeaderAndBody* Arena::CreateMaybeMessage< ::securemessage::HeaderAndBody >(Arena* arena) { + return Arena::CreateMessageInternal< ::securemessage::HeaderAndBody >(arena); +} +template<> PROTOBUF_NOINLINE ::securemessage::HeaderAndBodyInternal* Arena::CreateMaybeMessage< ::securemessage::HeaderAndBodyInternal >(Arena* arena) { + return Arena::CreateMessageInternal< ::securemessage::HeaderAndBodyInternal >(arena); +} +template<> PROTOBUF_NOINLINE ::securemessage::EcP256PublicKey* Arena::CreateMaybeMessage< ::securemessage::EcP256PublicKey >(Arena* arena) { + return Arena::CreateMessageInternal< ::securemessage::EcP256PublicKey >(arena); +} +template<> PROTOBUF_NOINLINE ::securemessage::SimpleRsaPublicKey* Arena::CreateMaybeMessage< ::securemessage::SimpleRsaPublicKey >(Arena* arena) { + return Arena::CreateMessageInternal< ::securemessage::SimpleRsaPublicKey >(arena); +} +template<> PROTOBUF_NOINLINE ::securemessage::DhPublicKey* Arena::CreateMaybeMessage< ::securemessage::DhPublicKey >(Arena* arena) { + return Arena::CreateMessageInternal< ::securemessage::DhPublicKey >(arena); +} +template<> PROTOBUF_NOINLINE ::securemessage::GenericPublicKey* Arena::CreateMaybeMessage< ::securemessage::GenericPublicKey >(Arena* arena) { + return Arena::CreateMessageInternal< ::securemessage::GenericPublicKey >(arena); +} +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) +#include diff --git a/third_party/ukey2/compiled_proto/proto/securemessage.pb.h b/third_party/ukey2/compiled_proto/proto/securemessage.pb.h new file mode 100644 index 00000000..de0cf362 --- /dev/null +++ b/third_party/ukey2/compiled_proto/proto/securemessage.pb.h @@ -0,0 +1,3069 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: proto/securemessage.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_proto_2fsecuremessage_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_proto_2fsecuremessage_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3019000 +#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 3019004 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_proto_2fsecuremessage_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_proto_2fsecuremessage_2eproto { + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::AuxiliaryParseTableField aux[] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[8] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[]; + static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[]; + static const uint32_t offsets[]; +}; +namespace securemessage { +class DhPublicKey; +struct DhPublicKeyDefaultTypeInternal; +extern DhPublicKeyDefaultTypeInternal _DhPublicKey_default_instance_; +class EcP256PublicKey; +struct EcP256PublicKeyDefaultTypeInternal; +extern EcP256PublicKeyDefaultTypeInternal _EcP256PublicKey_default_instance_; +class GenericPublicKey; +struct GenericPublicKeyDefaultTypeInternal; +extern GenericPublicKeyDefaultTypeInternal _GenericPublicKey_default_instance_; +class Header; +struct HeaderDefaultTypeInternal; +extern HeaderDefaultTypeInternal _Header_default_instance_; +class HeaderAndBody; +struct HeaderAndBodyDefaultTypeInternal; +extern HeaderAndBodyDefaultTypeInternal _HeaderAndBody_default_instance_; +class HeaderAndBodyInternal; +struct HeaderAndBodyInternalDefaultTypeInternal; +extern HeaderAndBodyInternalDefaultTypeInternal _HeaderAndBodyInternal_default_instance_; +class SecureMessage; +struct SecureMessageDefaultTypeInternal; +extern SecureMessageDefaultTypeInternal _SecureMessage_default_instance_; +class SimpleRsaPublicKey; +struct SimpleRsaPublicKeyDefaultTypeInternal; +extern SimpleRsaPublicKeyDefaultTypeInternal _SimpleRsaPublicKey_default_instance_; +} // namespace securemessage +PROTOBUF_NAMESPACE_OPEN +template<> ::securemessage::DhPublicKey* Arena::CreateMaybeMessage<::securemessage::DhPublicKey>(Arena*); +template<> ::securemessage::EcP256PublicKey* Arena::CreateMaybeMessage<::securemessage::EcP256PublicKey>(Arena*); +template<> ::securemessage::GenericPublicKey* Arena::CreateMaybeMessage<::securemessage::GenericPublicKey>(Arena*); +template<> ::securemessage::Header* Arena::CreateMaybeMessage<::securemessage::Header>(Arena*); +template<> ::securemessage::HeaderAndBody* Arena::CreateMaybeMessage<::securemessage::HeaderAndBody>(Arena*); +template<> ::securemessage::HeaderAndBodyInternal* Arena::CreateMaybeMessage<::securemessage::HeaderAndBodyInternal>(Arena*); +template<> ::securemessage::SecureMessage* Arena::CreateMaybeMessage<::securemessage::SecureMessage>(Arena*); +template<> ::securemessage::SimpleRsaPublicKey* Arena::CreateMaybeMessage<::securemessage::SimpleRsaPublicKey>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace securemessage { + +enum SigScheme : int { + HMAC_SHA256 = 1, + ECDSA_P256_SHA256 = 2, + RSA2048_SHA256 = 3 +}; +bool SigScheme_IsValid(int value); +constexpr SigScheme SigScheme_MIN = HMAC_SHA256; +constexpr SigScheme SigScheme_MAX = RSA2048_SHA256; +constexpr int SigScheme_ARRAYSIZE = SigScheme_MAX + 1; + +const std::string& SigScheme_Name(SigScheme value); +template +inline const std::string& SigScheme_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function SigScheme_Name."); + return SigScheme_Name(static_cast(enum_t_value)); +} +bool SigScheme_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, SigScheme* value); +enum EncScheme : int { + NONE = 1, + AES_256_CBC = 2 +}; +bool EncScheme_IsValid(int value); +constexpr EncScheme EncScheme_MIN = NONE; +constexpr EncScheme EncScheme_MAX = AES_256_CBC; +constexpr int EncScheme_ARRAYSIZE = EncScheme_MAX + 1; + +const std::string& EncScheme_Name(EncScheme value); +template +inline const std::string& EncScheme_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function EncScheme_Name."); + return EncScheme_Name(static_cast(enum_t_value)); +} +bool EncScheme_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, EncScheme* value); +enum PublicKeyType : int { + EC_P256 = 1, + RSA2048 = 2, + DH2048_MODP = 3 +}; +bool PublicKeyType_IsValid(int value); +constexpr PublicKeyType PublicKeyType_MIN = EC_P256; +constexpr PublicKeyType PublicKeyType_MAX = DH2048_MODP; +constexpr int PublicKeyType_ARRAYSIZE = PublicKeyType_MAX + 1; + +const std::string& PublicKeyType_Name(PublicKeyType value); +template +inline const std::string& PublicKeyType_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function PublicKeyType_Name."); + return PublicKeyType_Name(static_cast(enum_t_value)); +} +bool PublicKeyType_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, PublicKeyType* value); +// =================================================================== + +class SecureMessage final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:securemessage.SecureMessage) */ { + public: + inline SecureMessage() : SecureMessage(nullptr) {} + ~SecureMessage() override; + explicit constexpr SecureMessage(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + SecureMessage(const SecureMessage& from); + SecureMessage(SecureMessage&& from) noexcept + : SecureMessage() { + *this = ::std::move(from); + } + + inline SecureMessage& operator=(const SecureMessage& from) { + CopyFrom(from); + return *this; + } + inline SecureMessage& operator=(SecureMessage&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const SecureMessage& default_instance() { + return *internal_default_instance(); + } + static inline const SecureMessage* internal_default_instance() { + return reinterpret_cast( + &_SecureMessage_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(SecureMessage& a, SecureMessage& b) { + a.Swap(&b); + } + inline void Swap(SecureMessage* 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(SecureMessage* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + SecureMessage* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const SecureMessage& from); + void MergeFrom(const SecureMessage& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(SecureMessage* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "securemessage.SecureMessage"; + } + protected: + explicit SecureMessage(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kHeaderAndBodyFieldNumber = 1, + kSignatureFieldNumber = 2, + }; + // required bytes header_and_body = 1; + bool has_header_and_body() const; + private: + bool _internal_has_header_and_body() const; + public: + void clear_header_and_body(); + const std::string& header_and_body() const; + template + void set_header_and_body(ArgT0&& arg0, ArgT... args); + std::string* mutable_header_and_body(); + PROTOBUF_NODISCARD std::string* release_header_and_body(); + void set_allocated_header_and_body(std::string* header_and_body); + private: + const std::string& _internal_header_and_body() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_header_and_body(const std::string& value); + std::string* _internal_mutable_header_and_body(); + public: + + // required bytes signature = 2; + bool has_signature() const; + private: + bool _internal_has_signature() const; + public: + void clear_signature(); + const std::string& signature() const; + template + void set_signature(ArgT0&& arg0, ArgT... args); + std::string* mutable_signature(); + PROTOBUF_NODISCARD std::string* release_signature(); + void set_allocated_signature(std::string* signature); + private: + const std::string& _internal_signature() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_signature(const std::string& value); + std::string* _internal_mutable_signature(); + public: + + // @@protoc_insertion_point(class_scope:securemessage.SecureMessage) + private: + class _Internal; + + // helper for ByteSizeLong() + size_t RequiredFieldsByteSizeFallback() const; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr header_and_body_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr signature_; + friend struct ::TableStruct_proto_2fsecuremessage_2eproto; +}; +// ------------------------------------------------------------------- + +class Header final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:securemessage.Header) */ { + public: + inline Header() : Header(nullptr) {} + ~Header() override; + explicit constexpr Header(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + Header(const Header& from); + Header(Header&& from) noexcept + : Header() { + *this = ::std::move(from); + } + + inline Header& operator=(const Header& from) { + CopyFrom(from); + return *this; + } + inline Header& operator=(Header&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const Header& default_instance() { + return *internal_default_instance(); + } + static inline const Header* internal_default_instance() { + return reinterpret_cast( + &_Header_default_instance_); + } + static constexpr int kIndexInFileMessages = + 1; + + friend void swap(Header& a, Header& b) { + a.Swap(&b); + } + inline void Swap(Header* 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(Header* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + Header* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage
(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const Header& from); + void MergeFrom(const Header& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(Header* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "securemessage.Header"; + } + protected: + explicit Header(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kVerificationKeyIdFieldNumber = 3, + kDecryptionKeyIdFieldNumber = 4, + kIvFieldNumber = 5, + kPublicMetadataFieldNumber = 6, + kAssociatedDataLengthFieldNumber = 7, + kSignatureSchemeFieldNumber = 1, + kEncryptionSchemeFieldNumber = 2, + }; + // optional bytes verification_key_id = 3; + bool has_verification_key_id() const; + private: + bool _internal_has_verification_key_id() const; + public: + void clear_verification_key_id(); + const std::string& verification_key_id() const; + template + void set_verification_key_id(ArgT0&& arg0, ArgT... args); + std::string* mutable_verification_key_id(); + PROTOBUF_NODISCARD std::string* release_verification_key_id(); + void set_allocated_verification_key_id(std::string* verification_key_id); + private: + const std::string& _internal_verification_key_id() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_verification_key_id(const std::string& value); + std::string* _internal_mutable_verification_key_id(); + public: + + // optional bytes decryption_key_id = 4; + bool has_decryption_key_id() const; + private: + bool _internal_has_decryption_key_id() const; + public: + void clear_decryption_key_id(); + const std::string& decryption_key_id() const; + template + void set_decryption_key_id(ArgT0&& arg0, ArgT... args); + std::string* mutable_decryption_key_id(); + PROTOBUF_NODISCARD std::string* release_decryption_key_id(); + void set_allocated_decryption_key_id(std::string* decryption_key_id); + private: + const std::string& _internal_decryption_key_id() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_decryption_key_id(const std::string& value); + std::string* _internal_mutable_decryption_key_id(); + public: + + // optional bytes iv = 5; + bool has_iv() const; + private: + bool _internal_has_iv() const; + public: + void clear_iv(); + const std::string& iv() const; + template + void set_iv(ArgT0&& arg0, ArgT... args); + std::string* mutable_iv(); + PROTOBUF_NODISCARD std::string* release_iv(); + void set_allocated_iv(std::string* iv); + private: + const std::string& _internal_iv() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_iv(const std::string& value); + std::string* _internal_mutable_iv(); + public: + + // optional bytes public_metadata = 6; + bool has_public_metadata() const; + private: + bool _internal_has_public_metadata() const; + public: + void clear_public_metadata(); + const std::string& public_metadata() const; + template + void set_public_metadata(ArgT0&& arg0, ArgT... args); + std::string* mutable_public_metadata(); + PROTOBUF_NODISCARD std::string* release_public_metadata(); + void set_allocated_public_metadata(std::string* public_metadata); + private: + const std::string& _internal_public_metadata() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_public_metadata(const std::string& value); + std::string* _internal_mutable_public_metadata(); + public: + + // optional uint32 associated_data_length = 7 [default = 0]; + bool has_associated_data_length() const; + private: + bool _internal_has_associated_data_length() const; + public: + void clear_associated_data_length(); + uint32_t associated_data_length() const; + void set_associated_data_length(uint32_t value); + private: + uint32_t _internal_associated_data_length() const; + void _internal_set_associated_data_length(uint32_t value); + public: + + // required .securemessage.SigScheme signature_scheme = 1; + bool has_signature_scheme() const; + private: + bool _internal_has_signature_scheme() const; + public: + void clear_signature_scheme(); + ::securemessage::SigScheme signature_scheme() const; + void set_signature_scheme(::securemessage::SigScheme value); + private: + ::securemessage::SigScheme _internal_signature_scheme() const; + void _internal_set_signature_scheme(::securemessage::SigScheme value); + public: + + // required .securemessage.EncScheme encryption_scheme = 2; + bool has_encryption_scheme() const; + private: + bool _internal_has_encryption_scheme() const; + public: + void clear_encryption_scheme(); + ::securemessage::EncScheme encryption_scheme() const; + void set_encryption_scheme(::securemessage::EncScheme value); + private: + ::securemessage::EncScheme _internal_encryption_scheme() const; + void _internal_set_encryption_scheme(::securemessage::EncScheme value); + public: + + // @@protoc_insertion_point(class_scope:securemessage.Header) + private: + class _Internal; + + // helper for ByteSizeLong() + size_t RequiredFieldsByteSizeFallback() const; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr verification_key_id_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr decryption_key_id_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr iv_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr public_metadata_; + uint32_t associated_data_length_; + int signature_scheme_; + int encryption_scheme_; + friend struct ::TableStruct_proto_2fsecuremessage_2eproto; +}; +// ------------------------------------------------------------------- + +class HeaderAndBody final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:securemessage.HeaderAndBody) */ { + public: + inline HeaderAndBody() : HeaderAndBody(nullptr) {} + ~HeaderAndBody() override; + explicit constexpr HeaderAndBody(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + HeaderAndBody(const HeaderAndBody& from); + HeaderAndBody(HeaderAndBody&& from) noexcept + : HeaderAndBody() { + *this = ::std::move(from); + } + + inline HeaderAndBody& operator=(const HeaderAndBody& from) { + CopyFrom(from); + return *this; + } + inline HeaderAndBody& operator=(HeaderAndBody&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const HeaderAndBody& default_instance() { + return *internal_default_instance(); + } + static inline const HeaderAndBody* internal_default_instance() { + return reinterpret_cast( + &_HeaderAndBody_default_instance_); + } + static constexpr int kIndexInFileMessages = + 2; + + friend void swap(HeaderAndBody& a, HeaderAndBody& b) { + a.Swap(&b); + } + inline void Swap(HeaderAndBody* 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(HeaderAndBody* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + HeaderAndBody* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const HeaderAndBody& from); + void MergeFrom(const HeaderAndBody& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(HeaderAndBody* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "securemessage.HeaderAndBody"; + } + protected: + explicit HeaderAndBody(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kBodyFieldNumber = 2, + kHeaderFieldNumber = 1, + }; + // required bytes body = 2; + bool has_body() const; + private: + bool _internal_has_body() const; + public: + void clear_body(); + const std::string& body() const; + template + void set_body(ArgT0&& arg0, ArgT... args); + std::string* mutable_body(); + PROTOBUF_NODISCARD std::string* release_body(); + void set_allocated_body(std::string* body); + private: + const std::string& _internal_body() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_body(const std::string& value); + std::string* _internal_mutable_body(); + public: + + // required .securemessage.Header header = 1; + bool has_header() const; + private: + bool _internal_has_header() const; + public: + void clear_header(); + const ::securemessage::Header& header() const; + PROTOBUF_NODISCARD ::securemessage::Header* release_header(); + ::securemessage::Header* mutable_header(); + void set_allocated_header(::securemessage::Header* header); + private: + const ::securemessage::Header& _internal_header() const; + ::securemessage::Header* _internal_mutable_header(); + public: + void unsafe_arena_set_allocated_header( + ::securemessage::Header* header); + ::securemessage::Header* unsafe_arena_release_header(); + + // @@protoc_insertion_point(class_scope:securemessage.HeaderAndBody) + private: + class _Internal; + + // helper for ByteSizeLong() + size_t RequiredFieldsByteSizeFallback() const; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr body_; + ::securemessage::Header* header_; + friend struct ::TableStruct_proto_2fsecuremessage_2eproto; +}; +// ------------------------------------------------------------------- + +class HeaderAndBodyInternal final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:securemessage.HeaderAndBodyInternal) */ { + public: + inline HeaderAndBodyInternal() : HeaderAndBodyInternal(nullptr) {} + ~HeaderAndBodyInternal() override; + explicit constexpr HeaderAndBodyInternal(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + HeaderAndBodyInternal(const HeaderAndBodyInternal& from); + HeaderAndBodyInternal(HeaderAndBodyInternal&& from) noexcept + : HeaderAndBodyInternal() { + *this = ::std::move(from); + } + + inline HeaderAndBodyInternal& operator=(const HeaderAndBodyInternal& from) { + CopyFrom(from); + return *this; + } + inline HeaderAndBodyInternal& operator=(HeaderAndBodyInternal&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const HeaderAndBodyInternal& default_instance() { + return *internal_default_instance(); + } + static inline const HeaderAndBodyInternal* internal_default_instance() { + return reinterpret_cast( + &_HeaderAndBodyInternal_default_instance_); + } + static constexpr int kIndexInFileMessages = + 3; + + friend void swap(HeaderAndBodyInternal& a, HeaderAndBodyInternal& b) { + a.Swap(&b); + } + inline void Swap(HeaderAndBodyInternal* 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(HeaderAndBodyInternal* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + HeaderAndBodyInternal* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const HeaderAndBodyInternal& from); + void MergeFrom(const HeaderAndBodyInternal& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(HeaderAndBodyInternal* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "securemessage.HeaderAndBodyInternal"; + } + protected: + explicit HeaderAndBodyInternal(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kHeaderFieldNumber = 1, + kBodyFieldNumber = 2, + }; + // required bytes header = 1; + bool has_header() const; + private: + bool _internal_has_header() const; + public: + void clear_header(); + const std::string& header() const; + template + void set_header(ArgT0&& arg0, ArgT... args); + std::string* mutable_header(); + PROTOBUF_NODISCARD std::string* release_header(); + void set_allocated_header(std::string* header); + private: + const std::string& _internal_header() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_header(const std::string& value); + std::string* _internal_mutable_header(); + public: + + // required bytes body = 2; + bool has_body() const; + private: + bool _internal_has_body() const; + public: + void clear_body(); + const std::string& body() const; + template + void set_body(ArgT0&& arg0, ArgT... args); + std::string* mutable_body(); + PROTOBUF_NODISCARD std::string* release_body(); + void set_allocated_body(std::string* body); + private: + const std::string& _internal_body() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_body(const std::string& value); + std::string* _internal_mutable_body(); + public: + + // @@protoc_insertion_point(class_scope:securemessage.HeaderAndBodyInternal) + private: + class _Internal; + + // helper for ByteSizeLong() + size_t RequiredFieldsByteSizeFallback() const; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr header_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr body_; + friend struct ::TableStruct_proto_2fsecuremessage_2eproto; +}; +// ------------------------------------------------------------------- + +class EcP256PublicKey final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:securemessage.EcP256PublicKey) */ { + public: + inline EcP256PublicKey() : EcP256PublicKey(nullptr) {} + ~EcP256PublicKey() override; + explicit constexpr EcP256PublicKey(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + EcP256PublicKey(const EcP256PublicKey& from); + EcP256PublicKey(EcP256PublicKey&& from) noexcept + : EcP256PublicKey() { + *this = ::std::move(from); + } + + inline EcP256PublicKey& operator=(const EcP256PublicKey& from) { + CopyFrom(from); + return *this; + } + inline EcP256PublicKey& operator=(EcP256PublicKey&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const EcP256PublicKey& default_instance() { + return *internal_default_instance(); + } + static inline const EcP256PublicKey* internal_default_instance() { + return reinterpret_cast( + &_EcP256PublicKey_default_instance_); + } + static constexpr int kIndexInFileMessages = + 4; + + friend void swap(EcP256PublicKey& a, EcP256PublicKey& b) { + a.Swap(&b); + } + inline void Swap(EcP256PublicKey* 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(EcP256PublicKey* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + EcP256PublicKey* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const EcP256PublicKey& from); + void MergeFrom(const EcP256PublicKey& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(EcP256PublicKey* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "securemessage.EcP256PublicKey"; + } + protected: + explicit EcP256PublicKey(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kXFieldNumber = 1, + kYFieldNumber = 2, + }; + // required bytes x = 1; + bool has_x() const; + private: + bool _internal_has_x() const; + public: + void clear_x(); + const std::string& x() const; + template + void set_x(ArgT0&& arg0, ArgT... args); + std::string* mutable_x(); + PROTOBUF_NODISCARD std::string* release_x(); + void set_allocated_x(std::string* x); + private: + const std::string& _internal_x() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_x(const std::string& value); + std::string* _internal_mutable_x(); + public: + + // required bytes y = 2; + bool has_y() const; + private: + bool _internal_has_y() const; + public: + void clear_y(); + const std::string& y() const; + template + void set_y(ArgT0&& arg0, ArgT... args); + std::string* mutable_y(); + PROTOBUF_NODISCARD std::string* release_y(); + void set_allocated_y(std::string* y); + private: + const std::string& _internal_y() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_y(const std::string& value); + std::string* _internal_mutable_y(); + public: + + // @@protoc_insertion_point(class_scope:securemessage.EcP256PublicKey) + private: + class _Internal; + + // helper for ByteSizeLong() + size_t RequiredFieldsByteSizeFallback() const; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr x_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr y_; + friend struct ::TableStruct_proto_2fsecuremessage_2eproto; +}; +// ------------------------------------------------------------------- + +class SimpleRsaPublicKey final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:securemessage.SimpleRsaPublicKey) */ { + public: + inline SimpleRsaPublicKey() : SimpleRsaPublicKey(nullptr) {} + ~SimpleRsaPublicKey() override; + explicit constexpr SimpleRsaPublicKey(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + SimpleRsaPublicKey(const SimpleRsaPublicKey& from); + SimpleRsaPublicKey(SimpleRsaPublicKey&& from) noexcept + : SimpleRsaPublicKey() { + *this = ::std::move(from); + } + + inline SimpleRsaPublicKey& operator=(const SimpleRsaPublicKey& from) { + CopyFrom(from); + return *this; + } + inline SimpleRsaPublicKey& operator=(SimpleRsaPublicKey&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const SimpleRsaPublicKey& default_instance() { + return *internal_default_instance(); + } + static inline const SimpleRsaPublicKey* internal_default_instance() { + return reinterpret_cast( + &_SimpleRsaPublicKey_default_instance_); + } + static constexpr int kIndexInFileMessages = + 5; + + friend void swap(SimpleRsaPublicKey& a, SimpleRsaPublicKey& b) { + a.Swap(&b); + } + inline void Swap(SimpleRsaPublicKey* 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(SimpleRsaPublicKey* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + SimpleRsaPublicKey* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const SimpleRsaPublicKey& from); + void MergeFrom(const SimpleRsaPublicKey& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(SimpleRsaPublicKey* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "securemessage.SimpleRsaPublicKey"; + } + protected: + explicit SimpleRsaPublicKey(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kNFieldNumber = 1, + kEFieldNumber = 2, + }; + // required bytes n = 1; + bool has_n() const; + private: + bool _internal_has_n() const; + public: + void clear_n(); + const std::string& n() const; + template + void set_n(ArgT0&& arg0, ArgT... args); + std::string* mutable_n(); + PROTOBUF_NODISCARD std::string* release_n(); + void set_allocated_n(std::string* n); + private: + const std::string& _internal_n() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_n(const std::string& value); + std::string* _internal_mutable_n(); + public: + + // optional int32 e = 2 [default = 65537]; + bool has_e() const; + private: + bool _internal_has_e() const; + public: + void clear_e(); + int32_t e() const; + void set_e(int32_t value); + private: + int32_t _internal_e() const; + void _internal_set_e(int32_t value); + public: + + // @@protoc_insertion_point(class_scope:securemessage.SimpleRsaPublicKey) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr n_; + int32_t e_; + friend struct ::TableStruct_proto_2fsecuremessage_2eproto; +}; +// ------------------------------------------------------------------- + +class DhPublicKey final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:securemessage.DhPublicKey) */ { + public: + inline DhPublicKey() : DhPublicKey(nullptr) {} + ~DhPublicKey() override; + explicit constexpr DhPublicKey(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + DhPublicKey(const DhPublicKey& from); + DhPublicKey(DhPublicKey&& from) noexcept + : DhPublicKey() { + *this = ::std::move(from); + } + + inline DhPublicKey& operator=(const DhPublicKey& from) { + CopyFrom(from); + return *this; + } + inline DhPublicKey& operator=(DhPublicKey&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const DhPublicKey& default_instance() { + return *internal_default_instance(); + } + static inline const DhPublicKey* internal_default_instance() { + return reinterpret_cast( + &_DhPublicKey_default_instance_); + } + static constexpr int kIndexInFileMessages = + 6; + + friend void swap(DhPublicKey& a, DhPublicKey& b) { + a.Swap(&b); + } + inline void Swap(DhPublicKey* 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(DhPublicKey* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + DhPublicKey* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const DhPublicKey& from); + void MergeFrom(const DhPublicKey& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(DhPublicKey* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "securemessage.DhPublicKey"; + } + protected: + explicit DhPublicKey(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kYFieldNumber = 1, + }; + // required bytes y = 1; + bool has_y() const; + private: + bool _internal_has_y() const; + public: + void clear_y(); + const std::string& y() const; + template + void set_y(ArgT0&& arg0, ArgT... args); + std::string* mutable_y(); + PROTOBUF_NODISCARD std::string* release_y(); + void set_allocated_y(std::string* y); + private: + const std::string& _internal_y() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_y(const std::string& value); + std::string* _internal_mutable_y(); + public: + + // @@protoc_insertion_point(class_scope:securemessage.DhPublicKey) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr y_; + friend struct ::TableStruct_proto_2fsecuremessage_2eproto; +}; +// ------------------------------------------------------------------- + +class GenericPublicKey final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:securemessage.GenericPublicKey) */ { + public: + inline GenericPublicKey() : GenericPublicKey(nullptr) {} + ~GenericPublicKey() override; + explicit constexpr GenericPublicKey(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + GenericPublicKey(const GenericPublicKey& from); + GenericPublicKey(GenericPublicKey&& from) noexcept + : GenericPublicKey() { + *this = ::std::move(from); + } + + inline GenericPublicKey& operator=(const GenericPublicKey& from) { + CopyFrom(from); + return *this; + } + inline GenericPublicKey& operator=(GenericPublicKey&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const GenericPublicKey& default_instance() { + return *internal_default_instance(); + } + static inline const GenericPublicKey* internal_default_instance() { + return reinterpret_cast( + &_GenericPublicKey_default_instance_); + } + static constexpr int kIndexInFileMessages = + 7; + + friend void swap(GenericPublicKey& a, GenericPublicKey& b) { + a.Swap(&b); + } + inline void Swap(GenericPublicKey* 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(GenericPublicKey* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + GenericPublicKey* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const GenericPublicKey& from); + void MergeFrom(const GenericPublicKey& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(GenericPublicKey* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "securemessage.GenericPublicKey"; + } + protected: + explicit GenericPublicKey(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kEcP256PublicKeyFieldNumber = 2, + kRsa2048PublicKeyFieldNumber = 3, + kDh2048PublicKeyFieldNumber = 4, + kTypeFieldNumber = 1, + }; + // optional .securemessage.EcP256PublicKey ec_p256_public_key = 2; + bool has_ec_p256_public_key() const; + private: + bool _internal_has_ec_p256_public_key() const; + public: + void clear_ec_p256_public_key(); + const ::securemessage::EcP256PublicKey& ec_p256_public_key() const; + PROTOBUF_NODISCARD ::securemessage::EcP256PublicKey* release_ec_p256_public_key(); + ::securemessage::EcP256PublicKey* mutable_ec_p256_public_key(); + void set_allocated_ec_p256_public_key(::securemessage::EcP256PublicKey* ec_p256_public_key); + private: + const ::securemessage::EcP256PublicKey& _internal_ec_p256_public_key() const; + ::securemessage::EcP256PublicKey* _internal_mutable_ec_p256_public_key(); + public: + void unsafe_arena_set_allocated_ec_p256_public_key( + ::securemessage::EcP256PublicKey* ec_p256_public_key); + ::securemessage::EcP256PublicKey* unsafe_arena_release_ec_p256_public_key(); + + // optional .securemessage.SimpleRsaPublicKey rsa2048_public_key = 3; + bool has_rsa2048_public_key() const; + private: + bool _internal_has_rsa2048_public_key() const; + public: + void clear_rsa2048_public_key(); + const ::securemessage::SimpleRsaPublicKey& rsa2048_public_key() const; + PROTOBUF_NODISCARD ::securemessage::SimpleRsaPublicKey* release_rsa2048_public_key(); + ::securemessage::SimpleRsaPublicKey* mutable_rsa2048_public_key(); + void set_allocated_rsa2048_public_key(::securemessage::SimpleRsaPublicKey* rsa2048_public_key); + private: + const ::securemessage::SimpleRsaPublicKey& _internal_rsa2048_public_key() const; + ::securemessage::SimpleRsaPublicKey* _internal_mutable_rsa2048_public_key(); + public: + void unsafe_arena_set_allocated_rsa2048_public_key( + ::securemessage::SimpleRsaPublicKey* rsa2048_public_key); + ::securemessage::SimpleRsaPublicKey* unsafe_arena_release_rsa2048_public_key(); + + // optional .securemessage.DhPublicKey dh2048_public_key = 4; + bool has_dh2048_public_key() const; + private: + bool _internal_has_dh2048_public_key() const; + public: + void clear_dh2048_public_key(); + const ::securemessage::DhPublicKey& dh2048_public_key() const; + PROTOBUF_NODISCARD ::securemessage::DhPublicKey* release_dh2048_public_key(); + ::securemessage::DhPublicKey* mutable_dh2048_public_key(); + void set_allocated_dh2048_public_key(::securemessage::DhPublicKey* dh2048_public_key); + private: + const ::securemessage::DhPublicKey& _internal_dh2048_public_key() const; + ::securemessage::DhPublicKey* _internal_mutable_dh2048_public_key(); + public: + void unsafe_arena_set_allocated_dh2048_public_key( + ::securemessage::DhPublicKey* dh2048_public_key); + ::securemessage::DhPublicKey* unsafe_arena_release_dh2048_public_key(); + + // required .securemessage.PublicKeyType type = 1; + bool has_type() const; + private: + bool _internal_has_type() const; + public: + void clear_type(); + ::securemessage::PublicKeyType type() const; + void set_type(::securemessage::PublicKeyType value); + private: + ::securemessage::PublicKeyType _internal_type() const; + void _internal_set_type(::securemessage::PublicKeyType value); + public: + + // @@protoc_insertion_point(class_scope:securemessage.GenericPublicKey) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::securemessage::EcP256PublicKey* ec_p256_public_key_; + ::securemessage::SimpleRsaPublicKey* rsa2048_public_key_; + ::securemessage::DhPublicKey* dh2048_public_key_; + int type_; + friend struct ::TableStruct_proto_2fsecuremessage_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// SecureMessage + +// required bytes header_and_body = 1; +inline bool SecureMessage::_internal_has_header_and_body() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool SecureMessage::has_header_and_body() const { + return _internal_has_header_and_body(); +} +inline void SecureMessage::clear_header_and_body() { + header_and_body_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& SecureMessage::header_and_body() const { + // @@protoc_insertion_point(field_get:securemessage.SecureMessage.header_and_body) + return _internal_header_and_body(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void SecureMessage::set_header_and_body(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + header_and_body_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:securemessage.SecureMessage.header_and_body) +} +inline std::string* SecureMessage::mutable_header_and_body() { + std::string* _s = _internal_mutable_header_and_body(); + // @@protoc_insertion_point(field_mutable:securemessage.SecureMessage.header_and_body) + return _s; +} +inline const std::string& SecureMessage::_internal_header_and_body() const { + return header_and_body_.Get(); +} +inline void SecureMessage::_internal_set_header_and_body(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + header_and_body_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* SecureMessage::_internal_mutable_header_and_body() { + _has_bits_[0] |= 0x00000001u; + return header_and_body_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* SecureMessage::release_header_and_body() { + // @@protoc_insertion_point(field_release:securemessage.SecureMessage.header_and_body) + if (!_internal_has_header_and_body()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = header_and_body_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (header_and_body_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + header_and_body_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void SecureMessage::set_allocated_header_and_body(std::string* header_and_body) { + if (header_and_body != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + header_and_body_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), header_and_body, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (header_and_body_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + header_and_body_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:securemessage.SecureMessage.header_and_body) +} + +// required bytes signature = 2; +inline bool SecureMessage::_internal_has_signature() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool SecureMessage::has_signature() const { + return _internal_has_signature(); +} +inline void SecureMessage::clear_signature() { + signature_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000002u; +} +inline const std::string& SecureMessage::signature() const { + // @@protoc_insertion_point(field_get:securemessage.SecureMessage.signature) + return _internal_signature(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void SecureMessage::set_signature(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000002u; + signature_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:securemessage.SecureMessage.signature) +} +inline std::string* SecureMessage::mutable_signature() { + std::string* _s = _internal_mutable_signature(); + // @@protoc_insertion_point(field_mutable:securemessage.SecureMessage.signature) + return _s; +} +inline const std::string& SecureMessage::_internal_signature() const { + return signature_.Get(); +} +inline void SecureMessage::_internal_set_signature(const std::string& value) { + _has_bits_[0] |= 0x00000002u; + signature_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* SecureMessage::_internal_mutable_signature() { + _has_bits_[0] |= 0x00000002u; + return signature_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* SecureMessage::release_signature() { + // @@protoc_insertion_point(field_release:securemessage.SecureMessage.signature) + if (!_internal_has_signature()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000002u; + auto* p = signature_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (signature_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + signature_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void SecureMessage::set_allocated_signature(std::string* signature) { + if (signature != nullptr) { + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + signature_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), signature, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (signature_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + signature_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:securemessage.SecureMessage.signature) +} + +// ------------------------------------------------------------------- + +// Header + +// required .securemessage.SigScheme signature_scheme = 1; +inline bool Header::_internal_has_signature_scheme() const { + bool value = (_has_bits_[0] & 0x00000020u) != 0; + return value; +} +inline bool Header::has_signature_scheme() const { + return _internal_has_signature_scheme(); +} +inline void Header::clear_signature_scheme() { + signature_scheme_ = 1; + _has_bits_[0] &= ~0x00000020u; +} +inline ::securemessage::SigScheme Header::_internal_signature_scheme() const { + return static_cast< ::securemessage::SigScheme >(signature_scheme_); +} +inline ::securemessage::SigScheme Header::signature_scheme() const { + // @@protoc_insertion_point(field_get:securemessage.Header.signature_scheme) + return _internal_signature_scheme(); +} +inline void Header::_internal_set_signature_scheme(::securemessage::SigScheme value) { + assert(::securemessage::SigScheme_IsValid(value)); + _has_bits_[0] |= 0x00000020u; + signature_scheme_ = value; +} +inline void Header::set_signature_scheme(::securemessage::SigScheme value) { + _internal_set_signature_scheme(value); + // @@protoc_insertion_point(field_set:securemessage.Header.signature_scheme) +} + +// required .securemessage.EncScheme encryption_scheme = 2; +inline bool Header::_internal_has_encryption_scheme() const { + bool value = (_has_bits_[0] & 0x00000040u) != 0; + return value; +} +inline bool Header::has_encryption_scheme() const { + return _internal_has_encryption_scheme(); +} +inline void Header::clear_encryption_scheme() { + encryption_scheme_ = 1; + _has_bits_[0] &= ~0x00000040u; +} +inline ::securemessage::EncScheme Header::_internal_encryption_scheme() const { + return static_cast< ::securemessage::EncScheme >(encryption_scheme_); +} +inline ::securemessage::EncScheme Header::encryption_scheme() const { + // @@protoc_insertion_point(field_get:securemessage.Header.encryption_scheme) + return _internal_encryption_scheme(); +} +inline void Header::_internal_set_encryption_scheme(::securemessage::EncScheme value) { + assert(::securemessage::EncScheme_IsValid(value)); + _has_bits_[0] |= 0x00000040u; + encryption_scheme_ = value; +} +inline void Header::set_encryption_scheme(::securemessage::EncScheme value) { + _internal_set_encryption_scheme(value); + // @@protoc_insertion_point(field_set:securemessage.Header.encryption_scheme) +} + +// optional bytes verification_key_id = 3; +inline bool Header::_internal_has_verification_key_id() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool Header::has_verification_key_id() const { + return _internal_has_verification_key_id(); +} +inline void Header::clear_verification_key_id() { + verification_key_id_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& Header::verification_key_id() const { + // @@protoc_insertion_point(field_get:securemessage.Header.verification_key_id) + return _internal_verification_key_id(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void Header::set_verification_key_id(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + verification_key_id_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:securemessage.Header.verification_key_id) +} +inline std::string* Header::mutable_verification_key_id() { + std::string* _s = _internal_mutable_verification_key_id(); + // @@protoc_insertion_point(field_mutable:securemessage.Header.verification_key_id) + return _s; +} +inline const std::string& Header::_internal_verification_key_id() const { + return verification_key_id_.Get(); +} +inline void Header::_internal_set_verification_key_id(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + verification_key_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* Header::_internal_mutable_verification_key_id() { + _has_bits_[0] |= 0x00000001u; + return verification_key_id_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* Header::release_verification_key_id() { + // @@protoc_insertion_point(field_release:securemessage.Header.verification_key_id) + if (!_internal_has_verification_key_id()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = verification_key_id_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (verification_key_id_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + verification_key_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void Header::set_allocated_verification_key_id(std::string* verification_key_id) { + if (verification_key_id != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + verification_key_id_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), verification_key_id, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (verification_key_id_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + verification_key_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:securemessage.Header.verification_key_id) +} + +// optional bytes decryption_key_id = 4; +inline bool Header::_internal_has_decryption_key_id() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool Header::has_decryption_key_id() const { + return _internal_has_decryption_key_id(); +} +inline void Header::clear_decryption_key_id() { + decryption_key_id_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000002u; +} +inline const std::string& Header::decryption_key_id() const { + // @@protoc_insertion_point(field_get:securemessage.Header.decryption_key_id) + return _internal_decryption_key_id(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void Header::set_decryption_key_id(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000002u; + decryption_key_id_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:securemessage.Header.decryption_key_id) +} +inline std::string* Header::mutable_decryption_key_id() { + std::string* _s = _internal_mutable_decryption_key_id(); + // @@protoc_insertion_point(field_mutable:securemessage.Header.decryption_key_id) + return _s; +} +inline const std::string& Header::_internal_decryption_key_id() const { + return decryption_key_id_.Get(); +} +inline void Header::_internal_set_decryption_key_id(const std::string& value) { + _has_bits_[0] |= 0x00000002u; + decryption_key_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* Header::_internal_mutable_decryption_key_id() { + _has_bits_[0] |= 0x00000002u; + return decryption_key_id_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* Header::release_decryption_key_id() { + // @@protoc_insertion_point(field_release:securemessage.Header.decryption_key_id) + if (!_internal_has_decryption_key_id()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000002u; + auto* p = decryption_key_id_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (decryption_key_id_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + decryption_key_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void Header::set_allocated_decryption_key_id(std::string* decryption_key_id) { + if (decryption_key_id != nullptr) { + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + decryption_key_id_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), decryption_key_id, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (decryption_key_id_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + decryption_key_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:securemessage.Header.decryption_key_id) +} + +// optional bytes iv = 5; +inline bool Header::_internal_has_iv() const { + bool value = (_has_bits_[0] & 0x00000004u) != 0; + return value; +} +inline bool Header::has_iv() const { + return _internal_has_iv(); +} +inline void Header::clear_iv() { + iv_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000004u; +} +inline const std::string& Header::iv() const { + // @@protoc_insertion_point(field_get:securemessage.Header.iv) + return _internal_iv(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void Header::set_iv(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000004u; + iv_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:securemessage.Header.iv) +} +inline std::string* Header::mutable_iv() { + std::string* _s = _internal_mutable_iv(); + // @@protoc_insertion_point(field_mutable:securemessage.Header.iv) + return _s; +} +inline const std::string& Header::_internal_iv() const { + return iv_.Get(); +} +inline void Header::_internal_set_iv(const std::string& value) { + _has_bits_[0] |= 0x00000004u; + iv_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* Header::_internal_mutable_iv() { + _has_bits_[0] |= 0x00000004u; + return iv_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* Header::release_iv() { + // @@protoc_insertion_point(field_release:securemessage.Header.iv) + if (!_internal_has_iv()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000004u; + auto* p = iv_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (iv_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + iv_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void Header::set_allocated_iv(std::string* iv) { + if (iv != nullptr) { + _has_bits_[0] |= 0x00000004u; + } else { + _has_bits_[0] &= ~0x00000004u; + } + iv_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), iv, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (iv_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + iv_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:securemessage.Header.iv) +} + +// optional bytes public_metadata = 6; +inline bool Header::_internal_has_public_metadata() const { + bool value = (_has_bits_[0] & 0x00000008u) != 0; + return value; +} +inline bool Header::has_public_metadata() const { + return _internal_has_public_metadata(); +} +inline void Header::clear_public_metadata() { + public_metadata_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000008u; +} +inline const std::string& Header::public_metadata() const { + // @@protoc_insertion_point(field_get:securemessage.Header.public_metadata) + return _internal_public_metadata(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void Header::set_public_metadata(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000008u; + public_metadata_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:securemessage.Header.public_metadata) +} +inline std::string* Header::mutable_public_metadata() { + std::string* _s = _internal_mutable_public_metadata(); + // @@protoc_insertion_point(field_mutable:securemessage.Header.public_metadata) + return _s; +} +inline const std::string& Header::_internal_public_metadata() const { + return public_metadata_.Get(); +} +inline void Header::_internal_set_public_metadata(const std::string& value) { + _has_bits_[0] |= 0x00000008u; + public_metadata_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* Header::_internal_mutable_public_metadata() { + _has_bits_[0] |= 0x00000008u; + return public_metadata_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* Header::release_public_metadata() { + // @@protoc_insertion_point(field_release:securemessage.Header.public_metadata) + if (!_internal_has_public_metadata()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000008u; + auto* p = public_metadata_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (public_metadata_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + public_metadata_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void Header::set_allocated_public_metadata(std::string* public_metadata) { + if (public_metadata != nullptr) { + _has_bits_[0] |= 0x00000008u; + } else { + _has_bits_[0] &= ~0x00000008u; + } + public_metadata_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), public_metadata, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (public_metadata_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + public_metadata_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:securemessage.Header.public_metadata) +} + +// optional uint32 associated_data_length = 7 [default = 0]; +inline bool Header::_internal_has_associated_data_length() const { + bool value = (_has_bits_[0] & 0x00000010u) != 0; + return value; +} +inline bool Header::has_associated_data_length() const { + return _internal_has_associated_data_length(); +} +inline void Header::clear_associated_data_length() { + associated_data_length_ = 0u; + _has_bits_[0] &= ~0x00000010u; +} +inline uint32_t Header::_internal_associated_data_length() const { + return associated_data_length_; +} +inline uint32_t Header::associated_data_length() const { + // @@protoc_insertion_point(field_get:securemessage.Header.associated_data_length) + return _internal_associated_data_length(); +} +inline void Header::_internal_set_associated_data_length(uint32_t value) { + _has_bits_[0] |= 0x00000010u; + associated_data_length_ = value; +} +inline void Header::set_associated_data_length(uint32_t value) { + _internal_set_associated_data_length(value); + // @@protoc_insertion_point(field_set:securemessage.Header.associated_data_length) +} + +// ------------------------------------------------------------------- + +// HeaderAndBody + +// required .securemessage.Header header = 1; +inline bool HeaderAndBody::_internal_has_header() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + PROTOBUF_ASSUME(!value || header_ != nullptr); + return value; +} +inline bool HeaderAndBody::has_header() const { + return _internal_has_header(); +} +inline void HeaderAndBody::clear_header() { + if (header_ != nullptr) header_->Clear(); + _has_bits_[0] &= ~0x00000002u; +} +inline const ::securemessage::Header& HeaderAndBody::_internal_header() const { + const ::securemessage::Header* p = header_; + return p != nullptr ? *p : reinterpret_cast( + ::securemessage::_Header_default_instance_); +} +inline const ::securemessage::Header& HeaderAndBody::header() const { + // @@protoc_insertion_point(field_get:securemessage.HeaderAndBody.header) + return _internal_header(); +} +inline void HeaderAndBody::unsafe_arena_set_allocated_header( + ::securemessage::Header* header) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(header_); + } + header_ = header; + if (header) { + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:securemessage.HeaderAndBody.header) +} +inline ::securemessage::Header* HeaderAndBody::release_header() { + _has_bits_[0] &= ~0x00000002u; + ::securemessage::Header* temp = header_; + header_ = 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 ::securemessage::Header* HeaderAndBody::unsafe_arena_release_header() { + // @@protoc_insertion_point(field_release:securemessage.HeaderAndBody.header) + _has_bits_[0] &= ~0x00000002u; + ::securemessage::Header* temp = header_; + header_ = nullptr; + return temp; +} +inline ::securemessage::Header* HeaderAndBody::_internal_mutable_header() { + _has_bits_[0] |= 0x00000002u; + if (header_ == nullptr) { + auto* p = CreateMaybeMessage<::securemessage::Header>(GetArenaForAllocation()); + header_ = p; + } + return header_; +} +inline ::securemessage::Header* HeaderAndBody::mutable_header() { + ::securemessage::Header* _msg = _internal_mutable_header(); + // @@protoc_insertion_point(field_mutable:securemessage.HeaderAndBody.header) + return _msg; +} +inline void HeaderAndBody::set_allocated_header(::securemessage::Header* header) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete header_; + } + if (header) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::securemessage::Header>::GetOwningArena(header); + if (message_arena != submessage_arena) { + header = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, header, submessage_arena); + } + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + header_ = header; + // @@protoc_insertion_point(field_set_allocated:securemessage.HeaderAndBody.header) +} + +// required bytes body = 2; +inline bool HeaderAndBody::_internal_has_body() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool HeaderAndBody::has_body() const { + return _internal_has_body(); +} +inline void HeaderAndBody::clear_body() { + body_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& HeaderAndBody::body() const { + // @@protoc_insertion_point(field_get:securemessage.HeaderAndBody.body) + return _internal_body(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void HeaderAndBody::set_body(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + body_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:securemessage.HeaderAndBody.body) +} +inline std::string* HeaderAndBody::mutable_body() { + std::string* _s = _internal_mutable_body(); + // @@protoc_insertion_point(field_mutable:securemessage.HeaderAndBody.body) + return _s; +} +inline const std::string& HeaderAndBody::_internal_body() const { + return body_.Get(); +} +inline void HeaderAndBody::_internal_set_body(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + body_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* HeaderAndBody::_internal_mutable_body() { + _has_bits_[0] |= 0x00000001u; + return body_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* HeaderAndBody::release_body() { + // @@protoc_insertion_point(field_release:securemessage.HeaderAndBody.body) + if (!_internal_has_body()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = body_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (body_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + body_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void HeaderAndBody::set_allocated_body(std::string* body) { + if (body != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + body_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), body, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (body_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + body_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:securemessage.HeaderAndBody.body) +} + +// ------------------------------------------------------------------- + +// HeaderAndBodyInternal + +// required bytes header = 1; +inline bool HeaderAndBodyInternal::_internal_has_header() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool HeaderAndBodyInternal::has_header() const { + return _internal_has_header(); +} +inline void HeaderAndBodyInternal::clear_header() { + header_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& HeaderAndBodyInternal::header() const { + // @@protoc_insertion_point(field_get:securemessage.HeaderAndBodyInternal.header) + return _internal_header(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void HeaderAndBodyInternal::set_header(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + header_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:securemessage.HeaderAndBodyInternal.header) +} +inline std::string* HeaderAndBodyInternal::mutable_header() { + std::string* _s = _internal_mutable_header(); + // @@protoc_insertion_point(field_mutable:securemessage.HeaderAndBodyInternal.header) + return _s; +} +inline const std::string& HeaderAndBodyInternal::_internal_header() const { + return header_.Get(); +} +inline void HeaderAndBodyInternal::_internal_set_header(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + header_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* HeaderAndBodyInternal::_internal_mutable_header() { + _has_bits_[0] |= 0x00000001u; + return header_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* HeaderAndBodyInternal::release_header() { + // @@protoc_insertion_point(field_release:securemessage.HeaderAndBodyInternal.header) + if (!_internal_has_header()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = header_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (header_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + header_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void HeaderAndBodyInternal::set_allocated_header(std::string* header) { + if (header != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + header_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), header, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (header_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + header_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:securemessage.HeaderAndBodyInternal.header) +} + +// required bytes body = 2; +inline bool HeaderAndBodyInternal::_internal_has_body() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool HeaderAndBodyInternal::has_body() const { + return _internal_has_body(); +} +inline void HeaderAndBodyInternal::clear_body() { + body_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000002u; +} +inline const std::string& HeaderAndBodyInternal::body() const { + // @@protoc_insertion_point(field_get:securemessage.HeaderAndBodyInternal.body) + return _internal_body(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void HeaderAndBodyInternal::set_body(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000002u; + body_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:securemessage.HeaderAndBodyInternal.body) +} +inline std::string* HeaderAndBodyInternal::mutable_body() { + std::string* _s = _internal_mutable_body(); + // @@protoc_insertion_point(field_mutable:securemessage.HeaderAndBodyInternal.body) + return _s; +} +inline const std::string& HeaderAndBodyInternal::_internal_body() const { + return body_.Get(); +} +inline void HeaderAndBodyInternal::_internal_set_body(const std::string& value) { + _has_bits_[0] |= 0x00000002u; + body_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* HeaderAndBodyInternal::_internal_mutable_body() { + _has_bits_[0] |= 0x00000002u; + return body_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* HeaderAndBodyInternal::release_body() { + // @@protoc_insertion_point(field_release:securemessage.HeaderAndBodyInternal.body) + if (!_internal_has_body()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000002u; + auto* p = body_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (body_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + body_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void HeaderAndBodyInternal::set_allocated_body(std::string* body) { + if (body != nullptr) { + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + body_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), body, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (body_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + body_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:securemessage.HeaderAndBodyInternal.body) +} + +// ------------------------------------------------------------------- + +// EcP256PublicKey + +// required bytes x = 1; +inline bool EcP256PublicKey::_internal_has_x() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool EcP256PublicKey::has_x() const { + return _internal_has_x(); +} +inline void EcP256PublicKey::clear_x() { + x_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& EcP256PublicKey::x() const { + // @@protoc_insertion_point(field_get:securemessage.EcP256PublicKey.x) + return _internal_x(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void EcP256PublicKey::set_x(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + x_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:securemessage.EcP256PublicKey.x) +} +inline std::string* EcP256PublicKey::mutable_x() { + std::string* _s = _internal_mutable_x(); + // @@protoc_insertion_point(field_mutable:securemessage.EcP256PublicKey.x) + return _s; +} +inline const std::string& EcP256PublicKey::_internal_x() const { + return x_.Get(); +} +inline void EcP256PublicKey::_internal_set_x(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + x_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* EcP256PublicKey::_internal_mutable_x() { + _has_bits_[0] |= 0x00000001u; + return x_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* EcP256PublicKey::release_x() { + // @@protoc_insertion_point(field_release:securemessage.EcP256PublicKey.x) + if (!_internal_has_x()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = x_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (x_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + x_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void EcP256PublicKey::set_allocated_x(std::string* x) { + if (x != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + x_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), x, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (x_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + x_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:securemessage.EcP256PublicKey.x) +} + +// required bytes y = 2; +inline bool EcP256PublicKey::_internal_has_y() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool EcP256PublicKey::has_y() const { + return _internal_has_y(); +} +inline void EcP256PublicKey::clear_y() { + y_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000002u; +} +inline const std::string& EcP256PublicKey::y() const { + // @@protoc_insertion_point(field_get:securemessage.EcP256PublicKey.y) + return _internal_y(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void EcP256PublicKey::set_y(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000002u; + y_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:securemessage.EcP256PublicKey.y) +} +inline std::string* EcP256PublicKey::mutable_y() { + std::string* _s = _internal_mutable_y(); + // @@protoc_insertion_point(field_mutable:securemessage.EcP256PublicKey.y) + return _s; +} +inline const std::string& EcP256PublicKey::_internal_y() const { + return y_.Get(); +} +inline void EcP256PublicKey::_internal_set_y(const std::string& value) { + _has_bits_[0] |= 0x00000002u; + y_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* EcP256PublicKey::_internal_mutable_y() { + _has_bits_[0] |= 0x00000002u; + return y_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* EcP256PublicKey::release_y() { + // @@protoc_insertion_point(field_release:securemessage.EcP256PublicKey.y) + if (!_internal_has_y()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000002u; + auto* p = y_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (y_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + y_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void EcP256PublicKey::set_allocated_y(std::string* y) { + if (y != nullptr) { + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + y_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), y, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (y_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + y_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:securemessage.EcP256PublicKey.y) +} + +// ------------------------------------------------------------------- + +// SimpleRsaPublicKey + +// required bytes n = 1; +inline bool SimpleRsaPublicKey::_internal_has_n() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool SimpleRsaPublicKey::has_n() const { + return _internal_has_n(); +} +inline void SimpleRsaPublicKey::clear_n() { + n_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& SimpleRsaPublicKey::n() const { + // @@protoc_insertion_point(field_get:securemessage.SimpleRsaPublicKey.n) + return _internal_n(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void SimpleRsaPublicKey::set_n(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + n_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:securemessage.SimpleRsaPublicKey.n) +} +inline std::string* SimpleRsaPublicKey::mutable_n() { + std::string* _s = _internal_mutable_n(); + // @@protoc_insertion_point(field_mutable:securemessage.SimpleRsaPublicKey.n) + return _s; +} +inline const std::string& SimpleRsaPublicKey::_internal_n() const { + return n_.Get(); +} +inline void SimpleRsaPublicKey::_internal_set_n(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + n_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* SimpleRsaPublicKey::_internal_mutable_n() { + _has_bits_[0] |= 0x00000001u; + return n_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* SimpleRsaPublicKey::release_n() { + // @@protoc_insertion_point(field_release:securemessage.SimpleRsaPublicKey.n) + if (!_internal_has_n()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = n_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (n_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + n_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void SimpleRsaPublicKey::set_allocated_n(std::string* n) { + if (n != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + n_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), n, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (n_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + n_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:securemessage.SimpleRsaPublicKey.n) +} + +// optional int32 e = 2 [default = 65537]; +inline bool SimpleRsaPublicKey::_internal_has_e() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool SimpleRsaPublicKey::has_e() const { + return _internal_has_e(); +} +inline void SimpleRsaPublicKey::clear_e() { + e_ = 65537; + _has_bits_[0] &= ~0x00000002u; +} +inline int32_t SimpleRsaPublicKey::_internal_e() const { + return e_; +} +inline int32_t SimpleRsaPublicKey::e() const { + // @@protoc_insertion_point(field_get:securemessage.SimpleRsaPublicKey.e) + return _internal_e(); +} +inline void SimpleRsaPublicKey::_internal_set_e(int32_t value) { + _has_bits_[0] |= 0x00000002u; + e_ = value; +} +inline void SimpleRsaPublicKey::set_e(int32_t value) { + _internal_set_e(value); + // @@protoc_insertion_point(field_set:securemessage.SimpleRsaPublicKey.e) +} + +// ------------------------------------------------------------------- + +// DhPublicKey + +// required bytes y = 1; +inline bool DhPublicKey::_internal_has_y() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool DhPublicKey::has_y() const { + return _internal_has_y(); +} +inline void DhPublicKey::clear_y() { + y_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& DhPublicKey::y() const { + // @@protoc_insertion_point(field_get:securemessage.DhPublicKey.y) + return _internal_y(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void DhPublicKey::set_y(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + y_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:securemessage.DhPublicKey.y) +} +inline std::string* DhPublicKey::mutable_y() { + std::string* _s = _internal_mutable_y(); + // @@protoc_insertion_point(field_mutable:securemessage.DhPublicKey.y) + return _s; +} +inline const std::string& DhPublicKey::_internal_y() const { + return y_.Get(); +} +inline void DhPublicKey::_internal_set_y(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + y_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* DhPublicKey::_internal_mutable_y() { + _has_bits_[0] |= 0x00000001u; + return y_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* DhPublicKey::release_y() { + // @@protoc_insertion_point(field_release:securemessage.DhPublicKey.y) + if (!_internal_has_y()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = y_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (y_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + y_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void DhPublicKey::set_allocated_y(std::string* y) { + if (y != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + y_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), y, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (y_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + y_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:securemessage.DhPublicKey.y) +} + +// ------------------------------------------------------------------- + +// GenericPublicKey + +// required .securemessage.PublicKeyType type = 1; +inline bool GenericPublicKey::_internal_has_type() const { + bool value = (_has_bits_[0] & 0x00000008u) != 0; + return value; +} +inline bool GenericPublicKey::has_type() const { + return _internal_has_type(); +} +inline void GenericPublicKey::clear_type() { + type_ = 1; + _has_bits_[0] &= ~0x00000008u; +} +inline ::securemessage::PublicKeyType GenericPublicKey::_internal_type() const { + return static_cast< ::securemessage::PublicKeyType >(type_); +} +inline ::securemessage::PublicKeyType GenericPublicKey::type() const { + // @@protoc_insertion_point(field_get:securemessage.GenericPublicKey.type) + return _internal_type(); +} +inline void GenericPublicKey::_internal_set_type(::securemessage::PublicKeyType value) { + assert(::securemessage::PublicKeyType_IsValid(value)); + _has_bits_[0] |= 0x00000008u; + type_ = value; +} +inline void GenericPublicKey::set_type(::securemessage::PublicKeyType value) { + _internal_set_type(value); + // @@protoc_insertion_point(field_set:securemessage.GenericPublicKey.type) +} + +// optional .securemessage.EcP256PublicKey ec_p256_public_key = 2; +inline bool GenericPublicKey::_internal_has_ec_p256_public_key() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + PROTOBUF_ASSUME(!value || ec_p256_public_key_ != nullptr); + return value; +} +inline bool GenericPublicKey::has_ec_p256_public_key() const { + return _internal_has_ec_p256_public_key(); +} +inline void GenericPublicKey::clear_ec_p256_public_key() { + if (ec_p256_public_key_ != nullptr) ec_p256_public_key_->Clear(); + _has_bits_[0] &= ~0x00000001u; +} +inline const ::securemessage::EcP256PublicKey& GenericPublicKey::_internal_ec_p256_public_key() const { + const ::securemessage::EcP256PublicKey* p = ec_p256_public_key_; + return p != nullptr ? *p : reinterpret_cast( + ::securemessage::_EcP256PublicKey_default_instance_); +} +inline const ::securemessage::EcP256PublicKey& GenericPublicKey::ec_p256_public_key() const { + // @@protoc_insertion_point(field_get:securemessage.GenericPublicKey.ec_p256_public_key) + return _internal_ec_p256_public_key(); +} +inline void GenericPublicKey::unsafe_arena_set_allocated_ec_p256_public_key( + ::securemessage::EcP256PublicKey* ec_p256_public_key) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(ec_p256_public_key_); + } + ec_p256_public_key_ = ec_p256_public_key; + if (ec_p256_public_key) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:securemessage.GenericPublicKey.ec_p256_public_key) +} +inline ::securemessage::EcP256PublicKey* GenericPublicKey::release_ec_p256_public_key() { + _has_bits_[0] &= ~0x00000001u; + ::securemessage::EcP256PublicKey* temp = ec_p256_public_key_; + ec_p256_public_key_ = 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 ::securemessage::EcP256PublicKey* GenericPublicKey::unsafe_arena_release_ec_p256_public_key() { + // @@protoc_insertion_point(field_release:securemessage.GenericPublicKey.ec_p256_public_key) + _has_bits_[0] &= ~0x00000001u; + ::securemessage::EcP256PublicKey* temp = ec_p256_public_key_; + ec_p256_public_key_ = nullptr; + return temp; +} +inline ::securemessage::EcP256PublicKey* GenericPublicKey::_internal_mutable_ec_p256_public_key() { + _has_bits_[0] |= 0x00000001u; + if (ec_p256_public_key_ == nullptr) { + auto* p = CreateMaybeMessage<::securemessage::EcP256PublicKey>(GetArenaForAllocation()); + ec_p256_public_key_ = p; + } + return ec_p256_public_key_; +} +inline ::securemessage::EcP256PublicKey* GenericPublicKey::mutable_ec_p256_public_key() { + ::securemessage::EcP256PublicKey* _msg = _internal_mutable_ec_p256_public_key(); + // @@protoc_insertion_point(field_mutable:securemessage.GenericPublicKey.ec_p256_public_key) + return _msg; +} +inline void GenericPublicKey::set_allocated_ec_p256_public_key(::securemessage::EcP256PublicKey* ec_p256_public_key) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete ec_p256_public_key_; + } + if (ec_p256_public_key) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::securemessage::EcP256PublicKey>::GetOwningArena(ec_p256_public_key); + if (message_arena != submessage_arena) { + ec_p256_public_key = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, ec_p256_public_key, submessage_arena); + } + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + ec_p256_public_key_ = ec_p256_public_key; + // @@protoc_insertion_point(field_set_allocated:securemessage.GenericPublicKey.ec_p256_public_key) +} + +// optional .securemessage.SimpleRsaPublicKey rsa2048_public_key = 3; +inline bool GenericPublicKey::_internal_has_rsa2048_public_key() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + PROTOBUF_ASSUME(!value || rsa2048_public_key_ != nullptr); + return value; +} +inline bool GenericPublicKey::has_rsa2048_public_key() const { + return _internal_has_rsa2048_public_key(); +} +inline void GenericPublicKey::clear_rsa2048_public_key() { + if (rsa2048_public_key_ != nullptr) rsa2048_public_key_->Clear(); + _has_bits_[0] &= ~0x00000002u; +} +inline const ::securemessage::SimpleRsaPublicKey& GenericPublicKey::_internal_rsa2048_public_key() const { + const ::securemessage::SimpleRsaPublicKey* p = rsa2048_public_key_; + return p != nullptr ? *p : reinterpret_cast( + ::securemessage::_SimpleRsaPublicKey_default_instance_); +} +inline const ::securemessage::SimpleRsaPublicKey& GenericPublicKey::rsa2048_public_key() const { + // @@protoc_insertion_point(field_get:securemessage.GenericPublicKey.rsa2048_public_key) + return _internal_rsa2048_public_key(); +} +inline void GenericPublicKey::unsafe_arena_set_allocated_rsa2048_public_key( + ::securemessage::SimpleRsaPublicKey* rsa2048_public_key) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(rsa2048_public_key_); + } + rsa2048_public_key_ = rsa2048_public_key; + if (rsa2048_public_key) { + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:securemessage.GenericPublicKey.rsa2048_public_key) +} +inline ::securemessage::SimpleRsaPublicKey* GenericPublicKey::release_rsa2048_public_key() { + _has_bits_[0] &= ~0x00000002u; + ::securemessage::SimpleRsaPublicKey* temp = rsa2048_public_key_; + rsa2048_public_key_ = 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 ::securemessage::SimpleRsaPublicKey* GenericPublicKey::unsafe_arena_release_rsa2048_public_key() { + // @@protoc_insertion_point(field_release:securemessage.GenericPublicKey.rsa2048_public_key) + _has_bits_[0] &= ~0x00000002u; + ::securemessage::SimpleRsaPublicKey* temp = rsa2048_public_key_; + rsa2048_public_key_ = nullptr; + return temp; +} +inline ::securemessage::SimpleRsaPublicKey* GenericPublicKey::_internal_mutable_rsa2048_public_key() { + _has_bits_[0] |= 0x00000002u; + if (rsa2048_public_key_ == nullptr) { + auto* p = CreateMaybeMessage<::securemessage::SimpleRsaPublicKey>(GetArenaForAllocation()); + rsa2048_public_key_ = p; + } + return rsa2048_public_key_; +} +inline ::securemessage::SimpleRsaPublicKey* GenericPublicKey::mutable_rsa2048_public_key() { + ::securemessage::SimpleRsaPublicKey* _msg = _internal_mutable_rsa2048_public_key(); + // @@protoc_insertion_point(field_mutable:securemessage.GenericPublicKey.rsa2048_public_key) + return _msg; +} +inline void GenericPublicKey::set_allocated_rsa2048_public_key(::securemessage::SimpleRsaPublicKey* rsa2048_public_key) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete rsa2048_public_key_; + } + if (rsa2048_public_key) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::securemessage::SimpleRsaPublicKey>::GetOwningArena(rsa2048_public_key); + if (message_arena != submessage_arena) { + rsa2048_public_key = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, rsa2048_public_key, submessage_arena); + } + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + rsa2048_public_key_ = rsa2048_public_key; + // @@protoc_insertion_point(field_set_allocated:securemessage.GenericPublicKey.rsa2048_public_key) +} + +// optional .securemessage.DhPublicKey dh2048_public_key = 4; +inline bool GenericPublicKey::_internal_has_dh2048_public_key() const { + bool value = (_has_bits_[0] & 0x00000004u) != 0; + PROTOBUF_ASSUME(!value || dh2048_public_key_ != nullptr); + return value; +} +inline bool GenericPublicKey::has_dh2048_public_key() const { + return _internal_has_dh2048_public_key(); +} +inline void GenericPublicKey::clear_dh2048_public_key() { + if (dh2048_public_key_ != nullptr) dh2048_public_key_->Clear(); + _has_bits_[0] &= ~0x00000004u; +} +inline const ::securemessage::DhPublicKey& GenericPublicKey::_internal_dh2048_public_key() const { + const ::securemessage::DhPublicKey* p = dh2048_public_key_; + return p != nullptr ? *p : reinterpret_cast( + ::securemessage::_DhPublicKey_default_instance_); +} +inline const ::securemessage::DhPublicKey& GenericPublicKey::dh2048_public_key() const { + // @@protoc_insertion_point(field_get:securemessage.GenericPublicKey.dh2048_public_key) + return _internal_dh2048_public_key(); +} +inline void GenericPublicKey::unsafe_arena_set_allocated_dh2048_public_key( + ::securemessage::DhPublicKey* dh2048_public_key) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(dh2048_public_key_); + } + dh2048_public_key_ = dh2048_public_key; + if (dh2048_public_key) { + _has_bits_[0] |= 0x00000004u; + } else { + _has_bits_[0] &= ~0x00000004u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:securemessage.GenericPublicKey.dh2048_public_key) +} +inline ::securemessage::DhPublicKey* GenericPublicKey::release_dh2048_public_key() { + _has_bits_[0] &= ~0x00000004u; + ::securemessage::DhPublicKey* temp = dh2048_public_key_; + dh2048_public_key_ = 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 ::securemessage::DhPublicKey* GenericPublicKey::unsafe_arena_release_dh2048_public_key() { + // @@protoc_insertion_point(field_release:securemessage.GenericPublicKey.dh2048_public_key) + _has_bits_[0] &= ~0x00000004u; + ::securemessage::DhPublicKey* temp = dh2048_public_key_; + dh2048_public_key_ = nullptr; + return temp; +} +inline ::securemessage::DhPublicKey* GenericPublicKey::_internal_mutable_dh2048_public_key() { + _has_bits_[0] |= 0x00000004u; + if (dh2048_public_key_ == nullptr) { + auto* p = CreateMaybeMessage<::securemessage::DhPublicKey>(GetArenaForAllocation()); + dh2048_public_key_ = p; + } + return dh2048_public_key_; +} +inline ::securemessage::DhPublicKey* GenericPublicKey::mutable_dh2048_public_key() { + ::securemessage::DhPublicKey* _msg = _internal_mutable_dh2048_public_key(); + // @@protoc_insertion_point(field_mutable:securemessage.GenericPublicKey.dh2048_public_key) + return _msg; +} +inline void GenericPublicKey::set_allocated_dh2048_public_key(::securemessage::DhPublicKey* dh2048_public_key) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete dh2048_public_key_; + } + if (dh2048_public_key) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::securemessage::DhPublicKey>::GetOwningArena(dh2048_public_key); + if (message_arena != submessage_arena) { + dh2048_public_key = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, dh2048_public_key, submessage_arena); + } + _has_bits_[0] |= 0x00000004u; + } else { + _has_bits_[0] &= ~0x00000004u; + } + dh2048_public_key_ = dh2048_public_key; + // @@protoc_insertion_point(field_set_allocated:securemessage.GenericPublicKey.dh2048_public_key) +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace securemessage + +PROTOBUF_NAMESPACE_OPEN + +template <> struct is_proto_enum< ::securemessage::SigScheme> : ::std::true_type {}; +template <> struct is_proto_enum< ::securemessage::EncScheme> : ::std::true_type {}; +template <> struct is_proto_enum< ::securemessage::PublicKeyType> : ::std::true_type {}; + +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_proto_2fsecuremessage_2eproto diff --git a/third_party/ukey2/compiled_proto/proto/ukey.pb.cc b/third_party/ukey2/compiled_proto/proto/ukey.pb.cc new file mode 100644 index 00000000..76d9768c --- /dev/null +++ b/third_party/ukey2/compiled_proto/proto/ukey.pb.cc @@ -0,0 +1,1990 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: proto/ukey.proto + +#include "proto/ukey.pb.h" + +#include + +#include +#include +#include +#include +// @@protoc_insertion_point(includes) +#include + +PROTOBUF_PRAGMA_INIT_SEG +namespace securegcm { +constexpr Ukey2Message::Ukey2Message( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : message_data_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , message_type_(0) +{} +struct Ukey2MessageDefaultTypeInternal { + constexpr Ukey2MessageDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~Ukey2MessageDefaultTypeInternal() {} + union { + Ukey2Message _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT Ukey2MessageDefaultTypeInternal _Ukey2Message_default_instance_; +constexpr Ukey2Alert::Ukey2Alert( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : error_message_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , type_(1) +{} +struct Ukey2AlertDefaultTypeInternal { + constexpr Ukey2AlertDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~Ukey2AlertDefaultTypeInternal() {} + union { + Ukey2Alert _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT Ukey2AlertDefaultTypeInternal _Ukey2Alert_default_instance_; +constexpr Ukey2ClientInit_CipherCommitment::Ukey2ClientInit_CipherCommitment( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : commitment_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , handshake_cipher_(0) +{} +struct Ukey2ClientInit_CipherCommitmentDefaultTypeInternal { + constexpr Ukey2ClientInit_CipherCommitmentDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~Ukey2ClientInit_CipherCommitmentDefaultTypeInternal() {} + union { + Ukey2ClientInit_CipherCommitment _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT Ukey2ClientInit_CipherCommitmentDefaultTypeInternal _Ukey2ClientInit_CipherCommitment_default_instance_; +constexpr Ukey2ClientInit::Ukey2ClientInit( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : cipher_commitments_() + , random_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , next_protocol_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , version_(0){} +struct Ukey2ClientInitDefaultTypeInternal { + constexpr Ukey2ClientInitDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~Ukey2ClientInitDefaultTypeInternal() {} + union { + Ukey2ClientInit _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT Ukey2ClientInitDefaultTypeInternal _Ukey2ClientInit_default_instance_; +constexpr Ukey2ServerInit::Ukey2ServerInit( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : random_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , public_key_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , version_(0) + , handshake_cipher_(0) +{} +struct Ukey2ServerInitDefaultTypeInternal { + constexpr Ukey2ServerInitDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~Ukey2ServerInitDefaultTypeInternal() {} + union { + Ukey2ServerInit _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT Ukey2ServerInitDefaultTypeInternal _Ukey2ServerInit_default_instance_; +constexpr Ukey2ClientFinished::Ukey2ClientFinished( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : public_key_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){} +struct Ukey2ClientFinishedDefaultTypeInternal { + constexpr Ukey2ClientFinishedDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~Ukey2ClientFinishedDefaultTypeInternal() {} + union { + Ukey2ClientFinished _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT Ukey2ClientFinishedDefaultTypeInternal _Ukey2ClientFinished_default_instance_; +} // namespace securegcm +namespace securegcm { +bool Ukey2Message_Type_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 Ukey2Message_Type_strings[5] = {}; + +static const char Ukey2Message_Type_names[] = + "ALERT" + "CLIENT_FINISH" + "CLIENT_INIT" + "SERVER_INIT" + "UNKNOWN_DO_NOT_USE"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry Ukey2Message_Type_entries[] = { + { {Ukey2Message_Type_names + 0, 5}, 1 }, + { {Ukey2Message_Type_names + 5, 13}, 4 }, + { {Ukey2Message_Type_names + 18, 11}, 2 }, + { {Ukey2Message_Type_names + 29, 11}, 3 }, + { {Ukey2Message_Type_names + 40, 18}, 0 }, +}; + +static const int Ukey2Message_Type_entries_by_number[] = { + 4, // 0 -> UNKNOWN_DO_NOT_USE + 0, // 1 -> ALERT + 2, // 2 -> CLIENT_INIT + 3, // 3 -> SERVER_INIT + 1, // 4 -> CLIENT_FINISH +}; + +const std::string& Ukey2Message_Type_Name( + Ukey2Message_Type value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + Ukey2Message_Type_entries, + Ukey2Message_Type_entries_by_number, + 5, Ukey2Message_Type_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + Ukey2Message_Type_entries, + Ukey2Message_Type_entries_by_number, + 5, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + Ukey2Message_Type_strings[idx].get(); +} +bool Ukey2Message_Type_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, Ukey2Message_Type* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + Ukey2Message_Type_entries, 5, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} +#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) +constexpr Ukey2Message_Type Ukey2Message::UNKNOWN_DO_NOT_USE; +constexpr Ukey2Message_Type Ukey2Message::ALERT; +constexpr Ukey2Message_Type Ukey2Message::CLIENT_INIT; +constexpr Ukey2Message_Type Ukey2Message::SERVER_INIT; +constexpr Ukey2Message_Type Ukey2Message::CLIENT_FINISH; +constexpr Ukey2Message_Type Ukey2Message::Type_MIN; +constexpr Ukey2Message_Type Ukey2Message::Type_MAX; +constexpr int Ukey2Message::Type_ARRAYSIZE; +#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) +bool Ukey2Alert_AlertType_IsValid(int value) { + switch (value) { + case 1: + case 2: + case 3: + case 4: + case 100: + case 101: + case 102: + case 103: + case 104: + case 200: + return true; + default: + return false; + } +} + +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed Ukey2Alert_AlertType_strings[10] = {}; + +static const char Ukey2Alert_AlertType_names[] = + "BAD_HANDSHAKE_CIPHER" + "BAD_MESSAGE" + "BAD_MESSAGE_DATA" + "BAD_MESSAGE_TYPE" + "BAD_NEXT_PROTOCOL" + "BAD_PUBLIC_KEY" + "BAD_RANDOM" + "BAD_VERSION" + "INCORRECT_MESSAGE" + "INTERNAL_ERROR"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry Ukey2Alert_AlertType_entries[] = { + { {Ukey2Alert_AlertType_names + 0, 20}, 102 }, + { {Ukey2Alert_AlertType_names + 20, 11}, 1 }, + { {Ukey2Alert_AlertType_names + 31, 16}, 4 }, + { {Ukey2Alert_AlertType_names + 47, 16}, 2 }, + { {Ukey2Alert_AlertType_names + 63, 17}, 103 }, + { {Ukey2Alert_AlertType_names + 80, 14}, 104 }, + { {Ukey2Alert_AlertType_names + 94, 10}, 101 }, + { {Ukey2Alert_AlertType_names + 104, 11}, 100 }, + { {Ukey2Alert_AlertType_names + 115, 17}, 3 }, + { {Ukey2Alert_AlertType_names + 132, 14}, 200 }, +}; + +static const int Ukey2Alert_AlertType_entries_by_number[] = { + 1, // 1 -> BAD_MESSAGE + 3, // 2 -> BAD_MESSAGE_TYPE + 8, // 3 -> INCORRECT_MESSAGE + 2, // 4 -> BAD_MESSAGE_DATA + 7, // 100 -> BAD_VERSION + 6, // 101 -> BAD_RANDOM + 0, // 102 -> BAD_HANDSHAKE_CIPHER + 4, // 103 -> BAD_NEXT_PROTOCOL + 5, // 104 -> BAD_PUBLIC_KEY + 9, // 200 -> INTERNAL_ERROR +}; + +const std::string& Ukey2Alert_AlertType_Name( + Ukey2Alert_AlertType value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + Ukey2Alert_AlertType_entries, + Ukey2Alert_AlertType_entries_by_number, + 10, Ukey2Alert_AlertType_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + Ukey2Alert_AlertType_entries, + Ukey2Alert_AlertType_entries_by_number, + 10, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + Ukey2Alert_AlertType_strings[idx].get(); +} +bool Ukey2Alert_AlertType_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, Ukey2Alert_AlertType* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + Ukey2Alert_AlertType_entries, 10, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} +#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) +constexpr Ukey2Alert_AlertType Ukey2Alert::BAD_MESSAGE; +constexpr Ukey2Alert_AlertType Ukey2Alert::BAD_MESSAGE_TYPE; +constexpr Ukey2Alert_AlertType Ukey2Alert::INCORRECT_MESSAGE; +constexpr Ukey2Alert_AlertType Ukey2Alert::BAD_MESSAGE_DATA; +constexpr Ukey2Alert_AlertType Ukey2Alert::BAD_VERSION; +constexpr Ukey2Alert_AlertType Ukey2Alert::BAD_RANDOM; +constexpr Ukey2Alert_AlertType Ukey2Alert::BAD_HANDSHAKE_CIPHER; +constexpr Ukey2Alert_AlertType Ukey2Alert::BAD_NEXT_PROTOCOL; +constexpr Ukey2Alert_AlertType Ukey2Alert::BAD_PUBLIC_KEY; +constexpr Ukey2Alert_AlertType Ukey2Alert::INTERNAL_ERROR; +constexpr Ukey2Alert_AlertType Ukey2Alert::AlertType_MIN; +constexpr Ukey2Alert_AlertType Ukey2Alert::AlertType_MAX; +constexpr int Ukey2Alert::AlertType_ARRAYSIZE; +#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) +bool Ukey2HandshakeCipher_IsValid(int value) { + switch (value) { + case 0: + case 100: + case 200: + return true; + default: + return false; + } +} + +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed Ukey2HandshakeCipher_strings[3] = {}; + +static const char Ukey2HandshakeCipher_names[] = + "CURVE25519_SHA512" + "P256_SHA512" + "RESERVED"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry Ukey2HandshakeCipher_entries[] = { + { {Ukey2HandshakeCipher_names + 0, 17}, 200 }, + { {Ukey2HandshakeCipher_names + 17, 11}, 100 }, + { {Ukey2HandshakeCipher_names + 28, 8}, 0 }, +}; + +static const int Ukey2HandshakeCipher_entries_by_number[] = { + 2, // 0 -> RESERVED + 1, // 100 -> P256_SHA512 + 0, // 200 -> CURVE25519_SHA512 +}; + +const std::string& Ukey2HandshakeCipher_Name( + Ukey2HandshakeCipher value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + Ukey2HandshakeCipher_entries, + Ukey2HandshakeCipher_entries_by_number, + 3, Ukey2HandshakeCipher_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + Ukey2HandshakeCipher_entries, + Ukey2HandshakeCipher_entries_by_number, + 3, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + Ukey2HandshakeCipher_strings[idx].get(); +} +bool Ukey2HandshakeCipher_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, Ukey2HandshakeCipher* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + Ukey2HandshakeCipher_entries, 3, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} + +// =================================================================== + +class Ukey2Message::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_message_type(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static void set_has_message_data(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } +}; + +Ukey2Message::Ukey2Message(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:securegcm.Ukey2Message) +} +Ukey2Message::Ukey2Message(const Ukey2Message& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + message_data_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + message_data_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_message_data()) { + message_data_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_message_data(), + GetArenaForAllocation()); + } + message_type_ = from.message_type_; + // @@protoc_insertion_point(copy_constructor:securegcm.Ukey2Message) +} + +inline void Ukey2Message::SharedCtor() { +message_data_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + message_data_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +message_type_ = 0; +} + +Ukey2Message::~Ukey2Message() { + // @@protoc_insertion_point(destructor:securegcm.Ukey2Message) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void Ukey2Message::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + message_data_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void Ukey2Message::ArenaDtor(void* object) { + Ukey2Message* _this = reinterpret_cast< Ukey2Message* >(object); + (void)_this; +} +void Ukey2Message::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void Ukey2Message::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void Ukey2Message::Clear() { +// @@protoc_insertion_point(message_clear_start:securegcm.Ukey2Message) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + message_data_.ClearNonDefaultToEmpty(); + } + message_type_ = 0; + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* Ukey2Message::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional .securegcm.Ukey2Message.Type message_type = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::securegcm::Ukey2Message_Type_IsValid(val))) { + _internal_set_message_type(static_cast<::securegcm::Ukey2Message_Type>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // optional bytes message_data = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + auto str = _internal_mutable_message_data(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* Ukey2Message::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:securegcm.Ukey2Message) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional .securegcm.Ukey2Message.Type message_type = 1; + if (cached_has_bits & 0x00000002u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 1, this->_internal_message_type(), target); + } + + // optional bytes message_data = 2; + if (cached_has_bits & 0x00000001u) { + target = stream->WriteBytesMaybeAliased( + 2, this->_internal_message_data(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:securegcm.Ukey2Message) + return target; +} + +size_t Ukey2Message::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:securegcm.Ukey2Message) + 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 = _has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + // optional bytes message_data = 2; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_message_data()); + } + + // optional .securegcm.Ukey2Message.Type message_type = 1; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_message_type()); + } + + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void Ukey2Message::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void Ukey2Message::MergeFrom(const Ukey2Message& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:securegcm.Ukey2Message) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + _internal_set_message_data(from._internal_message_data()); + } + if (cached_has_bits & 0x00000002u) { + message_type_ = from.message_type_; + } + _has_bits_[0] |= cached_has_bits; + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void Ukey2Message::CopyFrom(const Ukey2Message& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:securegcm.Ukey2Message) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Ukey2Message::IsInitialized() const { + return true; +} + +void Ukey2Message::InternalSwap(Ukey2Message* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &message_data_, lhs_arena, + &other->message_data_, rhs_arena + ); + swap(message_type_, other->message_type_); +} + +std::string Ukey2Message::GetTypeName() const { + return "securegcm.Ukey2Message"; +} + + +// =================================================================== + +class Ukey2Alert::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_type(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static void set_has_error_message(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } +}; + +Ukey2Alert::Ukey2Alert(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:securegcm.Ukey2Alert) +} +Ukey2Alert::Ukey2Alert(const Ukey2Alert& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + error_message_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + error_message_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_error_message()) { + error_message_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_error_message(), + GetArenaForAllocation()); + } + type_ = from.type_; + // @@protoc_insertion_point(copy_constructor:securegcm.Ukey2Alert) +} + +inline void Ukey2Alert::SharedCtor() { +error_message_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + error_message_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +type_ = 1; +} + +Ukey2Alert::~Ukey2Alert() { + // @@protoc_insertion_point(destructor:securegcm.Ukey2Alert) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void Ukey2Alert::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + error_message_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void Ukey2Alert::ArenaDtor(void* object) { + Ukey2Alert* _this = reinterpret_cast< Ukey2Alert* >(object); + (void)_this; +} +void Ukey2Alert::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void Ukey2Alert::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void Ukey2Alert::Clear() { +// @@protoc_insertion_point(message_clear_start:securegcm.Ukey2Alert) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + error_message_.ClearNonDefaultToEmpty(); + } + type_ = 1; + } + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* Ukey2Alert::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional .securegcm.Ukey2Alert.AlertType type = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::securegcm::Ukey2Alert_AlertType_IsValid(val))) { + _internal_set_type(static_cast<::securegcm::Ukey2Alert_AlertType>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // optional string error_message = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + auto str = _internal_mutable_error_message(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* Ukey2Alert::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:securegcm.Ukey2Alert) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional .securegcm.Ukey2Alert.AlertType type = 1; + if (cached_has_bits & 0x00000002u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 1, this->_internal_type(), target); + } + + // optional string error_message = 2; + if (cached_has_bits & 0x00000001u) { + target = stream->WriteStringMaybeAliased( + 2, this->_internal_error_message(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:securegcm.Ukey2Alert) + return target; +} + +size_t Ukey2Alert::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:securegcm.Ukey2Alert) + 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 = _has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + // optional string error_message = 2; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_error_message()); + } + + // optional .securegcm.Ukey2Alert.AlertType type = 1; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_type()); + } + + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void Ukey2Alert::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void Ukey2Alert::MergeFrom(const Ukey2Alert& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:securegcm.Ukey2Alert) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + _internal_set_error_message(from._internal_error_message()); + } + if (cached_has_bits & 0x00000002u) { + type_ = from.type_; + } + _has_bits_[0] |= cached_has_bits; + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void Ukey2Alert::CopyFrom(const Ukey2Alert& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:securegcm.Ukey2Alert) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Ukey2Alert::IsInitialized() const { + return true; +} + +void Ukey2Alert::InternalSwap(Ukey2Alert* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &error_message_, lhs_arena, + &other->error_message_, rhs_arena + ); + swap(type_, other->type_); +} + +std::string Ukey2Alert::GetTypeName() const { + return "securegcm.Ukey2Alert"; +} + + +// =================================================================== + +class Ukey2ClientInit_CipherCommitment::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_handshake_cipher(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static void set_has_commitment(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } +}; + +Ukey2ClientInit_CipherCommitment::Ukey2ClientInit_CipherCommitment(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:securegcm.Ukey2ClientInit.CipherCommitment) +} +Ukey2ClientInit_CipherCommitment::Ukey2ClientInit_CipherCommitment(const Ukey2ClientInit_CipherCommitment& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + commitment_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + commitment_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_commitment()) { + commitment_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_commitment(), + GetArenaForAllocation()); + } + handshake_cipher_ = from.handshake_cipher_; + // @@protoc_insertion_point(copy_constructor:securegcm.Ukey2ClientInit.CipherCommitment) +} + +inline void Ukey2ClientInit_CipherCommitment::SharedCtor() { +commitment_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + commitment_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +handshake_cipher_ = 0; +} + +Ukey2ClientInit_CipherCommitment::~Ukey2ClientInit_CipherCommitment() { + // @@protoc_insertion_point(destructor:securegcm.Ukey2ClientInit.CipherCommitment) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void Ukey2ClientInit_CipherCommitment::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + commitment_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void Ukey2ClientInit_CipherCommitment::ArenaDtor(void* object) { + Ukey2ClientInit_CipherCommitment* _this = reinterpret_cast< Ukey2ClientInit_CipherCommitment* >(object); + (void)_this; +} +void Ukey2ClientInit_CipherCommitment::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void Ukey2ClientInit_CipherCommitment::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void Ukey2ClientInit_CipherCommitment::Clear() { +// @@protoc_insertion_point(message_clear_start:securegcm.Ukey2ClientInit.CipherCommitment) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + commitment_.ClearNonDefaultToEmpty(); + } + handshake_cipher_ = 0; + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* Ukey2ClientInit_CipherCommitment::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional .securegcm.Ukey2HandshakeCipher handshake_cipher = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::securegcm::Ukey2HandshakeCipher_IsValid(val))) { + _internal_set_handshake_cipher(static_cast<::securegcm::Ukey2HandshakeCipher>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // optional bytes commitment = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + auto str = _internal_mutable_commitment(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* Ukey2ClientInit_CipherCommitment::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:securegcm.Ukey2ClientInit.CipherCommitment) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional .securegcm.Ukey2HandshakeCipher handshake_cipher = 1; + if (cached_has_bits & 0x00000002u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 1, this->_internal_handshake_cipher(), target); + } + + // optional bytes commitment = 2; + if (cached_has_bits & 0x00000001u) { + target = stream->WriteBytesMaybeAliased( + 2, this->_internal_commitment(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:securegcm.Ukey2ClientInit.CipherCommitment) + return target; +} + +size_t Ukey2ClientInit_CipherCommitment::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:securegcm.Ukey2ClientInit.CipherCommitment) + 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 = _has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + // optional bytes commitment = 2; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_commitment()); + } + + // optional .securegcm.Ukey2HandshakeCipher handshake_cipher = 1; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_handshake_cipher()); + } + + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void Ukey2ClientInit_CipherCommitment::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void Ukey2ClientInit_CipherCommitment::MergeFrom(const Ukey2ClientInit_CipherCommitment& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:securegcm.Ukey2ClientInit.CipherCommitment) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + _internal_set_commitment(from._internal_commitment()); + } + if (cached_has_bits & 0x00000002u) { + handshake_cipher_ = from.handshake_cipher_; + } + _has_bits_[0] |= cached_has_bits; + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void Ukey2ClientInit_CipherCommitment::CopyFrom(const Ukey2ClientInit_CipherCommitment& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:securegcm.Ukey2ClientInit.CipherCommitment) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Ukey2ClientInit_CipherCommitment::IsInitialized() const { + return true; +} + +void Ukey2ClientInit_CipherCommitment::InternalSwap(Ukey2ClientInit_CipherCommitment* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &commitment_, lhs_arena, + &other->commitment_, rhs_arena + ); + swap(handshake_cipher_, other->handshake_cipher_); +} + +std::string Ukey2ClientInit_CipherCommitment::GetTypeName() const { + return "securegcm.Ukey2ClientInit.CipherCommitment"; +} + + +// =================================================================== + +class Ukey2ClientInit::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_version(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } + static void set_has_random(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_next_protocol(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } +}; + +Ukey2ClientInit::Ukey2ClientInit(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned), + cipher_commitments_(arena) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:securegcm.Ukey2ClientInit) +} +Ukey2ClientInit::Ukey2ClientInit(const Ukey2ClientInit& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_), + cipher_commitments_(from.cipher_commitments_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + random_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + random_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_random()) { + random_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_random(), + GetArenaForAllocation()); + } + next_protocol_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + next_protocol_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_next_protocol()) { + next_protocol_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_next_protocol(), + GetArenaForAllocation()); + } + version_ = from.version_; + // @@protoc_insertion_point(copy_constructor:securegcm.Ukey2ClientInit) +} + +inline void Ukey2ClientInit::SharedCtor() { +random_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + random_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +next_protocol_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + next_protocol_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +version_ = 0; +} + +Ukey2ClientInit::~Ukey2ClientInit() { + // @@protoc_insertion_point(destructor:securegcm.Ukey2ClientInit) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void Ukey2ClientInit::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + random_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + next_protocol_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void Ukey2ClientInit::ArenaDtor(void* object) { + Ukey2ClientInit* _this = reinterpret_cast< Ukey2ClientInit* >(object); + (void)_this; +} +void Ukey2ClientInit::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void Ukey2ClientInit::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void Ukey2ClientInit::Clear() { +// @@protoc_insertion_point(message_clear_start:securegcm.Ukey2ClientInit) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cipher_commitments_.Clear(); + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + random_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000002u) { + next_protocol_.ClearNonDefaultToEmpty(); + } + } + version_ = 0; + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* Ukey2ClientInit::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional int32 version = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + _Internal::set_has_version(&has_bits); + version_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional bytes random = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + auto str = _internal_mutable_random(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // repeated .securegcm.Ukey2ClientInit.CipherCommitment cipher_commitments = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_cipher_commitments(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr)); + } else + goto handle_unusual; + continue; + // optional string next_protocol = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { + auto str = _internal_mutable_next_protocol(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* Ukey2ClientInit::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:securegcm.Ukey2ClientInit) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional int32 version = 1; + if (cached_has_bits & 0x00000004u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_version(), target); + } + + // optional bytes random = 2; + if (cached_has_bits & 0x00000001u) { + target = stream->WriteBytesMaybeAliased( + 2, this->_internal_random(), target); + } + + // repeated .securegcm.Ukey2ClientInit.CipherCommitment cipher_commitments = 3; + for (unsigned int i = 0, + n = static_cast(this->_internal_cipher_commitments_size()); i < n; i++) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(3, this->_internal_cipher_commitments(i), target, stream); + } + + // optional string next_protocol = 4; + if (cached_has_bits & 0x00000002u) { + target = stream->WriteStringMaybeAliased( + 4, this->_internal_next_protocol(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:securegcm.Ukey2ClientInit) + return target; +} + +size_t Ukey2ClientInit::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:securegcm.Ukey2ClientInit) + 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 .securegcm.Ukey2ClientInit.CipherCommitment cipher_commitments = 3; + total_size += 1UL * this->_internal_cipher_commitments_size(); + for (const auto& msg : this->cipher_commitments_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + // optional bytes random = 2; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_random()); + } + + // optional string next_protocol = 4; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_next_protocol()); + } + + // optional int32 version = 1; + if (cached_has_bits & 0x00000004u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_version()); + } + + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void Ukey2ClientInit::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void Ukey2ClientInit::MergeFrom(const Ukey2ClientInit& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:securegcm.Ukey2ClientInit) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cipher_commitments_.MergeFrom(from.cipher_commitments_); + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + if (cached_has_bits & 0x00000001u) { + _internal_set_random(from._internal_random()); + } + if (cached_has_bits & 0x00000002u) { + _internal_set_next_protocol(from._internal_next_protocol()); + } + if (cached_has_bits & 0x00000004u) { + version_ = from.version_; + } + _has_bits_[0] |= cached_has_bits; + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void Ukey2ClientInit::CopyFrom(const Ukey2ClientInit& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:securegcm.Ukey2ClientInit) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Ukey2ClientInit::IsInitialized() const { + return true; +} + +void Ukey2ClientInit::InternalSwap(Ukey2ClientInit* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + cipher_commitments_.InternalSwap(&other->cipher_commitments_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &random_, lhs_arena, + &other->random_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &next_protocol_, lhs_arena, + &other->next_protocol_, rhs_arena + ); + swap(version_, other->version_); +} + +std::string Ukey2ClientInit::GetTypeName() const { + return "securegcm.Ukey2ClientInit"; +} + + +// =================================================================== + +class Ukey2ServerInit::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_version(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } + static void set_has_random(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_handshake_cipher(HasBits* has_bits) { + (*has_bits)[0] |= 8u; + } + static void set_has_public_key(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } +}; + +Ukey2ServerInit::Ukey2ServerInit(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:securegcm.Ukey2ServerInit) +} +Ukey2ServerInit::Ukey2ServerInit(const Ukey2ServerInit& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + random_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + random_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_random()) { + random_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_random(), + GetArenaForAllocation()); + } + public_key_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + public_key_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_public_key()) { + public_key_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_public_key(), + GetArenaForAllocation()); + } + ::memcpy(&version_, &from.version_, + static_cast(reinterpret_cast(&handshake_cipher_) - + reinterpret_cast(&version_)) + sizeof(handshake_cipher_)); + // @@protoc_insertion_point(copy_constructor:securegcm.Ukey2ServerInit) +} + +inline void Ukey2ServerInit::SharedCtor() { +random_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + random_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +public_key_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + public_key_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&version_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&handshake_cipher_) - + reinterpret_cast(&version_)) + sizeof(handshake_cipher_)); +} + +Ukey2ServerInit::~Ukey2ServerInit() { + // @@protoc_insertion_point(destructor:securegcm.Ukey2ServerInit) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void Ukey2ServerInit::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + random_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + public_key_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void Ukey2ServerInit::ArenaDtor(void* object) { + Ukey2ServerInit* _this = reinterpret_cast< Ukey2ServerInit* >(object); + (void)_this; +} +void Ukey2ServerInit::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void Ukey2ServerInit::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void Ukey2ServerInit::Clear() { +// @@protoc_insertion_point(message_clear_start:securegcm.Ukey2ServerInit) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + random_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000002u) { + public_key_.ClearNonDefaultToEmpty(); + } + } + if (cached_has_bits & 0x0000000cu) { + ::memset(&version_, 0, static_cast( + reinterpret_cast(&handshake_cipher_) - + reinterpret_cast(&version_)) + sizeof(handshake_cipher_)); + } + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* Ukey2ServerInit::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional int32 version = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + _Internal::set_has_version(&has_bits); + version_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional bytes random = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + auto str = _internal_mutable_random(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .securegcm.Ukey2HandshakeCipher handshake_cipher = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::securegcm::Ukey2HandshakeCipher_IsValid(val))) { + _internal_set_handshake_cipher(static_cast<::securegcm::Ukey2HandshakeCipher>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(3, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // optional bytes public_key = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { + auto str = _internal_mutable_public_key(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* Ukey2ServerInit::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:securegcm.Ukey2ServerInit) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional int32 version = 1; + if (cached_has_bits & 0x00000004u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_version(), target); + } + + // optional bytes random = 2; + if (cached_has_bits & 0x00000001u) { + target = stream->WriteBytesMaybeAliased( + 2, this->_internal_random(), target); + } + + // optional .securegcm.Ukey2HandshakeCipher handshake_cipher = 3; + if (cached_has_bits & 0x00000008u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 3, this->_internal_handshake_cipher(), target); + } + + // optional bytes public_key = 4; + if (cached_has_bits & 0x00000002u) { + target = stream->WriteBytesMaybeAliased( + 4, this->_internal_public_key(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:securegcm.Ukey2ServerInit) + return target; +} + +size_t Ukey2ServerInit::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:securegcm.Ukey2ServerInit) + 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 = _has_bits_[0]; + if (cached_has_bits & 0x0000000fu) { + // optional bytes random = 2; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_random()); + } + + // optional bytes public_key = 4; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_public_key()); + } + + // optional int32 version = 1; + if (cached_has_bits & 0x00000004u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_version()); + } + + // optional .securegcm.Ukey2HandshakeCipher handshake_cipher = 3; + if (cached_has_bits & 0x00000008u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_handshake_cipher()); + } + + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void Ukey2ServerInit::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void Ukey2ServerInit::MergeFrom(const Ukey2ServerInit& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:securegcm.Ukey2ServerInit) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x0000000fu) { + if (cached_has_bits & 0x00000001u) { + _internal_set_random(from._internal_random()); + } + if (cached_has_bits & 0x00000002u) { + _internal_set_public_key(from._internal_public_key()); + } + if (cached_has_bits & 0x00000004u) { + version_ = from.version_; + } + if (cached_has_bits & 0x00000008u) { + handshake_cipher_ = from.handshake_cipher_; + } + _has_bits_[0] |= cached_has_bits; + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void Ukey2ServerInit::CopyFrom(const Ukey2ServerInit& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:securegcm.Ukey2ServerInit) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Ukey2ServerInit::IsInitialized() const { + return true; +} + +void Ukey2ServerInit::InternalSwap(Ukey2ServerInit* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &random_, lhs_arena, + &other->random_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &public_key_, lhs_arena, + &other->public_key_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(Ukey2ServerInit, handshake_cipher_) + + sizeof(Ukey2ServerInit::handshake_cipher_) + - PROTOBUF_FIELD_OFFSET(Ukey2ServerInit, version_)>( + reinterpret_cast(&version_), + reinterpret_cast(&other->version_)); +} + +std::string Ukey2ServerInit::GetTypeName() const { + return "securegcm.Ukey2ServerInit"; +} + + +// =================================================================== + +class Ukey2ClientFinished::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_public_key(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } +}; + +Ukey2ClientFinished::Ukey2ClientFinished(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:securegcm.Ukey2ClientFinished) +} +Ukey2ClientFinished::Ukey2ClientFinished(const Ukey2ClientFinished& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + public_key_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + public_key_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_public_key()) { + public_key_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_public_key(), + GetArenaForAllocation()); + } + // @@protoc_insertion_point(copy_constructor:securegcm.Ukey2ClientFinished) +} + +inline void Ukey2ClientFinished::SharedCtor() { +public_key_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + public_key_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +Ukey2ClientFinished::~Ukey2ClientFinished() { + // @@protoc_insertion_point(destructor:securegcm.Ukey2ClientFinished) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void Ukey2ClientFinished::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + public_key_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void Ukey2ClientFinished::ArenaDtor(void* object) { + Ukey2ClientFinished* _this = reinterpret_cast< Ukey2ClientFinished* >(object); + (void)_this; +} +void Ukey2ClientFinished::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void Ukey2ClientFinished::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void Ukey2ClientFinished::Clear() { +// @@protoc_insertion_point(message_clear_start:securegcm.Ukey2ClientFinished) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + public_key_.ClearNonDefaultToEmpty(); + } + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* Ukey2ClientFinished::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional bytes public_key = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_public_key(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::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(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* Ukey2ClientFinished::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:securegcm.Ukey2ClientFinished) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional bytes public_key = 1; + if (cached_has_bits & 0x00000001u) { + target = stream->WriteBytesMaybeAliased( + 1, this->_internal_public_key(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:securegcm.Ukey2ClientFinished) + return target; +} + +size_t Ukey2ClientFinished::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:securegcm.Ukey2ClientFinished) + 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 public_key = 1; + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_public_key()); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void Ukey2ClientFinished::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void Ukey2ClientFinished::MergeFrom(const Ukey2ClientFinished& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:securegcm.Ukey2ClientFinished) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_has_public_key()) { + _internal_set_public_key(from._internal_public_key()); + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void Ukey2ClientFinished::CopyFrom(const Ukey2ClientFinished& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:securegcm.Ukey2ClientFinished) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Ukey2ClientFinished::IsInitialized() const { + return true; +} + +void Ukey2ClientFinished::InternalSwap(Ukey2ClientFinished* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &public_key_, lhs_arena, + &other->public_key_, rhs_arena + ); +} + +std::string Ukey2ClientFinished::GetTypeName() const { + return "securegcm.Ukey2ClientFinished"; +} + + +// @@protoc_insertion_point(namespace_scope) +} // namespace securegcm +PROTOBUF_NAMESPACE_OPEN +template<> PROTOBUF_NOINLINE ::securegcm::Ukey2Message* Arena::CreateMaybeMessage< ::securegcm::Ukey2Message >(Arena* arena) { + return Arena::CreateMessageInternal< ::securegcm::Ukey2Message >(arena); +} +template<> PROTOBUF_NOINLINE ::securegcm::Ukey2Alert* Arena::CreateMaybeMessage< ::securegcm::Ukey2Alert >(Arena* arena) { + return Arena::CreateMessageInternal< ::securegcm::Ukey2Alert >(arena); +} +template<> PROTOBUF_NOINLINE ::securegcm::Ukey2ClientInit_CipherCommitment* Arena::CreateMaybeMessage< ::securegcm::Ukey2ClientInit_CipherCommitment >(Arena* arena) { + return Arena::CreateMessageInternal< ::securegcm::Ukey2ClientInit_CipherCommitment >(arena); +} +template<> PROTOBUF_NOINLINE ::securegcm::Ukey2ClientInit* Arena::CreateMaybeMessage< ::securegcm::Ukey2ClientInit >(Arena* arena) { + return Arena::CreateMessageInternal< ::securegcm::Ukey2ClientInit >(arena); +} +template<> PROTOBUF_NOINLINE ::securegcm::Ukey2ServerInit* Arena::CreateMaybeMessage< ::securegcm::Ukey2ServerInit >(Arena* arena) { + return Arena::CreateMessageInternal< ::securegcm::Ukey2ServerInit >(arena); +} +template<> PROTOBUF_NOINLINE ::securegcm::Ukey2ClientFinished* Arena::CreateMaybeMessage< ::securegcm::Ukey2ClientFinished >(Arena* arena) { + return Arena::CreateMessageInternal< ::securegcm::Ukey2ClientFinished >(arena); +} +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) +#include diff --git a/third_party/ukey2/compiled_proto/proto/ukey.pb.h b/third_party/ukey2/compiled_proto/proto/ukey.pb.h new file mode 100644 index 00000000..8c316a30 --- /dev/null +++ b/third_party/ukey2/compiled_proto/proto/ukey.pb.h @@ -0,0 +1,2085 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: proto/ukey.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_proto_2fukey_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_proto_2fukey_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3019000 +#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 3019004 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_proto_2fukey_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_proto_2fukey_2eproto { + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::AuxiliaryParseTableField aux[] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[6] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[]; + static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[]; + static const uint32_t offsets[]; +}; +namespace securegcm { +class Ukey2Alert; +struct Ukey2AlertDefaultTypeInternal; +extern Ukey2AlertDefaultTypeInternal _Ukey2Alert_default_instance_; +class Ukey2ClientFinished; +struct Ukey2ClientFinishedDefaultTypeInternal; +extern Ukey2ClientFinishedDefaultTypeInternal _Ukey2ClientFinished_default_instance_; +class Ukey2ClientInit; +struct Ukey2ClientInitDefaultTypeInternal; +extern Ukey2ClientInitDefaultTypeInternal _Ukey2ClientInit_default_instance_; +class Ukey2ClientInit_CipherCommitment; +struct Ukey2ClientInit_CipherCommitmentDefaultTypeInternal; +extern Ukey2ClientInit_CipherCommitmentDefaultTypeInternal _Ukey2ClientInit_CipherCommitment_default_instance_; +class Ukey2Message; +struct Ukey2MessageDefaultTypeInternal; +extern Ukey2MessageDefaultTypeInternal _Ukey2Message_default_instance_; +class Ukey2ServerInit; +struct Ukey2ServerInitDefaultTypeInternal; +extern Ukey2ServerInitDefaultTypeInternal _Ukey2ServerInit_default_instance_; +} // namespace securegcm +PROTOBUF_NAMESPACE_OPEN +template<> ::securegcm::Ukey2Alert* Arena::CreateMaybeMessage<::securegcm::Ukey2Alert>(Arena*); +template<> ::securegcm::Ukey2ClientFinished* Arena::CreateMaybeMessage<::securegcm::Ukey2ClientFinished>(Arena*); +template<> ::securegcm::Ukey2ClientInit* Arena::CreateMaybeMessage<::securegcm::Ukey2ClientInit>(Arena*); +template<> ::securegcm::Ukey2ClientInit_CipherCommitment* Arena::CreateMaybeMessage<::securegcm::Ukey2ClientInit_CipherCommitment>(Arena*); +template<> ::securegcm::Ukey2Message* Arena::CreateMaybeMessage<::securegcm::Ukey2Message>(Arena*); +template<> ::securegcm::Ukey2ServerInit* Arena::CreateMaybeMessage<::securegcm::Ukey2ServerInit>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace securegcm { + +enum Ukey2Message_Type : int { + Ukey2Message_Type_UNKNOWN_DO_NOT_USE = 0, + Ukey2Message_Type_ALERT = 1, + Ukey2Message_Type_CLIENT_INIT = 2, + Ukey2Message_Type_SERVER_INIT = 3, + Ukey2Message_Type_CLIENT_FINISH = 4 +}; +bool Ukey2Message_Type_IsValid(int value); +constexpr Ukey2Message_Type Ukey2Message_Type_Type_MIN = Ukey2Message_Type_UNKNOWN_DO_NOT_USE; +constexpr Ukey2Message_Type Ukey2Message_Type_Type_MAX = Ukey2Message_Type_CLIENT_FINISH; +constexpr int Ukey2Message_Type_Type_ARRAYSIZE = Ukey2Message_Type_Type_MAX + 1; + +const std::string& Ukey2Message_Type_Name(Ukey2Message_Type value); +template +inline const std::string& Ukey2Message_Type_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function Ukey2Message_Type_Name."); + return Ukey2Message_Type_Name(static_cast(enum_t_value)); +} +bool Ukey2Message_Type_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, Ukey2Message_Type* value); +enum Ukey2Alert_AlertType : int { + Ukey2Alert_AlertType_BAD_MESSAGE = 1, + Ukey2Alert_AlertType_BAD_MESSAGE_TYPE = 2, + Ukey2Alert_AlertType_INCORRECT_MESSAGE = 3, + Ukey2Alert_AlertType_BAD_MESSAGE_DATA = 4, + Ukey2Alert_AlertType_BAD_VERSION = 100, + Ukey2Alert_AlertType_BAD_RANDOM = 101, + Ukey2Alert_AlertType_BAD_HANDSHAKE_CIPHER = 102, + Ukey2Alert_AlertType_BAD_NEXT_PROTOCOL = 103, + Ukey2Alert_AlertType_BAD_PUBLIC_KEY = 104, + Ukey2Alert_AlertType_INTERNAL_ERROR = 200 +}; +bool Ukey2Alert_AlertType_IsValid(int value); +constexpr Ukey2Alert_AlertType Ukey2Alert_AlertType_AlertType_MIN = Ukey2Alert_AlertType_BAD_MESSAGE; +constexpr Ukey2Alert_AlertType Ukey2Alert_AlertType_AlertType_MAX = Ukey2Alert_AlertType_INTERNAL_ERROR; +constexpr int Ukey2Alert_AlertType_AlertType_ARRAYSIZE = Ukey2Alert_AlertType_AlertType_MAX + 1; + +const std::string& Ukey2Alert_AlertType_Name(Ukey2Alert_AlertType value); +template +inline const std::string& Ukey2Alert_AlertType_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function Ukey2Alert_AlertType_Name."); + return Ukey2Alert_AlertType_Name(static_cast(enum_t_value)); +} +bool Ukey2Alert_AlertType_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, Ukey2Alert_AlertType* value); +enum Ukey2HandshakeCipher : int { + RESERVED = 0, + P256_SHA512 = 100, + CURVE25519_SHA512 = 200 +}; +bool Ukey2HandshakeCipher_IsValid(int value); +constexpr Ukey2HandshakeCipher Ukey2HandshakeCipher_MIN = RESERVED; +constexpr Ukey2HandshakeCipher Ukey2HandshakeCipher_MAX = CURVE25519_SHA512; +constexpr int Ukey2HandshakeCipher_ARRAYSIZE = Ukey2HandshakeCipher_MAX + 1; + +const std::string& Ukey2HandshakeCipher_Name(Ukey2HandshakeCipher value); +template +inline const std::string& Ukey2HandshakeCipher_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function Ukey2HandshakeCipher_Name."); + return Ukey2HandshakeCipher_Name(static_cast(enum_t_value)); +} +bool Ukey2HandshakeCipher_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, Ukey2HandshakeCipher* value); +// =================================================================== + +class Ukey2Message final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:securegcm.Ukey2Message) */ { + public: + inline Ukey2Message() : Ukey2Message(nullptr) {} + ~Ukey2Message() override; + explicit constexpr Ukey2Message(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + Ukey2Message(const Ukey2Message& from); + Ukey2Message(Ukey2Message&& from) noexcept + : Ukey2Message() { + *this = ::std::move(from); + } + + inline Ukey2Message& operator=(const Ukey2Message& from) { + CopyFrom(from); + return *this; + } + inline Ukey2Message& operator=(Ukey2Message&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const Ukey2Message& default_instance() { + return *internal_default_instance(); + } + static inline const Ukey2Message* internal_default_instance() { + return reinterpret_cast( + &_Ukey2Message_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(Ukey2Message& a, Ukey2Message& b) { + a.Swap(&b); + } + inline void Swap(Ukey2Message* 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(Ukey2Message* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + Ukey2Message* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const Ukey2Message& from); + void MergeFrom(const Ukey2Message& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(Ukey2Message* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "securegcm.Ukey2Message"; + } + protected: + explicit Ukey2Message(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + typedef Ukey2Message_Type Type; + static constexpr Type UNKNOWN_DO_NOT_USE = + Ukey2Message_Type_UNKNOWN_DO_NOT_USE; + static constexpr Type ALERT = + Ukey2Message_Type_ALERT; + static constexpr Type CLIENT_INIT = + Ukey2Message_Type_CLIENT_INIT; + static constexpr Type SERVER_INIT = + Ukey2Message_Type_SERVER_INIT; + static constexpr Type CLIENT_FINISH = + Ukey2Message_Type_CLIENT_FINISH; + static inline bool Type_IsValid(int value) { + return Ukey2Message_Type_IsValid(value); + } + static constexpr Type Type_MIN = + Ukey2Message_Type_Type_MIN; + static constexpr Type Type_MAX = + Ukey2Message_Type_Type_MAX; + static constexpr int Type_ARRAYSIZE = + Ukey2Message_Type_Type_ARRAYSIZE; + template + static inline const std::string& Type_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function Type_Name."); + return Ukey2Message_Type_Name(enum_t_value); + } + static inline bool Type_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name, + Type* value) { + return Ukey2Message_Type_Parse(name, value); + } + + // accessors ------------------------------------------------------- + + enum : int { + kMessageDataFieldNumber = 2, + kMessageTypeFieldNumber = 1, + }; + // optional bytes message_data = 2; + bool has_message_data() const; + private: + bool _internal_has_message_data() const; + public: + void clear_message_data(); + const std::string& message_data() const; + template + void set_message_data(ArgT0&& arg0, ArgT... args); + std::string* mutable_message_data(); + PROTOBUF_NODISCARD std::string* release_message_data(); + void set_allocated_message_data(std::string* message_data); + private: + const std::string& _internal_message_data() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_message_data(const std::string& value); + std::string* _internal_mutable_message_data(); + public: + + // optional .securegcm.Ukey2Message.Type message_type = 1; + bool has_message_type() const; + private: + bool _internal_has_message_type() const; + public: + void clear_message_type(); + ::securegcm::Ukey2Message_Type message_type() const; + void set_message_type(::securegcm::Ukey2Message_Type value); + private: + ::securegcm::Ukey2Message_Type _internal_message_type() const; + void _internal_set_message_type(::securegcm::Ukey2Message_Type value); + public: + + // @@protoc_insertion_point(class_scope:securegcm.Ukey2Message) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr message_data_; + int message_type_; + friend struct ::TableStruct_proto_2fukey_2eproto; +}; +// ------------------------------------------------------------------- + +class Ukey2Alert final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:securegcm.Ukey2Alert) */ { + public: + inline Ukey2Alert() : Ukey2Alert(nullptr) {} + ~Ukey2Alert() override; + explicit constexpr Ukey2Alert(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + Ukey2Alert(const Ukey2Alert& from); + Ukey2Alert(Ukey2Alert&& from) noexcept + : Ukey2Alert() { + *this = ::std::move(from); + } + + inline Ukey2Alert& operator=(const Ukey2Alert& from) { + CopyFrom(from); + return *this; + } + inline Ukey2Alert& operator=(Ukey2Alert&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const Ukey2Alert& default_instance() { + return *internal_default_instance(); + } + static inline const Ukey2Alert* internal_default_instance() { + return reinterpret_cast( + &_Ukey2Alert_default_instance_); + } + static constexpr int kIndexInFileMessages = + 1; + + friend void swap(Ukey2Alert& a, Ukey2Alert& b) { + a.Swap(&b); + } + inline void Swap(Ukey2Alert* 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(Ukey2Alert* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + Ukey2Alert* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const Ukey2Alert& from); + void MergeFrom(const Ukey2Alert& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(Ukey2Alert* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "securegcm.Ukey2Alert"; + } + protected: + explicit Ukey2Alert(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + typedef Ukey2Alert_AlertType AlertType; + static constexpr AlertType BAD_MESSAGE = + Ukey2Alert_AlertType_BAD_MESSAGE; + static constexpr AlertType BAD_MESSAGE_TYPE = + Ukey2Alert_AlertType_BAD_MESSAGE_TYPE; + static constexpr AlertType INCORRECT_MESSAGE = + Ukey2Alert_AlertType_INCORRECT_MESSAGE; + static constexpr AlertType BAD_MESSAGE_DATA = + Ukey2Alert_AlertType_BAD_MESSAGE_DATA; + static constexpr AlertType BAD_VERSION = + Ukey2Alert_AlertType_BAD_VERSION; + static constexpr AlertType BAD_RANDOM = + Ukey2Alert_AlertType_BAD_RANDOM; + static constexpr AlertType BAD_HANDSHAKE_CIPHER = + Ukey2Alert_AlertType_BAD_HANDSHAKE_CIPHER; + static constexpr AlertType BAD_NEXT_PROTOCOL = + Ukey2Alert_AlertType_BAD_NEXT_PROTOCOL; + static constexpr AlertType BAD_PUBLIC_KEY = + Ukey2Alert_AlertType_BAD_PUBLIC_KEY; + static constexpr AlertType INTERNAL_ERROR = + Ukey2Alert_AlertType_INTERNAL_ERROR; + static inline bool AlertType_IsValid(int value) { + return Ukey2Alert_AlertType_IsValid(value); + } + static constexpr AlertType AlertType_MIN = + Ukey2Alert_AlertType_AlertType_MIN; + static constexpr AlertType AlertType_MAX = + Ukey2Alert_AlertType_AlertType_MAX; + static constexpr int AlertType_ARRAYSIZE = + Ukey2Alert_AlertType_AlertType_ARRAYSIZE; + template + static inline const std::string& AlertType_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function AlertType_Name."); + return Ukey2Alert_AlertType_Name(enum_t_value); + } + static inline bool AlertType_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name, + AlertType* value) { + return Ukey2Alert_AlertType_Parse(name, value); + } + + // accessors ------------------------------------------------------- + + enum : int { + kErrorMessageFieldNumber = 2, + kTypeFieldNumber = 1, + }; + // optional string error_message = 2; + bool has_error_message() const; + private: + bool _internal_has_error_message() const; + public: + void clear_error_message(); + const std::string& error_message() const; + template + void set_error_message(ArgT0&& arg0, ArgT... args); + std::string* mutable_error_message(); + PROTOBUF_NODISCARD std::string* release_error_message(); + void set_allocated_error_message(std::string* error_message); + private: + const std::string& _internal_error_message() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_error_message(const std::string& value); + std::string* _internal_mutable_error_message(); + public: + + // optional .securegcm.Ukey2Alert.AlertType type = 1; + bool has_type() const; + private: + bool _internal_has_type() const; + public: + void clear_type(); + ::securegcm::Ukey2Alert_AlertType type() const; + void set_type(::securegcm::Ukey2Alert_AlertType value); + private: + ::securegcm::Ukey2Alert_AlertType _internal_type() const; + void _internal_set_type(::securegcm::Ukey2Alert_AlertType value); + public: + + // @@protoc_insertion_point(class_scope:securegcm.Ukey2Alert) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr error_message_; + int type_; + friend struct ::TableStruct_proto_2fukey_2eproto; +}; +// ------------------------------------------------------------------- + +class Ukey2ClientInit_CipherCommitment final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:securegcm.Ukey2ClientInit.CipherCommitment) */ { + public: + inline Ukey2ClientInit_CipherCommitment() : Ukey2ClientInit_CipherCommitment(nullptr) {} + ~Ukey2ClientInit_CipherCommitment() override; + explicit constexpr Ukey2ClientInit_CipherCommitment(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + Ukey2ClientInit_CipherCommitment(const Ukey2ClientInit_CipherCommitment& from); + Ukey2ClientInit_CipherCommitment(Ukey2ClientInit_CipherCommitment&& from) noexcept + : Ukey2ClientInit_CipherCommitment() { + *this = ::std::move(from); + } + + inline Ukey2ClientInit_CipherCommitment& operator=(const Ukey2ClientInit_CipherCommitment& from) { + CopyFrom(from); + return *this; + } + inline Ukey2ClientInit_CipherCommitment& operator=(Ukey2ClientInit_CipherCommitment&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const Ukey2ClientInit_CipherCommitment& default_instance() { + return *internal_default_instance(); + } + static inline const Ukey2ClientInit_CipherCommitment* internal_default_instance() { + return reinterpret_cast( + &_Ukey2ClientInit_CipherCommitment_default_instance_); + } + static constexpr int kIndexInFileMessages = + 2; + + friend void swap(Ukey2ClientInit_CipherCommitment& a, Ukey2ClientInit_CipherCommitment& b) { + a.Swap(&b); + } + inline void Swap(Ukey2ClientInit_CipherCommitment* 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(Ukey2ClientInit_CipherCommitment* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + Ukey2ClientInit_CipherCommitment* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const Ukey2ClientInit_CipherCommitment& from); + void MergeFrom(const Ukey2ClientInit_CipherCommitment& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(Ukey2ClientInit_CipherCommitment* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "securegcm.Ukey2ClientInit.CipherCommitment"; + } + protected: + explicit Ukey2ClientInit_CipherCommitment(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kCommitmentFieldNumber = 2, + kHandshakeCipherFieldNumber = 1, + }; + // optional bytes commitment = 2; + bool has_commitment() const; + private: + bool _internal_has_commitment() const; + public: + void clear_commitment(); + const std::string& commitment() const; + template + void set_commitment(ArgT0&& arg0, ArgT... args); + std::string* mutable_commitment(); + PROTOBUF_NODISCARD std::string* release_commitment(); + void set_allocated_commitment(std::string* commitment); + private: + const std::string& _internal_commitment() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_commitment(const std::string& value); + std::string* _internal_mutable_commitment(); + public: + + // optional .securegcm.Ukey2HandshakeCipher handshake_cipher = 1; + bool has_handshake_cipher() const; + private: + bool _internal_has_handshake_cipher() const; + public: + void clear_handshake_cipher(); + ::securegcm::Ukey2HandshakeCipher handshake_cipher() const; + void set_handshake_cipher(::securegcm::Ukey2HandshakeCipher value); + private: + ::securegcm::Ukey2HandshakeCipher _internal_handshake_cipher() const; + void _internal_set_handshake_cipher(::securegcm::Ukey2HandshakeCipher value); + public: + + // @@protoc_insertion_point(class_scope:securegcm.Ukey2ClientInit.CipherCommitment) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr commitment_; + int handshake_cipher_; + friend struct ::TableStruct_proto_2fukey_2eproto; +}; +// ------------------------------------------------------------------- + +class Ukey2ClientInit final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:securegcm.Ukey2ClientInit) */ { + public: + inline Ukey2ClientInit() : Ukey2ClientInit(nullptr) {} + ~Ukey2ClientInit() override; + explicit constexpr Ukey2ClientInit(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + Ukey2ClientInit(const Ukey2ClientInit& from); + Ukey2ClientInit(Ukey2ClientInit&& from) noexcept + : Ukey2ClientInit() { + *this = ::std::move(from); + } + + inline Ukey2ClientInit& operator=(const Ukey2ClientInit& from) { + CopyFrom(from); + return *this; + } + inline Ukey2ClientInit& operator=(Ukey2ClientInit&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const Ukey2ClientInit& default_instance() { + return *internal_default_instance(); + } + static inline const Ukey2ClientInit* internal_default_instance() { + return reinterpret_cast( + &_Ukey2ClientInit_default_instance_); + } + static constexpr int kIndexInFileMessages = + 3; + + friend void swap(Ukey2ClientInit& a, Ukey2ClientInit& b) { + a.Swap(&b); + } + inline void Swap(Ukey2ClientInit* 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(Ukey2ClientInit* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + Ukey2ClientInit* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const Ukey2ClientInit& from); + void MergeFrom(const Ukey2ClientInit& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(Ukey2ClientInit* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "securegcm.Ukey2ClientInit"; + } + protected: + explicit Ukey2ClientInit(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + typedef Ukey2ClientInit_CipherCommitment CipherCommitment; + + // accessors ------------------------------------------------------- + + enum : int { + kCipherCommitmentsFieldNumber = 3, + kRandomFieldNumber = 2, + kNextProtocolFieldNumber = 4, + kVersionFieldNumber = 1, + }; + // repeated .securegcm.Ukey2ClientInit.CipherCommitment cipher_commitments = 3; + int cipher_commitments_size() const; + private: + int _internal_cipher_commitments_size() const; + public: + void clear_cipher_commitments(); + ::securegcm::Ukey2ClientInit_CipherCommitment* mutable_cipher_commitments(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::securegcm::Ukey2ClientInit_CipherCommitment >* + mutable_cipher_commitments(); + private: + const ::securegcm::Ukey2ClientInit_CipherCommitment& _internal_cipher_commitments(int index) const; + ::securegcm::Ukey2ClientInit_CipherCommitment* _internal_add_cipher_commitments(); + public: + const ::securegcm::Ukey2ClientInit_CipherCommitment& cipher_commitments(int index) const; + ::securegcm::Ukey2ClientInit_CipherCommitment* add_cipher_commitments(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::securegcm::Ukey2ClientInit_CipherCommitment >& + cipher_commitments() const; + + // optional bytes random = 2; + bool has_random() const; + private: + bool _internal_has_random() const; + public: + void clear_random(); + const std::string& random() const; + template + void set_random(ArgT0&& arg0, ArgT... args); + std::string* mutable_random(); + PROTOBUF_NODISCARD std::string* release_random(); + void set_allocated_random(std::string* random); + private: + const std::string& _internal_random() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_random(const std::string& value); + std::string* _internal_mutable_random(); + public: + + // optional string next_protocol = 4; + bool has_next_protocol() const; + private: + bool _internal_has_next_protocol() const; + public: + void clear_next_protocol(); + const std::string& next_protocol() const; + template + void set_next_protocol(ArgT0&& arg0, ArgT... args); + std::string* mutable_next_protocol(); + PROTOBUF_NODISCARD std::string* release_next_protocol(); + void set_allocated_next_protocol(std::string* next_protocol); + private: + const std::string& _internal_next_protocol() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_next_protocol(const std::string& value); + std::string* _internal_mutable_next_protocol(); + public: + + // optional int32 version = 1; + bool has_version() const; + private: + bool _internal_has_version() const; + public: + void clear_version(); + int32_t version() const; + void set_version(int32_t value); + private: + int32_t _internal_version() const; + void _internal_set_version(int32_t value); + public: + + // @@protoc_insertion_point(class_scope:securegcm.Ukey2ClientInit) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::securegcm::Ukey2ClientInit_CipherCommitment > cipher_commitments_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr random_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr next_protocol_; + int32_t version_; + friend struct ::TableStruct_proto_2fukey_2eproto; +}; +// ------------------------------------------------------------------- + +class Ukey2ServerInit final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:securegcm.Ukey2ServerInit) */ { + public: + inline Ukey2ServerInit() : Ukey2ServerInit(nullptr) {} + ~Ukey2ServerInit() override; + explicit constexpr Ukey2ServerInit(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + Ukey2ServerInit(const Ukey2ServerInit& from); + Ukey2ServerInit(Ukey2ServerInit&& from) noexcept + : Ukey2ServerInit() { + *this = ::std::move(from); + } + + inline Ukey2ServerInit& operator=(const Ukey2ServerInit& from) { + CopyFrom(from); + return *this; + } + inline Ukey2ServerInit& operator=(Ukey2ServerInit&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const Ukey2ServerInit& default_instance() { + return *internal_default_instance(); + } + static inline const Ukey2ServerInit* internal_default_instance() { + return reinterpret_cast( + &_Ukey2ServerInit_default_instance_); + } + static constexpr int kIndexInFileMessages = + 4; + + friend void swap(Ukey2ServerInit& a, Ukey2ServerInit& b) { + a.Swap(&b); + } + inline void Swap(Ukey2ServerInit* 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(Ukey2ServerInit* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + Ukey2ServerInit* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const Ukey2ServerInit& from); + void MergeFrom(const Ukey2ServerInit& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(Ukey2ServerInit* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "securegcm.Ukey2ServerInit"; + } + protected: + explicit Ukey2ServerInit(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kRandomFieldNumber = 2, + kPublicKeyFieldNumber = 4, + kVersionFieldNumber = 1, + kHandshakeCipherFieldNumber = 3, + }; + // optional bytes random = 2; + bool has_random() const; + private: + bool _internal_has_random() const; + public: + void clear_random(); + const std::string& random() const; + template + void set_random(ArgT0&& arg0, ArgT... args); + std::string* mutable_random(); + PROTOBUF_NODISCARD std::string* release_random(); + void set_allocated_random(std::string* random); + private: + const std::string& _internal_random() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_random(const std::string& value); + std::string* _internal_mutable_random(); + public: + + // optional bytes public_key = 4; + bool has_public_key() const; + private: + bool _internal_has_public_key() const; + public: + void clear_public_key(); + const std::string& public_key() const; + template + void set_public_key(ArgT0&& arg0, ArgT... args); + std::string* mutable_public_key(); + PROTOBUF_NODISCARD std::string* release_public_key(); + void set_allocated_public_key(std::string* public_key); + private: + const std::string& _internal_public_key() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_public_key(const std::string& value); + std::string* _internal_mutable_public_key(); + public: + + // optional int32 version = 1; + bool has_version() const; + private: + bool _internal_has_version() const; + public: + void clear_version(); + int32_t version() const; + void set_version(int32_t value); + private: + int32_t _internal_version() const; + void _internal_set_version(int32_t value); + public: + + // optional .securegcm.Ukey2HandshakeCipher handshake_cipher = 3; + bool has_handshake_cipher() const; + private: + bool _internal_has_handshake_cipher() const; + public: + void clear_handshake_cipher(); + ::securegcm::Ukey2HandshakeCipher handshake_cipher() const; + void set_handshake_cipher(::securegcm::Ukey2HandshakeCipher value); + private: + ::securegcm::Ukey2HandshakeCipher _internal_handshake_cipher() const; + void _internal_set_handshake_cipher(::securegcm::Ukey2HandshakeCipher value); + public: + + // @@protoc_insertion_point(class_scope:securegcm.Ukey2ServerInit) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr random_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr public_key_; + int32_t version_; + int handshake_cipher_; + friend struct ::TableStruct_proto_2fukey_2eproto; +}; +// ------------------------------------------------------------------- + +class Ukey2ClientFinished final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:securegcm.Ukey2ClientFinished) */ { + public: + inline Ukey2ClientFinished() : Ukey2ClientFinished(nullptr) {} + ~Ukey2ClientFinished() override; + explicit constexpr Ukey2ClientFinished(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + Ukey2ClientFinished(const Ukey2ClientFinished& from); + Ukey2ClientFinished(Ukey2ClientFinished&& from) noexcept + : Ukey2ClientFinished() { + *this = ::std::move(from); + } + + inline Ukey2ClientFinished& operator=(const Ukey2ClientFinished& from) { + CopyFrom(from); + return *this; + } + inline Ukey2ClientFinished& operator=(Ukey2ClientFinished&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const Ukey2ClientFinished& default_instance() { + return *internal_default_instance(); + } + static inline const Ukey2ClientFinished* internal_default_instance() { + return reinterpret_cast( + &_Ukey2ClientFinished_default_instance_); + } + static constexpr int kIndexInFileMessages = + 5; + + friend void swap(Ukey2ClientFinished& a, Ukey2ClientFinished& b) { + a.Swap(&b); + } + inline void Swap(Ukey2ClientFinished* 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(Ukey2ClientFinished* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + Ukey2ClientFinished* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const Ukey2ClientFinished& from); + void MergeFrom(const Ukey2ClientFinished& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(Ukey2ClientFinished* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "securegcm.Ukey2ClientFinished"; + } + protected: + explicit Ukey2ClientFinished(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kPublicKeyFieldNumber = 1, + }; + // optional bytes public_key = 1; + bool has_public_key() const; + private: + bool _internal_has_public_key() const; + public: + void clear_public_key(); + const std::string& public_key() const; + template + void set_public_key(ArgT0&& arg0, ArgT... args); + std::string* mutable_public_key(); + PROTOBUF_NODISCARD std::string* release_public_key(); + void set_allocated_public_key(std::string* public_key); + private: + const std::string& _internal_public_key() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_public_key(const std::string& value); + std::string* _internal_mutable_public_key(); + public: + + // @@protoc_insertion_point(class_scope:securegcm.Ukey2ClientFinished) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr public_key_; + friend struct ::TableStruct_proto_2fukey_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// Ukey2Message + +// optional .securegcm.Ukey2Message.Type message_type = 1; +inline bool Ukey2Message::_internal_has_message_type() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool Ukey2Message::has_message_type() const { + return _internal_has_message_type(); +} +inline void Ukey2Message::clear_message_type() { + message_type_ = 0; + _has_bits_[0] &= ~0x00000002u; +} +inline ::securegcm::Ukey2Message_Type Ukey2Message::_internal_message_type() const { + return static_cast< ::securegcm::Ukey2Message_Type >(message_type_); +} +inline ::securegcm::Ukey2Message_Type Ukey2Message::message_type() const { + // @@protoc_insertion_point(field_get:securegcm.Ukey2Message.message_type) + return _internal_message_type(); +} +inline void Ukey2Message::_internal_set_message_type(::securegcm::Ukey2Message_Type value) { + assert(::securegcm::Ukey2Message_Type_IsValid(value)); + _has_bits_[0] |= 0x00000002u; + message_type_ = value; +} +inline void Ukey2Message::set_message_type(::securegcm::Ukey2Message_Type value) { + _internal_set_message_type(value); + // @@protoc_insertion_point(field_set:securegcm.Ukey2Message.message_type) +} + +// optional bytes message_data = 2; +inline bool Ukey2Message::_internal_has_message_data() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool Ukey2Message::has_message_data() const { + return _internal_has_message_data(); +} +inline void Ukey2Message::clear_message_data() { + message_data_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& Ukey2Message::message_data() const { + // @@protoc_insertion_point(field_get:securegcm.Ukey2Message.message_data) + return _internal_message_data(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void Ukey2Message::set_message_data(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + message_data_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:securegcm.Ukey2Message.message_data) +} +inline std::string* Ukey2Message::mutable_message_data() { + std::string* _s = _internal_mutable_message_data(); + // @@protoc_insertion_point(field_mutable:securegcm.Ukey2Message.message_data) + return _s; +} +inline const std::string& Ukey2Message::_internal_message_data() const { + return message_data_.Get(); +} +inline void Ukey2Message::_internal_set_message_data(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + message_data_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* Ukey2Message::_internal_mutable_message_data() { + _has_bits_[0] |= 0x00000001u; + return message_data_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* Ukey2Message::release_message_data() { + // @@protoc_insertion_point(field_release:securegcm.Ukey2Message.message_data) + if (!_internal_has_message_data()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = message_data_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (message_data_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + message_data_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void Ukey2Message::set_allocated_message_data(std::string* message_data) { + if (message_data != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + message_data_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), message_data, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (message_data_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + message_data_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:securegcm.Ukey2Message.message_data) +} + +// ------------------------------------------------------------------- + +// Ukey2Alert + +// optional .securegcm.Ukey2Alert.AlertType type = 1; +inline bool Ukey2Alert::_internal_has_type() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool Ukey2Alert::has_type() const { + return _internal_has_type(); +} +inline void Ukey2Alert::clear_type() { + type_ = 1; + _has_bits_[0] &= ~0x00000002u; +} +inline ::securegcm::Ukey2Alert_AlertType Ukey2Alert::_internal_type() const { + return static_cast< ::securegcm::Ukey2Alert_AlertType >(type_); +} +inline ::securegcm::Ukey2Alert_AlertType Ukey2Alert::type() const { + // @@protoc_insertion_point(field_get:securegcm.Ukey2Alert.type) + return _internal_type(); +} +inline void Ukey2Alert::_internal_set_type(::securegcm::Ukey2Alert_AlertType value) { + assert(::securegcm::Ukey2Alert_AlertType_IsValid(value)); + _has_bits_[0] |= 0x00000002u; + type_ = value; +} +inline void Ukey2Alert::set_type(::securegcm::Ukey2Alert_AlertType value) { + _internal_set_type(value); + // @@protoc_insertion_point(field_set:securegcm.Ukey2Alert.type) +} + +// optional string error_message = 2; +inline bool Ukey2Alert::_internal_has_error_message() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool Ukey2Alert::has_error_message() const { + return _internal_has_error_message(); +} +inline void Ukey2Alert::clear_error_message() { + error_message_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& Ukey2Alert::error_message() const { + // @@protoc_insertion_point(field_get:securegcm.Ukey2Alert.error_message) + return _internal_error_message(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void Ukey2Alert::set_error_message(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + error_message_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:securegcm.Ukey2Alert.error_message) +} +inline std::string* Ukey2Alert::mutable_error_message() { + std::string* _s = _internal_mutable_error_message(); + // @@protoc_insertion_point(field_mutable:securegcm.Ukey2Alert.error_message) + return _s; +} +inline const std::string& Ukey2Alert::_internal_error_message() const { + return error_message_.Get(); +} +inline void Ukey2Alert::_internal_set_error_message(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + error_message_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* Ukey2Alert::_internal_mutable_error_message() { + _has_bits_[0] |= 0x00000001u; + return error_message_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* Ukey2Alert::release_error_message() { + // @@protoc_insertion_point(field_release:securegcm.Ukey2Alert.error_message) + if (!_internal_has_error_message()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = error_message_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (error_message_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + error_message_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void Ukey2Alert::set_allocated_error_message(std::string* error_message) { + if (error_message != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + error_message_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), error_message, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (error_message_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + error_message_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:securegcm.Ukey2Alert.error_message) +} + +// ------------------------------------------------------------------- + +// Ukey2ClientInit_CipherCommitment + +// optional .securegcm.Ukey2HandshakeCipher handshake_cipher = 1; +inline bool Ukey2ClientInit_CipherCommitment::_internal_has_handshake_cipher() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool Ukey2ClientInit_CipherCommitment::has_handshake_cipher() const { + return _internal_has_handshake_cipher(); +} +inline void Ukey2ClientInit_CipherCommitment::clear_handshake_cipher() { + handshake_cipher_ = 0; + _has_bits_[0] &= ~0x00000002u; +} +inline ::securegcm::Ukey2HandshakeCipher Ukey2ClientInit_CipherCommitment::_internal_handshake_cipher() const { + return static_cast< ::securegcm::Ukey2HandshakeCipher >(handshake_cipher_); +} +inline ::securegcm::Ukey2HandshakeCipher Ukey2ClientInit_CipherCommitment::handshake_cipher() const { + // @@protoc_insertion_point(field_get:securegcm.Ukey2ClientInit.CipherCommitment.handshake_cipher) + return _internal_handshake_cipher(); +} +inline void Ukey2ClientInit_CipherCommitment::_internal_set_handshake_cipher(::securegcm::Ukey2HandshakeCipher value) { + assert(::securegcm::Ukey2HandshakeCipher_IsValid(value)); + _has_bits_[0] |= 0x00000002u; + handshake_cipher_ = value; +} +inline void Ukey2ClientInit_CipherCommitment::set_handshake_cipher(::securegcm::Ukey2HandshakeCipher value) { + _internal_set_handshake_cipher(value); + // @@protoc_insertion_point(field_set:securegcm.Ukey2ClientInit.CipherCommitment.handshake_cipher) +} + +// optional bytes commitment = 2; +inline bool Ukey2ClientInit_CipherCommitment::_internal_has_commitment() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool Ukey2ClientInit_CipherCommitment::has_commitment() const { + return _internal_has_commitment(); +} +inline void Ukey2ClientInit_CipherCommitment::clear_commitment() { + commitment_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& Ukey2ClientInit_CipherCommitment::commitment() const { + // @@protoc_insertion_point(field_get:securegcm.Ukey2ClientInit.CipherCommitment.commitment) + return _internal_commitment(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void Ukey2ClientInit_CipherCommitment::set_commitment(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + commitment_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:securegcm.Ukey2ClientInit.CipherCommitment.commitment) +} +inline std::string* Ukey2ClientInit_CipherCommitment::mutable_commitment() { + std::string* _s = _internal_mutable_commitment(); + // @@protoc_insertion_point(field_mutable:securegcm.Ukey2ClientInit.CipherCommitment.commitment) + return _s; +} +inline const std::string& Ukey2ClientInit_CipherCommitment::_internal_commitment() const { + return commitment_.Get(); +} +inline void Ukey2ClientInit_CipherCommitment::_internal_set_commitment(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + commitment_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* Ukey2ClientInit_CipherCommitment::_internal_mutable_commitment() { + _has_bits_[0] |= 0x00000001u; + return commitment_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* Ukey2ClientInit_CipherCommitment::release_commitment() { + // @@protoc_insertion_point(field_release:securegcm.Ukey2ClientInit.CipherCommitment.commitment) + if (!_internal_has_commitment()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = commitment_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (commitment_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + commitment_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void Ukey2ClientInit_CipherCommitment::set_allocated_commitment(std::string* commitment) { + if (commitment != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + commitment_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), commitment, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (commitment_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + commitment_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:securegcm.Ukey2ClientInit.CipherCommitment.commitment) +} + +// ------------------------------------------------------------------- + +// Ukey2ClientInit + +// optional int32 version = 1; +inline bool Ukey2ClientInit::_internal_has_version() const { + bool value = (_has_bits_[0] & 0x00000004u) != 0; + return value; +} +inline bool Ukey2ClientInit::has_version() const { + return _internal_has_version(); +} +inline void Ukey2ClientInit::clear_version() { + version_ = 0; + _has_bits_[0] &= ~0x00000004u; +} +inline int32_t Ukey2ClientInit::_internal_version() const { + return version_; +} +inline int32_t Ukey2ClientInit::version() const { + // @@protoc_insertion_point(field_get:securegcm.Ukey2ClientInit.version) + return _internal_version(); +} +inline void Ukey2ClientInit::_internal_set_version(int32_t value) { + _has_bits_[0] |= 0x00000004u; + version_ = value; +} +inline void Ukey2ClientInit::set_version(int32_t value) { + _internal_set_version(value); + // @@protoc_insertion_point(field_set:securegcm.Ukey2ClientInit.version) +} + +// optional bytes random = 2; +inline bool Ukey2ClientInit::_internal_has_random() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool Ukey2ClientInit::has_random() const { + return _internal_has_random(); +} +inline void Ukey2ClientInit::clear_random() { + random_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& Ukey2ClientInit::random() const { + // @@protoc_insertion_point(field_get:securegcm.Ukey2ClientInit.random) + return _internal_random(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void Ukey2ClientInit::set_random(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + random_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:securegcm.Ukey2ClientInit.random) +} +inline std::string* Ukey2ClientInit::mutable_random() { + std::string* _s = _internal_mutable_random(); + // @@protoc_insertion_point(field_mutable:securegcm.Ukey2ClientInit.random) + return _s; +} +inline const std::string& Ukey2ClientInit::_internal_random() const { + return random_.Get(); +} +inline void Ukey2ClientInit::_internal_set_random(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + random_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* Ukey2ClientInit::_internal_mutable_random() { + _has_bits_[0] |= 0x00000001u; + return random_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* Ukey2ClientInit::release_random() { + // @@protoc_insertion_point(field_release:securegcm.Ukey2ClientInit.random) + if (!_internal_has_random()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = random_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (random_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + random_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void Ukey2ClientInit::set_allocated_random(std::string* random) { + if (random != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + random_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), random, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (random_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + random_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:securegcm.Ukey2ClientInit.random) +} + +// repeated .securegcm.Ukey2ClientInit.CipherCommitment cipher_commitments = 3; +inline int Ukey2ClientInit::_internal_cipher_commitments_size() const { + return cipher_commitments_.size(); +} +inline int Ukey2ClientInit::cipher_commitments_size() const { + return _internal_cipher_commitments_size(); +} +inline void Ukey2ClientInit::clear_cipher_commitments() { + cipher_commitments_.Clear(); +} +inline ::securegcm::Ukey2ClientInit_CipherCommitment* Ukey2ClientInit::mutable_cipher_commitments(int index) { + // @@protoc_insertion_point(field_mutable:securegcm.Ukey2ClientInit.cipher_commitments) + return cipher_commitments_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::securegcm::Ukey2ClientInit_CipherCommitment >* +Ukey2ClientInit::mutable_cipher_commitments() { + // @@protoc_insertion_point(field_mutable_list:securegcm.Ukey2ClientInit.cipher_commitments) + return &cipher_commitments_; +} +inline const ::securegcm::Ukey2ClientInit_CipherCommitment& Ukey2ClientInit::_internal_cipher_commitments(int index) const { + return cipher_commitments_.Get(index); +} +inline const ::securegcm::Ukey2ClientInit_CipherCommitment& Ukey2ClientInit::cipher_commitments(int index) const { + // @@protoc_insertion_point(field_get:securegcm.Ukey2ClientInit.cipher_commitments) + return _internal_cipher_commitments(index); +} +inline ::securegcm::Ukey2ClientInit_CipherCommitment* Ukey2ClientInit::_internal_add_cipher_commitments() { + return cipher_commitments_.Add(); +} +inline ::securegcm::Ukey2ClientInit_CipherCommitment* Ukey2ClientInit::add_cipher_commitments() { + ::securegcm::Ukey2ClientInit_CipherCommitment* _add = _internal_add_cipher_commitments(); + // @@protoc_insertion_point(field_add:securegcm.Ukey2ClientInit.cipher_commitments) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::securegcm::Ukey2ClientInit_CipherCommitment >& +Ukey2ClientInit::cipher_commitments() const { + // @@protoc_insertion_point(field_list:securegcm.Ukey2ClientInit.cipher_commitments) + return cipher_commitments_; +} + +// optional string next_protocol = 4; +inline bool Ukey2ClientInit::_internal_has_next_protocol() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool Ukey2ClientInit::has_next_protocol() const { + return _internal_has_next_protocol(); +} +inline void Ukey2ClientInit::clear_next_protocol() { + next_protocol_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000002u; +} +inline const std::string& Ukey2ClientInit::next_protocol() const { + // @@protoc_insertion_point(field_get:securegcm.Ukey2ClientInit.next_protocol) + return _internal_next_protocol(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void Ukey2ClientInit::set_next_protocol(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000002u; + next_protocol_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:securegcm.Ukey2ClientInit.next_protocol) +} +inline std::string* Ukey2ClientInit::mutable_next_protocol() { + std::string* _s = _internal_mutable_next_protocol(); + // @@protoc_insertion_point(field_mutable:securegcm.Ukey2ClientInit.next_protocol) + return _s; +} +inline const std::string& Ukey2ClientInit::_internal_next_protocol() const { + return next_protocol_.Get(); +} +inline void Ukey2ClientInit::_internal_set_next_protocol(const std::string& value) { + _has_bits_[0] |= 0x00000002u; + next_protocol_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* Ukey2ClientInit::_internal_mutable_next_protocol() { + _has_bits_[0] |= 0x00000002u; + return next_protocol_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* Ukey2ClientInit::release_next_protocol() { + // @@protoc_insertion_point(field_release:securegcm.Ukey2ClientInit.next_protocol) + if (!_internal_has_next_protocol()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000002u; + auto* p = next_protocol_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (next_protocol_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + next_protocol_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void Ukey2ClientInit::set_allocated_next_protocol(std::string* next_protocol) { + if (next_protocol != nullptr) { + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + next_protocol_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), next_protocol, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (next_protocol_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + next_protocol_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:securegcm.Ukey2ClientInit.next_protocol) +} + +// ------------------------------------------------------------------- + +// Ukey2ServerInit + +// optional int32 version = 1; +inline bool Ukey2ServerInit::_internal_has_version() const { + bool value = (_has_bits_[0] & 0x00000004u) != 0; + return value; +} +inline bool Ukey2ServerInit::has_version() const { + return _internal_has_version(); +} +inline void Ukey2ServerInit::clear_version() { + version_ = 0; + _has_bits_[0] &= ~0x00000004u; +} +inline int32_t Ukey2ServerInit::_internal_version() const { + return version_; +} +inline int32_t Ukey2ServerInit::version() const { + // @@protoc_insertion_point(field_get:securegcm.Ukey2ServerInit.version) + return _internal_version(); +} +inline void Ukey2ServerInit::_internal_set_version(int32_t value) { + _has_bits_[0] |= 0x00000004u; + version_ = value; +} +inline void Ukey2ServerInit::set_version(int32_t value) { + _internal_set_version(value); + // @@protoc_insertion_point(field_set:securegcm.Ukey2ServerInit.version) +} + +// optional bytes random = 2; +inline bool Ukey2ServerInit::_internal_has_random() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool Ukey2ServerInit::has_random() const { + return _internal_has_random(); +} +inline void Ukey2ServerInit::clear_random() { + random_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& Ukey2ServerInit::random() const { + // @@protoc_insertion_point(field_get:securegcm.Ukey2ServerInit.random) + return _internal_random(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void Ukey2ServerInit::set_random(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + random_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:securegcm.Ukey2ServerInit.random) +} +inline std::string* Ukey2ServerInit::mutable_random() { + std::string* _s = _internal_mutable_random(); + // @@protoc_insertion_point(field_mutable:securegcm.Ukey2ServerInit.random) + return _s; +} +inline const std::string& Ukey2ServerInit::_internal_random() const { + return random_.Get(); +} +inline void Ukey2ServerInit::_internal_set_random(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + random_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* Ukey2ServerInit::_internal_mutable_random() { + _has_bits_[0] |= 0x00000001u; + return random_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* Ukey2ServerInit::release_random() { + // @@protoc_insertion_point(field_release:securegcm.Ukey2ServerInit.random) + if (!_internal_has_random()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = random_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (random_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + random_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void Ukey2ServerInit::set_allocated_random(std::string* random) { + if (random != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + random_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), random, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (random_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + random_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:securegcm.Ukey2ServerInit.random) +} + +// optional .securegcm.Ukey2HandshakeCipher handshake_cipher = 3; +inline bool Ukey2ServerInit::_internal_has_handshake_cipher() const { + bool value = (_has_bits_[0] & 0x00000008u) != 0; + return value; +} +inline bool Ukey2ServerInit::has_handshake_cipher() const { + return _internal_has_handshake_cipher(); +} +inline void Ukey2ServerInit::clear_handshake_cipher() { + handshake_cipher_ = 0; + _has_bits_[0] &= ~0x00000008u; +} +inline ::securegcm::Ukey2HandshakeCipher Ukey2ServerInit::_internal_handshake_cipher() const { + return static_cast< ::securegcm::Ukey2HandshakeCipher >(handshake_cipher_); +} +inline ::securegcm::Ukey2HandshakeCipher Ukey2ServerInit::handshake_cipher() const { + // @@protoc_insertion_point(field_get:securegcm.Ukey2ServerInit.handshake_cipher) + return _internal_handshake_cipher(); +} +inline void Ukey2ServerInit::_internal_set_handshake_cipher(::securegcm::Ukey2HandshakeCipher value) { + assert(::securegcm::Ukey2HandshakeCipher_IsValid(value)); + _has_bits_[0] |= 0x00000008u; + handshake_cipher_ = value; +} +inline void Ukey2ServerInit::set_handshake_cipher(::securegcm::Ukey2HandshakeCipher value) { + _internal_set_handshake_cipher(value); + // @@protoc_insertion_point(field_set:securegcm.Ukey2ServerInit.handshake_cipher) +} + +// optional bytes public_key = 4; +inline bool Ukey2ServerInit::_internal_has_public_key() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool Ukey2ServerInit::has_public_key() const { + return _internal_has_public_key(); +} +inline void Ukey2ServerInit::clear_public_key() { + public_key_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000002u; +} +inline const std::string& Ukey2ServerInit::public_key() const { + // @@protoc_insertion_point(field_get:securegcm.Ukey2ServerInit.public_key) + return _internal_public_key(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void Ukey2ServerInit::set_public_key(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000002u; + public_key_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:securegcm.Ukey2ServerInit.public_key) +} +inline std::string* Ukey2ServerInit::mutable_public_key() { + std::string* _s = _internal_mutable_public_key(); + // @@protoc_insertion_point(field_mutable:securegcm.Ukey2ServerInit.public_key) + return _s; +} +inline const std::string& Ukey2ServerInit::_internal_public_key() const { + return public_key_.Get(); +} +inline void Ukey2ServerInit::_internal_set_public_key(const std::string& value) { + _has_bits_[0] |= 0x00000002u; + public_key_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* Ukey2ServerInit::_internal_mutable_public_key() { + _has_bits_[0] |= 0x00000002u; + return public_key_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* Ukey2ServerInit::release_public_key() { + // @@protoc_insertion_point(field_release:securegcm.Ukey2ServerInit.public_key) + if (!_internal_has_public_key()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000002u; + auto* p = public_key_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (public_key_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + public_key_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void Ukey2ServerInit::set_allocated_public_key(std::string* public_key) { + if (public_key != nullptr) { + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + public_key_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), public_key, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (public_key_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + public_key_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:securegcm.Ukey2ServerInit.public_key) +} + +// ------------------------------------------------------------------- + +// Ukey2ClientFinished + +// optional bytes public_key = 1; +inline bool Ukey2ClientFinished::_internal_has_public_key() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool Ukey2ClientFinished::has_public_key() const { + return _internal_has_public_key(); +} +inline void Ukey2ClientFinished::clear_public_key() { + public_key_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& Ukey2ClientFinished::public_key() const { + // @@protoc_insertion_point(field_get:securegcm.Ukey2ClientFinished.public_key) + return _internal_public_key(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void Ukey2ClientFinished::set_public_key(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + public_key_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:securegcm.Ukey2ClientFinished.public_key) +} +inline std::string* Ukey2ClientFinished::mutable_public_key() { + std::string* _s = _internal_mutable_public_key(); + // @@protoc_insertion_point(field_mutable:securegcm.Ukey2ClientFinished.public_key) + return _s; +} +inline const std::string& Ukey2ClientFinished::_internal_public_key() const { + return public_key_.Get(); +} +inline void Ukey2ClientFinished::_internal_set_public_key(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + public_key_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* Ukey2ClientFinished::_internal_mutable_public_key() { + _has_bits_[0] |= 0x00000001u; + return public_key_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* Ukey2ClientFinished::release_public_key() { + // @@protoc_insertion_point(field_release:securegcm.Ukey2ClientFinished.public_key) + if (!_internal_has_public_key()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = public_key_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (public_key_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + public_key_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void Ukey2ClientFinished::set_allocated_public_key(std::string* public_key) { + if (public_key != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + public_key_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), public_key, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (public_key_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + public_key_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:securegcm.Ukey2ClientFinished.public_key) +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace securegcm + +PROTOBUF_NAMESPACE_OPEN + +template <> struct is_proto_enum< ::securegcm::Ukey2Message_Type> : ::std::true_type {}; +template <> struct is_proto_enum< ::securegcm::Ukey2Alert_AlertType> : ::std::true_type {}; +template <> struct is_proto_enum< ::securegcm::Ukey2HandshakeCipher> : ::std::true_type {}; + +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_proto_2fukey_2eproto diff --git a/third_party/ukey2/include/proto/ukey.pb.h b/third_party/ukey2/include/proto/ukey.pb.h new file mode 100644 index 00000000..8c316a30 --- /dev/null +++ b/third_party/ukey2/include/proto/ukey.pb.h @@ -0,0 +1,2085 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: proto/ukey.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_proto_2fukey_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_proto_2fukey_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3019000 +#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 3019004 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_proto_2fukey_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_proto_2fukey_2eproto { + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::AuxiliaryParseTableField aux[] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[6] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[]; + static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[]; + static const uint32_t offsets[]; +}; +namespace securegcm { +class Ukey2Alert; +struct Ukey2AlertDefaultTypeInternal; +extern Ukey2AlertDefaultTypeInternal _Ukey2Alert_default_instance_; +class Ukey2ClientFinished; +struct Ukey2ClientFinishedDefaultTypeInternal; +extern Ukey2ClientFinishedDefaultTypeInternal _Ukey2ClientFinished_default_instance_; +class Ukey2ClientInit; +struct Ukey2ClientInitDefaultTypeInternal; +extern Ukey2ClientInitDefaultTypeInternal _Ukey2ClientInit_default_instance_; +class Ukey2ClientInit_CipherCommitment; +struct Ukey2ClientInit_CipherCommitmentDefaultTypeInternal; +extern Ukey2ClientInit_CipherCommitmentDefaultTypeInternal _Ukey2ClientInit_CipherCommitment_default_instance_; +class Ukey2Message; +struct Ukey2MessageDefaultTypeInternal; +extern Ukey2MessageDefaultTypeInternal _Ukey2Message_default_instance_; +class Ukey2ServerInit; +struct Ukey2ServerInitDefaultTypeInternal; +extern Ukey2ServerInitDefaultTypeInternal _Ukey2ServerInit_default_instance_; +} // namespace securegcm +PROTOBUF_NAMESPACE_OPEN +template<> ::securegcm::Ukey2Alert* Arena::CreateMaybeMessage<::securegcm::Ukey2Alert>(Arena*); +template<> ::securegcm::Ukey2ClientFinished* Arena::CreateMaybeMessage<::securegcm::Ukey2ClientFinished>(Arena*); +template<> ::securegcm::Ukey2ClientInit* Arena::CreateMaybeMessage<::securegcm::Ukey2ClientInit>(Arena*); +template<> ::securegcm::Ukey2ClientInit_CipherCommitment* Arena::CreateMaybeMessage<::securegcm::Ukey2ClientInit_CipherCommitment>(Arena*); +template<> ::securegcm::Ukey2Message* Arena::CreateMaybeMessage<::securegcm::Ukey2Message>(Arena*); +template<> ::securegcm::Ukey2ServerInit* Arena::CreateMaybeMessage<::securegcm::Ukey2ServerInit>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace securegcm { + +enum Ukey2Message_Type : int { + Ukey2Message_Type_UNKNOWN_DO_NOT_USE = 0, + Ukey2Message_Type_ALERT = 1, + Ukey2Message_Type_CLIENT_INIT = 2, + Ukey2Message_Type_SERVER_INIT = 3, + Ukey2Message_Type_CLIENT_FINISH = 4 +}; +bool Ukey2Message_Type_IsValid(int value); +constexpr Ukey2Message_Type Ukey2Message_Type_Type_MIN = Ukey2Message_Type_UNKNOWN_DO_NOT_USE; +constexpr Ukey2Message_Type Ukey2Message_Type_Type_MAX = Ukey2Message_Type_CLIENT_FINISH; +constexpr int Ukey2Message_Type_Type_ARRAYSIZE = Ukey2Message_Type_Type_MAX + 1; + +const std::string& Ukey2Message_Type_Name(Ukey2Message_Type value); +template +inline const std::string& Ukey2Message_Type_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function Ukey2Message_Type_Name."); + return Ukey2Message_Type_Name(static_cast(enum_t_value)); +} +bool Ukey2Message_Type_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, Ukey2Message_Type* value); +enum Ukey2Alert_AlertType : int { + Ukey2Alert_AlertType_BAD_MESSAGE = 1, + Ukey2Alert_AlertType_BAD_MESSAGE_TYPE = 2, + Ukey2Alert_AlertType_INCORRECT_MESSAGE = 3, + Ukey2Alert_AlertType_BAD_MESSAGE_DATA = 4, + Ukey2Alert_AlertType_BAD_VERSION = 100, + Ukey2Alert_AlertType_BAD_RANDOM = 101, + Ukey2Alert_AlertType_BAD_HANDSHAKE_CIPHER = 102, + Ukey2Alert_AlertType_BAD_NEXT_PROTOCOL = 103, + Ukey2Alert_AlertType_BAD_PUBLIC_KEY = 104, + Ukey2Alert_AlertType_INTERNAL_ERROR = 200 +}; +bool Ukey2Alert_AlertType_IsValid(int value); +constexpr Ukey2Alert_AlertType Ukey2Alert_AlertType_AlertType_MIN = Ukey2Alert_AlertType_BAD_MESSAGE; +constexpr Ukey2Alert_AlertType Ukey2Alert_AlertType_AlertType_MAX = Ukey2Alert_AlertType_INTERNAL_ERROR; +constexpr int Ukey2Alert_AlertType_AlertType_ARRAYSIZE = Ukey2Alert_AlertType_AlertType_MAX + 1; + +const std::string& Ukey2Alert_AlertType_Name(Ukey2Alert_AlertType value); +template +inline const std::string& Ukey2Alert_AlertType_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function Ukey2Alert_AlertType_Name."); + return Ukey2Alert_AlertType_Name(static_cast(enum_t_value)); +} +bool Ukey2Alert_AlertType_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, Ukey2Alert_AlertType* value); +enum Ukey2HandshakeCipher : int { + RESERVED = 0, + P256_SHA512 = 100, + CURVE25519_SHA512 = 200 +}; +bool Ukey2HandshakeCipher_IsValid(int value); +constexpr Ukey2HandshakeCipher Ukey2HandshakeCipher_MIN = RESERVED; +constexpr Ukey2HandshakeCipher Ukey2HandshakeCipher_MAX = CURVE25519_SHA512; +constexpr int Ukey2HandshakeCipher_ARRAYSIZE = Ukey2HandshakeCipher_MAX + 1; + +const std::string& Ukey2HandshakeCipher_Name(Ukey2HandshakeCipher value); +template +inline const std::string& Ukey2HandshakeCipher_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function Ukey2HandshakeCipher_Name."); + return Ukey2HandshakeCipher_Name(static_cast(enum_t_value)); +} +bool Ukey2HandshakeCipher_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, Ukey2HandshakeCipher* value); +// =================================================================== + +class Ukey2Message final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:securegcm.Ukey2Message) */ { + public: + inline Ukey2Message() : Ukey2Message(nullptr) {} + ~Ukey2Message() override; + explicit constexpr Ukey2Message(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + Ukey2Message(const Ukey2Message& from); + Ukey2Message(Ukey2Message&& from) noexcept + : Ukey2Message() { + *this = ::std::move(from); + } + + inline Ukey2Message& operator=(const Ukey2Message& from) { + CopyFrom(from); + return *this; + } + inline Ukey2Message& operator=(Ukey2Message&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const Ukey2Message& default_instance() { + return *internal_default_instance(); + } + static inline const Ukey2Message* internal_default_instance() { + return reinterpret_cast( + &_Ukey2Message_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(Ukey2Message& a, Ukey2Message& b) { + a.Swap(&b); + } + inline void Swap(Ukey2Message* 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(Ukey2Message* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + Ukey2Message* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const Ukey2Message& from); + void MergeFrom(const Ukey2Message& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(Ukey2Message* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "securegcm.Ukey2Message"; + } + protected: + explicit Ukey2Message(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + typedef Ukey2Message_Type Type; + static constexpr Type UNKNOWN_DO_NOT_USE = + Ukey2Message_Type_UNKNOWN_DO_NOT_USE; + static constexpr Type ALERT = + Ukey2Message_Type_ALERT; + static constexpr Type CLIENT_INIT = + Ukey2Message_Type_CLIENT_INIT; + static constexpr Type SERVER_INIT = + Ukey2Message_Type_SERVER_INIT; + static constexpr Type CLIENT_FINISH = + Ukey2Message_Type_CLIENT_FINISH; + static inline bool Type_IsValid(int value) { + return Ukey2Message_Type_IsValid(value); + } + static constexpr Type Type_MIN = + Ukey2Message_Type_Type_MIN; + static constexpr Type Type_MAX = + Ukey2Message_Type_Type_MAX; + static constexpr int Type_ARRAYSIZE = + Ukey2Message_Type_Type_ARRAYSIZE; + template + static inline const std::string& Type_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function Type_Name."); + return Ukey2Message_Type_Name(enum_t_value); + } + static inline bool Type_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name, + Type* value) { + return Ukey2Message_Type_Parse(name, value); + } + + // accessors ------------------------------------------------------- + + enum : int { + kMessageDataFieldNumber = 2, + kMessageTypeFieldNumber = 1, + }; + // optional bytes message_data = 2; + bool has_message_data() const; + private: + bool _internal_has_message_data() const; + public: + void clear_message_data(); + const std::string& message_data() const; + template + void set_message_data(ArgT0&& arg0, ArgT... args); + std::string* mutable_message_data(); + PROTOBUF_NODISCARD std::string* release_message_data(); + void set_allocated_message_data(std::string* message_data); + private: + const std::string& _internal_message_data() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_message_data(const std::string& value); + std::string* _internal_mutable_message_data(); + public: + + // optional .securegcm.Ukey2Message.Type message_type = 1; + bool has_message_type() const; + private: + bool _internal_has_message_type() const; + public: + void clear_message_type(); + ::securegcm::Ukey2Message_Type message_type() const; + void set_message_type(::securegcm::Ukey2Message_Type value); + private: + ::securegcm::Ukey2Message_Type _internal_message_type() const; + void _internal_set_message_type(::securegcm::Ukey2Message_Type value); + public: + + // @@protoc_insertion_point(class_scope:securegcm.Ukey2Message) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr message_data_; + int message_type_; + friend struct ::TableStruct_proto_2fukey_2eproto; +}; +// ------------------------------------------------------------------- + +class Ukey2Alert final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:securegcm.Ukey2Alert) */ { + public: + inline Ukey2Alert() : Ukey2Alert(nullptr) {} + ~Ukey2Alert() override; + explicit constexpr Ukey2Alert(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + Ukey2Alert(const Ukey2Alert& from); + Ukey2Alert(Ukey2Alert&& from) noexcept + : Ukey2Alert() { + *this = ::std::move(from); + } + + inline Ukey2Alert& operator=(const Ukey2Alert& from) { + CopyFrom(from); + return *this; + } + inline Ukey2Alert& operator=(Ukey2Alert&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const Ukey2Alert& default_instance() { + return *internal_default_instance(); + } + static inline const Ukey2Alert* internal_default_instance() { + return reinterpret_cast( + &_Ukey2Alert_default_instance_); + } + static constexpr int kIndexInFileMessages = + 1; + + friend void swap(Ukey2Alert& a, Ukey2Alert& b) { + a.Swap(&b); + } + inline void Swap(Ukey2Alert* 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(Ukey2Alert* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + Ukey2Alert* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const Ukey2Alert& from); + void MergeFrom(const Ukey2Alert& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(Ukey2Alert* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "securegcm.Ukey2Alert"; + } + protected: + explicit Ukey2Alert(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + typedef Ukey2Alert_AlertType AlertType; + static constexpr AlertType BAD_MESSAGE = + Ukey2Alert_AlertType_BAD_MESSAGE; + static constexpr AlertType BAD_MESSAGE_TYPE = + Ukey2Alert_AlertType_BAD_MESSAGE_TYPE; + static constexpr AlertType INCORRECT_MESSAGE = + Ukey2Alert_AlertType_INCORRECT_MESSAGE; + static constexpr AlertType BAD_MESSAGE_DATA = + Ukey2Alert_AlertType_BAD_MESSAGE_DATA; + static constexpr AlertType BAD_VERSION = + Ukey2Alert_AlertType_BAD_VERSION; + static constexpr AlertType BAD_RANDOM = + Ukey2Alert_AlertType_BAD_RANDOM; + static constexpr AlertType BAD_HANDSHAKE_CIPHER = + Ukey2Alert_AlertType_BAD_HANDSHAKE_CIPHER; + static constexpr AlertType BAD_NEXT_PROTOCOL = + Ukey2Alert_AlertType_BAD_NEXT_PROTOCOL; + static constexpr AlertType BAD_PUBLIC_KEY = + Ukey2Alert_AlertType_BAD_PUBLIC_KEY; + static constexpr AlertType INTERNAL_ERROR = + Ukey2Alert_AlertType_INTERNAL_ERROR; + static inline bool AlertType_IsValid(int value) { + return Ukey2Alert_AlertType_IsValid(value); + } + static constexpr AlertType AlertType_MIN = + Ukey2Alert_AlertType_AlertType_MIN; + static constexpr AlertType AlertType_MAX = + Ukey2Alert_AlertType_AlertType_MAX; + static constexpr int AlertType_ARRAYSIZE = + Ukey2Alert_AlertType_AlertType_ARRAYSIZE; + template + static inline const std::string& AlertType_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function AlertType_Name."); + return Ukey2Alert_AlertType_Name(enum_t_value); + } + static inline bool AlertType_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name, + AlertType* value) { + return Ukey2Alert_AlertType_Parse(name, value); + } + + // accessors ------------------------------------------------------- + + enum : int { + kErrorMessageFieldNumber = 2, + kTypeFieldNumber = 1, + }; + // optional string error_message = 2; + bool has_error_message() const; + private: + bool _internal_has_error_message() const; + public: + void clear_error_message(); + const std::string& error_message() const; + template + void set_error_message(ArgT0&& arg0, ArgT... args); + std::string* mutable_error_message(); + PROTOBUF_NODISCARD std::string* release_error_message(); + void set_allocated_error_message(std::string* error_message); + private: + const std::string& _internal_error_message() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_error_message(const std::string& value); + std::string* _internal_mutable_error_message(); + public: + + // optional .securegcm.Ukey2Alert.AlertType type = 1; + bool has_type() const; + private: + bool _internal_has_type() const; + public: + void clear_type(); + ::securegcm::Ukey2Alert_AlertType type() const; + void set_type(::securegcm::Ukey2Alert_AlertType value); + private: + ::securegcm::Ukey2Alert_AlertType _internal_type() const; + void _internal_set_type(::securegcm::Ukey2Alert_AlertType value); + public: + + // @@protoc_insertion_point(class_scope:securegcm.Ukey2Alert) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr error_message_; + int type_; + friend struct ::TableStruct_proto_2fukey_2eproto; +}; +// ------------------------------------------------------------------- + +class Ukey2ClientInit_CipherCommitment final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:securegcm.Ukey2ClientInit.CipherCommitment) */ { + public: + inline Ukey2ClientInit_CipherCommitment() : Ukey2ClientInit_CipherCommitment(nullptr) {} + ~Ukey2ClientInit_CipherCommitment() override; + explicit constexpr Ukey2ClientInit_CipherCommitment(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + Ukey2ClientInit_CipherCommitment(const Ukey2ClientInit_CipherCommitment& from); + Ukey2ClientInit_CipherCommitment(Ukey2ClientInit_CipherCommitment&& from) noexcept + : Ukey2ClientInit_CipherCommitment() { + *this = ::std::move(from); + } + + inline Ukey2ClientInit_CipherCommitment& operator=(const Ukey2ClientInit_CipherCommitment& from) { + CopyFrom(from); + return *this; + } + inline Ukey2ClientInit_CipherCommitment& operator=(Ukey2ClientInit_CipherCommitment&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const Ukey2ClientInit_CipherCommitment& default_instance() { + return *internal_default_instance(); + } + static inline const Ukey2ClientInit_CipherCommitment* internal_default_instance() { + return reinterpret_cast( + &_Ukey2ClientInit_CipherCommitment_default_instance_); + } + static constexpr int kIndexInFileMessages = + 2; + + friend void swap(Ukey2ClientInit_CipherCommitment& a, Ukey2ClientInit_CipherCommitment& b) { + a.Swap(&b); + } + inline void Swap(Ukey2ClientInit_CipherCommitment* 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(Ukey2ClientInit_CipherCommitment* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + Ukey2ClientInit_CipherCommitment* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const Ukey2ClientInit_CipherCommitment& from); + void MergeFrom(const Ukey2ClientInit_CipherCommitment& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(Ukey2ClientInit_CipherCommitment* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "securegcm.Ukey2ClientInit.CipherCommitment"; + } + protected: + explicit Ukey2ClientInit_CipherCommitment(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kCommitmentFieldNumber = 2, + kHandshakeCipherFieldNumber = 1, + }; + // optional bytes commitment = 2; + bool has_commitment() const; + private: + bool _internal_has_commitment() const; + public: + void clear_commitment(); + const std::string& commitment() const; + template + void set_commitment(ArgT0&& arg0, ArgT... args); + std::string* mutable_commitment(); + PROTOBUF_NODISCARD std::string* release_commitment(); + void set_allocated_commitment(std::string* commitment); + private: + const std::string& _internal_commitment() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_commitment(const std::string& value); + std::string* _internal_mutable_commitment(); + public: + + // optional .securegcm.Ukey2HandshakeCipher handshake_cipher = 1; + bool has_handshake_cipher() const; + private: + bool _internal_has_handshake_cipher() const; + public: + void clear_handshake_cipher(); + ::securegcm::Ukey2HandshakeCipher handshake_cipher() const; + void set_handshake_cipher(::securegcm::Ukey2HandshakeCipher value); + private: + ::securegcm::Ukey2HandshakeCipher _internal_handshake_cipher() const; + void _internal_set_handshake_cipher(::securegcm::Ukey2HandshakeCipher value); + public: + + // @@protoc_insertion_point(class_scope:securegcm.Ukey2ClientInit.CipherCommitment) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr commitment_; + int handshake_cipher_; + friend struct ::TableStruct_proto_2fukey_2eproto; +}; +// ------------------------------------------------------------------- + +class Ukey2ClientInit final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:securegcm.Ukey2ClientInit) */ { + public: + inline Ukey2ClientInit() : Ukey2ClientInit(nullptr) {} + ~Ukey2ClientInit() override; + explicit constexpr Ukey2ClientInit(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + Ukey2ClientInit(const Ukey2ClientInit& from); + Ukey2ClientInit(Ukey2ClientInit&& from) noexcept + : Ukey2ClientInit() { + *this = ::std::move(from); + } + + inline Ukey2ClientInit& operator=(const Ukey2ClientInit& from) { + CopyFrom(from); + return *this; + } + inline Ukey2ClientInit& operator=(Ukey2ClientInit&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const Ukey2ClientInit& default_instance() { + return *internal_default_instance(); + } + static inline const Ukey2ClientInit* internal_default_instance() { + return reinterpret_cast( + &_Ukey2ClientInit_default_instance_); + } + static constexpr int kIndexInFileMessages = + 3; + + friend void swap(Ukey2ClientInit& a, Ukey2ClientInit& b) { + a.Swap(&b); + } + inline void Swap(Ukey2ClientInit* 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(Ukey2ClientInit* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + Ukey2ClientInit* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const Ukey2ClientInit& from); + void MergeFrom(const Ukey2ClientInit& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(Ukey2ClientInit* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "securegcm.Ukey2ClientInit"; + } + protected: + explicit Ukey2ClientInit(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + typedef Ukey2ClientInit_CipherCommitment CipherCommitment; + + // accessors ------------------------------------------------------- + + enum : int { + kCipherCommitmentsFieldNumber = 3, + kRandomFieldNumber = 2, + kNextProtocolFieldNumber = 4, + kVersionFieldNumber = 1, + }; + // repeated .securegcm.Ukey2ClientInit.CipherCommitment cipher_commitments = 3; + int cipher_commitments_size() const; + private: + int _internal_cipher_commitments_size() const; + public: + void clear_cipher_commitments(); + ::securegcm::Ukey2ClientInit_CipherCommitment* mutable_cipher_commitments(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::securegcm::Ukey2ClientInit_CipherCommitment >* + mutable_cipher_commitments(); + private: + const ::securegcm::Ukey2ClientInit_CipherCommitment& _internal_cipher_commitments(int index) const; + ::securegcm::Ukey2ClientInit_CipherCommitment* _internal_add_cipher_commitments(); + public: + const ::securegcm::Ukey2ClientInit_CipherCommitment& cipher_commitments(int index) const; + ::securegcm::Ukey2ClientInit_CipherCommitment* add_cipher_commitments(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::securegcm::Ukey2ClientInit_CipherCommitment >& + cipher_commitments() const; + + // optional bytes random = 2; + bool has_random() const; + private: + bool _internal_has_random() const; + public: + void clear_random(); + const std::string& random() const; + template + void set_random(ArgT0&& arg0, ArgT... args); + std::string* mutable_random(); + PROTOBUF_NODISCARD std::string* release_random(); + void set_allocated_random(std::string* random); + private: + const std::string& _internal_random() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_random(const std::string& value); + std::string* _internal_mutable_random(); + public: + + // optional string next_protocol = 4; + bool has_next_protocol() const; + private: + bool _internal_has_next_protocol() const; + public: + void clear_next_protocol(); + const std::string& next_protocol() const; + template + void set_next_protocol(ArgT0&& arg0, ArgT... args); + std::string* mutable_next_protocol(); + PROTOBUF_NODISCARD std::string* release_next_protocol(); + void set_allocated_next_protocol(std::string* next_protocol); + private: + const std::string& _internal_next_protocol() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_next_protocol(const std::string& value); + std::string* _internal_mutable_next_protocol(); + public: + + // optional int32 version = 1; + bool has_version() const; + private: + bool _internal_has_version() const; + public: + void clear_version(); + int32_t version() const; + void set_version(int32_t value); + private: + int32_t _internal_version() const; + void _internal_set_version(int32_t value); + public: + + // @@protoc_insertion_point(class_scope:securegcm.Ukey2ClientInit) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::securegcm::Ukey2ClientInit_CipherCommitment > cipher_commitments_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr random_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr next_protocol_; + int32_t version_; + friend struct ::TableStruct_proto_2fukey_2eproto; +}; +// ------------------------------------------------------------------- + +class Ukey2ServerInit final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:securegcm.Ukey2ServerInit) */ { + public: + inline Ukey2ServerInit() : Ukey2ServerInit(nullptr) {} + ~Ukey2ServerInit() override; + explicit constexpr Ukey2ServerInit(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + Ukey2ServerInit(const Ukey2ServerInit& from); + Ukey2ServerInit(Ukey2ServerInit&& from) noexcept + : Ukey2ServerInit() { + *this = ::std::move(from); + } + + inline Ukey2ServerInit& operator=(const Ukey2ServerInit& from) { + CopyFrom(from); + return *this; + } + inline Ukey2ServerInit& operator=(Ukey2ServerInit&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const Ukey2ServerInit& default_instance() { + return *internal_default_instance(); + } + static inline const Ukey2ServerInit* internal_default_instance() { + return reinterpret_cast( + &_Ukey2ServerInit_default_instance_); + } + static constexpr int kIndexInFileMessages = + 4; + + friend void swap(Ukey2ServerInit& a, Ukey2ServerInit& b) { + a.Swap(&b); + } + inline void Swap(Ukey2ServerInit* 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(Ukey2ServerInit* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + Ukey2ServerInit* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const Ukey2ServerInit& from); + void MergeFrom(const Ukey2ServerInit& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(Ukey2ServerInit* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "securegcm.Ukey2ServerInit"; + } + protected: + explicit Ukey2ServerInit(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kRandomFieldNumber = 2, + kPublicKeyFieldNumber = 4, + kVersionFieldNumber = 1, + kHandshakeCipherFieldNumber = 3, + }; + // optional bytes random = 2; + bool has_random() const; + private: + bool _internal_has_random() const; + public: + void clear_random(); + const std::string& random() const; + template + void set_random(ArgT0&& arg0, ArgT... args); + std::string* mutable_random(); + PROTOBUF_NODISCARD std::string* release_random(); + void set_allocated_random(std::string* random); + private: + const std::string& _internal_random() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_random(const std::string& value); + std::string* _internal_mutable_random(); + public: + + // optional bytes public_key = 4; + bool has_public_key() const; + private: + bool _internal_has_public_key() const; + public: + void clear_public_key(); + const std::string& public_key() const; + template + void set_public_key(ArgT0&& arg0, ArgT... args); + std::string* mutable_public_key(); + PROTOBUF_NODISCARD std::string* release_public_key(); + void set_allocated_public_key(std::string* public_key); + private: + const std::string& _internal_public_key() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_public_key(const std::string& value); + std::string* _internal_mutable_public_key(); + public: + + // optional int32 version = 1; + bool has_version() const; + private: + bool _internal_has_version() const; + public: + void clear_version(); + int32_t version() const; + void set_version(int32_t value); + private: + int32_t _internal_version() const; + void _internal_set_version(int32_t value); + public: + + // optional .securegcm.Ukey2HandshakeCipher handshake_cipher = 3; + bool has_handshake_cipher() const; + private: + bool _internal_has_handshake_cipher() const; + public: + void clear_handshake_cipher(); + ::securegcm::Ukey2HandshakeCipher handshake_cipher() const; + void set_handshake_cipher(::securegcm::Ukey2HandshakeCipher value); + private: + ::securegcm::Ukey2HandshakeCipher _internal_handshake_cipher() const; + void _internal_set_handshake_cipher(::securegcm::Ukey2HandshakeCipher value); + public: + + // @@protoc_insertion_point(class_scope:securegcm.Ukey2ServerInit) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr random_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr public_key_; + int32_t version_; + int handshake_cipher_; + friend struct ::TableStruct_proto_2fukey_2eproto; +}; +// ------------------------------------------------------------------- + +class Ukey2ClientFinished final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:securegcm.Ukey2ClientFinished) */ { + public: + inline Ukey2ClientFinished() : Ukey2ClientFinished(nullptr) {} + ~Ukey2ClientFinished() override; + explicit constexpr Ukey2ClientFinished(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + Ukey2ClientFinished(const Ukey2ClientFinished& from); + Ukey2ClientFinished(Ukey2ClientFinished&& from) noexcept + : Ukey2ClientFinished() { + *this = ::std::move(from); + } + + inline Ukey2ClientFinished& operator=(const Ukey2ClientFinished& from) { + CopyFrom(from); + return *this; + } + inline Ukey2ClientFinished& operator=(Ukey2ClientFinished&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const Ukey2ClientFinished& default_instance() { + return *internal_default_instance(); + } + static inline const Ukey2ClientFinished* internal_default_instance() { + return reinterpret_cast( + &_Ukey2ClientFinished_default_instance_); + } + static constexpr int kIndexInFileMessages = + 5; + + friend void swap(Ukey2ClientFinished& a, Ukey2ClientFinished& b) { + a.Swap(&b); + } + inline void Swap(Ukey2ClientFinished* 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(Ukey2ClientFinished* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + Ukey2ClientFinished* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const Ukey2ClientFinished& from); + void MergeFrom(const Ukey2ClientFinished& 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 _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(Ukey2ClientFinished* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "securegcm.Ukey2ClientFinished"; + } + protected: + explicit Ukey2ClientFinished(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kPublicKeyFieldNumber = 1, + }; + // optional bytes public_key = 1; + bool has_public_key() const; + private: + bool _internal_has_public_key() const; + public: + void clear_public_key(); + const std::string& public_key() const; + template + void set_public_key(ArgT0&& arg0, ArgT... args); + std::string* mutable_public_key(); + PROTOBUF_NODISCARD std::string* release_public_key(); + void set_allocated_public_key(std::string* public_key); + private: + const std::string& _internal_public_key() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_public_key(const std::string& value); + std::string* _internal_mutable_public_key(); + public: + + // @@protoc_insertion_point(class_scope:securegcm.Ukey2ClientFinished) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr public_key_; + friend struct ::TableStruct_proto_2fukey_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// Ukey2Message + +// optional .securegcm.Ukey2Message.Type message_type = 1; +inline bool Ukey2Message::_internal_has_message_type() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool Ukey2Message::has_message_type() const { + return _internal_has_message_type(); +} +inline void Ukey2Message::clear_message_type() { + message_type_ = 0; + _has_bits_[0] &= ~0x00000002u; +} +inline ::securegcm::Ukey2Message_Type Ukey2Message::_internal_message_type() const { + return static_cast< ::securegcm::Ukey2Message_Type >(message_type_); +} +inline ::securegcm::Ukey2Message_Type Ukey2Message::message_type() const { + // @@protoc_insertion_point(field_get:securegcm.Ukey2Message.message_type) + return _internal_message_type(); +} +inline void Ukey2Message::_internal_set_message_type(::securegcm::Ukey2Message_Type value) { + assert(::securegcm::Ukey2Message_Type_IsValid(value)); + _has_bits_[0] |= 0x00000002u; + message_type_ = value; +} +inline void Ukey2Message::set_message_type(::securegcm::Ukey2Message_Type value) { + _internal_set_message_type(value); + // @@protoc_insertion_point(field_set:securegcm.Ukey2Message.message_type) +} + +// optional bytes message_data = 2; +inline bool Ukey2Message::_internal_has_message_data() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool Ukey2Message::has_message_data() const { + return _internal_has_message_data(); +} +inline void Ukey2Message::clear_message_data() { + message_data_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& Ukey2Message::message_data() const { + // @@protoc_insertion_point(field_get:securegcm.Ukey2Message.message_data) + return _internal_message_data(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void Ukey2Message::set_message_data(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + message_data_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:securegcm.Ukey2Message.message_data) +} +inline std::string* Ukey2Message::mutable_message_data() { + std::string* _s = _internal_mutable_message_data(); + // @@protoc_insertion_point(field_mutable:securegcm.Ukey2Message.message_data) + return _s; +} +inline const std::string& Ukey2Message::_internal_message_data() const { + return message_data_.Get(); +} +inline void Ukey2Message::_internal_set_message_data(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + message_data_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* Ukey2Message::_internal_mutable_message_data() { + _has_bits_[0] |= 0x00000001u; + return message_data_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* Ukey2Message::release_message_data() { + // @@protoc_insertion_point(field_release:securegcm.Ukey2Message.message_data) + if (!_internal_has_message_data()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = message_data_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (message_data_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + message_data_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void Ukey2Message::set_allocated_message_data(std::string* message_data) { + if (message_data != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + message_data_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), message_data, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (message_data_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + message_data_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:securegcm.Ukey2Message.message_data) +} + +// ------------------------------------------------------------------- + +// Ukey2Alert + +// optional .securegcm.Ukey2Alert.AlertType type = 1; +inline bool Ukey2Alert::_internal_has_type() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool Ukey2Alert::has_type() const { + return _internal_has_type(); +} +inline void Ukey2Alert::clear_type() { + type_ = 1; + _has_bits_[0] &= ~0x00000002u; +} +inline ::securegcm::Ukey2Alert_AlertType Ukey2Alert::_internal_type() const { + return static_cast< ::securegcm::Ukey2Alert_AlertType >(type_); +} +inline ::securegcm::Ukey2Alert_AlertType Ukey2Alert::type() const { + // @@protoc_insertion_point(field_get:securegcm.Ukey2Alert.type) + return _internal_type(); +} +inline void Ukey2Alert::_internal_set_type(::securegcm::Ukey2Alert_AlertType value) { + assert(::securegcm::Ukey2Alert_AlertType_IsValid(value)); + _has_bits_[0] |= 0x00000002u; + type_ = value; +} +inline void Ukey2Alert::set_type(::securegcm::Ukey2Alert_AlertType value) { + _internal_set_type(value); + // @@protoc_insertion_point(field_set:securegcm.Ukey2Alert.type) +} + +// optional string error_message = 2; +inline bool Ukey2Alert::_internal_has_error_message() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool Ukey2Alert::has_error_message() const { + return _internal_has_error_message(); +} +inline void Ukey2Alert::clear_error_message() { + error_message_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& Ukey2Alert::error_message() const { + // @@protoc_insertion_point(field_get:securegcm.Ukey2Alert.error_message) + return _internal_error_message(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void Ukey2Alert::set_error_message(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + error_message_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:securegcm.Ukey2Alert.error_message) +} +inline std::string* Ukey2Alert::mutable_error_message() { + std::string* _s = _internal_mutable_error_message(); + // @@protoc_insertion_point(field_mutable:securegcm.Ukey2Alert.error_message) + return _s; +} +inline const std::string& Ukey2Alert::_internal_error_message() const { + return error_message_.Get(); +} +inline void Ukey2Alert::_internal_set_error_message(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + error_message_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* Ukey2Alert::_internal_mutable_error_message() { + _has_bits_[0] |= 0x00000001u; + return error_message_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* Ukey2Alert::release_error_message() { + // @@protoc_insertion_point(field_release:securegcm.Ukey2Alert.error_message) + if (!_internal_has_error_message()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = error_message_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (error_message_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + error_message_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void Ukey2Alert::set_allocated_error_message(std::string* error_message) { + if (error_message != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + error_message_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), error_message, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (error_message_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + error_message_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:securegcm.Ukey2Alert.error_message) +} + +// ------------------------------------------------------------------- + +// Ukey2ClientInit_CipherCommitment + +// optional .securegcm.Ukey2HandshakeCipher handshake_cipher = 1; +inline bool Ukey2ClientInit_CipherCommitment::_internal_has_handshake_cipher() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool Ukey2ClientInit_CipherCommitment::has_handshake_cipher() const { + return _internal_has_handshake_cipher(); +} +inline void Ukey2ClientInit_CipherCommitment::clear_handshake_cipher() { + handshake_cipher_ = 0; + _has_bits_[0] &= ~0x00000002u; +} +inline ::securegcm::Ukey2HandshakeCipher Ukey2ClientInit_CipherCommitment::_internal_handshake_cipher() const { + return static_cast< ::securegcm::Ukey2HandshakeCipher >(handshake_cipher_); +} +inline ::securegcm::Ukey2HandshakeCipher Ukey2ClientInit_CipherCommitment::handshake_cipher() const { + // @@protoc_insertion_point(field_get:securegcm.Ukey2ClientInit.CipherCommitment.handshake_cipher) + return _internal_handshake_cipher(); +} +inline void Ukey2ClientInit_CipherCommitment::_internal_set_handshake_cipher(::securegcm::Ukey2HandshakeCipher value) { + assert(::securegcm::Ukey2HandshakeCipher_IsValid(value)); + _has_bits_[0] |= 0x00000002u; + handshake_cipher_ = value; +} +inline void Ukey2ClientInit_CipherCommitment::set_handshake_cipher(::securegcm::Ukey2HandshakeCipher value) { + _internal_set_handshake_cipher(value); + // @@protoc_insertion_point(field_set:securegcm.Ukey2ClientInit.CipherCommitment.handshake_cipher) +} + +// optional bytes commitment = 2; +inline bool Ukey2ClientInit_CipherCommitment::_internal_has_commitment() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool Ukey2ClientInit_CipherCommitment::has_commitment() const { + return _internal_has_commitment(); +} +inline void Ukey2ClientInit_CipherCommitment::clear_commitment() { + commitment_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& Ukey2ClientInit_CipherCommitment::commitment() const { + // @@protoc_insertion_point(field_get:securegcm.Ukey2ClientInit.CipherCommitment.commitment) + return _internal_commitment(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void Ukey2ClientInit_CipherCommitment::set_commitment(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + commitment_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:securegcm.Ukey2ClientInit.CipherCommitment.commitment) +} +inline std::string* Ukey2ClientInit_CipherCommitment::mutable_commitment() { + std::string* _s = _internal_mutable_commitment(); + // @@protoc_insertion_point(field_mutable:securegcm.Ukey2ClientInit.CipherCommitment.commitment) + return _s; +} +inline const std::string& Ukey2ClientInit_CipherCommitment::_internal_commitment() const { + return commitment_.Get(); +} +inline void Ukey2ClientInit_CipherCommitment::_internal_set_commitment(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + commitment_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* Ukey2ClientInit_CipherCommitment::_internal_mutable_commitment() { + _has_bits_[0] |= 0x00000001u; + return commitment_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* Ukey2ClientInit_CipherCommitment::release_commitment() { + // @@protoc_insertion_point(field_release:securegcm.Ukey2ClientInit.CipherCommitment.commitment) + if (!_internal_has_commitment()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = commitment_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (commitment_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + commitment_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void Ukey2ClientInit_CipherCommitment::set_allocated_commitment(std::string* commitment) { + if (commitment != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + commitment_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), commitment, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (commitment_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + commitment_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:securegcm.Ukey2ClientInit.CipherCommitment.commitment) +} + +// ------------------------------------------------------------------- + +// Ukey2ClientInit + +// optional int32 version = 1; +inline bool Ukey2ClientInit::_internal_has_version() const { + bool value = (_has_bits_[0] & 0x00000004u) != 0; + return value; +} +inline bool Ukey2ClientInit::has_version() const { + return _internal_has_version(); +} +inline void Ukey2ClientInit::clear_version() { + version_ = 0; + _has_bits_[0] &= ~0x00000004u; +} +inline int32_t Ukey2ClientInit::_internal_version() const { + return version_; +} +inline int32_t Ukey2ClientInit::version() const { + // @@protoc_insertion_point(field_get:securegcm.Ukey2ClientInit.version) + return _internal_version(); +} +inline void Ukey2ClientInit::_internal_set_version(int32_t value) { + _has_bits_[0] |= 0x00000004u; + version_ = value; +} +inline void Ukey2ClientInit::set_version(int32_t value) { + _internal_set_version(value); + // @@protoc_insertion_point(field_set:securegcm.Ukey2ClientInit.version) +} + +// optional bytes random = 2; +inline bool Ukey2ClientInit::_internal_has_random() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool Ukey2ClientInit::has_random() const { + return _internal_has_random(); +} +inline void Ukey2ClientInit::clear_random() { + random_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& Ukey2ClientInit::random() const { + // @@protoc_insertion_point(field_get:securegcm.Ukey2ClientInit.random) + return _internal_random(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void Ukey2ClientInit::set_random(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + random_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:securegcm.Ukey2ClientInit.random) +} +inline std::string* Ukey2ClientInit::mutable_random() { + std::string* _s = _internal_mutable_random(); + // @@protoc_insertion_point(field_mutable:securegcm.Ukey2ClientInit.random) + return _s; +} +inline const std::string& Ukey2ClientInit::_internal_random() const { + return random_.Get(); +} +inline void Ukey2ClientInit::_internal_set_random(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + random_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* Ukey2ClientInit::_internal_mutable_random() { + _has_bits_[0] |= 0x00000001u; + return random_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* Ukey2ClientInit::release_random() { + // @@protoc_insertion_point(field_release:securegcm.Ukey2ClientInit.random) + if (!_internal_has_random()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = random_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (random_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + random_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void Ukey2ClientInit::set_allocated_random(std::string* random) { + if (random != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + random_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), random, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (random_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + random_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:securegcm.Ukey2ClientInit.random) +} + +// repeated .securegcm.Ukey2ClientInit.CipherCommitment cipher_commitments = 3; +inline int Ukey2ClientInit::_internal_cipher_commitments_size() const { + return cipher_commitments_.size(); +} +inline int Ukey2ClientInit::cipher_commitments_size() const { + return _internal_cipher_commitments_size(); +} +inline void Ukey2ClientInit::clear_cipher_commitments() { + cipher_commitments_.Clear(); +} +inline ::securegcm::Ukey2ClientInit_CipherCommitment* Ukey2ClientInit::mutable_cipher_commitments(int index) { + // @@protoc_insertion_point(field_mutable:securegcm.Ukey2ClientInit.cipher_commitments) + return cipher_commitments_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::securegcm::Ukey2ClientInit_CipherCommitment >* +Ukey2ClientInit::mutable_cipher_commitments() { + // @@protoc_insertion_point(field_mutable_list:securegcm.Ukey2ClientInit.cipher_commitments) + return &cipher_commitments_; +} +inline const ::securegcm::Ukey2ClientInit_CipherCommitment& Ukey2ClientInit::_internal_cipher_commitments(int index) const { + return cipher_commitments_.Get(index); +} +inline const ::securegcm::Ukey2ClientInit_CipherCommitment& Ukey2ClientInit::cipher_commitments(int index) const { + // @@protoc_insertion_point(field_get:securegcm.Ukey2ClientInit.cipher_commitments) + return _internal_cipher_commitments(index); +} +inline ::securegcm::Ukey2ClientInit_CipherCommitment* Ukey2ClientInit::_internal_add_cipher_commitments() { + return cipher_commitments_.Add(); +} +inline ::securegcm::Ukey2ClientInit_CipherCommitment* Ukey2ClientInit::add_cipher_commitments() { + ::securegcm::Ukey2ClientInit_CipherCommitment* _add = _internal_add_cipher_commitments(); + // @@protoc_insertion_point(field_add:securegcm.Ukey2ClientInit.cipher_commitments) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::securegcm::Ukey2ClientInit_CipherCommitment >& +Ukey2ClientInit::cipher_commitments() const { + // @@protoc_insertion_point(field_list:securegcm.Ukey2ClientInit.cipher_commitments) + return cipher_commitments_; +} + +// optional string next_protocol = 4; +inline bool Ukey2ClientInit::_internal_has_next_protocol() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool Ukey2ClientInit::has_next_protocol() const { + return _internal_has_next_protocol(); +} +inline void Ukey2ClientInit::clear_next_protocol() { + next_protocol_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000002u; +} +inline const std::string& Ukey2ClientInit::next_protocol() const { + // @@protoc_insertion_point(field_get:securegcm.Ukey2ClientInit.next_protocol) + return _internal_next_protocol(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void Ukey2ClientInit::set_next_protocol(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000002u; + next_protocol_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:securegcm.Ukey2ClientInit.next_protocol) +} +inline std::string* Ukey2ClientInit::mutable_next_protocol() { + std::string* _s = _internal_mutable_next_protocol(); + // @@protoc_insertion_point(field_mutable:securegcm.Ukey2ClientInit.next_protocol) + return _s; +} +inline const std::string& Ukey2ClientInit::_internal_next_protocol() const { + return next_protocol_.Get(); +} +inline void Ukey2ClientInit::_internal_set_next_protocol(const std::string& value) { + _has_bits_[0] |= 0x00000002u; + next_protocol_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* Ukey2ClientInit::_internal_mutable_next_protocol() { + _has_bits_[0] |= 0x00000002u; + return next_protocol_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* Ukey2ClientInit::release_next_protocol() { + // @@protoc_insertion_point(field_release:securegcm.Ukey2ClientInit.next_protocol) + if (!_internal_has_next_protocol()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000002u; + auto* p = next_protocol_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (next_protocol_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + next_protocol_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void Ukey2ClientInit::set_allocated_next_protocol(std::string* next_protocol) { + if (next_protocol != nullptr) { + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + next_protocol_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), next_protocol, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (next_protocol_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + next_protocol_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:securegcm.Ukey2ClientInit.next_protocol) +} + +// ------------------------------------------------------------------- + +// Ukey2ServerInit + +// optional int32 version = 1; +inline bool Ukey2ServerInit::_internal_has_version() const { + bool value = (_has_bits_[0] & 0x00000004u) != 0; + return value; +} +inline bool Ukey2ServerInit::has_version() const { + return _internal_has_version(); +} +inline void Ukey2ServerInit::clear_version() { + version_ = 0; + _has_bits_[0] &= ~0x00000004u; +} +inline int32_t Ukey2ServerInit::_internal_version() const { + return version_; +} +inline int32_t Ukey2ServerInit::version() const { + // @@protoc_insertion_point(field_get:securegcm.Ukey2ServerInit.version) + return _internal_version(); +} +inline void Ukey2ServerInit::_internal_set_version(int32_t value) { + _has_bits_[0] |= 0x00000004u; + version_ = value; +} +inline void Ukey2ServerInit::set_version(int32_t value) { + _internal_set_version(value); + // @@protoc_insertion_point(field_set:securegcm.Ukey2ServerInit.version) +} + +// optional bytes random = 2; +inline bool Ukey2ServerInit::_internal_has_random() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool Ukey2ServerInit::has_random() const { + return _internal_has_random(); +} +inline void Ukey2ServerInit::clear_random() { + random_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& Ukey2ServerInit::random() const { + // @@protoc_insertion_point(field_get:securegcm.Ukey2ServerInit.random) + return _internal_random(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void Ukey2ServerInit::set_random(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + random_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:securegcm.Ukey2ServerInit.random) +} +inline std::string* Ukey2ServerInit::mutable_random() { + std::string* _s = _internal_mutable_random(); + // @@protoc_insertion_point(field_mutable:securegcm.Ukey2ServerInit.random) + return _s; +} +inline const std::string& Ukey2ServerInit::_internal_random() const { + return random_.Get(); +} +inline void Ukey2ServerInit::_internal_set_random(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + random_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* Ukey2ServerInit::_internal_mutable_random() { + _has_bits_[0] |= 0x00000001u; + return random_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* Ukey2ServerInit::release_random() { + // @@protoc_insertion_point(field_release:securegcm.Ukey2ServerInit.random) + if (!_internal_has_random()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = random_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (random_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + random_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void Ukey2ServerInit::set_allocated_random(std::string* random) { + if (random != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + random_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), random, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (random_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + random_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:securegcm.Ukey2ServerInit.random) +} + +// optional .securegcm.Ukey2HandshakeCipher handshake_cipher = 3; +inline bool Ukey2ServerInit::_internal_has_handshake_cipher() const { + bool value = (_has_bits_[0] & 0x00000008u) != 0; + return value; +} +inline bool Ukey2ServerInit::has_handshake_cipher() const { + return _internal_has_handshake_cipher(); +} +inline void Ukey2ServerInit::clear_handshake_cipher() { + handshake_cipher_ = 0; + _has_bits_[0] &= ~0x00000008u; +} +inline ::securegcm::Ukey2HandshakeCipher Ukey2ServerInit::_internal_handshake_cipher() const { + return static_cast< ::securegcm::Ukey2HandshakeCipher >(handshake_cipher_); +} +inline ::securegcm::Ukey2HandshakeCipher Ukey2ServerInit::handshake_cipher() const { + // @@protoc_insertion_point(field_get:securegcm.Ukey2ServerInit.handshake_cipher) + return _internal_handshake_cipher(); +} +inline void Ukey2ServerInit::_internal_set_handshake_cipher(::securegcm::Ukey2HandshakeCipher value) { + assert(::securegcm::Ukey2HandshakeCipher_IsValid(value)); + _has_bits_[0] |= 0x00000008u; + handshake_cipher_ = value; +} +inline void Ukey2ServerInit::set_handshake_cipher(::securegcm::Ukey2HandshakeCipher value) { + _internal_set_handshake_cipher(value); + // @@protoc_insertion_point(field_set:securegcm.Ukey2ServerInit.handshake_cipher) +} + +// optional bytes public_key = 4; +inline bool Ukey2ServerInit::_internal_has_public_key() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool Ukey2ServerInit::has_public_key() const { + return _internal_has_public_key(); +} +inline void Ukey2ServerInit::clear_public_key() { + public_key_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000002u; +} +inline const std::string& Ukey2ServerInit::public_key() const { + // @@protoc_insertion_point(field_get:securegcm.Ukey2ServerInit.public_key) + return _internal_public_key(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void Ukey2ServerInit::set_public_key(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000002u; + public_key_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:securegcm.Ukey2ServerInit.public_key) +} +inline std::string* Ukey2ServerInit::mutable_public_key() { + std::string* _s = _internal_mutable_public_key(); + // @@protoc_insertion_point(field_mutable:securegcm.Ukey2ServerInit.public_key) + return _s; +} +inline const std::string& Ukey2ServerInit::_internal_public_key() const { + return public_key_.Get(); +} +inline void Ukey2ServerInit::_internal_set_public_key(const std::string& value) { + _has_bits_[0] |= 0x00000002u; + public_key_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* Ukey2ServerInit::_internal_mutable_public_key() { + _has_bits_[0] |= 0x00000002u; + return public_key_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* Ukey2ServerInit::release_public_key() { + // @@protoc_insertion_point(field_release:securegcm.Ukey2ServerInit.public_key) + if (!_internal_has_public_key()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000002u; + auto* p = public_key_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (public_key_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + public_key_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void Ukey2ServerInit::set_allocated_public_key(std::string* public_key) { + if (public_key != nullptr) { + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + public_key_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), public_key, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (public_key_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + public_key_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:securegcm.Ukey2ServerInit.public_key) +} + +// ------------------------------------------------------------------- + +// Ukey2ClientFinished + +// optional bytes public_key = 1; +inline bool Ukey2ClientFinished::_internal_has_public_key() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool Ukey2ClientFinished::has_public_key() const { + return _internal_has_public_key(); +} +inline void Ukey2ClientFinished::clear_public_key() { + public_key_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& Ukey2ClientFinished::public_key() const { + // @@protoc_insertion_point(field_get:securegcm.Ukey2ClientFinished.public_key) + return _internal_public_key(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void Ukey2ClientFinished::set_public_key(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + public_key_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:securegcm.Ukey2ClientFinished.public_key) +} +inline std::string* Ukey2ClientFinished::mutable_public_key() { + std::string* _s = _internal_mutable_public_key(); + // @@protoc_insertion_point(field_mutable:securegcm.Ukey2ClientFinished.public_key) + return _s; +} +inline const std::string& Ukey2ClientFinished::_internal_public_key() const { + return public_key_.Get(); +} +inline void Ukey2ClientFinished::_internal_set_public_key(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + public_key_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* Ukey2ClientFinished::_internal_mutable_public_key() { + _has_bits_[0] |= 0x00000001u; + return public_key_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* Ukey2ClientFinished::release_public_key() { + // @@protoc_insertion_point(field_release:securegcm.Ukey2ClientFinished.public_key) + if (!_internal_has_public_key()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = public_key_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (public_key_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + public_key_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void Ukey2ClientFinished::set_allocated_public_key(std::string* public_key) { + if (public_key != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + public_key_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), public_key, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (public_key_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + public_key_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:securegcm.Ukey2ClientFinished.public_key) +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace securegcm + +PROTOBUF_NAMESPACE_OPEN + +template <> struct is_proto_enum< ::securegcm::Ukey2Message_Type> : ::std::true_type {}; +template <> struct is_proto_enum< ::securegcm::Ukey2Alert_AlertType> : ::std::true_type {}; +template <> struct is_proto_enum< ::securegcm::Ukey2HandshakeCipher> : ::std::true_type {}; + +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_proto_2fukey_2eproto diff --git a/third_party/ukey2/include/securegcm/d2d_connection_context_v1.h b/third_party/ukey2/include/securegcm/d2d_connection_context_v1.h new file mode 100644 index 00000000..098e6543 --- /dev/null +++ b/third_party/ukey2/include/securegcm/d2d_connection_context_v1.h @@ -0,0 +1,89 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef SECURITY_CRYPTAUTH_LIB_SECUREGCM_D2D_CONNECTION_CONTEXT_V1_H_ +#define SECURITY_CRYPTAUTH_LIB_SECUREGCM_D2D_CONNECTION_CONTEXT_V1_H_ + +#include +#include + +#include "securemessage/crypto_ops.h" + +namespace securegcm { + +// The full context of a secure connection. This class has methods to encode and +// decode messages that are to be sent to another device. +// +// This class should be kept compatible with the Java implementation in +// java/com/google/security/cryptauth/lib/securegcm/D2DConnectionContextV1.java +class D2DConnectionContextV1 { + public: + D2DConnectionContextV1(const securemessage::CryptoOps::SecretKey& encode_key, + const securemessage::CryptoOps::SecretKey& decode_key, + uint32_t encode_sequence_number, + uint32_t decode_sequence_number); + + // Once the initiator and responder have negotiated a secret key, use this + // method to encrypt and sign |payload|. Both initiator and responder devices + // can use this message. + // + // On failure, nullptr is returned. + std::unique_ptr EncodeMessageToPeer(const string& payload); + + // Once the initiator and responder have negotiated a secret key, use this + // method to decrypt and verify a |message| received from the other device. + // Both initiator and responder devices can use this message. + // + // On failure, nullptr is returned. + std::unique_ptr DecodeMessageFromPeer(const string& message); + + // Returns a cryptographic digest (SHA256) of the session keys prepended by + // the SHA256 hash of the ASCII string "D2D". + // + // On failure, nullptr is returned. + std::unique_ptr GetSessionUnique(); + + // Creates a saved session that can be later used for resumption. Note, + // this must be stored in a secure location. + std::unique_ptr SaveSession(); + + // Parse a saved session info and attempt to construct a resumed context. + // + // The session info passed to this method should be one that was generated + // by |SaveSession|. + // + // On failure, nullptr is returned. + static std::unique_ptr FromSavedSession( + const string& savedSessionInfo); + + private: + // The key used to encode payloads. + const securemessage::CryptoOps::SecretKey encode_key_; + + // The key used to decode received messages. + const securemessage::CryptoOps::SecretKey decode_key_; + + // The current sequence number for encoding. + uint32_t encode_sequence_number_; + + // The current sequence number for decoding. + uint32_t decode_sequence_number_; + + // A friend to access private variables for testing. + friend class D2DConnectionContextV1Peer; +}; + +} // namespace securegcm + +#endif // SECURITY_CRYPTAUTH_LIB_SECUREGCM_D2D_CONNECTION_CONTEXT_V1_H_ diff --git a/third_party/ukey2/include/securegcm/d2d_crypto_ops.h b/third_party/ukey2/include/securegcm/d2d_crypto_ops.h new file mode 100644 index 00000000..eeeeb209 --- /dev/null +++ b/third_party/ukey2/include/securegcm/d2d_crypto_ops.h @@ -0,0 +1,78 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef SECURITY_CRYPTAUTH_LIB_SECUREGCM_D2D_CRYPTO_OPS_H_ +#define SECURITY_CRYPTAUTH_LIB_SECUREGCM_D2D_CRYPTO_OPS_H_ + +#include +#include + +#include "proto/securegcm.pb.h" +#include "securemessage/crypto_ops.h" + +namespace securegcm { + +// A collection of static utility methods for the Device to Device communication +// (D2D) library. +// +// A class is used here in preference to a namespace to provide a closer +// correspondence with the Java equivalent class: +// //java/com/google/security/cryptauth/lib/securegcm/D2DCryptoOps.java +class D2DCryptoOps { + public: + // Encapsulates a payload type specifier, and a corresponding message as the + // raw payload. + // + // Note: Type is defined in securegcm.proto. + class Payload { + public: + Payload(Type type, const std::string& message); + + Type type() const { return type_; } + + const std::string& message() const { return message_; } + + private: + const Type type_; + const std::string message_; + }; + + // The salt, SHA256 of "D2D". + static const uint8_t kSalt[]; + static const size_t kSaltLength; + + // Used by a device to send a secure |Payload| to another device. + static std::unique_ptr SigncryptPayload( + const Payload& payload, + const securemessage::CryptoOps::SecretKey& secret_key); + + // Used by a device to recover a secure |Payload| sent by another device. + static std::unique_ptr VerifyDecryptPayload( + const std::string& signcrypted_message, + const securemessage::CryptoOps::SecretKey& secret_key); + + // Used to derive a distinct key for each initiator and responder from the + // |master_key|. Use a different |purpose| for each role. + static std::unique_ptr + DeriveNewKeyForPurpose(const securemessage::CryptoOps::SecretKey& master_key, + const std::string& purpose); + + private: + // Prevent instantiation. + D2DCryptoOps(); +}; + +} // namespace securegcm + +#endif // SECURITY_CRYPTAUTH_LIB_SECUREGCM_D2D_CRYPTO_OPS_H_ diff --git a/third_party/ukey2/include/securegcm/java_util.h b/third_party/ukey2/include/securegcm/java_util.h new file mode 100644 index 00000000..8783af4b --- /dev/null +++ b/third_party/ukey2/include/securegcm/java_util.h @@ -0,0 +1,57 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Utility functions for Java-compatible operations. +#ifndef SECURITY_CRYPTAUTH_LIB_SECUREGCM_JAVA_UTIL_H_ +#define SECURITY_CRYPTAUTH_LIB_SECUREGCM_JAVA_UTIL_H_ + +#include "securemessage/byte_buffer.h" + +namespace securegcm { +namespace java_util { + +// Perform multiplication with Java overflow semantics +// (https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html): +// If an integer multiplication overflows, then the result is the low-order +// bits of the mathematical product as represented in some sufficiently +// large two's-complement format. +int32_t JavaMultiply(int32_t lhs, int32_t rhs); + +// Perform addition with Java overflow semantics: +// (https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html): +// If an integer addition overflows, then the result is the low-order bits of +// the mathematical sum as represented in some sufficiently large +// two's-complement format. +int32_t JavaAdd(int32_t lhs, int32_t rhs); + +// To be compatible with the Java implementation, we need to use the same +// algorithm as the Arrays#hashCode(byte[]) function in Java: +// "The value returned by this method is the same value that would be obtained +// by invoking the hashCode method on a List containing a sequence of Byte +// instances representing the elements of a in the same order." +// +// According to List#hashCode(), this algorithm is: +// int hashCode = 1; +// for (Byte b : list) { +// hashCode = 31 * hashCode + (b == null ? b : b.hashCode()); +// } +// +// Finally, Byte#hashCode() is defined as "equal to the result of invoking +// Byte#intValue()". +int32_t JavaHashCode(const securemessage::ByteBuffer& byte_buffer); + +} // namespace java_util +} // namespace securegcm + +#endif // SECURITY_CRYPTAUTH_LIB_SECUREGCM_JAVA_UTIL_H_ diff --git a/third_party/ukey2/include/securegcm/ukey2_handshake.h b/third_party/ukey2/include/securegcm/ukey2_handshake.h new file mode 100644 index 00000000..8455fd71 --- /dev/null +++ b/third_party/ukey2/include/securegcm/ukey2_handshake.h @@ -0,0 +1,263 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef SECURITY_CRYPTAUTH_LIB_SECUREGCM_UKEY2_HANDSHAKE_H_ +#define SECURITY_CRYPTAUTH_LIB_SECUREGCM_UKEY2_HANDSHAKE_H_ + +#include +#include + +#include "proto/ukey.pb.h" +#include "securegcm/d2d_connection_context_v1.h" +#include "securemessage/crypto_ops.h" + +namespace securegcm { + +// Implements UKEY2 and produces a |D2DConnectionContextV1|. +// This class should be kept compatible with the Java implementation in +// //java/com/google/security/cryptauth/lib/securegcm/Ukey2Handshake.java +// +// For usage examples, see ukey2_shell.cc. This file contains a shell exercising +// both the initiator and responder handshake roles. +class UKey2Handshake { + public: + // Handshake states: + // kInProgress: + // The handshake is in progress, caller should use + // |GetNextHandshakeMessage()| and |ParseHandshakeMessage()| to continue + // the handshake. + // + // kVerificationNeeded: + // The handshake is complete, but pending verification of the + // authentication string. Clients should use |GetVerificationString()| + // to get the verification string and use out-of-band methods to + // authenticate the handshake. + // + // kVerificationInProgress: + // The handshake is complete, verification string has been generated, + // but has not been confirmed. After authenticating the handshake + // out-of-band, use |VerifyHandshake()| to mark the handshake as + // verified. + // + // kFinished: + // The handshake is finished, and the caller can use + // |ToConnectionContext()| to produce a |D2DConnectionContextV1|. + // + // kAlreadyUsed: + // The hanshake has already been used and should be destroyed. + // + // kError: + // The handshake produced an error and should be destroyed. + enum class State { + kInProgress, + kVerificationNeeded, + kVerificationInProgress, + kFinished, + kAlreadyUsed, + kError, + }; + + // Currently implemented UKEY2 handshake ciphers. Each cipher is a tuple + // consisting of a key negotiation cipher and a hash function used for a + // commitment. Currently the ciphers are: + // +-----------------------------------------------------+ + // | Enum | Key negotiation | Hash function | + // +-------------+-----------------------+---------------+ + // | P256_SHA512 | ECDH using NIST P-256 | SHA512 | + // +-----------------------------------------------------+ + // + // Note that these should correspond to values in + // device_to_device_messages.proto. + enum class HandshakeCipher : int { + // TODO(aczeskis): add CURVE25519_SHA512 + + P256_SHA512 = securegcm::P256_SHA512, + }; + + // Creates a |UKey2Handshake| with a particular |cipher| that can be used by + // an initiator / client. + static std::unique_ptr ForInitiator(HandshakeCipher cipher); + + // Creates a |UKey2Handshake| with a particular |cipher| that can be used by + // a responder / server. + static std::unique_ptr ForResponder(HandshakeCipher cipher); + + // Returns the current state of the handshake. + State GetHandshakeState() const; + + // Returns the last error message. Empty string if there was no error. + const string& GetLastError() const; + + // Gets the next handshake message suitable for sending on the wire. + // If |nullptr| is returned, check |GetLastError()| for the error message. + std::unique_ptr GetNextHandshakeMessage(); + + // Parses the given |handshake_message|, updating the internal state. + struct ParseResult { + // True if |handshake_message| is parsed successfully. If |false|, call + // |GetLastError()| for the error message. + bool success; + + // May be set if parsing fails. This value should be sent to the remote + // device before disconnecting. + std::unique_ptr alert_to_send; + }; + ParseResult ParseHandshakeMessage(const string& handshake_message); + + // Returns an authentication string suitable for authenticating the handshake + // out-of-band. Note that the authentication string can be short (e.g., a 6 + // digit visual confirmation code). + // + // Note: This should only be called when the state returned from + // |GetHandshakeState()| is |State::VERIFICATION_NEEDED|, which means this can + // only be called once. + // + // |byte_length|: The length of the output. Min length is 1; max length is 32. + // If |nullptr| is returned, check |GetLastError()| for the error message. + std::unique_ptr GetVerificationString(int byte_length); + + // Invoked to let the handshake state machine know that caller has validated + // the authentication string obtained via |GetVerificationString()|. + // Note: This should only be called when the state returned by + // |GetHandshakeState()| is |State::VERIFICATION_IN_PROGRESS|. + // + // If |false| is returned, check |GetLastError()| for the error message. + bool VerifyHandshake(); + + // Can be called to generate a |D2DConnectionContextV1|. Returns nullptr on + // failure. + // Note: This should only be called when the state returned by + // |GetHandshakeState()| is |State::FINISHED|. + // + // If |nullptr| is returned, check |GetLastError()| for the error message. + std::unique_ptr ToConnectionContext(); + + private: + // Enums for internal state machinery. + enum class InternalState : int { + CLIENT_START, + CLIENT_WAITING_FOR_SERVER_INIT, + CLIENT_AFTER_SERVER_INIT, + + // Responder/server state + SERVER_START, + SERVER_AFTER_CLIENT_INIT, + SERVER_WAITING_FOR_CLIENT_FINISHED, + + // Common completion state + HANDSHAKE_VERIFICATION_NEEDED, + HANDSHAKE_VERIFICATION_IN_PROGRESS, + HANDSHAKE_FINISHED, + HANDSHAKE_ALREADY_USED, + HANDSHAKE_ERROR, + }; + + // Helps us remember our role in the handshake. + enum class HandshakeRole { + CLIENT, + SERVER + }; + + // Prevent public instantiation. Callers should use |ForInitiator()| or + // |ForResponder()|. + UKey2Handshake(InternalState state, HandshakeCipher cipher); + + // Attempts to parse Ukey2ClientInit, wrapped inside a Ukey2Message. + // See go/ukey2 for details. + ParseResult ParseClientInitUkey2Message(const string& handshake_message); + + // Attempts to parse Ukey2ServerInit, wrapped inside a Ukey2Message. + // See go/ukey2 for details. + ParseResult ParseServerInitUkey2Message(const string& handshake_message); + + // Attempts to parse Ukey2ClientFinish, wrapped inside a Ukey2Message. + // See go/ukey2 for details. + ParseResult ParseClientFinishUkey2Message(const string& handshake_message); + + // Convenience function to set |last_error_| and create a ParseResult with a + // given alert. + ParseResult CreateFailedResultWithAlert(Ukey2Alert::AlertType alert_type, + const string& error_message); + + // Convenience function to set |last_error_| and create a failed ParseResult + // without an alert. + ParseResult CreateFailedResultWithoutAlert(const string& error_message); + + // Convenience function to create a successful ParseResult. + ParseResult CreateSuccessResult(); + + // Verifies that the peer's commitment stored in |peer_commitment_| is the + // same as that obtained from |handshake_message|. + bool VerifyCommitment(const string& handshake_message); + + // Generates a commitment for the P256_SHA512 cipher. + std::unique_ptr + GenerateP256Sha512Commitment(); + + // Creates a serialized Ukey2Message, wrapping an inner ClientInit message. + std::unique_ptr MakeClientInitUkey2Message(); + + // Creates a serialized Ukey2Message, wrapping an inner ServerInit message. + std::unique_ptr MakeServerInitUkey2Message(); + + // Creates a serialized Ukey2Message of a given |type|, wrapping |data|. + std::unique_ptr MakeUkey2Message(Ukey2Message::Type type, + const string& data); + + // Called when an error occurs to set |handshake_state_| and |last_error_|. + void SetError(const string& error_message); + + // The current state of the handshake. + InternalState handshake_state_; + + // The cipher to use for the handshake. + const HandshakeCipher handshake_cipher_; + + // The role to perform, i.e. client or server. + const HandshakeRole handshake_role_; + + // A newly generated key-pair for this handshake. + std::unique_ptr our_key_pair_; + + // The peer's public key retrieved from a handshake message. + std::unique_ptr their_public_key_; + + // The secret key derived from |our_key_pair_| and |their_public_key_|. + std::unique_ptr derived_secret_key_; + + // The raw bytes of the Ukey2ClientInit, wrapped inside a Ukey2Message. + // Empty string if not initialized. + string wrapped_client_init_; + + // The raw bytes of the Ukey2ServerInit, wrapped inside a Ukey2Message. + // Empty string if not initialized. + string wrapped_server_init_; + + // The commitment of the peer retrieved from a handshake message. Empty string + // if not initialized. + string peer_commitment_; + + // Map from ciphers to the raw bytes of message 3 (which is a wrapped + // Ukey2ClientFinished message). + // Note: Currently only one cipher is supported, so at most one entry exists + // in this map. + std::map raw_message3_map_; + + // Contains the last error message. + string last_error_; +}; + +} // namespace securegcm + +#endif // SECURITY_CRYPTAUTH_LIB_SECUREGCM_UKEY2_HANDSHAKE_H_ From 7654b3a0db7c3abe4ce9e18aeae707ee9a9ba80e Mon Sep 17 00:00:00 2001 From: deling-google <99381034+deling-google@users.noreply.github.com> Date: Thu, 31 Mar 2022 14:28:40 -0700 Subject: [PATCH 09/17] Fix build --- Package.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/Package.swift b/Package.swift index d8854de3..5c1883fb 100644 --- a/Package.swift +++ b/Package.swift @@ -516,6 +516,7 @@ let package = Package( cSettings: [ .headerSearchPath("./"), .define("NO_WEBRTC"), + .define("NEARBY_SWIFTPM"), ], linkerSettings: [ .linkedLibrary("c++"), From 739cde0832d5239d871f3cae1b29129cc046d805 Mon Sep 17 00:00:00 2001 From: deling-google <99381034+deling-google@users.noreply.github.com> Date: Thu, 31 Mar 2022 14:32:57 -0700 Subject: [PATCH 10/17] Ignore .build folder --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index f65519e3..efb916b2 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ build/** +.build From 47d07ea29fc1463742f775aa7a454732612d1145 Mon Sep 17 00:00:00 2001 From: deling-google <99381034+deling-google@users.noreply.github.com> Date: Thu, 31 Mar 2022 14:50:34 -0700 Subject: [PATCH 11/17] Symlink ukey2 headers --- third_party/ukey2/include/securegcm | 1 + .../securegcm/d2d_connection_context_v1.h | 89 ------ .../ukey2/include/securegcm/d2d_crypto_ops.h | 78 ------ .../ukey2/include/securegcm/java_util.h | 57 ---- .../ukey2/include/securegcm/ukey2_handshake.h | 263 ------------------ 5 files changed, 1 insertion(+), 487 deletions(-) create mode 120000 third_party/ukey2/include/securegcm delete mode 100644 third_party/ukey2/include/securegcm/d2d_connection_context_v1.h delete mode 100644 third_party/ukey2/include/securegcm/d2d_crypto_ops.h delete mode 100644 third_party/ukey2/include/securegcm/java_util.h delete mode 100644 third_party/ukey2/include/securegcm/ukey2_handshake.h diff --git a/third_party/ukey2/include/securegcm b/third_party/ukey2/include/securegcm new file mode 120000 index 00000000..6ba16ffb --- /dev/null +++ b/third_party/ukey2/include/securegcm @@ -0,0 +1 @@ +../ukey2/src/main/cpp/include/securegcm \ No newline at end of file diff --git a/third_party/ukey2/include/securegcm/d2d_connection_context_v1.h b/third_party/ukey2/include/securegcm/d2d_connection_context_v1.h deleted file mode 100644 index 098e6543..00000000 --- a/third_party/ukey2/include/securegcm/d2d_connection_context_v1.h +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef SECURITY_CRYPTAUTH_LIB_SECUREGCM_D2D_CONNECTION_CONTEXT_V1_H_ -#define SECURITY_CRYPTAUTH_LIB_SECUREGCM_D2D_CONNECTION_CONTEXT_V1_H_ - -#include -#include - -#include "securemessage/crypto_ops.h" - -namespace securegcm { - -// The full context of a secure connection. This class has methods to encode and -// decode messages that are to be sent to another device. -// -// This class should be kept compatible with the Java implementation in -// java/com/google/security/cryptauth/lib/securegcm/D2DConnectionContextV1.java -class D2DConnectionContextV1 { - public: - D2DConnectionContextV1(const securemessage::CryptoOps::SecretKey& encode_key, - const securemessage::CryptoOps::SecretKey& decode_key, - uint32_t encode_sequence_number, - uint32_t decode_sequence_number); - - // Once the initiator and responder have negotiated a secret key, use this - // method to encrypt and sign |payload|. Both initiator and responder devices - // can use this message. - // - // On failure, nullptr is returned. - std::unique_ptr EncodeMessageToPeer(const string& payload); - - // Once the initiator and responder have negotiated a secret key, use this - // method to decrypt and verify a |message| received from the other device. - // Both initiator and responder devices can use this message. - // - // On failure, nullptr is returned. - std::unique_ptr DecodeMessageFromPeer(const string& message); - - // Returns a cryptographic digest (SHA256) of the session keys prepended by - // the SHA256 hash of the ASCII string "D2D". - // - // On failure, nullptr is returned. - std::unique_ptr GetSessionUnique(); - - // Creates a saved session that can be later used for resumption. Note, - // this must be stored in a secure location. - std::unique_ptr SaveSession(); - - // Parse a saved session info and attempt to construct a resumed context. - // - // The session info passed to this method should be one that was generated - // by |SaveSession|. - // - // On failure, nullptr is returned. - static std::unique_ptr FromSavedSession( - const string& savedSessionInfo); - - private: - // The key used to encode payloads. - const securemessage::CryptoOps::SecretKey encode_key_; - - // The key used to decode received messages. - const securemessage::CryptoOps::SecretKey decode_key_; - - // The current sequence number for encoding. - uint32_t encode_sequence_number_; - - // The current sequence number for decoding. - uint32_t decode_sequence_number_; - - // A friend to access private variables for testing. - friend class D2DConnectionContextV1Peer; -}; - -} // namespace securegcm - -#endif // SECURITY_CRYPTAUTH_LIB_SECUREGCM_D2D_CONNECTION_CONTEXT_V1_H_ diff --git a/third_party/ukey2/include/securegcm/d2d_crypto_ops.h b/third_party/ukey2/include/securegcm/d2d_crypto_ops.h deleted file mode 100644 index eeeeb209..00000000 --- a/third_party/ukey2/include/securegcm/d2d_crypto_ops.h +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef SECURITY_CRYPTAUTH_LIB_SECUREGCM_D2D_CRYPTO_OPS_H_ -#define SECURITY_CRYPTAUTH_LIB_SECUREGCM_D2D_CRYPTO_OPS_H_ - -#include -#include - -#include "proto/securegcm.pb.h" -#include "securemessage/crypto_ops.h" - -namespace securegcm { - -// A collection of static utility methods for the Device to Device communication -// (D2D) library. -// -// A class is used here in preference to a namespace to provide a closer -// correspondence with the Java equivalent class: -// //java/com/google/security/cryptauth/lib/securegcm/D2DCryptoOps.java -class D2DCryptoOps { - public: - // Encapsulates a payload type specifier, and a corresponding message as the - // raw payload. - // - // Note: Type is defined in securegcm.proto. - class Payload { - public: - Payload(Type type, const std::string& message); - - Type type() const { return type_; } - - const std::string& message() const { return message_; } - - private: - const Type type_; - const std::string message_; - }; - - // The salt, SHA256 of "D2D". - static const uint8_t kSalt[]; - static const size_t kSaltLength; - - // Used by a device to send a secure |Payload| to another device. - static std::unique_ptr SigncryptPayload( - const Payload& payload, - const securemessage::CryptoOps::SecretKey& secret_key); - - // Used by a device to recover a secure |Payload| sent by another device. - static std::unique_ptr VerifyDecryptPayload( - const std::string& signcrypted_message, - const securemessage::CryptoOps::SecretKey& secret_key); - - // Used to derive a distinct key for each initiator and responder from the - // |master_key|. Use a different |purpose| for each role. - static std::unique_ptr - DeriveNewKeyForPurpose(const securemessage::CryptoOps::SecretKey& master_key, - const std::string& purpose); - - private: - // Prevent instantiation. - D2DCryptoOps(); -}; - -} // namespace securegcm - -#endif // SECURITY_CRYPTAUTH_LIB_SECUREGCM_D2D_CRYPTO_OPS_H_ diff --git a/third_party/ukey2/include/securegcm/java_util.h b/third_party/ukey2/include/securegcm/java_util.h deleted file mode 100644 index 8783af4b..00000000 --- a/third_party/ukey2/include/securegcm/java_util.h +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Utility functions for Java-compatible operations. -#ifndef SECURITY_CRYPTAUTH_LIB_SECUREGCM_JAVA_UTIL_H_ -#define SECURITY_CRYPTAUTH_LIB_SECUREGCM_JAVA_UTIL_H_ - -#include "securemessage/byte_buffer.h" - -namespace securegcm { -namespace java_util { - -// Perform multiplication with Java overflow semantics -// (https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html): -// If an integer multiplication overflows, then the result is the low-order -// bits of the mathematical product as represented in some sufficiently -// large two's-complement format. -int32_t JavaMultiply(int32_t lhs, int32_t rhs); - -// Perform addition with Java overflow semantics: -// (https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html): -// If an integer addition overflows, then the result is the low-order bits of -// the mathematical sum as represented in some sufficiently large -// two's-complement format. -int32_t JavaAdd(int32_t lhs, int32_t rhs); - -// To be compatible with the Java implementation, we need to use the same -// algorithm as the Arrays#hashCode(byte[]) function in Java: -// "The value returned by this method is the same value that would be obtained -// by invoking the hashCode method on a List containing a sequence of Byte -// instances representing the elements of a in the same order." -// -// According to List#hashCode(), this algorithm is: -// int hashCode = 1; -// for (Byte b : list) { -// hashCode = 31 * hashCode + (b == null ? b : b.hashCode()); -// } -// -// Finally, Byte#hashCode() is defined as "equal to the result of invoking -// Byte#intValue()". -int32_t JavaHashCode(const securemessage::ByteBuffer& byte_buffer); - -} // namespace java_util -} // namespace securegcm - -#endif // SECURITY_CRYPTAUTH_LIB_SECUREGCM_JAVA_UTIL_H_ diff --git a/third_party/ukey2/include/securegcm/ukey2_handshake.h b/third_party/ukey2/include/securegcm/ukey2_handshake.h deleted file mode 100644 index 8455fd71..00000000 --- a/third_party/ukey2/include/securegcm/ukey2_handshake.h +++ /dev/null @@ -1,263 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef SECURITY_CRYPTAUTH_LIB_SECUREGCM_UKEY2_HANDSHAKE_H_ -#define SECURITY_CRYPTAUTH_LIB_SECUREGCM_UKEY2_HANDSHAKE_H_ - -#include -#include - -#include "proto/ukey.pb.h" -#include "securegcm/d2d_connection_context_v1.h" -#include "securemessage/crypto_ops.h" - -namespace securegcm { - -// Implements UKEY2 and produces a |D2DConnectionContextV1|. -// This class should be kept compatible with the Java implementation in -// //java/com/google/security/cryptauth/lib/securegcm/Ukey2Handshake.java -// -// For usage examples, see ukey2_shell.cc. This file contains a shell exercising -// both the initiator and responder handshake roles. -class UKey2Handshake { - public: - // Handshake states: - // kInProgress: - // The handshake is in progress, caller should use - // |GetNextHandshakeMessage()| and |ParseHandshakeMessage()| to continue - // the handshake. - // - // kVerificationNeeded: - // The handshake is complete, but pending verification of the - // authentication string. Clients should use |GetVerificationString()| - // to get the verification string and use out-of-band methods to - // authenticate the handshake. - // - // kVerificationInProgress: - // The handshake is complete, verification string has been generated, - // but has not been confirmed. After authenticating the handshake - // out-of-band, use |VerifyHandshake()| to mark the handshake as - // verified. - // - // kFinished: - // The handshake is finished, and the caller can use - // |ToConnectionContext()| to produce a |D2DConnectionContextV1|. - // - // kAlreadyUsed: - // The hanshake has already been used and should be destroyed. - // - // kError: - // The handshake produced an error and should be destroyed. - enum class State { - kInProgress, - kVerificationNeeded, - kVerificationInProgress, - kFinished, - kAlreadyUsed, - kError, - }; - - // Currently implemented UKEY2 handshake ciphers. Each cipher is a tuple - // consisting of a key negotiation cipher and a hash function used for a - // commitment. Currently the ciphers are: - // +-----------------------------------------------------+ - // | Enum | Key negotiation | Hash function | - // +-------------+-----------------------+---------------+ - // | P256_SHA512 | ECDH using NIST P-256 | SHA512 | - // +-----------------------------------------------------+ - // - // Note that these should correspond to values in - // device_to_device_messages.proto. - enum class HandshakeCipher : int { - // TODO(aczeskis): add CURVE25519_SHA512 - - P256_SHA512 = securegcm::P256_SHA512, - }; - - // Creates a |UKey2Handshake| with a particular |cipher| that can be used by - // an initiator / client. - static std::unique_ptr ForInitiator(HandshakeCipher cipher); - - // Creates a |UKey2Handshake| with a particular |cipher| that can be used by - // a responder / server. - static std::unique_ptr ForResponder(HandshakeCipher cipher); - - // Returns the current state of the handshake. - State GetHandshakeState() const; - - // Returns the last error message. Empty string if there was no error. - const string& GetLastError() const; - - // Gets the next handshake message suitable for sending on the wire. - // If |nullptr| is returned, check |GetLastError()| for the error message. - std::unique_ptr GetNextHandshakeMessage(); - - // Parses the given |handshake_message|, updating the internal state. - struct ParseResult { - // True if |handshake_message| is parsed successfully. If |false|, call - // |GetLastError()| for the error message. - bool success; - - // May be set if parsing fails. This value should be sent to the remote - // device before disconnecting. - std::unique_ptr alert_to_send; - }; - ParseResult ParseHandshakeMessage(const string& handshake_message); - - // Returns an authentication string suitable for authenticating the handshake - // out-of-band. Note that the authentication string can be short (e.g., a 6 - // digit visual confirmation code). - // - // Note: This should only be called when the state returned from - // |GetHandshakeState()| is |State::VERIFICATION_NEEDED|, which means this can - // only be called once. - // - // |byte_length|: The length of the output. Min length is 1; max length is 32. - // If |nullptr| is returned, check |GetLastError()| for the error message. - std::unique_ptr GetVerificationString(int byte_length); - - // Invoked to let the handshake state machine know that caller has validated - // the authentication string obtained via |GetVerificationString()|. - // Note: This should only be called when the state returned by - // |GetHandshakeState()| is |State::VERIFICATION_IN_PROGRESS|. - // - // If |false| is returned, check |GetLastError()| for the error message. - bool VerifyHandshake(); - - // Can be called to generate a |D2DConnectionContextV1|. Returns nullptr on - // failure. - // Note: This should only be called when the state returned by - // |GetHandshakeState()| is |State::FINISHED|. - // - // If |nullptr| is returned, check |GetLastError()| for the error message. - std::unique_ptr ToConnectionContext(); - - private: - // Enums for internal state machinery. - enum class InternalState : int { - CLIENT_START, - CLIENT_WAITING_FOR_SERVER_INIT, - CLIENT_AFTER_SERVER_INIT, - - // Responder/server state - SERVER_START, - SERVER_AFTER_CLIENT_INIT, - SERVER_WAITING_FOR_CLIENT_FINISHED, - - // Common completion state - HANDSHAKE_VERIFICATION_NEEDED, - HANDSHAKE_VERIFICATION_IN_PROGRESS, - HANDSHAKE_FINISHED, - HANDSHAKE_ALREADY_USED, - HANDSHAKE_ERROR, - }; - - // Helps us remember our role in the handshake. - enum class HandshakeRole { - CLIENT, - SERVER - }; - - // Prevent public instantiation. Callers should use |ForInitiator()| or - // |ForResponder()|. - UKey2Handshake(InternalState state, HandshakeCipher cipher); - - // Attempts to parse Ukey2ClientInit, wrapped inside a Ukey2Message. - // See go/ukey2 for details. - ParseResult ParseClientInitUkey2Message(const string& handshake_message); - - // Attempts to parse Ukey2ServerInit, wrapped inside a Ukey2Message. - // See go/ukey2 for details. - ParseResult ParseServerInitUkey2Message(const string& handshake_message); - - // Attempts to parse Ukey2ClientFinish, wrapped inside a Ukey2Message. - // See go/ukey2 for details. - ParseResult ParseClientFinishUkey2Message(const string& handshake_message); - - // Convenience function to set |last_error_| and create a ParseResult with a - // given alert. - ParseResult CreateFailedResultWithAlert(Ukey2Alert::AlertType alert_type, - const string& error_message); - - // Convenience function to set |last_error_| and create a failed ParseResult - // without an alert. - ParseResult CreateFailedResultWithoutAlert(const string& error_message); - - // Convenience function to create a successful ParseResult. - ParseResult CreateSuccessResult(); - - // Verifies that the peer's commitment stored in |peer_commitment_| is the - // same as that obtained from |handshake_message|. - bool VerifyCommitment(const string& handshake_message); - - // Generates a commitment for the P256_SHA512 cipher. - std::unique_ptr - GenerateP256Sha512Commitment(); - - // Creates a serialized Ukey2Message, wrapping an inner ClientInit message. - std::unique_ptr MakeClientInitUkey2Message(); - - // Creates a serialized Ukey2Message, wrapping an inner ServerInit message. - std::unique_ptr MakeServerInitUkey2Message(); - - // Creates a serialized Ukey2Message of a given |type|, wrapping |data|. - std::unique_ptr MakeUkey2Message(Ukey2Message::Type type, - const string& data); - - // Called when an error occurs to set |handshake_state_| and |last_error_|. - void SetError(const string& error_message); - - // The current state of the handshake. - InternalState handshake_state_; - - // The cipher to use for the handshake. - const HandshakeCipher handshake_cipher_; - - // The role to perform, i.e. client or server. - const HandshakeRole handshake_role_; - - // A newly generated key-pair for this handshake. - std::unique_ptr our_key_pair_; - - // The peer's public key retrieved from a handshake message. - std::unique_ptr their_public_key_; - - // The secret key derived from |our_key_pair_| and |their_public_key_|. - std::unique_ptr derived_secret_key_; - - // The raw bytes of the Ukey2ClientInit, wrapped inside a Ukey2Message. - // Empty string if not initialized. - string wrapped_client_init_; - - // The raw bytes of the Ukey2ServerInit, wrapped inside a Ukey2Message. - // Empty string if not initialized. - string wrapped_server_init_; - - // The commitment of the peer retrieved from a handshake message. Empty string - // if not initialized. - string peer_commitment_; - - // Map from ciphers to the raw bytes of message 3 (which is a wrapped - // Ukey2ClientFinished message). - // Note: Currently only one cipher is supported, so at most one entry exists - // in this map. - std::map raw_message3_map_; - - // Contains the last error message. - string last_error_; -}; - -} // namespace securegcm - -#endif // SECURITY_CRYPTAUTH_LIB_SECUREGCM_UKEY2_HANDSHAKE_H_ From 0127c862a856faccbe08f422ed8dbed3dbbc7aa8 Mon Sep 17 00:00:00 2001 From: deling-google <99381034+deling-google@users.noreply.github.com> Date: Thu, 31 Mar 2022 14:55:51 -0700 Subject: [PATCH 12/17] Symlink securemessage headers --- .../securemessage/include/securemessage | 1 + .../include/securemessage/byte_buffer.h | 140 - .../include/securemessage/common.h | 26 - .../include/securemessage/crypto_ops.h | 503 --- .../securemessage/proto/securemessage.pb.h | 3069 ----------------- .../securemessage/public_key_proto_util.h | 68 - .../securemessage/raw_secure_message_parser.h | 90 - .../securemessage/secure_message_builder.h | 177 - .../securemessage/secure_message_parser.h | 99 - .../securemessage/secure_message_wrapper.h | 103 - .../include/securemessage/util.h | 60 - 11 files changed, 1 insertion(+), 4335 deletions(-) create mode 120000 third_party/securemessage/include/securemessage delete mode 100644 third_party/securemessage/include/securemessage/byte_buffer.h delete mode 100644 third_party/securemessage/include/securemessage/common.h delete mode 100644 third_party/securemessage/include/securemessage/crypto_ops.h delete mode 100644 third_party/securemessage/include/securemessage/proto/securemessage.pb.h delete mode 100644 third_party/securemessage/include/securemessage/public_key_proto_util.h delete mode 100644 third_party/securemessage/include/securemessage/raw_secure_message_parser.h delete mode 100644 third_party/securemessage/include/securemessage/secure_message_builder.h delete mode 100644 third_party/securemessage/include/securemessage/secure_message_parser.h delete mode 100644 third_party/securemessage/include/securemessage/secure_message_wrapper.h delete mode 100644 third_party/securemessage/include/securemessage/util.h diff --git a/third_party/securemessage/include/securemessage b/third_party/securemessage/include/securemessage new file mode 120000 index 00000000..c22c3f5d --- /dev/null +++ b/third_party/securemessage/include/securemessage @@ -0,0 +1 @@ +../securemessage/cpp/include/securemessage \ No newline at end of file diff --git a/third_party/securemessage/include/securemessage/byte_buffer.h b/third_party/securemessage/include/securemessage/byte_buffer.h deleted file mode 100644 index 9df49484..00000000 --- a/third_party/securemessage/include/securemessage/byte_buffer.h +++ /dev/null @@ -1,140 +0,0 @@ -/* - * Copyright 2014 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// -// A utility class for helping to interact with contiguous memory regions in a -// way that's both c++ friendly and works with OpenSSL's legacy C requirements. -// -// Will securely destroy enclosed data when deallocated -// - -#ifndef SECUREMESSAGE_BYTE_BUFFER_H_ -#define SECUREMESSAGE_BYTE_BUFFER_H_ - -#include -#include -#include -#include - -#include "securemessage/common.h" - -namespace securemessage { - -class ByteBuffer { - public: - // Create an empty byte buffer - ByteBuffer(); - - // Create a buffer of a certain size. Buffer will be filled with zeros. - explicit ByteBuffer(size_t size); - - // Create a buffer initialized with bytes from a string - explicit ByteBuffer(const string& source_data); - - // Create a buffer initialized with data from a const char* and a length - explicit ByteBuffer(const char* source_data, size_t length); - - // Create a buffer initialized with data from a const char* (assumes null - // termination) - explicit ByteBuffer(const char* source_data); - - // Create a buffer initialized with data from a uint8_t - explicit ByteBuffer(const uint8_t* source_data, size_t length); - - // Fill with the specified data. Any old data is discarded - void SetData(const uint8_t* source_data, size_t length); - - // Appends num_bytes of value byte to the end of the existing data - // Currently may violate secure memory guarantees by leaking some data on the - // heap - void Append(size_t num_bytes, const uint8_t byte); - - // Prepends a string to the beginning of this ByteBuffer - // Currently may violate secure memory guarantees by leaking some data on the - // heap - void Prepend(const string& str); - - // Concatenates two byte buffers. Placing a before b. If a is empty, then - // the result will be b. If b is empty, the result will be a. If both are - // empty, the result will be an empty byte buffer. - static ByteBuffer Concat(const ByteBuffer& a, const ByteBuffer& b); - - // Get size of internal buffer - size_t size() const; - - // Returns a unique pointer to new ByteBuffer of a given length starting from - // a given offset. - // Returns a unique pointer to an empty ByteBuffer if length is 0. - // Returns a nullptr if the specified parameters are invalid. - // Note that valid offset begins at 0 - std::unique_ptr SubArray(size_t offset, size_t length) const; - - // Get mutable memory as unsigned char* - unsigned char* MutableUChar(); - - // Get immutable memory as unsigned char* - unsigned const char* ImmutableUChar() const; - - // Get mutable memory as uint8_t* - uint8_t* MutableUInt8(); - - // Get immutable memory as uint8_t* - const uint8_t* ImmutableUInt8() const; - - // Get a copy of the memory in a C++ string - string String() const; - - // Get a copy of the memory in a C++ vector - std::vector Vector() const; - - // Returns true if the bytes in the other buffer are the same as in this - // buffer, false otherwise. Note: This function does NOT perform an early exit - // when it encounters a mismatching element in order to guard against timing - // attacks. - bool Equals(const ByteBuffer& other) const; - - // Returns true if the bytes in the other string are the same as in this - // buffer, false otherwise. Note: This function does NOT perform an early exit - // when it encounters a mismatching element in order to guard against timing - // attacks. - bool Equals(const string& other) const; - - // Returns a copy of the data as a printable hex string -- for easy debugging - string AsDebugHexString() const; - - // Securely resets the ByteBuffer by securely deleting any stored data. - void Clear(); - - // Securely destroys the ByteBuffer - ~ByteBuffer(); - - private: - // We rely on the fact that vectors are guaranteed to use contiguous memory - // for storing elements. - // TODO(aczeskis): define a custom version of vector that has a wiping - // deallocator. - std::vector data_; - - // Overwrites all elements in data vector one time. Does not resize data - // vector. - void Wipe(); - - // Helper function to wipe a specified buffer. - void WipeBuffer(uint8_t* buffer, size_t length); -}; - -} // namespace securemessage -#endif // SECUREMESSAGE_BYTE_BUFFER_H_ diff --git a/third_party/securemessage/include/securemessage/common.h b/third_party/securemessage/include/securemessage/common.h deleted file mode 100644 index 130925f0..00000000 --- a/third_party/securemessage/include/securemessage/common.h +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright 2014 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef SECUREMESSAGE_COMMON_H_ -#define SECUREMESSAGE_COMMON_H_ - -#include - -#ifndef HAS_GLOBAL_STRING -using std::string; -#endif - -#endif // SECUREMESSAGE_COMMON_H_ diff --git a/third_party/securemessage/include/securemessage/crypto_ops.h b/third_party/securemessage/include/securemessage/crypto_ops.h deleted file mode 100644 index 1fb7cde3..00000000 --- a/third_party/securemessage/include/securemessage/crypto_ops.h +++ /dev/null @@ -1,503 +0,0 @@ -/* - * Copyright 2014 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef SECUREMESSAGE_CRYPTO_OPS_H_ -#define SECUREMESSAGE_CRYPTO_OPS_H_ - -#include -#include -#include - -#include "securemessage/byte_buffer.h" -#include "securemessage/common.h" - -namespace securemessage { - -// -// Encapsulates the cryptographic operations used by the {@code SecureMessage*} -// classes. -// -class CryptoOps { - public: - // - // Enum of supported signature schemes. - // - enum SigType { - HMAC_SHA256, - ECDSA_P256_SHA256, - RSA2048_SHA256, - SIG_TYPE_END // used for testing - }; - - // - // Enum of supported encryption types - // - enum EncType { - NONE, - AES_256_CBC, - ENC_TYPE_END // used for testing - }; - - // - // Key Algorithms we support - // - enum KeyAlgorithm { - AES_256_KEY, - ECDSA_KEY, - RSA_KEY - }; - - // - // Key Types we believe to exist - // - enum KeyType { - PUBLIC, - PRIVATE, - SECRET - }; - - // - // Represents a base key class, SecretKey and PublicKey are derived from this - // class - // - class Key { - public: - // - // The default constructor is deleted so that class consumers cannot create - // a generic key class. They must use a particular key type class. - // - Key() = delete; - - ByteBuffer data() { return data_; } - const ByteBuffer& data() const { return data_; } - KeyAlgorithm algorithm() const { return algorithm_; } - KeyType type() const { return type_; } - - protected: - // - // Constructor cannot be called so that consumers can't simply create a - // generic key. Instead, they must use a particular key type class. - // - Key(const ByteBuffer& data, KeyAlgorithm algorithm, KeyType type) { - data_ = data; - algorithm_ = algorithm; - type_ = type; - } - - ByteBuffer data_; - KeyAlgorithm algorithm_; - KeyType type_; - }; - - // - // We have three key types: Public, Private, and Secret (symmetric) - // - class PublicKey : public Key { - public: - PublicKey(const string& data, KeyAlgorithm algorithm) - : Key(ByteBuffer(data), algorithm, PUBLIC) {} - PublicKey(const ByteBuffer& data, KeyAlgorithm algorithm) - : Key(data, algorithm, PUBLIC) {} - }; - - class PrivateKey : public Key { - public: - PrivateKey(const string& data, KeyAlgorithm algorithm) - : Key(ByteBuffer(data), algorithm, PRIVATE) {} - PrivateKey(const ByteBuffer& data, KeyAlgorithm algorithm) - : Key(data, algorithm, PRIVATE) {} - }; - - class SecretKey : public Key { - public: - SecretKey(const string& data, KeyAlgorithm algorithm) - : Key(ByteBuffer(data), algorithm, SECRET) {} - SecretKey(const ByteBuffer& data, KeyAlgorithm algorithm) - : Key(data, algorithm, SECRET) {} - }; - - struct KeyPair { - std::unique_ptr private_key; - std::unique_ptr public_key; - - KeyPair(std::unique_ptr pub, - std::unique_ptr priv) { - public_key = std::move(pub); - private_key = std::move(priv); - } - }; - - // - // Implements HKDF (RFC 5869) with the SHA-256 hash and a 256-bit output key - // length. - // - // @param inputKeyMaterial master key from which to derive sub-keys - // @param salt a (public) randomly generated 256-bit input that can be re-used - // @param info arbitrary information that is bound to the derived key (i.e., - // used in its creation) - // @return a std::unique_ptr holding the derived key bytes = - // HKDF-SHA256(inputKeyMaterial, salt, info) on success or nullptr on error - // - static std::unique_ptr Hkdf(const string& inputKeyMaterial, - const string& salt, - const string& info); - - // - // A key derivation function specific to this library, which accepts a {@code - // masterKey} and an arbitrary {@code purpose} describing the intended - // application of the derived sub-key, and produces a derived AES - 256 key - // safe to use as if it were independent of any other derived key which used - // a different {@code purpose}. - // - // @param masterKey any key suitable for use with HmacSHA256 - // @param purpose a UTF-8 encoded string describing the intended purpose of - // derived key - // @return a derived Key suitable for use with AES-256 - // - static std::unique_ptr DeriveAes256KeyFor( - const SecretKey& masterKey, const string& purpose); - - // - // SHA 256 length, in bytes - // - static const unsigned int kSha256DigestSize = 32; - - // - // Salt length, in bytes - // - static const unsigned int kSaltSize = 32; - - // AES 256 key length, in bytes - static const unsigned int kAesKeySize = 32; - - // - // Truncated hash output length, in bytes. - // - static const unsigned int kDigestLength = 20; - - // - // Computes a collision-resistant hash of {@link #kDigestLength} bytes - // (using a truncated SHA-256 output). - // - // @return a std::unique_ptr holding the digest or a nullptr on error - // - static std::unique_ptr Digest(const string& data); - - // - // Decrypts {@code ciphertext} using the algorithm specified in {@code - // encType}, with the specified {@code iv} and {@code decryptionKey}. - // - // @return a std::unique_ptr holding the decrypted data or a nullptr on error - // - static std::unique_ptr Decrypt(const SecretKey& decryptionKey, - EncType encType, - const string& iv, - const string& ciphertext); - - // - // Encrypts {@code plaintext} using the algorithm specified in {@code - // encType}, with the specified * {@code iv} and {@code encryptionKey}. - // - // @param rng source of randomness to be used with the specified cipher, if - // necessary - // @return a std::unique_ptr holding the encrypted data or nullptr on error - static std::unique_ptr Encrypt(const SecretKey& encryptionKey, - EncType encType, - const string& iv, - const string& plaintext); - - // - // Runs the Diffie-Hellman algorithm. - // - // @param private_key must have the same algorithm as the peer_key - // @param peer_key must be the matching public key - // @return an AES secret key created from the SHA-256 of the secret created - // here or nullptr on error. - // - static std::unique_ptr KeyAgreementSha256( - const PrivateKey& private_key, - const PublicKey& peer_key); - - // - // Generate a random IV appropriate for use with the algorithm specified in - // {@code encType}. - // - // @return a freshly generated IV (a random byte sequence of appropriate - // length) - // - static std::unique_ptr GenerateIv(EncType encType); - - // - // Signs {@code data} using the algorithm specified by {@code sigType} with - // {@code signingKey}. - // - // @param rng is required for public key signature schemes - // @return a std::unique_ptr holding a string that represents the raw - // signature or a nullptr on error - // - static std::unique_ptr Sign(SigType sigType, - const Key& signingKey, - const string& data); - - // - // Verifies the {@code signature} on {@code data} using the algorithm - // specified by {@code sigType} with {@code verificationKey}. - // - // @return true iff the signature is verified - // - static bool Verify(SigType sigType, - const Key& verificationKey, - const string& signature, - const string& data); - - // - // Imports a P256 EC Public Key using the x and y coordinates of the curve. - // - // @return nullptr if the point is invalid - // - static std::unique_ptr ImportEcP256Key(const string& x, - const string& y); - - // - // Exports the x and y coordinates of a P256 EC Public Key. - // - // @return false iff the key cannot be exported (for example, incorrect type) - // - static bool ExportEcP256Key(const PublicKey& key, string *x, string *y); - - // - // Imports a 2048 bit RSA Public Key using the modulus {@code n} and exponent - // {@code e}. - // - // @return nullptr if the parameters are invalid - // - static std::unique_ptr ImportRsa2048Key(const string& n, - int32_t e); - - // - // Exports the modulus and exponent of a 2048 bit RSA Public Key. - // - // @return false iff the key cannot be exported (for example, incorrect type) - // - static bool ExportRsa2048Key(const PublicKey& key, string* n, int32_t* e); - - // - // Returns true if a sigType is a public key scheme - // - static bool IsPublicKeyScheme(SigType sigType); - - // - // Indicates whether a "tag" is needed next to the plaintext body inside the - // ciphertext, to prevent the same ciphertext from being reused with someone - // else's signature on it. - // - static bool TaggedPlaintextRequired(const Key& signing_key, - SigType sig_type, - const Key& encryption_key); - - // Generates a 256 bit AES secret key - static std::unique_ptr GenerateAes256SecretKey(); - - // Generates a P256 EC key pair - static std::unique_ptr GenerateEcP256KeyPair(); - - // Generates a 2048 bit RSA key pair - static std::unique_ptr GenerateRsa2048KeyPair(); - - // - // @return SHA-256(UTF-8 encoded input) - // - // Will return a 32 byte ByteBuffer representing the SHA256 of the input bytes - // Will return a nullptr if an internal error occurs - // - static std::unique_ptr Sha256(const ByteBuffer& message); - - // - // @return SHA-512(UTF-8 encoded input) - // - // Will return a 64 byte ByteBuffer representing the SHA512 of the input bytes - // Will return a nullptr if an internal error occurs - // - static std::unique_ptr Sha512(const ByteBuffer& message); - - // Returns a ByteBuffer of |length|, which is filled with securely generated - // random values. - static std::unique_ptr SecureRandom(size_t length); - - private: - // - // @return SHA256HMAC of specified message using provided key or nullptr on - // error - static std::unique_ptr Sha256hmac(const ByteBuffer& key, - const ByteBuffer& message); - - // - // A salt value specific to this library, generated as - // SHA-256("SecureMessage") - // - // We have to initialize salt in crypto_ops.cc because C++ doesn't allow - // initialization and declaration in the same place. - // - static const uint8_t kSalt[kSaltSize]; - - // - // The HKDF (RFC 5869) extraction function, using the SHA-256 hash - // function. This function is used to pre-process the inputKeyMaterial and mix - // it with the salt, producing output suitable for use with HKDF expansion - // function (which produces the actual derived key). - // - // @see #hkdfSha256Expand(ByteBuffer, ByteBuffer) - // @return a std::unique_ptr with HMAC-SHA256(salt, - // inputKeyMaterial) (salt is the "key" for the HMAC) on success or a nullptr - // on error - // - static std::unique_ptr HkdfSha256Extract( - const ByteBuffer& inputKeyMaterial, const ByteBuffer& salt); - - // - // Special case of HKDF (RFC 5869) expansion function, using the SHA-256 - // hash function and allowing for a maximum output length of 256 bits. - // - // @param pseudoRandomKey should be generated by - // {@link #hkdfSha256Expand(ByteBuffer, ByteBuffer} - // @param info arbitrary information the derived key should be bound to - // @return a std::unique_ptr holding derived key bytes = - // HMAC-SHA256(pseudoRandomKey, info | 0x01) on success or a nullptr on - // error - // - static std::unique_ptr HkdfSha256Expand( - const ByteBuffer& pseudoRandomKey, const ByteBuffer& info); - - // - // Performs AES 256 CBC decryption of {@code ciphertext} with the specified - // {@code iv} and {@code decryptionKey}. Assumes PKCS#5 padding is used - // - // @return a std::unique_ptr holding the plaintext (decrypted) data or a - // nullptr on error - // - static std::unique_ptr Aes256CBCDecrypt( - const SecretKey& decryptionKey, - const ByteBuffer& iv, - const ByteBuffer& ciphertext); - - // - // Performs AES 256 CBC encryption of {@code plaintext} with the specified - // {@code iv} and {@code encryptionKey}. PKCS#5 is used. - // - // @return a std::unique_ptr holding the ciphertext (encrypted) data or a - // nullptr on error - // - static std::unique_ptr Aes256CBCEncrypt( - const SecretKey& encryptionKey, - const ByteBuffer& iv, - const ByteBuffer& ciphertext); - - // - // Get the purpose of an encryption scheme. Basically a string representation - // of the enum. - // - static string GetPurpose(EncType encType); - - // - // Get the purpose of a signature scheme. Basically a string representation - // of the enum. - // - static string GetPurpose(SigType sigType); - - // Computes the ECDSA P256 SHA 256 MAC - // - // @param data the data to be signed - // @param signingKey the ECDSA private key used for signing. - // @return std::unique_ptr holding string that represents the MAC or nullptr - // on error - // - static std::unique_ptr EcdsaP256Sha256Sign( - const PrivateKey& private_key, - const ByteBuffer& data); - - // Verifies the ECDSA P256 SHA 256 signature - // - // @param signature to be verified - // @param data the data over which the signature was computed - // @param verificationKey the ECDSA public key used for verification. - // @return bool true if signature is valid, false otherwise - // - static bool EcdsaP256Sha256Verify(const PublicKey& public_key, - const ByteBuffer& signature, - const ByteBuffer& data); - - // - // Runs the Elliptic Curve variant of the Diffie-Hellman algorithm. - // - // @param private_key must have the algorithm ECDSA_KEY - // @param peer_key must have the algorithm ECDSA_KEY - // @return an AES secret key created from the SHA-256 of the secret created - // by applying ECDH to the private_key and the peer_key. - // - static std::unique_ptr EcdhKeyAgreement( - const PrivateKey& private_key, - const PublicKey& peer_key); - - - // Computes the RSA 2048 SHA 256 signature - // - // @param data the data to be signed - // @param signingKey the RSA Private key used to sign the data. The key - // should be in DER form. - // @return std::unique_ptr holding string that represents the MAC or nullptr - // on error - // - // TODO(aczeskis): refactor sign and verify to be virtual functions of key - // objects - // - static std::unique_ptr Rsa2048Sha256Sign( - const PrivateKey& private_key, const ByteBuffer& data); - - // Verifies the RSA 2048 SHA 256 MAC - // - // @param signature to be verified - // @param data the data over which the signature was computed - // @param verificationKey the RSA public key used for verification - // @return bool true if signature is valid, false otherwise - // - static bool Rsa2048Sha256Verify(const PublicKey& public_key, - const ByteBuffer& signature, - const ByteBuffer& data); - - static bool IsValidEcP256CoordinateEncoding(const string& bytes); - - static bool IsValidRsa2048ModulusEncoding(const string& bytes); - - // - // Converts int32 value to an array of bytes represented as a string. The - // bytes are in big-endian order. - // - static string Int32BytesToString(int32_t value); - - // - // Converts a string of bytes to an int32 value. Fails if the bytes do not fit - // in the int32 type. The bytes are in big-endian order. - // - static bool StringToInt32Bytes(const string& value, int32_t* result); - - // For testing private helper functions - friend class CryptoOpsTest; - - virtual ~CryptoOps(); -}; - -} // namespace securemessage -#endif // SECUREMESSAGE_CRYPTO_OPS_H_ diff --git a/third_party/securemessage/include/securemessage/proto/securemessage.pb.h b/third_party/securemessage/include/securemessage/proto/securemessage.pb.h deleted file mode 100644 index de0cf362..00000000 --- a/third_party/securemessage/include/securemessage/proto/securemessage.pb.h +++ /dev/null @@ -1,3069 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: proto/securemessage.proto - -#ifndef GOOGLE_PROTOBUF_INCLUDED_proto_2fsecuremessage_2eproto -#define GOOGLE_PROTOBUF_INCLUDED_proto_2fsecuremessage_2eproto - -#include -#include - -#include -#if PROTOBUF_VERSION < 3019000 -#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 3019004 < PROTOBUF_MIN_PROTOC_VERSION -#error This file was generated by an older version of protoc which is -#error incompatible with your Protocol Buffer headers. Please -#error regenerate this file with a newer version of protoc. -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include // IWYU pragma: export -#include // IWYU pragma: export -#include -// @@protoc_insertion_point(includes) -#include -#define PROTOBUF_INTERNAL_EXPORT_proto_2fsecuremessage_2eproto -PROTOBUF_NAMESPACE_OPEN -namespace internal { -class AnyMetadata; -} // namespace internal -PROTOBUF_NAMESPACE_CLOSE - -// Internal implementation detail -- do not use these members. -struct TableStruct_proto_2fsecuremessage_2eproto { - static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[] - PROTOBUF_SECTION_VARIABLE(protodesc_cold); - static const ::PROTOBUF_NAMESPACE_ID::internal::AuxiliaryParseTableField aux[] - PROTOBUF_SECTION_VARIABLE(protodesc_cold); - static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[8] - PROTOBUF_SECTION_VARIABLE(protodesc_cold); - static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[]; - static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[]; - static const uint32_t offsets[]; -}; -namespace securemessage { -class DhPublicKey; -struct DhPublicKeyDefaultTypeInternal; -extern DhPublicKeyDefaultTypeInternal _DhPublicKey_default_instance_; -class EcP256PublicKey; -struct EcP256PublicKeyDefaultTypeInternal; -extern EcP256PublicKeyDefaultTypeInternal _EcP256PublicKey_default_instance_; -class GenericPublicKey; -struct GenericPublicKeyDefaultTypeInternal; -extern GenericPublicKeyDefaultTypeInternal _GenericPublicKey_default_instance_; -class Header; -struct HeaderDefaultTypeInternal; -extern HeaderDefaultTypeInternal _Header_default_instance_; -class HeaderAndBody; -struct HeaderAndBodyDefaultTypeInternal; -extern HeaderAndBodyDefaultTypeInternal _HeaderAndBody_default_instance_; -class HeaderAndBodyInternal; -struct HeaderAndBodyInternalDefaultTypeInternal; -extern HeaderAndBodyInternalDefaultTypeInternal _HeaderAndBodyInternal_default_instance_; -class SecureMessage; -struct SecureMessageDefaultTypeInternal; -extern SecureMessageDefaultTypeInternal _SecureMessage_default_instance_; -class SimpleRsaPublicKey; -struct SimpleRsaPublicKeyDefaultTypeInternal; -extern SimpleRsaPublicKeyDefaultTypeInternal _SimpleRsaPublicKey_default_instance_; -} // namespace securemessage -PROTOBUF_NAMESPACE_OPEN -template<> ::securemessage::DhPublicKey* Arena::CreateMaybeMessage<::securemessage::DhPublicKey>(Arena*); -template<> ::securemessage::EcP256PublicKey* Arena::CreateMaybeMessage<::securemessage::EcP256PublicKey>(Arena*); -template<> ::securemessage::GenericPublicKey* Arena::CreateMaybeMessage<::securemessage::GenericPublicKey>(Arena*); -template<> ::securemessage::Header* Arena::CreateMaybeMessage<::securemessage::Header>(Arena*); -template<> ::securemessage::HeaderAndBody* Arena::CreateMaybeMessage<::securemessage::HeaderAndBody>(Arena*); -template<> ::securemessage::HeaderAndBodyInternal* Arena::CreateMaybeMessage<::securemessage::HeaderAndBodyInternal>(Arena*); -template<> ::securemessage::SecureMessage* Arena::CreateMaybeMessage<::securemessage::SecureMessage>(Arena*); -template<> ::securemessage::SimpleRsaPublicKey* Arena::CreateMaybeMessage<::securemessage::SimpleRsaPublicKey>(Arena*); -PROTOBUF_NAMESPACE_CLOSE -namespace securemessage { - -enum SigScheme : int { - HMAC_SHA256 = 1, - ECDSA_P256_SHA256 = 2, - RSA2048_SHA256 = 3 -}; -bool SigScheme_IsValid(int value); -constexpr SigScheme SigScheme_MIN = HMAC_SHA256; -constexpr SigScheme SigScheme_MAX = RSA2048_SHA256; -constexpr int SigScheme_ARRAYSIZE = SigScheme_MAX + 1; - -const std::string& SigScheme_Name(SigScheme value); -template -inline const std::string& SigScheme_Name(T enum_t_value) { - static_assert(::std::is_same::value || - ::std::is_integral::value, - "Incorrect type passed to function SigScheme_Name."); - return SigScheme_Name(static_cast(enum_t_value)); -} -bool SigScheme_Parse( - ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, SigScheme* value); -enum EncScheme : int { - NONE = 1, - AES_256_CBC = 2 -}; -bool EncScheme_IsValid(int value); -constexpr EncScheme EncScheme_MIN = NONE; -constexpr EncScheme EncScheme_MAX = AES_256_CBC; -constexpr int EncScheme_ARRAYSIZE = EncScheme_MAX + 1; - -const std::string& EncScheme_Name(EncScheme value); -template -inline const std::string& EncScheme_Name(T enum_t_value) { - static_assert(::std::is_same::value || - ::std::is_integral::value, - "Incorrect type passed to function EncScheme_Name."); - return EncScheme_Name(static_cast(enum_t_value)); -} -bool EncScheme_Parse( - ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, EncScheme* value); -enum PublicKeyType : int { - EC_P256 = 1, - RSA2048 = 2, - DH2048_MODP = 3 -}; -bool PublicKeyType_IsValid(int value); -constexpr PublicKeyType PublicKeyType_MIN = EC_P256; -constexpr PublicKeyType PublicKeyType_MAX = DH2048_MODP; -constexpr int PublicKeyType_ARRAYSIZE = PublicKeyType_MAX + 1; - -const std::string& PublicKeyType_Name(PublicKeyType value); -template -inline const std::string& PublicKeyType_Name(T enum_t_value) { - static_assert(::std::is_same::value || - ::std::is_integral::value, - "Incorrect type passed to function PublicKeyType_Name."); - return PublicKeyType_Name(static_cast(enum_t_value)); -} -bool PublicKeyType_Parse( - ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, PublicKeyType* value); -// =================================================================== - -class SecureMessage final : - public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:securemessage.SecureMessage) */ { - public: - inline SecureMessage() : SecureMessage(nullptr) {} - ~SecureMessage() override; - explicit constexpr SecureMessage(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - SecureMessage(const SecureMessage& from); - SecureMessage(SecureMessage&& from) noexcept - : SecureMessage() { - *this = ::std::move(from); - } - - inline SecureMessage& operator=(const SecureMessage& from) { - CopyFrom(from); - return *this; - } - inline SecureMessage& operator=(SecureMessage&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); - } - inline std::string* mutable_unknown_fields() { - return _internal_metadata_.mutable_unknown_fields(); - } - - static const SecureMessage& default_instance() { - return *internal_default_instance(); - } - static inline const SecureMessage* internal_default_instance() { - return reinterpret_cast( - &_SecureMessage_default_instance_); - } - static constexpr int kIndexInFileMessages = - 0; - - friend void swap(SecureMessage& a, SecureMessage& b) { - a.Swap(&b); - } - inline void Swap(SecureMessage* 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(SecureMessage* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - SecureMessage* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; - void CopyFrom(const SecureMessage& from); - void MergeFrom(const SecureMessage& 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 _cached_size_.Get(); } - - private: - void SharedCtor(); - void SharedDtor(); - void SetCachedSize(int size) const; - void InternalSwap(SecureMessage* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "securemessage.SecureMessage"; - } - protected: - explicit SecureMessage(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); - private: - static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - public: - - std::string GetTypeName() const final; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kHeaderAndBodyFieldNumber = 1, - kSignatureFieldNumber = 2, - }; - // required bytes header_and_body = 1; - bool has_header_and_body() const; - private: - bool _internal_has_header_and_body() const; - public: - void clear_header_and_body(); - const std::string& header_and_body() const; - template - void set_header_and_body(ArgT0&& arg0, ArgT... args); - std::string* mutable_header_and_body(); - PROTOBUF_NODISCARD std::string* release_header_and_body(); - void set_allocated_header_and_body(std::string* header_and_body); - private: - const std::string& _internal_header_and_body() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_header_and_body(const std::string& value); - std::string* _internal_mutable_header_and_body(); - public: - - // required bytes signature = 2; - bool has_signature() const; - private: - bool _internal_has_signature() const; - public: - void clear_signature(); - const std::string& signature() const; - template - void set_signature(ArgT0&& arg0, ArgT... args); - std::string* mutable_signature(); - PROTOBUF_NODISCARD std::string* release_signature(); - void set_allocated_signature(std::string* signature); - private: - const std::string& _internal_signature() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_signature(const std::string& value); - std::string* _internal_mutable_signature(); - public: - - // @@protoc_insertion_point(class_scope:securemessage.SecureMessage) - private: - class _Internal; - - // helper for ByteSizeLong() - size_t RequiredFieldsByteSizeFallback() const; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr header_and_body_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr signature_; - friend struct ::TableStruct_proto_2fsecuremessage_2eproto; -}; -// ------------------------------------------------------------------- - -class Header final : - public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:securemessage.Header) */ { - public: - inline Header() : Header(nullptr) {} - ~Header() override; - explicit constexpr Header(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - Header(const Header& from); - Header(Header&& from) noexcept - : Header() { - *this = ::std::move(from); - } - - inline Header& operator=(const Header& from) { - CopyFrom(from); - return *this; - } - inline Header& operator=(Header&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); - } - inline std::string* mutable_unknown_fields() { - return _internal_metadata_.mutable_unknown_fields(); - } - - static const Header& default_instance() { - return *internal_default_instance(); - } - static inline const Header* internal_default_instance() { - return reinterpret_cast( - &_Header_default_instance_); - } - static constexpr int kIndexInFileMessages = - 1; - - friend void swap(Header& a, Header& b) { - a.Swap(&b); - } - inline void Swap(Header* 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(Header* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - Header* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage
(arena); - } - void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; - void CopyFrom(const Header& from); - void MergeFrom(const Header& 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 _cached_size_.Get(); } - - private: - void SharedCtor(); - void SharedDtor(); - void SetCachedSize(int size) const; - void InternalSwap(Header* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "securemessage.Header"; - } - protected: - explicit Header(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); - private: - static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - public: - - std::string GetTypeName() const final; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kVerificationKeyIdFieldNumber = 3, - kDecryptionKeyIdFieldNumber = 4, - kIvFieldNumber = 5, - kPublicMetadataFieldNumber = 6, - kAssociatedDataLengthFieldNumber = 7, - kSignatureSchemeFieldNumber = 1, - kEncryptionSchemeFieldNumber = 2, - }; - // optional bytes verification_key_id = 3; - bool has_verification_key_id() const; - private: - bool _internal_has_verification_key_id() const; - public: - void clear_verification_key_id(); - const std::string& verification_key_id() const; - template - void set_verification_key_id(ArgT0&& arg0, ArgT... args); - std::string* mutable_verification_key_id(); - PROTOBUF_NODISCARD std::string* release_verification_key_id(); - void set_allocated_verification_key_id(std::string* verification_key_id); - private: - const std::string& _internal_verification_key_id() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_verification_key_id(const std::string& value); - std::string* _internal_mutable_verification_key_id(); - public: - - // optional bytes decryption_key_id = 4; - bool has_decryption_key_id() const; - private: - bool _internal_has_decryption_key_id() const; - public: - void clear_decryption_key_id(); - const std::string& decryption_key_id() const; - template - void set_decryption_key_id(ArgT0&& arg0, ArgT... args); - std::string* mutable_decryption_key_id(); - PROTOBUF_NODISCARD std::string* release_decryption_key_id(); - void set_allocated_decryption_key_id(std::string* decryption_key_id); - private: - const std::string& _internal_decryption_key_id() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_decryption_key_id(const std::string& value); - std::string* _internal_mutable_decryption_key_id(); - public: - - // optional bytes iv = 5; - bool has_iv() const; - private: - bool _internal_has_iv() const; - public: - void clear_iv(); - const std::string& iv() const; - template - void set_iv(ArgT0&& arg0, ArgT... args); - std::string* mutable_iv(); - PROTOBUF_NODISCARD std::string* release_iv(); - void set_allocated_iv(std::string* iv); - private: - const std::string& _internal_iv() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_iv(const std::string& value); - std::string* _internal_mutable_iv(); - public: - - // optional bytes public_metadata = 6; - bool has_public_metadata() const; - private: - bool _internal_has_public_metadata() const; - public: - void clear_public_metadata(); - const std::string& public_metadata() const; - template - void set_public_metadata(ArgT0&& arg0, ArgT... args); - std::string* mutable_public_metadata(); - PROTOBUF_NODISCARD std::string* release_public_metadata(); - void set_allocated_public_metadata(std::string* public_metadata); - private: - const std::string& _internal_public_metadata() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_public_metadata(const std::string& value); - std::string* _internal_mutable_public_metadata(); - public: - - // optional uint32 associated_data_length = 7 [default = 0]; - bool has_associated_data_length() const; - private: - bool _internal_has_associated_data_length() const; - public: - void clear_associated_data_length(); - uint32_t associated_data_length() const; - void set_associated_data_length(uint32_t value); - private: - uint32_t _internal_associated_data_length() const; - void _internal_set_associated_data_length(uint32_t value); - public: - - // required .securemessage.SigScheme signature_scheme = 1; - bool has_signature_scheme() const; - private: - bool _internal_has_signature_scheme() const; - public: - void clear_signature_scheme(); - ::securemessage::SigScheme signature_scheme() const; - void set_signature_scheme(::securemessage::SigScheme value); - private: - ::securemessage::SigScheme _internal_signature_scheme() const; - void _internal_set_signature_scheme(::securemessage::SigScheme value); - public: - - // required .securemessage.EncScheme encryption_scheme = 2; - bool has_encryption_scheme() const; - private: - bool _internal_has_encryption_scheme() const; - public: - void clear_encryption_scheme(); - ::securemessage::EncScheme encryption_scheme() const; - void set_encryption_scheme(::securemessage::EncScheme value); - private: - ::securemessage::EncScheme _internal_encryption_scheme() const; - void _internal_set_encryption_scheme(::securemessage::EncScheme value); - public: - - // @@protoc_insertion_point(class_scope:securemessage.Header) - private: - class _Internal; - - // helper for ByteSizeLong() - size_t RequiredFieldsByteSizeFallback() const; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr verification_key_id_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr decryption_key_id_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr iv_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr public_metadata_; - uint32_t associated_data_length_; - int signature_scheme_; - int encryption_scheme_; - friend struct ::TableStruct_proto_2fsecuremessage_2eproto; -}; -// ------------------------------------------------------------------- - -class HeaderAndBody final : - public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:securemessage.HeaderAndBody) */ { - public: - inline HeaderAndBody() : HeaderAndBody(nullptr) {} - ~HeaderAndBody() override; - explicit constexpr HeaderAndBody(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - HeaderAndBody(const HeaderAndBody& from); - HeaderAndBody(HeaderAndBody&& from) noexcept - : HeaderAndBody() { - *this = ::std::move(from); - } - - inline HeaderAndBody& operator=(const HeaderAndBody& from) { - CopyFrom(from); - return *this; - } - inline HeaderAndBody& operator=(HeaderAndBody&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); - } - inline std::string* mutable_unknown_fields() { - return _internal_metadata_.mutable_unknown_fields(); - } - - static const HeaderAndBody& default_instance() { - return *internal_default_instance(); - } - static inline const HeaderAndBody* internal_default_instance() { - return reinterpret_cast( - &_HeaderAndBody_default_instance_); - } - static constexpr int kIndexInFileMessages = - 2; - - friend void swap(HeaderAndBody& a, HeaderAndBody& b) { - a.Swap(&b); - } - inline void Swap(HeaderAndBody* 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(HeaderAndBody* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - HeaderAndBody* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; - void CopyFrom(const HeaderAndBody& from); - void MergeFrom(const HeaderAndBody& 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 _cached_size_.Get(); } - - private: - void SharedCtor(); - void SharedDtor(); - void SetCachedSize(int size) const; - void InternalSwap(HeaderAndBody* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "securemessage.HeaderAndBody"; - } - protected: - explicit HeaderAndBody(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); - private: - static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - public: - - std::string GetTypeName() const final; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kBodyFieldNumber = 2, - kHeaderFieldNumber = 1, - }; - // required bytes body = 2; - bool has_body() const; - private: - bool _internal_has_body() const; - public: - void clear_body(); - const std::string& body() const; - template - void set_body(ArgT0&& arg0, ArgT... args); - std::string* mutable_body(); - PROTOBUF_NODISCARD std::string* release_body(); - void set_allocated_body(std::string* body); - private: - const std::string& _internal_body() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_body(const std::string& value); - std::string* _internal_mutable_body(); - public: - - // required .securemessage.Header header = 1; - bool has_header() const; - private: - bool _internal_has_header() const; - public: - void clear_header(); - const ::securemessage::Header& header() const; - PROTOBUF_NODISCARD ::securemessage::Header* release_header(); - ::securemessage::Header* mutable_header(); - void set_allocated_header(::securemessage::Header* header); - private: - const ::securemessage::Header& _internal_header() const; - ::securemessage::Header* _internal_mutable_header(); - public: - void unsafe_arena_set_allocated_header( - ::securemessage::Header* header); - ::securemessage::Header* unsafe_arena_release_header(); - - // @@protoc_insertion_point(class_scope:securemessage.HeaderAndBody) - private: - class _Internal; - - // helper for ByteSizeLong() - size_t RequiredFieldsByteSizeFallback() const; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr body_; - ::securemessage::Header* header_; - friend struct ::TableStruct_proto_2fsecuremessage_2eproto; -}; -// ------------------------------------------------------------------- - -class HeaderAndBodyInternal final : - public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:securemessage.HeaderAndBodyInternal) */ { - public: - inline HeaderAndBodyInternal() : HeaderAndBodyInternal(nullptr) {} - ~HeaderAndBodyInternal() override; - explicit constexpr HeaderAndBodyInternal(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - HeaderAndBodyInternal(const HeaderAndBodyInternal& from); - HeaderAndBodyInternal(HeaderAndBodyInternal&& from) noexcept - : HeaderAndBodyInternal() { - *this = ::std::move(from); - } - - inline HeaderAndBodyInternal& operator=(const HeaderAndBodyInternal& from) { - CopyFrom(from); - return *this; - } - inline HeaderAndBodyInternal& operator=(HeaderAndBodyInternal&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); - } - inline std::string* mutable_unknown_fields() { - return _internal_metadata_.mutable_unknown_fields(); - } - - static const HeaderAndBodyInternal& default_instance() { - return *internal_default_instance(); - } - static inline const HeaderAndBodyInternal* internal_default_instance() { - return reinterpret_cast( - &_HeaderAndBodyInternal_default_instance_); - } - static constexpr int kIndexInFileMessages = - 3; - - friend void swap(HeaderAndBodyInternal& a, HeaderAndBodyInternal& b) { - a.Swap(&b); - } - inline void Swap(HeaderAndBodyInternal* 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(HeaderAndBodyInternal* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - HeaderAndBodyInternal* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; - void CopyFrom(const HeaderAndBodyInternal& from); - void MergeFrom(const HeaderAndBodyInternal& 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 _cached_size_.Get(); } - - private: - void SharedCtor(); - void SharedDtor(); - void SetCachedSize(int size) const; - void InternalSwap(HeaderAndBodyInternal* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "securemessage.HeaderAndBodyInternal"; - } - protected: - explicit HeaderAndBodyInternal(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); - private: - static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - public: - - std::string GetTypeName() const final; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kHeaderFieldNumber = 1, - kBodyFieldNumber = 2, - }; - // required bytes header = 1; - bool has_header() const; - private: - bool _internal_has_header() const; - public: - void clear_header(); - const std::string& header() const; - template - void set_header(ArgT0&& arg0, ArgT... args); - std::string* mutable_header(); - PROTOBUF_NODISCARD std::string* release_header(); - void set_allocated_header(std::string* header); - private: - const std::string& _internal_header() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_header(const std::string& value); - std::string* _internal_mutable_header(); - public: - - // required bytes body = 2; - bool has_body() const; - private: - bool _internal_has_body() const; - public: - void clear_body(); - const std::string& body() const; - template - void set_body(ArgT0&& arg0, ArgT... args); - std::string* mutable_body(); - PROTOBUF_NODISCARD std::string* release_body(); - void set_allocated_body(std::string* body); - private: - const std::string& _internal_body() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_body(const std::string& value); - std::string* _internal_mutable_body(); - public: - - // @@protoc_insertion_point(class_scope:securemessage.HeaderAndBodyInternal) - private: - class _Internal; - - // helper for ByteSizeLong() - size_t RequiredFieldsByteSizeFallback() const; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr header_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr body_; - friend struct ::TableStruct_proto_2fsecuremessage_2eproto; -}; -// ------------------------------------------------------------------- - -class EcP256PublicKey final : - public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:securemessage.EcP256PublicKey) */ { - public: - inline EcP256PublicKey() : EcP256PublicKey(nullptr) {} - ~EcP256PublicKey() override; - explicit constexpr EcP256PublicKey(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - EcP256PublicKey(const EcP256PublicKey& from); - EcP256PublicKey(EcP256PublicKey&& from) noexcept - : EcP256PublicKey() { - *this = ::std::move(from); - } - - inline EcP256PublicKey& operator=(const EcP256PublicKey& from) { - CopyFrom(from); - return *this; - } - inline EcP256PublicKey& operator=(EcP256PublicKey&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); - } - inline std::string* mutable_unknown_fields() { - return _internal_metadata_.mutable_unknown_fields(); - } - - static const EcP256PublicKey& default_instance() { - return *internal_default_instance(); - } - static inline const EcP256PublicKey* internal_default_instance() { - return reinterpret_cast( - &_EcP256PublicKey_default_instance_); - } - static constexpr int kIndexInFileMessages = - 4; - - friend void swap(EcP256PublicKey& a, EcP256PublicKey& b) { - a.Swap(&b); - } - inline void Swap(EcP256PublicKey* 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(EcP256PublicKey* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - EcP256PublicKey* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; - void CopyFrom(const EcP256PublicKey& from); - void MergeFrom(const EcP256PublicKey& 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 _cached_size_.Get(); } - - private: - void SharedCtor(); - void SharedDtor(); - void SetCachedSize(int size) const; - void InternalSwap(EcP256PublicKey* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "securemessage.EcP256PublicKey"; - } - protected: - explicit EcP256PublicKey(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); - private: - static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - public: - - std::string GetTypeName() const final; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kXFieldNumber = 1, - kYFieldNumber = 2, - }; - // required bytes x = 1; - bool has_x() const; - private: - bool _internal_has_x() const; - public: - void clear_x(); - const std::string& x() const; - template - void set_x(ArgT0&& arg0, ArgT... args); - std::string* mutable_x(); - PROTOBUF_NODISCARD std::string* release_x(); - void set_allocated_x(std::string* x); - private: - const std::string& _internal_x() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_x(const std::string& value); - std::string* _internal_mutable_x(); - public: - - // required bytes y = 2; - bool has_y() const; - private: - bool _internal_has_y() const; - public: - void clear_y(); - const std::string& y() const; - template - void set_y(ArgT0&& arg0, ArgT... args); - std::string* mutable_y(); - PROTOBUF_NODISCARD std::string* release_y(); - void set_allocated_y(std::string* y); - private: - const std::string& _internal_y() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_y(const std::string& value); - std::string* _internal_mutable_y(); - public: - - // @@protoc_insertion_point(class_scope:securemessage.EcP256PublicKey) - private: - class _Internal; - - // helper for ByteSizeLong() - size_t RequiredFieldsByteSizeFallback() const; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr x_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr y_; - friend struct ::TableStruct_proto_2fsecuremessage_2eproto; -}; -// ------------------------------------------------------------------- - -class SimpleRsaPublicKey final : - public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:securemessage.SimpleRsaPublicKey) */ { - public: - inline SimpleRsaPublicKey() : SimpleRsaPublicKey(nullptr) {} - ~SimpleRsaPublicKey() override; - explicit constexpr SimpleRsaPublicKey(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - SimpleRsaPublicKey(const SimpleRsaPublicKey& from); - SimpleRsaPublicKey(SimpleRsaPublicKey&& from) noexcept - : SimpleRsaPublicKey() { - *this = ::std::move(from); - } - - inline SimpleRsaPublicKey& operator=(const SimpleRsaPublicKey& from) { - CopyFrom(from); - return *this; - } - inline SimpleRsaPublicKey& operator=(SimpleRsaPublicKey&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); - } - inline std::string* mutable_unknown_fields() { - return _internal_metadata_.mutable_unknown_fields(); - } - - static const SimpleRsaPublicKey& default_instance() { - return *internal_default_instance(); - } - static inline const SimpleRsaPublicKey* internal_default_instance() { - return reinterpret_cast( - &_SimpleRsaPublicKey_default_instance_); - } - static constexpr int kIndexInFileMessages = - 5; - - friend void swap(SimpleRsaPublicKey& a, SimpleRsaPublicKey& b) { - a.Swap(&b); - } - inline void Swap(SimpleRsaPublicKey* 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(SimpleRsaPublicKey* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - SimpleRsaPublicKey* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; - void CopyFrom(const SimpleRsaPublicKey& from); - void MergeFrom(const SimpleRsaPublicKey& 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 _cached_size_.Get(); } - - private: - void SharedCtor(); - void SharedDtor(); - void SetCachedSize(int size) const; - void InternalSwap(SimpleRsaPublicKey* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "securemessage.SimpleRsaPublicKey"; - } - protected: - explicit SimpleRsaPublicKey(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); - private: - static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - public: - - std::string GetTypeName() const final; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kNFieldNumber = 1, - kEFieldNumber = 2, - }; - // required bytes n = 1; - bool has_n() const; - private: - bool _internal_has_n() const; - public: - void clear_n(); - const std::string& n() const; - template - void set_n(ArgT0&& arg0, ArgT... args); - std::string* mutable_n(); - PROTOBUF_NODISCARD std::string* release_n(); - void set_allocated_n(std::string* n); - private: - const std::string& _internal_n() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_n(const std::string& value); - std::string* _internal_mutable_n(); - public: - - // optional int32 e = 2 [default = 65537]; - bool has_e() const; - private: - bool _internal_has_e() const; - public: - void clear_e(); - int32_t e() const; - void set_e(int32_t value); - private: - int32_t _internal_e() const; - void _internal_set_e(int32_t value); - public: - - // @@protoc_insertion_point(class_scope:securemessage.SimpleRsaPublicKey) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr n_; - int32_t e_; - friend struct ::TableStruct_proto_2fsecuremessage_2eproto; -}; -// ------------------------------------------------------------------- - -class DhPublicKey final : - public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:securemessage.DhPublicKey) */ { - public: - inline DhPublicKey() : DhPublicKey(nullptr) {} - ~DhPublicKey() override; - explicit constexpr DhPublicKey(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - DhPublicKey(const DhPublicKey& from); - DhPublicKey(DhPublicKey&& from) noexcept - : DhPublicKey() { - *this = ::std::move(from); - } - - inline DhPublicKey& operator=(const DhPublicKey& from) { - CopyFrom(from); - return *this; - } - inline DhPublicKey& operator=(DhPublicKey&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); - } - inline std::string* mutable_unknown_fields() { - return _internal_metadata_.mutable_unknown_fields(); - } - - static const DhPublicKey& default_instance() { - return *internal_default_instance(); - } - static inline const DhPublicKey* internal_default_instance() { - return reinterpret_cast( - &_DhPublicKey_default_instance_); - } - static constexpr int kIndexInFileMessages = - 6; - - friend void swap(DhPublicKey& a, DhPublicKey& b) { - a.Swap(&b); - } - inline void Swap(DhPublicKey* 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(DhPublicKey* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - DhPublicKey* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; - void CopyFrom(const DhPublicKey& from); - void MergeFrom(const DhPublicKey& 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 _cached_size_.Get(); } - - private: - void SharedCtor(); - void SharedDtor(); - void SetCachedSize(int size) const; - void InternalSwap(DhPublicKey* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "securemessage.DhPublicKey"; - } - protected: - explicit DhPublicKey(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); - private: - static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - public: - - std::string GetTypeName() const final; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kYFieldNumber = 1, - }; - // required bytes y = 1; - bool has_y() const; - private: - bool _internal_has_y() const; - public: - void clear_y(); - const std::string& y() const; - template - void set_y(ArgT0&& arg0, ArgT... args); - std::string* mutable_y(); - PROTOBUF_NODISCARD std::string* release_y(); - void set_allocated_y(std::string* y); - private: - const std::string& _internal_y() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_y(const std::string& value); - std::string* _internal_mutable_y(); - public: - - // @@protoc_insertion_point(class_scope:securemessage.DhPublicKey) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr y_; - friend struct ::TableStruct_proto_2fsecuremessage_2eproto; -}; -// ------------------------------------------------------------------- - -class GenericPublicKey final : - public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:securemessage.GenericPublicKey) */ { - public: - inline GenericPublicKey() : GenericPublicKey(nullptr) {} - ~GenericPublicKey() override; - explicit constexpr GenericPublicKey(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - GenericPublicKey(const GenericPublicKey& from); - GenericPublicKey(GenericPublicKey&& from) noexcept - : GenericPublicKey() { - *this = ::std::move(from); - } - - inline GenericPublicKey& operator=(const GenericPublicKey& from) { - CopyFrom(from); - return *this; - } - inline GenericPublicKey& operator=(GenericPublicKey&& 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(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); - } - inline std::string* mutable_unknown_fields() { - return _internal_metadata_.mutable_unknown_fields(); - } - - static const GenericPublicKey& default_instance() { - return *internal_default_instance(); - } - static inline const GenericPublicKey* internal_default_instance() { - return reinterpret_cast( - &_GenericPublicKey_default_instance_); - } - static constexpr int kIndexInFileMessages = - 7; - - friend void swap(GenericPublicKey& a, GenericPublicKey& b) { - a.Swap(&b); - } - inline void Swap(GenericPublicKey* 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(GenericPublicKey* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - GenericPublicKey* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; - void CopyFrom(const GenericPublicKey& from); - void MergeFrom(const GenericPublicKey& 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 _cached_size_.Get(); } - - private: - void SharedCtor(); - void SharedDtor(); - void SetCachedSize(int size) const; - void InternalSwap(GenericPublicKey* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "securemessage.GenericPublicKey"; - } - protected: - explicit GenericPublicKey(::PROTOBUF_NAMESPACE_ID::Arena* arena, - bool is_message_owned = false); - private: - static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - public: - - std::string GetTypeName() const final; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kEcP256PublicKeyFieldNumber = 2, - kRsa2048PublicKeyFieldNumber = 3, - kDh2048PublicKeyFieldNumber = 4, - kTypeFieldNumber = 1, - }; - // optional .securemessage.EcP256PublicKey ec_p256_public_key = 2; - bool has_ec_p256_public_key() const; - private: - bool _internal_has_ec_p256_public_key() const; - public: - void clear_ec_p256_public_key(); - const ::securemessage::EcP256PublicKey& ec_p256_public_key() const; - PROTOBUF_NODISCARD ::securemessage::EcP256PublicKey* release_ec_p256_public_key(); - ::securemessage::EcP256PublicKey* mutable_ec_p256_public_key(); - void set_allocated_ec_p256_public_key(::securemessage::EcP256PublicKey* ec_p256_public_key); - private: - const ::securemessage::EcP256PublicKey& _internal_ec_p256_public_key() const; - ::securemessage::EcP256PublicKey* _internal_mutable_ec_p256_public_key(); - public: - void unsafe_arena_set_allocated_ec_p256_public_key( - ::securemessage::EcP256PublicKey* ec_p256_public_key); - ::securemessage::EcP256PublicKey* unsafe_arena_release_ec_p256_public_key(); - - // optional .securemessage.SimpleRsaPublicKey rsa2048_public_key = 3; - bool has_rsa2048_public_key() const; - private: - bool _internal_has_rsa2048_public_key() const; - public: - void clear_rsa2048_public_key(); - const ::securemessage::SimpleRsaPublicKey& rsa2048_public_key() const; - PROTOBUF_NODISCARD ::securemessage::SimpleRsaPublicKey* release_rsa2048_public_key(); - ::securemessage::SimpleRsaPublicKey* mutable_rsa2048_public_key(); - void set_allocated_rsa2048_public_key(::securemessage::SimpleRsaPublicKey* rsa2048_public_key); - private: - const ::securemessage::SimpleRsaPublicKey& _internal_rsa2048_public_key() const; - ::securemessage::SimpleRsaPublicKey* _internal_mutable_rsa2048_public_key(); - public: - void unsafe_arena_set_allocated_rsa2048_public_key( - ::securemessage::SimpleRsaPublicKey* rsa2048_public_key); - ::securemessage::SimpleRsaPublicKey* unsafe_arena_release_rsa2048_public_key(); - - // optional .securemessage.DhPublicKey dh2048_public_key = 4; - bool has_dh2048_public_key() const; - private: - bool _internal_has_dh2048_public_key() const; - public: - void clear_dh2048_public_key(); - const ::securemessage::DhPublicKey& dh2048_public_key() const; - PROTOBUF_NODISCARD ::securemessage::DhPublicKey* release_dh2048_public_key(); - ::securemessage::DhPublicKey* mutable_dh2048_public_key(); - void set_allocated_dh2048_public_key(::securemessage::DhPublicKey* dh2048_public_key); - private: - const ::securemessage::DhPublicKey& _internal_dh2048_public_key() const; - ::securemessage::DhPublicKey* _internal_mutable_dh2048_public_key(); - public: - void unsafe_arena_set_allocated_dh2048_public_key( - ::securemessage::DhPublicKey* dh2048_public_key); - ::securemessage::DhPublicKey* unsafe_arena_release_dh2048_public_key(); - - // required .securemessage.PublicKeyType type = 1; - bool has_type() const; - private: - bool _internal_has_type() const; - public: - void clear_type(); - ::securemessage::PublicKeyType type() const; - void set_type(::securemessage::PublicKeyType value); - private: - ::securemessage::PublicKeyType _internal_type() const; - void _internal_set_type(::securemessage::PublicKeyType value); - public: - - // @@protoc_insertion_point(class_scope:securemessage.GenericPublicKey) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - ::securemessage::EcP256PublicKey* ec_p256_public_key_; - ::securemessage::SimpleRsaPublicKey* rsa2048_public_key_; - ::securemessage::DhPublicKey* dh2048_public_key_; - int type_; - friend struct ::TableStruct_proto_2fsecuremessage_2eproto; -}; -// =================================================================== - - -// =================================================================== - -#ifdef __GNUC__ - #pragma GCC diagnostic push - #pragma GCC diagnostic ignored "-Wstrict-aliasing" -#endif // __GNUC__ -// SecureMessage - -// required bytes header_and_body = 1; -inline bool SecureMessage::_internal_has_header_and_body() const { - bool value = (_has_bits_[0] & 0x00000001u) != 0; - return value; -} -inline bool SecureMessage::has_header_and_body() const { - return _internal_has_header_and_body(); -} -inline void SecureMessage::clear_header_and_body() { - header_and_body_.ClearToEmpty(); - _has_bits_[0] &= ~0x00000001u; -} -inline const std::string& SecureMessage::header_and_body() const { - // @@protoc_insertion_point(field_get:securemessage.SecureMessage.header_and_body) - return _internal_header_and_body(); -} -template -inline PROTOBUF_ALWAYS_INLINE -void SecureMessage::set_header_and_body(ArgT0&& arg0, ArgT... args) { - _has_bits_[0] |= 0x00000001u; - header_and_body_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:securemessage.SecureMessage.header_and_body) -} -inline std::string* SecureMessage::mutable_header_and_body() { - std::string* _s = _internal_mutable_header_and_body(); - // @@protoc_insertion_point(field_mutable:securemessage.SecureMessage.header_and_body) - return _s; -} -inline const std::string& SecureMessage::_internal_header_and_body() const { - return header_and_body_.Get(); -} -inline void SecureMessage::_internal_set_header_and_body(const std::string& value) { - _has_bits_[0] |= 0x00000001u; - header_and_body_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); -} -inline std::string* SecureMessage::_internal_mutable_header_and_body() { - _has_bits_[0] |= 0x00000001u; - return header_and_body_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); -} -inline std::string* SecureMessage::release_header_and_body() { - // @@protoc_insertion_point(field_release:securemessage.SecureMessage.header_and_body) - if (!_internal_has_header_and_body()) { - return nullptr; - } - _has_bits_[0] &= ~0x00000001u; - auto* p = header_and_body_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (header_and_body_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { - header_and_body_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - return p; -} -inline void SecureMessage::set_allocated_header_and_body(std::string* header_and_body) { - if (header_and_body != nullptr) { - _has_bits_[0] |= 0x00000001u; - } else { - _has_bits_[0] &= ~0x00000001u; - } - header_and_body_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), header_and_body, - GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (header_and_body_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { - header_and_body_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - // @@protoc_insertion_point(field_set_allocated:securemessage.SecureMessage.header_and_body) -} - -// required bytes signature = 2; -inline bool SecureMessage::_internal_has_signature() const { - bool value = (_has_bits_[0] & 0x00000002u) != 0; - return value; -} -inline bool SecureMessage::has_signature() const { - return _internal_has_signature(); -} -inline void SecureMessage::clear_signature() { - signature_.ClearToEmpty(); - _has_bits_[0] &= ~0x00000002u; -} -inline const std::string& SecureMessage::signature() const { - // @@protoc_insertion_point(field_get:securemessage.SecureMessage.signature) - return _internal_signature(); -} -template -inline PROTOBUF_ALWAYS_INLINE -void SecureMessage::set_signature(ArgT0&& arg0, ArgT... args) { - _has_bits_[0] |= 0x00000002u; - signature_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:securemessage.SecureMessage.signature) -} -inline std::string* SecureMessage::mutable_signature() { - std::string* _s = _internal_mutable_signature(); - // @@protoc_insertion_point(field_mutable:securemessage.SecureMessage.signature) - return _s; -} -inline const std::string& SecureMessage::_internal_signature() const { - return signature_.Get(); -} -inline void SecureMessage::_internal_set_signature(const std::string& value) { - _has_bits_[0] |= 0x00000002u; - signature_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); -} -inline std::string* SecureMessage::_internal_mutable_signature() { - _has_bits_[0] |= 0x00000002u; - return signature_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); -} -inline std::string* SecureMessage::release_signature() { - // @@protoc_insertion_point(field_release:securemessage.SecureMessage.signature) - if (!_internal_has_signature()) { - return nullptr; - } - _has_bits_[0] &= ~0x00000002u; - auto* p = signature_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (signature_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { - signature_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - return p; -} -inline void SecureMessage::set_allocated_signature(std::string* signature) { - if (signature != nullptr) { - _has_bits_[0] |= 0x00000002u; - } else { - _has_bits_[0] &= ~0x00000002u; - } - signature_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), signature, - GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (signature_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { - signature_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - // @@protoc_insertion_point(field_set_allocated:securemessage.SecureMessage.signature) -} - -// ------------------------------------------------------------------- - -// Header - -// required .securemessage.SigScheme signature_scheme = 1; -inline bool Header::_internal_has_signature_scheme() const { - bool value = (_has_bits_[0] & 0x00000020u) != 0; - return value; -} -inline bool Header::has_signature_scheme() const { - return _internal_has_signature_scheme(); -} -inline void Header::clear_signature_scheme() { - signature_scheme_ = 1; - _has_bits_[0] &= ~0x00000020u; -} -inline ::securemessage::SigScheme Header::_internal_signature_scheme() const { - return static_cast< ::securemessage::SigScheme >(signature_scheme_); -} -inline ::securemessage::SigScheme Header::signature_scheme() const { - // @@protoc_insertion_point(field_get:securemessage.Header.signature_scheme) - return _internal_signature_scheme(); -} -inline void Header::_internal_set_signature_scheme(::securemessage::SigScheme value) { - assert(::securemessage::SigScheme_IsValid(value)); - _has_bits_[0] |= 0x00000020u; - signature_scheme_ = value; -} -inline void Header::set_signature_scheme(::securemessage::SigScheme value) { - _internal_set_signature_scheme(value); - // @@protoc_insertion_point(field_set:securemessage.Header.signature_scheme) -} - -// required .securemessage.EncScheme encryption_scheme = 2; -inline bool Header::_internal_has_encryption_scheme() const { - bool value = (_has_bits_[0] & 0x00000040u) != 0; - return value; -} -inline bool Header::has_encryption_scheme() const { - return _internal_has_encryption_scheme(); -} -inline void Header::clear_encryption_scheme() { - encryption_scheme_ = 1; - _has_bits_[0] &= ~0x00000040u; -} -inline ::securemessage::EncScheme Header::_internal_encryption_scheme() const { - return static_cast< ::securemessage::EncScheme >(encryption_scheme_); -} -inline ::securemessage::EncScheme Header::encryption_scheme() const { - // @@protoc_insertion_point(field_get:securemessage.Header.encryption_scheme) - return _internal_encryption_scheme(); -} -inline void Header::_internal_set_encryption_scheme(::securemessage::EncScheme value) { - assert(::securemessage::EncScheme_IsValid(value)); - _has_bits_[0] |= 0x00000040u; - encryption_scheme_ = value; -} -inline void Header::set_encryption_scheme(::securemessage::EncScheme value) { - _internal_set_encryption_scheme(value); - // @@protoc_insertion_point(field_set:securemessage.Header.encryption_scheme) -} - -// optional bytes verification_key_id = 3; -inline bool Header::_internal_has_verification_key_id() const { - bool value = (_has_bits_[0] & 0x00000001u) != 0; - return value; -} -inline bool Header::has_verification_key_id() const { - return _internal_has_verification_key_id(); -} -inline void Header::clear_verification_key_id() { - verification_key_id_.ClearToEmpty(); - _has_bits_[0] &= ~0x00000001u; -} -inline const std::string& Header::verification_key_id() const { - // @@protoc_insertion_point(field_get:securemessage.Header.verification_key_id) - return _internal_verification_key_id(); -} -template -inline PROTOBUF_ALWAYS_INLINE -void Header::set_verification_key_id(ArgT0&& arg0, ArgT... args) { - _has_bits_[0] |= 0x00000001u; - verification_key_id_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:securemessage.Header.verification_key_id) -} -inline std::string* Header::mutable_verification_key_id() { - std::string* _s = _internal_mutable_verification_key_id(); - // @@protoc_insertion_point(field_mutable:securemessage.Header.verification_key_id) - return _s; -} -inline const std::string& Header::_internal_verification_key_id() const { - return verification_key_id_.Get(); -} -inline void Header::_internal_set_verification_key_id(const std::string& value) { - _has_bits_[0] |= 0x00000001u; - verification_key_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); -} -inline std::string* Header::_internal_mutable_verification_key_id() { - _has_bits_[0] |= 0x00000001u; - return verification_key_id_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); -} -inline std::string* Header::release_verification_key_id() { - // @@protoc_insertion_point(field_release:securemessage.Header.verification_key_id) - if (!_internal_has_verification_key_id()) { - return nullptr; - } - _has_bits_[0] &= ~0x00000001u; - auto* p = verification_key_id_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (verification_key_id_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { - verification_key_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - return p; -} -inline void Header::set_allocated_verification_key_id(std::string* verification_key_id) { - if (verification_key_id != nullptr) { - _has_bits_[0] |= 0x00000001u; - } else { - _has_bits_[0] &= ~0x00000001u; - } - verification_key_id_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), verification_key_id, - GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (verification_key_id_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { - verification_key_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - // @@protoc_insertion_point(field_set_allocated:securemessage.Header.verification_key_id) -} - -// optional bytes decryption_key_id = 4; -inline bool Header::_internal_has_decryption_key_id() const { - bool value = (_has_bits_[0] & 0x00000002u) != 0; - return value; -} -inline bool Header::has_decryption_key_id() const { - return _internal_has_decryption_key_id(); -} -inline void Header::clear_decryption_key_id() { - decryption_key_id_.ClearToEmpty(); - _has_bits_[0] &= ~0x00000002u; -} -inline const std::string& Header::decryption_key_id() const { - // @@protoc_insertion_point(field_get:securemessage.Header.decryption_key_id) - return _internal_decryption_key_id(); -} -template -inline PROTOBUF_ALWAYS_INLINE -void Header::set_decryption_key_id(ArgT0&& arg0, ArgT... args) { - _has_bits_[0] |= 0x00000002u; - decryption_key_id_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:securemessage.Header.decryption_key_id) -} -inline std::string* Header::mutable_decryption_key_id() { - std::string* _s = _internal_mutable_decryption_key_id(); - // @@protoc_insertion_point(field_mutable:securemessage.Header.decryption_key_id) - return _s; -} -inline const std::string& Header::_internal_decryption_key_id() const { - return decryption_key_id_.Get(); -} -inline void Header::_internal_set_decryption_key_id(const std::string& value) { - _has_bits_[0] |= 0x00000002u; - decryption_key_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); -} -inline std::string* Header::_internal_mutable_decryption_key_id() { - _has_bits_[0] |= 0x00000002u; - return decryption_key_id_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); -} -inline std::string* Header::release_decryption_key_id() { - // @@protoc_insertion_point(field_release:securemessage.Header.decryption_key_id) - if (!_internal_has_decryption_key_id()) { - return nullptr; - } - _has_bits_[0] &= ~0x00000002u; - auto* p = decryption_key_id_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (decryption_key_id_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { - decryption_key_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - return p; -} -inline void Header::set_allocated_decryption_key_id(std::string* decryption_key_id) { - if (decryption_key_id != nullptr) { - _has_bits_[0] |= 0x00000002u; - } else { - _has_bits_[0] &= ~0x00000002u; - } - decryption_key_id_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), decryption_key_id, - GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (decryption_key_id_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { - decryption_key_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - // @@protoc_insertion_point(field_set_allocated:securemessage.Header.decryption_key_id) -} - -// optional bytes iv = 5; -inline bool Header::_internal_has_iv() const { - bool value = (_has_bits_[0] & 0x00000004u) != 0; - return value; -} -inline bool Header::has_iv() const { - return _internal_has_iv(); -} -inline void Header::clear_iv() { - iv_.ClearToEmpty(); - _has_bits_[0] &= ~0x00000004u; -} -inline const std::string& Header::iv() const { - // @@protoc_insertion_point(field_get:securemessage.Header.iv) - return _internal_iv(); -} -template -inline PROTOBUF_ALWAYS_INLINE -void Header::set_iv(ArgT0&& arg0, ArgT... args) { - _has_bits_[0] |= 0x00000004u; - iv_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:securemessage.Header.iv) -} -inline std::string* Header::mutable_iv() { - std::string* _s = _internal_mutable_iv(); - // @@protoc_insertion_point(field_mutable:securemessage.Header.iv) - return _s; -} -inline const std::string& Header::_internal_iv() const { - return iv_.Get(); -} -inline void Header::_internal_set_iv(const std::string& value) { - _has_bits_[0] |= 0x00000004u; - iv_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); -} -inline std::string* Header::_internal_mutable_iv() { - _has_bits_[0] |= 0x00000004u; - return iv_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); -} -inline std::string* Header::release_iv() { - // @@protoc_insertion_point(field_release:securemessage.Header.iv) - if (!_internal_has_iv()) { - return nullptr; - } - _has_bits_[0] &= ~0x00000004u; - auto* p = iv_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (iv_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { - iv_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - return p; -} -inline void Header::set_allocated_iv(std::string* iv) { - if (iv != nullptr) { - _has_bits_[0] |= 0x00000004u; - } else { - _has_bits_[0] &= ~0x00000004u; - } - iv_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), iv, - GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (iv_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { - iv_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - // @@protoc_insertion_point(field_set_allocated:securemessage.Header.iv) -} - -// optional bytes public_metadata = 6; -inline bool Header::_internal_has_public_metadata() const { - bool value = (_has_bits_[0] & 0x00000008u) != 0; - return value; -} -inline bool Header::has_public_metadata() const { - return _internal_has_public_metadata(); -} -inline void Header::clear_public_metadata() { - public_metadata_.ClearToEmpty(); - _has_bits_[0] &= ~0x00000008u; -} -inline const std::string& Header::public_metadata() const { - // @@protoc_insertion_point(field_get:securemessage.Header.public_metadata) - return _internal_public_metadata(); -} -template -inline PROTOBUF_ALWAYS_INLINE -void Header::set_public_metadata(ArgT0&& arg0, ArgT... args) { - _has_bits_[0] |= 0x00000008u; - public_metadata_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:securemessage.Header.public_metadata) -} -inline std::string* Header::mutable_public_metadata() { - std::string* _s = _internal_mutable_public_metadata(); - // @@protoc_insertion_point(field_mutable:securemessage.Header.public_metadata) - return _s; -} -inline const std::string& Header::_internal_public_metadata() const { - return public_metadata_.Get(); -} -inline void Header::_internal_set_public_metadata(const std::string& value) { - _has_bits_[0] |= 0x00000008u; - public_metadata_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); -} -inline std::string* Header::_internal_mutable_public_metadata() { - _has_bits_[0] |= 0x00000008u; - return public_metadata_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); -} -inline std::string* Header::release_public_metadata() { - // @@protoc_insertion_point(field_release:securemessage.Header.public_metadata) - if (!_internal_has_public_metadata()) { - return nullptr; - } - _has_bits_[0] &= ~0x00000008u; - auto* p = public_metadata_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (public_metadata_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { - public_metadata_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - return p; -} -inline void Header::set_allocated_public_metadata(std::string* public_metadata) { - if (public_metadata != nullptr) { - _has_bits_[0] |= 0x00000008u; - } else { - _has_bits_[0] &= ~0x00000008u; - } - public_metadata_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), public_metadata, - GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (public_metadata_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { - public_metadata_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - // @@protoc_insertion_point(field_set_allocated:securemessage.Header.public_metadata) -} - -// optional uint32 associated_data_length = 7 [default = 0]; -inline bool Header::_internal_has_associated_data_length() const { - bool value = (_has_bits_[0] & 0x00000010u) != 0; - return value; -} -inline bool Header::has_associated_data_length() const { - return _internal_has_associated_data_length(); -} -inline void Header::clear_associated_data_length() { - associated_data_length_ = 0u; - _has_bits_[0] &= ~0x00000010u; -} -inline uint32_t Header::_internal_associated_data_length() const { - return associated_data_length_; -} -inline uint32_t Header::associated_data_length() const { - // @@protoc_insertion_point(field_get:securemessage.Header.associated_data_length) - return _internal_associated_data_length(); -} -inline void Header::_internal_set_associated_data_length(uint32_t value) { - _has_bits_[0] |= 0x00000010u; - associated_data_length_ = value; -} -inline void Header::set_associated_data_length(uint32_t value) { - _internal_set_associated_data_length(value); - // @@protoc_insertion_point(field_set:securemessage.Header.associated_data_length) -} - -// ------------------------------------------------------------------- - -// HeaderAndBody - -// required .securemessage.Header header = 1; -inline bool HeaderAndBody::_internal_has_header() const { - bool value = (_has_bits_[0] & 0x00000002u) != 0; - PROTOBUF_ASSUME(!value || header_ != nullptr); - return value; -} -inline bool HeaderAndBody::has_header() const { - return _internal_has_header(); -} -inline void HeaderAndBody::clear_header() { - if (header_ != nullptr) header_->Clear(); - _has_bits_[0] &= ~0x00000002u; -} -inline const ::securemessage::Header& HeaderAndBody::_internal_header() const { - const ::securemessage::Header* p = header_; - return p != nullptr ? *p : reinterpret_cast( - ::securemessage::_Header_default_instance_); -} -inline const ::securemessage::Header& HeaderAndBody::header() const { - // @@protoc_insertion_point(field_get:securemessage.HeaderAndBody.header) - return _internal_header(); -} -inline void HeaderAndBody::unsafe_arena_set_allocated_header( - ::securemessage::Header* header) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(header_); - } - header_ = header; - if (header) { - _has_bits_[0] |= 0x00000002u; - } else { - _has_bits_[0] &= ~0x00000002u; - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:securemessage.HeaderAndBody.header) -} -inline ::securemessage::Header* HeaderAndBody::release_header() { - _has_bits_[0] &= ~0x00000002u; - ::securemessage::Header* temp = header_; - header_ = 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 ::securemessage::Header* HeaderAndBody::unsafe_arena_release_header() { - // @@protoc_insertion_point(field_release:securemessage.HeaderAndBody.header) - _has_bits_[0] &= ~0x00000002u; - ::securemessage::Header* temp = header_; - header_ = nullptr; - return temp; -} -inline ::securemessage::Header* HeaderAndBody::_internal_mutable_header() { - _has_bits_[0] |= 0x00000002u; - if (header_ == nullptr) { - auto* p = CreateMaybeMessage<::securemessage::Header>(GetArenaForAllocation()); - header_ = p; - } - return header_; -} -inline ::securemessage::Header* HeaderAndBody::mutable_header() { - ::securemessage::Header* _msg = _internal_mutable_header(); - // @@protoc_insertion_point(field_mutable:securemessage.HeaderAndBody.header) - return _msg; -} -inline void HeaderAndBody::set_allocated_header(::securemessage::Header* header) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); - if (message_arena == nullptr) { - delete header_; - } - if (header) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::securemessage::Header>::GetOwningArena(header); - if (message_arena != submessage_arena) { - header = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, header, submessage_arena); - } - _has_bits_[0] |= 0x00000002u; - } else { - _has_bits_[0] &= ~0x00000002u; - } - header_ = header; - // @@protoc_insertion_point(field_set_allocated:securemessage.HeaderAndBody.header) -} - -// required bytes body = 2; -inline bool HeaderAndBody::_internal_has_body() const { - bool value = (_has_bits_[0] & 0x00000001u) != 0; - return value; -} -inline bool HeaderAndBody::has_body() const { - return _internal_has_body(); -} -inline void HeaderAndBody::clear_body() { - body_.ClearToEmpty(); - _has_bits_[0] &= ~0x00000001u; -} -inline const std::string& HeaderAndBody::body() const { - // @@protoc_insertion_point(field_get:securemessage.HeaderAndBody.body) - return _internal_body(); -} -template -inline PROTOBUF_ALWAYS_INLINE -void HeaderAndBody::set_body(ArgT0&& arg0, ArgT... args) { - _has_bits_[0] |= 0x00000001u; - body_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:securemessage.HeaderAndBody.body) -} -inline std::string* HeaderAndBody::mutable_body() { - std::string* _s = _internal_mutable_body(); - // @@protoc_insertion_point(field_mutable:securemessage.HeaderAndBody.body) - return _s; -} -inline const std::string& HeaderAndBody::_internal_body() const { - return body_.Get(); -} -inline void HeaderAndBody::_internal_set_body(const std::string& value) { - _has_bits_[0] |= 0x00000001u; - body_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); -} -inline std::string* HeaderAndBody::_internal_mutable_body() { - _has_bits_[0] |= 0x00000001u; - return body_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); -} -inline std::string* HeaderAndBody::release_body() { - // @@protoc_insertion_point(field_release:securemessage.HeaderAndBody.body) - if (!_internal_has_body()) { - return nullptr; - } - _has_bits_[0] &= ~0x00000001u; - auto* p = body_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (body_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { - body_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - return p; -} -inline void HeaderAndBody::set_allocated_body(std::string* body) { - if (body != nullptr) { - _has_bits_[0] |= 0x00000001u; - } else { - _has_bits_[0] &= ~0x00000001u; - } - body_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), body, - GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (body_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { - body_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - // @@protoc_insertion_point(field_set_allocated:securemessage.HeaderAndBody.body) -} - -// ------------------------------------------------------------------- - -// HeaderAndBodyInternal - -// required bytes header = 1; -inline bool HeaderAndBodyInternal::_internal_has_header() const { - bool value = (_has_bits_[0] & 0x00000001u) != 0; - return value; -} -inline bool HeaderAndBodyInternal::has_header() const { - return _internal_has_header(); -} -inline void HeaderAndBodyInternal::clear_header() { - header_.ClearToEmpty(); - _has_bits_[0] &= ~0x00000001u; -} -inline const std::string& HeaderAndBodyInternal::header() const { - // @@protoc_insertion_point(field_get:securemessage.HeaderAndBodyInternal.header) - return _internal_header(); -} -template -inline PROTOBUF_ALWAYS_INLINE -void HeaderAndBodyInternal::set_header(ArgT0&& arg0, ArgT... args) { - _has_bits_[0] |= 0x00000001u; - header_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:securemessage.HeaderAndBodyInternal.header) -} -inline std::string* HeaderAndBodyInternal::mutable_header() { - std::string* _s = _internal_mutable_header(); - // @@protoc_insertion_point(field_mutable:securemessage.HeaderAndBodyInternal.header) - return _s; -} -inline const std::string& HeaderAndBodyInternal::_internal_header() const { - return header_.Get(); -} -inline void HeaderAndBodyInternal::_internal_set_header(const std::string& value) { - _has_bits_[0] |= 0x00000001u; - header_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); -} -inline std::string* HeaderAndBodyInternal::_internal_mutable_header() { - _has_bits_[0] |= 0x00000001u; - return header_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); -} -inline std::string* HeaderAndBodyInternal::release_header() { - // @@protoc_insertion_point(field_release:securemessage.HeaderAndBodyInternal.header) - if (!_internal_has_header()) { - return nullptr; - } - _has_bits_[0] &= ~0x00000001u; - auto* p = header_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (header_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { - header_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - return p; -} -inline void HeaderAndBodyInternal::set_allocated_header(std::string* header) { - if (header != nullptr) { - _has_bits_[0] |= 0x00000001u; - } else { - _has_bits_[0] &= ~0x00000001u; - } - header_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), header, - GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (header_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { - header_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - // @@protoc_insertion_point(field_set_allocated:securemessage.HeaderAndBodyInternal.header) -} - -// required bytes body = 2; -inline bool HeaderAndBodyInternal::_internal_has_body() const { - bool value = (_has_bits_[0] & 0x00000002u) != 0; - return value; -} -inline bool HeaderAndBodyInternal::has_body() const { - return _internal_has_body(); -} -inline void HeaderAndBodyInternal::clear_body() { - body_.ClearToEmpty(); - _has_bits_[0] &= ~0x00000002u; -} -inline const std::string& HeaderAndBodyInternal::body() const { - // @@protoc_insertion_point(field_get:securemessage.HeaderAndBodyInternal.body) - return _internal_body(); -} -template -inline PROTOBUF_ALWAYS_INLINE -void HeaderAndBodyInternal::set_body(ArgT0&& arg0, ArgT... args) { - _has_bits_[0] |= 0x00000002u; - body_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:securemessage.HeaderAndBodyInternal.body) -} -inline std::string* HeaderAndBodyInternal::mutable_body() { - std::string* _s = _internal_mutable_body(); - // @@protoc_insertion_point(field_mutable:securemessage.HeaderAndBodyInternal.body) - return _s; -} -inline const std::string& HeaderAndBodyInternal::_internal_body() const { - return body_.Get(); -} -inline void HeaderAndBodyInternal::_internal_set_body(const std::string& value) { - _has_bits_[0] |= 0x00000002u; - body_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); -} -inline std::string* HeaderAndBodyInternal::_internal_mutable_body() { - _has_bits_[0] |= 0x00000002u; - return body_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); -} -inline std::string* HeaderAndBodyInternal::release_body() { - // @@protoc_insertion_point(field_release:securemessage.HeaderAndBodyInternal.body) - if (!_internal_has_body()) { - return nullptr; - } - _has_bits_[0] &= ~0x00000002u; - auto* p = body_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (body_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { - body_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - return p; -} -inline void HeaderAndBodyInternal::set_allocated_body(std::string* body) { - if (body != nullptr) { - _has_bits_[0] |= 0x00000002u; - } else { - _has_bits_[0] &= ~0x00000002u; - } - body_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), body, - GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (body_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { - body_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - // @@protoc_insertion_point(field_set_allocated:securemessage.HeaderAndBodyInternal.body) -} - -// ------------------------------------------------------------------- - -// EcP256PublicKey - -// required bytes x = 1; -inline bool EcP256PublicKey::_internal_has_x() const { - bool value = (_has_bits_[0] & 0x00000001u) != 0; - return value; -} -inline bool EcP256PublicKey::has_x() const { - return _internal_has_x(); -} -inline void EcP256PublicKey::clear_x() { - x_.ClearToEmpty(); - _has_bits_[0] &= ~0x00000001u; -} -inline const std::string& EcP256PublicKey::x() const { - // @@protoc_insertion_point(field_get:securemessage.EcP256PublicKey.x) - return _internal_x(); -} -template -inline PROTOBUF_ALWAYS_INLINE -void EcP256PublicKey::set_x(ArgT0&& arg0, ArgT... args) { - _has_bits_[0] |= 0x00000001u; - x_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:securemessage.EcP256PublicKey.x) -} -inline std::string* EcP256PublicKey::mutable_x() { - std::string* _s = _internal_mutable_x(); - // @@protoc_insertion_point(field_mutable:securemessage.EcP256PublicKey.x) - return _s; -} -inline const std::string& EcP256PublicKey::_internal_x() const { - return x_.Get(); -} -inline void EcP256PublicKey::_internal_set_x(const std::string& value) { - _has_bits_[0] |= 0x00000001u; - x_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); -} -inline std::string* EcP256PublicKey::_internal_mutable_x() { - _has_bits_[0] |= 0x00000001u; - return x_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); -} -inline std::string* EcP256PublicKey::release_x() { - // @@protoc_insertion_point(field_release:securemessage.EcP256PublicKey.x) - if (!_internal_has_x()) { - return nullptr; - } - _has_bits_[0] &= ~0x00000001u; - auto* p = x_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (x_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { - x_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - return p; -} -inline void EcP256PublicKey::set_allocated_x(std::string* x) { - if (x != nullptr) { - _has_bits_[0] |= 0x00000001u; - } else { - _has_bits_[0] &= ~0x00000001u; - } - x_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), x, - GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (x_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { - x_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - // @@protoc_insertion_point(field_set_allocated:securemessage.EcP256PublicKey.x) -} - -// required bytes y = 2; -inline bool EcP256PublicKey::_internal_has_y() const { - bool value = (_has_bits_[0] & 0x00000002u) != 0; - return value; -} -inline bool EcP256PublicKey::has_y() const { - return _internal_has_y(); -} -inline void EcP256PublicKey::clear_y() { - y_.ClearToEmpty(); - _has_bits_[0] &= ~0x00000002u; -} -inline const std::string& EcP256PublicKey::y() const { - // @@protoc_insertion_point(field_get:securemessage.EcP256PublicKey.y) - return _internal_y(); -} -template -inline PROTOBUF_ALWAYS_INLINE -void EcP256PublicKey::set_y(ArgT0&& arg0, ArgT... args) { - _has_bits_[0] |= 0x00000002u; - y_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:securemessage.EcP256PublicKey.y) -} -inline std::string* EcP256PublicKey::mutable_y() { - std::string* _s = _internal_mutable_y(); - // @@protoc_insertion_point(field_mutable:securemessage.EcP256PublicKey.y) - return _s; -} -inline const std::string& EcP256PublicKey::_internal_y() const { - return y_.Get(); -} -inline void EcP256PublicKey::_internal_set_y(const std::string& value) { - _has_bits_[0] |= 0x00000002u; - y_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); -} -inline std::string* EcP256PublicKey::_internal_mutable_y() { - _has_bits_[0] |= 0x00000002u; - return y_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); -} -inline std::string* EcP256PublicKey::release_y() { - // @@protoc_insertion_point(field_release:securemessage.EcP256PublicKey.y) - if (!_internal_has_y()) { - return nullptr; - } - _has_bits_[0] &= ~0x00000002u; - auto* p = y_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (y_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { - y_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - return p; -} -inline void EcP256PublicKey::set_allocated_y(std::string* y) { - if (y != nullptr) { - _has_bits_[0] |= 0x00000002u; - } else { - _has_bits_[0] &= ~0x00000002u; - } - y_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), y, - GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (y_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { - y_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - // @@protoc_insertion_point(field_set_allocated:securemessage.EcP256PublicKey.y) -} - -// ------------------------------------------------------------------- - -// SimpleRsaPublicKey - -// required bytes n = 1; -inline bool SimpleRsaPublicKey::_internal_has_n() const { - bool value = (_has_bits_[0] & 0x00000001u) != 0; - return value; -} -inline bool SimpleRsaPublicKey::has_n() const { - return _internal_has_n(); -} -inline void SimpleRsaPublicKey::clear_n() { - n_.ClearToEmpty(); - _has_bits_[0] &= ~0x00000001u; -} -inline const std::string& SimpleRsaPublicKey::n() const { - // @@protoc_insertion_point(field_get:securemessage.SimpleRsaPublicKey.n) - return _internal_n(); -} -template -inline PROTOBUF_ALWAYS_INLINE -void SimpleRsaPublicKey::set_n(ArgT0&& arg0, ArgT... args) { - _has_bits_[0] |= 0x00000001u; - n_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:securemessage.SimpleRsaPublicKey.n) -} -inline std::string* SimpleRsaPublicKey::mutable_n() { - std::string* _s = _internal_mutable_n(); - // @@protoc_insertion_point(field_mutable:securemessage.SimpleRsaPublicKey.n) - return _s; -} -inline const std::string& SimpleRsaPublicKey::_internal_n() const { - return n_.Get(); -} -inline void SimpleRsaPublicKey::_internal_set_n(const std::string& value) { - _has_bits_[0] |= 0x00000001u; - n_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); -} -inline std::string* SimpleRsaPublicKey::_internal_mutable_n() { - _has_bits_[0] |= 0x00000001u; - return n_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); -} -inline std::string* SimpleRsaPublicKey::release_n() { - // @@protoc_insertion_point(field_release:securemessage.SimpleRsaPublicKey.n) - if (!_internal_has_n()) { - return nullptr; - } - _has_bits_[0] &= ~0x00000001u; - auto* p = n_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (n_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { - n_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - return p; -} -inline void SimpleRsaPublicKey::set_allocated_n(std::string* n) { - if (n != nullptr) { - _has_bits_[0] |= 0x00000001u; - } else { - _has_bits_[0] &= ~0x00000001u; - } - n_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), n, - GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (n_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { - n_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - // @@protoc_insertion_point(field_set_allocated:securemessage.SimpleRsaPublicKey.n) -} - -// optional int32 e = 2 [default = 65537]; -inline bool SimpleRsaPublicKey::_internal_has_e() const { - bool value = (_has_bits_[0] & 0x00000002u) != 0; - return value; -} -inline bool SimpleRsaPublicKey::has_e() const { - return _internal_has_e(); -} -inline void SimpleRsaPublicKey::clear_e() { - e_ = 65537; - _has_bits_[0] &= ~0x00000002u; -} -inline int32_t SimpleRsaPublicKey::_internal_e() const { - return e_; -} -inline int32_t SimpleRsaPublicKey::e() const { - // @@protoc_insertion_point(field_get:securemessage.SimpleRsaPublicKey.e) - return _internal_e(); -} -inline void SimpleRsaPublicKey::_internal_set_e(int32_t value) { - _has_bits_[0] |= 0x00000002u; - e_ = value; -} -inline void SimpleRsaPublicKey::set_e(int32_t value) { - _internal_set_e(value); - // @@protoc_insertion_point(field_set:securemessage.SimpleRsaPublicKey.e) -} - -// ------------------------------------------------------------------- - -// DhPublicKey - -// required bytes y = 1; -inline bool DhPublicKey::_internal_has_y() const { - bool value = (_has_bits_[0] & 0x00000001u) != 0; - return value; -} -inline bool DhPublicKey::has_y() const { - return _internal_has_y(); -} -inline void DhPublicKey::clear_y() { - y_.ClearToEmpty(); - _has_bits_[0] &= ~0x00000001u; -} -inline const std::string& DhPublicKey::y() const { - // @@protoc_insertion_point(field_get:securemessage.DhPublicKey.y) - return _internal_y(); -} -template -inline PROTOBUF_ALWAYS_INLINE -void DhPublicKey::set_y(ArgT0&& arg0, ArgT... args) { - _has_bits_[0] |= 0x00000001u; - y_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:securemessage.DhPublicKey.y) -} -inline std::string* DhPublicKey::mutable_y() { - std::string* _s = _internal_mutable_y(); - // @@protoc_insertion_point(field_mutable:securemessage.DhPublicKey.y) - return _s; -} -inline const std::string& DhPublicKey::_internal_y() const { - return y_.Get(); -} -inline void DhPublicKey::_internal_set_y(const std::string& value) { - _has_bits_[0] |= 0x00000001u; - y_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); -} -inline std::string* DhPublicKey::_internal_mutable_y() { - _has_bits_[0] |= 0x00000001u; - return y_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); -} -inline std::string* DhPublicKey::release_y() { - // @@protoc_insertion_point(field_release:securemessage.DhPublicKey.y) - if (!_internal_has_y()) { - return nullptr; - } - _has_bits_[0] &= ~0x00000001u; - auto* p = y_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (y_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { - y_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - return p; -} -inline void DhPublicKey::set_allocated_y(std::string* y) { - if (y != nullptr) { - _has_bits_[0] |= 0x00000001u; - } else { - _has_bits_[0] &= ~0x00000001u; - } - y_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), y, - GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (y_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { - y_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - // @@protoc_insertion_point(field_set_allocated:securemessage.DhPublicKey.y) -} - -// ------------------------------------------------------------------- - -// GenericPublicKey - -// required .securemessage.PublicKeyType type = 1; -inline bool GenericPublicKey::_internal_has_type() const { - bool value = (_has_bits_[0] & 0x00000008u) != 0; - return value; -} -inline bool GenericPublicKey::has_type() const { - return _internal_has_type(); -} -inline void GenericPublicKey::clear_type() { - type_ = 1; - _has_bits_[0] &= ~0x00000008u; -} -inline ::securemessage::PublicKeyType GenericPublicKey::_internal_type() const { - return static_cast< ::securemessage::PublicKeyType >(type_); -} -inline ::securemessage::PublicKeyType GenericPublicKey::type() const { - // @@protoc_insertion_point(field_get:securemessage.GenericPublicKey.type) - return _internal_type(); -} -inline void GenericPublicKey::_internal_set_type(::securemessage::PublicKeyType value) { - assert(::securemessage::PublicKeyType_IsValid(value)); - _has_bits_[0] |= 0x00000008u; - type_ = value; -} -inline void GenericPublicKey::set_type(::securemessage::PublicKeyType value) { - _internal_set_type(value); - // @@protoc_insertion_point(field_set:securemessage.GenericPublicKey.type) -} - -// optional .securemessage.EcP256PublicKey ec_p256_public_key = 2; -inline bool GenericPublicKey::_internal_has_ec_p256_public_key() const { - bool value = (_has_bits_[0] & 0x00000001u) != 0; - PROTOBUF_ASSUME(!value || ec_p256_public_key_ != nullptr); - return value; -} -inline bool GenericPublicKey::has_ec_p256_public_key() const { - return _internal_has_ec_p256_public_key(); -} -inline void GenericPublicKey::clear_ec_p256_public_key() { - if (ec_p256_public_key_ != nullptr) ec_p256_public_key_->Clear(); - _has_bits_[0] &= ~0x00000001u; -} -inline const ::securemessage::EcP256PublicKey& GenericPublicKey::_internal_ec_p256_public_key() const { - const ::securemessage::EcP256PublicKey* p = ec_p256_public_key_; - return p != nullptr ? *p : reinterpret_cast( - ::securemessage::_EcP256PublicKey_default_instance_); -} -inline const ::securemessage::EcP256PublicKey& GenericPublicKey::ec_p256_public_key() const { - // @@protoc_insertion_point(field_get:securemessage.GenericPublicKey.ec_p256_public_key) - return _internal_ec_p256_public_key(); -} -inline void GenericPublicKey::unsafe_arena_set_allocated_ec_p256_public_key( - ::securemessage::EcP256PublicKey* ec_p256_public_key) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(ec_p256_public_key_); - } - ec_p256_public_key_ = ec_p256_public_key; - if (ec_p256_public_key) { - _has_bits_[0] |= 0x00000001u; - } else { - _has_bits_[0] &= ~0x00000001u; - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:securemessage.GenericPublicKey.ec_p256_public_key) -} -inline ::securemessage::EcP256PublicKey* GenericPublicKey::release_ec_p256_public_key() { - _has_bits_[0] &= ~0x00000001u; - ::securemessage::EcP256PublicKey* temp = ec_p256_public_key_; - ec_p256_public_key_ = 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 ::securemessage::EcP256PublicKey* GenericPublicKey::unsafe_arena_release_ec_p256_public_key() { - // @@protoc_insertion_point(field_release:securemessage.GenericPublicKey.ec_p256_public_key) - _has_bits_[0] &= ~0x00000001u; - ::securemessage::EcP256PublicKey* temp = ec_p256_public_key_; - ec_p256_public_key_ = nullptr; - return temp; -} -inline ::securemessage::EcP256PublicKey* GenericPublicKey::_internal_mutable_ec_p256_public_key() { - _has_bits_[0] |= 0x00000001u; - if (ec_p256_public_key_ == nullptr) { - auto* p = CreateMaybeMessage<::securemessage::EcP256PublicKey>(GetArenaForAllocation()); - ec_p256_public_key_ = p; - } - return ec_p256_public_key_; -} -inline ::securemessage::EcP256PublicKey* GenericPublicKey::mutable_ec_p256_public_key() { - ::securemessage::EcP256PublicKey* _msg = _internal_mutable_ec_p256_public_key(); - // @@protoc_insertion_point(field_mutable:securemessage.GenericPublicKey.ec_p256_public_key) - return _msg; -} -inline void GenericPublicKey::set_allocated_ec_p256_public_key(::securemessage::EcP256PublicKey* ec_p256_public_key) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); - if (message_arena == nullptr) { - delete ec_p256_public_key_; - } - if (ec_p256_public_key) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::securemessage::EcP256PublicKey>::GetOwningArena(ec_p256_public_key); - if (message_arena != submessage_arena) { - ec_p256_public_key = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, ec_p256_public_key, submessage_arena); - } - _has_bits_[0] |= 0x00000001u; - } else { - _has_bits_[0] &= ~0x00000001u; - } - ec_p256_public_key_ = ec_p256_public_key; - // @@protoc_insertion_point(field_set_allocated:securemessage.GenericPublicKey.ec_p256_public_key) -} - -// optional .securemessage.SimpleRsaPublicKey rsa2048_public_key = 3; -inline bool GenericPublicKey::_internal_has_rsa2048_public_key() const { - bool value = (_has_bits_[0] & 0x00000002u) != 0; - PROTOBUF_ASSUME(!value || rsa2048_public_key_ != nullptr); - return value; -} -inline bool GenericPublicKey::has_rsa2048_public_key() const { - return _internal_has_rsa2048_public_key(); -} -inline void GenericPublicKey::clear_rsa2048_public_key() { - if (rsa2048_public_key_ != nullptr) rsa2048_public_key_->Clear(); - _has_bits_[0] &= ~0x00000002u; -} -inline const ::securemessage::SimpleRsaPublicKey& GenericPublicKey::_internal_rsa2048_public_key() const { - const ::securemessage::SimpleRsaPublicKey* p = rsa2048_public_key_; - return p != nullptr ? *p : reinterpret_cast( - ::securemessage::_SimpleRsaPublicKey_default_instance_); -} -inline const ::securemessage::SimpleRsaPublicKey& GenericPublicKey::rsa2048_public_key() const { - // @@protoc_insertion_point(field_get:securemessage.GenericPublicKey.rsa2048_public_key) - return _internal_rsa2048_public_key(); -} -inline void GenericPublicKey::unsafe_arena_set_allocated_rsa2048_public_key( - ::securemessage::SimpleRsaPublicKey* rsa2048_public_key) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(rsa2048_public_key_); - } - rsa2048_public_key_ = rsa2048_public_key; - if (rsa2048_public_key) { - _has_bits_[0] |= 0x00000002u; - } else { - _has_bits_[0] &= ~0x00000002u; - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:securemessage.GenericPublicKey.rsa2048_public_key) -} -inline ::securemessage::SimpleRsaPublicKey* GenericPublicKey::release_rsa2048_public_key() { - _has_bits_[0] &= ~0x00000002u; - ::securemessage::SimpleRsaPublicKey* temp = rsa2048_public_key_; - rsa2048_public_key_ = 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 ::securemessage::SimpleRsaPublicKey* GenericPublicKey::unsafe_arena_release_rsa2048_public_key() { - // @@protoc_insertion_point(field_release:securemessage.GenericPublicKey.rsa2048_public_key) - _has_bits_[0] &= ~0x00000002u; - ::securemessage::SimpleRsaPublicKey* temp = rsa2048_public_key_; - rsa2048_public_key_ = nullptr; - return temp; -} -inline ::securemessage::SimpleRsaPublicKey* GenericPublicKey::_internal_mutable_rsa2048_public_key() { - _has_bits_[0] |= 0x00000002u; - if (rsa2048_public_key_ == nullptr) { - auto* p = CreateMaybeMessage<::securemessage::SimpleRsaPublicKey>(GetArenaForAllocation()); - rsa2048_public_key_ = p; - } - return rsa2048_public_key_; -} -inline ::securemessage::SimpleRsaPublicKey* GenericPublicKey::mutable_rsa2048_public_key() { - ::securemessage::SimpleRsaPublicKey* _msg = _internal_mutable_rsa2048_public_key(); - // @@protoc_insertion_point(field_mutable:securemessage.GenericPublicKey.rsa2048_public_key) - return _msg; -} -inline void GenericPublicKey::set_allocated_rsa2048_public_key(::securemessage::SimpleRsaPublicKey* rsa2048_public_key) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); - if (message_arena == nullptr) { - delete rsa2048_public_key_; - } - if (rsa2048_public_key) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::securemessage::SimpleRsaPublicKey>::GetOwningArena(rsa2048_public_key); - if (message_arena != submessage_arena) { - rsa2048_public_key = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, rsa2048_public_key, submessage_arena); - } - _has_bits_[0] |= 0x00000002u; - } else { - _has_bits_[0] &= ~0x00000002u; - } - rsa2048_public_key_ = rsa2048_public_key; - // @@protoc_insertion_point(field_set_allocated:securemessage.GenericPublicKey.rsa2048_public_key) -} - -// optional .securemessage.DhPublicKey dh2048_public_key = 4; -inline bool GenericPublicKey::_internal_has_dh2048_public_key() const { - bool value = (_has_bits_[0] & 0x00000004u) != 0; - PROTOBUF_ASSUME(!value || dh2048_public_key_ != nullptr); - return value; -} -inline bool GenericPublicKey::has_dh2048_public_key() const { - return _internal_has_dh2048_public_key(); -} -inline void GenericPublicKey::clear_dh2048_public_key() { - if (dh2048_public_key_ != nullptr) dh2048_public_key_->Clear(); - _has_bits_[0] &= ~0x00000004u; -} -inline const ::securemessage::DhPublicKey& GenericPublicKey::_internal_dh2048_public_key() const { - const ::securemessage::DhPublicKey* p = dh2048_public_key_; - return p != nullptr ? *p : reinterpret_cast( - ::securemessage::_DhPublicKey_default_instance_); -} -inline const ::securemessage::DhPublicKey& GenericPublicKey::dh2048_public_key() const { - // @@protoc_insertion_point(field_get:securemessage.GenericPublicKey.dh2048_public_key) - return _internal_dh2048_public_key(); -} -inline void GenericPublicKey::unsafe_arena_set_allocated_dh2048_public_key( - ::securemessage::DhPublicKey* dh2048_public_key) { - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(dh2048_public_key_); - } - dh2048_public_key_ = dh2048_public_key; - if (dh2048_public_key) { - _has_bits_[0] |= 0x00000004u; - } else { - _has_bits_[0] &= ~0x00000004u; - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:securemessage.GenericPublicKey.dh2048_public_key) -} -inline ::securemessage::DhPublicKey* GenericPublicKey::release_dh2048_public_key() { - _has_bits_[0] &= ~0x00000004u; - ::securemessage::DhPublicKey* temp = dh2048_public_key_; - dh2048_public_key_ = 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 ::securemessage::DhPublicKey* GenericPublicKey::unsafe_arena_release_dh2048_public_key() { - // @@protoc_insertion_point(field_release:securemessage.GenericPublicKey.dh2048_public_key) - _has_bits_[0] &= ~0x00000004u; - ::securemessage::DhPublicKey* temp = dh2048_public_key_; - dh2048_public_key_ = nullptr; - return temp; -} -inline ::securemessage::DhPublicKey* GenericPublicKey::_internal_mutable_dh2048_public_key() { - _has_bits_[0] |= 0x00000004u; - if (dh2048_public_key_ == nullptr) { - auto* p = CreateMaybeMessage<::securemessage::DhPublicKey>(GetArenaForAllocation()); - dh2048_public_key_ = p; - } - return dh2048_public_key_; -} -inline ::securemessage::DhPublicKey* GenericPublicKey::mutable_dh2048_public_key() { - ::securemessage::DhPublicKey* _msg = _internal_mutable_dh2048_public_key(); - // @@protoc_insertion_point(field_mutable:securemessage.GenericPublicKey.dh2048_public_key) - return _msg; -} -inline void GenericPublicKey::set_allocated_dh2048_public_key(::securemessage::DhPublicKey* dh2048_public_key) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); - if (message_arena == nullptr) { - delete dh2048_public_key_; - } - if (dh2048_public_key) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::securemessage::DhPublicKey>::GetOwningArena(dh2048_public_key); - if (message_arena != submessage_arena) { - dh2048_public_key = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, dh2048_public_key, submessage_arena); - } - _has_bits_[0] |= 0x00000004u; - } else { - _has_bits_[0] &= ~0x00000004u; - } - dh2048_public_key_ = dh2048_public_key; - // @@protoc_insertion_point(field_set_allocated:securemessage.GenericPublicKey.dh2048_public_key) -} - -#ifdef __GNUC__ - #pragma GCC diagnostic pop -#endif // __GNUC__ -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - - -// @@protoc_insertion_point(namespace_scope) - -} // namespace securemessage - -PROTOBUF_NAMESPACE_OPEN - -template <> struct is_proto_enum< ::securemessage::SigScheme> : ::std::true_type {}; -template <> struct is_proto_enum< ::securemessage::EncScheme> : ::std::true_type {}; -template <> struct is_proto_enum< ::securemessage::PublicKeyType> : ::std::true_type {}; - -PROTOBUF_NAMESPACE_CLOSE - -// @@protoc_insertion_point(global_scope) - -#include -#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_proto_2fsecuremessage_2eproto diff --git a/third_party/securemessage/include/securemessage/public_key_proto_util.h b/third_party/securemessage/include/securemessage/public_key_proto_util.h deleted file mode 100644 index 3947462f..00000000 --- a/third_party/securemessage/include/securemessage/public_key_proto_util.h +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright 2014 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef SECUREMESSAGE_PUBLIC_KEY_PROTO_UTIL_H_ -#define SECUREMESSAGE_PUBLIC_KEY_PROTO_UTIL_H_ - -#include -#include "securemessage/common.h" -#include "securemessage/crypto_ops.h" -#include "proto/securemessage.pb.h" - -namespace securemessage { - -class PublicKeyProtoUtil { - public: - // - // Encodes the internal implementation of the PublicKey into the appropriate - // protobuf format. - // - // @return nullptr if the PublicKey is not supported - // - static std::unique_ptr EncodePublicKey( - const CryptoOps::PublicKey& key); - - // - // Transforms the protobuf format into a internal representation of a - // PublicKey. - // - // @return nullptr if the GenericPublicKey protobuf type is not supported - // - static std::unique_ptr ParsePublicKey( - const GenericPublicKey& key); - - private: - virtual ~PublicKeyProtoUtil() {} - - // @return nullptr if the PublicKey is not supported - static std::unique_ptr EncodeEcPublicKey( - const CryptoOps::PublicKey& key); - - // @return nullptr if the EcP256PublicKey is invalid - static std::unique_ptr ParseEcPublicKey( - const EcP256PublicKey& key); - - // @return nullptr if the PublicKey is not supported - static std::unique_ptr EncodeRsaPublicKey( - const CryptoOps::PublicKey& key); - - // @return nullptr if the SimpleRsaPublicKey is invalid - static std::unique_ptr ParseRsaPublicKey( - const SimpleRsaPublicKey& key); -}; - -} // namespace securemessage -#endif // SECUREMESSAGE_PUBLIC_KEY_PROTO_UTIL_H_ diff --git a/third_party/securemessage/include/securemessage/raw_secure_message_parser.h b/third_party/securemessage/include/securemessage/raw_secure_message_parser.h deleted file mode 100644 index eef4becd..00000000 --- a/third_party/securemessage/include/securemessage/raw_secure_message_parser.h +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright 2014 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef SECUREMESSAGE_RAW_SECURE_MESSAGE_PARSER_H_ -#define SECUREMESSAGE_RAW_SECURE_MESSAGE_PARSER_H_ - -#include - -#include "securemessage/common.h" -#include "securemessage/crypto_ops.h" - -namespace securemessage { - -// Utility class to parse and verify raw byte {@link SecureMessage} protos. -// Verifies the signature on the message, and decrypts "signcrypted" messages -// (while simultaneously verifying the signature). -// -// @see RawSecureMessageBuilder -class RawSecureMessageParser { - public: - // - // Parses a raw {@link SecureMessage} that is already separated out into - // signature and headerAndBody, containing a cleartext payload body, and - // verifies the signature. - // - // @param associated_data optional associated data bound to the signature (but - // not in the message). Send an empty string when not using. - // @return a string to the raw {@link HeaderAndBody} pair (which - // is fully verified) or a nullptr on error @see - // SecureMessageBuilder#BuildSignedCleartextMessage - // - static std::unique_ptr ParseSignedCleartextMessage( - const string& signature, - const string& header_and_body, - const CryptoOps::Key& verification_key, - CryptoOps::SigType sig_type, - const string& associated_data); - - // - // Parses a raw {@link SecureMessage} that is already separated out into - // signature and headerAndBody, containing an encrypted payload body, - // extracting a decryption of the payload body and verifying the signature. - // - // @return a string to the the raw {@link HeaderAndBody} pair - // (which is fully verified and decrypted or a nullptr on error - // @see SecureMessageBuilder#BuildSignCryptedMessage - // - static std::unique_ptr ParseSignCryptedMessage( - const string& signature, - const string& header_and_body, - const CryptoOps::Key& verification_key, - CryptoOps::SigType sig_type, - const CryptoOps::SecretKey& decryption_key, - CryptoOps::EncType enc_type, - const string& associated_data); - - private: - RawSecureMessageParser(); // Do not instantiate - ~RawSecureMessageParser(); - - // - // Verifies the components of a raw {@link HeaderAndBody}. - // - // @return true if the header_and_body can be verified. - // - static bool VerifyHeaderAndBody( - const string& signature, - const string& header_and_body, - const CryptoOps::Key& verification_key, - CryptoOps::SigType sig_type, - CryptoOps::EncType enc_type, - const string& associated_data, - bool suppress_associated_data); -}; - -} // namespace securemessage -#endif // SECUREMESSAGE_RAW_SECURE_MESSAGE_PARSER_H_ diff --git a/third_party/securemessage/include/securemessage/secure_message_builder.h b/third_party/securemessage/include/securemessage/secure_message_builder.h deleted file mode 100644 index 3b4053e7..00000000 --- a/third_party/securemessage/include/securemessage/secure_message_builder.h +++ /dev/null @@ -1,177 +0,0 @@ -/* - * Copyright 2014 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef SECUREMESSAGE_SECURE_MESSAGE_BUILDER_H_ -#define SECUREMESSAGE_SECURE_MESSAGE_BUILDER_H_ - -#include - -#include "proto/securemessage.pb.h" - -#include "securemessage/byte_buffer.h" -#include "securemessage/common.h" -#include "securemessage/crypto_ops.h" - -namespace securemessage { - -// -// Builder for {@link SecureMessage} protos. Can be used to create either signed -// messages, or "signcrypted" (encrypted then signed) messages that include a -// tight binding between the ciphertext portion and a verification key identity. -// -// All the language non-specific work is done from within the -// {@link RawSecureMessageBuilder} class. -// -// @see SecureMessageParser -// @see RawSecureMessageBuilder -// -class SecureMessageBuilder { - public: - SecureMessageBuilder(); - - virtual ~SecureMessageBuilder(); - - // - // Resets this {@link SecureMessageBuilder} instance to a blank configuration - // (and returns it). - // - SecureMessageBuilder* Reset(); - - // - // Optional metadata to be sent along with the header information in this - // {@link SecureMessage}. - //

- // Note that this value will be sent UNENCRYPTED in all cases. - //

- // Can be used with either cleartext or signcrypted messages, but is intended - // primarily for use with signcrypted messages. - // - SecureMessageBuilder* SetPublicMetadata(const std::string& public_metadata); - - // - // The recipient of the {@link SecureMessage} should be able to uniquely - // determine the correct verification key, given only this value. - //

- // Can be used with either cleartext or signcrypted messages. Setting this is - // mandatory for signcrypted messages using a public key CryptoOps::SigType, - // in order to bind the encrypted body to a specific verification key. - //

- // Note that this value is sent UNENCRYPTED in all cases. - // - SecureMessageBuilder* SetVerificationKeyId( - const std::string& verification_key_id); - - // - // To be used only with {@link #BuildSignCryptedMessage(CryptoOps::Key, - // CryptoOps::SigType, CryptoOps::Key, CryptoOps::EncType, string)}, - // this value is sent UNENCRYPTED as part of the header. It should be - // used by the recipient of the {@link SecureMessage} to identify an - // appropriate key to use for decrypting the message body. - // - SecureMessageBuilder* SetDecryptionKeyId( - const std::string& decryption_key_id); - - // - // Additional data is "associated" with this {@link SecureMessage}, but will - // not be sent as part of it. The recipient of the {@link SecureMessage} will - // need to provide the same data in order to verify the message body. Setting - // this to {@code null} is equivalent to using an empty array (unlike the - // behavior of {@code VerificationKeyId} and {@code DecryptionKeyId}). - //

- // Note that the size (length in bytes) of the associated data will - // be sent in the UNENCRYPTED header information, even if you are - // using encryption. - //

- // If you will be using {@link #BuildSignedCleartextMessage(CryptoOps::Key, - // CryptoOps::SigType, string)}, then anyone observing the - // {@link SecureMessage} may be able to infer this associated data via an - // "offline dictionary attack". That is, when no encryption is used, you will - // not be hiding this data simply because it is not being sent over the wire. - // - SecureMessageBuilder* SetAssociatedData(const std::string& associated_data); - - // - // Generates a signed {@link SecureMessage} with the payload {@code body} left - // UNENCRYPTED. - //

- // Note that if you have used {@link #SetAssociatedData(string)}, the - // associated data will - // be subject to offline dictionary attacks if you use a public key {@link - // CryptoOps::SigType}. - //

- // Doesn't currently support symmetric keys stored in a TPM - //

- // Can return nullptr on error - // - // @see SecureMessageParser#ParseSignedCleartextMessage - // - std::unique_ptr BuildSignedCleartextMessage( - const CryptoOps::Key& signing_key, CryptoOps::SigType sig_type, - const std::string& body); - - // - // Generates a signed and encrypted {@link SecureMessage}. If the signature - // type requires a public key, such as with ECDSA_P256_SHA256, then the caller - // must set a verification id using the - // {@link #SetVerificationKeyId(string)} method. The verification key - // id will be bound to the encrypted {@code body}, preventing attacks that - // involve stripping the signature and then re-signing the encrypted - // {@code body} as if it was originally sent by the attacker. - // - //

It is safe to re-use one {@link SecretKey} as both - // {@code signingKey} and {@code encryptionKey}, even if that key is also used - // for {@link #buildSignedCleartextMessage(Key, SigType, byte[])}. In fact, - // the resulting output encoding will be more compact when the same symmetric - // key is used for both. - // - //

Note that PublicMetadata and other header fields are left - // UNENCRYPTED. - // - //

Doesn't currently support symmetric keys stored in a TPM - // - //

Can return nullptr on error - // - // @param encType must not be set to {@link EncType#NONE} - // @see SecureMessageParser#parseSignCryptedMessage(SecureMessage, - // CryptoOps::Key, CryptoOps::SigType, CryptoOps::Key, - // CryptoOps::EncType) - // - std::unique_ptr BuildSignCryptedMessage( - const CryptoOps::Key& signing_key, CryptoOps::SigType sig_type, - const CryptoOps::SecretKey& encryption_key, CryptoOps::EncType enc_type, - const std::string& body); - - private: - std::unique_ptr public_metadata_; - std::unique_ptr decryption_key_id_; - std::unique_ptr verification_key_id_; - std::unique_ptr associated_data_; - - // @param iv IV or {@code null} if IV to be left unset in the Header - std::unique_ptr

BuildHeader(CryptoOps::SigType sig_type, - CryptoOps::EncType enc_type, - const std::unique_ptr& iv); - - ByteBuffer SerializeHeaderAndBody(const std::string& header, - const std::string& body); - - std::unique_ptr CreateSignedResult( - const CryptoOps::Key& signing_key, const CryptoOps::SigType& sig_type, - const ByteBuffer& header_and_body, const ByteBuffer& associated_data); -}; - -} // namespace securemessage -#endif // SECUREMESSAGE_SECURE_MESSAGE_BUILDER_H_ diff --git a/third_party/securemessage/include/securemessage/secure_message_parser.h b/third_party/securemessage/include/securemessage/secure_message_parser.h deleted file mode 100644 index a827a99d..00000000 --- a/third_party/securemessage/include/securemessage/secure_message_parser.h +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Copyright 2014 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef SECUREMESSAGE_SECURE_MESSAGE_PARSER_H_ -#define SECUREMESSAGE_SECURE_MESSAGE_PARSER_H_ - -#include - -#include "proto/securemessage.pb.h" - -#include "securemessage/common.h" -#include "securemessage/crypto_ops.h" - -namespace securemessage { - -// This is a light wrapper on {@link RawSecureMessageParser} that binds to -// the c++ protobuf implementation. -// Utility class to parse and verify {@link SecureMessage} protos. Verifies the -// signature on the message, and decrypts "signcrypted" messages (while -// simultaneously verifying the signature). -// -// @see SecureMessageBuilder -class SecureMessageParser { - public: - // Extracts the {@link Header} component from a {@link SecureMessage} but - // DOES NOT VERIFY the signature when doing so. Callers should not - // trust the resulting output until after a subsequent {@code parse*()} call - // has succeeded. - // - //

The intention is to allow the caller to determine the type of the - // protocol message and which keys are in use, prior to attempting to verify - // (and possibly decrypt) the payload body. - // - //

The call will return a std::unique_ptr on success and a nullptr on error - static std::unique_ptr

GetUnverifiedHeader( - const SecureMessage& secmsg); - - // - // Parses a {@link SecureMessage} containing a cleartext payload body, and - // verifies the signature. - // - // @return a std::unique_ptr to the parsed {@link HeaderAndBody} pair (which - // is fully verified) or a nullptr on error @see - // SecureMessageBuilder#BuildSignedCleartextMessage - // - static std::unique_ptr ParseSignedCleartextMessage( - const SecureMessage& secmsg, const CryptoOps::Key& verification_key, - CryptoOps::SigType sig_type); - - // - // Parses a {@link SecureMessage} containing a cleartext payload body, and - // verifies the signature. - // - // @param assocaited_data optional associated data bound to the signature (but - // not in the message). Pass an empty string when not using. - // @return a std::unique_ptr to the parsed {@link HeaderAndBody} pair (which - // is fully verified) or a nullptr on error @see - // SecureMessageBuilder#BuildSignedCleartextMessage - // - static std::unique_ptr ParseSignedCleartextMessage( - const SecureMessage& secmsg, const CryptoOps::Key& verification_key, - CryptoOps::SigType sig_type, const string& associated_data); - - // - // Parses a {@link SecureMessage} containing an encrypted payload body, - // extracting a decryption of the payload body and verifying the signature. - // - // @param associated_data optional associated data bound to the signature - // (but not in the message). Pass an empty string when not using. - // @return a std::unique_ptr to the the parsed {@link HeaderAndBody} pair - // (which is fully verified and decrypted or a nullptr on error - // @see SecureMessageBuilder#BuildSignCryptedMessage - // - static std::unique_ptr ParseSignCryptedMessage( - const SecureMessage& secmsg, const CryptoOps::Key& verification_key, - CryptoOps::SigType sig_type, const CryptoOps::SecretKey& decryption_key, - CryptoOps::EncType enc_type, const string& associated_data); - - private: - SecureMessageParser(); // Do not instantiate - - ~SecureMessageParser(); -}; - -} // namespace securemessage -#endif // SECUREMESSAGE_SECURE_MESSAGE_PARSER_H_ diff --git a/third_party/securemessage/include/securemessage/secure_message_wrapper.h b/third_party/securemessage/include/securemessage/secure_message_wrapper.h deleted file mode 100644 index 24df25a3..00000000 --- a/third_party/securemessage/include/securemessage/secure_message_wrapper.h +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Copyright 2014 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef SECUREMESSAGE_SECURE_MESSAGE_WRAPPER_H_ -#define SECUREMESSAGE_SECURE_MESSAGE_WRAPPER_H_ - -#include - -#include "securemessage/common.h" -#include "securemessage/crypto_ops.h" - -namespace securemessage { - -// Utility class to allow alternate implementations of the securemessage -// protobuf to be used (for example, an objective-c implementation). -// -// @see SecureMessage -class SecureMessageWrapper { - public: - // Takes the byte representation of the {@link HeaderAndBody} and returns - // the iv field from the {@link Header}. If this does not exist, this - // function will return nullptr. - static std::unique_ptr ParseHeaderIv( - const string& header_and_body_bytes); - - // Takes the byte representation of the {@link HeaderAndBody} and returns the - // byte representation of the {@link Header}. If this does not exist, this - // function will return nullptr. - static std::unique_ptr ParseHeader( - const string& header_and_body_bytes); - - // Takes the byte representation of the {@link HeaderAndBodyInternal} and - // returns the byte representation of the {@link Header}. If this does not - // exist, this function will return nullptr. - static std::unique_ptr ParseInternalHeader( - const string& header_and_body_bytes); - - // Takes the byte representation of the {@link HeaderAndBody} and returns - // the {@link Body}. If this does not exist, this function will return - // nullptr. - static std::unique_ptr ParseBody(const string& header_and_body_bytes); - - // Takes the byte representation of the {@link Header} and {@link Body} and - // returns the byte representation of {@link HeaderAndBody}. - static std::unique_ptr BuildHeaderAndBody( - const string& header_bytes, const string& body_bytes); - - // Takes the byte representation of the header and returns the int value - // for the SigScheme enum - static int GetSignatureScheme(const string& header_bytes); - - // Takes the byte representation of the header and returns the int value - // for the EncScheme enum - static int GetEncryptionScheme(const string& header_bytes); - - // Takes the byte representation of the header and returns the length of the - // associated data stored in the header - static uint32_t GetAssociatedDataLength(const string& header_bytes); - - // Tests if the byte representation of the header has a decryption key id - static bool HasDecryptionKeyId(const string& header_bytes); - - // Tests if the byte representation of the header has a verification key id - static bool HasVerificationKeyId(const string& header_bytes); - - // - // Returns the constant exposed enums that are found in the - // {@link SecureMessage} protobuf. - // - // A return value of 0 would be considered an error. - // - // @see SigScheme - static int GetSigScheme(CryptoOps::SigType sig_type); - - // - // Returns the constant exposed enums that are found in the - // {@link SecureMessage} protobuf. - // - // A return value of 0 would be considered an error. - // - // @see EncScheme - static int GetEncScheme(CryptoOps::EncType enc_type); - - private: - SecureMessageWrapper(); // Do not instantiate - ~SecureMessageWrapper(); -}; - -} // namespace securemessage -#endif // SECUREMESSAGE_SECURE_MESSAGE_WRAPPER_H_ diff --git a/third_party/securemessage/include/securemessage/util.h b/third_party/securemessage/include/securemessage/util.h deleted file mode 100644 index 3eaf974b..00000000 --- a/third_party/securemessage/include/securemessage/util.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright 2014 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef SECUREMESSAGE_UTIL_H_ -#define SECUREMESSAGE_UTIL_H_ - -#include -#include - -#include "securemessage/common.h" - -namespace securemessage { - -class Util { - public: - // - // Makes a new std::unique_ptr by taking input data and a length - // - static std::unique_ptr MakeUniquePtrString(const void* data, - size_t length); - - // - // Providing a level of indirection when logging error message. The idea - // being that this can be swapped out in platforms that log error messages in - // some more useful way. - // - static void LogError(const std::string& error_message); - - // - // Provides a level of indirection for managing really bad errors. A call of - // this function indicates that an unrecoverable error happened -- perhaps - // because of an attack or a bug in an underlying crypto provider. The - // invocation of this function indicates that any subsequent behavior will be - // undefined. This level of indirection is meant to let users of this library - // figure out how they want to deal with such bad errors. - // - // This function should never return. - // - static void LogErrorAndAbort [[noreturn]] (const std::string& error_message); - - private: - virtual ~Util(); -}; - -} // namespace securemessage - -#endif // SECUREMESSAGE_UTIL_H_ From c42d3769ff47c1b37ab95696ccf77810ba700f61 Mon Sep 17 00:00:00 2001 From: deling-google <99381034+deling-google@users.noreply.github.com> Date: Thu, 31 Mar 2022 15:07:14 -0700 Subject: [PATCH 13/17] Symlink google-toolbox-for-mac headers --- .../include/GTMDefines.h | 381 +------------ .../include/GoogleToolboxForMac/GTMLogger.h | 527 +----------------- 2 files changed, 2 insertions(+), 906 deletions(-) mode change 100644 => 120000 third_party/google-toolbox-for-mac/include/GTMDefines.h mode change 100644 => 120000 third_party/google-toolbox-for-mac/include/GoogleToolboxForMac/GTMLogger.h diff --git a/third_party/google-toolbox-for-mac/include/GTMDefines.h b/third_party/google-toolbox-for-mac/include/GTMDefines.h deleted file mode 100644 index c968aa1b..00000000 --- a/third_party/google-toolbox-for-mac/include/GTMDefines.h +++ /dev/null @@ -1,380 +0,0 @@ -// -// GTMDefines.h -// -// Copyright 2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -// ============================================================================ - -#include -#include - -#ifdef __OBJC__ -#include -#endif // __OBJC__ - -#if TARGET_OS_IPHONE -#include -#endif // TARGET_OS_IPHONE - -// ---------------------------------------------------------------------------- -// CPP symbols that can be overridden in a prefix to control how the toolbox -// is compiled. -// ---------------------------------------------------------------------------- - - -// By setting the GTM_CONTAINERS_VALIDATION_FAILED_LOG and -// GTM_CONTAINERS_VALIDATION_FAILED_ASSERT macros you can control what happens -// when a validation fails. If you implement your own validators, you may want -// to control their internals using the same macros for consistency. -#ifndef GTM_CONTAINERS_VALIDATION_FAILED_ASSERT - #define GTM_CONTAINERS_VALIDATION_FAILED_ASSERT 0 -#endif - -// Ensure __has_feature and __has_extension are safe to use. -// See http://clang-analyzer.llvm.org/annotations.html -#ifndef __has_feature // Optional. - #define __has_feature(x) 0 // Compatibility with non-clang compilers. -#endif - -#ifndef __has_extension - #define __has_extension __has_feature // Compatibility with pre-3.0 compilers. -#endif - -// Give ourselves a consistent way to do inlines. Apple's macros even use -// a few different actual definitions, so we're based off of the foundation -// one. -#if !defined(GTM_INLINE) - #if (defined (__GNUC__) && (__GNUC__ == 4)) || defined (__clang__) - #define GTM_INLINE static __inline__ __attribute__((always_inline)) - #else - #define GTM_INLINE static __inline__ - #endif -#endif - -// Give ourselves a consistent way of doing externs that links up nicely -// when mixing objc and objc++ -#if !defined (GTM_EXTERN) - #if defined __cplusplus - #define GTM_EXTERN extern "C" - #define GTM_EXTERN_C_BEGIN extern "C" { - #define GTM_EXTERN_C_END } - #else - #define GTM_EXTERN extern - #define GTM_EXTERN_C_BEGIN - #define GTM_EXTERN_C_END - #endif -#endif - -// Give ourselves a consistent way of exporting things if we have visibility -// set to hidden. -#if !defined (GTM_EXPORT) - #define GTM_EXPORT __attribute__((visibility("default"))) -#endif - -// Give ourselves a consistent way of declaring something as unused. This -// doesn't use __unused because that is only supported in gcc 4.2 and greater. -#if !defined (GTM_UNUSED) -#define GTM_UNUSED(x) ((void)(x)) -#endif - -// _GTMDevLog & _GTMDevAssert -// -// _GTMDevLog & _GTMDevAssert are meant to be a very lightweight shell for -// developer level errors. This implementation simply macros to NSLog/NSAssert. -// It is not intended to be a general logging/reporting system. -// -// Please see http://code.google.com/p/google-toolbox-for-mac/wiki/DevLogNAssert -// for a little more background on the usage of these macros. -// -// _GTMDevLog log some error/problem in debug builds -// _GTMDevAssert assert if condition isn't met w/in a method/function -// in all builds. -// -// To replace this system, just provide different macro definitions in your -// prefix header. Remember, any implementation you provide *must* be thread -// safe since this could be called by anything in what ever situation it has -// been placed in. -// - -// Ignore the "Macro name is a reserved identifier" warning in this section -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wreserved-id-macro" - -// We only define the simple macros if nothing else has defined this. -#ifndef _GTMDevLog - -#ifdef DEBUG - #define _GTMDevLog(...) NSLog(__VA_ARGS__) -#else - #define _GTMDevLog(...) do { } while (0) -#endif - -#endif // _GTMDevLog - -#ifndef _GTMDevAssert -// we directly invoke the NSAssert handler so we can pass on the varargs -// (NSAssert doesn't have a macro we can use that takes varargs) -#if !defined(NS_BLOCK_ASSERTIONS) - #define _GTMDevAssert(condition, ...) \ - do { \ - if (__builtin_expect(!(condition), 0)) { \ - NSString *__assert_func_name__ = \ - [NSString stringWithUTF8String:__PRETTY_FUNCTION__]; \ - __assert_func_name__ = __assert_func_name__ ?: @""; \ - NSString *__assert_file_name__ = \ - [NSString stringWithUTF8String:__FILE__]; \ - __assert_file_name__ = __assert_file_name__ ?: @""; \ - [[NSAssertionHandler currentHandler] \ - handleFailureInFunction:__assert_func_name__ \ - file:__assert_file_name__ \ - lineNumber:__LINE__ \ - description:__VA_ARGS__]; \ - } \ - } while(0) -#else // !defined(NS_BLOCK_ASSERTIONS) - #define _GTMDevAssert(condition, ...) do { } while (0) -#endif // !defined(NS_BLOCK_ASSERTIONS) - -#endif // _GTMDevAssert - -// _GTMCompileAssert -// -// Note: Software for current compilers should just use _Static_assert directly -// instead of this macro. -// -// _GTMCompileAssert is an assert that is meant to fire at compile time if you -// want to check things at compile instead of runtime. For example if you -// want to check that a wchar is 4 bytes instead of 2 you would use -// _GTMCompileAssert(sizeof(wchar_t) == 4, wchar_t_is_4_bytes_on_OS_X) -// Note that the second "arg" is not in quotes, and must be a valid processor -// symbol in it's own right (no spaces, punctuation etc). - -// Wrapping this in an #ifndef allows external groups to define their own -// compile time assert scheme. -#ifndef _GTMCompileAssert - #if __has_feature(c_static_assert) || __has_extension(c_static_assert) - #define _GTMCompileAssert(test, msg) _Static_assert((test), #msg) - #else - // Pre-Xcode 7 support. - // - // We got this technique from here: - // http://unixjunkie.blogspot.com/2007/10/better-compile-time-asserts_29.html - #define _GTMCompileAssertSymbolInner(line, msg) _GTMCOMPILEASSERT ## line ## __ ## msg - #define _GTMCompileAssertSymbol(line, msg) _GTMCompileAssertSymbolInner(line, msg) - #define _GTMCompileAssert(test, msg) \ - typedef char _GTMCompileAssertSymbol(__LINE__, msg) [ ((test) ? 1 : -1) ] - #endif // __has_feature(c_static_assert) || __has_extension(c_static_assert) -#endif // _GTMCompileAssert - -#pragma clang diagnostic pop - -// ---------------------------------------------------------------------------- -// CPP symbols defined based on the project settings so the GTM code has -// simple things to test against w/o scattering the knowledge of project -// setting through all the code. -// ---------------------------------------------------------------------------- - -// Provide a single constant CPP symbol that all of GTM uses for ifdefing -// iPhone code. -#if TARGET_OS_IPHONE // iPhone SDK - // For iPhone specific stuff - #define GTM_IPHONE_SDK 1 - #if TARGET_IPHONE_SIMULATOR - #define GTM_IPHONE_DEVICE 0 - #define GTM_IPHONE_SIMULATOR 1 - #else - #define GTM_IPHONE_DEVICE 1 - #define GTM_IPHONE_SIMULATOR 0 - #endif // TARGET_IPHONE_SIMULATOR - // By default, GTM has provided it's own unittesting support, define this - // to use the support provided by Xcode, especially for the Xcode4 support - // for unittesting. - #ifndef GTM_USING_XCTEST - #define GTM_USING_XCTEST 0 - #endif - #define GTM_MACOS_SDK 0 -#else - // For MacOS specific stuff - #define GTM_MACOS_SDK 1 - #define GTM_IPHONE_SDK 0 - #define GTM_IPHONE_SIMULATOR 0 - #define GTM_IPHONE_DEVICE 0 - #ifndef GTM_USING_XCTEST - #define GTM_USING_XCTEST 0 - #endif -#endif - -// Some of our own availability macros -#if GTM_MACOS_SDK -#define GTM_AVAILABLE_ONLY_ON_IPHONE UNAVAILABLE_ATTRIBUTE -#define GTM_AVAILABLE_ONLY_ON_MACOS -#else -#define GTM_AVAILABLE_ONLY_ON_IPHONE -#define GTM_AVAILABLE_ONLY_ON_MACOS UNAVAILABLE_ATTRIBUTE -#endif - -// GC was dropped by Apple, define the old constant incase anyone still keys -// off of it. -#ifndef GTM_SUPPORT_GC - #define GTM_SUPPORT_GC 0 -#endif - -// Some support for advanced clang static analysis functionality -#ifndef NS_RETURNS_RETAINED - #if __has_feature(attribute_ns_returns_retained) - #define NS_RETURNS_RETAINED __attribute__((ns_returns_retained)) - #else - #define NS_RETURNS_RETAINED - #endif -#endif - -#ifndef NS_RETURNS_NOT_RETAINED - #if __has_feature(attribute_ns_returns_not_retained) - #define NS_RETURNS_NOT_RETAINED __attribute__((ns_returns_not_retained)) - #else - #define NS_RETURNS_NOT_RETAINED - #endif -#endif - -#ifndef CF_RETURNS_RETAINED - #if __has_feature(attribute_cf_returns_retained) - #define CF_RETURNS_RETAINED __attribute__((cf_returns_retained)) - #else - #define CF_RETURNS_RETAINED - #endif -#endif - -#ifndef CF_RETURNS_NOT_RETAINED - #if __has_feature(attribute_cf_returns_not_retained) - #define CF_RETURNS_NOT_RETAINED __attribute__((cf_returns_not_retained)) - #else - #define CF_RETURNS_NOT_RETAINED - #endif -#endif - -#ifndef NS_CONSUMED - #if __has_feature(attribute_ns_consumed) - #define NS_CONSUMED __attribute__((ns_consumed)) - #else - #define NS_CONSUMED - #endif -#endif - -#ifndef CF_CONSUMED - #if __has_feature(attribute_cf_consumed) - #define CF_CONSUMED __attribute__((cf_consumed)) - #else - #define CF_CONSUMED - #endif -#endif - -#ifndef NS_CONSUMES_SELF - #if __has_feature(attribute_ns_consumes_self) - #define NS_CONSUMES_SELF __attribute__((ns_consumes_self)) - #else - #define NS_CONSUMES_SELF - #endif -#endif - -#ifndef GTM_NONNULL - #if defined(__has_attribute) - #if __has_attribute(nonnull) - #define GTM_NONNULL(x) __attribute__((nonnull x)) - #else - #define GTM_NONNULL(x) - #endif - #else - #define GTM_NONNULL(x) - #endif -#endif - -// Invalidates the initializer from which it's called. -#ifndef GTMInvalidateInitializer - #if __has_feature(objc_arc) - #define GTMInvalidateInitializer() \ - do { \ - [self class]; /* Avoid warning of dead store to |self|. */ \ - _GTMDevAssert(NO, @"Invalid initializer."); \ - return nil; \ - } while (0) - #else - #define GTMInvalidateInitializer() \ - do { \ - [self release]; \ - _GTMDevAssert(NO, @"Invalid initializer."); \ - return nil; \ - } while (0) - #endif -#endif - -#ifndef GTMCFAutorelease - // GTMCFAutorelease returns an id. In contrast, Apple's CFAutorelease returns - // a CFTypeRef. - #if __has_feature(objc_arc) - #define GTMCFAutorelease(x) CFBridgingRelease(x) - #else - #define GTMCFAutorelease(x) ([(id)x autorelease]) - #endif -#endif - -#ifdef __OBJC__ - - -// Macro to allow you to create NSStrings out of other macros. -// #define FOO foo -// NSString *fooString = GTM_NSSTRINGIFY(FOO); -#if !defined (GTM_NSSTRINGIFY) - #define GTM_NSSTRINGIFY_INNER(x) @#x - #define GTM_NSSTRINGIFY(x) GTM_NSSTRINGIFY_INNER(x) -#endif - -// ============================================================================ - -// GTM_SEL_STRING is for specifying selector (usually property) names to KVC -// or KVO methods. -// In debug it will generate warnings for undeclared selectors if -// -Wunknown-selector is turned on. -// In release it will have no runtime overhead. -#ifndef GTM_SEL_STRING - #ifdef DEBUG - #define GTM_SEL_STRING(selName) NSStringFromSelector(@selector(selName)) - #else - #define GTM_SEL_STRING(selName) @#selName - #endif // DEBUG -#endif // GTM_SEL_STRING - -#ifndef GTM_WEAK -#if __has_feature(objc_arc_weak) - // With ARC enabled, __weak means a reference that isn't implicitly - // retained. __weak objects are accessed through runtime functions, so - // they are zeroed out, but this requires OS X 10.7+. - // At clang r251041+, ARC-style zeroing weak references even work in - // non-ARC mode. - #define GTM_WEAK __weak - #elif __has_feature(objc_arc) - // ARC, but targeting 10.6 or older, where zeroing weak references don't - // exist. - #define GTM_WEAK __unsafe_unretained - #else - // With manual reference counting, __weak used to be silently ignored. - // clang r251041 gives it the ARC semantics instead. This means they - // now require a deployment target of 10.7, while some clients of GTM - // still target 10.6. In these cases, expand to __unsafe_unretained instead - #define GTM_WEAK - #endif -#endif - -#endif // __OBJC__ diff --git a/third_party/google-toolbox-for-mac/include/GTMDefines.h b/third_party/google-toolbox-for-mac/include/GTMDefines.h new file mode 120000 index 00000000..0d418bdc --- /dev/null +++ b/third_party/google-toolbox-for-mac/include/GTMDefines.h @@ -0,0 +1 @@ +../google-toolbox-for-mac/GTMDefines.h \ No newline at end of file diff --git a/third_party/google-toolbox-for-mac/include/GoogleToolboxForMac/GTMLogger.h b/third_party/google-toolbox-for-mac/include/GoogleToolboxForMac/GTMLogger.h deleted file mode 100644 index 0d40e080..00000000 --- a/third_party/google-toolbox-for-mac/include/GoogleToolboxForMac/GTMLogger.h +++ /dev/null @@ -1,526 +0,0 @@ -// -// GTMLogger.h -// -// Copyright 2007-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -// Key Abstractions -// ---------------- -// -// This file declares multiple classes and protocols that are used by the -// GTMLogger logging system. The 4 main abstractions used in this file are the -// following: -// -// * logger (GTMLogger) - The main logging class that users interact with. It -// has methods for logging at different levels and uses a log writer, a log -// formatter, and a log filter to get the job done. -// -// * log writer (GTMLogWriter) - Writes a given string to some log file, where -// a "log file" can be a physical file on disk, a POST over HTTP to some URL, -// or even some in-memory structure (e.g., a ring buffer). -// -// * log formatter (GTMLogFormatter) - Given a format string and arguments as -// a va_list, returns a single formatted NSString. A "formatted string" could -// be a string with the date prepended, a string with values in a CSV format, -// or even a string of XML. -// -// * log filter (GTMLogFilter) - Given a formatted log message as an NSString -// and the level at which the message is to be logged, this class will decide -// whether the given message should be logged or not. This is a flexible way -// to filter out messages logged at a certain level, messages that contain -// certain text, or filter nothing out at all. This gives the caller the -// flexibility to dynamically enable debug logging in Release builds. -// -// This file also declares some classes to handle the common log writer, log -// formatter, and log filter cases. Callers can also create their own writers, -// formatters, and filters and they can even build them on top of the ones -// declared here. Keep in mind that your custom writer/formatter/filter may be -// called from multiple threads, so it must be thread-safe. - -#import -#import "GTMDefines.h" - -// Predeclaration of used protocols that are declared later in this file. -@protocol GTMLogWriter, GTMLogFormatter, GTMLogFilter; - -// GTMLogger -// -// GTMLogger is the primary user-facing class for an object-oriented logging -// system. It is built on the concept of log formatters (GTMLogFormatter), log -// writers (GTMLogWriter), and log filters (GTMLogFilter). When a message is -// sent to a GTMLogger to log a message, the message is formatted using the log -// formatter, then the log filter is consulted to see if the message should be -// logged, and if so, the message is sent to the log writer to be written out. -// -// GTMLogger is intended to be a flexible and thread-safe logging solution. Its -// flexibility comes from the fact that GTMLogger instances can be customized -// with user defined formatters, filters, and writers. And these writers, -// filters, and formatters can be combined, stacked, and customized in arbitrary -// ways to suit the needs at hand. For example, multiple writers can be used at -// the same time, and a GTMLogger instance can even be used as another -// GTMLogger's writer. This allows for arbitrarily deep logging trees. -// -// A standard GTMLogger uses a writer that sends messages to standard out, a -// formatter that smacks a timestamp and a few other bits of interesting -// information on the message, and a filter that filters out debug messages from -// release builds. Using the standard log settings, a log message will look like -// the following: -// -// 2007-12-30 10:29:24.177 myapp[4588/0xa07d0f60] [lvl=1] foo= -// -// The output contains the date and time of the log message, the name of the -// process followed by its process ID/thread ID, the log level at which the -// message was logged (in the previous example the level was 1: -// kGTMLoggerLevelDebug), and finally, the user-specified log message itself (in -// this case, the log message was @"foo=%@", foo). -// -// Multiple instances of GTMLogger can be created, each configured their own -// way. Though GTMLogger is not a singleton (in the GoF sense), it does provide -// access to a shared (i.e., globally accessible) GTMLogger instance. This makes -// it convenient for all code in a process to use the same GTMLogger instance. -// The shared GTMLogger instance can also be configured in an arbitrary, and -// these configuration changes will affect all code that logs through the shared -// instance. - -// -// Log Levels -// ---------- -// GTMLogger has 3 different log levels: Debug, Info, and Error. GTMLogger -// doesn't take any special action based on the log level; it simply forwards -// this information on to formatters, filters, and writers, each of which may -// optionally take action based on the level. Since log level filtering is -// performed at runtime, log messages are typically not filtered out at compile -// time. The exception to this rule is that calls to the GTMLoggerDebug() macro -// *ARE* filtered out of non-DEBUG builds. This is to be backwards compatible -// with behavior that many developers are currently used to. Note that this -// means that GTMLoggerDebug(@"hi") will be compiled out of Release builds, but -// [[GTMLogger sharedLogger] logDebug:@"hi"] will NOT be compiled out. -// -// Standard loggers are created with the GTMLogLevelFilter log filter, which -// filters out certain log messages based on log level, and some other settings. -// -// In addition to the -logDebug:, -logInfo:, and -logError: methods defined on -// GTMLogger itself, there are also C macros that make usage of the shared -// GTMLogger instance very convenient. These macros are: -// -// GTMLoggerDebug(...) -// GTMLoggerInfo(...) -// GTMLoggerError(...) -// -// Again, a notable feature of these macros is that GTMLogDebug() calls *will be -// compiled out of non-DEBUG builds*. -// -// Standard Loggers -// ---------------- -// GTMLogger has the concept of "standard loggers". A standard logger is simply -// a logger that is pre-configured with some standard/common writer, formatter, -// and filter combination. Standard loggers are created using the creation -// methods beginning with "standard". The alternative to a standard logger is a -// regular logger, which will send messages to stdout, with no special -// formatting, and no filtering. -// -// How do I use GTMLogger? -// ---------------------- -// The typical way you will want to use GTMLogger is to simply use the -// GTMLogger*() macros for logging from code. That way we can easily make -// changes to the GTMLogger class and simply update the macros accordingly. Only -// your application startup code (perhaps, somewhere in main()) should use the -// GTMLogger class directly in order to configure the shared logger, which all -// of the code using the macros will be using. Again, this is just the typical -// situation. -// -// To be complete, there are cases where you may want to use GTMLogger directly, -// or even create separate GTMLogger instances for some reason. That's fine, -// too. -// -// Examples -// -------- -// The following show some common GTMLogger use cases. -// -// 1. You want to log something as simply as possible. Also, this call will only -// appear in debug builds. In non-DEBUG builds it will be completely removed. -// -// GTMLoggerDebug(@"foo = %@", foo); -// -// 2. The previous example is similar to the following. The major difference is -// that the previous call (example 1) will be compiled out of Release builds -// but this statement will not be compiled out. -// -// [[GTMLogger sharedLogger] logDebug:@"foo = %@", foo]; -// -// 3. Send all logging output from the shared logger to a file. We do this by -// creating an NSFileHandle for writing associated with a file, and setting -// that file handle as the logger's writer. -// -// NSFileHandle *f = [NSFileHandle fileHandleForWritingAtPath:@"/tmp/f.log" -// create:YES]; -// [[GTMLogger sharedLogger] setWriter:f]; -// GTMLoggerError(@"hi"); // This will be sent to /tmp/f.log -// -// 4. Create a new GTMLogger that will log to a file. This example differs from -// the previous one because here we create a new GTMLogger that is different -// from the shared logger. -// -// GTMLogger *logger = [GTMLogger standardLoggerWithPath:@"/tmp/temp.log"]; -// [logger logInfo:@"hi temp log file"]; -// -// 5. Create a logger that writes to stdout and does NOT do any formatting to -// the log message. This might be useful, for example, when writing a help -// screen for a command-line tool to standard output. -// -// GTMLogger *logger = [GTMLogger logger]; -// [logger logInfo:@"%@ version 0.1 usage", progName]; -// -// 6. Send log output to stdout AND to a log file. The trick here is that -// NSArrays function as composite log writers, which means when an array is -// set as the log writer, it forwards all logging messages to all of its -// contained GTMLogWriters. -// -// // Create array of GTMLogWriters -// NSArray *writers = [NSArray arrayWithObjects: -// [NSFileHandle fileHandleForWritingAtPath:@"/tmp/f.log" create:YES], -// [NSFileHandle fileHandleWithStandardOutput], nil]; -// -// GTMLogger *logger = [GTMLogger standardLogger]; -// [logger setWriter:writers]; -// [logger logInfo:@"hi"]; // Output goes to stdout and /tmp/f.log -// -// For futher details on log writers, formatters, and filters, see the -// documentation below. -// -// NOTE: GTMLogger is application level logging. By default it does nothing -// with _GTMDevLog/_GTMDevAssert (see GTMDefines.h). An application can choose -// to bridge _GTMDevLog/_GTMDevAssert to GTMLogger by providing macro -// definitions in its prefix header (see GTMDefines.h for how one would do -// that). -// -@interface GTMLogger : NSObject { - @private - id writer_; - id formatter_; - id filter_; -} - -// -// Accessors for the shared logger instance -// - -// Returns a shared/global standard GTMLogger instance. Callers should typically -// use this method to get a GTMLogger instance, unless they explicitly want -// their own instance to configure for their own needs. This is the only method -// that returns a shared instance; all the rest return new GTMLogger instances. -+ (id)sharedLogger; - -// Sets the shared logger instance to |logger|. Future calls to +sharedLogger -// will return |logger| instead. -+ (void)setSharedLogger:(GTMLogger *)logger; - -// -// Creation methods -// - -// Returns a new autoreleased GTMLogger instance that will log to stdout, using -// the GTMLogStandardFormatter, and the GTMLogLevelFilter filter. -+ (id)standardLogger; - -// Same as +standardLogger, but logs to stderr. -+ (id)standardLoggerWithStderr; - -// Same as +standardLogger but levels >= kGTMLoggerLevelError are routed to -// stderr, everything else goes to stdout. -+ (id)standardLoggerWithStdoutAndStderr; - -// Returns a new standard GTMLogger instance with a log writer that will -// write to the file at |path|, and will use the GTMLogStandardFormatter and -// GTMLogLevelFilter classes. If |path| does not exist, it will be created. -+ (id)standardLoggerWithPath:(NSString *)path; - -// Returns an autoreleased GTMLogger instance that will use the specified -// |writer|, |formatter|, and |filter|. -+ (id)loggerWithWriter:(id)writer - formatter:(id)formatter - filter:(id)filter; - -// Returns an autoreleased GTMLogger instance that logs to stdout, with the -// basic formatter, and no filter. The returned logger differs from the logger -// returned by +standardLogger because this one does not do any filtering and -// does not do any special log formatting; this is the difference between a -// "regular" logger and a "standard" logger. -+ (id)logger; - -// Designated initializer. This method returns a GTMLogger initialized with the -// specified |writer|, |formatter|, and |filter|. See the setter methods below -// for what values will be used if nil is passed for a parameter. -- (id)initWithWriter:(id)writer - formatter:(id)formatter - filter:(id)filter; - -// -// Logging methods -// - -// Logs a message at the debug level (kGTMLoggerLevelDebug). -- (void)logDebug:(NSString *)fmt, ... NS_FORMAT_FUNCTION(1, 2); -// Logs a message at the info level (kGTMLoggerLevelInfo). -- (void)logInfo:(NSString *)fmt, ... NS_FORMAT_FUNCTION(1, 2); -// Logs a message at the error level (kGTMLoggerLevelError). -- (void)logError:(NSString *)fmt, ... NS_FORMAT_FUNCTION(1, 2); -// Logs a message at the assert level (kGTMLoggerLevelAssert). -- (void)logAssert:(NSString *)fmt, ... NS_FORMAT_FUNCTION(1, 2); - - -// -// Accessors -// - -// Accessor methods for the log writer. If the log writer is set to nil, -// [NSFileHandle fileHandleWithStandardOutput] is used. -- (id)writer; -- (void)setWriter:(id)writer; - -// Accessor methods for the log formatter. If the log formatter is set to nil, -// GTMLogBasicFormatter is used. This formatter will format log messages in a -// plain printf style. -- (id)formatter; -- (void)setFormatter:(id)formatter; - -// Accessor methods for the log filter. If the log filter is set to nil, -// GTMLogNoFilter is used, which allows all log messages through. -- (id)filter; -- (void)setFilter:(id)filter; - -@end // GTMLogger - - -// Helper functions that are used by the convenience GTMLogger*() macros that -// enable the logging of function names. -@interface GTMLogger (GTMLoggerMacroHelpers) -- (void)logFuncDebug:(const char *)func msg:(NSString *)fmt, ... - NS_FORMAT_FUNCTION(2, 3); -- (void)logFuncInfo:(const char *)func msg:(NSString *)fmt, ... - NS_FORMAT_FUNCTION(2, 3); -- (void)logFuncError:(const char *)func msg:(NSString *)fmt, ... - NS_FORMAT_FUNCTION(2, 3); -- (void)logFuncAssert:(const char *)func msg:(NSString *)fmt, ... - NS_FORMAT_FUNCTION(2, 3); -@end // GTMLoggerMacroHelpers - - -// The convenience macros are only defined if they haven't already been defined. -#ifndef GTMLoggerInfo - -// Convenience macros that log to the shared GTMLogger instance. These macros -// are how users should typically log to GTMLogger. Notice that GTMLoggerDebug() -// calls will be compiled out of non-Debug builds. -#define GTMLoggerDebug(...) \ - [[GTMLogger sharedLogger] logFuncDebug:__func__ msg:__VA_ARGS__] -#define GTMLoggerInfo(...) \ - [[GTMLogger sharedLogger] logFuncInfo:__func__ msg:__VA_ARGS__] -#define GTMLoggerError(...) \ - [[GTMLogger sharedLogger] logFuncError:__func__ msg:__VA_ARGS__] -#define GTMLoggerAssert(...) \ - [[GTMLogger sharedLogger] logFuncAssert:__func__ msg:__VA_ARGS__] - -// If we're not in a debug build, remove the GTMLoggerDebug statements. This -// makes calls to GTMLoggerDebug "compile out" of Release builds -#ifndef DEBUG -#undef GTMLoggerDebug -#define GTMLoggerDebug(...) do {} while(0) -#endif - -#endif // !defined(GTMLoggerInfo) - -// Log levels. -typedef enum { - kGTMLoggerLevelUnknown, - kGTMLoggerLevelDebug, - kGTMLoggerLevelInfo, - kGTMLoggerLevelError, - kGTMLoggerLevelAssert, -} GTMLoggerLevel; - - -// -// Log Writers -// - -// Protocol to be implemented by a GTMLogWriter instance. -@protocol GTMLogWriter -// Writes the given log message to where the log writer is configured to write. -- (void)logMessage:(NSString *)msg level:(GTMLoggerLevel)level; -@end // GTMLogWriter - - -// Simple category on NSFileHandle that makes NSFileHandles valid log writers. -// This is convenient because something like, say, +fileHandleWithStandardError -// now becomes a valid log writer. Log messages are written to the file handle -// with a newline appended. -@interface NSFileHandle (GTMFileHandleLogWriter) -// Opens the file at |path| in append mode, and creates the file with |mode| -// if it didn't previously exist. -+ (id)fileHandleForLoggingAtPath:(NSString *)path mode:(mode_t)mode; -@end // NSFileHandle - - -// This category makes NSArray a GTMLogWriter that can be composed of other -// GTMLogWriters. This is the classic Composite GoF design pattern. When the -// GTMLogWriter -logMessage:level: message is sent to the array, the array -// forwards the message to all of its elements that implement the GTMLogWriter -// protocol. -// -// This is useful in situations where you would like to send log output to -// multiple log writers at the same time. Simply create an NSArray of the log -// writers you wish to use, then set the array as the "writer" for your -// GTMLogger instance. -@interface NSArray (GTMArrayCompositeLogWriter) -@end // GTMArrayCompositeLogWriter - - -// This category adapts the GTMLogger interface so that it can be used as a log -// writer; it's an "adapter" in the GoF Adapter pattern sense. -// -// This is useful when you want to configure a logger to log to a specific -// writer with a specific formatter and/or filter. But you want to also compose -// that with a different log writer that may have its own formatter and/or -// filter. -@interface GTMLogger (GTMLoggerLogWriter) -@end // GTMLoggerLogWriter - - -// -// Log Formatters -// - -// Protocol to be implemented by a GTMLogFormatter instance. -@protocol GTMLogFormatter -// Returns a formatted string using the format specified in |fmt| and the va -// args specified in |args|. -- (NSString *)stringForFunc:(NSString *)func - withFormat:(NSString *)fmt - valist:(va_list)args - level:(GTMLoggerLevel)level NS_FORMAT_FUNCTION(2, 0); -@end // GTMLogFormatter - - -// A basic log formatter that formats a string the same way that NSLog (or -// printf) would. It does not do anything fancy, nor does it add any data of its -// own. -@interface GTMLogBasicFormatter : NSObject - -// Helper method for prettying C99 __func__ and GCC __PRETTY_FUNCTION__ -- (NSString *)prettyNameForFunc:(NSString *)func; - -@end // GTMLogBasicFormatter - - -// A log formatter that formats the log string like the basic formatter, but -// also prepends a timestamp and some basic process info to the message, as -// shown in the following sample output. -// 2007-12-30 10:29:24.177 myapp[4588/0xa07d0f60] [lvl=1] log mesage here -@interface GTMLogStandardFormatter : GTMLogBasicFormatter { - @private - NSDateFormatter *dateFormatter_; // yyyy-MM-dd HH:mm:ss.SSS - NSString *pname_; - pid_t pid_; -} -@end // GTMLogStandardFormatter - - -// -// Log Filters -// - -// Protocol to be implemented by a GTMLogFilter instance. -@protocol GTMLogFilter - -// Returns YES if |msg| at |level| should be logged; NO otherwise. -- (BOOL)filterAllowsMessage:(NSString *)msg level:(GTMLoggerLevel)level; - -@optional - -// Optionally implemented by the instance to set up the filter before the logger -// starts to use it. -// -// Filter implementations may require setup/teardown that is not feasible in -// init/dealloc. For example, if the filter uses KVO (say, to observe -// NSUserDefaults), the unregistration must happen before dealloc in order to -// avoid a race condition that could lead to an overrelease of the filter. -- (void)didAttachToLogger; - -// Optionally implemented by the instance to tear down the filter after the -// logger is done using it. -// -// See above didAttachToLogger comments. -- (void)willDetachFromLogger; - -@end // GTMLogFilter - - -// A log filter that filters messages at the kGTMLoggerLevelDebug level out of -// non-debug builds. Messages at the kGTMLoggerLevelInfo level are also filtered -// out of non-debug builds unless GTMVerboseLogging is set in the environment or -// the processes's defaults. Messages at the kGTMLoggerLevelError level are -// never filtered. -@interface GTMLogLevelFilter : NSObject { - @private - NSUserDefaults *userDefaults_; -} -@end // GTMLogLevelFilter - -// A simple log filter that does NOT filter anything out; -// -filterAllowsMessage:level will always return YES. This can be a convenient -// way to enable debug-level logging in release builds (if you so desire). -@interface GTMLogNoFilter : NSObject -@end // GTMLogNoFilter - - -// Base class for custom level filters. Not for direct use, use the minimum -// or maximum level subclasses below. -@interface GTMLogAllowedLevelFilter : NSObject { - @private - NSIndexSet *allowedLevels_; -} -@end - -// A log filter that allows you to set a minimum log level. Messages below this -// level will be filtered. -@interface GTMLogMininumLevelFilter : GTMLogAllowedLevelFilter - -// Designated initializer, logs at levels < |level| will be filtered. -- (id)initWithMinimumLevel:(GTMLoggerLevel)level; - -@end - -// A log filter that allows you to set a maximum log level. Messages whose level -// exceeds this level will be filtered. This is really only useful if you have -// a composite GTMLogger that is sending the other messages elsewhere. -@interface GTMLogMaximumLevelFilter : GTMLogAllowedLevelFilter - -// Designated initializer, logs at levels > |level| will be filtered. -- (id)initWithMaximumLevel:(GTMLoggerLevel)level; - -@end - - -// For subclasses only -@interface GTMLogger (PrivateMethods) - -- (void)logInternalFunc:(const char *)func - format:(NSString *)fmt - valist:(va_list)args - level:(GTMLoggerLevel)level NS_FORMAT_FUNCTION(2, 0); - -@end - diff --git a/third_party/google-toolbox-for-mac/include/GoogleToolboxForMac/GTMLogger.h b/third_party/google-toolbox-for-mac/include/GoogleToolboxForMac/GTMLogger.h new file mode 120000 index 00000000..fadc055e --- /dev/null +++ b/third_party/google-toolbox-for-mac/include/GoogleToolboxForMac/GTMLogger.h @@ -0,0 +1 @@ +../../google-toolbox-for-mac/Foundation/GTMLogger.h \ No newline at end of file From 9249dece027a343186835a84221730602af8ccd3 Mon Sep 17 00:00:00 2001 From: deling-google <99381034+deling-google@users.noreply.github.com> Date: Thu, 31 Mar 2022 15:10:50 -0700 Subject: [PATCH 14/17] Symlink smhasher headers --- third_party/smhasher/include/src | 1 + .../smhasher/include/src/MurmurHash3.h | 37 ------------------- 2 files changed, 1 insertion(+), 37 deletions(-) create mode 120000 third_party/smhasher/include/src delete mode 100644 third_party/smhasher/include/src/MurmurHash3.h diff --git a/third_party/smhasher/include/src b/third_party/smhasher/include/src new file mode 120000 index 00000000..4f68c30c --- /dev/null +++ b/third_party/smhasher/include/src @@ -0,0 +1 @@ +../../smhasher/smhasher/src \ No newline at end of file diff --git a/third_party/smhasher/include/src/MurmurHash3.h b/third_party/smhasher/include/src/MurmurHash3.h deleted file mode 100644 index e1c6d349..00000000 --- a/third_party/smhasher/include/src/MurmurHash3.h +++ /dev/null @@ -1,37 +0,0 @@ -//----------------------------------------------------------------------------- -// MurmurHash3 was written by Austin Appleby, and is placed in the public -// domain. The author hereby disclaims copyright to this source code. - -#ifndef _MURMURHASH3_H_ -#define _MURMURHASH3_H_ - -//----------------------------------------------------------------------------- -// Platform-specific functions and macros - -// Microsoft Visual Studio - -#if defined(_MSC_VER) && (_MSC_VER < 1600) - -typedef unsigned char uint8_t; -typedef unsigned int uint32_t; -typedef unsigned __int64 uint64_t; - -// Other compilers - -#else // defined(_MSC_VER) - -#include - -#endif // !defined(_MSC_VER) - -//----------------------------------------------------------------------------- - -void MurmurHash3_x86_32 ( const void * key, int len, uint32_t seed, void * out ); - -void MurmurHash3_x86_128 ( const void * key, int len, uint32_t seed, void * out ); - -void MurmurHash3_x64_128 ( const void * key, int len, uint32_t seed, void * out ); - -//----------------------------------------------------------------------------- - -#endif // _MURMURHASH3_H_ From 2ceb48b660941966e501c22857c8a7f0e799f822 Mon Sep 17 00:00:00 2001 From: deling-google <99381034+deling-google@users.noreply.github.com> Date: Thu, 31 Mar 2022 15:11:59 -0700 Subject: [PATCH 15/17] Update gitignore to include Package.resolved --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index efb916b2..f268184b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ build/** .build +Package.resolved From b68f3ccf60e6248aba8d5fb08d1eda1da010c126 Mon Sep 17 00:00:00 2001 From: deling-google <99381034+deling-google@users.noreply.github.com> Date: Thu, 31 Mar 2022 15:16:17 -0700 Subject: [PATCH 16/17] Add branch info --- .gitmodules | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitmodules b/.gitmodules index 006eb480..81c6b8e8 100644 --- a/.gitmodules +++ b/.gitmodules @@ -21,9 +21,12 @@ [submodule "third_party/smhasher/smhasher"] path = third_party/smhasher/smhasher url = https://github.com/aappleby/smhasher + branch = master [submodule "third_party/securemessage/securemessage"] path = third_party/securemessage/securemessage url = https://github.com/google/securemessage.git + branch = master [submodule "third_party/google-toolbox-for-mac/google-toolbox-for-mac"] path = third_party/google-toolbox-for-mac/google-toolbox-for-mac url = https://github.com/google/google-toolbox-for-mac.git + branch = main From 58352df21cecc5bfc6400d11aaf62d2d9520e100 Mon Sep 17 00:00:00 2001 From: deling-google Date: Thu, 31 Mar 2022 16:03:11 -0700 Subject: [PATCH 17/17] Add Package.resolved --- .gitignore | 1 - Package.resolved | 25 +++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 Package.resolved diff --git a/.gitignore b/.gitignore index f268184b..efb916b2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,2 @@ build/** .build -Package.resolved diff --git a/Package.resolved b/Package.resolved new file mode 100644 index 00000000..649d6098 --- /dev/null +++ b/Package.resolved @@ -0,0 +1,25 @@ +{ + "object": { + "pins": [ + { + "package": "abseil", + "repositoryURL": "https://github.com/firebase/abseil-cpp-SwiftPM.git", + "state": { + "branch": "main", + "revision": "d302de612e3d57c6f4afaf087da18fba8eac72a7", + "version": null + } + }, + { + "package": "BoringSSL-GRPC", + "repositoryURL": "https://github.com/firebase/boringssl-SwiftPM.git", + "state": { + "branch": null, + "revision": "734a8247442fde37df4364c21f6a0085b6a36728", + "version": "0.7.2" + } + } + ] + }, + "version": 1 +}