Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- XXXXXXXXXX
- XX /home/florian/Dokumente/proto2cpp_v0.5-beta/test.proto
- XXXXXXXXXX
- /// Test message.
- /// This message sends a search request.
- struct SearchRequest {
- /// Query string used in search request.
- required string query = 1;
- /// Page number.
- optional int32 page_number = 2;
- /// Number of results per page. The default is 10.
- optional int32 result_per_page = 3 [default = 10];
- /// Corpus (type) of the search request.
- enum Corpus {
- /// Universal, i.e. typeless search
- UNIVERSAL = 0,
- /// Web search
- WEB = 1,
- /// Image search
- IMAGES = 2,
- /// Local search
- LOCAL = 3,
- /// News search
- NEWS = 4,
- /// Product search
- PRODUCTS = 5,
- /// Video search
- VIDEO = 6,
- };
- /// Corpus (type) of the search. The default is 'UNIVERSAL'.
- optional Corpus corpus = 4 [default = UNIVERSAL];
- };
- /// Another test message.
- /// This message sends a search response.
- struct SearchResponse {
- /// This message contains actual result of the search response.
- struct Result {
- /// Page (result) URL.
- required string url = 1;
- /// Page title.
- optional string title = 2;
- /// Some snippets from the page.
- repeated string snippets = 3;
- };
- /// Search results.
- repeated Result result = 1;
- };
- XXXXXXXXXX
- XX /home/florian/Dokumente/proto2cpp_v0.5-beta/test.proto
- XXXXXXXXXX
- /// Test message.
- /// This message sends a search request.
- struct SearchRequest {
- /// Query string used in search request.
- required string query = 1;
- /// Page number.
- optional int32 page_number = 2;
- /// Number of results per page. The default is 10.
- optional int32 result_per_page = 3 [default = 10];
- /// Corpus (type) of the search request.
- enum Corpus {
- /// Universal, i.e. typeless search
- UNIVERSAL = 0,
- /// Web search
- WEB = 1,
- /// Image search
- IMAGES = 2,
- /// Local search
- LOCAL = 3,
- /// News search
- NEWS = 4,
- /// Product search
- PRODUCTS = 5,
- /// Video search
- VIDEO = 6,
- };
- /// Corpus (type) of the search. The default is 'UNIVERSAL'.
- optional Corpus corpus = 4 [default = UNIVERSAL];
- };
- /// Another test message.
- /// This message sends a search response.
- struct SearchResponse {
- /// This message contains actual result of the search response.
- struct Result {
- /// Page (result) URL.
- required string url = 1;
- /// Page title.
- optional string title = 2;
- /// Some snippets from the page.
- repeated string snippets = 3;
- };
- /// Search results.
- repeated Result result = 1;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement