1优化使用文档

2新增 protobuf 的C# C++ Objective-c Python 生成文件
This commit is contained in:
远方夕阳 2019-08-29 17:14:26 +08:00
parent fa1ef1f9e9
commit 19cff7ef19
43 changed files with 5849 additions and 542 deletions

View File

@ -2,8 +2,6 @@
<project version="4">
<component name="ChangeListManager">
<list default="true" id="bed47126-03b3-4370-a6c1-08503492974f" name="Default Changelist" comment="" />
<ignored path="$PROJECT_DIR$/out/" />
<ignored path="$PROJECT_DIR$/target/" />
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -13,118 +11,6 @@
<component name="DefaultGradleProjectSettings">
<option name="isMigrated" value="true" />
</component>
<component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/main/java/com/farsunset/cim/service/impl/CIMSessionServiceImpl.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="247">
<caret line="40" column="1" selection-start-line="40" selection-start-column="1" selection-end-line="41" selection-end-column="48" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/main/resources/application.properties">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="285">
<caret line="15" selection-start-line="15" selection-end-line="15" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/main/resources/page/console/webclient/index.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-109">
<caret line="46" column="3" selection-start-line="46" selection-start-column="3" selection-end-line="46" selection-end-column="3" />
<folding>
<element signature="n#style#0;n#h6#0;n#!!top" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/src/main/resources/static/js/cim/cim.web.sdk.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="264">
<caret line="57" column="19" lean-forward="true" selection-start-line="57" selection-start-column="4" selection-end-line="57" selection-end-column="19" />
<folding>
<element signature="n#!!doc" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/main/java/com/farsunset/cim/util/ApnsPayloadCompat.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="684">
<caret line="76" column="13" selection-start-line="76" selection-start-column="13" selection-end-line="76" selection-end-column="13" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/main/java/com/farsunset/cim/repository/SessionRepository.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="57">
<caret line="8" selection-start-line="8" selection-end-line="8" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="jar://$MAVEN_REPOSITORY$/cn/teaey/apns4j/apns4j/1.1.4/apns4j-1.1.4.jar!/cn/teaey/apns4j/protocol/ApnsPayload.class">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="114">
<caret line="11" column="39" selection-start-line="11" selection-start-column="39" selection-end-line="11" selection-end-column="39" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="jar://$MAVEN_REPOSITORY$/cn/teaey/apns4j/apns4j/1.1.4/apns4j-1.1.4.jar!/cn/teaey/apns4j/protocol/Payload.class">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="342">
<caret line="31" selection-start-line="31" selection-end-line="31" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/main/java/com/farsunset/cim/handler/SessionClosedHandler.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="684">
<caret line="64" column="32" selection-start-line="64" selection-start-column="32" selection-end-line="64" selection-end-column="32" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/main/java/com/farsunset/cim/handler/BindHandler.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1311">
<caret line="103" column="39" selection-start-line="103" selection-start-column="39" selection-end-line="103" selection-end-column="39" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
</leaf>
</component>
<component name="FileTemplateManagerImpl">
<option name="RECENT_TEMPLATES">
<list>
@ -147,167 +33,7 @@
<dir>C:\Users\Administrator\Documents\cim\cim-boot-server\src\main\resources</dir>
</dirStrings>
</component>
<component name="IdeDocumentHistory">
<option name="CHANGED_PATHS">
<list>
<option value="$PROJECT_DIR$/src/main/resources/static/js/cim/cim.web.sdk.js" />
<option value="$PROJECT_DIR$/src/main/java/com/farsunset/cim/service/impl/ClusterSessionServiceImpl.java" />
<option value="$PROJECT_DIR$/src/main/java/com/farsunset/cim/CIMConfig.java" />
<option value="$PROJECT_DIR$/src/main/java/com/farsunset/cim/config/CIMConfig.java" />
<option value="$PROJECT_DIR$/src/main/java/com/farsunset/cim/service/impl/JavaApnsServiceImpl.java" />
<option value="$PROJECT_DIR$/src/main/java/com/farsunset/cim/api/controller/MessageController.java" />
<option value="$PROJECT_DIR$/src/main/java/com/farsunset/cim/handler/BindHandler.java" />
<option value="$PROJECT_DIR$/src/main/java/com/farsunset/cim/push/DefaultMessagePusher.java" />
<option value="$PROJECT_DIR$/src/main/java/com/farsunset/cim/handler/SessionClosedHandler.java" />
<option value="$PROJECT_DIR$/src/main/java/com/farsunset/cim/service/impl/CIMSessionServiceImpl.java" />
<option value="$PROJECT_DIR$/pom.xml" />
<option value="$PROJECT_DIR$/src/main/java/com/farsunset/cim/util/ApnsPayloadCompat.java" />
<option value="$PROJECT_DIR$/src/main/java/com/farsunset/cim/repository/SessionRepository.java" />
<option value="$PROJECT_DIR$/src/main/resources/application.properties" />
</list>
</option>
</component>
<component name="ProjectId" id="1PxWQToGq56jcmMz176UjXWLSaU" />
<component name="ProjectView">
<navigator proportions="" version="1">
<foldersAlwaysOnTop value="true" />
</navigator>
<panes>
<pane id="PackagesPane" />
<pane id="Scope" />
<pane id="ProjectPane">
<subPane>
<expand>
<path>
<item name="cim-boot-server" type="b2602c69:ProjectViewProjectNode" />
<item name="cim-boot-server" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="cim-boot-server" type="b2602c69:ProjectViewProjectNode" />
<item name="cim-boot-server" type="462c0819:PsiDirectoryNode" />
<item name="lib" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="cim-boot-server" type="b2602c69:ProjectViewProjectNode" />
<item name="cim-boot-server" type="462c0819:PsiDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="cim-boot-server" type="b2602c69:ProjectViewProjectNode" />
<item name="cim-boot-server" type="462c0819:PsiDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
<item name="main" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="cim-boot-server" type="b2602c69:ProjectViewProjectNode" />
<item name="cim-boot-server" type="462c0819:PsiDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
<item name="main" type="462c0819:PsiDirectoryNode" />
<item name="java" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="cim-boot-server" type="b2602c69:ProjectViewProjectNode" />
<item name="cim-boot-server" type="462c0819:PsiDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
<item name="main" type="462c0819:PsiDirectoryNode" />
<item name="java" type="462c0819:PsiDirectoryNode" />
<item name="cim" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="cim-boot-server" type="b2602c69:ProjectViewProjectNode" />
<item name="cim-boot-server" type="462c0819:PsiDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
<item name="main" type="462c0819:PsiDirectoryNode" />
<item name="java" type="462c0819:PsiDirectoryNode" />
<item name="cim" type="462c0819:PsiDirectoryNode" />
<item name="repository" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="cim-boot-server" type="b2602c69:ProjectViewProjectNode" />
<item name="cim-boot-server" type="462c0819:PsiDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
<item name="main" type="462c0819:PsiDirectoryNode" />
<item name="java" type="462c0819:PsiDirectoryNode" />
<item name="cim" type="462c0819:PsiDirectoryNode" />
<item name="service" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="cim-boot-server" type="b2602c69:ProjectViewProjectNode" />
<item name="cim-boot-server" type="462c0819:PsiDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
<item name="main" type="462c0819:PsiDirectoryNode" />
<item name="java" type="462c0819:PsiDirectoryNode" />
<item name="cim" type="462c0819:PsiDirectoryNode" />
<item name="service" type="462c0819:PsiDirectoryNode" />
<item name="impl" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="cim-boot-server" type="b2602c69:ProjectViewProjectNode" />
<item name="cim-boot-server" type="462c0819:PsiDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
<item name="main" type="462c0819:PsiDirectoryNode" />
<item name="resources" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="cim-boot-server" type="b2602c69:ProjectViewProjectNode" />
<item name="cim-boot-server" type="462c0819:PsiDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
<item name="main" type="462c0819:PsiDirectoryNode" />
<item name="resources" type="462c0819:PsiDirectoryNode" />
<item name="page" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="cim-boot-server" type="b2602c69:ProjectViewProjectNode" />
<item name="cim-boot-server" type="462c0819:PsiDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
<item name="main" type="462c0819:PsiDirectoryNode" />
<item name="resources" type="462c0819:PsiDirectoryNode" />
<item name="page" type="462c0819:PsiDirectoryNode" />
<item name="console" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="cim-boot-server" type="b2602c69:ProjectViewProjectNode" />
<item name="cim-boot-server" type="462c0819:PsiDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
<item name="main" type="462c0819:PsiDirectoryNode" />
<item name="resources" type="462c0819:PsiDirectoryNode" />
<item name="page" type="462c0819:PsiDirectoryNode" />
<item name="console" type="462c0819:PsiDirectoryNode" />
<item name="webclient" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="cim-boot-server" type="b2602c69:ProjectViewProjectNode" />
<item name="cim-boot-server" type="462c0819:PsiDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
<item name="main" type="462c0819:PsiDirectoryNode" />
<item name="resources" type="462c0819:PsiDirectoryNode" />
<item name="static" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="cim-boot-server" type="b2602c69:ProjectViewProjectNode" />
<item name="cim-boot-server" type="462c0819:PsiDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
<item name="main" type="462c0819:PsiDirectoryNode" />
<item name="resources" type="462c0819:PsiDirectoryNode" />
<item name="static" type="462c0819:PsiDirectoryNode" />
<item name="js" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="cim-boot-server" type="b2602c69:ProjectViewProjectNode" />
<item name="cim-boot-server" type="462c0819:PsiDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
<item name="main" type="462c0819:PsiDirectoryNode" />
<item name="resources" type="462c0819:PsiDirectoryNode" />
<item name="static" type="462c0819:PsiDirectoryNode" />
<item name="js" type="462c0819:PsiDirectoryNode" />
<item name="cim" type="462c0819:PsiDirectoryNode" />
</path>
</expand>
<select />
</subPane>
</pane>
</panes>
</component>
<component name="PropertiesComponent">
<property name="RequestMappingsPanelOrder0" value="0" />
<property name="RequestMappingsPanelOrder1" value="1" />
@ -317,8 +43,11 @@
<property name="aspect.path.notification.shown" value="true" />
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
<property name="node.js.detected.package.eslint" value="true" />
<property name="node.js.detected.package.tslint" value="true" />
<property name="node.js.path.for.package.eslint" value="project" />
<property name="node.js.path.for.package.tslint" value="project" />
<property name="node.js.selected.package.eslint" value="(autodetect)" />
<property name="node.js.selected.package.tslint" value="(autodetect)" />
<property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
<property name="nodejs_npm_path_reset_for_default_project" value="true" />
<property name="settings.editor.selected.configurable" value="configurable.group.appearance" />
@ -386,49 +115,10 @@
<workItem from="1563179336728" duration="715000" />
<workItem from="1563191907066" duration="17000" />
<workItem from="1563245165817" duration="382000" />
<workItem from="1566816214034" duration="698000" />
</task>
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="11984000" />
</component>
<component name="ToolWindowManager">
<frame x="0" y="23" width="1920" height="1057" extended-state="0" />
<editor active="true" />
<layout>
<window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.27754012" />
<window_info id="Structure" order="1" side_tool="true" weight="0.25" />
<window_info id="Designer" order="2" />
<window_info id="UI Designer" order="3" />
<window_info id="Favorites" order="4" side_tool="true" />
<window_info id="Web" order="5" side_tool="true" />
<window_info anchor="bottom" id="Message" order="0" />
<window_info anchor="bottom" id="Find" order="1" />
<window_info anchor="bottom" id="Run" order="2" weight="0.3315734" />
<window_info anchor="bottom" id="Debug" order="3" weight="0.26821542" />
<window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
<window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
<window_info anchor="bottom" id="TODO" order="6" />
<window_info anchor="bottom" id="FindBugs-IDEA" order="7" />
<window_info anchor="bottom" id="Spring" order="8" />
<window_info anchor="bottom" id="Terminal" order="9" />
<window_info anchor="bottom" id="Docker" order="10" show_stripe_button="false" />
<window_info anchor="bottom" id="Event Log" order="11" side_tool="true" />
<window_info anchor="bottom" id="Messages" order="12" weight="0.32946146" />
<window_info anchor="bottom" id="Java Enterprise" order="13" />
<window_info anchor="bottom" id="Database Changes" order="14" />
<window_info anchor="bottom" id="Version Control" order="15" />
<window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
<window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
<window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
<window_info anchor="right" id="Maven" order="3" />
<window_info anchor="right" id="Palette" order="4" />
<window_info anchor="right" id="Yobatis" order="5" />
<window_info anchor="right" id="Database" order="6" />
<window_info anchor="right" id="Palette&#9;" order="7" />
<window_info anchor="right" id="Bean Validation" order="8" />
</layout>
</component>
<component name="TypeScriptGeneratedFilesManager">
<option name="version" value="1" />
</component>
@ -438,208 +128,11 @@
<line-breakpoint enabled="true" type="java-line">
<url>jar://$PROJECT_DIR$/lib/cim-server-sdk-mina-3.7.0.jar!/com/farsunset/cim/sdk/server/handler/CIMNioSocketAcceptor.class</url>
<line>72</line>
<properties />
<option name="timeStamp" value="5" />
</line-breakpoint>
</breakpoints>
</breakpoint-manager>
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/src/main/java/com/farsunset/cim/ServerLauncher.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="342">
<caret line="49" column="41" selection-start-line="49" selection-start-column="41" selection-end-line="49" selection-end-column="41" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/com/farsunset/cim/api/controller/dto/BaseResult.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="228">
<caret line="34" selection-start-line="34" selection-end-line="34" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/com/farsunset/cim/service/CIMSessionService.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="399">
<caret line="43" selection-start-line="43" selection-end-line="43" />
</state>
</provider>
</entry>
<entry file="jar://$PROJECT_DIR$/lib/cim-server-sdk-netty-3.7.0.jar!/com/farsunset/cim/sdk/server/model/CIMSession.class">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="114">
<caret line="16" column="13" selection-start-line="16" selection-start-column="13" selection-end-line="16" selection-end-column="13" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/com/farsunset/cim/service/impl/MemorySessionServiceImpl.java" />
<entry file="file://$PROJECT_DIR$/src/main/java/com/farsunset/cim/config/CIMConfig.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="133">
<caret line="23" column="49" selection-start-line="23" selection-start-column="31" selection-end-line="23" selection-end-column="49" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/com/farsunset/cim/admin/controller/SessionController.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="342">
<caret line="44" selection-start-line="44" selection-end-line="44" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/com/farsunset/cim/service/impl/JavaApnsServiceImpl.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="264">
<caret line="42" column="13" selection-start-line="42" selection-start-column="13" selection-end-line="42" selection-end-column="13" />
<folding>
<element signature="imports" expanded="true" />
<element signature="e#2009#2041#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/com/farsunset/cim/util/Constants.java" />
<entry file="file://$PROJECT_DIR$/src/main/java/com/farsunset/cim/util/StringUtil.java" />
<entry file="file://$PROJECT_DIR$/src/main/java/com/farsunset/cim/push/SystemMessagePusher.java" />
<entry file="file://$PROJECT_DIR$/src/main/java/com/farsunset/cim/api/controller/MessageController.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="152">
<caret line="28" selection-start-line="28" selection-end-line="28" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/resources/page/console/session/manage.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="122">
<caret line="37" column="36" selection-start-line="37" selection-start-column="36" selection-end-line="37" selection-end-column="36" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/com/farsunset/cim/push/DefaultMessagePusher.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="703">
<caret line="65" column="36" selection-start-line="65" selection-start-column="36" selection-end-line="65" selection-end-column="36" />
</state>
</provider>
</entry>
<entry file="jar://$PROJECT_DIR$/lib/cim-server-sdk-netty-3.7.0.jar!/com/farsunset/cim/sdk/server/handler/CIMNioSocketAcceptor.class">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1018">
<caret line="108" column="37" selection-start-line="108" selection-start-column="37" selection-end-line="108" selection-end-column="37" />
<folding>
<element signature="e#5892#5893#0" expanded="true" />
<element signature="e#5969#5970#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/pom.xml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="798">
<caret line="42" column="33" selection-start-line="42" selection-start-column="33" selection-end-line="42" selection-end-column="33" />
</state>
</provider>
</entry>
<entry file="jar://$PROJECT_DIR$/lib/cim-server-sdk-mina-3.7.0.jar!/com/farsunset/cim/sdk/server/handler/CIMNioSocketAcceptor.class">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1653">
<caret line="122" column="5" selection-start-line="122" selection-start-column="5" selection-end-line="122" selection-end-column="5" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/com/farsunset/cim/service/impl/CIMSessionServiceImpl.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="247">
<caret line="40" column="1" selection-start-line="40" selection-start-column="1" selection-end-line="41" selection-end-column="48" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/resources/application.properties">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="285">
<caret line="15" selection-start-line="15" selection-end-line="15" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/com/farsunset/cim/util/ApnsPayloadCompat.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="684">
<caret line="76" column="13" selection-start-line="76" selection-start-column="13" selection-end-line="76" selection-end-column="13" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/com/farsunset/cim/repository/SessionRepository.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="57">
<caret line="8" selection-start-line="8" selection-end-line="8" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="jar://$MAVEN_REPOSITORY$/cn/teaey/apns4j/apns4j/1.1.4/apns4j-1.1.4.jar!/cn/teaey/apns4j/protocol/ApnsPayload.class">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="114">
<caret line="11" column="39" selection-start-line="11" selection-start-column="39" selection-end-line="11" selection-end-column="39" />
</state>
</provider>
</entry>
<entry file="jar://$MAVEN_REPOSITORY$/cn/teaey/apns4j/apns4j/1.1.4/apns4j-1.1.4.jar!/cn/teaey/apns4j/protocol/Payload.class">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="342">
<caret line="31" selection-start-line="31" selection-end-line="31" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/com/farsunset/cim/handler/SessionClosedHandler.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="684">
<caret line="64" column="32" selection-start-line="64" selection-start-column="32" selection-end-line="64" selection-end-column="32" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/com/farsunset/cim/handler/BindHandler.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1311">
<caret line="103" column="39" selection-start-line="103" selection-start-column="39" selection-end-line="103" selection-end-column="39" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/resources/page/console/webclient/index.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-109">
<caret line="46" column="3" selection-start-line="46" selection-start-column="3" selection-end-line="46" selection-end-column="3" />
<folding>
<element signature="n#style#0;n#h6#0;n#!!top" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/resources/static/js/cim/cim.web.sdk.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="264">
<caret line="57" column="19" lean-forward="true" selection-start-line="57" selection-start-column="4" selection-end-line="57" selection-end-column="19" />
<folding>
<element signature="n#!!doc" expanded="true" />
</folding>
</state>
</provider>
</entry>
</component>
<component name="masterDetails">
<states>
<state key="ProjectJDKs.UI">

View File

@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="lib" path="libs/mina-core-2.0.16.jar"/>
<classpathentry kind="lib" path="libs/slf4j-api-1.7.25.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<attributes>
@ -9,5 +8,6 @@
</attributes>
</classpathentry>
<classpathentry kind="lib" path="libs/protobuf-java-3.9.1.jar"/>
<classpathentry kind="lib" path="libs/mina-core-2.1.3.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View File

@ -51,7 +51,7 @@ public class CIMLoggingFilter extends IoFilterAdapter {
@Override
public void messageSent(NextFilter nextFilter, IoSession session, WriteRequest writeRequest) {
logger.info("SENT" + getSessionInfo(session) + "\n{}", writeRequest.getOriginalRequest().getMessage());
logger.info("SENT" + getSessionInfo(session) + "\n{}", writeRequest.getOriginalMessage());
nextFilter.messageSent(session, writeRequest);
}

View File

@ -52,7 +52,6 @@ public class CIMSession implements Serializable {
public transient static String CHANNEL_IOS = "ios";
public transient static String CHANNEL_ANDROID = "android";
public transient static String CHANNEL_WINDOWS = "windows";
public transient static String CHANNEL_WP = "wp";
public transient static String CHANNEL_BROWSER = "browser";
private transient IoSession session;
@ -63,72 +62,72 @@ public class CIMSession implements Serializable {
private Long id;
/*
* session绑定的账号,主键一个账号同一时间之内在一个设备在线
* session绑定的用户账号
*/
private String account;
/*
* session在本台服务器上的ID
* session在本台服务器上的ID
*/
private String nid;
/*
* 客户端ID (设备号码+应用包名),ios为devicetoken
* 客户端ID (设备号码+应用包名),ios为devicetoken
*/
private String deviceId;
/*
* session绑定的服务器IP
* session绑定的服务器IP
*/
private String host;
/*
* 终端设备类型
* 终端设备类型
*/
private String channel;
/*
* 终端设备型号
* 终端设备型号
*/
private String deviceModel;
/*
* 终端应用版本
* 终端应用版本
*/
private String clientVersion;
/*
* 终端系统版本
* 终端系统版本
*/
private String systemVersion;
/*
* 登录时间
* 登录时间
*/
private Long bindTime;
/*
* 经度
* 经度
*/
private Double longitude;
/*
* 维度
* 维度
*/
private Double latitude;
/*
* 位置
* 位置
*/
private String location;
/*
* apns推送状态
* apns推送状态
*/
private int apns;
/*
* 状态
* 状态
*/
private int state;

View File

@ -63,72 +63,72 @@ public class CIMSession implements Serializable {
private Long id;
/*
* session绑定的账号,主键一个账号同一时间之内在一个设备在线
* session绑定的用户账号
*/
private String account;
/*
* session在本台服务器上的ID
* session在本台服务器上的ID
*/
private String nid;
/*
* 客户端ID (设备号码+应用包名),ios为devicetoken
* 客户端ID (设备号码+应用包名),ios为devicetoken
*/
private String deviceId;
/*
* session绑定的服务器IP
* session绑定的服务器IP
*/
private String host;
/*
* 终端设备类型
* 终端设备类型
*/
private String channel;
/*
* 终端设备型号
* 终端设备型号
*/
private String deviceModel;
/*
* 终端应用版本
* 终端应用版本
*/
private String clientVersion;
/*
* 终端系统版本
* 终端系统版本
*/
private String systemVersion;
/*
* 登录时间
* 登录时间
*/
private Long bindTime;
/*
* 经度
* 经度
*/
private Double longitude;
/*
* 维度
* 维度
*/
private Double latitude;
/*
* 位置
* 位置
*/
private String location;
/*
* apns推送状态
* apns推送状态
*/
private int apns;
/*
* 状态
* 状态
*/
private int state;

Binary file not shown.

Binary file not shown.

Binary file not shown.

395
doc/proto/c#/Message.cs Normal file
View File

@ -0,0 +1,395 @@
// <auto-generated>
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: Message.proto
// </auto-generated>
#pragma warning disable 1591, 0612, 3021
#region Designer generated code
using pb = global::Google.Protobuf;
using pbc = global::Google.Protobuf.Collections;
using pbr = global::Google.Protobuf.Reflection;
using scg = global::System.Collections.Generic;
/// <summary>Holder for reflection information generated from Message.proto</summary>
public static partial class MessageReflection {
#region Descriptor
/// <summary>File descriptor for Message.proto</summary>
public static pbr::FileDescriptor Descriptor {
get { return descriptor; }
}
private static pbr::FileDescriptor descriptor;
static MessageReflection() {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
"Cg1NZXNzYWdlLnByb3RvIpcBCgVNb2RlbBIKCgJpZBgBIAEoAxIOCgZhY3Rp",
"b24YAiABKAkSDwoHY29udGVudBgDIAEoCRIOCgZzZW5kZXIYBCABKAkSEAoI",
"cmVjZWl2ZXIYBSABKAkSDQoFZXh0cmEYBiABKAkSDQoFdGl0bGUYByABKAkS",
"DgoGZm9ybWF0GAggASgJEhEKCXRpbWVzdGFtcBgJIAEoA2IGcHJvdG8z"));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { },
new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
new pbr::GeneratedClrTypeInfo(typeof(global::Model), global::Model.Parser, new[]{ "Id", "Action", "Content", "Sender", "Receiver", "Extra", "Title", "Format", "Timestamp" }, null, null, null, null)
}));
}
#endregion
}
#region Messages
public sealed partial class Model : pb::IMessage<Model> {
private static readonly pb::MessageParser<Model> _parser = new pb::MessageParser<Model>(() => new Model());
private pb::UnknownFieldSet _unknownFields;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pb::MessageParser<Model> Parser { get { return _parser; } }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pbr::MessageDescriptor Descriptor {
get { return global::MessageReflection.Descriptor.MessageTypes[0]; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public Model() {
OnConstruction();
}
partial void OnConstruction();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public Model(Model other) : this() {
id_ = other.id_;
action_ = other.action_;
content_ = other.content_;
sender_ = other.sender_;
receiver_ = other.receiver_;
extra_ = other.extra_;
title_ = other.title_;
format_ = other.format_;
timestamp_ = other.timestamp_;
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public Model Clone() {
return new Model(this);
}
/// <summary>Field number for the "id" field.</summary>
public const int IdFieldNumber = 1;
private long id_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public long Id {
get { return id_; }
set {
id_ = value;
}
}
/// <summary>Field number for the "action" field.</summary>
public const int ActionFieldNumber = 2;
private string action_ = "";
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string Action {
get { return action_; }
set {
action_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
}
}
/// <summary>Field number for the "content" field.</summary>
public const int ContentFieldNumber = 3;
private string content_ = "";
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string Content {
get { return content_; }
set {
content_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
}
}
/// <summary>Field number for the "sender" field.</summary>
public const int SenderFieldNumber = 4;
private string sender_ = "";
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string Sender {
get { return sender_; }
set {
sender_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
}
}
/// <summary>Field number for the "receiver" field.</summary>
public const int ReceiverFieldNumber = 5;
private string receiver_ = "";
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string Receiver {
get { return receiver_; }
set {
receiver_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
}
}
/// <summary>Field number for the "extra" field.</summary>
public const int ExtraFieldNumber = 6;
private string extra_ = "";
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string Extra {
get { return extra_; }
set {
extra_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
}
}
/// <summary>Field number for the "title" field.</summary>
public const int TitleFieldNumber = 7;
private string title_ = "";
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string Title {
get { return title_; }
set {
title_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
}
}
/// <summary>Field number for the "format" field.</summary>
public const int FormatFieldNumber = 8;
private string format_ = "";
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string Format {
get { return format_; }
set {
format_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
}
}
/// <summary>Field number for the "timestamp" field.</summary>
public const int TimestampFieldNumber = 9;
private long timestamp_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public long Timestamp {
get { return timestamp_; }
set {
timestamp_ = value;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override bool Equals(object other) {
return Equals(other as Model);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool Equals(Model other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if (Id != other.Id) return false;
if (Action != other.Action) return false;
if (Content != other.Content) return false;
if (Sender != other.Sender) return false;
if (Receiver != other.Receiver) return false;
if (Extra != other.Extra) return false;
if (Title != other.Title) return false;
if (Format != other.Format) return false;
if (Timestamp != other.Timestamp) return false;
return Equals(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override int GetHashCode() {
int hash = 1;
if (Id != 0L) hash ^= Id.GetHashCode();
if (Action.Length != 0) hash ^= Action.GetHashCode();
if (Content.Length != 0) hash ^= Content.GetHashCode();
if (Sender.Length != 0) hash ^= Sender.GetHashCode();
if (Receiver.Length != 0) hash ^= Receiver.GetHashCode();
if (Extra.Length != 0) hash ^= Extra.GetHashCode();
if (Title.Length != 0) hash ^= Title.GetHashCode();
if (Format.Length != 0) hash ^= Format.GetHashCode();
if (Timestamp != 0L) hash ^= Timestamp.GetHashCode();
if (_unknownFields != null) {
hash ^= _unknownFields.GetHashCode();
}
return hash;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void WriteTo(pb::CodedOutputStream output) {
if (Id != 0L) {
output.WriteRawTag(8);
output.WriteInt64(Id);
}
if (Action.Length != 0) {
output.WriteRawTag(18);
output.WriteString(Action);
}
if (Content.Length != 0) {
output.WriteRawTag(26);
output.WriteString(Content);
}
if (Sender.Length != 0) {
output.WriteRawTag(34);
output.WriteString(Sender);
}
if (Receiver.Length != 0) {
output.WriteRawTag(42);
output.WriteString(Receiver);
}
if (Extra.Length != 0) {
output.WriteRawTag(50);
output.WriteString(Extra);
}
if (Title.Length != 0) {
output.WriteRawTag(58);
output.WriteString(Title);
}
if (Format.Length != 0) {
output.WriteRawTag(66);
output.WriteString(Format);
}
if (Timestamp != 0L) {
output.WriteRawTag(72);
output.WriteInt64(Timestamp);
}
if (_unknownFields != null) {
_unknownFields.WriteTo(output);
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int CalculateSize() {
int size = 0;
if (Id != 0L) {
size += 1 + pb::CodedOutputStream.ComputeInt64Size(Id);
}
if (Action.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(Action);
}
if (Content.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(Content);
}
if (Sender.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(Sender);
}
if (Receiver.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(Receiver);
}
if (Extra.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(Extra);
}
if (Title.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(Title);
}
if (Format.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(Format);
}
if (Timestamp != 0L) {
size += 1 + pb::CodedOutputStream.ComputeInt64Size(Timestamp);
}
if (_unknownFields != null) {
size += _unknownFields.CalculateSize();
}
return size;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(Model other) {
if (other == null) {
return;
}
if (other.Id != 0L) {
Id = other.Id;
}
if (other.Action.Length != 0) {
Action = other.Action;
}
if (other.Content.Length != 0) {
Content = other.Content;
}
if (other.Sender.Length != 0) {
Sender = other.Sender;
}
if (other.Receiver.Length != 0) {
Receiver = other.Receiver;
}
if (other.Extra.Length != 0) {
Extra = other.Extra;
}
if (other.Title.Length != 0) {
Title = other.Title;
}
if (other.Format.Length != 0) {
Format = other.Format;
}
if (other.Timestamp != 0L) {
Timestamp = other.Timestamp;
}
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(pb::CodedInputStream input) {
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
break;
case 8: {
Id = input.ReadInt64();
break;
}
case 18: {
Action = input.ReadString();
break;
}
case 26: {
Content = input.ReadString();
break;
}
case 34: {
Sender = input.ReadString();
break;
}
case 42: {
Receiver = input.ReadString();
break;
}
case 50: {
Extra = input.ReadString();
break;
}
case 58: {
Title = input.ReadString();
break;
}
case 66: {
Format = input.ReadString();
break;
}
case 72: {
Timestamp = input.ReadInt64();
break;
}
}
}
}
}
#endregion
#endregion Designer generated code

View File

@ -0,0 +1,13 @@
syntax = "proto3";
message Model {
int64 id = 1;
string action = 2;
string content = 3;
string sender = 4;
string receiver = 5;
string extra = 6;
string title = 7;
string format = 8;
int64 timestamp = 9;
}

275
doc/proto/c#/ReplyBody.cs Normal file
View File

@ -0,0 +1,275 @@
// <auto-generated>
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: ReplyBody.proto
// </auto-generated>
#pragma warning disable 1591, 0612, 3021
#region Designer generated code
using pb = global::Google.Protobuf;
using pbc = global::Google.Protobuf.Collections;
using pbr = global::Google.Protobuf.Reflection;
using scg = global::System.Collections.Generic;
/// <summary>Holder for reflection information generated from ReplyBody.proto</summary>
public static partial class ReplyBodyReflection {
#region Descriptor
/// <summary>File descriptor for ReplyBody.proto</summary>
public static pbr::FileDescriptor Descriptor {
get { return descriptor; }
}
private static pbr::FileDescriptor descriptor;
static ReplyBodyReflection() {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
"Cg9SZXBseUJvZHkucHJvdG8ikwEKBU1vZGVsEgsKA2tleRgBIAEoCRIMCgRj",
"b2RlGAIgASgJEg8KB21lc3NhZ2UYAyABKAkSEQoJdGltZXN0YW1wGAQgASgD",
"Eh4KBGRhdGEYBSADKAsyEC5Nb2RlbC5EYXRhRW50cnkaKwoJRGF0YUVudHJ5",
"EgsKA2tleRgBIAEoCRINCgV2YWx1ZRgCIAEoCToCOAFiBnByb3RvMw=="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { },
new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
new pbr::GeneratedClrTypeInfo(typeof(global::Model), global::Model.Parser, new[]{ "Key", "Code", "Message", "Timestamp", "Data" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, })
}));
}
#endregion
}
#region Messages
public sealed partial class Model : pb::IMessage<Model> {
private static readonly pb::MessageParser<Model> _parser = new pb::MessageParser<Model>(() => new Model());
private pb::UnknownFieldSet _unknownFields;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pb::MessageParser<Model> Parser { get { return _parser; } }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pbr::MessageDescriptor Descriptor {
get { return global::ReplyBodyReflection.Descriptor.MessageTypes[0]; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public Model() {
OnConstruction();
}
partial void OnConstruction();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public Model(Model other) : this() {
key_ = other.key_;
code_ = other.code_;
message_ = other.message_;
timestamp_ = other.timestamp_;
data_ = other.data_.Clone();
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public Model Clone() {
return new Model(this);
}
/// <summary>Field number for the "key" field.</summary>
public const int KeyFieldNumber = 1;
private string key_ = "";
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string Key {
get { return key_; }
set {
key_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
}
}
/// <summary>Field number for the "code" field.</summary>
public const int CodeFieldNumber = 2;
private string code_ = "";
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string Code {
get { return code_; }
set {
code_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
}
}
/// <summary>Field number for the "message" field.</summary>
public const int MessageFieldNumber = 3;
private string message_ = "";
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string Message {
get { return message_; }
set {
message_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
}
}
/// <summary>Field number for the "timestamp" field.</summary>
public const int TimestampFieldNumber = 4;
private long timestamp_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public long Timestamp {
get { return timestamp_; }
set {
timestamp_ = value;
}
}
/// <summary>Field number for the "data" field.</summary>
public const int DataFieldNumber = 5;
private static readonly pbc::MapField<string, string>.Codec _map_data_codec
= new pbc::MapField<string, string>.Codec(pb::FieldCodec.ForString(10, ""), pb::FieldCodec.ForString(18, ""), 42);
private readonly pbc::MapField<string, string> data_ = new pbc::MapField<string, string>();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::MapField<string, string> Data {
get { return data_; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override bool Equals(object other) {
return Equals(other as Model);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool Equals(Model other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if (Key != other.Key) return false;
if (Code != other.Code) return false;
if (Message != other.Message) return false;
if (Timestamp != other.Timestamp) return false;
if (!Data.Equals(other.Data)) return false;
return Equals(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override int GetHashCode() {
int hash = 1;
if (Key.Length != 0) hash ^= Key.GetHashCode();
if (Code.Length != 0) hash ^= Code.GetHashCode();
if (Message.Length != 0) hash ^= Message.GetHashCode();
if (Timestamp != 0L) hash ^= Timestamp.GetHashCode();
hash ^= Data.GetHashCode();
if (_unknownFields != null) {
hash ^= _unknownFields.GetHashCode();
}
return hash;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void WriteTo(pb::CodedOutputStream output) {
if (Key.Length != 0) {
output.WriteRawTag(10);
output.WriteString(Key);
}
if (Code.Length != 0) {
output.WriteRawTag(18);
output.WriteString(Code);
}
if (Message.Length != 0) {
output.WriteRawTag(26);
output.WriteString(Message);
}
if (Timestamp != 0L) {
output.WriteRawTag(32);
output.WriteInt64(Timestamp);
}
data_.WriteTo(output, _map_data_codec);
if (_unknownFields != null) {
_unknownFields.WriteTo(output);
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int CalculateSize() {
int size = 0;
if (Key.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(Key);
}
if (Code.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(Code);
}
if (Message.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(Message);
}
if (Timestamp != 0L) {
size += 1 + pb::CodedOutputStream.ComputeInt64Size(Timestamp);
}
size += data_.CalculateSize(_map_data_codec);
if (_unknownFields != null) {
size += _unknownFields.CalculateSize();
}
return size;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(Model other) {
if (other == null) {
return;
}
if (other.Key.Length != 0) {
Key = other.Key;
}
if (other.Code.Length != 0) {
Code = other.Code;
}
if (other.Message.Length != 0) {
Message = other.Message;
}
if (other.Timestamp != 0L) {
Timestamp = other.Timestamp;
}
data_.Add(other.data_);
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(pb::CodedInputStream input) {
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
break;
case 10: {
Key = input.ReadString();
break;
}
case 18: {
Code = input.ReadString();
break;
}
case 26: {
Message = input.ReadString();
break;
}
case 32: {
Timestamp = input.ReadInt64();
break;
}
case 42: {
data_.AddEntriesFrom(input, _map_data_codec);
break;
}
}
}
}
}
#endregion
#endregion Designer generated code

View File

@ -0,0 +1,10 @@
syntax = "proto3";
message Model {
string key = 1;
string code = 2;
string message = 3;
int64 timestamp =4;
map<string,string> data =5;
}

219
doc/proto/c#/SentBody.cs Normal file
View File

@ -0,0 +1,219 @@
// <auto-generated>
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: SentBody.proto
// </auto-generated>
#pragma warning disable 1591, 0612, 3021
#region Designer generated code
using pb = global::Google.Protobuf;
using pbc = global::Google.Protobuf.Collections;
using pbr = global::Google.Protobuf.Reflection;
using scg = global::System.Collections.Generic;
/// <summary>Holder for reflection information generated from SentBody.proto</summary>
public static partial class SentBodyReflection {
#region Descriptor
/// <summary>File descriptor for SentBody.proto</summary>
public static pbr::FileDescriptor Descriptor {
get { return descriptor; }
}
private static pbr::FileDescriptor descriptor;
static SentBodyReflection() {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
"Cg5TZW50Qm9keS5wcm90byJ0CgVNb2RlbBILCgNrZXkYASABKAkSEQoJdGlt",
"ZXN0YW1wGAIgASgDEh4KBGRhdGEYAyADKAsyEC5Nb2RlbC5EYXRhRW50cnka",
"KwoJRGF0YUVudHJ5EgsKA2tleRgBIAEoCRINCgV2YWx1ZRgCIAEoCToCOAFi",
"BnByb3RvMw=="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { },
new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
new pbr::GeneratedClrTypeInfo(typeof(global::Model), global::Model.Parser, new[]{ "Key", "Timestamp", "Data" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, })
}));
}
#endregion
}
#region Messages
public sealed partial class Model : pb::IMessage<Model> {
private static readonly pb::MessageParser<Model> _parser = new pb::MessageParser<Model>(() => new Model());
private pb::UnknownFieldSet _unknownFields;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pb::MessageParser<Model> Parser { get { return _parser; } }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pbr::MessageDescriptor Descriptor {
get { return global::SentBodyReflection.Descriptor.MessageTypes[0]; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public Model() {
OnConstruction();
}
partial void OnConstruction();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public Model(Model other) : this() {
key_ = other.key_;
timestamp_ = other.timestamp_;
data_ = other.data_.Clone();
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public Model Clone() {
return new Model(this);
}
/// <summary>Field number for the "key" field.</summary>
public const int KeyFieldNumber = 1;
private string key_ = "";
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string Key {
get { return key_; }
set {
key_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
}
}
/// <summary>Field number for the "timestamp" field.</summary>
public const int TimestampFieldNumber = 2;
private long timestamp_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public long Timestamp {
get { return timestamp_; }
set {
timestamp_ = value;
}
}
/// <summary>Field number for the "data" field.</summary>
public const int DataFieldNumber = 3;
private static readonly pbc::MapField<string, string>.Codec _map_data_codec
= new pbc::MapField<string, string>.Codec(pb::FieldCodec.ForString(10, ""), pb::FieldCodec.ForString(18, ""), 26);
private readonly pbc::MapField<string, string> data_ = new pbc::MapField<string, string>();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::MapField<string, string> Data {
get { return data_; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override bool Equals(object other) {
return Equals(other as Model);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool Equals(Model other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if (Key != other.Key) return false;
if (Timestamp != other.Timestamp) return false;
if (!Data.Equals(other.Data)) return false;
return Equals(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override int GetHashCode() {
int hash = 1;
if (Key.Length != 0) hash ^= Key.GetHashCode();
if (Timestamp != 0L) hash ^= Timestamp.GetHashCode();
hash ^= Data.GetHashCode();
if (_unknownFields != null) {
hash ^= _unknownFields.GetHashCode();
}
return hash;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void WriteTo(pb::CodedOutputStream output) {
if (Key.Length != 0) {
output.WriteRawTag(10);
output.WriteString(Key);
}
if (Timestamp != 0L) {
output.WriteRawTag(16);
output.WriteInt64(Timestamp);
}
data_.WriteTo(output, _map_data_codec);
if (_unknownFields != null) {
_unknownFields.WriteTo(output);
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int CalculateSize() {
int size = 0;
if (Key.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(Key);
}
if (Timestamp != 0L) {
size += 1 + pb::CodedOutputStream.ComputeInt64Size(Timestamp);
}
size += data_.CalculateSize(_map_data_codec);
if (_unknownFields != null) {
size += _unknownFields.CalculateSize();
}
return size;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(Model other) {
if (other == null) {
return;
}
if (other.Key.Length != 0) {
Key = other.Key;
}
if (other.Timestamp != 0L) {
Timestamp = other.Timestamp;
}
data_.Add(other.data_);
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(pb::CodedInputStream input) {
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
break;
case 10: {
Key = input.ReadString();
break;
}
case 16: {
Timestamp = input.ReadInt64();
break;
}
case 26: {
data_.AddEntriesFrom(input, _map_data_codec);
break;
}
}
}
}
}
#endregion
#endregion Designer generated code

View File

@ -0,0 +1,8 @@
syntax = "proto3";
message Model {
string key = 1;
int64 timestamp =2;
map<string,string> data =3;
}

834
doc/proto/c++/Message.pb.cc Normal file
View File

@ -0,0 +1,834 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: Message.proto
#include "Message.pb.h"
#include <algorithm>
#include <google/protobuf/stubs/common.h>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/extension_set.h>
#include <google/protobuf/wire_format_lite.h>
#include <google/protobuf/descriptor.h>
#include <google/protobuf/generated_message_reflection.h>
#include <google/protobuf/reflection_ops.h>
#include <google/protobuf/wire_format.h>
// @@protoc_insertion_point(includes)
#include <google/protobuf/port_def.inc>
class ModelDefaultTypeInternal {
public:
::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<Model> _instance;
} _Model_default_instance_;
static void InitDefaultsscc_info_Model_Message_2eproto() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
{
void* ptr = &::_Model_default_instance_;
new (ptr) ::Model();
::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
}
::Model::InitAsDefaultInstance();
}
::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Model_Message_2eproto =
{{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_Model_Message_2eproto}, {}};
static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_Message_2eproto[1];
static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_Message_2eproto = nullptr;
static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_Message_2eproto = nullptr;
const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_Message_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::Model, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
PROTOBUF_FIELD_OFFSET(::Model, id_),
PROTOBUF_FIELD_OFFSET(::Model, action_),
PROTOBUF_FIELD_OFFSET(::Model, content_),
PROTOBUF_FIELD_OFFSET(::Model, sender_),
PROTOBUF_FIELD_OFFSET(::Model, receiver_),
PROTOBUF_FIELD_OFFSET(::Model, extra_),
PROTOBUF_FIELD_OFFSET(::Model, title_),
PROTOBUF_FIELD_OFFSET(::Model, format_),
PROTOBUF_FIELD_OFFSET(::Model, timestamp_),
};
static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
{ 0, -1, sizeof(::Model)},
};
static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::_Model_default_instance_),
};
const char descriptor_table_protodef_Message_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
"\n\rMessage.proto\"\227\001\n\005Model\022\n\n\002id\030\001 \001(\003\022\016\n"
"\006action\030\002 \001(\t\022\017\n\007content\030\003 \001(\t\022\016\n\006sender"
"\030\004 \001(\t\022\020\n\010receiver\030\005 \001(\t\022\r\n\005extra\030\006 \001(\t\022"
"\r\n\005title\030\007 \001(\t\022\016\n\006format\030\010 \001(\t\022\021\n\ttimest"
"amp\030\t \001(\003b\006proto3"
;
static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_Message_2eproto_deps[1] = {
};
static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_Message_2eproto_sccs[1] = {
&scc_info_Model_Message_2eproto.base,
};
static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_Message_2eproto_once;
static bool descriptor_table_Message_2eproto_initialized = false;
const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_Message_2eproto = {
&descriptor_table_Message_2eproto_initialized, descriptor_table_protodef_Message_2eproto, "Message.proto", 177,
&descriptor_table_Message_2eproto_once, descriptor_table_Message_2eproto_sccs, descriptor_table_Message_2eproto_deps, 1, 0,
schemas, file_default_instances, TableStruct_Message_2eproto::offsets,
file_level_metadata_Message_2eproto, 1, file_level_enum_descriptors_Message_2eproto, file_level_service_descriptors_Message_2eproto,
};
// Force running AddDescriptors() at dynamic initialization time.
static bool dynamic_init_dummy_Message_2eproto = ( ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_Message_2eproto), true);
// ===================================================================
void Model::InitAsDefaultInstance() {
}
class Model::_Internal {
public:
};
Model::Model()
: ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
SharedCtor();
// @@protoc_insertion_point(constructor:Model)
}
Model::Model(const Model& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_internal_metadata_(nullptr) {
_internal_metadata_.MergeFrom(from._internal_metadata_);
action_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
if (!from.action().empty()) {
action_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.action_);
}
content_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
if (!from.content().empty()) {
content_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.content_);
}
sender_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
if (!from.sender().empty()) {
sender_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.sender_);
}
receiver_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
if (!from.receiver().empty()) {
receiver_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.receiver_);
}
extra_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
if (!from.extra().empty()) {
extra_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.extra_);
}
title_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
if (!from.title().empty()) {
title_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.title_);
}
format_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
if (!from.format().empty()) {
format_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.format_);
}
::memcpy(&id_, &from.id_,
static_cast<size_t>(reinterpret_cast<char*>(&timestamp_) -
reinterpret_cast<char*>(&id_)) + sizeof(timestamp_));
// @@protoc_insertion_point(copy_constructor:Model)
}
void Model::SharedCtor() {
::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Model_Message_2eproto.base);
action_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
content_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
sender_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
receiver_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
extra_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
title_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
format_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
::memset(&id_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&timestamp_) -
reinterpret_cast<char*>(&id_)) + sizeof(timestamp_));
}
Model::~Model() {
// @@protoc_insertion_point(destructor:Model)
SharedDtor();
}
void Model::SharedDtor() {
action_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
content_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
sender_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
receiver_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
extra_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
title_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
format_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}
void Model::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
const Model& Model::default_instance() {
::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Model_Message_2eproto.base);
return *internal_default_instance();
}
void Model::Clear() {
// @@protoc_insertion_point(message_clear_start:Model)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
action_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
content_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
sender_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
receiver_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
extra_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
title_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
format_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
::memset(&id_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&timestamp_) -
reinterpret_cast<char*>(&id_)) + sizeof(timestamp_));
_internal_metadata_.Clear();
}
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
const char* Model::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
while (!ctx->Done(&ptr)) {
::PROTOBUF_NAMESPACE_ID::uint32 tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
CHK_(ptr);
switch (tag >> 3) {
// int64 id = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
CHK_(ptr);
} else goto handle_unusual;
continue;
// string action = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_action(), ptr, ctx, "Model.action");
CHK_(ptr);
} else goto handle_unusual;
continue;
// string content = 3;
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_content(), ptr, ctx, "Model.content");
CHK_(ptr);
} else goto handle_unusual;
continue;
// string sender = 4;
case 4:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) {
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_sender(), ptr, ctx, "Model.sender");
CHK_(ptr);
} else goto handle_unusual;
continue;
// string receiver = 5;
case 5:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) {
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_receiver(), ptr, ctx, "Model.receiver");
CHK_(ptr);
} else goto handle_unusual;
continue;
// string extra = 6;
case 6:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 50)) {
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_extra(), ptr, ctx, "Model.extra");
CHK_(ptr);
} else goto handle_unusual;
continue;
// string title = 7;
case 7:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 58)) {
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_title(), ptr, ctx, "Model.title");
CHK_(ptr);
} else goto handle_unusual;
continue;
// string format = 8;
case 8:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 66)) {
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_format(), ptr, ctx, "Model.format");
CHK_(ptr);
} else goto handle_unusual;
continue;
// int64 timestamp = 9;
case 9:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 72)) {
timestamp_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
CHK_(ptr);
} else goto handle_unusual;
continue;
default: {
handle_unusual:
if ((tag & 7) == 4 || tag == 0) {
ctx->SetLastTag(tag);
goto success;
}
ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
CHK_(ptr != nullptr);
continue;
}
} // switch
} // while
success:
return ptr;
failure:
ptr = nullptr;
goto success;
#undef CHK_
}
#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
bool Model::MergePartialFromCodedStream(
::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
::PROTOBUF_NAMESPACE_ID::uint32 tag;
// @@protoc_insertion_point(parse_start:Model)
for (;;) {
::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// int64 id = 1;
case 1: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) {
DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>(
input, &id_)));
} else {
goto handle_unusual;
}
break;
}
// string action = 2;
case 2: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) {
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
input, this->mutable_action()));
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->action().data(), static_cast<int>(this->action().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
"Model.action"));
} else {
goto handle_unusual;
}
break;
}
// string content = 3;
case 3: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) {
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
input, this->mutable_content()));
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->content().data(), static_cast<int>(this->content().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
"Model.content"));
} else {
goto handle_unusual;
}
break;
}
// string sender = 4;
case 4: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (34 & 0xFF)) {
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
input, this->mutable_sender()));
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->sender().data(), static_cast<int>(this->sender().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
"Model.sender"));
} else {
goto handle_unusual;
}
break;
}
// string receiver = 5;
case 5: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (42 & 0xFF)) {
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
input, this->mutable_receiver()));
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->receiver().data(), static_cast<int>(this->receiver().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
"Model.receiver"));
} else {
goto handle_unusual;
}
break;
}
// string extra = 6;
case 6: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (50 & 0xFF)) {
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
input, this->mutable_extra()));
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->extra().data(), static_cast<int>(this->extra().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
"Model.extra"));
} else {
goto handle_unusual;
}
break;
}
// string title = 7;
case 7: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (58 & 0xFF)) {
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
input, this->mutable_title()));
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->title().data(), static_cast<int>(this->title().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
"Model.title"));
} else {
goto handle_unusual;
}
break;
}
// string format = 8;
case 8: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (66 & 0xFF)) {
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
input, this->mutable_format()));
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->format().data(), static_cast<int>(this->format().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
"Model.format"));
} else {
goto handle_unusual;
}
break;
}
// int64 timestamp = 9;
case 9: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (72 & 0xFF)) {
DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>(
input, &timestamp_)));
} else {
goto handle_unusual;
}
break;
}
default: {
handle_unusual:
if (tag == 0) {
goto success;
}
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
input, tag, _internal_metadata_.mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:Model)
return true;
failure:
// @@protoc_insertion_point(parse_failure:Model)
return false;
#undef DO_
}
#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
void Model::SerializeWithCachedSizes(
::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:Model)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// int64 id = 1;
if (this->id() != 0) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(1, this->id(), output);
}
// string action = 2;
if (this->action().size() > 0) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->action().data(), static_cast<int>(this->action().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
"Model.action");
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
2, this->action(), output);
}
// string content = 3;
if (this->content().size() > 0) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->content().data(), static_cast<int>(this->content().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
"Model.content");
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
3, this->content(), output);
}
// string sender = 4;
if (this->sender().size() > 0) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->sender().data(), static_cast<int>(this->sender().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
"Model.sender");
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
4, this->sender(), output);
}
// string receiver = 5;
if (this->receiver().size() > 0) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->receiver().data(), static_cast<int>(this->receiver().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
"Model.receiver");
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
5, this->receiver(), output);
}
// string extra = 6;
if (this->extra().size() > 0) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->extra().data(), static_cast<int>(this->extra().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
"Model.extra");
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
6, this->extra(), output);
}
// string title = 7;
if (this->title().size() > 0) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->title().data(), static_cast<int>(this->title().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
"Model.title");
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
7, this->title(), output);
}
// string format = 8;
if (this->format().size() > 0) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->format().data(), static_cast<int>(this->format().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
"Model.format");
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
8, this->format(), output);
}
// int64 timestamp = 9;
if (this->timestamp() != 0) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(9, this->timestamp(), output);
}
if (_internal_metadata_.have_unknown_fields()) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
_internal_metadata_.unknown_fields(), output);
}
// @@protoc_insertion_point(serialize_end:Model)
}
::PROTOBUF_NAMESPACE_ID::uint8* Model::InternalSerializeWithCachedSizesToArray(
::PROTOBUF_NAMESPACE_ID::uint8* target) const {
// @@protoc_insertion_point(serialize_to_array_start:Model)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// int64 id = 1;
if (this->id() != 0) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(1, this->id(), target);
}
// string action = 2;
if (this->action().size() > 0) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->action().data(), static_cast<int>(this->action().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
"Model.action");
target =
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
2, this->action(), target);
}
// string content = 3;
if (this->content().size() > 0) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->content().data(), static_cast<int>(this->content().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
"Model.content");
target =
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
3, this->content(), target);
}
// string sender = 4;
if (this->sender().size() > 0) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->sender().data(), static_cast<int>(this->sender().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
"Model.sender");
target =
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
4, this->sender(), target);
}
// string receiver = 5;
if (this->receiver().size() > 0) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->receiver().data(), static_cast<int>(this->receiver().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
"Model.receiver");
target =
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
5, this->receiver(), target);
}
// string extra = 6;
if (this->extra().size() > 0) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->extra().data(), static_cast<int>(this->extra().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
"Model.extra");
target =
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
6, this->extra(), target);
}
// string title = 7;
if (this->title().size() > 0) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->title().data(), static_cast<int>(this->title().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
"Model.title");
target =
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
7, this->title(), target);
}
// string format = 8;
if (this->format().size() > 0) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->format().data(), static_cast<int>(this->format().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
"Model.format");
target =
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
8, this->format(), target);
}
// int64 timestamp = 9;
if (this->timestamp() != 0) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(9, this->timestamp(), target);
}
if (_internal_metadata_.have_unknown_fields()) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields(), target);
}
// @@protoc_insertion_point(serialize_to_array_end:Model)
return target;
}
size_t Model::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:Model)
size_t total_size = 0;
if (_internal_metadata_.have_unknown_fields()) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
_internal_metadata_.unknown_fields());
}
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// string action = 2;
if (this->action().size() > 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->action());
}
// string content = 3;
if (this->content().size() > 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->content());
}
// string sender = 4;
if (this->sender().size() > 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->sender());
}
// string receiver = 5;
if (this->receiver().size() > 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->receiver());
}
// string extra = 6;
if (this->extra().size() > 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->extra());
}
// string title = 7;
if (this->title().size() > 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->title());
}
// string format = 8;
if (this->format().size() > 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->format());
}
// int64 id = 1;
if (this->id() != 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size(
this->id());
}
// int64 timestamp = 9;
if (this->timestamp() != 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size(
this->timestamp());
}
int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
SetCachedSize(cached_size);
return total_size;
}
void Model::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:Model)
GOOGLE_DCHECK_NE(&from, this);
const Model* source =
::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<Model>(
&from);
if (source == nullptr) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:Model)
::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:Model)
MergeFrom(*source);
}
}
void Model::MergeFrom(const Model& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:Model)
GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_);
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
(void) cached_has_bits;
if (from.action().size() > 0) {
action_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.action_);
}
if (from.content().size() > 0) {
content_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.content_);
}
if (from.sender().size() > 0) {
sender_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.sender_);
}
if (from.receiver().size() > 0) {
receiver_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.receiver_);
}
if (from.extra().size() > 0) {
extra_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.extra_);
}
if (from.title().size() > 0) {
title_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.title_);
}
if (from.format().size() > 0) {
format_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.format_);
}
if (from.id() != 0) {
set_id(from.id());
}
if (from.timestamp() != 0) {
set_timestamp(from.timestamp());
}
}
void Model::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:Model)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void Model::CopyFrom(const Model& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:Model)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool Model::IsInitialized() const {
return true;
}
void Model::InternalSwap(Model* other) {
using std::swap;
_internal_metadata_.Swap(&other->_internal_metadata_);
action_.Swap(&other->action_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
GetArenaNoVirtual());
content_.Swap(&other->content_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
GetArenaNoVirtual());
sender_.Swap(&other->sender_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
GetArenaNoVirtual());
receiver_.Swap(&other->receiver_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
GetArenaNoVirtual());
extra_.Swap(&other->extra_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
GetArenaNoVirtual());
title_.Swap(&other->title_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
GetArenaNoVirtual());
format_.Swap(&other->format_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
GetArenaNoVirtual());
swap(id_, other->id_);
swap(timestamp_, other->timestamp_);
}
::PROTOBUF_NAMESPACE_ID::Metadata Model::GetMetadata() const {
return GetMetadataStatic();
}
// @@protoc_insertion_point(namespace_scope)
PROTOBUF_NAMESPACE_OPEN
template<> PROTOBUF_NOINLINE ::Model* Arena::CreateMaybeMessage< ::Model >(Arena* arena) {
return Arena::CreateInternal< ::Model >(arena);
}
PROTOBUF_NAMESPACE_CLOSE
// @@protoc_insertion_point(global_scope)
#include <google/protobuf/port_undef.inc>

699
doc/proto/c++/Message.pb.h Normal file
View File

@ -0,0 +1,699 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: Message.proto
#ifndef GOOGLE_PROTOBUF_INCLUDED_Message_2eproto
#define GOOGLE_PROTOBUF_INCLUDED_Message_2eproto
#include <limits>
#include <string>
#include <google/protobuf/port_def.inc>
#if PROTOBUF_VERSION < 3009000
#error This file was generated by a newer version of protoc which is
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
#if 3009001 < PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.
#endif
#include <google/protobuf/port_undef.inc>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/arena.h>
#include <google/protobuf/arenastring.h>
#include <google/protobuf/generated_message_table_driven.h>
#include <google/protobuf/generated_message_util.h>
#include <google/protobuf/inlined_string_field.h>
#include <google/protobuf/metadata.h>
#include <google/protobuf/generated_message_reflection.h>
#include <google/protobuf/message.h>
#include <google/protobuf/repeated_field.h> // IWYU pragma: export
#include <google/protobuf/extension_set.h> // IWYU pragma: export
#include <google/protobuf/unknown_field_set.h>
// @@protoc_insertion_point(includes)
#include <google/protobuf/port_def.inc>
#define PROTOBUF_INTERNAL_EXPORT_Message_2eproto
PROTOBUF_NAMESPACE_OPEN
namespace internal {
class AnyMetadata;
} // namespace internal
PROTOBUF_NAMESPACE_CLOSE
// Internal implementation detail -- do not use these members.
struct TableStruct_Message_2eproto {
static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[]
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
static const ::PROTOBUF_NAMESPACE_ID::internal::AuxillaryParseTableField aux[]
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[1]
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[];
static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[];
static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[];
};
extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_Message_2eproto;
class Model;
class ModelDefaultTypeInternal;
extern ModelDefaultTypeInternal _Model_default_instance_;
PROTOBUF_NAMESPACE_OPEN
template<> ::Model* Arena::CreateMaybeMessage<::Model>(Arena*);
PROTOBUF_NAMESPACE_CLOSE
// ===================================================================
class Model :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Model) */ {
public:
Model();
virtual ~Model();
Model(const Model& from);
Model(Model&& from) noexcept
: Model() {
*this = ::std::move(from);
}
inline Model& operator=(const Model& from) {
CopyFrom(from);
return *this;
}
inline Model& operator=(Model&& from) noexcept {
if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
if (this != &from) InternalSwap(&from);
} else {
CopyFrom(from);
}
return *this;
}
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
return GetDescriptor();
}
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
return GetMetadataStatic().descriptor;
}
static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
return GetMetadataStatic().reflection;
}
static const Model& default_instance();
static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
static inline const Model* internal_default_instance() {
return reinterpret_cast<const Model*>(
&_Model_default_instance_);
}
static constexpr int kIndexInFileMessages =
0;
friend void swap(Model& a, Model& b) {
a.Swap(&b);
}
inline void Swap(Model* other) {
if (other == this) return;
InternalSwap(other);
}
// implements Message ----------------------------------------------
inline Model* New() const final {
return CreateMaybeMessage<Model>(nullptr);
}
Model* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final {
return CreateMaybeMessage<Model>(arena);
}
void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
void CopyFrom(const Model& from);
void MergeFrom(const Model& from);
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
size_t ByteSizeLong() const final;
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
#else
bool MergePartialFromCodedStream(
::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final;
#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
void SerializeWithCachedSizes(
::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final;
::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray(
::PROTOBUF_NAMESPACE_ID::uint8* target) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
inline void SharedCtor();
inline void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(Model* other);
friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
return "Model";
}
private:
inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const {
return nullptr;
}
inline void* MaybeArenaPtr() const {
return nullptr;
}
public:
::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
private:
static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() {
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_Message_2eproto);
return ::descriptor_table_Message_2eproto.file_level_metadata[kIndexInFileMessages];
}
public:
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
enum : int {
kActionFieldNumber = 2,
kContentFieldNumber = 3,
kSenderFieldNumber = 4,
kReceiverFieldNumber = 5,
kExtraFieldNumber = 6,
kTitleFieldNumber = 7,
kFormatFieldNumber = 8,
kIdFieldNumber = 1,
kTimestampFieldNumber = 9,
};
// string action = 2;
void clear_action();
const std::string& action() const;
void set_action(const std::string& value);
void set_action(std::string&& value);
void set_action(const char* value);
void set_action(const char* value, size_t size);
std::string* mutable_action();
std::string* release_action();
void set_allocated_action(std::string* action);
// string content = 3;
void clear_content();
const std::string& content() const;
void set_content(const std::string& value);
void set_content(std::string&& value);
void set_content(const char* value);
void set_content(const char* value, size_t size);
std::string* mutable_content();
std::string* release_content();
void set_allocated_content(std::string* content);
// string sender = 4;
void clear_sender();
const std::string& sender() const;
void set_sender(const std::string& value);
void set_sender(std::string&& value);
void set_sender(const char* value);
void set_sender(const char* value, size_t size);
std::string* mutable_sender();
std::string* release_sender();
void set_allocated_sender(std::string* sender);
// string receiver = 5;
void clear_receiver();
const std::string& receiver() const;
void set_receiver(const std::string& value);
void set_receiver(std::string&& value);
void set_receiver(const char* value);
void set_receiver(const char* value, size_t size);
std::string* mutable_receiver();
std::string* release_receiver();
void set_allocated_receiver(std::string* receiver);
// string extra = 6;
void clear_extra();
const std::string& extra() const;
void set_extra(const std::string& value);
void set_extra(std::string&& value);
void set_extra(const char* value);
void set_extra(const char* value, size_t size);
std::string* mutable_extra();
std::string* release_extra();
void set_allocated_extra(std::string* extra);
// string title = 7;
void clear_title();
const std::string& title() const;
void set_title(const std::string& value);
void set_title(std::string&& value);
void set_title(const char* value);
void set_title(const char* value, size_t size);
std::string* mutable_title();
std::string* release_title();
void set_allocated_title(std::string* title);
// string format = 8;
void clear_format();
const std::string& format() const;
void set_format(const std::string& value);
void set_format(std::string&& value);
void set_format(const char* value);
void set_format(const char* value, size_t size);
std::string* mutable_format();
std::string* release_format();
void set_allocated_format(std::string* format);
// int64 id = 1;
void clear_id();
::PROTOBUF_NAMESPACE_ID::int64 id() const;
void set_id(::PROTOBUF_NAMESPACE_ID::int64 value);
// int64 timestamp = 9;
void clear_timestamp();
::PROTOBUF_NAMESPACE_ID::int64 timestamp() const;
void set_timestamp(::PROTOBUF_NAMESPACE_ID::int64 value);
// @@protoc_insertion_point(class_scope:Model)
private:
class _Internal;
::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_;
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr action_;
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr content_;
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr sender_;
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr receiver_;
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr extra_;
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr title_;
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr format_;
::PROTOBUF_NAMESPACE_ID::int64 id_;
::PROTOBUF_NAMESPACE_ID::int64 timestamp_;
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
friend struct ::TableStruct_Message_2eproto;
};
// ===================================================================
// ===================================================================
#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
#endif // __GNUC__
// Model
// int64 id = 1;
inline void Model::clear_id() {
id_ = PROTOBUF_LONGLONG(0);
}
inline ::PROTOBUF_NAMESPACE_ID::int64 Model::id() const {
// @@protoc_insertion_point(field_get:Model.id)
return id_;
}
inline void Model::set_id(::PROTOBUF_NAMESPACE_ID::int64 value) {
id_ = value;
// @@protoc_insertion_point(field_set:Model.id)
}
// string action = 2;
inline void Model::clear_action() {
action_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}
inline const std::string& Model::action() const {
// @@protoc_insertion_point(field_get:Model.action)
return action_.GetNoArena();
}
inline void Model::set_action(const std::string& value) {
action_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value);
// @@protoc_insertion_point(field_set:Model.action)
}
inline void Model::set_action(std::string&& value) {
action_.SetNoArena(
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
// @@protoc_insertion_point(field_set_rvalue:Model.action)
}
inline void Model::set_action(const char* value) {
GOOGLE_DCHECK(value != nullptr);
action_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
// @@protoc_insertion_point(field_set_char:Model.action)
}
inline void Model::set_action(const char* value, size_t size) {
action_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
::std::string(reinterpret_cast<const char*>(value), size));
// @@protoc_insertion_point(field_set_pointer:Model.action)
}
inline std::string* Model::mutable_action() {
// @@protoc_insertion_point(field_mutable:Model.action)
return action_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}
inline std::string* Model::release_action() {
// @@protoc_insertion_point(field_release:Model.action)
return action_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}
inline void Model::set_allocated_action(std::string* action) {
if (action != nullptr) {
} else {
}
action_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), action);
// @@protoc_insertion_point(field_set_allocated:Model.action)
}
// string content = 3;
inline void Model::clear_content() {
content_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}
inline const std::string& Model::content() const {
// @@protoc_insertion_point(field_get:Model.content)
return content_.GetNoArena();
}
inline void Model::set_content(const std::string& value) {
content_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value);
// @@protoc_insertion_point(field_set:Model.content)
}
inline void Model::set_content(std::string&& value) {
content_.SetNoArena(
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
// @@protoc_insertion_point(field_set_rvalue:Model.content)
}
inline void Model::set_content(const char* value) {
GOOGLE_DCHECK(value != nullptr);
content_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
// @@protoc_insertion_point(field_set_char:Model.content)
}
inline void Model::set_content(const char* value, size_t size) {
content_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
::std::string(reinterpret_cast<const char*>(value), size));
// @@protoc_insertion_point(field_set_pointer:Model.content)
}
inline std::string* Model::mutable_content() {
// @@protoc_insertion_point(field_mutable:Model.content)
return content_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}
inline std::string* Model::release_content() {
// @@protoc_insertion_point(field_release:Model.content)
return content_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}
inline void Model::set_allocated_content(std::string* content) {
if (content != nullptr) {
} else {
}
content_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), content);
// @@protoc_insertion_point(field_set_allocated:Model.content)
}
// string sender = 4;
inline void Model::clear_sender() {
sender_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}
inline const std::string& Model::sender() const {
// @@protoc_insertion_point(field_get:Model.sender)
return sender_.GetNoArena();
}
inline void Model::set_sender(const std::string& value) {
sender_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value);
// @@protoc_insertion_point(field_set:Model.sender)
}
inline void Model::set_sender(std::string&& value) {
sender_.SetNoArena(
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
// @@protoc_insertion_point(field_set_rvalue:Model.sender)
}
inline void Model::set_sender(const char* value) {
GOOGLE_DCHECK(value != nullptr);
sender_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
// @@protoc_insertion_point(field_set_char:Model.sender)
}
inline void Model::set_sender(const char* value, size_t size) {
sender_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
::std::string(reinterpret_cast<const char*>(value), size));
// @@protoc_insertion_point(field_set_pointer:Model.sender)
}
inline std::string* Model::mutable_sender() {
// @@protoc_insertion_point(field_mutable:Model.sender)
return sender_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}
inline std::string* Model::release_sender() {
// @@protoc_insertion_point(field_release:Model.sender)
return sender_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}
inline void Model::set_allocated_sender(std::string* sender) {
if (sender != nullptr) {
} else {
}
sender_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), sender);
// @@protoc_insertion_point(field_set_allocated:Model.sender)
}
// string receiver = 5;
inline void Model::clear_receiver() {
receiver_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}
inline const std::string& Model::receiver() const {
// @@protoc_insertion_point(field_get:Model.receiver)
return receiver_.GetNoArena();
}
inline void Model::set_receiver(const std::string& value) {
receiver_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value);
// @@protoc_insertion_point(field_set:Model.receiver)
}
inline void Model::set_receiver(std::string&& value) {
receiver_.SetNoArena(
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
// @@protoc_insertion_point(field_set_rvalue:Model.receiver)
}
inline void Model::set_receiver(const char* value) {
GOOGLE_DCHECK(value != nullptr);
receiver_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
// @@protoc_insertion_point(field_set_char:Model.receiver)
}
inline void Model::set_receiver(const char* value, size_t size) {
receiver_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
::std::string(reinterpret_cast<const char*>(value), size));
// @@protoc_insertion_point(field_set_pointer:Model.receiver)
}
inline std::string* Model::mutable_receiver() {
// @@protoc_insertion_point(field_mutable:Model.receiver)
return receiver_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}
inline std::string* Model::release_receiver() {
// @@protoc_insertion_point(field_release:Model.receiver)
return receiver_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}
inline void Model::set_allocated_receiver(std::string* receiver) {
if (receiver != nullptr) {
} else {
}
receiver_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), receiver);
// @@protoc_insertion_point(field_set_allocated:Model.receiver)
}
// string extra = 6;
inline void Model::clear_extra() {
extra_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}
inline const std::string& Model::extra() const {
// @@protoc_insertion_point(field_get:Model.extra)
return extra_.GetNoArena();
}
inline void Model::set_extra(const std::string& value) {
extra_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value);
// @@protoc_insertion_point(field_set:Model.extra)
}
inline void Model::set_extra(std::string&& value) {
extra_.SetNoArena(
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
// @@protoc_insertion_point(field_set_rvalue:Model.extra)
}
inline void Model::set_extra(const char* value) {
GOOGLE_DCHECK(value != nullptr);
extra_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
// @@protoc_insertion_point(field_set_char:Model.extra)
}
inline void Model::set_extra(const char* value, size_t size) {
extra_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
::std::string(reinterpret_cast<const char*>(value), size));
// @@protoc_insertion_point(field_set_pointer:Model.extra)
}
inline std::string* Model::mutable_extra() {
// @@protoc_insertion_point(field_mutable:Model.extra)
return extra_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}
inline std::string* Model::release_extra() {
// @@protoc_insertion_point(field_release:Model.extra)
return extra_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}
inline void Model::set_allocated_extra(std::string* extra) {
if (extra != nullptr) {
} else {
}
extra_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), extra);
// @@protoc_insertion_point(field_set_allocated:Model.extra)
}
// string title = 7;
inline void Model::clear_title() {
title_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}
inline const std::string& Model::title() const {
// @@protoc_insertion_point(field_get:Model.title)
return title_.GetNoArena();
}
inline void Model::set_title(const std::string& value) {
title_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value);
// @@protoc_insertion_point(field_set:Model.title)
}
inline void Model::set_title(std::string&& value) {
title_.SetNoArena(
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
// @@protoc_insertion_point(field_set_rvalue:Model.title)
}
inline void Model::set_title(const char* value) {
GOOGLE_DCHECK(value != nullptr);
title_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
// @@protoc_insertion_point(field_set_char:Model.title)
}
inline void Model::set_title(const char* value, size_t size) {
title_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
::std::string(reinterpret_cast<const char*>(value), size));
// @@protoc_insertion_point(field_set_pointer:Model.title)
}
inline std::string* Model::mutable_title() {
// @@protoc_insertion_point(field_mutable:Model.title)
return title_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}
inline std::string* Model::release_title() {
// @@protoc_insertion_point(field_release:Model.title)
return title_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}
inline void Model::set_allocated_title(std::string* title) {
if (title != nullptr) {
} else {
}
title_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), title);
// @@protoc_insertion_point(field_set_allocated:Model.title)
}
// string format = 8;
inline void Model::clear_format() {
format_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}
inline const std::string& Model::format() const {
// @@protoc_insertion_point(field_get:Model.format)
return format_.GetNoArena();
}
inline void Model::set_format(const std::string& value) {
format_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value);
// @@protoc_insertion_point(field_set:Model.format)
}
inline void Model::set_format(std::string&& value) {
format_.SetNoArena(
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
// @@protoc_insertion_point(field_set_rvalue:Model.format)
}
inline void Model::set_format(const char* value) {
GOOGLE_DCHECK(value != nullptr);
format_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
// @@protoc_insertion_point(field_set_char:Model.format)
}
inline void Model::set_format(const char* value, size_t size) {
format_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
::std::string(reinterpret_cast<const char*>(value), size));
// @@protoc_insertion_point(field_set_pointer:Model.format)
}
inline std::string* Model::mutable_format() {
// @@protoc_insertion_point(field_mutable:Model.format)
return format_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}
inline std::string* Model::release_format() {
// @@protoc_insertion_point(field_release:Model.format)
return format_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}
inline void Model::set_allocated_format(std::string* format) {
if (format != nullptr) {
} else {
}
format_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), format);
// @@protoc_insertion_point(field_set_allocated:Model.format)
}
// int64 timestamp = 9;
inline void Model::clear_timestamp() {
timestamp_ = PROTOBUF_LONGLONG(0);
}
inline ::PROTOBUF_NAMESPACE_ID::int64 Model::timestamp() const {
// @@protoc_insertion_point(field_get:Model.timestamp)
return timestamp_;
}
inline void Model::set_timestamp(::PROTOBUF_NAMESPACE_ID::int64 value) {
timestamp_ = value;
// @@protoc_insertion_point(field_set:Model.timestamp)
}
#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif // __GNUC__
// @@protoc_insertion_point(namespace_scope)
// @@protoc_insertion_point(global_scope)
#include <google/protobuf/port_undef.inc>
#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_Message_2eproto

View File

@ -0,0 +1,13 @@
syntax = "proto3";
message Model {
int64 id = 1;
string action = 2;
string content = 3;
string sender = 4;
string receiver = 5;
string extra = 6;
string title = 7;
string format = 8;
int64 timestamp = 9;
}

View File

@ -0,0 +1,723 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: ReplyBody.proto
#include "ReplyBody.pb.h"
#include <algorithm>
#include <google/protobuf/stubs/common.h>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/extension_set.h>
#include <google/protobuf/wire_format_lite.h>
#include <google/protobuf/descriptor.h>
#include <google/protobuf/generated_message_reflection.h>
#include <google/protobuf/reflection_ops.h>
#include <google/protobuf/wire_format.h>
// @@protoc_insertion_point(includes)
#include <google/protobuf/port_def.inc>
extern PROTOBUF_INTERNAL_EXPORT_ReplyBody_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Model_DataEntry_DoNotUse_ReplyBody_2eproto;
class Model_DataEntry_DoNotUseDefaultTypeInternal {
public:
::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<Model_DataEntry_DoNotUse> _instance;
} _Model_DataEntry_DoNotUse_default_instance_;
class ModelDefaultTypeInternal {
public:
::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<Model> _instance;
} _Model_default_instance_;
static void InitDefaultsscc_info_Model_ReplyBody_2eproto() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
{
void* ptr = &::_Model_default_instance_;
new (ptr) ::Model();
::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
}
::Model::InitAsDefaultInstance();
}
::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_Model_ReplyBody_2eproto =
{{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_Model_ReplyBody_2eproto}, {
&scc_info_Model_DataEntry_DoNotUse_ReplyBody_2eproto.base,}};
static void InitDefaultsscc_info_Model_DataEntry_DoNotUse_ReplyBody_2eproto() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
{
void* ptr = &::_Model_DataEntry_DoNotUse_default_instance_;
new (ptr) ::Model_DataEntry_DoNotUse();
}
::Model_DataEntry_DoNotUse::InitAsDefaultInstance();
}
::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Model_DataEntry_DoNotUse_ReplyBody_2eproto =
{{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_Model_DataEntry_DoNotUse_ReplyBody_2eproto}, {}};
static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_ReplyBody_2eproto[2];
static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_ReplyBody_2eproto = nullptr;
static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_ReplyBody_2eproto = nullptr;
const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_ReplyBody_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
PROTOBUF_FIELD_OFFSET(::Model_DataEntry_DoNotUse, _has_bits_),
PROTOBUF_FIELD_OFFSET(::Model_DataEntry_DoNotUse, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
PROTOBUF_FIELD_OFFSET(::Model_DataEntry_DoNotUse, key_),
PROTOBUF_FIELD_OFFSET(::Model_DataEntry_DoNotUse, value_),
0,
1,
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::Model, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
PROTOBUF_FIELD_OFFSET(::Model, key_),
PROTOBUF_FIELD_OFFSET(::Model, code_),
PROTOBUF_FIELD_OFFSET(::Model, message_),
PROTOBUF_FIELD_OFFSET(::Model, timestamp_),
PROTOBUF_FIELD_OFFSET(::Model, data_),
};
static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
{ 0, 7, sizeof(::Model_DataEntry_DoNotUse)},
{ 9, -1, sizeof(::Model)},
};
static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::_Model_DataEntry_DoNotUse_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::_Model_default_instance_),
};
const char descriptor_table_protodef_ReplyBody_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
"\n\017ReplyBody.proto\"\223\001\n\005Model\022\013\n\003key\030\001 \001(\t"
"\022\014\n\004code\030\002 \001(\t\022\017\n\007message\030\003 \001(\t\022\021\n\ttimes"
"tamp\030\004 \001(\003\022\036\n\004data\030\005 \003(\0132\020.Model.DataEnt"
"ry\032+\n\tDataEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 "
"\001(\t:\0028\001b\006proto3"
;
static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_ReplyBody_2eproto_deps[1] = {
};
static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_ReplyBody_2eproto_sccs[2] = {
&scc_info_Model_ReplyBody_2eproto.base,
&scc_info_Model_DataEntry_DoNotUse_ReplyBody_2eproto.base,
};
static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_ReplyBody_2eproto_once;
static bool descriptor_table_ReplyBody_2eproto_initialized = false;
const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_ReplyBody_2eproto = {
&descriptor_table_ReplyBody_2eproto_initialized, descriptor_table_protodef_ReplyBody_2eproto, "ReplyBody.proto", 175,
&descriptor_table_ReplyBody_2eproto_once, descriptor_table_ReplyBody_2eproto_sccs, descriptor_table_ReplyBody_2eproto_deps, 2, 0,
schemas, file_default_instances, TableStruct_ReplyBody_2eproto::offsets,
file_level_metadata_ReplyBody_2eproto, 2, file_level_enum_descriptors_ReplyBody_2eproto, file_level_service_descriptors_ReplyBody_2eproto,
};
// Force running AddDescriptors() at dynamic initialization time.
static bool dynamic_init_dummy_ReplyBody_2eproto = ( ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_ReplyBody_2eproto), true);
// ===================================================================
Model_DataEntry_DoNotUse::Model_DataEntry_DoNotUse() {}
Model_DataEntry_DoNotUse::Model_DataEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena)
: SuperType(arena) {}
void Model_DataEntry_DoNotUse::MergeFrom(const Model_DataEntry_DoNotUse& other) {
MergeFromInternal(other);
}
::PROTOBUF_NAMESPACE_ID::Metadata Model_DataEntry_DoNotUse::GetMetadata() const {
return GetMetadataStatic();
}
void Model_DataEntry_DoNotUse::MergeFrom(
const ::PROTOBUF_NAMESPACE_ID::Message& other) {
::PROTOBUF_NAMESPACE_ID::Message::MergeFrom(other);
}
// ===================================================================
void Model::InitAsDefaultInstance() {
}
class Model::_Internal {
public:
};
Model::Model()
: ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
SharedCtor();
// @@protoc_insertion_point(constructor:Model)
}
Model::Model(const Model& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_internal_metadata_(nullptr) {
_internal_metadata_.MergeFrom(from._internal_metadata_);
data_.MergeFrom(from.data_);
key_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
if (!from.key().empty()) {
key_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.key_);
}
code_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
if (!from.code().empty()) {
code_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.code_);
}
message_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
if (!from.message().empty()) {
message_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.message_);
}
timestamp_ = from.timestamp_;
// @@protoc_insertion_point(copy_constructor:Model)
}
void Model::SharedCtor() {
::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Model_ReplyBody_2eproto.base);
key_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
code_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
message_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
timestamp_ = PROTOBUF_LONGLONG(0);
}
Model::~Model() {
// @@protoc_insertion_point(destructor:Model)
SharedDtor();
}
void Model::SharedDtor() {
key_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
code_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
message_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}
void Model::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
const Model& Model::default_instance() {
::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Model_ReplyBody_2eproto.base);
return *internal_default_instance();
}
void Model::Clear() {
// @@protoc_insertion_point(message_clear_start:Model)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
data_.Clear();
key_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
code_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
message_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
timestamp_ = PROTOBUF_LONGLONG(0);
_internal_metadata_.Clear();
}
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
const char* Model::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
while (!ctx->Done(&ptr)) {
::PROTOBUF_NAMESPACE_ID::uint32 tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
CHK_(ptr);
switch (tag >> 3) {
// string key = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_key(), ptr, ctx, "Model.key");
CHK_(ptr);
} else goto handle_unusual;
continue;
// string code = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_code(), ptr, ctx, "Model.code");
CHK_(ptr);
} else goto handle_unusual;
continue;
// string message = 3;
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_message(), ptr, ctx, "Model.message");
CHK_(ptr);
} else goto handle_unusual;
continue;
// int64 timestamp = 4;
case 4:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) {
timestamp_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
CHK_(ptr);
} else goto handle_unusual;
continue;
// map<string, string> data = 5;
case 5:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) {
ptr -= 1;
do {
ptr += 1;
ptr = ctx->ParseMessage(&data_, ptr);
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 42);
} else goto handle_unusual;
continue;
default: {
handle_unusual:
if ((tag & 7) == 4 || tag == 0) {
ctx->SetLastTag(tag);
goto success;
}
ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
CHK_(ptr != nullptr);
continue;
}
} // switch
} // while
success:
return ptr;
failure:
ptr = nullptr;
goto success;
#undef CHK_
}
#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
bool Model::MergePartialFromCodedStream(
::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
::PROTOBUF_NAMESPACE_ID::uint32 tag;
// @@protoc_insertion_point(parse_start:Model)
for (;;) {
::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// string key = 1;
case 1: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) {
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
input, this->mutable_key()));
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->key().data(), static_cast<int>(this->key().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
"Model.key"));
} else {
goto handle_unusual;
}
break;
}
// string code = 2;
case 2: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) {
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
input, this->mutable_code()));
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->code().data(), static_cast<int>(this->code().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
"Model.code"));
} else {
goto handle_unusual;
}
break;
}
// string message = 3;
case 3: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) {
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
input, this->mutable_message()));
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->message().data(), static_cast<int>(this->message().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
"Model.message"));
} else {
goto handle_unusual;
}
break;
}
// int64 timestamp = 4;
case 4: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (32 & 0xFF)) {
DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>(
input, &timestamp_)));
} else {
goto handle_unusual;
}
break;
}
// map<string, string> data = 5;
case 5: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (42 & 0xFF)) {
Model_DataEntry_DoNotUse::Parser< ::PROTOBUF_NAMESPACE_ID::internal::MapField<
Model_DataEntry_DoNotUse,
std::string, std::string,
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING,
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING,
0 >,
::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string > > parser(&data_);
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessageNoVirtual(
input, &parser));
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
parser.key().data(), static_cast<int>(parser.key().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
"Model.DataEntry.key"));
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
parser.value().data(), static_cast<int>(parser.value().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
"Model.DataEntry.value"));
} else {
goto handle_unusual;
}
break;
}
default: {
handle_unusual:
if (tag == 0) {
goto success;
}
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
input, tag, _internal_metadata_.mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:Model)
return true;
failure:
// @@protoc_insertion_point(parse_failure:Model)
return false;
#undef DO_
}
#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
void Model::SerializeWithCachedSizes(
::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:Model)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// string key = 1;
if (this->key().size() > 0) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->key().data(), static_cast<int>(this->key().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
"Model.key");
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
1, this->key(), output);
}
// string code = 2;
if (this->code().size() > 0) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->code().data(), static_cast<int>(this->code().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
"Model.code");
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
2, this->code(), output);
}
// string message = 3;
if (this->message().size() > 0) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->message().data(), static_cast<int>(this->message().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
"Model.message");
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
3, this->message(), output);
}
// int64 timestamp = 4;
if (this->timestamp() != 0) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(4, this->timestamp(), output);
}
// map<string, string> data = 5;
if (!this->data().empty()) {
typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_pointer
ConstPtr;
typedef ConstPtr SortItem;
typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByDerefFirst<SortItem> Less;
struct Utf8Check {
static void Check(ConstPtr p) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
p->first.data(), static_cast<int>(p->first.length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
"Model.DataEntry.key");
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
p->second.data(), static_cast<int>(p->second.length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
"Model.DataEntry.value");
}
};
if (output->IsSerializationDeterministic() &&
this->data().size() > 1) {
::std::unique_ptr<SortItem[]> items(
new SortItem[this->data().size()]);
typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::size_type size_type;
size_type n = 0;
for (::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_iterator
it = this->data().begin();
it != this->data().end(); ++it, ++n) {
items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
}
::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
for (size_type i = 0; i < n; i++) {
Model_DataEntry_DoNotUse::Funcs::SerializeToCodedStream(5, items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second, output);
Utf8Check::Check(&(*items[static_cast<ptrdiff_t>(i)]));
}
} else {
for (::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_iterator
it = this->data().begin();
it != this->data().end(); ++it) {
Model_DataEntry_DoNotUse::Funcs::SerializeToCodedStream(5, it->first, it->second, output);
Utf8Check::Check(&(*it));
}
}
}
if (_internal_metadata_.have_unknown_fields()) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
_internal_metadata_.unknown_fields(), output);
}
// @@protoc_insertion_point(serialize_end:Model)
}
::PROTOBUF_NAMESPACE_ID::uint8* Model::InternalSerializeWithCachedSizesToArray(
::PROTOBUF_NAMESPACE_ID::uint8* target) const {
// @@protoc_insertion_point(serialize_to_array_start:Model)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// string key = 1;
if (this->key().size() > 0) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->key().data(), static_cast<int>(this->key().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
"Model.key");
target =
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
1, this->key(), target);
}
// string code = 2;
if (this->code().size() > 0) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->code().data(), static_cast<int>(this->code().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
"Model.code");
target =
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
2, this->code(), target);
}
// string message = 3;
if (this->message().size() > 0) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->message().data(), static_cast<int>(this->message().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
"Model.message");
target =
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
3, this->message(), target);
}
// int64 timestamp = 4;
if (this->timestamp() != 0) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(4, this->timestamp(), target);
}
// map<string, string> data = 5;
if (!this->data().empty()) {
typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_pointer
ConstPtr;
typedef ConstPtr SortItem;
typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByDerefFirst<SortItem> Less;
struct Utf8Check {
static void Check(ConstPtr p) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
p->first.data(), static_cast<int>(p->first.length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
"Model.DataEntry.key");
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
p->second.data(), static_cast<int>(p->second.length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
"Model.DataEntry.value");
}
};
if (false &&
this->data().size() > 1) {
::std::unique_ptr<SortItem[]> items(
new SortItem[this->data().size()]);
typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::size_type size_type;
size_type n = 0;
for (::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_iterator
it = this->data().begin();
it != this->data().end(); ++it, ++n) {
items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
}
::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
for (size_type i = 0; i < n; i++) {
target = Model_DataEntry_DoNotUse::Funcs::SerializeToArray(5, items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second, target);
Utf8Check::Check(&(*items[static_cast<ptrdiff_t>(i)]));
}
} else {
for (::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_iterator
it = this->data().begin();
it != this->data().end(); ++it) {
target = Model_DataEntry_DoNotUse::Funcs::SerializeToArray(5, it->first, it->second, target);
Utf8Check::Check(&(*it));
}
}
}
if (_internal_metadata_.have_unknown_fields()) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields(), target);
}
// @@protoc_insertion_point(serialize_to_array_end:Model)
return target;
}
size_t Model::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:Model)
size_t total_size = 0;
if (_internal_metadata_.have_unknown_fields()) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
_internal_metadata_.unknown_fields());
}
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// map<string, string> data = 5;
total_size += 1 *
::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->data_size());
for (::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_iterator
it = this->data().begin();
it != this->data().end(); ++it) {
total_size += Model_DataEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second);
}
// string key = 1;
if (this->key().size() > 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->key());
}
// string code = 2;
if (this->code().size() > 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->code());
}
// string message = 3;
if (this->message().size() > 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->message());
}
// int64 timestamp = 4;
if (this->timestamp() != 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size(
this->timestamp());
}
int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
SetCachedSize(cached_size);
return total_size;
}
void Model::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:Model)
GOOGLE_DCHECK_NE(&from, this);
const Model* source =
::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<Model>(
&from);
if (source == nullptr) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:Model)
::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:Model)
MergeFrom(*source);
}
}
void Model::MergeFrom(const Model& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:Model)
GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_);
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
(void) cached_has_bits;
data_.MergeFrom(from.data_);
if (from.key().size() > 0) {
key_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.key_);
}
if (from.code().size() > 0) {
code_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.code_);
}
if (from.message().size() > 0) {
message_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.message_);
}
if (from.timestamp() != 0) {
set_timestamp(from.timestamp());
}
}
void Model::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:Model)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void Model::CopyFrom(const Model& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:Model)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool Model::IsInitialized() const {
return true;
}
void Model::InternalSwap(Model* other) {
using std::swap;
_internal_metadata_.Swap(&other->_internal_metadata_);
data_.Swap(&other->data_);
key_.Swap(&other->key_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
GetArenaNoVirtual());
code_.Swap(&other->code_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
GetArenaNoVirtual());
message_.Swap(&other->message_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
GetArenaNoVirtual());
swap(timestamp_, other->timestamp_);
}
::PROTOBUF_NAMESPACE_ID::Metadata Model::GetMetadata() const {
return GetMetadataStatic();
}
// @@protoc_insertion_point(namespace_scope)
PROTOBUF_NAMESPACE_OPEN
template<> PROTOBUF_NOINLINE ::Model_DataEntry_DoNotUse* Arena::CreateMaybeMessage< ::Model_DataEntry_DoNotUse >(Arena* arena) {
return Arena::CreateInternal< ::Model_DataEntry_DoNotUse >(arena);
}
template<> PROTOBUF_NOINLINE ::Model* Arena::CreateMaybeMessage< ::Model >(Arena* arena) {
return Arena::CreateInternal< ::Model >(arena);
}
PROTOBUF_NAMESPACE_CLOSE
// @@protoc_insertion_point(global_scope)
#include <google/protobuf/port_undef.inc>

View File

@ -0,0 +1,501 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: ReplyBody.proto
#ifndef GOOGLE_PROTOBUF_INCLUDED_ReplyBody_2eproto
#define GOOGLE_PROTOBUF_INCLUDED_ReplyBody_2eproto
#include <limits>
#include <string>
#include <google/protobuf/port_def.inc>
#if PROTOBUF_VERSION < 3009000
#error This file was generated by a newer version of protoc which is
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
#if 3009001 < PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.
#endif
#include <google/protobuf/port_undef.inc>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/arena.h>
#include <google/protobuf/arenastring.h>
#include <google/protobuf/generated_message_table_driven.h>
#include <google/protobuf/generated_message_util.h>
#include <google/protobuf/inlined_string_field.h>
#include <google/protobuf/metadata.h>
#include <google/protobuf/generated_message_reflection.h>
#include <google/protobuf/message.h>
#include <google/protobuf/repeated_field.h> // IWYU pragma: export
#include <google/protobuf/extension_set.h> // IWYU pragma: export
#include <google/protobuf/map.h> // IWYU pragma: export
#include <google/protobuf/map_entry.h>
#include <google/protobuf/map_field_inl.h>
#include <google/protobuf/unknown_field_set.h>
// @@protoc_insertion_point(includes)
#include <google/protobuf/port_def.inc>
#define PROTOBUF_INTERNAL_EXPORT_ReplyBody_2eproto
PROTOBUF_NAMESPACE_OPEN
namespace internal {
class AnyMetadata;
} // namespace internal
PROTOBUF_NAMESPACE_CLOSE
// Internal implementation detail -- do not use these members.
struct TableStruct_ReplyBody_2eproto {
static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[]
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
static const ::PROTOBUF_NAMESPACE_ID::internal::AuxillaryParseTableField aux[]
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[2]
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[];
static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[];
static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[];
};
extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_ReplyBody_2eproto;
class Model;
class ModelDefaultTypeInternal;
extern ModelDefaultTypeInternal _Model_default_instance_;
class Model_DataEntry_DoNotUse;
class Model_DataEntry_DoNotUseDefaultTypeInternal;
extern Model_DataEntry_DoNotUseDefaultTypeInternal _Model_DataEntry_DoNotUse_default_instance_;
PROTOBUF_NAMESPACE_OPEN
template<> ::Model* Arena::CreateMaybeMessage<::Model>(Arena*);
template<> ::Model_DataEntry_DoNotUse* Arena::CreateMaybeMessage<::Model_DataEntry_DoNotUse>(Arena*);
PROTOBUF_NAMESPACE_CLOSE
// ===================================================================
class Model_DataEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry<Model_DataEntry_DoNotUse,
std::string, std::string,
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING,
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING,
0 > {
public:
typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry<Model_DataEntry_DoNotUse,
std::string, std::string,
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING,
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING,
0 > SuperType;
Model_DataEntry_DoNotUse();
Model_DataEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena);
void MergeFrom(const Model_DataEntry_DoNotUse& other);
static const Model_DataEntry_DoNotUse* internal_default_instance() { return reinterpret_cast<const Model_DataEntry_DoNotUse*>(&_Model_DataEntry_DoNotUse_default_instance_); }
static bool ValidateKey(std::string* s) {
return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), s->size(), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "Model.DataEntry.key");
}
static bool ValidateValue(std::string* s) {
return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), s->size(), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "Model.DataEntry.value");
}
void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& other) final;
::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
private:
static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() {
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_ReplyBody_2eproto);
return ::descriptor_table_ReplyBody_2eproto.file_level_metadata[0];
}
public:
};
// -------------------------------------------------------------------
class Model :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Model) */ {
public:
Model();
virtual ~Model();
Model(const Model& from);
Model(Model&& from) noexcept
: Model() {
*this = ::std::move(from);
}
inline Model& operator=(const Model& from) {
CopyFrom(from);
return *this;
}
inline Model& operator=(Model&& from) noexcept {
if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
if (this != &from) InternalSwap(&from);
} else {
CopyFrom(from);
}
return *this;
}
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
return GetDescriptor();
}
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
return GetMetadataStatic().descriptor;
}
static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
return GetMetadataStatic().reflection;
}
static const Model& default_instance();
static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
static inline const Model* internal_default_instance() {
return reinterpret_cast<const Model*>(
&_Model_default_instance_);
}
static constexpr int kIndexInFileMessages =
1;
friend void swap(Model& a, Model& b) {
a.Swap(&b);
}
inline void Swap(Model* other) {
if (other == this) return;
InternalSwap(other);
}
// implements Message ----------------------------------------------
inline Model* New() const final {
return CreateMaybeMessage<Model>(nullptr);
}
Model* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final {
return CreateMaybeMessage<Model>(arena);
}
void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
void CopyFrom(const Model& from);
void MergeFrom(const Model& from);
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
size_t ByteSizeLong() const final;
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
#else
bool MergePartialFromCodedStream(
::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final;
#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
void SerializeWithCachedSizes(
::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final;
::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray(
::PROTOBUF_NAMESPACE_ID::uint8* target) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
inline void SharedCtor();
inline void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(Model* other);
friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
return "Model";
}
private:
inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const {
return nullptr;
}
inline void* MaybeArenaPtr() const {
return nullptr;
}
public:
::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
private:
static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() {
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_ReplyBody_2eproto);
return ::descriptor_table_ReplyBody_2eproto.file_level_metadata[kIndexInFileMessages];
}
public:
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
enum : int {
kDataFieldNumber = 5,
kKeyFieldNumber = 1,
kCodeFieldNumber = 2,
kMessageFieldNumber = 3,
kTimestampFieldNumber = 4,
};
// map<string, string> data = 5;
int data_size() const;
void clear_data();
const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >&
data() const;
::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >*
mutable_data();
// string key = 1;
void clear_key();
const std::string& key() const;
void set_key(const std::string& value);
void set_key(std::string&& value);
void set_key(const char* value);
void set_key(const char* value, size_t size);
std::string* mutable_key();
std::string* release_key();
void set_allocated_key(std::string* key);
// string code = 2;
void clear_code();
const std::string& code() const;
void set_code(const std::string& value);
void set_code(std::string&& value);
void set_code(const char* value);
void set_code(const char* value, size_t size);
std::string* mutable_code();
std::string* release_code();
void set_allocated_code(std::string* code);
// string message = 3;
void clear_message();
const std::string& message() const;
void set_message(const std::string& value);
void set_message(std::string&& value);
void set_message(const char* value);
void set_message(const char* value, size_t size);
std::string* mutable_message();
std::string* release_message();
void set_allocated_message(std::string* message);
// int64 timestamp = 4;
void clear_timestamp();
::PROTOBUF_NAMESPACE_ID::int64 timestamp() const;
void set_timestamp(::PROTOBUF_NAMESPACE_ID::int64 value);
// @@protoc_insertion_point(class_scope:Model)
private:
class _Internal;
::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_;
::PROTOBUF_NAMESPACE_ID::internal::MapField<
Model_DataEntry_DoNotUse,
std::string, std::string,
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING,
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING,
0 > data_;
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr key_;
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr code_;
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr message_;
::PROTOBUF_NAMESPACE_ID::int64 timestamp_;
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
friend struct ::TableStruct_ReplyBody_2eproto;
};
// ===================================================================
// ===================================================================
#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
#endif // __GNUC__
// -------------------------------------------------------------------
// Model
// string key = 1;
inline void Model::clear_key() {
key_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}
inline const std::string& Model::key() const {
// @@protoc_insertion_point(field_get:Model.key)
return key_.GetNoArena();
}
inline void Model::set_key(const std::string& value) {
key_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value);
// @@protoc_insertion_point(field_set:Model.key)
}
inline void Model::set_key(std::string&& value) {
key_.SetNoArena(
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
// @@protoc_insertion_point(field_set_rvalue:Model.key)
}
inline void Model::set_key(const char* value) {
GOOGLE_DCHECK(value != nullptr);
key_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
// @@protoc_insertion_point(field_set_char:Model.key)
}
inline void Model::set_key(const char* value, size_t size) {
key_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
::std::string(reinterpret_cast<const char*>(value), size));
// @@protoc_insertion_point(field_set_pointer:Model.key)
}
inline std::string* Model::mutable_key() {
// @@protoc_insertion_point(field_mutable:Model.key)
return key_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}
inline std::string* Model::release_key() {
// @@protoc_insertion_point(field_release:Model.key)
return key_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}
inline void Model::set_allocated_key(std::string* key) {
if (key != nullptr) {
} else {
}
key_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), key);
// @@protoc_insertion_point(field_set_allocated:Model.key)
}
// string code = 2;
inline void Model::clear_code() {
code_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}
inline const std::string& Model::code() const {
// @@protoc_insertion_point(field_get:Model.code)
return code_.GetNoArena();
}
inline void Model::set_code(const std::string& value) {
code_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value);
// @@protoc_insertion_point(field_set:Model.code)
}
inline void Model::set_code(std::string&& value) {
code_.SetNoArena(
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
// @@protoc_insertion_point(field_set_rvalue:Model.code)
}
inline void Model::set_code(const char* value) {
GOOGLE_DCHECK(value != nullptr);
code_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
// @@protoc_insertion_point(field_set_char:Model.code)
}
inline void Model::set_code(const char* value, size_t size) {
code_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
::std::string(reinterpret_cast<const char*>(value), size));
// @@protoc_insertion_point(field_set_pointer:Model.code)
}
inline std::string* Model::mutable_code() {
// @@protoc_insertion_point(field_mutable:Model.code)
return code_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}
inline std::string* Model::release_code() {
// @@protoc_insertion_point(field_release:Model.code)
return code_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}
inline void Model::set_allocated_code(std::string* code) {
if (code != nullptr) {
} else {
}
code_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), code);
// @@protoc_insertion_point(field_set_allocated:Model.code)
}
// string message = 3;
inline void Model::clear_message() {
message_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}
inline const std::string& Model::message() const {
// @@protoc_insertion_point(field_get:Model.message)
return message_.GetNoArena();
}
inline void Model::set_message(const std::string& value) {
message_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value);
// @@protoc_insertion_point(field_set:Model.message)
}
inline void Model::set_message(std::string&& value) {
message_.SetNoArena(
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
// @@protoc_insertion_point(field_set_rvalue:Model.message)
}
inline void Model::set_message(const char* value) {
GOOGLE_DCHECK(value != nullptr);
message_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
// @@protoc_insertion_point(field_set_char:Model.message)
}
inline void Model::set_message(const char* value, size_t size) {
message_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
::std::string(reinterpret_cast<const char*>(value), size));
// @@protoc_insertion_point(field_set_pointer:Model.message)
}
inline std::string* Model::mutable_message() {
// @@protoc_insertion_point(field_mutable:Model.message)
return message_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}
inline std::string* Model::release_message() {
// @@protoc_insertion_point(field_release:Model.message)
return message_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}
inline void Model::set_allocated_message(std::string* message) {
if (message != nullptr) {
} else {
}
message_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), message);
// @@protoc_insertion_point(field_set_allocated:Model.message)
}
// int64 timestamp = 4;
inline void Model::clear_timestamp() {
timestamp_ = PROTOBUF_LONGLONG(0);
}
inline ::PROTOBUF_NAMESPACE_ID::int64 Model::timestamp() const {
// @@protoc_insertion_point(field_get:Model.timestamp)
return timestamp_;
}
inline void Model::set_timestamp(::PROTOBUF_NAMESPACE_ID::int64 value) {
timestamp_ = value;
// @@protoc_insertion_point(field_set:Model.timestamp)
}
// map<string, string> data = 5;
inline int Model::data_size() const {
return data_.size();
}
inline void Model::clear_data() {
data_.Clear();
}
inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >&
Model::data() const {
// @@protoc_insertion_point(field_map:Model.data)
return data_.GetMap();
}
inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >*
Model::mutable_data() {
// @@protoc_insertion_point(field_mutable_map:Model.data)
return data_.MutableMap();
}
#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif // __GNUC__
// -------------------------------------------------------------------
// @@protoc_insertion_point(namespace_scope)
// @@protoc_insertion_point(global_scope)
#include <google/protobuf/port_undef.inc>
#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_ReplyBody_2eproto

View File

@ -0,0 +1,10 @@
syntax = "proto3";
message Model {
string key = 1;
string code = 2;
string message = 3;
int64 timestamp =4;
map<string,string> data =5;
}

View File

@ -0,0 +1,594 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: SentBody.proto
#include "SentBody.pb.h"
#include <algorithm>
#include <google/protobuf/stubs/common.h>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/extension_set.h>
#include <google/protobuf/wire_format_lite.h>
#include <google/protobuf/descriptor.h>
#include <google/protobuf/generated_message_reflection.h>
#include <google/protobuf/reflection_ops.h>
#include <google/protobuf/wire_format.h>
// @@protoc_insertion_point(includes)
#include <google/protobuf/port_def.inc>
extern PROTOBUF_INTERNAL_EXPORT_SentBody_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Model_DataEntry_DoNotUse_SentBody_2eproto;
class Model_DataEntry_DoNotUseDefaultTypeInternal {
public:
::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<Model_DataEntry_DoNotUse> _instance;
} _Model_DataEntry_DoNotUse_default_instance_;
class ModelDefaultTypeInternal {
public:
::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<Model> _instance;
} _Model_default_instance_;
static void InitDefaultsscc_info_Model_SentBody_2eproto() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
{
void* ptr = &::_Model_default_instance_;
new (ptr) ::Model();
::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
}
::Model::InitAsDefaultInstance();
}
::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_Model_SentBody_2eproto =
{{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_Model_SentBody_2eproto}, {
&scc_info_Model_DataEntry_DoNotUse_SentBody_2eproto.base,}};
static void InitDefaultsscc_info_Model_DataEntry_DoNotUse_SentBody_2eproto() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
{
void* ptr = &::_Model_DataEntry_DoNotUse_default_instance_;
new (ptr) ::Model_DataEntry_DoNotUse();
}
::Model_DataEntry_DoNotUse::InitAsDefaultInstance();
}
::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Model_DataEntry_DoNotUse_SentBody_2eproto =
{{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_Model_DataEntry_DoNotUse_SentBody_2eproto}, {}};
static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_SentBody_2eproto[2];
static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_SentBody_2eproto = nullptr;
static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_SentBody_2eproto = nullptr;
const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_SentBody_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
PROTOBUF_FIELD_OFFSET(::Model_DataEntry_DoNotUse, _has_bits_),
PROTOBUF_FIELD_OFFSET(::Model_DataEntry_DoNotUse, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
PROTOBUF_FIELD_OFFSET(::Model_DataEntry_DoNotUse, key_),
PROTOBUF_FIELD_OFFSET(::Model_DataEntry_DoNotUse, value_),
0,
1,
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::Model, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
PROTOBUF_FIELD_OFFSET(::Model, key_),
PROTOBUF_FIELD_OFFSET(::Model, timestamp_),
PROTOBUF_FIELD_OFFSET(::Model, data_),
};
static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
{ 0, 7, sizeof(::Model_DataEntry_DoNotUse)},
{ 9, -1, sizeof(::Model)},
};
static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::_Model_DataEntry_DoNotUse_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::_Model_default_instance_),
};
const char descriptor_table_protodef_SentBody_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
"\n\016SentBody.proto\"t\n\005Model\022\013\n\003key\030\001 \001(\t\022\021"
"\n\ttimestamp\030\002 \001(\003\022\036\n\004data\030\003 \003(\0132\020.Model."
"DataEntry\032+\n\tDataEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005v"
"alue\030\002 \001(\t:\0028\001b\006proto3"
;
static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_SentBody_2eproto_deps[1] = {
};
static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_SentBody_2eproto_sccs[2] = {
&scc_info_Model_SentBody_2eproto.base,
&scc_info_Model_DataEntry_DoNotUse_SentBody_2eproto.base,
};
static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_SentBody_2eproto_once;
static bool descriptor_table_SentBody_2eproto_initialized = false;
const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_SentBody_2eproto = {
&descriptor_table_SentBody_2eproto_initialized, descriptor_table_protodef_SentBody_2eproto, "SentBody.proto", 142,
&descriptor_table_SentBody_2eproto_once, descriptor_table_SentBody_2eproto_sccs, descriptor_table_SentBody_2eproto_deps, 2, 0,
schemas, file_default_instances, TableStruct_SentBody_2eproto::offsets,
file_level_metadata_SentBody_2eproto, 2, file_level_enum_descriptors_SentBody_2eproto, file_level_service_descriptors_SentBody_2eproto,
};
// Force running AddDescriptors() at dynamic initialization time.
static bool dynamic_init_dummy_SentBody_2eproto = ( ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_SentBody_2eproto), true);
// ===================================================================
Model_DataEntry_DoNotUse::Model_DataEntry_DoNotUse() {}
Model_DataEntry_DoNotUse::Model_DataEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena)
: SuperType(arena) {}
void Model_DataEntry_DoNotUse::MergeFrom(const Model_DataEntry_DoNotUse& other) {
MergeFromInternal(other);
}
::PROTOBUF_NAMESPACE_ID::Metadata Model_DataEntry_DoNotUse::GetMetadata() const {
return GetMetadataStatic();
}
void Model_DataEntry_DoNotUse::MergeFrom(
const ::PROTOBUF_NAMESPACE_ID::Message& other) {
::PROTOBUF_NAMESPACE_ID::Message::MergeFrom(other);
}
// ===================================================================
void Model::InitAsDefaultInstance() {
}
class Model::_Internal {
public:
};
Model::Model()
: ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
SharedCtor();
// @@protoc_insertion_point(constructor:Model)
}
Model::Model(const Model& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_internal_metadata_(nullptr) {
_internal_metadata_.MergeFrom(from._internal_metadata_);
data_.MergeFrom(from.data_);
key_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
if (!from.key().empty()) {
key_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.key_);
}
timestamp_ = from.timestamp_;
// @@protoc_insertion_point(copy_constructor:Model)
}
void Model::SharedCtor() {
::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Model_SentBody_2eproto.base);
key_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
timestamp_ = PROTOBUF_LONGLONG(0);
}
Model::~Model() {
// @@protoc_insertion_point(destructor:Model)
SharedDtor();
}
void Model::SharedDtor() {
key_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}
void Model::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
const Model& Model::default_instance() {
::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Model_SentBody_2eproto.base);
return *internal_default_instance();
}
void Model::Clear() {
// @@protoc_insertion_point(message_clear_start:Model)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
data_.Clear();
key_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
timestamp_ = PROTOBUF_LONGLONG(0);
_internal_metadata_.Clear();
}
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
const char* Model::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
while (!ctx->Done(&ptr)) {
::PROTOBUF_NAMESPACE_ID::uint32 tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
CHK_(ptr);
switch (tag >> 3) {
// string key = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_key(), ptr, ctx, "Model.key");
CHK_(ptr);
} else goto handle_unusual;
continue;
// int64 timestamp = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) {
timestamp_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
CHK_(ptr);
} else goto handle_unusual;
continue;
// map<string, string> data = 3;
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
ptr -= 1;
do {
ptr += 1;
ptr = ctx->ParseMessage(&data_, ptr);
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 26);
} else goto handle_unusual;
continue;
default: {
handle_unusual:
if ((tag & 7) == 4 || tag == 0) {
ctx->SetLastTag(tag);
goto success;
}
ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
CHK_(ptr != nullptr);
continue;
}
} // switch
} // while
success:
return ptr;
failure:
ptr = nullptr;
goto success;
#undef CHK_
}
#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
bool Model::MergePartialFromCodedStream(
::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
::PROTOBUF_NAMESPACE_ID::uint32 tag;
// @@protoc_insertion_point(parse_start:Model)
for (;;) {
::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// string key = 1;
case 1: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) {
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
input, this->mutable_key()));
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->key().data(), static_cast<int>(this->key().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
"Model.key"));
} else {
goto handle_unusual;
}
break;
}
// int64 timestamp = 2;
case 2: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (16 & 0xFF)) {
DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>(
input, &timestamp_)));
} else {
goto handle_unusual;
}
break;
}
// map<string, string> data = 3;
case 3: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) {
Model_DataEntry_DoNotUse::Parser< ::PROTOBUF_NAMESPACE_ID::internal::MapField<
Model_DataEntry_DoNotUse,
std::string, std::string,
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING,
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING,
0 >,
::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string > > parser(&data_);
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessageNoVirtual(
input, &parser));
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
parser.key().data(), static_cast<int>(parser.key().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
"Model.DataEntry.key"));
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
parser.value().data(), static_cast<int>(parser.value().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
"Model.DataEntry.value"));
} else {
goto handle_unusual;
}
break;
}
default: {
handle_unusual:
if (tag == 0) {
goto success;
}
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
input, tag, _internal_metadata_.mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:Model)
return true;
failure:
// @@protoc_insertion_point(parse_failure:Model)
return false;
#undef DO_
}
#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
void Model::SerializeWithCachedSizes(
::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:Model)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// string key = 1;
if (this->key().size() > 0) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->key().data(), static_cast<int>(this->key().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
"Model.key");
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
1, this->key(), output);
}
// int64 timestamp = 2;
if (this->timestamp() != 0) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(2, this->timestamp(), output);
}
// map<string, string> data = 3;
if (!this->data().empty()) {
typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_pointer
ConstPtr;
typedef ConstPtr SortItem;
typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByDerefFirst<SortItem> Less;
struct Utf8Check {
static void Check(ConstPtr p) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
p->first.data(), static_cast<int>(p->first.length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
"Model.DataEntry.key");
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
p->second.data(), static_cast<int>(p->second.length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
"Model.DataEntry.value");
}
};
if (output->IsSerializationDeterministic() &&
this->data().size() > 1) {
::std::unique_ptr<SortItem[]> items(
new SortItem[this->data().size()]);
typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::size_type size_type;
size_type n = 0;
for (::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_iterator
it = this->data().begin();
it != this->data().end(); ++it, ++n) {
items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
}
::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
for (size_type i = 0; i < n; i++) {
Model_DataEntry_DoNotUse::Funcs::SerializeToCodedStream(3, items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second, output);
Utf8Check::Check(&(*items[static_cast<ptrdiff_t>(i)]));
}
} else {
for (::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_iterator
it = this->data().begin();
it != this->data().end(); ++it) {
Model_DataEntry_DoNotUse::Funcs::SerializeToCodedStream(3, it->first, it->second, output);
Utf8Check::Check(&(*it));
}
}
}
if (_internal_metadata_.have_unknown_fields()) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
_internal_metadata_.unknown_fields(), output);
}
// @@protoc_insertion_point(serialize_end:Model)
}
::PROTOBUF_NAMESPACE_ID::uint8* Model::InternalSerializeWithCachedSizesToArray(
::PROTOBUF_NAMESPACE_ID::uint8* target) const {
// @@protoc_insertion_point(serialize_to_array_start:Model)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// string key = 1;
if (this->key().size() > 0) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->key().data(), static_cast<int>(this->key().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
"Model.key");
target =
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
1, this->key(), target);
}
// int64 timestamp = 2;
if (this->timestamp() != 0) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(2, this->timestamp(), target);
}
// map<string, string> data = 3;
if (!this->data().empty()) {
typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_pointer
ConstPtr;
typedef ConstPtr SortItem;
typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByDerefFirst<SortItem> Less;
struct Utf8Check {
static void Check(ConstPtr p) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
p->first.data(), static_cast<int>(p->first.length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
"Model.DataEntry.key");
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
p->second.data(), static_cast<int>(p->second.length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
"Model.DataEntry.value");
}
};
if (false &&
this->data().size() > 1) {
::std::unique_ptr<SortItem[]> items(
new SortItem[this->data().size()]);
typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::size_type size_type;
size_type n = 0;
for (::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_iterator
it = this->data().begin();
it != this->data().end(); ++it, ++n) {
items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
}
::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
for (size_type i = 0; i < n; i++) {
target = Model_DataEntry_DoNotUse::Funcs::SerializeToArray(3, items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second, target);
Utf8Check::Check(&(*items[static_cast<ptrdiff_t>(i)]));
}
} else {
for (::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_iterator
it = this->data().begin();
it != this->data().end(); ++it) {
target = Model_DataEntry_DoNotUse::Funcs::SerializeToArray(3, it->first, it->second, target);
Utf8Check::Check(&(*it));
}
}
}
if (_internal_metadata_.have_unknown_fields()) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields(), target);
}
// @@protoc_insertion_point(serialize_to_array_end:Model)
return target;
}
size_t Model::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:Model)
size_t total_size = 0;
if (_internal_metadata_.have_unknown_fields()) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
_internal_metadata_.unknown_fields());
}
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// map<string, string> data = 3;
total_size += 1 *
::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->data_size());
for (::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_iterator
it = this->data().begin();
it != this->data().end(); ++it) {
total_size += Model_DataEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second);
}
// string key = 1;
if (this->key().size() > 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->key());
}
// int64 timestamp = 2;
if (this->timestamp() != 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size(
this->timestamp());
}
int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
SetCachedSize(cached_size);
return total_size;
}
void Model::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:Model)
GOOGLE_DCHECK_NE(&from, this);
const Model* source =
::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<Model>(
&from);
if (source == nullptr) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:Model)
::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:Model)
MergeFrom(*source);
}
}
void Model::MergeFrom(const Model& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:Model)
GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_);
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
(void) cached_has_bits;
data_.MergeFrom(from.data_);
if (from.key().size() > 0) {
key_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.key_);
}
if (from.timestamp() != 0) {
set_timestamp(from.timestamp());
}
}
void Model::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:Model)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void Model::CopyFrom(const Model& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:Model)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool Model::IsInitialized() const {
return true;
}
void Model::InternalSwap(Model* other) {
using std::swap;
_internal_metadata_.Swap(&other->_internal_metadata_);
data_.Swap(&other->data_);
key_.Swap(&other->key_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
GetArenaNoVirtual());
swap(timestamp_, other->timestamp_);
}
::PROTOBUF_NAMESPACE_ID::Metadata Model::GetMetadata() const {
return GetMetadataStatic();
}
// @@protoc_insertion_point(namespace_scope)
PROTOBUF_NAMESPACE_OPEN
template<> PROTOBUF_NOINLINE ::Model_DataEntry_DoNotUse* Arena::CreateMaybeMessage< ::Model_DataEntry_DoNotUse >(Arena* arena) {
return Arena::CreateInternal< ::Model_DataEntry_DoNotUse >(arena);
}
template<> PROTOBUF_NOINLINE ::Model* Arena::CreateMaybeMessage< ::Model >(Arena* arena) {
return Arena::CreateInternal< ::Model >(arena);
}
PROTOBUF_NAMESPACE_CLOSE
// @@protoc_insertion_point(global_scope)
#include <google/protobuf/port_undef.inc>

373
doc/proto/c++/SentBody.pb.h Normal file
View File

@ -0,0 +1,373 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: SentBody.proto
#ifndef GOOGLE_PROTOBUF_INCLUDED_SentBody_2eproto
#define GOOGLE_PROTOBUF_INCLUDED_SentBody_2eproto
#include <limits>
#include <string>
#include <google/protobuf/port_def.inc>
#if PROTOBUF_VERSION < 3009000
#error This file was generated by a newer version of protoc which is
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
#if 3009001 < PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.
#endif
#include <google/protobuf/port_undef.inc>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/arena.h>
#include <google/protobuf/arenastring.h>
#include <google/protobuf/generated_message_table_driven.h>
#include <google/protobuf/generated_message_util.h>
#include <google/protobuf/inlined_string_field.h>
#include <google/protobuf/metadata.h>
#include <google/protobuf/generated_message_reflection.h>
#include <google/protobuf/message.h>
#include <google/protobuf/repeated_field.h> // IWYU pragma: export
#include <google/protobuf/extension_set.h> // IWYU pragma: export
#include <google/protobuf/map.h> // IWYU pragma: export
#include <google/protobuf/map_entry.h>
#include <google/protobuf/map_field_inl.h>
#include <google/protobuf/unknown_field_set.h>
// @@protoc_insertion_point(includes)
#include <google/protobuf/port_def.inc>
#define PROTOBUF_INTERNAL_EXPORT_SentBody_2eproto
PROTOBUF_NAMESPACE_OPEN
namespace internal {
class AnyMetadata;
} // namespace internal
PROTOBUF_NAMESPACE_CLOSE
// Internal implementation detail -- do not use these members.
struct TableStruct_SentBody_2eproto {
static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[]
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
static const ::PROTOBUF_NAMESPACE_ID::internal::AuxillaryParseTableField aux[]
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[2]
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[];
static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[];
static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[];
};
extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_SentBody_2eproto;
class Model;
class ModelDefaultTypeInternal;
extern ModelDefaultTypeInternal _Model_default_instance_;
class Model_DataEntry_DoNotUse;
class Model_DataEntry_DoNotUseDefaultTypeInternal;
extern Model_DataEntry_DoNotUseDefaultTypeInternal _Model_DataEntry_DoNotUse_default_instance_;
PROTOBUF_NAMESPACE_OPEN
template<> ::Model* Arena::CreateMaybeMessage<::Model>(Arena*);
template<> ::Model_DataEntry_DoNotUse* Arena::CreateMaybeMessage<::Model_DataEntry_DoNotUse>(Arena*);
PROTOBUF_NAMESPACE_CLOSE
// ===================================================================
class Model_DataEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry<Model_DataEntry_DoNotUse,
std::string, std::string,
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING,
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING,
0 > {
public:
typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry<Model_DataEntry_DoNotUse,
std::string, std::string,
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING,
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING,
0 > SuperType;
Model_DataEntry_DoNotUse();
Model_DataEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena);
void MergeFrom(const Model_DataEntry_DoNotUse& other);
static const Model_DataEntry_DoNotUse* internal_default_instance() { return reinterpret_cast<const Model_DataEntry_DoNotUse*>(&_Model_DataEntry_DoNotUse_default_instance_); }
static bool ValidateKey(std::string* s) {
return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), s->size(), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "Model.DataEntry.key");
}
static bool ValidateValue(std::string* s) {
return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), s->size(), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "Model.DataEntry.value");
}
void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& other) final;
::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
private:
static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() {
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_SentBody_2eproto);
return ::descriptor_table_SentBody_2eproto.file_level_metadata[0];
}
public:
};
// -------------------------------------------------------------------
class Model :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Model) */ {
public:
Model();
virtual ~Model();
Model(const Model& from);
Model(Model&& from) noexcept
: Model() {
*this = ::std::move(from);
}
inline Model& operator=(const Model& from) {
CopyFrom(from);
return *this;
}
inline Model& operator=(Model&& from) noexcept {
if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
if (this != &from) InternalSwap(&from);
} else {
CopyFrom(from);
}
return *this;
}
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
return GetDescriptor();
}
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
return GetMetadataStatic().descriptor;
}
static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
return GetMetadataStatic().reflection;
}
static const Model& default_instance();
static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
static inline const Model* internal_default_instance() {
return reinterpret_cast<const Model*>(
&_Model_default_instance_);
}
static constexpr int kIndexInFileMessages =
1;
friend void swap(Model& a, Model& b) {
a.Swap(&b);
}
inline void Swap(Model* other) {
if (other == this) return;
InternalSwap(other);
}
// implements Message ----------------------------------------------
inline Model* New() const final {
return CreateMaybeMessage<Model>(nullptr);
}
Model* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final {
return CreateMaybeMessage<Model>(arena);
}
void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
void CopyFrom(const Model& from);
void MergeFrom(const Model& from);
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
size_t ByteSizeLong() const final;
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
#else
bool MergePartialFromCodedStream(
::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final;
#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
void SerializeWithCachedSizes(
::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final;
::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray(
::PROTOBUF_NAMESPACE_ID::uint8* target) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
inline void SharedCtor();
inline void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(Model* other);
friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
return "Model";
}
private:
inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const {
return nullptr;
}
inline void* MaybeArenaPtr() const {
return nullptr;
}
public:
::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
private:
static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() {
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_SentBody_2eproto);
return ::descriptor_table_SentBody_2eproto.file_level_metadata[kIndexInFileMessages];
}
public:
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
enum : int {
kDataFieldNumber = 3,
kKeyFieldNumber = 1,
kTimestampFieldNumber = 2,
};
// map<string, string> data = 3;
int data_size() const;
void clear_data();
const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >&
data() const;
::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >*
mutable_data();
// string key = 1;
void clear_key();
const std::string& key() const;
void set_key(const std::string& value);
void set_key(std::string&& value);
void set_key(const char* value);
void set_key(const char* value, size_t size);
std::string* mutable_key();
std::string* release_key();
void set_allocated_key(std::string* key);
// int64 timestamp = 2;
void clear_timestamp();
::PROTOBUF_NAMESPACE_ID::int64 timestamp() const;
void set_timestamp(::PROTOBUF_NAMESPACE_ID::int64 value);
// @@protoc_insertion_point(class_scope:Model)
private:
class _Internal;
::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_;
::PROTOBUF_NAMESPACE_ID::internal::MapField<
Model_DataEntry_DoNotUse,
std::string, std::string,
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING,
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING,
0 > data_;
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr key_;
::PROTOBUF_NAMESPACE_ID::int64 timestamp_;
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
friend struct ::TableStruct_SentBody_2eproto;
};
// ===================================================================
// ===================================================================
#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
#endif // __GNUC__
// -------------------------------------------------------------------
// Model
// string key = 1;
inline void Model::clear_key() {
key_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}
inline const std::string& Model::key() const {
// @@protoc_insertion_point(field_get:Model.key)
return key_.GetNoArena();
}
inline void Model::set_key(const std::string& value) {
key_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value);
// @@protoc_insertion_point(field_set:Model.key)
}
inline void Model::set_key(std::string&& value) {
key_.SetNoArena(
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
// @@protoc_insertion_point(field_set_rvalue:Model.key)
}
inline void Model::set_key(const char* value) {
GOOGLE_DCHECK(value != nullptr);
key_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
// @@protoc_insertion_point(field_set_char:Model.key)
}
inline void Model::set_key(const char* value, size_t size) {
key_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
::std::string(reinterpret_cast<const char*>(value), size));
// @@protoc_insertion_point(field_set_pointer:Model.key)
}
inline std::string* Model::mutable_key() {
// @@protoc_insertion_point(field_mutable:Model.key)
return key_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}
inline std::string* Model::release_key() {
// @@protoc_insertion_point(field_release:Model.key)
return key_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}
inline void Model::set_allocated_key(std::string* key) {
if (key != nullptr) {
} else {
}
key_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), key);
// @@protoc_insertion_point(field_set_allocated:Model.key)
}
// int64 timestamp = 2;
inline void Model::clear_timestamp() {
timestamp_ = PROTOBUF_LONGLONG(0);
}
inline ::PROTOBUF_NAMESPACE_ID::int64 Model::timestamp() const {
// @@protoc_insertion_point(field_get:Model.timestamp)
return timestamp_;
}
inline void Model::set_timestamp(::PROTOBUF_NAMESPACE_ID::int64 value) {
timestamp_ = value;
// @@protoc_insertion_point(field_set:Model.timestamp)
}
// map<string, string> data = 3;
inline int Model::data_size() const {
return data_.size();
}
inline void Model::clear_data() {
data_.Clear();
}
inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >&
Model::data() const {
// @@protoc_insertion_point(field_map:Model.data)
return data_.GetMap();
}
inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >*
Model::mutable_data() {
// @@protoc_insertion_point(field_mutable_map:Model.data)
return data_.MutableMap();
}
#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif // __GNUC__
// -------------------------------------------------------------------
// @@protoc_insertion_point(namespace_scope)
// @@protoc_insertion_point(global_scope)
#include <google/protobuf/port_undef.inc>
#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_SentBody_2eproto

View File

@ -0,0 +1,8 @@
syntax = "proto3";
message Model {
string key = 1;
int64 timestamp =2;
map<string,string> data =3;
}

View File

@ -0,0 +1,89 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: Message.proto
// This CPP symbol can be defined to use imports that match up to the framework
// imports needed when using CocoaPods.
#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS)
#define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0
#endif
#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
#import <Protobuf/GPBProtocolBuffers.h>
#else
#import "GPBProtocolBuffers.h"
#endif
#if GOOGLE_PROTOBUF_OBJC_VERSION < 30002
#error This file was generated by a newer version of protoc which is incompatible with your Protocol Buffer library sources.
#endif
#if 30002 < GOOGLE_PROTOBUF_OBJC_MIN_SUPPORTED_VERSION
#error This file was generated by an older version of protoc which is incompatible with your Protocol Buffer library sources.
#endif
// @@protoc_insertion_point(imports)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
CF_EXTERN_C_BEGIN
NS_ASSUME_NONNULL_BEGIN
#pragma mark - MessageRoot
/**
* Exposes the extension registry for this file.
*
* The base class provides:
* @code
* + (GPBExtensionRegistry *)extensionRegistry;
* @endcode
* which is a @c GPBExtensionRegistry that includes all the extensions defined by
* this file and all files that it depends on.
**/
@interface MessageRoot : GPBRootObject
@end
#pragma mark - Model
typedef GPB_ENUM(Model_FieldNumber) {
Model_FieldNumber_Id_p = 1,
Model_FieldNumber_Action = 2,
Model_FieldNumber_Content = 3,
Model_FieldNumber_Sender = 4,
Model_FieldNumber_Receiver = 5,
Model_FieldNumber_Extra = 6,
Model_FieldNumber_Title = 7,
Model_FieldNumber_Format = 8,
Model_FieldNumber_Timestamp = 9,
};
@interface Model : GPBMessage
@property(nonatomic, readwrite) int64_t id_p;
@property(nonatomic, readwrite, copy, null_resettable) NSString *action;
@property(nonatomic, readwrite, copy, null_resettable) NSString *content;
@property(nonatomic, readwrite, copy, null_resettable) NSString *sender;
@property(nonatomic, readwrite, copy, null_resettable) NSString *receiver;
@property(nonatomic, readwrite, copy, null_resettable) NSString *extra;
@property(nonatomic, readwrite, copy, null_resettable) NSString *title;
@property(nonatomic, readwrite, copy, null_resettable) NSString *format;
@property(nonatomic, readwrite) int64_t timestamp;
@end
NS_ASSUME_NONNULL_END
CF_EXTERN_C_END
#pragma clang diagnostic pop
// @@protoc_insertion_point(global_scope)

View File

@ -0,0 +1,181 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: Message.proto
// This CPP symbol can be defined to use imports that match up to the framework
// imports needed when using CocoaPods.
#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS)
#define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0
#endif
#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
#import <Protobuf/GPBProtocolBuffers_RuntimeSupport.h>
#else
#import "GPBProtocolBuffers_RuntimeSupport.h"
#endif
#import "Message.pbobjc.h"
// @@protoc_insertion_point(imports)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
#pragma mark - MessageRoot
@implementation MessageRoot
// No extensions in the file and no imports, so no need to generate
// +extensionRegistry.
@end
#pragma mark - MessageRoot_FileDescriptor
static GPBFileDescriptor *MessageRoot_FileDescriptor(void) {
// This is called by +initialize so there is no need to worry
// about thread safety of the singleton.
static GPBFileDescriptor *descriptor = NULL;
if (!descriptor) {
GPB_DEBUG_CHECK_RUNTIME_VERSIONS();
descriptor = [[GPBFileDescriptor alloc] initWithPackage:@""
syntax:GPBFileSyntaxProto3];
}
return descriptor;
}
#pragma mark - Model
@implementation Model
@dynamic id_p;
@dynamic action;
@dynamic content;
@dynamic sender;
@dynamic receiver;
@dynamic extra;
@dynamic title;
@dynamic format;
@dynamic timestamp;
typedef struct Model__storage_ {
uint32_t _has_storage_[1];
NSString *action;
NSString *content;
NSString *sender;
NSString *receiver;
NSString *extra;
NSString *title;
NSString *format;
int64_t id_p;
int64_t timestamp;
} Model__storage_;
// This method is threadsafe because it is initially called
// in +initialize for each subclass.
+ (GPBDescriptor *)descriptor {
static GPBDescriptor *descriptor = nil;
if (!descriptor) {
static GPBMessageFieldDescription fields[] = {
{
.name = "id_p",
.dataTypeSpecific.className = NULL,
.number = Model_FieldNumber_Id_p,
.hasIndex = 0,
.offset = (uint32_t)offsetof(Model__storage_, id_p),
.flags = GPBFieldOptional,
.dataType = GPBDataTypeInt64,
},
{
.name = "action",
.dataTypeSpecific.className = NULL,
.number = Model_FieldNumber_Action,
.hasIndex = 1,
.offset = (uint32_t)offsetof(Model__storage_, action),
.flags = GPBFieldOptional,
.dataType = GPBDataTypeString,
},
{
.name = "content",
.dataTypeSpecific.className = NULL,
.number = Model_FieldNumber_Content,
.hasIndex = 2,
.offset = (uint32_t)offsetof(Model__storage_, content),
.flags = GPBFieldOptional,
.dataType = GPBDataTypeString,
},
{
.name = "sender",
.dataTypeSpecific.className = NULL,
.number = Model_FieldNumber_Sender,
.hasIndex = 3,
.offset = (uint32_t)offsetof(Model__storage_, sender),
.flags = GPBFieldOptional,
.dataType = GPBDataTypeString,
},
{
.name = "receiver",
.dataTypeSpecific.className = NULL,
.number = Model_FieldNumber_Receiver,
.hasIndex = 4,
.offset = (uint32_t)offsetof(Model__storage_, receiver),
.flags = GPBFieldOptional,
.dataType = GPBDataTypeString,
},
{
.name = "extra",
.dataTypeSpecific.className = NULL,
.number = Model_FieldNumber_Extra,
.hasIndex = 5,
.offset = (uint32_t)offsetof(Model__storage_, extra),
.flags = GPBFieldOptional,
.dataType = GPBDataTypeString,
},
{
.name = "title",
.dataTypeSpecific.className = NULL,
.number = Model_FieldNumber_Title,
.hasIndex = 6,
.offset = (uint32_t)offsetof(Model__storage_, title),
.flags = GPBFieldOptional,
.dataType = GPBDataTypeString,
},
{
.name = "format",
.dataTypeSpecific.className = NULL,
.number = Model_FieldNumber_Format,
.hasIndex = 7,
.offset = (uint32_t)offsetof(Model__storage_, format),
.flags = GPBFieldOptional,
.dataType = GPBDataTypeString,
},
{
.name = "timestamp",
.dataTypeSpecific.className = NULL,
.number = Model_FieldNumber_Timestamp,
.hasIndex = 8,
.offset = (uint32_t)offsetof(Model__storage_, timestamp),
.flags = GPBFieldOptional,
.dataType = GPBDataTypeInt64,
},
};
GPBDescriptor *localDescriptor =
[GPBDescriptor allocDescriptorForClass:[Model class]
rootClass:[MessageRoot class]
file:MessageRoot_FileDescriptor()
fields:fields
fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
storageSize:sizeof(Model__storage_)
flags:GPBDescriptorInitializationFlag_None];
#if defined(DEBUG) && DEBUG
NSAssert(descriptor == nil, @"Startup recursed!");
#endif // DEBUG
descriptor = localDescriptor;
}
return descriptor;
}
@end
#pragma clang diagnostic pop
// @@protoc_insertion_point(global_scope)

View File

@ -0,0 +1,13 @@
syntax = "proto3";
message Model {
int64 id = 1;
string action = 2;
string content = 3;
string sender = 4;
string receiver = 5;
string extra = 6;
string title = 7;
string format = 8;
int64 timestamp = 9;
}

View File

@ -0,0 +1,79 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: ReplyBody.proto
// This CPP symbol can be defined to use imports that match up to the framework
// imports needed when using CocoaPods.
#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS)
#define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0
#endif
#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
#import <Protobuf/GPBProtocolBuffers.h>
#else
#import "GPBProtocolBuffers.h"
#endif
#if GOOGLE_PROTOBUF_OBJC_VERSION < 30002
#error This file was generated by a newer version of protoc which is incompatible with your Protocol Buffer library sources.
#endif
#if 30002 < GOOGLE_PROTOBUF_OBJC_MIN_SUPPORTED_VERSION
#error This file was generated by an older version of protoc which is incompatible with your Protocol Buffer library sources.
#endif
// @@protoc_insertion_point(imports)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
CF_EXTERN_C_BEGIN
NS_ASSUME_NONNULL_BEGIN
#pragma mark - ReplyBodyRoot
/**
* Exposes the extension registry for this file.
*
* The base class provides:
* @code
* + (GPBExtensionRegistry *)extensionRegistry;
* @endcode
* which is a @c GPBExtensionRegistry that includes all the extensions defined by
* this file and all files that it depends on.
**/
@interface ReplyBodyRoot : GPBRootObject
@end
#pragma mark - Model
typedef GPB_ENUM(Model_FieldNumber) {
Model_FieldNumber_Key = 1,
Model_FieldNumber_Code = 2,
Model_FieldNumber_Message = 3,
Model_FieldNumber_Timestamp = 4,
Model_FieldNumber_Data_p = 5,
};
@interface Model : GPBMessage
@property(nonatomic, readwrite, copy, null_resettable) NSString *key;
@property(nonatomic, readwrite, copy, null_resettable) NSString *code;
@property(nonatomic, readwrite, copy, null_resettable) NSString *message;
@property(nonatomic, readwrite) int64_t timestamp;
@property(nonatomic, readwrite, strong, null_resettable) NSMutableDictionary<NSString*, NSString*> *data_p;
/** The number of items in @c data_p without causing the array to be created. */
@property(nonatomic, readonly) NSUInteger data_p_Count;
@end
NS_ASSUME_NONNULL_END
CF_EXTERN_C_END
#pragma clang diagnostic pop
// @@protoc_insertion_point(global_scope)

View File

@ -0,0 +1,137 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: ReplyBody.proto
// This CPP symbol can be defined to use imports that match up to the framework
// imports needed when using CocoaPods.
#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS)
#define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0
#endif
#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
#import <Protobuf/GPBProtocolBuffers_RuntimeSupport.h>
#else
#import "GPBProtocolBuffers_RuntimeSupport.h"
#endif
#import "ReplyBody.pbobjc.h"
// @@protoc_insertion_point(imports)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
#pragma mark - ReplyBodyRoot
@implementation ReplyBodyRoot
// No extensions in the file and no imports, so no need to generate
// +extensionRegistry.
@end
#pragma mark - ReplyBodyRoot_FileDescriptor
static GPBFileDescriptor *ReplyBodyRoot_FileDescriptor(void) {
// This is called by +initialize so there is no need to worry
// about thread safety of the singleton.
static GPBFileDescriptor *descriptor = NULL;
if (!descriptor) {
GPB_DEBUG_CHECK_RUNTIME_VERSIONS();
descriptor = [[GPBFileDescriptor alloc] initWithPackage:@""
syntax:GPBFileSyntaxProto3];
}
return descriptor;
}
#pragma mark - Model
@implementation Model
@dynamic key;
@dynamic code;
@dynamic message;
@dynamic timestamp;
@dynamic data_p, data_p_Count;
typedef struct Model__storage_ {
uint32_t _has_storage_[1];
NSString *key;
NSString *code;
NSString *message;
NSMutableDictionary *data_p;
int64_t timestamp;
} Model__storage_;
// This method is threadsafe because it is initially called
// in +initialize for each subclass.
+ (GPBDescriptor *)descriptor {
static GPBDescriptor *descriptor = nil;
if (!descriptor) {
static GPBMessageFieldDescription fields[] = {
{
.name = "key",
.dataTypeSpecific.className = NULL,
.number = Model_FieldNumber_Key,
.hasIndex = 0,
.offset = (uint32_t)offsetof(Model__storage_, key),
.flags = GPBFieldOptional,
.dataType = GPBDataTypeString,
},
{
.name = "code",
.dataTypeSpecific.className = NULL,
.number = Model_FieldNumber_Code,
.hasIndex = 1,
.offset = (uint32_t)offsetof(Model__storage_, code),
.flags = GPBFieldOptional,
.dataType = GPBDataTypeString,
},
{
.name = "message",
.dataTypeSpecific.className = NULL,
.number = Model_FieldNumber_Message,
.hasIndex = 2,
.offset = (uint32_t)offsetof(Model__storage_, message),
.flags = GPBFieldOptional,
.dataType = GPBDataTypeString,
},
{
.name = "timestamp",
.dataTypeSpecific.className = NULL,
.number = Model_FieldNumber_Timestamp,
.hasIndex = 3,
.offset = (uint32_t)offsetof(Model__storage_, timestamp),
.flags = GPBFieldOptional,
.dataType = GPBDataTypeInt64,
},
{
.name = "data_p",
.dataTypeSpecific.className = NULL,
.number = Model_FieldNumber_Data_p,
.hasIndex = GPBNoHasBit,
.offset = (uint32_t)offsetof(Model__storage_, data_p),
.flags = GPBFieldMapKeyString,
.dataType = GPBDataTypeString,
},
};
GPBDescriptor *localDescriptor =
[GPBDescriptor allocDescriptorForClass:[Model class]
rootClass:[ReplyBodyRoot class]
file:ReplyBodyRoot_FileDescriptor()
fields:fields
fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
storageSize:sizeof(Model__storage_)
flags:GPBDescriptorInitializationFlag_None];
#if defined(DEBUG) && DEBUG
NSAssert(descriptor == nil, @"Startup recursed!");
#endif // DEBUG
descriptor = localDescriptor;
}
return descriptor;
}
@end
#pragma clang diagnostic pop
// @@protoc_insertion_point(global_scope)

View File

@ -0,0 +1,10 @@
syntax = "proto3";
message Model {
string key = 1;
string code = 2;
string message = 3;
int64 timestamp =4;
map<string,string> data =5;
}

View File

@ -0,0 +1,73 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: SentBody.proto
// This CPP symbol can be defined to use imports that match up to the framework
// imports needed when using CocoaPods.
#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS)
#define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0
#endif
#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
#import <Protobuf/GPBProtocolBuffers.h>
#else
#import "GPBProtocolBuffers.h"
#endif
#if GOOGLE_PROTOBUF_OBJC_VERSION < 30002
#error This file was generated by a newer version of protoc which is incompatible with your Protocol Buffer library sources.
#endif
#if 30002 < GOOGLE_PROTOBUF_OBJC_MIN_SUPPORTED_VERSION
#error This file was generated by an older version of protoc which is incompatible with your Protocol Buffer library sources.
#endif
// @@protoc_insertion_point(imports)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
CF_EXTERN_C_BEGIN
NS_ASSUME_NONNULL_BEGIN
#pragma mark - SentBodyRoot
/**
* Exposes the extension registry for this file.
*
* The base class provides:
* @code
* + (GPBExtensionRegistry *)extensionRegistry;
* @endcode
* which is a @c GPBExtensionRegistry that includes all the extensions defined by
* this file and all files that it depends on.
**/
@interface SentBodyRoot : GPBRootObject
@end
#pragma mark - Model
typedef GPB_ENUM(Model_FieldNumber) {
Model_FieldNumber_Key = 1,
Model_FieldNumber_Timestamp = 2,
Model_FieldNumber_Data_p = 3,
};
@interface Model : GPBMessage
@property(nonatomic, readwrite, copy, null_resettable) NSString *key;
@property(nonatomic, readwrite) int64_t timestamp;
@property(nonatomic, readwrite, strong, null_resettable) NSMutableDictionary<NSString*, NSString*> *data_p;
/** The number of items in @c data_p without causing the array to be created. */
@property(nonatomic, readonly) NSUInteger data_p_Count;
@end
NS_ASSUME_NONNULL_END
CF_EXTERN_C_END
#pragma clang diagnostic pop
// @@protoc_insertion_point(global_scope)

View File

@ -0,0 +1,115 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: SentBody.proto
// This CPP symbol can be defined to use imports that match up to the framework
// imports needed when using CocoaPods.
#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS)
#define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0
#endif
#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
#import <Protobuf/GPBProtocolBuffers_RuntimeSupport.h>
#else
#import "GPBProtocolBuffers_RuntimeSupport.h"
#endif
#import "SentBody.pbobjc.h"
// @@protoc_insertion_point(imports)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
#pragma mark - SentBodyRoot
@implementation SentBodyRoot
// No extensions in the file and no imports, so no need to generate
// +extensionRegistry.
@end
#pragma mark - SentBodyRoot_FileDescriptor
static GPBFileDescriptor *SentBodyRoot_FileDescriptor(void) {
// This is called by +initialize so there is no need to worry
// about thread safety of the singleton.
static GPBFileDescriptor *descriptor = NULL;
if (!descriptor) {
GPB_DEBUG_CHECK_RUNTIME_VERSIONS();
descriptor = [[GPBFileDescriptor alloc] initWithPackage:@""
syntax:GPBFileSyntaxProto3];
}
return descriptor;
}
#pragma mark - Model
@implementation Model
@dynamic key;
@dynamic timestamp;
@dynamic data_p, data_p_Count;
typedef struct Model__storage_ {
uint32_t _has_storage_[1];
NSString *key;
NSMutableDictionary *data_p;
int64_t timestamp;
} Model__storage_;
// This method is threadsafe because it is initially called
// in +initialize for each subclass.
+ (GPBDescriptor *)descriptor {
static GPBDescriptor *descriptor = nil;
if (!descriptor) {
static GPBMessageFieldDescription fields[] = {
{
.name = "key",
.dataTypeSpecific.className = NULL,
.number = Model_FieldNumber_Key,
.hasIndex = 0,
.offset = (uint32_t)offsetof(Model__storage_, key),
.flags = GPBFieldOptional,
.dataType = GPBDataTypeString,
},
{
.name = "timestamp",
.dataTypeSpecific.className = NULL,
.number = Model_FieldNumber_Timestamp,
.hasIndex = 1,
.offset = (uint32_t)offsetof(Model__storage_, timestamp),
.flags = GPBFieldOptional,
.dataType = GPBDataTypeInt64,
},
{
.name = "data_p",
.dataTypeSpecific.className = NULL,
.number = Model_FieldNumber_Data_p,
.hasIndex = GPBNoHasBit,
.offset = (uint32_t)offsetof(Model__storage_, data_p),
.flags = GPBFieldMapKeyString,
.dataType = GPBDataTypeString,
},
};
GPBDescriptor *localDescriptor =
[GPBDescriptor allocDescriptorForClass:[Model class]
rootClass:[SentBodyRoot class]
file:SentBodyRoot_FileDescriptor()
fields:fields
fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
storageSize:sizeof(Model__storage_)
flags:GPBDescriptorInitializationFlag_None];
#if defined(DEBUG) && DEBUG
NSAssert(descriptor == nil, @"Startup recursed!");
#endif // DEBUG
descriptor = localDescriptor;
}
return descriptor;
}
@end
#pragma clang diagnostic pop
// @@protoc_insertion_point(global_scope)

View File

@ -0,0 +1,8 @@
syntax = "proto3";
message Model {
string key = 1;
int64 timestamp =2;
map<string,string> data =3;
}

View File

@ -0,0 +1,13 @@
syntax = "proto3";
message Model {
int64 id = 1;
string action = 2;
string content = 3;
string sender = 4;
string receiver = 5;
string extra = 6;
string title = 7;
string format = 8;
int64 timestamp = 9;
}

View File

@ -0,0 +1,126 @@
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: Message.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
DESCRIPTOR = _descriptor.FileDescriptor(
name='Message.proto',
package='',
syntax='proto3',
serialized_options=None,
serialized_pb=_b('\n\rMessage.proto\"\x97\x01\n\x05Model\x12\n\n\x02id\x18\x01 \x01(\x03\x12\x0e\n\x06\x61\x63tion\x18\x02 \x01(\t\x12\x0f\n\x07\x63ontent\x18\x03 \x01(\t\x12\x0e\n\x06sender\x18\x04 \x01(\t\x12\x10\n\x08receiver\x18\x05 \x01(\t\x12\r\n\x05\x65xtra\x18\x06 \x01(\t\x12\r\n\x05title\x18\x07 \x01(\t\x12\x0e\n\x06\x66ormat\x18\x08 \x01(\t\x12\x11\n\ttimestamp\x18\t \x01(\x03\x62\x06proto3')
)
_MODEL = _descriptor.Descriptor(
name='Model',
full_name='Model',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='id', full_name='Model.id', index=0,
number=1, type=3, cpp_type=2, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='action', full_name='Model.action', index=1,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='content', full_name='Model.content', index=2,
number=3, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='sender', full_name='Model.sender', index=3,
number=4, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='receiver', full_name='Model.receiver', index=4,
number=5, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='extra', full_name='Model.extra', index=5,
number=6, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='title', full_name='Model.title', index=6,
number=7, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='format', full_name='Model.format', index=7,
number=8, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='timestamp', full_name='Model.timestamp', index=8,
number=9, type=3, cpp_type=2, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=18,
serialized_end=169,
)
DESCRIPTOR.message_types_by_name['Model'] = _MODEL
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
Model = _reflection.GeneratedProtocolMessageType('Model', (_message.Message,), {
'DESCRIPTOR' : _MODEL,
'__module__' : 'Message_pb2'
# @@protoc_insertion_point(class_scope:Model)
})
_sym_db.RegisterMessage(Model)
# @@protoc_insertion_point(module_scope)

View File

@ -0,0 +1,10 @@
syntax = "proto3";
message Model {
string key = 1;
string code = 2;
string message = 3;
int64 timestamp =4;
map<string,string> data =5;
}

View File

@ -0,0 +1,146 @@
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: ReplyBody.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
DESCRIPTOR = _descriptor.FileDescriptor(
name='ReplyBody.proto',
package='',
syntax='proto3',
serialized_options=None,
serialized_pb=_b('\n\x0fReplyBody.proto\"\x93\x01\n\x05Model\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x0c\n\x04\x63ode\x18\x02 \x01(\t\x12\x0f\n\x07message\x18\x03 \x01(\t\x12\x11\n\ttimestamp\x18\x04 \x01(\x03\x12\x1e\n\x04\x64\x61ta\x18\x05 \x03(\x0b\x32\x10.Model.DataEntry\x1a+\n\tDataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x62\x06proto3')
)
_MODEL_DATAENTRY = _descriptor.Descriptor(
name='DataEntry',
full_name='Model.DataEntry',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='key', full_name='Model.DataEntry.key', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='value', full_name='Model.DataEntry.value', index=1,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=_b('8\001'),
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=124,
serialized_end=167,
)
_MODEL = _descriptor.Descriptor(
name='Model',
full_name='Model',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='key', full_name='Model.key', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='code', full_name='Model.code', index=1,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='message', full_name='Model.message', index=2,
number=3, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='timestamp', full_name='Model.timestamp', index=3,
number=4, type=3, cpp_type=2, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='data', full_name='Model.data', index=4,
number=5, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
],
extensions=[
],
nested_types=[_MODEL_DATAENTRY, ],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=20,
serialized_end=167,
)
_MODEL_DATAENTRY.containing_type = _MODEL
_MODEL.fields_by_name['data'].message_type = _MODEL_DATAENTRY
DESCRIPTOR.message_types_by_name['Model'] = _MODEL
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
Model = _reflection.GeneratedProtocolMessageType('Model', (_message.Message,), {
'DataEntry' : _reflection.GeneratedProtocolMessageType('DataEntry', (_message.Message,), {
'DESCRIPTOR' : _MODEL_DATAENTRY,
'__module__' : 'ReplyBody_pb2'
# @@protoc_insertion_point(class_scope:Model.DataEntry)
})
,
'DESCRIPTOR' : _MODEL,
'__module__' : 'ReplyBody_pb2'
# @@protoc_insertion_point(class_scope:Model)
})
_sym_db.RegisterMessage(Model)
_sym_db.RegisterMessage(Model.DataEntry)
_MODEL_DATAENTRY._options = None
# @@protoc_insertion_point(module_scope)

View File

@ -0,0 +1,8 @@
syntax = "proto3";
message Model {
string key = 1;
int64 timestamp =2;
map<string,string> data =3;
}

View File

@ -0,0 +1,132 @@
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: SentBody.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
DESCRIPTOR = _descriptor.FileDescriptor(
name='SentBody.proto',
package='',
syntax='proto3',
serialized_options=None,
serialized_pb=_b('\n\x0eSentBody.proto\"t\n\x05Model\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x11\n\ttimestamp\x18\x02 \x01(\x03\x12\x1e\n\x04\x64\x61ta\x18\x03 \x03(\x0b\x32\x10.Model.DataEntry\x1a+\n\tDataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x62\x06proto3')
)
_MODEL_DATAENTRY = _descriptor.Descriptor(
name='DataEntry',
full_name='Model.DataEntry',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='key', full_name='Model.DataEntry.key', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='value', full_name='Model.DataEntry.value', index=1,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=_b('8\001'),
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=91,
serialized_end=134,
)
_MODEL = _descriptor.Descriptor(
name='Model',
full_name='Model',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='key', full_name='Model.key', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='timestamp', full_name='Model.timestamp', index=1,
number=2, type=3, cpp_type=2, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='data', full_name='Model.data', index=2,
number=3, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
],
extensions=[
],
nested_types=[_MODEL_DATAENTRY, ],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=18,
serialized_end=134,
)
_MODEL_DATAENTRY.containing_type = _MODEL
_MODEL.fields_by_name['data'].message_type = _MODEL_DATAENTRY
DESCRIPTOR.message_types_by_name['Model'] = _MODEL
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
Model = _reflection.GeneratedProtocolMessageType('Model', (_message.Message,), {
'DataEntry' : _reflection.GeneratedProtocolMessageType('DataEntry', (_message.Message,), {
'DESCRIPTOR' : _MODEL_DATAENTRY,
'__module__' : 'SentBody_pb2'
# @@protoc_insertion_point(class_scope:Model.DataEntry)
})
,
'DESCRIPTOR' : _MODEL,
'__module__' : 'SentBody_pb2'
# @@protoc_insertion_point(class_scope:Model)
})
_sym_db.RegisterMessage(Model)
_sym_db.RegisterMessage(Model.DataEntry)
_MODEL_DATAENTRY._options = None
# @@protoc_insertion_point(module_scope)

Binary file not shown.