Last active
May 14, 2021 12:10
-
-
Save arnaldojvg/dddd4f93c5ad4aec5b14ee47199e2aec to your computer and use it in GitHub Desktop.
Sample with repeated and optional rules
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import "covid_updates.proto"; | |
enum SortType { | |
ASCENDING = 1; | |
DESCENDING = 2; | |
} | |
message CovidUpdateRequest { | |
optional uint32 size = 1; // How many records | |
optional SortType sort = 2; | |
optional uint64 date = 3; // This request works only per date basis (for simplicity) | |
optional UpdateType type = 4; // Only requesting messages for an specific update type | |
} | |
message CovidUpdatesResponse { | |
optional uint32 amount = 1; | |
repeated CovidUpdate updates = 2; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment