Files
nearby/compiled_proto/proto/fast_pair_enums.pb.cc
ftsui c14dfebf60 PR #2453: Compile protos
Imported from GitHub PR https://github.com/google/nearby/pull/2453

<!--
  Thanks for submitting a pull request!
  We appreciate you spending the time to work on these changes. Please provide
  enough information so that others can review your pull request.
-->

## Summary

<!--
 Explain the motivation for making this change. What existing problem does the
 pull request solve?
-->

## How did you test this change?

<!--
  For example, the commands you ran and their output or screenshots / videos if
  the pull request changes the user interface.
-->

Copybara import of the project:

--
880e0076291b25a6a94ce018a86d3c15c5f55944 by ftsui <ftsui@google.com>:

Compile protos

--
3e152cb7d1183f38946ae30874879f1008ce33cb by ftsui <ftsui@google.com>:

Fix merge marker.

Merging this change closes #2453

PiperOrigin-RevId: 625469935
2024-04-16 15:20:35 -07:00

749 lines
27 KiB
C++

// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: proto/fast_pair_enums.proto
#include "proto/fast_pair_enums.pb.h"
#include <algorithm>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/extension_set.h>
#include <google/protobuf/wire_format_lite.h>
#include <google/protobuf/io/zero_copy_stream_impl_lite.h>
// @@protoc_insertion_point(includes)
#include <google/protobuf/port_def.inc>
PROTOBUF_PRAGMA_INIT_SEG
namespace nearby {
namespace proto {
namespace fastpair {
constexpr FastPairEvent::FastPairEvent(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized){}
struct FastPairEventDefaultTypeInternal {
constexpr FastPairEventDefaultTypeInternal()
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~FastPairEventDefaultTypeInternal() {}
union {
FastPairEvent _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT FastPairEventDefaultTypeInternal _FastPairEvent_default_instance_;
} // namespace fastpair
} // namespace proto
} // namespace nearby
namespace nearby {
namespace proto {
namespace fastpair {
bool FastPairEvent_BondState_IsValid(int value) {
switch (value) {
case 0:
case 10:
case 11:
case 12:
return true;
default:
return false;
}
}
static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> FastPairEvent_BondState_strings[4] = {};
static const char FastPairEvent_BondState_names[] =
"BONDED"
"BONDING"
"NONE"
"UNKNOWN_BOND_STATE";
static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry FastPairEvent_BondState_entries[] = {
{ {FastPairEvent_BondState_names + 0, 6}, 12 },
{ {FastPairEvent_BondState_names + 6, 7}, 11 },
{ {FastPairEvent_BondState_names + 13, 4}, 10 },
{ {FastPairEvent_BondState_names + 17, 18}, 0 },
};
static const int FastPairEvent_BondState_entries_by_number[] = {
3, // 0 -> UNKNOWN_BOND_STATE
2, // 10 -> NONE
1, // 11 -> BONDING
0, // 12 -> BONDED
};
const std::string& FastPairEvent_BondState_Name(
FastPairEvent_BondState value) {
static const bool dummy =
::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
FastPairEvent_BondState_entries,
FastPairEvent_BondState_entries_by_number,
4, FastPairEvent_BondState_strings);
(void) dummy;
int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
FastPairEvent_BondState_entries,
FastPairEvent_BondState_entries_by_number,
4, value);
return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() :
FastPairEvent_BondState_strings[idx].get();
}
bool FastPairEvent_BondState_Parse(
::PROTOBUF_NAMESPACE_ID::ConstStringParam name, FastPairEvent_BondState* value) {
int int_value;
bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
FastPairEvent_BondState_entries, 4, name, &int_value);
if (success) {
*value = static_cast<FastPairEvent_BondState>(int_value);
}
return success;
}
#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
constexpr FastPairEvent_BondState FastPairEvent::UNKNOWN_BOND_STATE;
constexpr FastPairEvent_BondState FastPairEvent::NONE;
constexpr FastPairEvent_BondState FastPairEvent::BONDING;
constexpr FastPairEvent_BondState FastPairEvent::BONDED;
constexpr FastPairEvent_BondState FastPairEvent::BondState_MIN;
constexpr FastPairEvent_BondState FastPairEvent::BondState_MAX;
constexpr int FastPairEvent::BondState_ARRAYSIZE;
#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
bool FastPairEvent_ErrorCode_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:
return true;
default:
return false;
}
}
static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> FastPairEvent_ErrorCode_strings[17] = {};
static const char FastPairEvent_ErrorCode_names[] =
"DEVICE_NOT_BONDED_DURING_RETROACTIVE_PAIR"
"DEVICE_NOT_IN_PAIRED_HISTORY_EXCEPTION"
"EXECUTION_EXCEPTION"
"INTERRUPTED"
"MDH_REMOTE_EXCEPTION"
"OTHER_ERROR"
"PARSE_EXCEPTION"
"REFLECTIVE_OPERATION_EXCEPTION"
"SUCCESS_ADDRESS_ROTATE"
"SUCCESS_RETRY_GATT_ERROR"
"SUCCESS_RETRY_GATT_TIMEOUT"
"SUCCESS_RETRY_SECRET_HANDSHAKE_ERROR"
"SUCCESS_RETRY_SECRET_HANDSHAKE_TIMEOUT"
"SUCCESS_SECRET_HANDSHAKE_RECONNECT"
"SUCCESS_SIGNAL_LOST"
"TIMEOUT"
"UNKNOWN_ERROR_CODE";
static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry FastPairEvent_ErrorCode_entries[] = {
{ {FastPairEvent_ErrorCode_names + 0, 41}, 16 },
{ {FastPairEvent_ErrorCode_names + 41, 38}, 15 },
{ {FastPairEvent_ErrorCode_names + 79, 19}, 5 },
{ {FastPairEvent_ErrorCode_names + 98, 11}, 3 },
{ {FastPairEvent_ErrorCode_names + 109, 20}, 7 },
{ {FastPairEvent_ErrorCode_names + 129, 11}, 1 },
{ {FastPairEvent_ErrorCode_names + 140, 15}, 6 },
{ {FastPairEvent_ErrorCode_names + 155, 30}, 4 },
{ {FastPairEvent_ErrorCode_names + 185, 22}, 13 },
{ {FastPairEvent_ErrorCode_names + 207, 24}, 8 },
{ {FastPairEvent_ErrorCode_names + 231, 26}, 9 },
{ {FastPairEvent_ErrorCode_names + 257, 36}, 10 },
{ {FastPairEvent_ErrorCode_names + 293, 38}, 11 },
{ {FastPairEvent_ErrorCode_names + 331, 34}, 12 },
{ {FastPairEvent_ErrorCode_names + 365, 19}, 14 },
{ {FastPairEvent_ErrorCode_names + 384, 7}, 2 },
{ {FastPairEvent_ErrorCode_names + 391, 18}, 0 },
};
static const int FastPairEvent_ErrorCode_entries_by_number[] = {
16, // 0 -> UNKNOWN_ERROR_CODE
5, // 1 -> OTHER_ERROR
15, // 2 -> TIMEOUT
3, // 3 -> INTERRUPTED
7, // 4 -> REFLECTIVE_OPERATION_EXCEPTION
2, // 5 -> EXECUTION_EXCEPTION
6, // 6 -> PARSE_EXCEPTION
4, // 7 -> MDH_REMOTE_EXCEPTION
9, // 8 -> SUCCESS_RETRY_GATT_ERROR
10, // 9 -> SUCCESS_RETRY_GATT_TIMEOUT
11, // 10 -> SUCCESS_RETRY_SECRET_HANDSHAKE_ERROR
12, // 11 -> SUCCESS_RETRY_SECRET_HANDSHAKE_TIMEOUT
13, // 12 -> SUCCESS_SECRET_HANDSHAKE_RECONNECT
8, // 13 -> SUCCESS_ADDRESS_ROTATE
14, // 14 -> SUCCESS_SIGNAL_LOST
1, // 15 -> DEVICE_NOT_IN_PAIRED_HISTORY_EXCEPTION
0, // 16 -> DEVICE_NOT_BONDED_DURING_RETROACTIVE_PAIR
};
const std::string& FastPairEvent_ErrorCode_Name(
FastPairEvent_ErrorCode value) {
static const bool dummy =
::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
FastPairEvent_ErrorCode_entries,
FastPairEvent_ErrorCode_entries_by_number,
17, FastPairEvent_ErrorCode_strings);
(void) dummy;
int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
FastPairEvent_ErrorCode_entries,
FastPairEvent_ErrorCode_entries_by_number,
17, value);
return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() :
FastPairEvent_ErrorCode_strings[idx].get();
}
bool FastPairEvent_ErrorCode_Parse(
::PROTOBUF_NAMESPACE_ID::ConstStringParam name, FastPairEvent_ErrorCode* value) {
int int_value;
bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
FastPairEvent_ErrorCode_entries, 17, name, &int_value);
if (success) {
*value = static_cast<FastPairEvent_ErrorCode>(int_value);
}
return success;
}
#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
constexpr FastPairEvent_ErrorCode FastPairEvent::UNKNOWN_ERROR_CODE;
constexpr FastPairEvent_ErrorCode FastPairEvent::OTHER_ERROR;
constexpr FastPairEvent_ErrorCode FastPairEvent::TIMEOUT;
constexpr FastPairEvent_ErrorCode FastPairEvent::INTERRUPTED;
constexpr FastPairEvent_ErrorCode FastPairEvent::REFLECTIVE_OPERATION_EXCEPTION;
constexpr FastPairEvent_ErrorCode FastPairEvent::EXECUTION_EXCEPTION;
constexpr FastPairEvent_ErrorCode FastPairEvent::PARSE_EXCEPTION;
constexpr FastPairEvent_ErrorCode FastPairEvent::MDH_REMOTE_EXCEPTION;
constexpr FastPairEvent_ErrorCode FastPairEvent::SUCCESS_RETRY_GATT_ERROR;
constexpr FastPairEvent_ErrorCode FastPairEvent::SUCCESS_RETRY_GATT_TIMEOUT;
constexpr FastPairEvent_ErrorCode FastPairEvent::SUCCESS_RETRY_SECRET_HANDSHAKE_ERROR;
constexpr FastPairEvent_ErrorCode FastPairEvent::SUCCESS_RETRY_SECRET_HANDSHAKE_TIMEOUT;
constexpr FastPairEvent_ErrorCode FastPairEvent::SUCCESS_SECRET_HANDSHAKE_RECONNECT;
constexpr FastPairEvent_ErrorCode FastPairEvent::SUCCESS_ADDRESS_ROTATE;
constexpr FastPairEvent_ErrorCode FastPairEvent::SUCCESS_SIGNAL_LOST;
constexpr FastPairEvent_ErrorCode FastPairEvent::DEVICE_NOT_IN_PAIRED_HISTORY_EXCEPTION;
constexpr FastPairEvent_ErrorCode FastPairEvent::DEVICE_NOT_BONDED_DURING_RETROACTIVE_PAIR;
constexpr FastPairEvent_ErrorCode FastPairEvent::ErrorCode_MIN;
constexpr FastPairEvent_ErrorCode FastPairEvent::ErrorCode_MAX;
constexpr int FastPairEvent::ErrorCode_ARRAYSIZE;
#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
bool FastPairEvent_BrEdrHandoverErrorCode_IsValid(int value) {
switch (value) {
case 0:
case 1:
case 2:
case 3:
return true;
default:
return false;
}
}
static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> FastPairEvent_BrEdrHandoverErrorCode_strings[4] = {};
static const char FastPairEvent_BrEdrHandoverErrorCode_names[] =
"BLUETOOTH_MAC_INVALID"
"CONTROL_POINT_RESULT_CODE_NOT_SUCCESS"
"TRANSPORT_BLOCK_INVALID"
"UNKNOWN_BR_EDR_HANDOVER_ERROR_CODE";
static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry FastPairEvent_BrEdrHandoverErrorCode_entries[] = {
{ {FastPairEvent_BrEdrHandoverErrorCode_names + 0, 21}, 2 },
{ {FastPairEvent_BrEdrHandoverErrorCode_names + 21, 37}, 1 },
{ {FastPairEvent_BrEdrHandoverErrorCode_names + 58, 23}, 3 },
{ {FastPairEvent_BrEdrHandoverErrorCode_names + 81, 34}, 0 },
};
static const int FastPairEvent_BrEdrHandoverErrorCode_entries_by_number[] = {
3, // 0 -> UNKNOWN_BR_EDR_HANDOVER_ERROR_CODE
1, // 1 -> CONTROL_POINT_RESULT_CODE_NOT_SUCCESS
0, // 2 -> BLUETOOTH_MAC_INVALID
2, // 3 -> TRANSPORT_BLOCK_INVALID
};
const std::string& FastPairEvent_BrEdrHandoverErrorCode_Name(
FastPairEvent_BrEdrHandoverErrorCode value) {
static const bool dummy =
::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
FastPairEvent_BrEdrHandoverErrorCode_entries,
FastPairEvent_BrEdrHandoverErrorCode_entries_by_number,
4, FastPairEvent_BrEdrHandoverErrorCode_strings);
(void) dummy;
int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
FastPairEvent_BrEdrHandoverErrorCode_entries,
FastPairEvent_BrEdrHandoverErrorCode_entries_by_number,
4, value);
return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() :
FastPairEvent_BrEdrHandoverErrorCode_strings[idx].get();
}
bool FastPairEvent_BrEdrHandoverErrorCode_Parse(
::PROTOBUF_NAMESPACE_ID::ConstStringParam name, FastPairEvent_BrEdrHandoverErrorCode* value) {
int int_value;
bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
FastPairEvent_BrEdrHandoverErrorCode_entries, 4, name, &int_value);
if (success) {
*value = static_cast<FastPairEvent_BrEdrHandoverErrorCode>(int_value);
}
return success;
}
#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
constexpr FastPairEvent_BrEdrHandoverErrorCode FastPairEvent::UNKNOWN_BR_EDR_HANDOVER_ERROR_CODE;
constexpr FastPairEvent_BrEdrHandoverErrorCode FastPairEvent::CONTROL_POINT_RESULT_CODE_NOT_SUCCESS;
constexpr FastPairEvent_BrEdrHandoverErrorCode FastPairEvent::BLUETOOTH_MAC_INVALID;
constexpr FastPairEvent_BrEdrHandoverErrorCode FastPairEvent::TRANSPORT_BLOCK_INVALID;
constexpr FastPairEvent_BrEdrHandoverErrorCode FastPairEvent::BrEdrHandoverErrorCode_MIN;
constexpr FastPairEvent_BrEdrHandoverErrorCode FastPairEvent::BrEdrHandoverErrorCode_MAX;
constexpr int FastPairEvent::BrEdrHandoverErrorCode_ARRAYSIZE;
#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
bool FastPairEvent_CreateBondErrorCode_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<std::string> FastPairEvent_CreateBondErrorCode_strings[6] = {};
static const char FastPairEvent_CreateBondErrorCode_names[] =
"BOND_BROKEN"
"FAILED_BUT_ALREADY_RECEIVE_PASS_KEY"
"INCORRECT_VARIANT"
"NO_PERMISSION"
"POSSIBLE_MITM"
"UNKNOWN_BOND_ERROR_CODE";
static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry FastPairEvent_CreateBondErrorCode_entries[] = {
{ {FastPairEvent_CreateBondErrorCode_names + 0, 11}, 1 },
{ {FastPairEvent_CreateBondErrorCode_names + 11, 35}, 5 },
{ {FastPairEvent_CreateBondErrorCode_names + 46, 17}, 4 },
{ {FastPairEvent_CreateBondErrorCode_names + 63, 13}, 3 },
{ {FastPairEvent_CreateBondErrorCode_names + 76, 13}, 2 },
{ {FastPairEvent_CreateBondErrorCode_names + 89, 23}, 0 },
};
static const int FastPairEvent_CreateBondErrorCode_entries_by_number[] = {
5, // 0 -> UNKNOWN_BOND_ERROR_CODE
0, // 1 -> BOND_BROKEN
4, // 2 -> POSSIBLE_MITM
3, // 3 -> NO_PERMISSION
2, // 4 -> INCORRECT_VARIANT
1, // 5 -> FAILED_BUT_ALREADY_RECEIVE_PASS_KEY
};
const std::string& FastPairEvent_CreateBondErrorCode_Name(
FastPairEvent_CreateBondErrorCode value) {
static const bool dummy =
::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
FastPairEvent_CreateBondErrorCode_entries,
FastPairEvent_CreateBondErrorCode_entries_by_number,
6, FastPairEvent_CreateBondErrorCode_strings);
(void) dummy;
int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
FastPairEvent_CreateBondErrorCode_entries,
FastPairEvent_CreateBondErrorCode_entries_by_number,
6, value);
return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() :
FastPairEvent_CreateBondErrorCode_strings[idx].get();
}
bool FastPairEvent_CreateBondErrorCode_Parse(
::PROTOBUF_NAMESPACE_ID::ConstStringParam name, FastPairEvent_CreateBondErrorCode* value) {
int int_value;
bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
FastPairEvent_CreateBondErrorCode_entries, 6, name, &int_value);
if (success) {
*value = static_cast<FastPairEvent_CreateBondErrorCode>(int_value);
}
return success;
}
#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
constexpr FastPairEvent_CreateBondErrorCode FastPairEvent::UNKNOWN_BOND_ERROR_CODE;
constexpr FastPairEvent_CreateBondErrorCode FastPairEvent::BOND_BROKEN;
constexpr FastPairEvent_CreateBondErrorCode FastPairEvent::POSSIBLE_MITM;
constexpr FastPairEvent_CreateBondErrorCode FastPairEvent::NO_PERMISSION;
constexpr FastPairEvent_CreateBondErrorCode FastPairEvent::INCORRECT_VARIANT;
constexpr FastPairEvent_CreateBondErrorCode FastPairEvent::FAILED_BUT_ALREADY_RECEIVE_PASS_KEY;
constexpr FastPairEvent_CreateBondErrorCode FastPairEvent::CreateBondErrorCode_MIN;
constexpr FastPairEvent_CreateBondErrorCode FastPairEvent::CreateBondErrorCode_MAX;
constexpr int FastPairEvent::CreateBondErrorCode_ARRAYSIZE;
#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
bool FastPairEvent_ConnectErrorCode_IsValid(int value) {
switch (value) {
case 0:
case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
return true;
default:
return false;
}
}
static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> FastPairEvent_ConnectErrorCode_strings[7] = {};
static const char FastPairEvent_ConnectErrorCode_names[] =
"DISCONNECTED"
"DISCOVERY_NOT_FINISHED"
"FAIL_TO_DISCOVERY"
"GET_PROFILE_PROXY_FAILED"
"LINK_KEY_CLEARED"
"UNKNOWN_CONNECT_ERROR_CODE"
"UNSUPPORTED_PROFILE";
static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry FastPairEvent_ConnectErrorCode_entries[] = {
{ {FastPairEvent_ConnectErrorCode_names + 0, 12}, 3 },
{ {FastPairEvent_ConnectErrorCode_names + 12, 22}, 6 },
{ {FastPairEvent_ConnectErrorCode_names + 34, 17}, 5 },
{ {FastPairEvent_ConnectErrorCode_names + 51, 24}, 2 },
{ {FastPairEvent_ConnectErrorCode_names + 75, 16}, 4 },
{ {FastPairEvent_ConnectErrorCode_names + 91, 26}, 0 },
{ {FastPairEvent_ConnectErrorCode_names + 117, 19}, 1 },
};
static const int FastPairEvent_ConnectErrorCode_entries_by_number[] = {
5, // 0 -> UNKNOWN_CONNECT_ERROR_CODE
6, // 1 -> UNSUPPORTED_PROFILE
3, // 2 -> GET_PROFILE_PROXY_FAILED
0, // 3 -> DISCONNECTED
4, // 4 -> LINK_KEY_CLEARED
2, // 5 -> FAIL_TO_DISCOVERY
1, // 6 -> DISCOVERY_NOT_FINISHED
};
const std::string& FastPairEvent_ConnectErrorCode_Name(
FastPairEvent_ConnectErrorCode value) {
static const bool dummy =
::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
FastPairEvent_ConnectErrorCode_entries,
FastPairEvent_ConnectErrorCode_entries_by_number,
7, FastPairEvent_ConnectErrorCode_strings);
(void) dummy;
int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
FastPairEvent_ConnectErrorCode_entries,
FastPairEvent_ConnectErrorCode_entries_by_number,
7, value);
return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() :
FastPairEvent_ConnectErrorCode_strings[idx].get();
}
bool FastPairEvent_ConnectErrorCode_Parse(
::PROTOBUF_NAMESPACE_ID::ConstStringParam name, FastPairEvent_ConnectErrorCode* value) {
int int_value;
bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
FastPairEvent_ConnectErrorCode_entries, 7, name, &int_value);
if (success) {
*value = static_cast<FastPairEvent_ConnectErrorCode>(int_value);
}
return success;
}
#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
constexpr FastPairEvent_ConnectErrorCode FastPairEvent::UNKNOWN_CONNECT_ERROR_CODE;
constexpr FastPairEvent_ConnectErrorCode FastPairEvent::UNSUPPORTED_PROFILE;
constexpr FastPairEvent_ConnectErrorCode FastPairEvent::GET_PROFILE_PROXY_FAILED;
constexpr FastPairEvent_ConnectErrorCode FastPairEvent::DISCONNECTED;
constexpr FastPairEvent_ConnectErrorCode FastPairEvent::LINK_KEY_CLEARED;
constexpr FastPairEvent_ConnectErrorCode FastPairEvent::FAIL_TO_DISCOVERY;
constexpr FastPairEvent_ConnectErrorCode FastPairEvent::DISCOVERY_NOT_FINISHED;
constexpr FastPairEvent_ConnectErrorCode FastPairEvent::ConnectErrorCode_MIN;
constexpr FastPairEvent_ConnectErrorCode FastPairEvent::ConnectErrorCode_MAX;
constexpr int FastPairEvent::ConnectErrorCode_ARRAYSIZE;
#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
bool DeviceType_IsValid(int value) {
switch (value) {
case 0:
case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
return true;
default:
return false;
}
}
static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> DeviceType_strings[7] = {};
static const char DeviceType_names[] =
"AUTO"
"PC"
"PHONE"
"TABLET"
"TV"
"UNKNOWN_DEVICE_TYPE"
"WEARABLE";
static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry DeviceType_entries[] = {
{ {DeviceType_names + 0, 4}, 3 },
{ {DeviceType_names + 4, 2}, 4 },
{ {DeviceType_names + 6, 5}, 1 },
{ {DeviceType_names + 11, 6}, 6 },
{ {DeviceType_names + 17, 2}, 5 },
{ {DeviceType_names + 19, 19}, 0 },
{ {DeviceType_names + 38, 8}, 2 },
};
static const int DeviceType_entries_by_number[] = {
5, // 0 -> UNKNOWN_DEVICE_TYPE
2, // 1 -> PHONE
6, // 2 -> WEARABLE
0, // 3 -> AUTO
1, // 4 -> PC
4, // 5 -> TV
3, // 6 -> TABLET
};
const std::string& DeviceType_Name(
DeviceType value) {
static const bool dummy =
::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
DeviceType_entries,
DeviceType_entries_by_number,
7, DeviceType_strings);
(void) dummy;
int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
DeviceType_entries,
DeviceType_entries_by_number,
7, 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, 7, name, &int_value);
if (success) {
*value = static_cast<DeviceType>(int_value);
}
return success;
}
bool OsType_IsValid(int value) {
switch (value) {
case 0:
case 1:
case 2:
return true;
default:
return false;
}
}
static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> OsType_strings[3] = {};
static const char OsType_names[] =
"ANDROID"
"CHROME_OS"
"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, 15}, 0 },
};
static const int OsType_entries_by_number[] = {
2, // 0 -> UNKNOWN_OS_TYPE
0, // 1 -> ANDROID
1, // 2 -> CHROME_OS
};
const std::string& OsType_Name(
OsType value) {
static const bool dummy =
::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
OsType_entries,
OsType_entries_by_number,
3, OsType_strings);
(void) dummy;
int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
OsType_entries,
OsType_entries_by_number,
3, 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, 3, name, &int_value);
if (success) {
*value = static_cast<OsType>(int_value);
}
return success;
}
// ===================================================================
class FastPairEvent::_Internal {
public:
};
FastPairEvent::FastPairEvent(::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:nearby.proto.fastpair.FastPairEvent)
}
FastPairEvent::FastPairEvent(const FastPairEvent& from)
: ::PROTOBUF_NAMESPACE_ID::MessageLite() {
_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
// @@protoc_insertion_point(copy_constructor:nearby.proto.fastpair.FastPairEvent)
}
inline void FastPairEvent::SharedCtor() {
}
FastPairEvent::~FastPairEvent() {
// @@protoc_insertion_point(destructor:nearby.proto.fastpair.FastPairEvent)
if (GetArenaForAllocation() != nullptr) return;
SharedDtor();
_internal_metadata_.Delete<std::string>();
}
inline void FastPairEvent::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}
void FastPairEvent::ArenaDtor(void* object) {
FastPairEvent* _this = reinterpret_cast< FastPairEvent* >(object);
(void)_this;
}
void FastPairEvent::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void FastPairEvent::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
void FastPairEvent::Clear() {
// @@protoc_insertion_point(message_clear_start:nearby.proto.fastpair.FastPairEvent)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
_internal_metadata_.Clear<std::string>();
}
const char* FastPairEvent::_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<std::string>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* FastPairEvent::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:nearby.proto.fastpair.FastPairEvent)
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<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
}
// @@protoc_insertion_point(serialize_to_array_end:nearby.proto.fastpair.FastPairEvent)
return target;
}
size_t FastPairEvent::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:nearby.proto.fastpair.FastPairEvent)
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<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
}
int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
SetCachedSize(cached_size);
return total_size;
}
void FastPairEvent::CheckTypeAndMergeFrom(
const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast<const FastPairEvent*>(
&from));
}
void FastPairEvent::MergeFrom(const FastPairEvent& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:nearby.proto.fastpair.FastPairEvent)
GOOGLE_DCHECK_NE(&from, this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}
void FastPairEvent::CopyFrom(const FastPairEvent& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:nearby.proto.fastpair.FastPairEvent)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool FastPairEvent::IsInitialized() const {
return true;
}
void FastPairEvent::InternalSwap(FastPairEvent* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
}
std::string FastPairEvent::GetTypeName() const {
return "nearby.proto.fastpair.FastPairEvent";
}
// @@protoc_insertion_point(namespace_scope)
} // namespace fastpair
} // namespace proto
} // namespace nearby
PROTOBUF_NAMESPACE_OPEN
template<> PROTOBUF_NOINLINE ::nearby::proto::fastpair::FastPairEvent* Arena::CreateMaybeMessage< ::nearby::proto::fastpair::FastPairEvent >(Arena* arena) {
return Arena::CreateMessageInternal< ::nearby::proto::fastpair::FastPairEvent >(arena);
}
PROTOBUF_NAMESPACE_CLOSE
// @@protoc_insertion_point(global_scope)
#include <google/protobuf/port_undef.inc>