Source code

Revision control

Copy as Markdown

Other Tools

// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: content_analysis/sdk/analysis.proto
#include "content_analysis/sdk/analysis.pb.h"
#include <algorithm>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/extension_set.h>
#include <google/protobuf/wire_format_lite.h>
#include <google/protobuf/io/zero_copy_stream_impl_lite.h>
// @@protoc_insertion_point(includes)
#include <google/protobuf/port_def.inc>
PROTOBUF_PRAGMA_INIT_SEG
namespace _pb = ::PROTOBUF_NAMESPACE_ID;
namespace _pbi = _pb::internal;
namespace content_analysis {
namespace sdk {
PROTOBUF_CONSTEXPR ContentMetaData_PrintMetadata::ContentMetaData_PrintMetadata(
::_pbi::ConstantInitialized): _impl_{
/*decltype(_impl_._has_bits_)*/{}
, /*decltype(_impl_._cached_size_)*/{}
, /*decltype(_impl_.printer_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
, /*decltype(_impl_.printer_type_)*/0} {}
struct ContentMetaData_PrintMetadataDefaultTypeInternal {
PROTOBUF_CONSTEXPR ContentMetaData_PrintMetadataDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
~ContentMetaData_PrintMetadataDefaultTypeInternal() {}
union {
ContentMetaData_PrintMetadata _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ContentMetaData_PrintMetadataDefaultTypeInternal _ContentMetaData_PrintMetadata_default_instance_;
PROTOBUF_CONSTEXPR ContentMetaData::ContentMetaData(
::_pbi::ConstantInitialized): _impl_{
/*decltype(_impl_._has_bits_)*/{}
, /*decltype(_impl_._cached_size_)*/{}
, /*decltype(_impl_.url_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
, /*decltype(_impl_.filename_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
, /*decltype(_impl_.digest_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
, /*decltype(_impl_.email_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
, /*decltype(_impl_.tab_title_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
, /*decltype(_impl_.csd_)*/nullptr
, /*decltype(_impl_.print_metadata_)*/nullptr} {}
struct ContentMetaDataDefaultTypeInternal {
PROTOBUF_CONSTEXPR ContentMetaDataDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
~ContentMetaDataDefaultTypeInternal() {}
union {
ContentMetaData _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ContentMetaDataDefaultTypeInternal _ContentMetaData_default_instance_;
PROTOBUF_CONSTEXPR ClientMetadata_Browser::ClientMetadata_Browser(
::_pbi::ConstantInitialized): _impl_{
/*decltype(_impl_._has_bits_)*/{}
, /*decltype(_impl_._cached_size_)*/{}
, /*decltype(_impl_.machine_user_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}} {}
struct ClientMetadata_BrowserDefaultTypeInternal {
PROTOBUF_CONSTEXPR ClientMetadata_BrowserDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
~ClientMetadata_BrowserDefaultTypeInternal() {}
union {
ClientMetadata_Browser _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ClientMetadata_BrowserDefaultTypeInternal _ClientMetadata_Browser_default_instance_;
PROTOBUF_CONSTEXPR ClientMetadata::ClientMetadata(
::_pbi::ConstantInitialized): _impl_{
/*decltype(_impl_._has_bits_)*/{}
, /*decltype(_impl_._cached_size_)*/{}
, /*decltype(_impl_.browser_)*/nullptr} {}
struct ClientMetadataDefaultTypeInternal {
PROTOBUF_CONSTEXPR ClientMetadataDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
~ClientMetadataDefaultTypeInternal() {}
union {
ClientMetadata _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ClientMetadataDefaultTypeInternal _ClientMetadata_default_instance_;
PROTOBUF_CONSTEXPR ClientDownloadRequest_Resource::ClientDownloadRequest_Resource(
::_pbi::ConstantInitialized): _impl_{
/*decltype(_impl_._has_bits_)*/{}
, /*decltype(_impl_._cached_size_)*/{}
, /*decltype(_impl_.url_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
, /*decltype(_impl_.type_)*/0} {}
struct ClientDownloadRequest_ResourceDefaultTypeInternal {
PROTOBUF_CONSTEXPR ClientDownloadRequest_ResourceDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
~ClientDownloadRequest_ResourceDefaultTypeInternal() {}
union {
ClientDownloadRequest_Resource _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ClientDownloadRequest_ResourceDefaultTypeInternal _ClientDownloadRequest_Resource_default_instance_;
PROTOBUF_CONSTEXPR ClientDownloadRequest::ClientDownloadRequest(
::_pbi::ConstantInitialized): _impl_{
/*decltype(_impl_.resources_)*/{}
, /*decltype(_impl_._cached_size_)*/{}} {}
struct ClientDownloadRequestDefaultTypeInternal {
PROTOBUF_CONSTEXPR ClientDownloadRequestDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
~ClientDownloadRequestDefaultTypeInternal() {}
union {
ClientDownloadRequest _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ClientDownloadRequestDefaultTypeInternal _ClientDownloadRequest_default_instance_;
PROTOBUF_CONSTEXPR ContentAnalysisRequest_PrintData::ContentAnalysisRequest_PrintData(
::_pbi::ConstantInitialized): _impl_{
/*decltype(_impl_._has_bits_)*/{}
, /*decltype(_impl_._cached_size_)*/{}
, /*decltype(_impl_.handle_)*/int64_t{0}
, /*decltype(_impl_.size_)*/int64_t{0}} {}
struct ContentAnalysisRequest_PrintDataDefaultTypeInternal {
PROTOBUF_CONSTEXPR ContentAnalysisRequest_PrintDataDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
~ContentAnalysisRequest_PrintDataDefaultTypeInternal() {}
union {
ContentAnalysisRequest_PrintData _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ContentAnalysisRequest_PrintDataDefaultTypeInternal _ContentAnalysisRequest_PrintData_default_instance_;
PROTOBUF_CONSTEXPR ContentAnalysisRequest::ContentAnalysisRequest(
::_pbi::ConstantInitialized): _impl_{
/*decltype(_impl_._has_bits_)*/{}
, /*decltype(_impl_._cached_size_)*/{}
, /*decltype(_impl_.tags_)*/{}
, /*decltype(_impl_.request_token_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
, /*decltype(_impl_.user_action_id_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
, /*decltype(_impl_.request_data_)*/nullptr
, /*decltype(_impl_.client_metadata_)*/nullptr
, /*decltype(_impl_.analysis_connector_)*/0
, /*decltype(_impl_.reason_)*/0
, /*decltype(_impl_.expires_at_)*/int64_t{0}
, /*decltype(_impl_.user_action_requests_count_)*/int64_t{0}
, /*decltype(_impl_.content_data_)*/{}
, /*decltype(_impl_._oneof_case_)*/{}} {}
struct ContentAnalysisRequestDefaultTypeInternal {
PROTOBUF_CONSTEXPR ContentAnalysisRequestDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
~ContentAnalysisRequestDefaultTypeInternal() {}
union {
ContentAnalysisRequest _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ContentAnalysisRequestDefaultTypeInternal _ContentAnalysisRequest_default_instance_;
PROTOBUF_CONSTEXPR ContentAnalysisResponse_Result_TriggeredRule::ContentAnalysisResponse_Result_TriggeredRule(
::_pbi::ConstantInitialized): _impl_{
/*decltype(_impl_._has_bits_)*/{}
, /*decltype(_impl_._cached_size_)*/{}
, /*decltype(_impl_.rule_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
, /*decltype(_impl_.rule_id_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
, /*decltype(_impl_.action_)*/0} {}
struct ContentAnalysisResponse_Result_TriggeredRuleDefaultTypeInternal {
PROTOBUF_CONSTEXPR ContentAnalysisResponse_Result_TriggeredRuleDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
~ContentAnalysisResponse_Result_TriggeredRuleDefaultTypeInternal() {}
union {
ContentAnalysisResponse_Result_TriggeredRule _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ContentAnalysisResponse_Result_TriggeredRuleDefaultTypeInternal _ContentAnalysisResponse_Result_TriggeredRule_default_instance_;
PROTOBUF_CONSTEXPR ContentAnalysisResponse_Result::ContentAnalysisResponse_Result(
::_pbi::ConstantInitialized): _impl_{
/*decltype(_impl_._has_bits_)*/{}
, /*decltype(_impl_._cached_size_)*/{}
, /*decltype(_impl_.triggered_rules_)*/{}
, /*decltype(_impl_.tag_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
, /*decltype(_impl_.status_)*/0} {}
struct ContentAnalysisResponse_ResultDefaultTypeInternal {
PROTOBUF_CONSTEXPR ContentAnalysisResponse_ResultDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
~ContentAnalysisResponse_ResultDefaultTypeInternal() {}
union {
ContentAnalysisResponse_Result _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ContentAnalysisResponse_ResultDefaultTypeInternal _ContentAnalysisResponse_Result_default_instance_;
PROTOBUF_CONSTEXPR ContentAnalysisResponse::ContentAnalysisResponse(
::_pbi::ConstantInitialized): _impl_{
/*decltype(_impl_._has_bits_)*/{}
, /*decltype(_impl_._cached_size_)*/{}
, /*decltype(_impl_.results_)*/{}
, /*decltype(_impl_.request_token_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}} {}
struct ContentAnalysisResponseDefaultTypeInternal {
PROTOBUF_CONSTEXPR ContentAnalysisResponseDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
~ContentAnalysisResponseDefaultTypeInternal() {}
union {
ContentAnalysisResponse _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ContentAnalysisResponseDefaultTypeInternal _ContentAnalysisResponse_default_instance_;
PROTOBUF_CONSTEXPR ContentAnalysisAcknowledgement::ContentAnalysisAcknowledgement(
::_pbi::ConstantInitialized): _impl_{
/*decltype(_impl_._has_bits_)*/{}
, /*decltype(_impl_._cached_size_)*/{}
, /*decltype(_impl_.request_token_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
, /*decltype(_impl_.final_action_)*/0
, /*decltype(_impl_.status_)*/1} {}
struct ContentAnalysisAcknowledgementDefaultTypeInternal {
PROTOBUF_CONSTEXPR ContentAnalysisAcknowledgementDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
~ContentAnalysisAcknowledgementDefaultTypeInternal() {}
union {
ContentAnalysisAcknowledgement _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ContentAnalysisAcknowledgementDefaultTypeInternal _ContentAnalysisAcknowledgement_default_instance_;
PROTOBUF_CONSTEXPR ContentAnalysisCancelRequests::ContentAnalysisCancelRequests(
::_pbi::ConstantInitialized): _impl_{
/*decltype(_impl_._has_bits_)*/{}
, /*decltype(_impl_._cached_size_)*/{}
, /*decltype(_impl_.user_action_id_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}} {}
struct ContentAnalysisCancelRequestsDefaultTypeInternal {
PROTOBUF_CONSTEXPR ContentAnalysisCancelRequestsDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
~ContentAnalysisCancelRequestsDefaultTypeInternal() {}
union {
ContentAnalysisCancelRequests _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ContentAnalysisCancelRequestsDefaultTypeInternal _ContentAnalysisCancelRequests_default_instance_;
PROTOBUF_CONSTEXPR ChromeToAgent::ChromeToAgent(
::_pbi::ConstantInitialized): _impl_{
/*decltype(_impl_._has_bits_)*/{}
, /*decltype(_impl_._cached_size_)*/{}
, /*decltype(_impl_.request_)*/nullptr
, /*decltype(_impl_.ack_)*/nullptr
, /*decltype(_impl_.cancel_)*/nullptr} {}
struct ChromeToAgentDefaultTypeInternal {
PROTOBUF_CONSTEXPR ChromeToAgentDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
~ChromeToAgentDefaultTypeInternal() {}
union {
ChromeToAgent _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ChromeToAgentDefaultTypeInternal _ChromeToAgent_default_instance_;
PROTOBUF_CONSTEXPR AgentToChrome::AgentToChrome(
::_pbi::ConstantInitialized): _impl_{
/*decltype(_impl_._has_bits_)*/{}
, /*decltype(_impl_._cached_size_)*/{}
, /*decltype(_impl_.response_)*/nullptr} {}
struct AgentToChromeDefaultTypeInternal {
PROTOBUF_CONSTEXPR AgentToChromeDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
~AgentToChromeDefaultTypeInternal() {}
union {
AgentToChrome _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 AgentToChromeDefaultTypeInternal _AgentToChrome_default_instance_;
} // namespace sdk
} // namespace content_analysis
namespace content_analysis {
namespace sdk {
bool ContentMetaData_PrintMetadata_PrinterType_IsValid(int value) {
switch (value) {
case 0:
case 1:
case 2:
return true;
default:
return false;
}
}
static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> ContentMetaData_PrintMetadata_PrinterType_strings[3] = {};
static const char ContentMetaData_PrintMetadata_PrinterType_names[] =
"CLOUD"
"LOCAL"
"UNKNOWN";
static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry ContentMetaData_PrintMetadata_PrinterType_entries[] = {
{ {ContentMetaData_PrintMetadata_PrinterType_names + 0, 5}, 1 },
{ {ContentMetaData_PrintMetadata_PrinterType_names + 5, 5}, 2 },
{ {ContentMetaData_PrintMetadata_PrinterType_names + 10, 7}, 0 },
};
static const int ContentMetaData_PrintMetadata_PrinterType_entries_by_number[] = {
2, // 0 -> UNKNOWN
0, // 1 -> CLOUD
1, // 2 -> LOCAL
};
const std::string& ContentMetaData_PrintMetadata_PrinterType_Name(
ContentMetaData_PrintMetadata_PrinterType value) {
static const bool dummy =
::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
ContentMetaData_PrintMetadata_PrinterType_entries,
ContentMetaData_PrintMetadata_PrinterType_entries_by_number,
3, ContentMetaData_PrintMetadata_PrinterType_strings);
(void) dummy;
int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
ContentMetaData_PrintMetadata_PrinterType_entries,
ContentMetaData_PrintMetadata_PrinterType_entries_by_number,
3, value);
return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() :
ContentMetaData_PrintMetadata_PrinterType_strings[idx].get();
}
bool ContentMetaData_PrintMetadata_PrinterType_Parse(
::PROTOBUF_NAMESPACE_ID::ConstStringParam name, ContentMetaData_PrintMetadata_PrinterType* value) {
int int_value;
bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
ContentMetaData_PrintMetadata_PrinterType_entries, 3, name, &int_value);
if (success) {
*value = static_cast<ContentMetaData_PrintMetadata_PrinterType>(int_value);
}
return success;
}
#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
constexpr ContentMetaData_PrintMetadata_PrinterType ContentMetaData_PrintMetadata::UNKNOWN;
constexpr ContentMetaData_PrintMetadata_PrinterType ContentMetaData_PrintMetadata::CLOUD;
constexpr ContentMetaData_PrintMetadata_PrinterType ContentMetaData_PrintMetadata::LOCAL;
constexpr ContentMetaData_PrintMetadata_PrinterType ContentMetaData_PrintMetadata::PrinterType_MIN;
constexpr ContentMetaData_PrintMetadata_PrinterType ContentMetaData_PrintMetadata::PrinterType_MAX;
constexpr int ContentMetaData_PrintMetadata::PrinterType_ARRAYSIZE;
#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
bool ClientDownloadRequest_ResourceType_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> ClientDownloadRequest_ResourceType_strings[6] = {};
static const char ClientDownloadRequest_ResourceType_names[] =
"DOWNLOAD_REDIRECT"
"DOWNLOAD_URL"
"PPAPI_DOCUMENT"
"PPAPI_PLUGIN"
"TAB_REDIRECT"
"TAB_URL";
static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry ClientDownloadRequest_ResourceType_entries[] = {
{ {ClientDownloadRequest_ResourceType_names + 0, 17}, 1 },
{ {ClientDownloadRequest_ResourceType_names + 17, 12}, 0 },
{ {ClientDownloadRequest_ResourceType_names + 29, 14}, 4 },
{ {ClientDownloadRequest_ResourceType_names + 43, 12}, 5 },
{ {ClientDownloadRequest_ResourceType_names + 55, 12}, 3 },
{ {ClientDownloadRequest_ResourceType_names + 67, 7}, 2 },
};
static const int ClientDownloadRequest_ResourceType_entries_by_number[] = {
1, // 0 -> DOWNLOAD_URL
0, // 1 -> DOWNLOAD_REDIRECT
5, // 2 -> TAB_URL
4, // 3 -> TAB_REDIRECT
2, // 4 -> PPAPI_DOCUMENT
3, // 5 -> PPAPI_PLUGIN
};
const std::string& ClientDownloadRequest_ResourceType_Name(
ClientDownloadRequest_ResourceType value) {
static const bool dummy =
::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
ClientDownloadRequest_ResourceType_entries,
ClientDownloadRequest_ResourceType_entries_by_number,
6, ClientDownloadRequest_ResourceType_strings);
(void) dummy;
int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
ClientDownloadRequest_ResourceType_entries,
ClientDownloadRequest_ResourceType_entries_by_number,
6, value);
return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() :
ClientDownloadRequest_ResourceType_strings[idx].get();
}
bool ClientDownloadRequest_ResourceType_Parse(
::PROTOBUF_NAMESPACE_ID::ConstStringParam name, ClientDownloadRequest_ResourceType* value) {
int int_value;
bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
ClientDownloadRequest_ResourceType_entries, 6, name, &int_value);
if (success) {
*value = static_cast<ClientDownloadRequest_ResourceType>(int_value);
}
return success;
}
#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
constexpr ClientDownloadRequest_ResourceType ClientDownloadRequest::DOWNLOAD_URL;
constexpr ClientDownloadRequest_ResourceType ClientDownloadRequest::DOWNLOAD_REDIRECT;
constexpr ClientDownloadRequest_ResourceType ClientDownloadRequest::TAB_URL;
constexpr ClientDownloadRequest_ResourceType ClientDownloadRequest::TAB_REDIRECT;
constexpr ClientDownloadRequest_ResourceType ClientDownloadRequest::PPAPI_DOCUMENT;
constexpr ClientDownloadRequest_ResourceType ClientDownloadRequest::PPAPI_PLUGIN;
constexpr ClientDownloadRequest_ResourceType ClientDownloadRequest::ResourceType_MIN;
constexpr ClientDownloadRequest_ResourceType ClientDownloadRequest::ResourceType_MAX;
constexpr int ClientDownloadRequest::ResourceType_ARRAYSIZE;
#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
bool ContentAnalysisRequest_Reason_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<std::string> ContentAnalysisRequest_Reason_strings[8] = {};
static const char ContentAnalysisRequest_Reason_names[] =
"CLIPBOARD_PASTE"
"DRAG_AND_DROP"
"FILE_PICKER_DIALOG"
"NORMAL_DOWNLOAD"
"PRINT_PREVIEW_PRINT"
"SAVE_AS_DOWNLOAD"
"SYSTEM_DIALOG_PRINT"
"UNKNOWN";
static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry ContentAnalysisRequest_Reason_entries[] = {
{ {ContentAnalysisRequest_Reason_names + 0, 15}, 1 },
{ {ContentAnalysisRequest_Reason_names + 15, 13}, 2 },
{ {ContentAnalysisRequest_Reason_names + 28, 18}, 3 },
{ {ContentAnalysisRequest_Reason_names + 46, 15}, 6 },
{ {ContentAnalysisRequest_Reason_names + 61, 19}, 4 },
{ {ContentAnalysisRequest_Reason_names + 80, 16}, 7 },
{ {ContentAnalysisRequest_Reason_names + 96, 19}, 5 },
{ {ContentAnalysisRequest_Reason_names + 115, 7}, 0 },
};
static const int ContentAnalysisRequest_Reason_entries_by_number[] = {
7, // 0 -> UNKNOWN
0, // 1 -> CLIPBOARD_PASTE
1, // 2 -> DRAG_AND_DROP
2, // 3 -> FILE_PICKER_DIALOG
4, // 4 -> PRINT_PREVIEW_PRINT
6, // 5 -> SYSTEM_DIALOG_PRINT
3, // 6 -> NORMAL_DOWNLOAD
5, // 7 -> SAVE_AS_DOWNLOAD
};
const std::string& ContentAnalysisRequest_Reason_Name(
ContentAnalysisRequest_Reason value) {
static const bool dummy =
::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
ContentAnalysisRequest_Reason_entries,
ContentAnalysisRequest_Reason_entries_by_number,
8, ContentAnalysisRequest_Reason_strings);
(void) dummy;
int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
ContentAnalysisRequest_Reason_entries,
ContentAnalysisRequest_Reason_entries_by_number,
8, value);
return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() :
ContentAnalysisRequest_Reason_strings[idx].get();
}
bool ContentAnalysisRequest_Reason_Parse(
::PROTOBUF_NAMESPACE_ID::ConstStringParam name, ContentAnalysisRequest_Reason* value) {
int int_value;
bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
ContentAnalysisRequest_Reason_entries, 8, name, &int_value);
if (success) {
*value = static_cast<ContentAnalysisRequest_Reason>(int_value);
}
return success;
}
#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
constexpr ContentAnalysisRequest_Reason ContentAnalysisRequest::UNKNOWN;
constexpr ContentAnalysisRequest_Reason ContentAnalysisRequest::CLIPBOARD_PASTE;
constexpr ContentAnalysisRequest_Reason ContentAnalysisRequest::DRAG_AND_DROP;
constexpr ContentAnalysisRequest_Reason ContentAnalysisRequest::FILE_PICKER_DIALOG;
constexpr ContentAnalysisRequest_Reason ContentAnalysisRequest::PRINT_PREVIEW_PRINT;
constexpr ContentAnalysisRequest_Reason ContentAnalysisRequest::SYSTEM_DIALOG_PRINT;
constexpr ContentAnalysisRequest_Reason ContentAnalysisRequest::NORMAL_DOWNLOAD;
constexpr ContentAnalysisRequest_Reason ContentAnalysisRequest::SAVE_AS_DOWNLOAD;
constexpr ContentAnalysisRequest_Reason ContentAnalysisRequest::Reason_MIN;
constexpr ContentAnalysisRequest_Reason ContentAnalysisRequest::Reason_MAX;
constexpr int ContentAnalysisRequest::Reason_ARRAYSIZE;
#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
bool ContentAnalysisResponse_Result_TriggeredRule_Action_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> ContentAnalysisResponse_Result_TriggeredRule_Action_strings[4] = {};
static const char ContentAnalysisResponse_Result_TriggeredRule_Action_names[] =
"ACTION_UNSPECIFIED"
"BLOCK"
"REPORT_ONLY"
"WARN";
static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry ContentAnalysisResponse_Result_TriggeredRule_Action_entries[] = {
{ {ContentAnalysisResponse_Result_TriggeredRule_Action_names + 0, 18}, 0 },
{ {ContentAnalysisResponse_Result_TriggeredRule_Action_names + 18, 5}, 3 },
{ {ContentAnalysisResponse_Result_TriggeredRule_Action_names + 23, 11}, 1 },
{ {ContentAnalysisResponse_Result_TriggeredRule_Action_names + 34, 4}, 2 },
};
static const int ContentAnalysisResponse_Result_TriggeredRule_Action_entries_by_number[] = {
0, // 0 -> ACTION_UNSPECIFIED
2, // 1 -> REPORT_ONLY
3, // 2 -> WARN
1, // 3 -> BLOCK
};
const std::string& ContentAnalysisResponse_Result_TriggeredRule_Action_Name(
ContentAnalysisResponse_Result_TriggeredRule_Action value) {
static const bool dummy =
::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
ContentAnalysisResponse_Result_TriggeredRule_Action_entries,
ContentAnalysisResponse_Result_TriggeredRule_Action_entries_by_number,
4, ContentAnalysisResponse_Result_TriggeredRule_Action_strings);
(void) dummy;
int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
ContentAnalysisResponse_Result_TriggeredRule_Action_entries,
ContentAnalysisResponse_Result_TriggeredRule_Action_entries_by_number,
4, value);
return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() :
ContentAnalysisResponse_Result_TriggeredRule_Action_strings[idx].get();
}
bool ContentAnalysisResponse_Result_TriggeredRule_Action_Parse(
::PROTOBUF_NAMESPACE_ID::ConstStringParam name, ContentAnalysisResponse_Result_TriggeredRule_Action* value) {
int int_value;
bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
ContentAnalysisResponse_Result_TriggeredRule_Action_entries, 4, name, &int_value);
if (success) {
*value = static_cast<ContentAnalysisResponse_Result_TriggeredRule_Action>(int_value);
}
return success;
}
#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
constexpr ContentAnalysisResponse_Result_TriggeredRule_Action ContentAnalysisResponse_Result_TriggeredRule::ACTION_UNSPECIFIED;
constexpr ContentAnalysisResponse_Result_TriggeredRule_Action ContentAnalysisResponse_Result_TriggeredRule::REPORT_ONLY;
constexpr ContentAnalysisResponse_Result_TriggeredRule_Action ContentAnalysisResponse_Result_TriggeredRule::WARN;
constexpr ContentAnalysisResponse_Result_TriggeredRule_Action ContentAnalysisResponse_Result_TriggeredRule::BLOCK;
constexpr ContentAnalysisResponse_Result_TriggeredRule_Action ContentAnalysisResponse_Result_TriggeredRule::Action_MIN;
constexpr ContentAnalysisResponse_Result_TriggeredRule_Action ContentAnalysisResponse_Result_TriggeredRule::Action_MAX;
constexpr int ContentAnalysisResponse_Result_TriggeredRule::Action_ARRAYSIZE;
#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
bool ContentAnalysisResponse_Result_Status_IsValid(int value) {
switch (value) {
case 0:
case 1:
case 2:
return true;
default:
return false;
}
}
static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> ContentAnalysisResponse_Result_Status_strings[3] = {};
static const char ContentAnalysisResponse_Result_Status_names[] =
"FAILURE"
"STATUS_UNKNOWN"
"SUCCESS";
static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry ContentAnalysisResponse_Result_Status_entries[] = {
{ {ContentAnalysisResponse_Result_Status_names + 0, 7}, 2 },
{ {ContentAnalysisResponse_Result_Status_names + 7, 14}, 0 },
{ {ContentAnalysisResponse_Result_Status_names + 21, 7}, 1 },
};
static const int ContentAnalysisResponse_Result_Status_entries_by_number[] = {
1, // 0 -> STATUS_UNKNOWN
2, // 1 -> SUCCESS
0, // 2 -> FAILURE
};
const std::string& ContentAnalysisResponse_Result_Status_Name(
ContentAnalysisResponse_Result_Status value) {
static const bool dummy =
::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
ContentAnalysisResponse_Result_Status_entries,
ContentAnalysisResponse_Result_Status_entries_by_number,
3, ContentAnalysisResponse_Result_Status_strings);
(void) dummy;
int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
ContentAnalysisResponse_Result_Status_entries,
ContentAnalysisResponse_Result_Status_entries_by_number,
3, value);
return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() :
ContentAnalysisResponse_Result_Status_strings[idx].get();
}
bool ContentAnalysisResponse_Result_Status_Parse(
::PROTOBUF_NAMESPACE_ID::ConstStringParam name, ContentAnalysisResponse_Result_Status* value) {
int int_value;
bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
ContentAnalysisResponse_Result_Status_entries, 3, name, &int_value);
if (success) {
*value = static_cast<ContentAnalysisResponse_Result_Status>(int_value);
}
return success;
}
#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
constexpr ContentAnalysisResponse_Result_Status ContentAnalysisResponse_Result::STATUS_UNKNOWN;
constexpr ContentAnalysisResponse_Result_Status ContentAnalysisResponse_Result::SUCCESS;
constexpr ContentAnalysisResponse_Result_Status ContentAnalysisResponse_Result::FAILURE;
constexpr ContentAnalysisResponse_Result_Status ContentAnalysisResponse_Result::Status_MIN;
constexpr ContentAnalysisResponse_Result_Status ContentAnalysisResponse_Result::Status_MAX;
constexpr int ContentAnalysisResponse_Result::Status_ARRAYSIZE;
#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
bool ContentAnalysisAcknowledgement_Status_IsValid(int value) {
switch (value) {
case 1:
case 2:
case 3:
return true;
default:
return false;
}
}
static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> ContentAnalysisAcknowledgement_Status_strings[3] = {};
static const char ContentAnalysisAcknowledgement_Status_names[] =
"INVALID_RESPONSE"
"SUCCESS"
"TOO_LATE";
static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry ContentAnalysisAcknowledgement_Status_entries[] = {
{ {ContentAnalysisAcknowledgement_Status_names + 0, 16}, 2 },
{ {ContentAnalysisAcknowledgement_Status_names + 16, 7}, 1 },
{ {ContentAnalysisAcknowledgement_Status_names + 23, 8}, 3 },
};
static const int ContentAnalysisAcknowledgement_Status_entries_by_number[] = {
1, // 1 -> SUCCESS
0, // 2 -> INVALID_RESPONSE
2, // 3 -> TOO_LATE
};
const std::string& ContentAnalysisAcknowledgement_Status_Name(
ContentAnalysisAcknowledgement_Status value) {
static const bool dummy =
::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
ContentAnalysisAcknowledgement_Status_entries,
ContentAnalysisAcknowledgement_Status_entries_by_number,
3, ContentAnalysisAcknowledgement_Status_strings);
(void) dummy;
int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
ContentAnalysisAcknowledgement_Status_entries,
ContentAnalysisAcknowledgement_Status_entries_by_number,
3, value);
return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() :
ContentAnalysisAcknowledgement_Status_strings[idx].get();
}
bool ContentAnalysisAcknowledgement_Status_Parse(
::PROTOBUF_NAMESPACE_ID::ConstStringParam name, ContentAnalysisAcknowledgement_Status* value) {
int int_value;
bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
ContentAnalysisAcknowledgement_Status_entries, 3, name, &int_value);
if (success) {
*value = static_cast<ContentAnalysisAcknowledgement_Status>(int_value);
}
return success;
}
#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
constexpr ContentAnalysisAcknowledgement_Status ContentAnalysisAcknowledgement::SUCCESS;
constexpr ContentAnalysisAcknowledgement_Status ContentAnalysisAcknowledgement::INVALID_RESPONSE;
constexpr ContentAnalysisAcknowledgement_Status ContentAnalysisAcknowledgement::TOO_LATE;
constexpr ContentAnalysisAcknowledgement_Status ContentAnalysisAcknowledgement::Status_MIN;
constexpr ContentAnalysisAcknowledgement_Status ContentAnalysisAcknowledgement::Status_MAX;
constexpr int ContentAnalysisAcknowledgement::Status_ARRAYSIZE;
#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
bool ContentAnalysisAcknowledgement_FinalAction_IsValid(int value) {
switch (value) {
case 0:
case 1:
case 2:
case 3:
case 4:
return true;
default:
return false;
}
}
static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> ContentAnalysisAcknowledgement_FinalAction_strings[5] = {};
static const char ContentAnalysisAcknowledgement_FinalAction_names[] =
"ACTION_UNSPECIFIED"
"ALLOW"
"BLOCK"
"REPORT_ONLY"
"WARN";
static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry ContentAnalysisAcknowledgement_FinalAction_entries[] = {
{ {ContentAnalysisAcknowledgement_FinalAction_names + 0, 18}, 0 },
{ {ContentAnalysisAcknowledgement_FinalAction_names + 18, 5}, 1 },
{ {ContentAnalysisAcknowledgement_FinalAction_names + 23, 5}, 4 },
{ {ContentAnalysisAcknowledgement_FinalAction_names + 28, 11}, 2 },
{ {ContentAnalysisAcknowledgement_FinalAction_names + 39, 4}, 3 },
};
static const int ContentAnalysisAcknowledgement_FinalAction_entries_by_number[] = {
0, // 0 -> ACTION_UNSPECIFIED
1, // 1 -> ALLOW
3, // 2 -> REPORT_ONLY
4, // 3 -> WARN
2, // 4 -> BLOCK
};
const std::string& ContentAnalysisAcknowledgement_FinalAction_Name(
ContentAnalysisAcknowledgement_FinalAction value) {
static const bool dummy =
::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
ContentAnalysisAcknowledgement_FinalAction_entries,
ContentAnalysisAcknowledgement_FinalAction_entries_by_number,
5, ContentAnalysisAcknowledgement_FinalAction_strings);
(void) dummy;
int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
ContentAnalysisAcknowledgement_FinalAction_entries,
ContentAnalysisAcknowledgement_FinalAction_entries_by_number,
5, value);
return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() :
ContentAnalysisAcknowledgement_FinalAction_strings[idx].get();
}
bool ContentAnalysisAcknowledgement_FinalAction_Parse(
::PROTOBUF_NAMESPACE_ID::ConstStringParam name, ContentAnalysisAcknowledgement_FinalAction* value) {
int int_value;
bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
ContentAnalysisAcknowledgement_FinalAction_entries, 5, name, &int_value);
if (success) {
*value = static_cast<ContentAnalysisAcknowledgement_FinalAction>(int_value);
}
return success;
}
#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
constexpr ContentAnalysisAcknowledgement_FinalAction ContentAnalysisAcknowledgement::ACTION_UNSPECIFIED;
constexpr ContentAnalysisAcknowledgement_FinalAction ContentAnalysisAcknowledgement::ALLOW;
constexpr ContentAnalysisAcknowledgement_FinalAction ContentAnalysisAcknowledgement::REPORT_ONLY;
constexpr ContentAnalysisAcknowledgement_FinalAction ContentAnalysisAcknowledgement::WARN;
constexpr ContentAnalysisAcknowledgement_FinalAction ContentAnalysisAcknowledgement::BLOCK;
constexpr ContentAnalysisAcknowledgement_FinalAction ContentAnalysisAcknowledgement::FinalAction_MIN;
constexpr ContentAnalysisAcknowledgement_FinalAction ContentAnalysisAcknowledgement::FinalAction_MAX;
constexpr int ContentAnalysisAcknowledgement::FinalAction_ARRAYSIZE;
#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
bool AnalysisConnector_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> AnalysisConnector_strings[6] = {};
static const char AnalysisConnector_names[] =
"ANALYSIS_CONNECTOR_UNSPECIFIED"
"BULK_DATA_ENTRY"
"FILE_ATTACHED"
"FILE_DOWNLOADED"
"FILE_TRANSFER"
"PRINT";
static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry AnalysisConnector_entries[] = {
{ {AnalysisConnector_names + 0, 30}, 0 },
{ {AnalysisConnector_names + 30, 15}, 3 },
{ {AnalysisConnector_names + 45, 13}, 2 },
{ {AnalysisConnector_names + 58, 15}, 1 },
{ {AnalysisConnector_names + 73, 13}, 5 },
{ {AnalysisConnector_names + 86, 5}, 4 },
};
static const int AnalysisConnector_entries_by_number[] = {
0, // 0 -> ANALYSIS_CONNECTOR_UNSPECIFIED
3, // 1 -> FILE_DOWNLOADED
2, // 2 -> FILE_ATTACHED
1, // 3 -> BULK_DATA_ENTRY
5, // 4 -> PRINT
4, // 5 -> FILE_TRANSFER
};
const std::string& AnalysisConnector_Name(
AnalysisConnector value) {
static const bool dummy =
::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
AnalysisConnector_entries,
AnalysisConnector_entries_by_number,
6, AnalysisConnector_strings);
(void) dummy;
int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
AnalysisConnector_entries,
AnalysisConnector_entries_by_number,
6, value);
return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() :
AnalysisConnector_strings[idx].get();
}
bool AnalysisConnector_Parse(
::PROTOBUF_NAMESPACE_ID::ConstStringParam name, AnalysisConnector* value) {
int int_value;
bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
AnalysisConnector_entries, 6, name, &int_value);
if (success) {
*value = static_cast<AnalysisConnector>(int_value);
}
return success;
}
// ===================================================================
class ContentMetaData_PrintMetadata::_Internal {
public:
using HasBits = decltype(std::declval<ContentMetaData_PrintMetadata>()._impl_._has_bits_);
static void set_has_printer_name(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
static void set_has_printer_type(HasBits* has_bits) {
(*has_bits)[0] |= 2u;
}
};
ContentMetaData_PrintMetadata::ContentMetaData_PrintMetadata(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
SharedCtor(arena, is_message_owned);
// @@protoc_insertion_point(arena_constructor:content_analysis.sdk.ContentMetaData.PrintMetadata)
}
ContentMetaData_PrintMetadata::ContentMetaData_PrintMetadata(const ContentMetaData_PrintMetadata& from)
: ::PROTOBUF_NAMESPACE_ID::MessageLite() {
ContentMetaData_PrintMetadata* const _this = this; (void)_this;
new (&_impl_) Impl_{
decltype(_impl_._has_bits_){from._impl_._has_bits_}
, /*decltype(_impl_._cached_size_)*/{}
, decltype(_impl_.printer_name_){}
, decltype(_impl_.printer_type_){}};
_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
_impl_.printer_name_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
_impl_.printer_name_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_printer_name()) {
_this->_impl_.printer_name_.Set(from._internal_printer_name(),
_this->GetArenaForAllocation());
}
_this->_impl_.printer_type_ = from._impl_.printer_type_;
// @@protoc_insertion_point(copy_constructor:content_analysis.sdk.ContentMetaData.PrintMetadata)
}
inline void ContentMetaData_PrintMetadata::SharedCtor(
::_pb::Arena* arena, bool is_message_owned) {
(void)arena;
(void)is_message_owned;
new (&_impl_) Impl_{
decltype(_impl_._has_bits_){}
, /*decltype(_impl_._cached_size_)*/{}
, decltype(_impl_.printer_name_){}
, decltype(_impl_.printer_type_){0}
};
_impl_.printer_name_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
_impl_.printer_name_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
ContentMetaData_PrintMetadata::~ContentMetaData_PrintMetadata() {
// @@protoc_insertion_point(destructor:content_analysis.sdk.ContentMetaData.PrintMetadata)
if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
(void)arena;
return;
}
SharedDtor();
}
inline void ContentMetaData_PrintMetadata::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
_impl_.printer_name_.Destroy();
}
void ContentMetaData_PrintMetadata::SetCachedSize(int size) const {
_impl_._cached_size_.Set(size);
}
void ContentMetaData_PrintMetadata::Clear() {
// @@protoc_insertion_point(message_clear_start:content_analysis.sdk.ContentMetaData.PrintMetadata)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x00000001u) {
_impl_.printer_name_.ClearNonDefaultToEmpty();
}
_impl_.printer_type_ = 0;
_impl_._has_bits_.Clear();
_internal_metadata_.Clear<std::string>();
}
const char* ContentMetaData_PrintMetadata::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::_pbi::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional string printer_name = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
auto str = _internal_mutable_printer_name();
ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .content_analysis.sdk.ContentMetaData.PrintMetadata.PrinterType printer_type = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
if (PROTOBUF_PREDICT_TRUE(::content_analysis::sdk::ContentMetaData_PrintMetadata_PrinterType_IsValid(val))) {
_internal_set_printer_type(static_cast<::content_analysis::sdk::ContentMetaData_PrintMetadata_PrinterType>(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<std::string>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
_impl_._has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* ContentMetaData_PrintMetadata::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:content_analysis.sdk.ContentMetaData.PrintMetadata)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _impl_._has_bits_[0];
// optional string printer_name = 1;
if (cached_has_bits & 0x00000001u) {
target = stream->WriteStringMaybeAliased(
1, this->_internal_printer_name(), target);
}
// optional .content_analysis.sdk.ContentMetaData.PrintMetadata.PrinterType printer_type = 2;
if (cached_has_bits & 0x00000002u) {
target = stream->EnsureSpace(target);
target = ::_pbi::WireFormatLite::WriteEnumToArray(
2, this->_internal_printer_type(), target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
}
// @@protoc_insertion_point(serialize_to_array_end:content_analysis.sdk.ContentMetaData.PrintMetadata)
return target;
}
size_t ContentMetaData_PrintMetadata::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:content_analysis.sdk.ContentMetaData.PrintMetadata)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x00000003u) {
// optional string printer_name = 1;
if (cached_has_bits & 0x00000001u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_printer_name());
}
// optional .content_analysis.sdk.ContentMetaData.PrintMetadata.PrinterType printer_type = 2;
if (cached_has_bits & 0x00000002u) {
total_size += 1 +
::_pbi::WireFormatLite::EnumSize(this->_internal_printer_type());
}
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
}
int cached_size = ::_pbi::ToCachedSize(total_size);
SetCachedSize(cached_size);
return total_size;
}
void ContentMetaData_PrintMetadata::CheckTypeAndMergeFrom(
const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
MergeFrom(*::_pbi::DownCast<const ContentMetaData_PrintMetadata*>(
&from));
}
void ContentMetaData_PrintMetadata::MergeFrom(const ContentMetaData_PrintMetadata& from) {
ContentMetaData_PrintMetadata* const _this = this;
// @@protoc_insertion_point(class_specific_merge_from_start:content_analysis.sdk.ContentMetaData.PrintMetadata)
GOOGLE_DCHECK_NE(&from, _this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = from._impl_._has_bits_[0];
if (cached_has_bits & 0x00000003u) {
if (cached_has_bits & 0x00000001u) {
_this->_internal_set_printer_name(from._internal_printer_name());
}
if (cached_has_bits & 0x00000002u) {
_this->_impl_.printer_type_ = from._impl_.printer_type_;
}
_this->_impl_._has_bits_[0] |= cached_has_bits;
}
_this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}
void ContentMetaData_PrintMetadata::CopyFrom(const ContentMetaData_PrintMetadata& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:content_analysis.sdk.ContentMetaData.PrintMetadata)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool ContentMetaData_PrintMetadata::IsInitialized() const {
return true;
}
void ContentMetaData_PrintMetadata::InternalSwap(ContentMetaData_PrintMetadata* other) {
using std::swap;
auto* lhs_arena = GetArenaForAllocation();
auto* rhs_arena = other->GetArenaForAllocation();
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&_impl_.printer_name_, lhs_arena,
&other->_impl_.printer_name_, rhs_arena
);
swap(_impl_.printer_type_, other->_impl_.printer_type_);
}
std::string ContentMetaData_PrintMetadata::GetTypeName() const {
return "content_analysis.sdk.ContentMetaData.PrintMetadata";
}
// ===================================================================
class ContentMetaData::_Internal {
public:
using HasBits = decltype(std::declval<ContentMetaData>()._impl_._has_bits_);
static void set_has_url(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
static void set_has_filename(HasBits* has_bits) {
(*has_bits)[0] |= 2u;
}
static void set_has_digest(HasBits* has_bits) {
(*has_bits)[0] |= 4u;
}
static const ::content_analysis::sdk::ClientDownloadRequest& csd(const ContentMetaData* msg);
static void set_has_csd(HasBits* has_bits) {
(*has_bits)[0] |= 32u;
}
static void set_has_email(HasBits* has_bits) {
(*has_bits)[0] |= 8u;
}
static void set_has_tab_title(HasBits* has_bits) {
(*has_bits)[0] |= 16u;
}
static const ::content_analysis::sdk::ContentMetaData_PrintMetadata& print_metadata(const ContentMetaData* msg);
static void set_has_print_metadata(HasBits* has_bits) {
(*has_bits)[0] |= 64u;
}
};
const ::content_analysis::sdk::ClientDownloadRequest&
ContentMetaData::_Internal::csd(const ContentMetaData* msg) {
return *msg->_impl_.csd_;
}
const ::content_analysis::sdk::ContentMetaData_PrintMetadata&
ContentMetaData::_Internal::print_metadata(const ContentMetaData* msg) {
return *msg->_impl_.print_metadata_;
}
ContentMetaData::ContentMetaData(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
SharedCtor(arena, is_message_owned);
// @@protoc_insertion_point(arena_constructor:content_analysis.sdk.ContentMetaData)
}
ContentMetaData::ContentMetaData(const ContentMetaData& from)
: ::PROTOBUF_NAMESPACE_ID::MessageLite() {
ContentMetaData* const _this = this; (void)_this;
new (&_impl_) Impl_{
decltype(_impl_._has_bits_){from._impl_._has_bits_}
, /*decltype(_impl_._cached_size_)*/{}
, decltype(_impl_.url_){}
, decltype(_impl_.filename_){}
, decltype(_impl_.digest_){}
, decltype(_impl_.email_){}
, decltype(_impl_.tab_title_){}
, decltype(_impl_.csd_){nullptr}
, decltype(_impl_.print_metadata_){nullptr}};
_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
_impl_.url_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
_impl_.url_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_url()) {
_this->_impl_.url_.Set(from._internal_url(),
_this->GetArenaForAllocation());
}
_impl_.filename_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
_impl_.filename_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_filename()) {
_this->_impl_.filename_.Set(from._internal_filename(),
_this->GetArenaForAllocation());
}
_impl_.digest_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
_impl_.digest_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_digest()) {
_this->_impl_.digest_.Set(from._internal_digest(),
_this->GetArenaForAllocation());
}
_impl_.email_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
_impl_.email_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_email()) {
_this->_impl_.email_.Set(from._internal_email(),
_this->GetArenaForAllocation());
}
_impl_.tab_title_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
_impl_.tab_title_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_tab_title()) {
_this->_impl_.tab_title_.Set(from._internal_tab_title(),
_this->GetArenaForAllocation());
}
if (from._internal_has_csd()) {
_this->_impl_.csd_ = new ::content_analysis::sdk::ClientDownloadRequest(*from._impl_.csd_);
}
if (from._internal_has_print_metadata()) {
_this->_impl_.print_metadata_ = new ::content_analysis::sdk::ContentMetaData_PrintMetadata(*from._impl_.print_metadata_);
}
// @@protoc_insertion_point(copy_constructor:content_analysis.sdk.ContentMetaData)
}
inline void ContentMetaData::SharedCtor(
::_pb::Arena* arena, bool is_message_owned) {
(void)arena;
(void)is_message_owned;
new (&_impl_) Impl_{
decltype(_impl_._has_bits_){}
, /*decltype(_impl_._cached_size_)*/{}
, decltype(_impl_.url_){}
, decltype(_impl_.filename_){}
, decltype(_impl_.digest_){}
, decltype(_impl_.email_){}
, decltype(_impl_.tab_title_){}
, decltype(_impl_.csd_){nullptr}
, decltype(_impl_.print_metadata_){nullptr}
};
_impl_.url_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
_impl_.url_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
_impl_.filename_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
_impl_.filename_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
_impl_.digest_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
_impl_.digest_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
_impl_.email_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
_impl_.email_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
_impl_.tab_title_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
_impl_.tab_title_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
ContentMetaData::~ContentMetaData() {
// @@protoc_insertion_point(destructor:content_analysis.sdk.ContentMetaData)
if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
(void)arena;
return;
}
SharedDtor();
}
inline void ContentMetaData::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
_impl_.url_.Destroy();
_impl_.filename_.Destroy();
_impl_.digest_.Destroy();
_impl_.email_.Destroy();
_impl_.tab_title_.Destroy();
if (this != internal_default_instance()) delete _impl_.csd_;
if (this != internal_default_instance()) delete _impl_.print_metadata_;
}
void ContentMetaData::SetCachedSize(int size) const {
_impl_._cached_size_.Set(size);
}
void ContentMetaData::Clear() {
// @@protoc_insertion_point(message_clear_start:content_analysis.sdk.ContentMetaData)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x0000007fu) {
if (cached_has_bits & 0x00000001u) {
_impl_.url_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000002u) {
_impl_.filename_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000004u) {
_impl_.digest_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000008u) {
_impl_.email_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000010u) {
_impl_.tab_title_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000020u) {
GOOGLE_DCHECK(_impl_.csd_ != nullptr);
_impl_.csd_->Clear();
}
if (cached_has_bits & 0x00000040u) {
GOOGLE_DCHECK(_impl_.print_metadata_ != nullptr);
_impl_.print_metadata_->Clear();
}
}
_impl_._has_bits_.Clear();
_internal_metadata_.Clear<std::string>();
}
const char* ContentMetaData::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::_pbi::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional string url = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
auto str = _internal_mutable_url();
ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional string filename = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
auto str = _internal_mutable_filename();
ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional string digest = 3;
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
auto str = _internal_mutable_digest();
ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .content_analysis.sdk.ClientDownloadRequest csd = 4;
case 4:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
ptr = ctx->ParseMessage(_internal_mutable_csd(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional string email = 5;
case 5:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 42)) {
auto str = _internal_mutable_email();
ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional string tab_title = 9;
case 9:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 74)) {
auto str = _internal_mutable_tab_title();
ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .content_analysis.sdk.ContentMetaData.PrintMetadata print_metadata = 11;
case 11:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 90)) {
ptr = ctx->ParseMessage(_internal_mutable_print_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<std::string>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
_impl_._has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* ContentMetaData::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:content_analysis.sdk.ContentMetaData)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _impl_._has_bits_[0];
// optional string url = 1;
if (cached_has_bits & 0x00000001u) {
target = stream->WriteStringMaybeAliased(
1, this->_internal_url(), target);
}
// optional string filename = 2;
if (cached_has_bits & 0x00000002u) {
target = stream->WriteStringMaybeAliased(
2, this->_internal_filename(), target);
}
// optional string digest = 3;
if (cached_has_bits & 0x00000004u) {
target = stream->WriteStringMaybeAliased(
3, this->_internal_digest(), target);
}
// optional .content_analysis.sdk.ClientDownloadRequest csd = 4;
if (cached_has_bits & 0x00000020u) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(4, _Internal::csd(this),
_Internal::csd(this).GetCachedSize(), target, stream);
}
// optional string email = 5;
if (cached_has_bits & 0x00000008u) {
target = stream->WriteStringMaybeAliased(
5, this->_internal_email(), target);
}
// optional string tab_title = 9;
if (cached_has_bits & 0x00000010u) {
target = stream->WriteStringMaybeAliased(
9, this->_internal_tab_title(), target);
}
// optional .content_analysis.sdk.ContentMetaData.PrintMetadata print_metadata = 11;
if (cached_has_bits & 0x00000040u) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(11, _Internal::print_metadata(this),
_Internal::print_metadata(this).GetCachedSize(), target, stream);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
}
// @@protoc_insertion_point(serialize_to_array_end:content_analysis.sdk.ContentMetaData)
return target;
}
size_t ContentMetaData::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:content_analysis.sdk.ContentMetaData)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x0000007fu) {
// optional string url = 1;
if (cached_has_bits & 0x00000001u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_url());
}
// optional string filename = 2;
if (cached_has_bits & 0x00000002u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_filename());
}
// optional string digest = 3;
if (cached_has_bits & 0x00000004u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_digest());
}
// optional string email = 5;
if (cached_has_bits & 0x00000008u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_email());
}
// optional string tab_title = 9;
if (cached_has_bits & 0x00000010u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_tab_title());
}
// optional .content_analysis.sdk.ClientDownloadRequest csd = 4;
if (cached_has_bits & 0x00000020u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*_impl_.csd_);
}
// optional .content_analysis.sdk.ContentMetaData.PrintMetadata print_metadata = 11;
if (cached_has_bits & 0x00000040u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*_impl_.print_metadata_);
}
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
}
int cached_size = ::_pbi::ToCachedSize(total_size);
SetCachedSize(cached_size);
return total_size;
}
void ContentMetaData::CheckTypeAndMergeFrom(
const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
MergeFrom(*::_pbi::DownCast<const ContentMetaData*>(
&from));
}
void ContentMetaData::MergeFrom(const ContentMetaData& from) {
ContentMetaData* const _this = this;
// @@protoc_insertion_point(class_specific_merge_from_start:content_analysis.sdk.ContentMetaData)
GOOGLE_DCHECK_NE(&from, _this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = from._impl_._has_bits_[0];
if (cached_has_bits & 0x0000007fu) {
if (cached_has_bits & 0x00000001u) {
_this->_internal_set_url(from._internal_url());
}
if (cached_has_bits & 0x00000002u) {
_this->_internal_set_filename(from._internal_filename());
}
if (cached_has_bits & 0x00000004u) {
_this->_internal_set_digest(from._internal_digest());
}
if (cached_has_bits & 0x00000008u) {
_this->_internal_set_email(from._internal_email());
}
if (cached_has_bits & 0x00000010u) {
_this->_internal_set_tab_title(from._internal_tab_title());
}
if (cached_has_bits & 0x00000020u) {
_this->_internal_mutable_csd()->::content_analysis::sdk::ClientDownloadRequest::MergeFrom(
from._internal_csd());
}
if (cached_has_bits & 0x00000040u) {
_this->_internal_mutable_print_metadata()->::content_analysis::sdk::ContentMetaData_PrintMetadata::MergeFrom(
from._internal_print_metadata());
}
}
_this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}
void ContentMetaData::CopyFrom(const ContentMetaData& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:content_analysis.sdk.ContentMetaData)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool ContentMetaData::IsInitialized() const {
if (_internal_has_csd()) {
if (!_impl_.csd_->IsInitialized()) return false;
}
return true;
}
void ContentMetaData::InternalSwap(ContentMetaData* other) {
using std::swap;
auto* lhs_arena = GetArenaForAllocation();
auto* rhs_arena = other->GetArenaForAllocation();
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&_impl_.url_, lhs_arena,
&other->_impl_.url_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&_impl_.filename_, lhs_arena,
&other->_impl_.filename_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&_impl_.digest_, lhs_arena,
&other->_impl_.digest_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&_impl_.email_, lhs_arena,
&other->_impl_.email_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&_impl_.tab_title_, lhs_arena,
&other->_impl_.tab_title_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::memswap<
PROTOBUF_FIELD_OFFSET(ContentMetaData, _impl_.print_metadata_)
+ sizeof(ContentMetaData::_impl_.print_metadata_)
- PROTOBUF_FIELD_OFFSET(ContentMetaData, _impl_.csd_)>(
reinterpret_cast<char*>(&_impl_.csd_),
reinterpret_cast<char*>(&other->_impl_.csd_));
}
std::string ContentMetaData::GetTypeName() const {
return "content_analysis.sdk.ContentMetaData";
}
// ===================================================================
class ClientMetadata_Browser::_Internal {
public:
using HasBits = decltype(std::declval<ClientMetadata_Browser>()._impl_._has_bits_);
static void set_has_machine_user(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
};
ClientMetadata_Browser::ClientMetadata_Browser(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
SharedCtor(arena, is_message_owned);
// @@protoc_insertion_point(arena_constructor:content_analysis.sdk.ClientMetadata.Browser)
}
ClientMetadata_Browser::ClientMetadata_Browser(const ClientMetadata_Browser& from)
: ::PROTOBUF_NAMESPACE_ID::MessageLite() {
ClientMetadata_Browser* const _this = this; (void)_this;
new (&_impl_) Impl_{
decltype(_impl_._has_bits_){from._impl_._has_bits_}
, /*decltype(_impl_._cached_size_)*/{}
, decltype(_impl_.machine_user_){}};
_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
_impl_.machine_user_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
_impl_.machine_user_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_machine_user()) {
_this->_impl_.machine_user_.Set(from._internal_machine_user(),
_this->GetArenaForAllocation());
}
// @@protoc_insertion_point(copy_constructor:content_analysis.sdk.ClientMetadata.Browser)
}
inline void ClientMetadata_Browser::SharedCtor(
::_pb::Arena* arena, bool is_message_owned) {
(void)arena;
(void)is_message_owned;
new (&_impl_) Impl_{
decltype(_impl_._has_bits_){}
, /*decltype(_impl_._cached_size_)*/{}
, decltype(_impl_.machine_user_){}
};
_impl_.machine_user_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
_impl_.machine_user_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
ClientMetadata_Browser::~ClientMetadata_Browser() {
// @@protoc_insertion_point(destructor:content_analysis.sdk.ClientMetadata.Browser)
if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
(void)arena;
return;
}
SharedDtor();
}
inline void ClientMetadata_Browser::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
_impl_.machine_user_.Destroy();
}
void ClientMetadata_Browser::SetCachedSize(int size) const {
_impl_._cached_size_.Set(size);
}
void ClientMetadata_Browser::Clear() {
// @@protoc_insertion_point(message_clear_start:content_analysis.sdk.ClientMetadata.Browser)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x00000001u) {
_impl_.machine_user_.ClearNonDefaultToEmpty();
}
_impl_._has_bits_.Clear();
_internal_metadata_.Clear<std::string>();
}
const char* ClientMetadata_Browser::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::_pbi::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional string machine_user = 4;
case 4:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
auto str = _internal_mutable_machine_user();
ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
CHK_(ptr);
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<std::string>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
_impl_._has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* ClientMetadata_Browser::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:content_analysis.sdk.ClientMetadata.Browser)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _impl_._has_bits_[0];
// optional string machine_user = 4;
if (cached_has_bits & 0x00000001u) {
target = stream->WriteStringMaybeAliased(
4, this->_internal_machine_user(), target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
}
// @@protoc_insertion_point(serialize_to_array_end:content_analysis.sdk.ClientMetadata.Browser)
return target;
}
size_t ClientMetadata_Browser::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:content_analysis.sdk.ClientMetadata.Browser)
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 machine_user = 4;
cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x00000001u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_machine_user());
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
}
int cached_size = ::_pbi::ToCachedSize(total_size);
SetCachedSize(cached_size);
return total_size;
}
void ClientMetadata_Browser::CheckTypeAndMergeFrom(
const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
MergeFrom(*::_pbi::DownCast<const ClientMetadata_Browser*>(
&from));
}
void ClientMetadata_Browser::MergeFrom(const ClientMetadata_Browser& from) {
ClientMetadata_Browser* const _this = this;
// @@protoc_insertion_point(class_specific_merge_from_start:content_analysis.sdk.ClientMetadata.Browser)
GOOGLE_DCHECK_NE(&from, _this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
if (from._internal_has_machine_user()) {
_this->_internal_set_machine_user(from._internal_machine_user());
}
_this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}
void ClientMetadata_Browser::CopyFrom(const ClientMetadata_Browser& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:content_analysis.sdk.ClientMetadata.Browser)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool ClientMetadata_Browser::IsInitialized() const {
return true;
}
void ClientMetadata_Browser::InternalSwap(ClientMetadata_Browser* other) {
using std::swap;
auto* lhs_arena = GetArenaForAllocation();
auto* rhs_arena = other->GetArenaForAllocation();
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&_impl_.machine_user_, lhs_arena,
&other->_impl_.machine_user_, rhs_arena
);
}
std::string ClientMetadata_Browser::GetTypeName() const {
return "content_analysis.sdk.ClientMetadata.Browser";
}
// ===================================================================
class ClientMetadata::_Internal {
public:
using HasBits = decltype(std::declval<ClientMetadata>()._impl_._has_bits_);
static const ::content_analysis::sdk::ClientMetadata_Browser& browser(const ClientMetadata* msg);
static void set_has_browser(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
};
const ::content_analysis::sdk::ClientMetadata_Browser&
ClientMetadata::_Internal::browser(const ClientMetadata* msg) {
return *msg->_impl_.browser_;
}
ClientMetadata::ClientMetadata(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
SharedCtor(arena, is_message_owned);
// @@protoc_insertion_point(arena_constructor:content_analysis.sdk.ClientMetadata)
}
ClientMetadata::ClientMetadata(const ClientMetadata& from)
: ::PROTOBUF_NAMESPACE_ID::MessageLite() {
ClientMetadata* const _this = this; (void)_this;
new (&_impl_) Impl_{
decltype(_impl_._has_bits_){from._impl_._has_bits_}
, /*decltype(_impl_._cached_size_)*/{}
, decltype(_impl_.browser_){nullptr}};
_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
if (from._internal_has_browser()) {
_this->_impl_.browser_ = new ::content_analysis::sdk::ClientMetadata_Browser(*from._impl_.browser_);
}
// @@protoc_insertion_point(copy_constructor:content_analysis.sdk.ClientMetadata)
}
inline void ClientMetadata::SharedCtor(
::_pb::Arena* arena, bool is_message_owned) {
(void)arena;
(void)is_message_owned;
new (&_impl_) Impl_{
decltype(_impl_._has_bits_){}
, /*decltype(_impl_._cached_size_)*/{}
, decltype(_impl_.browser_){nullptr}
};
}
ClientMetadata::~ClientMetadata() {
// @@protoc_insertion_point(destructor:content_analysis.sdk.ClientMetadata)
if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
(void)arena;
return;
}
SharedDtor();
}
inline void ClientMetadata::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
if (this != internal_default_instance()) delete _impl_.browser_;
}
void ClientMetadata::SetCachedSize(int size) const {
_impl_._cached_size_.Set(size);
}
void ClientMetadata::Clear() {
// @@protoc_insertion_point(message_clear_start:content_analysis.sdk.ClientMetadata)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x00000001u) {
GOOGLE_DCHECK(_impl_.browser_ != nullptr);
_impl_.browser_->Clear();
}
_impl_._has_bits_.Clear();
_internal_metadata_.Clear<std::string>();
}
const char* ClientMetadata::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::_pbi::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional .content_analysis.sdk.ClientMetadata.Browser browser = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
ptr = ctx->ParseMessage(_internal_mutable_browser(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<std::string>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
_impl_._has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* ClientMetadata::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:content_analysis.sdk.ClientMetadata)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _impl_._has_bits_[0];
// optional .content_analysis.sdk.ClientMetadata.Browser browser = 1;
if (cached_has_bits & 0x00000001u) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(1, _Internal::browser(this),
_Internal::browser(this).GetCachedSize(), target, stream);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
}
// @@protoc_insertion_point(serialize_to_array_end:content_analysis.sdk.ClientMetadata)
return target;
}
size_t ClientMetadata::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:content_analysis.sdk.ClientMetadata)
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 .content_analysis.sdk.ClientMetadata.Browser browser = 1;
cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x00000001u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*_impl_.browser_);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
}
int cached_size = ::_pbi::ToCachedSize(total_size);
SetCachedSize(cached_size);
return total_size;
}
void ClientMetadata::CheckTypeAndMergeFrom(
const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
MergeFrom(*::_pbi::DownCast<const ClientMetadata*>(
&from));
}
void ClientMetadata::MergeFrom(const ClientMetadata& from) {
ClientMetadata* const _this = this;
// @@protoc_insertion_point(class_specific_merge_from_start:content_analysis.sdk.ClientMetadata)
GOOGLE_DCHECK_NE(&from, _this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
if (from._internal_has_browser()) {
_this->_internal_mutable_browser()->::content_analysis::sdk::ClientMetadata_Browser::MergeFrom(
from._internal_browser());
}
_this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}
void ClientMetadata::CopyFrom(const ClientMetadata& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:content_analysis.sdk.ClientMetadata)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool ClientMetadata::IsInitialized() const {
return true;
}
void ClientMetadata::InternalSwap(ClientMetadata* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
swap(_impl_.browser_, other->_impl_.browser_);
}
std::string ClientMetadata::GetTypeName() const {
return "content_analysis.sdk.ClientMetadata";
}
// ===================================================================
class ClientDownloadRequest_Resource::_Internal {
public:
using HasBits = decltype(std::declval<ClientDownloadRequest_Resource>()._impl_._has_bits_);
static void set_has_url(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
static void set_has_type(HasBits* has_bits) {
(*has_bits)[0] |= 2u;
}
static bool MissingRequiredFields(const HasBits& has_bits) {
return ((has_bits[0] & 0x00000003) ^ 0x00000003) != 0;
}
};
ClientDownloadRequest_Resource::ClientDownloadRequest_Resource(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
SharedCtor(arena, is_message_owned);
// @@protoc_insertion_point(arena_constructor:content_analysis.sdk.ClientDownloadRequest.Resource)
}
ClientDownloadRequest_Resource::ClientDownloadRequest_Resource(const ClientDownloadRequest_Resource& from)
: ::PROTOBUF_NAMESPACE_ID::MessageLite() {
ClientDownloadRequest_Resource* const _this = this; (void)_this;
new (&_impl_) Impl_{
decltype(_impl_._has_bits_){from._impl_._has_bits_}
, /*decltype(_impl_._cached_size_)*/{}
, decltype(_impl_.url_){}
, decltype(_impl_.type_){}};
_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
_impl_.url_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
_impl_.url_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_url()) {
_this->_impl_.url_.Set(from._internal_url(),
_this->GetArenaForAllocation());
}
_this->_impl_.type_ = from._impl_.type_;
// @@protoc_insertion_point(copy_constructor:content_analysis.sdk.ClientDownloadRequest.Resource)
}
inline void ClientDownloadRequest_Resource::SharedCtor(
::_pb::Arena* arena, bool is_message_owned) {
(void)arena;
(void)is_message_owned;
new (&_impl_) Impl_{
decltype(_impl_._has_bits_){}
, /*decltype(_impl_._cached_size_)*/{}
, decltype(_impl_.url_){}
, decltype(_impl_.type_){0}
};
_impl_.url_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
_impl_.url_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
ClientDownloadRequest_Resource::~ClientDownloadRequest_Resource() {
// @@protoc_insertion_point(destructor:content_analysis.sdk.ClientDownloadRequest.Resource)
if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
(void)arena;
return;
}
SharedDtor();
}
inline void ClientDownloadRequest_Resource::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
_impl_.url_.Destroy();
}
void ClientDownloadRequest_Resource::SetCachedSize(int size) const {
_impl_._cached_size_.Set(size);
}
void ClientDownloadRequest_Resource::Clear() {
// @@protoc_insertion_point(message_clear_start:content_analysis.sdk.ClientDownloadRequest.Resource)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x00000001u) {
_impl_.url_.ClearNonDefaultToEmpty();
}
_impl_.type_ = 0;
_impl_._has_bits_.Clear();
_internal_metadata_.Clear<std::string>();
}
const char* ClientDownloadRequest_Resource::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::_pbi::ReadTag(ptr, &tag);
switch (tag >> 3) {
// required string url = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
auto str = _internal_mutable_url();
ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// required .content_analysis.sdk.ClientDownloadRequest.ResourceType type = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
if (PROTOBUF_PREDICT_TRUE(::content_analysis::sdk::ClientDownloadRequest_ResourceType_IsValid(val))) {
_internal_set_type(static_cast<::content_analysis::sdk::ClientDownloadRequest_ResourceType>(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<std::string>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
_impl_._has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* ClientDownloadRequest_Resource::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:content_analysis.sdk.ClientDownloadRequest.Resource)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _impl_._has_bits_[0];
// required string url = 1;
if (cached_has_bits & 0x00000001u) {
target = stream->WriteStringMaybeAliased(
1, this->_internal_url(), target);
}
// required .content_analysis.sdk.ClientDownloadRequest.ResourceType type = 2;
if (cached_has_bits & 0x00000002u) {
target = stream->EnsureSpace(target);
target = ::_pbi::WireFormatLite::WriteEnumToArray(
2, this->_internal_type(), target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
}
// @@protoc_insertion_point(serialize_to_array_end:content_analysis.sdk.ClientDownloadRequest.Resource)
return target;
}
size_t ClientDownloadRequest_Resource::RequiredFieldsByteSizeFallback() const {
// @@protoc_insertion_point(required_fields_byte_size_fallback_start:content_analysis.sdk.ClientDownloadRequest.Resource)
size_t total_size = 0;
if (_internal_has_url()) {
// required string url = 1;
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_url());
}
if (_internal_has_type()) {
// required .content_analysis.sdk.ClientDownloadRequest.ResourceType type = 2;
total_size += 1 +
::_pbi::WireFormatLite::EnumSize(this->_internal_type());
}
return total_size;
}
size_t ClientDownloadRequest_Resource::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:content_analysis.sdk.ClientDownloadRequest.Resource)
size_t total_size = 0;
if (((_impl_._has_bits_[0] & 0x00000003) ^ 0x00000003) == 0) { // All required fields are present.
// required string url = 1;
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_url());
// required .content_analysis.sdk.ClientDownloadRequest.ResourceType type = 2;
total_size += 1 +
::_pbi::WireFormatLite::EnumSize(this->_internal_type());
} 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<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
}
int cached_size = ::_pbi::ToCachedSize(total_size);
SetCachedSize(cached_size);
return total_size;
}
void ClientDownloadRequest_Resource::CheckTypeAndMergeFrom(
const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
MergeFrom(*::_pbi::DownCast<const ClientDownloadRequest_Resource*>(
&from));
}
void ClientDownloadRequest_Resource::MergeFrom(const ClientDownloadRequest_Resource& from) {
ClientDownloadRequest_Resource* const _this = this;
// @@protoc_insertion_point(class_specific_merge_from_start:content_analysis.sdk.ClientDownloadRequest.Resource)
GOOGLE_DCHECK_NE(&from, _this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = from._impl_._has_bits_[0];
if (cached_has_bits & 0x00000003u) {
if (cached_has_bits & 0x00000001u) {
_this->_internal_set_url(from._internal_url());
}
if (cached_has_bits & 0x00000002u) {
_this->_impl_.type_ = from._impl_.type_;
}
_this->_impl_._has_bits_[0] |= cached_has_bits;
}
_this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}
void ClientDownloadRequest_Resource::CopyFrom(const ClientDownloadRequest_Resource& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:content_analysis.sdk.ClientDownloadRequest.Resource)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool ClientDownloadRequest_Resource::IsInitialized() const {
if (_Internal::MissingRequiredFields(_impl_._has_bits_)) return false;
return true;
}
void ClientDownloadRequest_Resource::InternalSwap(ClientDownloadRequest_Resource* other) {
using std::swap;
auto* lhs_arena = GetArenaForAllocation();
auto* rhs_arena = other->GetArenaForAllocation();
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&_impl_.url_, lhs_arena,
&other->_impl_.url_, rhs_arena
);
swap(_impl_.type_, other->_impl_.type_);
}
std::string ClientDownloadRequest_Resource::GetTypeName() const {
return "content_analysis.sdk.ClientDownloadRequest.Resource";
}
// ===================================================================
class ClientDownloadRequest::_Internal {
public:
};
ClientDownloadRequest::ClientDownloadRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
SharedCtor(arena, is_message_owned);
// @@protoc_insertion_point(arena_constructor:content_analysis.sdk.ClientDownloadRequest)
}
ClientDownloadRequest::ClientDownloadRequest(const ClientDownloadRequest& from)
: ::PROTOBUF_NAMESPACE_ID::MessageLite() {
ClientDownloadRequest* const _this = this; (void)_this;
new (&_impl_) Impl_{
decltype(_impl_.resources_){from._impl_.resources_}
, /*decltype(_impl_._cached_size_)*/{}};
_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
// @@protoc_insertion_point(copy_constructor:content_analysis.sdk.ClientDownloadRequest)
}
inline void ClientDownloadRequest::SharedCtor(
::_pb::Arena* arena, bool is_message_owned) {
(void)arena;
(void)is_message_owned;
new (&_impl_) Impl_{
decltype(_impl_.resources_){arena}
, /*decltype(_impl_._cached_size_)*/{}
};
}
ClientDownloadRequest::~ClientDownloadRequest() {
// @@protoc_insertion_point(destructor:content_analysis.sdk.ClientDownloadRequest)
if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
(void)arena;
return;
}
SharedDtor();
}
inline void ClientDownloadRequest::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
_impl_.resources_.~RepeatedPtrField();
}
void ClientDownloadRequest::SetCachedSize(int size) const {
_impl_._cached_size_.Set(size);
}
void ClientDownloadRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:content_analysis.sdk.ClientDownloadRequest)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
_impl_.resources_.Clear();
_internal_metadata_.Clear<std::string>();
}
const char* ClientDownloadRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::_pbi::ReadTag(ptr, &tag);
switch (tag >> 3) {
// repeated .content_analysis.sdk.ClientDownloadRequest.Resource resources = 4;
case 4:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
ptr -= 1;
do {
ptr += 1;
ptr = ctx->ParseMessage(_internal_add_resources(), ptr);
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<34>(ptr));
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<std::string>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* ClientDownloadRequest::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:content_analysis.sdk.ClientDownloadRequest)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
// repeated .content_analysis.sdk.ClientDownloadRequest.Resource resources = 4;
for (unsigned i = 0,
n = static_cast<unsigned>(this->_internal_resources_size()); i < n; i++) {
const auto& repfield = this->_internal_resources(i);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(4, repfield, repfield.GetCachedSize(), target, stream);
}
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:content_analysis.sdk.ClientDownloadRequest)
return target;
}
size_t ClientDownloadRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:content_analysis.sdk.ClientDownloadRequest)
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 .content_analysis.sdk.ClientDownloadRequest.Resource resources = 4;
total_size += 1UL * this->_internal_resources_size();
for (const auto& msg : this->_impl_.resources_) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
}
int cached_size = ::_pbi::ToCachedSize(total_size);
SetCachedSize(cached_size);
return total_size;
}
void ClientDownloadRequest::CheckTypeAndMergeFrom(
const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
MergeFrom(*::_pbi::DownCast<const ClientDownloadRequest*>(
&from));
}
void ClientDownloadRequest::MergeFrom(const ClientDownloadRequest& from) {
ClientDownloadRequest* const _this = this;
// @@protoc_insertion_point(class_specific_merge_from_start:content_analysis.sdk.ClientDownloadRequest)
GOOGLE_DCHECK_NE(&from, _this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
_this->_impl_.resources_.MergeFrom(from._impl_.resources_);
_this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}
void ClientDownloadRequest::CopyFrom(const ClientDownloadRequest& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:content_analysis.sdk.ClientDownloadRequest)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool ClientDownloadRequest::IsInitialized() const {
if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(_impl_.resources_))
return false;
return true;
}
void ClientDownloadRequest::InternalSwap(ClientDownloadRequest* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
_impl_.resources_.InternalSwap(&other->_impl_.resources_);
}
std::string ClientDownloadRequest::GetTypeName() const {
return "content_analysis.sdk.ClientDownloadRequest";
}
// ===================================================================
class ContentAnalysisRequest_PrintData::_Internal {
public:
using HasBits = decltype(std::declval<ContentAnalysisRequest_PrintData>()._impl_._has_bits_);
static void set_has_handle(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
static void set_has_size(HasBits* has_bits) {
(*has_bits)[0] |= 2u;
}
};
ContentAnalysisRequest_PrintData::ContentAnalysisRequest_PrintData(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
SharedCtor(arena, is_message_owned);
// @@protoc_insertion_point(arena_constructor:content_analysis.sdk.ContentAnalysisRequest.PrintData)
}
ContentAnalysisRequest_PrintData::ContentAnalysisRequest_PrintData(const ContentAnalysisRequest_PrintData& from)
: ::PROTOBUF_NAMESPACE_ID::MessageLite() {
ContentAnalysisRequest_PrintData* const _this = this; (void)_this;
new (&_impl_) Impl_{
decltype(_impl_._has_bits_){from._impl_._has_bits_}
, /*decltype(_impl_._cached_size_)*/{}
, decltype(_impl_.handle_){}
, decltype(_impl_.size_){}};
_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
::memcpy(&_impl_.handle_, &from._impl_.handle_,
static_cast<size_t>(reinterpret_cast<char*>(&_impl_.size_) -
reinterpret_cast<char*>(&_impl_.handle_)) + sizeof(_impl_.size_));
// @@protoc_insertion_point(copy_constructor:content_analysis.sdk.ContentAnalysisRequest.PrintData)
}
inline void ContentAnalysisRequest_PrintData::SharedCtor(
::_pb::Arena* arena, bool is_message_owned) {
(void)arena;
(void)is_message_owned;
new (&_impl_) Impl_{
decltype(_impl_._has_bits_){}
, /*decltype(_impl_._cached_size_)*/{}
, decltype(_impl_.handle_){int64_t{0}}
, decltype(_impl_.size_){int64_t{0}}
};
}
ContentAnalysisRequest_PrintData::~ContentAnalysisRequest_PrintData() {
// @@protoc_insertion_point(destructor:content_analysis.sdk.ContentAnalysisRequest.PrintData)
if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
(void)arena;
return;
}
SharedDtor();
}
inline void ContentAnalysisRequest_PrintData::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}
void ContentAnalysisRequest_PrintData::SetCachedSize(int size) const {
_impl_._cached_size_.Set(size);
}
void ContentAnalysisRequest_PrintData::Clear() {
// @@protoc_insertion_point(message_clear_start:content_analysis.sdk.ContentAnalysisRequest.PrintData)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x00000003u) {
::memset(&_impl_.handle_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&_impl_.size_) -
reinterpret_cast<char*>(&_impl_.handle_)) + sizeof(_impl_.size_));
}
_impl_._has_bits_.Clear();
_internal_metadata_.Clear<std::string>();
}
const char* ContentAnalysisRequest_PrintData::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::_pbi::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional int64 handle = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
_Internal::set_has_handle(&has_bits);
_impl_.handle_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional int64 size = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
_Internal::set_has_size(&has_bits);
_impl_.size_ = ::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<std::string>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
_impl_._has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* ContentAnalysisRequest_PrintData::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:content_analysis.sdk.ContentAnalysisRequest.PrintData)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _impl_._has_bits_[0];
// optional int64 handle = 1;
if (cached_has_bits & 0x00000001u) {
target = stream->EnsureSpace(target);
target = ::_pbi::WireFormatLite::WriteInt64ToArray(1, this->_internal_handle(), target);
}
// optional int64 size = 2;
if (cached_has_bits & 0x00000002u) {
target = stream->EnsureSpace(target);
target = ::_pbi::WireFormatLite::WriteInt64ToArray(2, this->_internal_size(), target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
}
// @@protoc_insertion_point(serialize_to_array_end:content_analysis.sdk.ContentAnalysisRequest.PrintData)
return target;
}
size_t ContentAnalysisRequest_PrintData::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:content_analysis.sdk.ContentAnalysisRequest.PrintData)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x00000003u) {
// optional int64 handle = 1;
if (cached_has_bits & 0x00000001u) {
total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_handle());
}
// optional int64 size = 2;
if (cached_has_bits & 0x00000002u) {
total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_size());
}
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
}
int cached_size = ::_pbi::ToCachedSize(total_size);
SetCachedSize(cached_size);
return total_size;
}
void ContentAnalysisRequest_PrintData::CheckTypeAndMergeFrom(
const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
MergeFrom(*::_pbi::DownCast<const ContentAnalysisRequest_PrintData*>(
&from));
}
void ContentAnalysisRequest_PrintData::MergeFrom(const ContentAnalysisRequest_PrintData& from) {
ContentAnalysisRequest_PrintData* const _this = this;
// @@protoc_insertion_point(class_specific_merge_from_start:content_analysis.sdk.ContentAnalysisRequest.PrintData)
GOOGLE_DCHECK_NE(&from, _this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = from._impl_._has_bits_[0];
if (cached_has_bits & 0x00000003u) {
if (cached_has_bits & 0x00000001u) {
_this->_impl_.handle_ = from._impl_.handle_;
}
if (cached_has_bits & 0x00000002u) {
_this->_impl_.size_ = from._impl_.size_;
}
_this->_impl_._has_bits_[0] |= cached_has_bits;
}
_this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}
void ContentAnalysisRequest_PrintData::CopyFrom(const ContentAnalysisRequest_PrintData& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:content_analysis.sdk.ContentAnalysisRequest.PrintData)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool ContentAnalysisRequest_PrintData::IsInitialized() const {
return true;
}
void ContentAnalysisRequest_PrintData::InternalSwap(ContentAnalysisRequest_PrintData* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
::PROTOBUF_NAMESPACE_ID::internal::memswap<
PROTOBUF_FIELD_OFFSET(ContentAnalysisRequest_PrintData, _impl_.size_)
+ sizeof(ContentAnalysisRequest_PrintData::_impl_.size_)
- PROTOBUF_FIELD_OFFSET(ContentAnalysisRequest_PrintData, _impl_.handle_)>(
reinterpret_cast<char*>(&_impl_.handle_),
reinterpret_cast<char*>(&other->_impl_.handle_));
}
std::string ContentAnalysisRequest_PrintData::GetTypeName() const {
return "content_analysis.sdk.ContentAnalysisRequest.PrintData";
}
// ===================================================================
class ContentAnalysisRequest::_Internal {
public:
using HasBits = decltype(std::declval<ContentAnalysisRequest>()._impl_._has_bits_);
static void set_has_request_token(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
static void set_has_analysis_connector(HasBits* has_bits) {
(*has_bits)[0] |= 16u;
}
static const ::content_analysis::sdk::ContentMetaData& request_data(const ContentAnalysisRequest* msg);
static void set_has_request_data(HasBits* has_bits) {
(*has_bits)[0] |= 4u;
}
static const ::content_analysis::sdk::ClientMetadata& client_metadata(const ContentAnalysisRequest* msg);
static void set_has_client_metadata(HasBits* has_bits) {
(*has_bits)[0] |= 8u;
}
static const ::content_analysis::sdk::ContentAnalysisRequest_PrintData& print_data(const ContentAnalysisRequest* msg);
static void set_has_expires_at(HasBits* has_bits) {
(*has_bits)[0] |= 64u;
}
static void set_has_user_action_id(HasBits* has_bits) {
(*has_bits)[0] |= 2u;
}
static void set_has_user_action_requests_count(HasBits* has_bits) {
(*has_bits)[0] |= 128u;
}
static void set_has_reason(HasBits* has_bits) {
(*has_bits)[0] |= 32u;
}
};
const ::content_analysis::sdk::ContentMetaData&
ContentAnalysisRequest::_Internal::request_data(const ContentAnalysisRequest* msg) {
return *msg->_impl_.request_data_;
}
const ::content_analysis::sdk::ClientMetadata&
ContentAnalysisRequest::_Internal::client_metadata(const ContentAnalysisRequest* msg) {
return *msg->_impl_.client_metadata_;
}
const ::content_analysis::sdk::ContentAnalysisRequest_PrintData&
ContentAnalysisRequest::_Internal::print_data(const ContentAnalysisRequest* msg) {
return *msg->_impl_.content_data_.print_data_;
}
void ContentAnalysisRequest::set_allocated_print_data(::content_analysis::sdk::ContentAnalysisRequest_PrintData* print_data) {
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
clear_content_data();
if (print_data) {
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(print_data);
if (message_arena != submessage_arena) {
print_data = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
message_arena, print_data, submessage_arena);
}
set_has_print_data();
_impl_.content_data_.print_data_ = print_data;
}
// @@protoc_insertion_point(field_set_allocated:content_analysis.sdk.ContentAnalysisRequest.print_data)
}
ContentAnalysisRequest::ContentAnalysisRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
SharedCtor(arena, is_message_owned);
// @@protoc_insertion_point(arena_constructor:content_analysis.sdk.ContentAnalysisRequest)
}
ContentAnalysisRequest::ContentAnalysisRequest(const ContentAnalysisRequest& from)
: ::PROTOBUF_NAMESPACE_ID::MessageLite() {
ContentAnalysisRequest* const _this = this; (void)_this;
new (&_impl_) Impl_{
decltype(_impl_._has_bits_){from._impl_._has_bits_}
, /*decltype(_impl_._cached_size_)*/{}
, decltype(_impl_.tags_){from._impl_.tags_}
, decltype(_impl_.request_token_){}
, decltype(_impl_.user_action_id_){}
, decltype(_impl_.request_data_){nullptr}
, decltype(_impl_.client_metadata_){nullptr}
, decltype(_impl_.analysis_connector_){}
, decltype(_impl_.reason_){}
, decltype(_impl_.expires_at_){}
, decltype(_impl_.user_action_requests_count_){}
, decltype(_impl_.content_data_){}
, /*decltype(_impl_._oneof_case_)*/{}};
_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
_impl_.request_token_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
_impl_.request_token_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_request_token()) {
_this->_impl_.request_token_.Set(from._internal_request_token(),
_this->GetArenaForAllocation());
}
_impl_.user_action_id_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
_impl_.user_action_id_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_user_action_id()) {
_this->_impl_.user_action_id_.Set(from._internal_user_action_id(),
_this->GetArenaForAllocation());
}
if (from._internal_has_request_data()) {
_this->_impl_.request_data_ = new ::content_analysis::sdk::ContentMetaData(*from._impl_.request_data_);
}
if (from._internal_has_client_metadata()) {
_this->_impl_.client_metadata_ = new ::content_analysis::sdk::ClientMetadata(*from._impl_.client_metadata_);
}
::memcpy(&_impl_.analysis_connector_, &from._impl_.analysis_connector_,
static_cast<size_t>(reinterpret_cast<char*>(&_impl_.user_action_requests_count_) -
reinterpret_cast<char*>(&_impl_.analysis_connector_)) + sizeof(_impl_.user_action_requests_count_));
clear_has_content_data();
switch (from.content_data_case()) {
case kTextContent: {
_this->_internal_set_text_content(from._internal_text_content());
break;
}
case kFilePath: {
_this->_internal_set_file_path(from._internal_file_path());
break;
}
case kPrintData: {
_this->_internal_mutable_print_data()->::content_analysis::sdk::ContentAnalysisRequest_PrintData::MergeFrom(
from._internal_print_data());
break;
}
case CONTENT_DATA_NOT_SET: {
break;
}
}
// @@protoc_insertion_point(copy_constructor:content_analysis.sdk.ContentAnalysisRequest)
}
inline void ContentAnalysisRequest::SharedCtor(
::_pb::Arena* arena, bool is_message_owned) {
(void)arena;
(void)is_message_owned;
new (&_impl_) Impl_{
decltype(_impl_._has_bits_){}
, /*decltype(_impl_._cached_size_)*/{}
, decltype(_impl_.tags_){arena}
, decltype(_impl_.request_token_){}
, decltype(_impl_.user_action_id_){}
, decltype(_impl_.request_data_){nullptr}
, decltype(_impl_.client_metadata_){nullptr}
, decltype(_impl_.analysis_connector_){0}
, decltype(_impl_.reason_){0}
, decltype(_impl_.expires_at_){int64_t{0}}
, decltype(_impl_.user_action_requests_count_){int64_t{0}}
, decltype(_impl_.content_data_){}
, /*decltype(_impl_._oneof_case_)*/{}
};
_impl_.request_token_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
_impl_.request_token_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
_impl_.user_action_id_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
_impl_.user_action_id_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
clear_has_content_data();
}
ContentAnalysisRequest::~ContentAnalysisRequest() {
// @@protoc_insertion_point(destructor:content_analysis.sdk.ContentAnalysisRequest)
if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
(void)arena;
return;
}
SharedDtor();
}
inline void ContentAnalysisRequest::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
_impl_.tags_.~RepeatedPtrField();
_impl_.request_token_.Destroy();
_impl_.user_action_id_.Destroy();
if (this != internal_default_instance()) delete _impl_.request_data_;
if (this != internal_default_instance()) delete _impl_.client_metadata_;
if (has_content_data()) {
clear_content_data();
}
}
void ContentAnalysisRequest::SetCachedSize(int size) const {
_impl_._cached_size_.Set(size);
}
void ContentAnalysisRequest::clear_content_data() {
// @@protoc_insertion_point(one_of_clear_start:content_analysis.sdk.ContentAnalysisRequest)
switch (content_data_case()) {
case kTextContent: {
_impl_.content_data_.text_content_.Destroy();
break;
}
case kFilePath: {
_impl_.content_data_.file_path_.Destroy();
break;
}
case kPrintData: {
if (GetArenaForAllocation() == nullptr) {
delete _impl_.content_data_.print_data_;
}
break;
}
case CONTENT_DATA_NOT_SET: {
break;
}
}
_impl_._oneof_case_[0] = CONTENT_DATA_NOT_SET;
}
void ContentAnalysisRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:content_analysis.sdk.ContentAnalysisRequest)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
_impl_.tags_.Clear();
cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x0000000fu) {
if (cached_has_bits & 0x00000001u) {
_impl_.request_token_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000002u) {
_impl_.user_action_id_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000004u) {
GOOGLE_DCHECK(_impl_.request_data_ != nullptr);
_impl_.request_data_->Clear();
}
if (cached_has_bits & 0x00000008u) {
GOOGLE_DCHECK(_impl_.client_metadata_ != nullptr);
_impl_.client_metadata_->Clear();
}
}
if (cached_has_bits & 0x000000f0u) {
::memset(&_impl_.analysis_connector_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&_impl_.user_action_requests_count_) -
reinterpret_cast<char*>(&_impl_.analysis_connector_)) + sizeof(_impl_.user_action_requests_count_));
}
clear_content_data();
_impl_._has_bits_.Clear();
_internal_metadata_.Clear<std::string>();
}
const char* ContentAnalysisRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::_pbi::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional string request_token = 5;
case 5:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 42)) {
auto str = _internal_mutable_request_token();
ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .content_analysis.sdk.AnalysisConnector analysis_connector = 9;
case 9:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 72)) {
uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
if (PROTOBUF_PREDICT_TRUE(::content_analysis::sdk::AnalysisConnector_IsValid(val))) {
_internal_set_analysis_connector(static_cast<::content_analysis::sdk::AnalysisConnector>(val));
} else {
::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(9, val, mutable_unknown_fields());
}
} else
goto handle_unusual;
continue;
// optional .content_analysis.sdk.ContentMetaData request_data = 10;
case 10:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 82)) {
ptr = ctx->ParseMessage(_internal_mutable_request_data(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// repeated string tags = 11;
case 11:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 90)) {
ptr -= 1;
do {
ptr += 1;
auto str = _internal_add_tags();
ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<90>(ptr));
} else
goto handle_unusual;
continue;
// optional .content_analysis.sdk.ClientMetadata client_metadata = 12;
case 12:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 98)) {
ptr = ctx->ParseMessage(_internal_mutable_client_metadata(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// string text_content = 13;
case 13:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 106)) {
auto str = _internal_mutable_text_content();
ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// string file_path = 14;
case 14:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 114)) {
auto str = _internal_mutable_file_path();
ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional int64 expires_at = 15;
case 15:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 120)) {
_Internal::set_has_expires_at(&has_bits);
_impl_.expires_at_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional string user_action_id = 16;
case 16:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 130)) {
auto str = _internal_mutable_user_action_id();
ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional int64 user_action_requests_count = 17;
case 17:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 136)) {
_Internal::set_has_user_action_requests_count(&has_bits);
_impl_.user_action_requests_count_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// .content_analysis.sdk.ContentAnalysisRequest.PrintData print_data = 18;
case 18:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 146)) {
ptr = ctx->ParseMessage(_internal_mutable_print_data(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .content_analysis.sdk.ContentAnalysisRequest.Reason reason = 19;
case 19:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 152)) {
uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
if (PROTOBUF_PREDICT_TRUE(::content_analysis::sdk::ContentAnalysisRequest_Reason_IsValid(val))) {
_internal_set_reason(static_cast<::content_analysis::sdk::ContentAnalysisRequest_Reason>(val));
} else {
::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(19, val, mutable_unknown_fields());
}
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<std::string>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
_impl_._has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* ContentAnalysisRequest::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:content_analysis.sdk.ContentAnalysisRequest)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _impl_._has_bits_[0];
// optional string request_token = 5;
if (cached_has_bits & 0x00000001u) {
target = stream->WriteStringMaybeAliased(
5, this->_internal_request_token(), target);
}
// optional .content_analysis.sdk.AnalysisConnector analysis_connector = 9;
if (cached_has_bits & 0x00000010u) {
target = stream->EnsureSpace(target);
target = ::_pbi::WireFormatLite::WriteEnumToArray(
9, this->_internal_analysis_connector(), target);
}
// optional .content_analysis.sdk.ContentMetaData request_data = 10;
if (cached_has_bits & 0x00000004u) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(10, _Internal::request_data(this),
_Internal::request_data(this).GetCachedSize(), target, stream);
}
// repeated string tags = 11;
for (int i = 0, n = this->_internal_tags_size(); i < n; i++) {
const auto& s = this->_internal_tags(i);
target = stream->WriteString(11, s, target);
}
// optional .content_analysis.sdk.ClientMetadata client_metadata = 12;
if (cached_has_bits & 0x00000008u) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(12, _Internal::client_metadata(this),
_Internal::client_metadata(this).GetCachedSize(), target, stream);
}
switch (content_data_case()) {
case kTextContent: {
target = stream->WriteStringMaybeAliased(
13, this->_internal_text_content(), target);
break;
}
case kFilePath: {
target = stream->WriteStringMaybeAliased(
14, this->_internal_file_path(), target);
break;
}
default: ;
}
// optional int64 expires_at = 15;
if (cached_has_bits & 0x00000040u) {
target = stream->EnsureSpace(target);
target = ::_pbi::WireFormatLite::WriteInt64ToArray(15, this->_internal_expires_at(), target);
}
// optional string user_action_id = 16;
if (cached_has_bits & 0x00000002u) {
target = stream->WriteStringMaybeAliased(
16, this->_internal_user_action_id(), target);
}
// optional int64 user_action_requests_count = 17;
if (cached_has_bits & 0x00000080u) {
target = stream->EnsureSpace(target);
target = ::_pbi::WireFormatLite::WriteInt64ToArray(17, this->_internal_user_action_requests_count(), target);
}
// .content_analysis.sdk.ContentAnalysisRequest.PrintData print_data = 18;
if (_internal_has_print_data()) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(18, _Internal::print_data(this),
_Internal::print_data(this).GetCachedSize(), target, stream);
}
// optional .content_analysis.sdk.ContentAnalysisRequest.Reason reason = 19;
if (cached_has_bits & 0x00000020u) {
target = stream->EnsureSpace(target);
target = ::_pbi::WireFormatLite::WriteEnumToArray(
19, this->_internal_reason(), target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
}
// @@protoc_insertion_point(serialize_to_array_end:content_analysis.sdk.ContentAnalysisRequest)
return target;
}
size_t ContentAnalysisRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:content_analysis.sdk.ContentAnalysisRequest)
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 string tags = 11;
total_size += 1 *
::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.tags_.size());
for (int i = 0, n = _impl_.tags_.size(); i < n; i++) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
_impl_.tags_.Get(i));
}
cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x000000ffu) {
// optional string request_token = 5;
if (cached_has_bits & 0x00000001u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_request_token());
}
// optional string user_action_id = 16;
if (cached_has_bits & 0x00000002u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_user_action_id());
}
// optional .content_analysis.sdk.ContentMetaData request_data = 10;
if (cached_has_bits & 0x00000004u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*_impl_.request_data_);
}
// optional .content_analysis.sdk.ClientMetadata client_metadata = 12;
if (cached_has_bits & 0x00000008u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*_impl_.client_metadata_);
}
// optional .content_analysis.sdk.AnalysisConnector analysis_connector = 9;
if (cached_has_bits & 0x00000010u) {
total_size += 1 +
::_pbi::WireFormatLite::EnumSize(this->_internal_analysis_connector());
}
// optional .content_analysis.sdk.ContentAnalysisRequest.Reason reason = 19;
if (cached_has_bits & 0x00000020u) {
total_size += 2 +
::_pbi::WireFormatLite::EnumSize(this->_internal_reason());
}
// optional int64 expires_at = 15;
if (cached_has_bits & 0x00000040u) {
total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_expires_at());
}
// optional int64 user_action_requests_count = 17;
if (cached_has_bits & 0x00000080u) {
total_size += 2 +
::_pbi::WireFormatLite::Int64Size(
this->_internal_user_action_requests_count());
}
}
switch (content_data_case()) {
// string text_content = 13;
case kTextContent: {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_text_content());
break;
}
// string file_path = 14;
case kFilePath: {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_file_path());
break;
}
// .content_analysis.sdk.ContentAnalysisRequest.PrintData print_data = 18;
case kPrintData: {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*_impl_.content_data_.print_data_);
break;
}
case CONTENT_DATA_NOT_SET: {
break;
}
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
}
int cached_size = ::_pbi::ToCachedSize(total_size);
SetCachedSize(cached_size);
return total_size;
}
void ContentAnalysisRequest::CheckTypeAndMergeFrom(
const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
MergeFrom(*::_pbi::DownCast<const ContentAnalysisRequest*>(
&from));
}
void ContentAnalysisRequest::MergeFrom(const ContentAnalysisRequest& from) {
ContentAnalysisRequest* const _this = this;
// @@protoc_insertion_point(class_specific_merge_from_start:content_analysis.sdk.ContentAnalysisRequest)
GOOGLE_DCHECK_NE(&from, _this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
_this->_impl_.tags_.MergeFrom(from._impl_.tags_);
cached_has_bits = from._impl_._has_bits_[0];
if (cached_has_bits & 0x000000ffu) {
if (cached_has_bits & 0x00000001u) {
_this->_internal_set_request_token(from._internal_request_token());
}
if (cached_has_bits & 0x00000002u) {
_this->_internal_set_user_action_id(from._internal_user_action_id());
}
if (cached_has_bits & 0x00000004u) {
_this->_internal_mutable_request_data()->::content_analysis::sdk::ContentMetaData::MergeFrom(
from._internal_request_data());
}
if (cached_has_bits & 0x00000008u) {
_this->_internal_mutable_client_metadata()->::content_analysis::sdk::ClientMetadata::MergeFrom(
from._internal_client_metadata());
}
if (cached_has_bits & 0x00000010u) {
_this->_impl_.analysis_connector_ = from._impl_.analysis_connector_;
}
if (cached_has_bits & 0x00000020u) {
_this->_impl_.reason_ = from._impl_.reason_;
}
if (cached_has_bits & 0x00000040u) {
_this->_impl_.expires_at_ = from._impl_.expires_at_;
}
if (cached_has_bits & 0x00000080u) {
_this->_impl_.user_action_requests_count_ = from._impl_.user_action_requests_count_;
}
_this->_impl_._has_bits_[0] |= cached_has_bits;
}
switch (from.content_data_case()) {
case kTextContent: {
_this->_internal_set_text_content(from._internal_text_content());
break;
}
case kFilePath: {
_this->_internal_set_file_path(from._internal_file_path());
break;
}
case kPrintData: {
_this->_internal_mutable_print_data()->::content_analysis::sdk::ContentAnalysisRequest_PrintData::MergeFrom(
from._internal_print_data());
break;
}
case CONTENT_DATA_NOT_SET: {
break;
}
}
_this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}
void ContentAnalysisRequest::CopyFrom(const ContentAnalysisRequest& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:content_analysis.sdk.ContentAnalysisRequest)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool ContentAnalysisRequest::IsInitialized() const {
if (_internal_has_request_data()) {
if (!_impl_.request_data_->IsInitialized()) return false;
}
return true;
}
void ContentAnalysisRequest::InternalSwap(ContentAnalysisRequest* other) {
using std::swap;
auto* lhs_arena = GetArenaForAllocation();
auto* rhs_arena = other->GetArenaForAllocation();
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
_impl_.tags_.InternalSwap(&other->_impl_.tags_);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&_impl_.request_token_, lhs_arena,
&other->_impl_.request_token_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&_impl_.user_action_id_, lhs_arena,
&other->_impl_.user_action_id_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::memswap<
PROTOBUF_FIELD_OFFSET(ContentAnalysisRequest, _impl_.user_action_requests_count_)
+ sizeof(ContentAnalysisRequest::_impl_.user_action_requests_count_)
- PROTOBUF_FIELD_OFFSET(ContentAnalysisRequest, _impl_.request_data_)>(
reinterpret_cast<char*>(&_impl_.request_data_),
reinterpret_cast<char*>(&other->_impl_.request_data_));
swap(_impl_.content_data_, other->_impl_.content_data_);
swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]);
}
std::string ContentAnalysisRequest::GetTypeName() const {
return "content_analysis.sdk.ContentAnalysisRequest";
}
// ===================================================================
class ContentAnalysisResponse_Result_TriggeredRule::_Internal {
public:
using HasBits = decltype(std::declval<ContentAnalysisResponse_Result_TriggeredRule>()._impl_._has_bits_);
static void set_has_action(HasBits* has_bits) {
(*has_bits)[0] |= 4u;
}
static void set_has_rule_name(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
static void set_has_rule_id(HasBits* has_bits) {
(*has_bits)[0] |= 2u;
}
};
ContentAnalysisResponse_Result_TriggeredRule::ContentAnalysisResponse_Result_TriggeredRule(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
SharedCtor(arena, is_message_owned);
// @@protoc_insertion_point(arena_constructor:content_analysis.sdk.ContentAnalysisResponse.Result.TriggeredRule)
}
ContentAnalysisResponse_Result_TriggeredRule::ContentAnalysisResponse_Result_TriggeredRule(const ContentAnalysisResponse_Result_TriggeredRule& from)
: ::PROTOBUF_NAMESPACE_ID::MessageLite() {
ContentAnalysisResponse_Result_TriggeredRule* const _this = this; (void)_this;
new (&_impl_) Impl_{
decltype(_impl_._has_bits_){from._impl_._has_bits_}
, /*decltype(_impl_._cached_size_)*/{}
, decltype(_impl_.rule_name_){}
, decltype(_impl_.rule_id_){}
, decltype(_impl_.action_){}};
_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
_impl_.rule_name_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
_impl_.rule_name_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_rule_name()) {
_this->_impl_.rule_name_.Set(from._internal_rule_name(),
_this->GetArenaForAllocation());
}
_impl_.rule_id_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
_impl_.rule_id_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_rule_id()) {
_this->_impl_.rule_id_.Set(from._internal_rule_id(),
_this->GetArenaForAllocation());
}
_this->_impl_.action_ = from._impl_.action_;
// @@protoc_insertion_point(copy_constructor:content_analysis.sdk.ContentAnalysisResponse.Result.TriggeredRule)
}
inline void ContentAnalysisResponse_Result_TriggeredRule::SharedCtor(
::_pb::Arena* arena, bool is_message_owned) {
(void)arena;
(void)is_message_owned;
new (&_impl_) Impl_{
decltype(_impl_._has_bits_){}
, /*decltype(_impl_._cached_size_)*/{}
, decltype(_impl_.rule_name_){}
, decltype(_impl_.rule_id_){}
, decltype(_impl_.action_){0}
};
_impl_.rule_name_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
_impl_.rule_name_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
_impl_.rule_id_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
_impl_.rule_id_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
ContentAnalysisResponse_Result_TriggeredRule::~ContentAnalysisResponse_Result_TriggeredRule() {
// @@protoc_insertion_point(destructor:content_analysis.sdk.ContentAnalysisResponse.Result.TriggeredRule)
if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
(void)arena;
return;
}
SharedDtor();
}
inline void ContentAnalysisResponse_Result_TriggeredRule::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
_impl_.rule_name_.Destroy();
_impl_.rule_id_.Destroy();
}
void ContentAnalysisResponse_Result_TriggeredRule::SetCachedSize(int size) const {
_impl_._cached_size_.Set(size);
}
void ContentAnalysisResponse_Result_TriggeredRule::Clear() {
// @@protoc_insertion_point(message_clear_start:content_analysis.sdk.ContentAnalysisResponse.Result.TriggeredRule)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x00000003u) {
if (cached_has_bits & 0x00000001u) {
_impl_.rule_name_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000002u) {
_impl_.rule_id_.ClearNonDefaultToEmpty();
}
}
_impl_.action_ = 0;
_impl_._has_bits_.Clear();
_internal_metadata_.Clear<std::string>();
}
const char* ContentAnalysisResponse_Result_TriggeredRule::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::_pbi::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional .content_analysis.sdk.ContentAnalysisResponse.Result.TriggeredRule.Action action = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
if (PROTOBUF_PREDICT_TRUE(::content_analysis::sdk::ContentAnalysisResponse_Result_TriggeredRule_Action_IsValid(val))) {
_internal_set_action(static_cast<::content_analysis::sdk::ContentAnalysisResponse_Result_TriggeredRule_Action>(val));
} else {
::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields());
}
} else
goto handle_unusual;
continue;
// optional string rule_name = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
auto str = _internal_mutable_rule_name();
ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional string rule_id = 3;
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
auto str = _internal_mutable_rule_id();
ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
CHK_(ptr);
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<std::string>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
_impl_._has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* ContentAnalysisResponse_Result_TriggeredRule::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:content_analysis.sdk.ContentAnalysisResponse.Result.TriggeredRule)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _impl_._has_bits_[0];
// optional .content_analysis.sdk.ContentAnalysisResponse.Result.TriggeredRule.Action action = 1;
if (cached_has_bits & 0x00000004u) {
target = stream->EnsureSpace(target);
target = ::_pbi::WireFormatLite::WriteEnumToArray(
1, this->_internal_action(), target);
}
// optional string rule_name = 2;
if (cached_has_bits & 0x00000001u) {
target = stream->WriteStringMaybeAliased(
2, this->_internal_rule_name(), target);
}
// optional string rule_id = 3;
if (cached_has_bits & 0x00000002u) {
target = stream->WriteStringMaybeAliased(
3, this->_internal_rule_id(), target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
}
// @@protoc_insertion_point(serialize_to_array_end:content_analysis.sdk.ContentAnalysisResponse.Result.TriggeredRule)
return target;
}
size_t ContentAnalysisResponse_Result_TriggeredRule::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:content_analysis.sdk.ContentAnalysisResponse.Result.TriggeredRule)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x00000007u) {
// optional string rule_name = 2;
if (cached_has_bits & 0x00000001u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_rule_name());
}
// optional string rule_id = 3;
if (cached_has_bits & 0x00000002u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_rule_id());
}
// optional .content_analysis.sdk.ContentAnalysisResponse.Result.TriggeredRule.Action action = 1;
if (cached_has_bits & 0x00000004u) {
total_size += 1 +
::_pbi::WireFormatLite::EnumSize(this->_internal_action());
}
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
}
int cached_size = ::_pbi::ToCachedSize(total_size);
SetCachedSize(cached_size);
return total_size;
}
void ContentAnalysisResponse_Result_TriggeredRule::CheckTypeAndMergeFrom(
const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
MergeFrom(*::_pbi::DownCast<const ContentAnalysisResponse_Result_TriggeredRule*>(
&from));
}
void ContentAnalysisResponse_Result_TriggeredRule::MergeFrom(const ContentAnalysisResponse_Result_TriggeredRule& from) {
ContentAnalysisResponse_Result_TriggeredRule* const _this = this;
// @@protoc_insertion_point(class_specific_merge_from_start:content_analysis.sdk.ContentAnalysisResponse.Result.TriggeredRule)
GOOGLE_DCHECK_NE(&from, _this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = from._impl_._has_bits_[0];
if (cached_has_bits & 0x00000007u) {
if (cached_has_bits & 0x00000001u) {
_this->_internal_set_rule_name(from._internal_rule_name());
}
if (cached_has_bits & 0x00000002u) {
_this->_internal_set_rule_id(from._internal_rule_id());
}
if (cached_has_bits & 0x00000004u) {
_this->_impl_.action_ = from._impl_.action_;
}
_this->_impl_._has_bits_[0] |= cached_has_bits;
}
_this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}
void ContentAnalysisResponse_Result_TriggeredRule::CopyFrom(const ContentAnalysisResponse_Result_TriggeredRule& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:content_analysis.sdk.ContentAnalysisResponse.Result.TriggeredRule)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool ContentAnalysisResponse_Result_TriggeredRule::IsInitialized() const {
return true;
}
void ContentAnalysisResponse_Result_TriggeredRule::InternalSwap(ContentAnalysisResponse_Result_TriggeredRule* other) {
using std::swap;
auto* lhs_arena = GetArenaForAllocation();
auto* rhs_arena = other->GetArenaForAllocation();
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&_impl_.rule_name_, lhs_arena,
&other->_impl_.rule_name_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&_impl_.rule_id_, lhs_arena,
&other->_impl_.rule_id_, rhs_arena
);
swap(_impl_.action_, other->_impl_.action_);
}
std::string ContentAnalysisResponse_Result_TriggeredRule::GetTypeName() const {
return "content_analysis.sdk.ContentAnalysisResponse.Result.TriggeredRule";
}
// ===================================================================
class ContentAnalysisResponse_Result::_Internal {
public:
using HasBits = decltype(std::declval<ContentAnalysisResponse_Result>()._impl_._has_bits_);
static void set_has_tag(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
static void set_has_status(HasBits* has_bits) {
(*has_bits)[0] |= 2u;
}
};
ContentAnalysisResponse_Result::ContentAnalysisResponse_Result(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
SharedCtor(arena, is_message_owned);
// @@protoc_insertion_point(arena_constructor:content_analysis.sdk.ContentAnalysisResponse.Result)
}
ContentAnalysisResponse_Result::ContentAnalysisResponse_Result(const ContentAnalysisResponse_Result& from)
: ::PROTOBUF_NAMESPACE_ID::MessageLite() {
ContentAnalysisResponse_Result* const _this = this; (void)_this;
new (&_impl_) Impl_{
decltype(_impl_._has_bits_){from._impl_._has_bits_}
, /*decltype(_impl_._cached_size_)*/{}
, decltype(_impl_.triggered_rules_){from._impl_.triggered_rules_}
, decltype(_impl_.tag_){}
, decltype(_impl_.status_){}};
_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
_impl_.tag_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
_impl_.tag_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_tag()) {
_this->_impl_.tag_.Set(from._internal_tag(),
_this->GetArenaForAllocation());
}
_this->_impl_.status_ = from._impl_.status_;
// @@protoc_insertion_point(copy_constructor:content_analysis.sdk.ContentAnalysisResponse.Result)
}
inline void ContentAnalysisResponse_Result::SharedCtor(
::_pb::Arena* arena, bool is_message_owned) {
(void)arena;
(void)is_message_owned;
new (&_impl_) Impl_{
decltype(_impl_._has_bits_){}
, /*decltype(_impl_._cached_size_)*/{}
, decltype(_impl_.triggered_rules_){arena}
, decltype(_impl_.tag_){}
, decltype(_impl_.status_){0}
};
_impl_.tag_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
_impl_.tag_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
ContentAnalysisResponse_Result::~ContentAnalysisResponse_Result() {
// @@protoc_insertion_point(destructor:content_analysis.sdk.ContentAnalysisResponse.Result)
if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
(void)arena;
return;
}
SharedDtor();
}
inline void ContentAnalysisResponse_Result::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
_impl_.triggered_rules_.~RepeatedPtrField();
_impl_.tag_.Destroy();
}
void ContentAnalysisResponse_Result::SetCachedSize(int size) const {
_impl_._cached_size_.Set(size);
}
void ContentAnalysisResponse_Result::Clear() {
// @@protoc_insertion_point(message_clear_start:content_analysis.sdk.ContentAnalysisResponse.Result)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
_impl_.triggered_rules_.Clear();
cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x00000001u) {
_impl_.tag_.ClearNonDefaultToEmpty();
}
_impl_.status_ = 0;
_impl_._has_bits_.Clear();
_internal_metadata_.Clear<std::string>();
}
const char* ContentAnalysisResponse_Result::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::_pbi::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional string tag = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
auto str = _internal_mutable_tag();
ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .content_analysis.sdk.ContentAnalysisResponse.Result.Status status = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
if (PROTOBUF_PREDICT_TRUE(::content_analysis::sdk::ContentAnalysisResponse_Result_Status_IsValid(val))) {
_internal_set_status(static_cast<::content_analysis::sdk::ContentAnalysisResponse_Result_Status>(val));
} else {
::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(2, val, mutable_unknown_fields());
}
} else
goto handle_unusual;
continue;
// repeated .content_analysis.sdk.ContentAnalysisResponse.Result.TriggeredRule triggered_rules = 3;
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
ptr -= 1;
do {
ptr += 1;
ptr = ctx->ParseMessage(_internal_add_triggered_rules(), ptr);
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr));
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<std::string>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
_impl_._has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* ContentAnalysisResponse_Result::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:content_analysis.sdk.ContentAnalysisResponse.Result)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _impl_._has_bits_[0];
// optional string tag = 1;
if (cached_has_bits & 0x00000001u) {
target = stream->WriteStringMaybeAliased(
1, this->_internal_tag(), target);
}
// optional .content_analysis.sdk.ContentAnalysisResponse.Result.Status status = 2;
if (cached_has_bits & 0x00000002u) {
target = stream->EnsureSpace(target);
target = ::_pbi::WireFormatLite::WriteEnumToArray(
2, this->_internal_status(), target);
}
// repeated .content_analysis.sdk.ContentAnalysisResponse.Result.TriggeredRule triggered_rules = 3;
for (unsigned i = 0,
n = static_cast<unsigned>(this->_internal_triggered_rules_size()); i < n; i++) {
const auto& repfield = this->_internal_triggered_rules(i);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(3, repfield, repfield.GetCachedSize(), target, stream);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
}
// @@protoc_insertion_point(serialize_to_array_end:content_analysis.sdk.ContentAnalysisResponse.Result)
return target;
}
size_t ContentAnalysisResponse_Result::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:content_analysis.sdk.ContentAnalysisResponse.Result)
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 .content_analysis.sdk.ContentAnalysisResponse.Result.TriggeredRule triggered_rules = 3;
total_size += 1UL * this->_internal_triggered_rules_size();
for (const auto& msg : this->_impl_.triggered_rules_) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x00000003u) {
// optional string tag = 1;
if (cached_has_bits & 0x00000001u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_tag());
}
// optional .content_analysis.sdk.ContentAnalysisResponse.Result.Status status = 2;
if (cached_has_bits & 0x00000002u) {
total_size += 1 +
::_pbi::WireFormatLite::EnumSize(this->_internal_status());
}
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
}
int cached_size = ::_pbi::ToCachedSize(total_size);
SetCachedSize(cached_size);
return total_size;
}
void ContentAnalysisResponse_Result::CheckTypeAndMergeFrom(
const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
MergeFrom(*::_pbi::DownCast<const ContentAnalysisResponse_Result*>(
&from));
}
void ContentAnalysisResponse_Result::MergeFrom(const ContentAnalysisResponse_Result& from) {
ContentAnalysisResponse_Result* const _this = this;
// @@protoc_insertion_point(class_specific_merge_from_start:content_analysis.sdk.ContentAnalysisResponse.Result)
GOOGLE_DCHECK_NE(&from, _this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
_this->_impl_.triggered_rules_.MergeFrom(from._impl_.triggered_rules_);
cached_has_bits = from._impl_._has_bits_[0];
if (cached_has_bits & 0x00000003u) {
if (cached_has_bits & 0x00000001u) {
_this->_internal_set_tag(from._internal_tag());
}
if (cached_has_bits & 0x00000002u) {
_this->_impl_.status_ = from._impl_.status_;
}
_this->_impl_._has_bits_[0] |= cached_has_bits;
}
_this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}
void ContentAnalysisResponse_Result::CopyFrom(const ContentAnalysisResponse_Result& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:content_analysis.sdk.ContentAnalysisResponse.Result)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool ContentAnalysisResponse_Result::IsInitialized() const {
return true;
}
void ContentAnalysisResponse_Result::InternalSwap(ContentAnalysisResponse_Result* other) {
using std::swap;
auto* lhs_arena = GetArenaForAllocation();
auto* rhs_arena = other->GetArenaForAllocation();
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
_impl_.triggered_rules_.InternalSwap(&other->_impl_.triggered_rules_);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&_impl_.tag_, lhs_arena,
&other->_impl_.tag_, rhs_arena
);
swap(_impl_.status_, other->_impl_.status_);
}
std::string ContentAnalysisResponse_Result::GetTypeName() const {
return "content_analysis.sdk.ContentAnalysisResponse.Result";
}
// ===================================================================
class ContentAnalysisResponse::_Internal {
public:
using HasBits = decltype(std::declval<ContentAnalysisResponse>()._impl_._has_bits_);
static void set_has_request_token(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
};
ContentAnalysisResponse::ContentAnalysisResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
SharedCtor(arena, is_message_owned);
// @@protoc_insertion_point(arena_constructor:content_analysis.sdk.ContentAnalysisResponse)
}
ContentAnalysisResponse::ContentAnalysisResponse(const ContentAnalysisResponse& from)
: ::PROTOBUF_NAMESPACE_ID::MessageLite() {
ContentAnalysisResponse* const _this = this; (void)_this;
new (&_impl_) Impl_{
decltype(_impl_._has_bits_){from._impl_._has_bits_}
, /*decltype(_impl_._cached_size_)*/{}
, decltype(_impl_.results_){from._impl_.results_}
, decltype(_impl_.request_token_){}};
_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
_impl_.request_token_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
_impl_.request_token_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_request_token()) {
_this->_impl_.request_token_.Set(from._internal_request_token(),
_this->GetArenaForAllocation());
}
// @@protoc_insertion_point(copy_constructor:content_analysis.sdk.ContentAnalysisResponse)
}
inline void ContentAnalysisResponse::SharedCtor(
::_pb::Arena* arena, bool is_message_owned) {
(void)arena;
(void)is_message_owned;
new (&_impl_) Impl_{
decltype(_impl_._has_bits_){}
, /*decltype(_impl_._cached_size_)*/{}
, decltype(_impl_.results_){arena}
, decltype(_impl_.request_token_){}
};
_impl_.request_token_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
_impl_.request_token_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
ContentAnalysisResponse::~ContentAnalysisResponse() {
// @@protoc_insertion_point(destructor:content_analysis.sdk.ContentAnalysisResponse)
if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
(void)arena;
return;
}
SharedDtor();
}
inline void ContentAnalysisResponse::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
_impl_.results_.~RepeatedPtrField();
_impl_.request_token_.Destroy();
}
void ContentAnalysisResponse::SetCachedSize(int size) const {
_impl_._cached_size_.Set(size);
}
void ContentAnalysisResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:content_analysis.sdk.ContentAnalysisResponse)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
_impl_.results_.Clear();
cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x00000001u) {
_impl_.request_token_.ClearNonDefaultToEmpty();
}
_impl_._has_bits_.Clear();
_internal_metadata_.Clear<std::string>();
}
const char* ContentAnalysisResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::_pbi::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional string request_token = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
auto str = _internal_mutable_request_token();
ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// repeated .content_analysis.sdk.ContentAnalysisResponse.Result results = 4;
case 4:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
ptr -= 1;
do {
ptr += 1;
ptr = ctx->ParseMessage(_internal_add_results(), ptr);
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<34>(ptr));
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<std::string>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
_impl_._has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* ContentAnalysisResponse::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:content_analysis.sdk.ContentAnalysisResponse)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _impl_._has_bits_[0];
// optional string request_token = 1;
if (cached_has_bits & 0x00000001u) {
target = stream->WriteStringMaybeAliased(
1, this->_internal_request_token(), target);
}
// repeated .content_analysis.sdk.ContentAnalysisResponse.Result results = 4;
for (unsigned i = 0,
n = static_cast<unsigned>(this->_internal_results_size()); i < n; i++) {
const auto& repfield = this->_internal_results(i);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(4, repfield, repfield.GetCachedSize(), target, stream);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
}
// @@protoc_insertion_point(serialize_to_array_end:content_analysis.sdk.ContentAnalysisResponse)
return target;
}
size_t ContentAnalysisResponse::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:content_analysis.sdk.ContentAnalysisResponse)
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 .content_analysis.sdk.ContentAnalysisResponse.Result results = 4;
total_size += 1UL * this->_internal_results_size();
for (const auto& msg : this->_impl_.results_) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
// optional string request_token = 1;
cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x00000001u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_request_token());
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
}
int cached_size = ::_pbi::ToCachedSize(total_size);
SetCachedSize(cached_size);
return total_size;
}
void ContentAnalysisResponse::CheckTypeAndMergeFrom(
const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
MergeFrom(*::_pbi::DownCast<const ContentAnalysisResponse*>(
&from));
}
void ContentAnalysisResponse::MergeFrom(const ContentAnalysisResponse& from) {
ContentAnalysisResponse* const _this = this;
// @@protoc_insertion_point(class_specific_merge_from_start:content_analysis.sdk.ContentAnalysisResponse)
GOOGLE_DCHECK_NE(&from, _this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
_this->_impl_.results_.MergeFrom(from._impl_.results_);
if (from._internal_has_request_token()) {
_this->_internal_set_request_token(from._internal_request_token());
}
_this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}
void ContentAnalysisResponse::CopyFrom(const ContentAnalysisResponse& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:content_analysis.sdk.ContentAnalysisResponse)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool ContentAnalysisResponse::IsInitialized() const {
return true;
}
void ContentAnalysisResponse::InternalSwap(ContentAnalysisResponse* other) {
using std::swap;
auto* lhs_arena = GetArenaForAllocation();
auto* rhs_arena = other->GetArenaForAllocation();
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
_impl_.results_.InternalSwap(&other->_impl_.results_);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&_impl_.request_token_, lhs_arena,
&other->_impl_.request_token_, rhs_arena
);
}
std::string ContentAnalysisResponse::GetTypeName() const {
return "content_analysis.sdk.ContentAnalysisResponse";
}
// ===================================================================
class ContentAnalysisAcknowledgement::_Internal {
public:
using HasBits = decltype(std::declval<ContentAnalysisAcknowledgement>()._impl_._has_bits_);
static void set_has_request_token(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
static void set_has_status(HasBits* has_bits) {
(*has_bits)[0] |= 4u;
}
static void set_has_final_action(HasBits* has_bits) {
(*has_bits)[0] |= 2u;
}
};
ContentAnalysisAcknowledgement::ContentAnalysisAcknowledgement(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
SharedCtor(arena, is_message_owned);
// @@protoc_insertion_point(arena_constructor:content_analysis.sdk.ContentAnalysisAcknowledgement)
}
ContentAnalysisAcknowledgement::ContentAnalysisAcknowledgement(const ContentAnalysisAcknowledgement& from)
: ::PROTOBUF_NAMESPACE_ID::MessageLite() {
ContentAnalysisAcknowledgement* const _this = this; (void)_this;
new (&_impl_) Impl_{
decltype(_impl_._has_bits_){from._impl_._has_bits_}
, /*decltype(_impl_._cached_size_)*/{}
, decltype(_impl_.request_token_){}
, decltype(_impl_.final_action_){}
, decltype(_impl_.status_){}};
_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
_impl_.request_token_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
_impl_.request_token_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_request_token()) {
_this->_impl_.request_token_.Set(from._internal_request_token(),
_this->GetArenaForAllocation());
}
::memcpy(&_impl_.final_action_, &from._impl_.final_action_,
static_cast<size_t>(reinterpret_cast<char*>(&_impl_.status_) -
reinterpret_cast<char*>(&_impl_.final_action_)) + sizeof(_impl_.status_));
// @@protoc_insertion_point(copy_constructor:content_analysis.sdk.ContentAnalysisAcknowledgement)
}
inline void ContentAnalysisAcknowledgement::SharedCtor(
::_pb::Arena* arena, bool is_message_owned) {
(void)arena;
(void)is_message_owned;
new (&_impl_) Impl_{
decltype(_impl_._has_bits_){}
, /*decltype(_impl_._cached_size_)*/{}
, decltype(_impl_.request_token_){}
, decltype(_impl_.final_action_){0}
, decltype(_impl_.status_){1}
};
_impl_.request_token_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
_impl_.request_token_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
ContentAnalysisAcknowledgement::~ContentAnalysisAcknowledgement() {
// @@protoc_insertion_point(destructor:content_analysis.sdk.ContentAnalysisAcknowledgement)
if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
(void)arena;
return;
}
SharedDtor();
}
inline void ContentAnalysisAcknowledgement::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
_impl_.request_token_.Destroy();
}
void ContentAnalysisAcknowledgement::SetCachedSize(int size) const {
_impl_._cached_size_.Set(size);
}
void ContentAnalysisAcknowledgement::Clear() {
// @@protoc_insertion_point(message_clear_start:content_analysis.sdk.ContentAnalysisAcknowledgement)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x00000001u) {
_impl_.request_token_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000006u) {
_impl_.final_action_ = 0;
_impl_.status_ = 1;
}
_impl_._has_bits_.Clear();
_internal_metadata_.Clear<std::string>();
}
const char* ContentAnalysisAcknowledgement::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::_pbi::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional string request_token = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
auto str = _internal_mutable_request_token();
ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .content_analysis.sdk.ContentAnalysisAcknowledgement.Status status = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
if (PROTOBUF_PREDICT_TRUE(::content_analysis::sdk::ContentAnalysisAcknowledgement_Status_IsValid(val))) {
_internal_set_status(static_cast<::content_analysis::sdk::ContentAnalysisAcknowledgement_Status>(val));
} else {
::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(2, val, mutable_unknown_fields());
}
} else
goto handle_unusual;
continue;
// optional .content_analysis.sdk.ContentAnalysisAcknowledgement.FinalAction final_action = 3;
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
if (PROTOBUF_PREDICT_TRUE(::content_analysis::sdk::ContentAnalysisAcknowledgement_FinalAction_IsValid(val))) {
_internal_set_final_action(static_cast<::content_analysis::sdk::ContentAnalysisAcknowledgement_FinalAction>(val));
} else {
::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(3, val, mutable_unknown_fields());
}
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<std::string>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
_impl_._has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* ContentAnalysisAcknowledgement::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:content_analysis.sdk.ContentAnalysisAcknowledgement)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _impl_._has_bits_[0];
// optional string request_token = 1;
if (cached_has_bits & 0x00000001u) {
target = stream->WriteStringMaybeAliased(
1, this->_internal_request_token(), target);
}
// optional .content_analysis.sdk.ContentAnalysisAcknowledgement.Status status = 2;
if (cached_has_bits & 0x00000004u) {
target = stream->EnsureSpace(target);
target = ::_pbi::WireFormatLite::WriteEnumToArray(
2, this->_internal_status(), target);
}
// optional .content_analysis.sdk.ContentAnalysisAcknowledgement.FinalAction final_action = 3;
if (cached_has_bits & 0x00000002u) {
target = stream->EnsureSpace(target);
target = ::_pbi::WireFormatLite::WriteEnumToArray(
3, this->_internal_final_action(), target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
}
// @@protoc_insertion_point(serialize_to_array_end:content_analysis.sdk.ContentAnalysisAcknowledgement)
return target;
}
size_t ContentAnalysisAcknowledgement::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:content_analysis.sdk.ContentAnalysisAcknowledgement)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x00000007u) {
// optional string request_token = 1;
if (cached_has_bits & 0x00000001u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_request_token());
}
// optional .content_analysis.sdk.ContentAnalysisAcknowledgement.FinalAction final_action = 3;
if (cached_has_bits & 0x00000002u) {
total_size += 1 +
::_pbi::WireFormatLite::EnumSize(this->_internal_final_action());
}
// optional .content_analysis.sdk.ContentAnalysisAcknowledgement.Status status = 2;
if (cached_has_bits & 0x00000004u) {
total_size += 1 +
::_pbi::WireFormatLite::EnumSize(this->_internal_status());
}
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
}
int cached_size = ::_pbi::ToCachedSize(total_size);
SetCachedSize(cached_size);
return total_size;
}
void ContentAnalysisAcknowledgement::CheckTypeAndMergeFrom(
const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
MergeFrom(*::_pbi::DownCast<const ContentAnalysisAcknowledgement*>(
&from));
}
void ContentAnalysisAcknowledgement::MergeFrom(const ContentAnalysisAcknowledgement& from) {
ContentAnalysisAcknowledgement* const _this = this;
// @@protoc_insertion_point(class_specific_merge_from_start:content_analysis.sdk.ContentAnalysisAcknowledgement)
GOOGLE_DCHECK_NE(&from, _this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = from._impl_._has_bits_[0];
if (cached_has_bits & 0x00000007u) {
if (cached_has_bits & 0x00000001u) {
_this->_internal_set_request_token(from._internal_request_token());
}
if (cached_has_bits & 0x00000002u) {
_this->_impl_.final_action_ = from._impl_.final_action_;
}
if (cached_has_bits & 0x00000004u) {
_this->_impl_.status_ = from._impl_.status_;
}
_this->_impl_._has_bits_[0] |= cached_has_bits;
}
_this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}
void ContentAnalysisAcknowledgement::CopyFrom(const ContentAnalysisAcknowledgement& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:content_analysis.sdk.ContentAnalysisAcknowledgement)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool ContentAnalysisAcknowledgement::IsInitialized() const {
return true;
}
void ContentAnalysisAcknowledgement::InternalSwap(ContentAnalysisAcknowledgement* other) {
using std::swap;
auto* lhs_arena = GetArenaForAllocation();
auto* rhs_arena = other->GetArenaForAllocation();
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&_impl_.request_token_, lhs_arena,
&other->_impl_.request_token_, rhs_arena
);
swap(_impl_.final_action_, other->_impl_.final_action_);
swap(_impl_.status_, other->_impl_.status_);
}
std::string ContentAnalysisAcknowledgement::GetTypeName() const {
return "content_analysis.sdk.ContentAnalysisAcknowledgement";
}
// ===================================================================
class ContentAnalysisCancelRequests::_Internal {
public:
using HasBits = decltype(std::declval<ContentAnalysisCancelRequests>()._impl_._has_bits_);
static void set_has_user_action_id(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
};
ContentAnalysisCancelRequests::ContentAnalysisCancelRequests(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
SharedCtor(arena, is_message_owned);
// @@protoc_insertion_point(arena_constructor:content_analysis.sdk.ContentAnalysisCancelRequests)
}
ContentAnalysisCancelRequests::ContentAnalysisCancelRequests(const ContentAnalysisCancelRequests& from)
: ::PROTOBUF_NAMESPACE_ID::MessageLite() {
ContentAnalysisCancelRequests* const _this = this; (void)_this;
new (&_impl_) Impl_{
decltype(_impl_._has_bits_){from._impl_._has_bits_}
, /*decltype(_impl_._cached_size_)*/{}
, decltype(_impl_.user_action_id_){}};
_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
_impl_.user_action_id_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
_impl_.user_action_id_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_user_action_id()) {
_this->_impl_.user_action_id_.Set(from._internal_user_action_id(),
_this->GetArenaForAllocation());
}
// @@protoc_insertion_point(copy_constructor:content_analysis.sdk.ContentAnalysisCancelRequests)
}
inline void ContentAnalysisCancelRequests::SharedCtor(
::_pb::Arena* arena, bool is_message_owned) {
(void)arena;
(void)is_message_owned;
new (&_impl_) Impl_{
decltype(_impl_._has_bits_){}
, /*decltype(_impl_._cached_size_)*/{}
, decltype(_impl_.user_action_id_){}
};
_impl_.user_action_id_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
_impl_.user_action_id_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
ContentAnalysisCancelRequests::~ContentAnalysisCancelRequests() {
// @@protoc_insertion_point(destructor:content_analysis.sdk.ContentAnalysisCancelRequests)
if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
(void)arena;
return;
}
SharedDtor();
}
inline void ContentAnalysisCancelRequests::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
_impl_.user_action_id_.Destroy();
}
void ContentAnalysisCancelRequests::SetCachedSize(int size) const {
_impl_._cached_size_.Set(size);
}
void ContentAnalysisCancelRequests::Clear() {
// @@protoc_insertion_point(message_clear_start:content_analysis.sdk.ContentAnalysisCancelRequests)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x00000001u) {
_impl_.user_action_id_.ClearNonDefaultToEmpty();
}
_impl_._has_bits_.Clear();
_internal_metadata_.Clear<std::string>();
}
const char* ContentAnalysisCancelRequests::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::_pbi::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional string user_action_id = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
auto str = _internal_mutable_user_action_id();
ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
CHK_(ptr);
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<std::string>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
_impl_._has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* ContentAnalysisCancelRequests::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:content_analysis.sdk.ContentAnalysisCancelRequests)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _impl_._has_bits_[0];
// optional string user_action_id = 1;
if (cached_has_bits & 0x00000001u) {
target = stream->WriteStringMaybeAliased(
1, this->_internal_user_action_id(), target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
}
// @@protoc_insertion_point(serialize_to_array_end:content_analysis.sdk.ContentAnalysisCancelRequests)
return target;
}
size_t ContentAnalysisCancelRequests::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:content_analysis.sdk.ContentAnalysisCancelRequests)
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 user_action_id = 1;
cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x00000001u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_user_action_id());
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
}
int cached_size = ::_pbi::ToCachedSize(total_size);
SetCachedSize(cached_size);
return total_size;
}
void ContentAnalysisCancelRequests::CheckTypeAndMergeFrom(
const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
MergeFrom(*::_pbi::DownCast<const ContentAnalysisCancelRequests*>(
&from));
}
void ContentAnalysisCancelRequests::MergeFrom(const ContentAnalysisCancelRequests& from) {
ContentAnalysisCancelRequests* const _this = this;
// @@protoc_insertion_point(class_specific_merge_from_start:content_analysis.sdk.ContentAnalysisCancelRequests)
GOOGLE_DCHECK_NE(&from, _this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
if (from._internal_has_user_action_id()) {
_this->_internal_set_user_action_id(from._internal_user_action_id());
}
_this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}
void ContentAnalysisCancelRequests::CopyFrom(const ContentAnalysisCancelRequests& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:content_analysis.sdk.ContentAnalysisCancelRequests)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool ContentAnalysisCancelRequests::IsInitialized() const {
return true;
}
void ContentAnalysisCancelRequests::InternalSwap(ContentAnalysisCancelRequests* other) {
using std::swap;
auto* lhs_arena = GetArenaForAllocation();
auto* rhs_arena = other->GetArenaForAllocation();
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&_impl_.user_action_id_, lhs_arena,
&other->_impl_.user_action_id_, rhs_arena
);
}
std::string ContentAnalysisCancelRequests::GetTypeName() const {
return "content_analysis.sdk.ContentAnalysisCancelRequests";
}
// ===================================================================
class ChromeToAgent::_Internal {
public:
using HasBits = decltype(std::declval<ChromeToAgent>()._impl_._has_bits_);
static const ::content_analysis::sdk::ContentAnalysisRequest& request(const ChromeToAgent* msg);
static void set_has_request(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
static const ::content_analysis::sdk::ContentAnalysisAcknowledgement& ack(const ChromeToAgent* msg);
static void set_has_ack(HasBits* has_bits) {
(*has_bits)[0] |= 2u;
}
static const ::content_analysis::sdk::ContentAnalysisCancelRequests& cancel(const ChromeToAgent* msg);
static void set_has_cancel(HasBits* has_bits) {
(*has_bits)[0] |= 4u;
}
};
const ::content_analysis::sdk::ContentAnalysisRequest&
ChromeToAgent::_Internal::request(const ChromeToAgent* msg) {
return *msg->_impl_.request_;
}
const ::content_analysis::sdk::ContentAnalysisAcknowledgement&
ChromeToAgent::_Internal::ack(const ChromeToAgent* msg) {
return *msg->_impl_.ack_;
}
const ::content_analysis::sdk::ContentAnalysisCancelRequests&
ChromeToAgent::_Internal::cancel(const ChromeToAgent* msg) {
return *msg->_impl_.cancel_;
}
ChromeToAgent::ChromeToAgent(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
SharedCtor(arena, is_message_owned);
// @@protoc_insertion_point(arena_constructor:content_analysis.sdk.ChromeToAgent)
}
ChromeToAgent::ChromeToAgent(const ChromeToAgent& from)
: ::PROTOBUF_NAMESPACE_ID::MessageLite() {
ChromeToAgent* const _this = this; (void)_this;
new (&_impl_) Impl_{
decltype(_impl_._has_bits_){from._impl_._has_bits_}
, /*decltype(_impl_._cached_size_)*/{}
, decltype(_impl_.request_){nullptr}
, decltype(_impl_.ack_){nullptr}
, decltype(_impl_.cancel_){nullptr}};
_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
if (from._internal_has_request()) {
_this->_impl_.request_ = new ::content_analysis::sdk::ContentAnalysisRequest(*from._impl_.request_);
}
if (from._internal_has_ack()) {
_this->_impl_.ack_ = new ::content_analysis::sdk::ContentAnalysisAcknowledgement(*from._impl_.ack_);
}
if (from._internal_has_cancel()) {
_this->_impl_.cancel_ = new ::content_analysis::sdk::ContentAnalysisCancelRequests(*from._impl_.cancel_);
}
// @@protoc_insertion_point(copy_constructor:content_analysis.sdk.ChromeToAgent)
}
inline void ChromeToAgent::SharedCtor(
::_pb::Arena* arena, bool is_message_owned) {
(void)arena;
(void)is_message_owned;
new (&_impl_) Impl_{
decltype(_impl_._has_bits_){}
, /*decltype(_impl_._cached_size_)*/{}
, decltype(_impl_.request_){nullptr}
, decltype(_impl_.ack_){nullptr}
, decltype(_impl_.cancel_){nullptr}
};
}
ChromeToAgent::~ChromeToAgent() {
// @@protoc_insertion_point(destructor:content_analysis.sdk.ChromeToAgent)
if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
(void)arena;
return;
}
SharedDtor();
}
inline void ChromeToAgent::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
if (this != internal_default_instance()) delete _impl_.request_;
if (this != internal_default_instance()) delete _impl_.ack_;
if (this != internal_default_instance()) delete _impl_.cancel_;
}
void ChromeToAgent::SetCachedSize(int size) const {
_impl_._cached_size_.Set(size);
}
void ChromeToAgent::Clear() {
// @@protoc_insertion_point(message_clear_start:content_analysis.sdk.ChromeToAgent)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x00000007u) {
if (cached_has_bits & 0x00000001u) {
GOOGLE_DCHECK(_impl_.request_ != nullptr);
_impl_.request_->Clear();
}
if (cached_has_bits & 0x00000002u) {
GOOGLE_DCHECK(_impl_.ack_ != nullptr);
_impl_.ack_->Clear();
}
if (cached_has_bits & 0x00000004u) {
GOOGLE_DCHECK(_impl_.cancel_ != nullptr);
_impl_.cancel_->Clear();
}
}
_impl_._has_bits_.Clear();
_internal_metadata_.Clear<std::string>();
}
const char* ChromeToAgent::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::_pbi::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional .content_analysis.sdk.ContentAnalysisRequest request = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
ptr = ctx->ParseMessage(_internal_mutable_request(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .content_analysis.sdk.ContentAnalysisAcknowledgement ack = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
ptr = ctx->ParseMessage(_internal_mutable_ack(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .content_analysis.sdk.ContentAnalysisCancelRequests cancel = 3;
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
ptr = ctx->ParseMessage(_internal_mutable_cancel(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<std::string>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
_impl_._has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* ChromeToAgent::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:content_analysis.sdk.ChromeToAgent)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _impl_._has_bits_[0];
// optional .content_analysis.sdk.ContentAnalysisRequest request = 1;
if (cached_has_bits & 0x00000001u) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(1, _Internal::request(this),
_Internal::request(this).GetCachedSize(), target, stream);
}
// optional .content_analysis.sdk.ContentAnalysisAcknowledgement ack = 2;
if (cached_has_bits & 0x00000002u) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(2, _Internal::ack(this),
_Internal::ack(this).GetCachedSize(), target, stream);
}
// optional .content_analysis.sdk.ContentAnalysisCancelRequests cancel = 3;
if (cached_has_bits & 0x00000004u) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(3, _Internal::cancel(this),
_Internal::cancel(this).GetCachedSize(), target, stream);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
}
// @@protoc_insertion_point(serialize_to_array_end:content_analysis.sdk.ChromeToAgent)
return target;
}
size_t ChromeToAgent::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:content_analysis.sdk.ChromeToAgent)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x00000007u) {
// optional .content_analysis.sdk.ContentAnalysisRequest request = 1;
if (cached_has_bits & 0x00000001u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*_impl_.request_);
}
// optional .content_analysis.sdk.ContentAnalysisAcknowledgement ack = 2;
if (cached_has_bits & 0x00000002u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*_impl_.ack_);
}
// optional .content_analysis.sdk.ContentAnalysisCancelRequests cancel = 3;
if (cached_has_bits & 0x00000004u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*_impl_.cancel_);
}
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
}
int cached_size = ::_pbi::ToCachedSize(total_size);
SetCachedSize(cached_size);
return total_size;
}
void ChromeToAgent::CheckTypeAndMergeFrom(
const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
MergeFrom(*::_pbi::DownCast<const ChromeToAgent*>(
&from));
}
void ChromeToAgent::MergeFrom(const ChromeToAgent& from) {
ChromeToAgent* const _this = this;
// @@protoc_insertion_point(class_specific_merge_from_start:content_analysis.sdk.ChromeToAgent)
GOOGLE_DCHECK_NE(&from, _this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = from._impl_._has_bits_[0];
if (cached_has_bits & 0x00000007u) {
if (cached_has_bits & 0x00000001u) {
_this->_internal_mutable_request()->::content_analysis::sdk::ContentAnalysisRequest::MergeFrom(
from._internal_request());
}
if (cached_has_bits & 0x00000002u) {
_this->_internal_mutable_ack()->::content_analysis::sdk::ContentAnalysisAcknowledgement::MergeFrom(
from._internal_ack());
}
if (cached_has_bits & 0x00000004u) {
_this->_internal_mutable_cancel()->::content_analysis::sdk::ContentAnalysisCancelRequests::MergeFrom(
from._internal_cancel());
}
}
_this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}
void ChromeToAgent::CopyFrom(const ChromeToAgent& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:content_analysis.sdk.ChromeToAgent)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool ChromeToAgent::IsInitialized() const {
if (_internal_has_request()) {
if (!_impl_.request_->IsInitialized()) return false;
}
return true;
}
void ChromeToAgent::InternalSwap(ChromeToAgent* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
::PROTOBUF_NAMESPACE_ID::internal::memswap<
PROTOBUF_FIELD_OFFSET(ChromeToAgent, _impl_.cancel_)
+ sizeof(ChromeToAgent::_impl_.cancel_)
- PROTOBUF_FIELD_OFFSET(ChromeToAgent, _impl_.request_)>(
reinterpret_cast<char*>(&_impl_.request_),
reinterpret_cast<char*>(&other->_impl_.request_));
}
std::string ChromeToAgent::GetTypeName() const {
return "content_analysis.sdk.ChromeToAgent";
}
// ===================================================================
class AgentToChrome::_Internal {
public:
using HasBits = decltype(std::declval<AgentToChrome>()._impl_._has_bits_);
static const ::content_analysis::sdk::ContentAnalysisResponse& response(const AgentToChrome* msg);
static void set_has_response(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
};
const ::content_analysis::sdk::ContentAnalysisResponse&
AgentToChrome::_Internal::response(const AgentToChrome* msg) {
return *msg->_impl_.response_;
}
AgentToChrome::AgentToChrome(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
SharedCtor(arena, is_message_owned);
// @@protoc_insertion_point(arena_constructor:content_analysis.sdk.AgentToChrome)
}
AgentToChrome::AgentToChrome(const AgentToChrome& from)
: ::PROTOBUF_NAMESPACE_ID::MessageLite() {
AgentToChrome* const _this = this; (void)_this;
new (&_impl_) Impl_{
decltype(_impl_._has_bits_){from._impl_._has_bits_}
, /*decltype(_impl_._cached_size_)*/{}
, decltype(_impl_.response_){nullptr}};
_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
if (from._internal_has_response()) {
_this->_impl_.response_ = new ::content_analysis::sdk::ContentAnalysisResponse(*from._impl_.response_);
}
// @@protoc_insertion_point(copy_constructor:content_analysis.sdk.AgentToChrome)
}
inline void AgentToChrome::SharedCtor(
::_pb::Arena* arena, bool is_message_owned) {
(void)arena;
(void)is_message_owned;
new (&_impl_) Impl_{
decltype(_impl_._has_bits_){}
, /*decltype(_impl_._cached_size_)*/{}
, decltype(_impl_.response_){nullptr}
};
}
AgentToChrome::~AgentToChrome() {
// @@protoc_insertion_point(destructor:content_analysis.sdk.AgentToChrome)
if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
(void)arena;
return;
}
SharedDtor();
}
inline void AgentToChrome::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
if (this != internal_default_instance()) delete _impl_.response_;
}
void AgentToChrome::SetCachedSize(int size) const {
_impl_._cached_size_.Set(size);
}
void AgentToChrome::Clear() {
// @@protoc_insertion_point(message_clear_start:content_analysis.sdk.AgentToChrome)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x00000001u) {
GOOGLE_DCHECK(_impl_.response_ != nullptr);
_impl_.response_->Clear();
}
_impl_._has_bits_.Clear();
_internal_metadata_.Clear<std::string>();
}
const char* AgentToChrome::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::_pbi::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional .content_analysis.sdk.ContentAnalysisResponse response = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
ptr = ctx->ParseMessage(_internal_mutable_response(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<std::string>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
_impl_._has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* AgentToChrome::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:content_analysis.sdk.AgentToChrome)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _impl_._has_bits_[0];
// optional .content_analysis.sdk.ContentAnalysisResponse response = 1;
if (cached_has_bits & 0x00000001u) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(1, _Internal::response(this),
_Internal::response(this).GetCachedSize(), target, stream);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
}
// @@protoc_insertion_point(serialize_to_array_end:content_analysis.sdk.AgentToChrome)
return target;
}
size_t AgentToChrome::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:content_analysis.sdk.AgentToChrome)
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 .content_analysis.sdk.ContentAnalysisResponse response = 1;
cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x00000001u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*_impl_.response_);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
}
int cached_size = ::_pbi::ToCachedSize(total_size);
SetCachedSize(cached_size);
return total_size;
}
void AgentToChrome::CheckTypeAndMergeFrom(
const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
MergeFrom(*::_pbi::DownCast<const AgentToChrome*>(
&from));
}
void AgentToChrome::MergeFrom(const AgentToChrome& from) {
AgentToChrome* const _this = this;
// @@protoc_insertion_point(class_specific_merge_from_start:content_analysis.sdk.AgentToChrome)
GOOGLE_DCHECK_NE(&from, _this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
if (from._internal_has_response()) {
_this->_internal_mutable_response()->::content_analysis::sdk::ContentAnalysisResponse::MergeFrom(
from._internal_response());
}
_this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}
void AgentToChrome::CopyFrom(const AgentToChrome& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:content_analysis.sdk.AgentToChrome)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool AgentToChrome::IsInitialized() const {
return true;
}
void AgentToChrome::InternalSwap(AgentToChrome* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
swap(_impl_.response_, other->_impl_.response_);
}
std::string AgentToChrome::GetTypeName() const {
return "content_analysis.sdk.AgentToChrome";
}
// @@protoc_insertion_point(namespace_scope)
} // namespace sdk
} // namespace content_analysis
PROTOBUF_NAMESPACE_OPEN
template<> PROTOBUF_NOINLINE ::content_analysis::sdk::ContentMetaData_PrintMetadata*
Arena::CreateMaybeMessage< ::content_analysis::sdk::ContentMetaData_PrintMetadata >(Arena* arena) {
return Arena::CreateMessageInternal< ::content_analysis::sdk::ContentMetaData_PrintMetadata >(arena);
}
template<> PROTOBUF_NOINLINE ::content_analysis::sdk::ContentMetaData*
Arena::CreateMaybeMessage< ::content_analysis::sdk::ContentMetaData >(Arena* arena) {
return Arena::CreateMessageInternal< ::content_analysis::sdk::ContentMetaData >(arena);
}
template<> PROTOBUF_NOINLINE ::content_analysis::sdk::ClientMetadata_Browser*
Arena::CreateMaybeMessage< ::content_analysis::sdk::ClientMetadata_Browser >(Arena* arena) {
return Arena::CreateMessageInternal< ::content_analysis::sdk::ClientMetadata_Browser >(arena);
}
template<> PROTOBUF_NOINLINE ::content_analysis::sdk::ClientMetadata*
Arena::CreateMaybeMessage< ::content_analysis::sdk::ClientMetadata >(Arena* arena) {
return Arena::CreateMessageInternal< ::content_analysis::sdk::ClientMetadata >(arena);
}
template<> PROTOBUF_NOINLINE ::content_analysis::sdk::ClientDownloadRequest_Resource*
Arena::CreateMaybeMessage< ::content_analysis::sdk::ClientDownloadRequest_Resource >(Arena* arena) {
return Arena::CreateMessageInternal< ::content_analysis::sdk::ClientDownloadRequest_Resource >(arena);
}
template<> PROTOBUF_NOINLINE ::content_analysis::sdk::ClientDownloadRequest*
Arena::CreateMaybeMessage< ::content_analysis::sdk::ClientDownloadRequest >(Arena* arena) {
return Arena::CreateMessageInternal< ::content_analysis::sdk::ClientDownloadRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::content_analysis::sdk::ContentAnalysisRequest_PrintData*
Arena::CreateMaybeMessage< ::content_analysis::sdk::ContentAnalysisRequest_PrintData >(Arena* arena) {
return Arena::CreateMessageInternal< ::content_analysis::sdk::ContentAnalysisRequest_PrintData >(arena);
}
template<> PROTOBUF_NOINLINE ::content_analysis::sdk::ContentAnalysisRequest*
Arena::CreateMaybeMessage< ::content_analysis::sdk::ContentAnalysisRequest >(Arena* arena) {
return Arena::CreateMessageInternal< ::content_analysis::sdk::ContentAnalysisRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::content_analysis::sdk::ContentAnalysisResponse_Result_TriggeredRule*
Arena::CreateMaybeMessage< ::content_analysis::sdk::ContentAnalysisResponse_Result_TriggeredRule >(Arena* arena) {
return Arena::CreateMessageInternal< ::content_analysis::sdk::ContentAnalysisResponse_Result_TriggeredRule >(arena);
}
template<> PROTOBUF_NOINLINE ::content_analysis::sdk::ContentAnalysisResponse_Result*
Arena::CreateMaybeMessage< ::content_analysis::sdk::ContentAnalysisResponse_Result >(Arena* arena) {
return Arena::CreateMessageInternal< ::content_analysis::sdk::ContentAnalysisResponse_Result >(arena);
}
template<> PROTOBUF_NOINLINE ::content_analysis::sdk::ContentAnalysisResponse*
Arena::CreateMaybeMessage< ::content_analysis::sdk::ContentAnalysisResponse >(Arena* arena) {
return Arena::CreateMessageInternal< ::content_analysis::sdk::ContentAnalysisResponse >(arena);
}
template<> PROTOBUF_NOINLINE ::content_analysis::sdk::ContentAnalysisAcknowledgement*
Arena::CreateMaybeMessage< ::content_analysis::sdk::ContentAnalysisAcknowledgement >(Arena* arena) {
return Arena::CreateMessageInternal< ::content_analysis::sdk::ContentAnalysisAcknowledgement >(arena);
}
template<> PROTOBUF_NOINLINE ::content_analysis::sdk::ContentAnalysisCancelRequests*
Arena::CreateMaybeMessage< ::content_analysis::sdk::ContentAnalysisCancelRequests >(Arena* arena) {
return Arena::CreateMessageInternal< ::content_analysis::sdk::ContentAnalysisCancelRequests >(arena);
}
template<> PROTOBUF_NOINLINE ::content_analysis::sdk::ChromeToAgent*
Arena::CreateMaybeMessage< ::content_analysis::sdk::ChromeToAgent >(Arena* arena) {
return Arena::CreateMessageInternal< ::content_analysis::sdk::ChromeToAgent >(arena);
}
template<> PROTOBUF_NOINLINE ::content_analysis::sdk::AgentToChrome*
Arena::CreateMaybeMessage< ::content_analysis::sdk::AgentToChrome >(Arena* arena) {
return Arena::CreateMessageInternal< ::content_analysis::sdk::AgentToChrome >(arena);
}
PROTOBUF_NAMESPACE_CLOSE
// @@protoc_insertion_point(global_scope)
#include <google/protobuf/port_undef.inc>