Skip to content

Commit 559f374

Browse files
committed
Consistently add ticks around identifiers
1 parent 899347c commit 559f374

File tree

1 file changed

+72
-72
lines changed

1 file changed

+72
-72
lines changed

app/src/main/proto/vss.proto

Lines changed: 72 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -6,79 +6,79 @@ option java_package = "org.vss";
66
// Request payload to be used for `GetObject` API call to server.
77
message GetObjectRequest {
88

9-
// store_id is a keyspace identifier.
9+
// `store_id` is a keyspace identifier.
1010
// Ref: https://en.wikipedia.org/wiki/Keyspace_(distributed_data_store)
11-
// All APIs operate within a single store_id.
11+
// All APIs operate within a single `store_id`.
1212
// It is up to clients to use single or multiple stores for their use-case.
1313
// This can be used for client-isolation/ rate-limiting / throttling on the server-side.
14-
// Authorization and billing can also be performed at the store_id level.
14+
// Authorization and billing can also be performed at the `store_id` level.
1515
string store_id = 1;
1616

17-
// Key for which the value is to be fetched.
17+
// `Key` for which the value is to be fetched.
1818
//
1919
// Consistency Guarantee:
20-
// Get(read) operations against a key are consistent reads and will reflect all previous writes,
20+
// Get(read) operations against a `key` are consistent reads and will reflect all previous writes,
2121
// since Put/Write provides read-after-write and read-after-update consistency guarantees.
2222
//
2323
// Read Isolation:
24-
// Get/Read operations against a key are ensured to have read-committed isolation.
24+
// Get/Read operations against a `key` are ensured to have read-committed isolation.
2525
// Ref: https://en.wikipedia.org/wiki/Isolation_(database_systems)#Read_committed
2626
string key = 2;
2727
}
2828

2929
// Server response for `GetObject` API.
3030
message GetObjectResponse {
3131

32-
// Fetched value and version along with the corresponding key in the request.
32+
// Fetched `value` and `version` along with the corresponding `key` in the request.
3333
KeyValue value = 2;
3434
}
3535

3636
// Request payload to be used for `PutObject` API call to server.
3737
message PutObjectRequest {
3838

39-
// store_id is a keyspace identifier.
39+
// `store_id` is a keyspace identifier.
4040
// Ref: https://en.wikipedia.org/wiki/Keyspace_(distributed_data_store)
41-
// All APIs operate within a single store_id.
41+
// All APIs operate within a single `store_id`.
4242
// It is up to clients to use single or multiple stores for their use-case.
4343
// This can be used for client-isolation/ rate-limiting / throttling on the server-side.
44-
// Authorization and billing can also be performed at the store_id level.
44+
// Authorization and billing can also be performed at the `store_id` level.
4545
string store_id = 1;
4646

47-
// global_version is a sequence-number/version of the whole store. This can be used for versioning
47+
// `global_version` is a sequence-number/version of the whole store. This can be used for versioning
4848
// and ensures that multiple updates in case of multiple devices can only be done linearly, even
49-
// if those updates did not directly conflict with each other based on keys/transaction_items.
49+
// if those updates did not directly conflict with each other based on keys/`transaction_items`.
5050
//
51-
// If present, the write will only succeed if the current server-side global_version against
52-
// the store_id is same as in the request.
53-
// Clients are expected to store (client-side) the global version against store_id.
54-
// The request must contain their client-side value of global_version if global versioning and
51+
// If present, the write will only succeed if the current server-side `global_version` against
52+
// the `store_id` is same as in the request.
53+
// Clients are expected to store (client-side) the global version against `store_id`.
54+
// The request must contain their client-side value of `global_version` if global versioning and
5555
// conflict detection is desired.
5656
//
5757
// For the first write of the store, global version should be '0'. If the write succeeds, clients
5858
// must increment their global version (client-side) by 1.
59-
// The server increments global_version (server-side) for every successful write, hence this
59+
// The server increments `global_version` (server-side) for every successful write, hence this
6060
// client-side increment is required to ensure matching versions. This updated global version
6161
// should be used in subsequent PutObjectRequests for the store.
6262
//
6363
// Requests with a conflicting version will fail with `CONFLICT_EXCEPTION` as ErrorCode.
6464
optional int64 global_version = 2;
6565

66-
// Items to be written as a result of this PutObjectRequest.
66+
// Items to be written as a result of this `PutObjectRequest`.
6767
//
68-
// In an item, each key is supplied with its corresponding value and version.
68+
// In an item, each `key` is supplied with its corresponding `value` and `version`.
6969
// Clients can choose to encrypt the keys client-side in order to obfuscate their usage patterns.
70-
// If the write is successful, the previous value corresponding to the key will be overwritten.
70+
// If the write is successful, the previous `value` corresponding to the `key` will be overwritten.
7171
//
72-
// Multiple items in transaction_items and delete_items of a single PutObjectRequest are written in
72+
// Multiple items in `transaction_items` and `delete_items` of a single `PutObjectRequest` are written in
7373
// a database-transaction in an all-or-nothing fashion.
74-
// All Items in a single PutObjectRequest must have distinct keys.
74+
// All Items in a single `PutObjectRequest` must have distinct keys.
7575
//
76-
// Clients are expected to store a version against every key.
77-
// The write will succeed if the current DB version against the key is the same as in the request.
78-
// When initiating a PutObjectRequest, the request should contain their client-side version for
76+
// Clients are expected to store a `version` against every `key`.
77+
// The write will succeed if the current DB version against the `key` is the same as in the request.
78+
// When initiating a `PutObjectRequest`, the request should contain their client-side version for
7979
// that key-value.
8080
//
81-
// For the first write of any key, the version should be '0'. If the write succeeds, the client
81+
// For the first write of any key, the `version` should be '0'. If the write succeeds, the client
8282
// must increment their corresponding key versions (client-side) by 1.
8383
// The server increments key versions (server-side) for every successful write, hence this
8484
// client-side increment is required to ensure matching versions. These updated key versions should
@@ -89,7 +89,7 @@ message PutObjectRequest {
8989
// Considerations for transactions:
9090
// Transaction writes of multiple items have a performance overhead, hence it is recommended to use
9191
// them only if required by the client application to ensure logic/code correctness.
92-
// That is, transaction_items are not a substitute for batch-write of multiple unrelated items.
92+
// That is, `transaction_items` are not a substitute for batch-write of multiple unrelated items.
9393
// When a write of multiple unrelated items is desired, it is recommended to use separate
9494
// PutObjectRequests.
9595
//
@@ -98,11 +98,11 @@ message PutObjectRequest {
9898
// read-after-update consistency guarantees.
9999
repeated KeyValue transaction_items = 3;
100100

101-
// Items to be deleted as a result of this PutObjectRequest.
101+
// Items to be deleted as a result of this `PutObjectRequest`.
102102
//
103-
// Each item in the `delete_items` field consists of a key and its corresponding version.
104-
// The version is used to perform a version check before deleting the item.
105-
// The delete will only succeed if the current database version against the key is the same as the version
103+
// Each item in the `delete_items` field consists of a `key` and its corresponding `version`.
104+
// The `version` is used to perform a version check before deleting the item.
105+
// The delete will only succeed if the current database version against the `key` is the same as the `version`
106106
// specified in the request.
107107
//
108108
// Fails with `CONFLICT_EXCEPTION` as the ErrorCode if:
@@ -122,23 +122,23 @@ message PutObjectResponse {
122122

123123
// Request payload to be used for `DeleteObject` API call to server.
124124
message DeleteObjectRequest {
125-
// store_id is a keyspace identifier.
125+
// `store_id` is a keyspace identifier.
126126
// Ref: https://en.wikipedia.org/wiki/Keyspace_(distributed_data_store)
127-
// All APIs operate within a single store_id.
127+
// All APIs operate within a single `store_id`.
128128
// It is up to clients to use single or multiple stores for their use-case.
129129
// This can be used for client-isolation/ rate-limiting / throttling on the server-side.
130-
// Authorization and billing can also be performed at the store_id level.
130+
// Authorization and billing can also be performed at the `store_id` level.
131131
string store_id = 1;
132132

133-
// Item to be deleted as a result of this DeleteObjectRequest.
133+
// Item to be deleted as a result of this `DeleteObjectRequest`.
134134
//
135-
// An item consists of a key and its corresponding version.
136-
// The item is only deleted if the current database version against the key is the same as the version
135+
// An item consists of a `key` and its corresponding `version`.
136+
// The item is only deleted if the current database version against the `key` is the same as the `version`
137137
// specified in the request.
138138
// This operation is idempotent, that is, multiple delete calls for the same item will not fail.
139139
//
140140
// If the requested item does not exist, this operation will not fail.
141-
// If you wish to perform stricter checks while deleting an item, consider using PutObject API.
141+
// If you wish to perform stricter checks while deleting an item, consider using `PutObject` API.
142142
KeyValue key_value = 2;
143143
}
144144

@@ -149,79 +149,79 @@ message DeleteObjectResponse{
149149
// Request payload to be used for `ListKeyVersions` API call to server.
150150
message ListKeyVersionsRequest {
151151

152-
// store_id is a keyspace identifier.
152+
// `store_id` is a keyspace identifier.
153153
// Ref: https://en.wikipedia.org/wiki/Keyspace_(distributed_data_store)
154-
// All APIs operate within a single store_id.
154+
// All APIs operate within a single `store_id`.
155155
// It is up to clients to use single or multiple stores for their use-case.
156156
// This can be used for client-isolation/ rate-limiting / throttling on the server-side.
157-
// Authorization and billing can also be performed at the store_id level.
157+
// Authorization and billing can also be performed at the `store_id` level.
158158
string store_id = 1;
159159

160-
// A key_prefix is a string of characters at the beginning of the key. Prefixes can be used as
160+
// A `key_prefix` is a string of characters at the beginning of the key. Prefixes can be used as
161161
// a way to organize key-values in a similar way to directories.
162162
//
163-
// If key_prefix is specified, the response results will be limited to those keys that begin with
163+
// If `key_prefix` is specified, the response results will be limited to those keys that begin with
164164
// the specified prefix.
165165
//
166-
// If no key_prefix is specified or it is empty (""), all the keys are eligible to be returned in
166+
// If no `key_prefix` is specified or it is empty (""), all the keys are eligible to be returned in
167167
// the response.
168168
optional string key_prefix = 2;
169169

170-
// page_size is used by clients to specify the maximum number of results that can be returned by
170+
// `page_size` is used by clients to specify the maximum number of results that can be returned by
171171
// the server.
172172
// The server may further constrain the maximum number of results returned in a single page.
173-
// If the page_size is 0 or not set, the server will decide the number of results to be returned.
173+
// If the `page_size` is 0 or not set, the server will decide the number of results to be returned.
174174
optional int32 page_size = 3;
175175

176-
// page_token is a pagination token.
176+
// `page_token` is a pagination token.
177177
//
178-
// To query for the first page of ListKeyVersions, page_token must not be specified.
178+
// To query for the first page of `ListKeyVersions`, `page_token` must not be specified.
179179
//
180180
// For subsequent pages, use the value that was returned as `next_page_token` in the previous
181-
// page's ListKeyVersionsResponse.
181+
// page's `ListKeyVersionsResponse`.
182182
optional string page_token = 4;
183183
}
184184

185185
// Server response for `ListKeyVersions` API.
186186
message ListKeyVersionsResponse {
187187

188188
// Fetched keys and versions.
189-
// Even though this API reuses KeyValue struct, the value sub-field will not be set by the server.
189+
// Even though this API reuses the `KeyValue` struct, the `value` sub-field will not be set by the server.
190190
repeated KeyValue key_versions = 1;
191191

192-
// next_page_token is a pagination token, used to retrieve the next page of results.
193-
// Use this value to query for next_page of paginated ListKeyVersions operation, by specifying
192+
// `next_page_token` is a pagination token, used to retrieve the next page of results.
193+
// Use this value to query for next-page of paginated `ListKeyVersions` operation, by specifying
194194
// this value as the `page_token` in the next request.
195195
//
196-
// If next_page_token is empty (""), then the "last page" of results has been processed and
196+
// If `next_page_token` is empty (""), then the "last page" of results has been processed and
197197
// there is no more data to be retrieved.
198198
//
199-
// If next_page_token is not empty, it does not necessarily mean that there is more data in the
199+
// If `next_page_token` is not empty, it does not necessarily mean that there is more data in the
200200
// result set. The only way to know when you have reached the end of the result set is when
201-
// next_page_token is empty.
201+
// `next_page_token` is empty.
202202
//
203203
// Caution: Clients must not assume a specific number of key_versions to be present in a page for
204204
// paginated response.
205205
optional string next_page_token = 2;
206206

207-
// global_version is a sequence-number/version of the whole store.
207+
// `global_version` is a sequence-number/version of the whole store.
208208
//
209-
// global_version is only returned in response for the first page of the ListKeyVersionsResponse
209+
// `global_version` is only returned in response for the first page of the `ListKeyVersionsResponse`
210210
// and is guaranteed to be read before reading any key-versions.
211211
//
212212
// In case of refreshing the complete key-version view on the client-side, correct usage for
213-
// the returned global_version is as following:
214-
// 1. Read global_version from the first page of paginated response and save it as local variable.
215-
// 2. Update all the key_versions on client-side from all the pages of paginated response.
216-
// 3. Update global_version on client_side from the local variable saved in step-1.
217-
// This ensures that on client-side, all current key_versions were stored at global_version or later.
218-
// This guarantee is helpful for ensuring the versioning correctness if using the global_version
219-
// in PutObject API and can help avoid the race conditions related to it.
213+
// the returned `global_version` is as following:
214+
// 1. Read `global_version` from the first page of paginated response and save it as local variable.
215+
// 2. Update all the `key_versions` on client-side from all the pages of paginated response.
216+
// 3. Update `global_version` on client_side from the local variable saved in step-1.
217+
// This ensures that on client-side, all current `key_versions` were stored at `global_version` or later.
218+
// This guarantee is helpful for ensuring the versioning correctness if using the `global_version`
219+
// in `PutObject` API and can help avoid the race conditions related to it.
220220
optional int64 global_version = 3;
221221
}
222222

223-
// When HttpStatusCode is not ok (200), the response `content` contains a serialized ErrorResponse
224-
// with the relevant ErrorCode and message
223+
// When HttpStatusCode is not ok (200), the response `content` contains a serialized `ErrorResponse`
224+
// with the relevant `ErrorCode` and `message`
225225
message ErrorResponse {
226226

227227
// The error code uniquely identifying an error condition.
@@ -235,14 +235,14 @@ message ErrorResponse {
235235
string message = 2;
236236
}
237237

238-
// ErrorCodes to be used in ErrorResponse
238+
// ErrorCodes to be used in `ErrorResponse`
239239
enum ErrorCode {
240240

241-
// Default protobuf Enum value. Will not be used as ErrorCode by server.
241+
// Default protobuf Enum value. Will not be used as `ErrorCode` by server.
242242
UNKNOWN = 0;
243243

244244
// CONFLICT_EXCEPTION is used when the request contains mismatched version (either key or global)
245-
// in PutObjectRequest. For more info refer PutObjectRequest.
245+
// in `PutObjectRequest`. For more info refer `PutObjectRequest`.
246246
CONFLICT_EXCEPTION= 1;
247247

248248
// INVALID_REQUEST_EXCEPTION is used in the following cases:
@@ -256,18 +256,18 @@ enum ErrorCode {
256256
INTERNAL_SERVER_EXCEPTION = 3;
257257
}
258258

259-
// Represents KeyValue pair to be stored or retrieved.
259+
// Represents a key-value pair to be stored or retrieved.
260260
message KeyValue {
261261

262262
// Key against which the value is stored.
263263
string key = 1;
264264

265265
// Version field is used for key-level versioning.
266-
// For first write of key, version should be '0'. If the write succeeds, clients must increment
266+
// For first write of key, `version` should be '0'. If the write succeeds, clients must increment
267267
// their corresponding key version (client-side) by 1.
268268
// The server increments key version (server-side) for every successful write, hence this
269269
// client-side increment is required to ensure matching versions. These updated key versions should
270-
// be used in subsequent PutObjectRequests for the keys.
270+
// be used in subsequent `PutObjectRequest`s for the keys.
271271
int64 version = 2;
272272

273273
// Object value in bytes which is stored (in put) and fetched (in get).

0 commit comments

Comments
 (0)