Advertisement
Guest User

proto2cpp v0.5-beta example output

a guest
Apr 23rd, 2015
273
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.57 KB | None | 0 0
  1.  
  2. XXXXXXXXXX
  3. XX /home/florian/Dokumente/proto2cpp_v0.5-beta/test.proto
  4. XXXXXXXXXX
  5.  
  6. /// Test message.
  7. /// This message sends a search request.
  8. struct SearchRequest {
  9. /// Query string used in search request.
  10.  
  11. required string query = 1;
  12. /// Page number.
  13.  
  14. optional int32 page_number = 2;
  15. /// Number of results per page. The default is 10.
  16.  
  17. optional int32 result_per_page = 3 [default = 10];
  18. /// Corpus (type) of the search request.
  19. enum Corpus {
  20. /// Universal, i.e. typeless search
  21.  
  22. UNIVERSAL = 0,
  23. /// Web search
  24.  
  25. WEB = 1,
  26. /// Image search
  27.  
  28. IMAGES = 2,
  29. /// Local search
  30.  
  31. LOCAL = 3,
  32. /// News search
  33.  
  34. NEWS = 4,
  35. /// Product search
  36.  
  37. PRODUCTS = 5,
  38. /// Video search
  39.  
  40. VIDEO = 6,
  41. };
  42. /// Corpus (type) of the search. The default is 'UNIVERSAL'.
  43.  
  44. optional Corpus corpus = 4 [default = UNIVERSAL];
  45. };
  46.  
  47. /// Another test message.
  48. /// This message sends a search response.
  49. struct SearchResponse {
  50. /// This message contains actual result of the search response.
  51. struct Result {
  52. /// Page (result) URL.
  53.  
  54. required string url = 1;
  55. /// Page title.
  56.  
  57. optional string title = 2;
  58. /// Some snippets from the page.
  59.  
  60. repeated string snippets = 3;
  61. };
  62. /// Search results.
  63.  
  64. repeated Result result = 1;
  65. };
  66.  
  67.  
  68. XXXXXXXXXX
  69. XX /home/florian/Dokumente/proto2cpp_v0.5-beta/test.proto
  70. XXXXXXXXXX
  71.  
  72. /// Test message.
  73. /// This message sends a search request.
  74. struct SearchRequest {
  75. /// Query string used in search request.
  76.  
  77. required string query = 1;
  78. /// Page number.
  79.  
  80. optional int32 page_number = 2;
  81. /// Number of results per page. The default is 10.
  82.  
  83. optional int32 result_per_page = 3 [default = 10];
  84. /// Corpus (type) of the search request.
  85. enum Corpus {
  86. /// Universal, i.e. typeless search
  87.  
  88. UNIVERSAL = 0,
  89. /// Web search
  90.  
  91. WEB = 1,
  92. /// Image search
  93.  
  94. IMAGES = 2,
  95. /// Local search
  96.  
  97. LOCAL = 3,
  98. /// News search
  99.  
  100. NEWS = 4,
  101. /// Product search
  102.  
  103. PRODUCTS = 5,
  104. /// Video search
  105.  
  106. VIDEO = 6,
  107. };
  108. /// Corpus (type) of the search. The default is 'UNIVERSAL'.
  109.  
  110. optional Corpus corpus = 4 [default = UNIVERSAL];
  111. };
  112.  
  113. /// Another test message.
  114. /// This message sends a search response.
  115. struct SearchResponse {
  116. /// This message contains actual result of the search response.
  117. struct Result {
  118. /// Page (result) URL.
  119.  
  120. required string url = 1;
  121. /// Page title.
  122.  
  123. optional string title = 2;
  124. /// Some snippets from the page.
  125.  
  126. repeated string snippets = 3;
  127. };
  128. /// Search results.
  129.  
  130. repeated Result result = 1;
  131. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement