@@ -2,25 +2,13 @@ syntax = "proto3";
2
2
option cc_enable_arenas = true ;
3
3
4
4
import "src/api/protos/ydb_operation.proto" ;
5
+ import "src/api/protos/draft/field_transformation.proto" ;
5
6
6
7
import "google/protobuf/descriptor.proto" ;
7
8
8
9
package Ydb.DataStreams.V1 ;
9
10
option java_package = "com.yandex.ydb.datastreams.v1" ;
10
11
11
- // Extensions to simplify json <-> proto conversion
12
- enum EFieldTransformationType {
13
- TRANSFORM_NONE = 0 ;
14
- TRANSFORM_BASE64 = 1 ;
15
- TRANSFORM_DOUBLE_S_TO_INT_MS = 2 ;
16
- TRANSFORM_EMPTY_TO_NOTHING = 3 ;
17
- }
18
-
19
-
20
- extend google.protobuf.FieldOptions {
21
- EFieldTransformationType FieldTransformer = 58123 ;
22
- }
23
-
24
12
// Here and below: Kinesis data types mapped to protobuf
25
13
26
14
enum EncryptionType {
@@ -53,7 +41,7 @@ message ChildShard {
53
41
// Represents details of consumer
54
42
message Consumer {
55
43
string consumer_arn = 1 ;
56
- int64 consumer_creation_timestamp = 2 [(FieldTransformer) = TRANSFORM_DOUBLE_S_TO_INT_MS ];
44
+ int64 consumer_creation_timestamp = 2 [(Ydb.FieldTransformation . FieldTransformer ) = TRANSFORM_DOUBLE_S_TO_INT_MS ];
57
45
string consumer_name = 3 ;
58
46
ConsumerDescription.ConsumerStatus consumer_status = 4 ;
59
47
}
@@ -66,9 +54,9 @@ message HashKeyRange {
66
54
67
55
message Record {
68
56
// Timestamp that the record was inserted into the stream
69
- int64 approximate_arrival_timestamp = 1 [(FieldTransformer) = TRANSFORM_DOUBLE_S_TO_INT_MS ];
57
+ int64 approximate_arrival_timestamp = 1 [(Ydb.FieldTransformation . FieldTransformer ) = TRANSFORM_DOUBLE_S_TO_INT_MS ];
70
58
// Data blob
71
- bytes data = 2 [(FieldTransformer) = TRANSFORM_BASE64 ];
59
+ bytes data = 2 [(Ydb.FieldTransformation . FieldTransformer ) = TRANSFORM_BASE64 ];
72
60
// Encryption type used on record
73
61
EncryptionType encryption_type = 3 ;
74
62
// Identifies shard in the stream the record is assigned to
@@ -108,7 +96,7 @@ message StreamDescription {
108
96
repeated Shard shards = 6 ;
109
97
string stream_arn = 7 ;
110
98
// Timestamp that the stream was created
111
- int64 stream_creation_timestamp = 8 [(FieldTransformer) = TRANSFORM_DOUBLE_S_TO_INT_MS ];
99
+ int64 stream_creation_timestamp = 8 [(Ydb.FieldTransformation . FieldTransformer ) = TRANSFORM_DOUBLE_S_TO_INT_MS ];
112
100
// Current status of the stream
113
101
StreamStatus stream_status = 9 ;
114
102
// Name of the stream
@@ -127,17 +115,17 @@ message StreamDescription {
127
115
// Represents range of possible sequence numbers for the shard
128
116
message SequenceNumberRange {
129
117
string starting_sequence_number = 1 ;
130
- string ending_sequence_number = 2 [(FieldTransformer) = TRANSFORM_EMPTY_TO_NOTHING ];
118
+ string ending_sequence_number = 2 [(Ydb.FieldTransformation . FieldTransformer ) = TRANSFORM_EMPTY_TO_NOTHING ];
131
119
}
132
120
133
121
// Represents shard details
134
122
message Shard {
135
123
// Id of the shard adjacent to the shard's parent
136
- string adjacent_parent_shard_id = 1 [(FieldTransformer) = TRANSFORM_EMPTY_TO_NOTHING ];
124
+ string adjacent_parent_shard_id = 1 [(Ydb.FieldTransformation . FieldTransformer ) = TRANSFORM_EMPTY_TO_NOTHING ];
137
125
// The range of possible hash key values for the shard
138
126
HashKeyRange hash_key_range = 2 ;
139
127
// Id of the shard's parent
140
- string parent_shard_id = 3 [(FieldTransformer) = TRANSFORM_EMPTY_TO_NOTHING ];
128
+ string parent_shard_id = 3 [(Ydb.FieldTransformation . FieldTransformer ) = TRANSFORM_EMPTY_TO_NOTHING ];
141
129
// The range of possible sequence numbers for the shard
142
130
SequenceNumberRange sequence_number_range = 4 ;
143
131
// Unique id of the shard within stream
@@ -155,7 +143,7 @@ message ConsumerDescription {
155
143
156
144
string consumer_arn = 1 ;
157
145
// Timestamp that the consumer was created
158
- int64 consumer_creation_timestamp = 2 [(FieldTransformer) = TRANSFORM_DOUBLE_S_TO_INT_MS ];
146
+ int64 consumer_creation_timestamp = 2 [(Ydb.FieldTransformation . FieldTransformer ) = TRANSFORM_DOUBLE_S_TO_INT_MS ];
159
147
// Name of the consumer
160
148
string consumer_name = 3 ;
161
149
ConsumerStatus consumer_status = 4 ;
@@ -198,14 +186,14 @@ message ShardFilter {
198
186
// Exclusive id. Can only be used if AFTER_SHARD_ID is specified
199
187
string shard_id = 1 ;
200
188
// Can only be used if AT_TIMESTAMP or FROM_TIMESTAMP are specified.
201
- int64 timestamp = 2 [(FieldTransformer) = TRANSFORM_DOUBLE_S_TO_INT_MS ];
189
+ int64 timestamp = 2 [(Ydb.FieldTransformation . FieldTransformer ) = TRANSFORM_DOUBLE_S_TO_INT_MS ];
202
190
ShardFilterType type = 3 ;
203
191
}
204
192
205
193
// Represents starting position in the stream from which to start reading
206
194
message StartingPosition {
207
195
// Timestamp of the record from which to start reading
208
- int64 timestamp = 1 [(FieldTransformer) = TRANSFORM_DOUBLE_S_TO_INT_MS ];
196
+ int64 timestamp = 1 [(Ydb.FieldTransformation . FieldTransformer ) = TRANSFORM_DOUBLE_S_TO_INT_MS ];
209
197
// Sequence number of the record from which to start reading
210
198
string sequence_number = 2 ;
211
199
ShardIteratorType type = 3 ;
@@ -227,7 +215,7 @@ message StreamDescriptionSummary {
227
215
// Stream ARN
228
216
string stream_arn = 7 ;
229
217
// Timestamp that the stream was created
230
- int64 stream_creation_timestamp = 8 [(FieldTransformer) = TRANSFORM_DOUBLE_S_TO_INT_MS ];
218
+ int64 stream_creation_timestamp = 8 [(Ydb.FieldTransformation . FieldTransformer ) = TRANSFORM_DOUBLE_S_TO_INT_MS ];
231
219
// Name of the stream
232
220
string stream_name = 9 ;
233
221
// Current status of the stream
@@ -351,7 +339,7 @@ message ListShardsRequest {
351
339
// Filter out response
352
340
ShardFilter shard_filter = 5 ;
353
341
// Used to distinguish streams that have the same name
354
- int64 stream_creation_timestamp = 6 [(FieldTransformer) = TRANSFORM_DOUBLE_S_TO_INT_MS ];
342
+ int64 stream_creation_timestamp = 6 [(Ydb.FieldTransformation . FieldTransformer ) = TRANSFORM_DOUBLE_S_TO_INT_MS ];
355
343
// Name of the stream
356
344
string stream_name = 7 ;
357
345
}
@@ -417,7 +405,7 @@ message ListStreamConsumersRequest {
417
405
string next_token = 3 ;
418
406
string stream_arn = 4 ;
419
407
// Used to distinguish streams that have the same name
420
- int64 stream_creation_timestamp = 5 [(FieldTransformer) = TRANSFORM_DOUBLE_S_TO_INT_MS ];
408
+ int64 stream_creation_timestamp = 5 [(Ydb.FieldTransformation . FieldTransformer ) = TRANSFORM_DOUBLE_S_TO_INT_MS ];
421
409
}
422
410
423
411
message ListStreamConsumersResponse {
@@ -502,7 +490,7 @@ message DescribeStreamConsumerResult {
502
490
503
491
message PutRecordsRequestEntry {
504
492
// Data blob
505
- bytes data = 1 [(FieldTransformer) = TRANSFORM_BASE64 ];
493
+ bytes data = 1 [(Ydb.FieldTransformation . FieldTransformer ) = TRANSFORM_BASE64 ];
506
494
// Hash value used to explicitly determine the shard
507
495
string explicit_hash_key = 2 ;
508
496
// Used as input to hash function that maps partition key to a specific shard
@@ -511,8 +499,8 @@ message PutRecordsRequestEntry {
511
499
512
500
// Represents result of an individual record
513
501
message PutRecordsResultEntry {
514
- string error_message = 2 [(FieldTransformer) = TRANSFORM_EMPTY_TO_NOTHING ];
515
- string error_code = 3 [(FieldTransformer) = TRANSFORM_EMPTY_TO_NOTHING ];
502
+ string error_message = 2 [(Ydb.FieldTransformation . FieldTransformer ) = TRANSFORM_EMPTY_TO_NOTHING ];
503
+ string error_code = 3 [(Ydb.FieldTransformation . FieldTransformer ) = TRANSFORM_EMPTY_TO_NOTHING ];
516
504
string sequence_number = 4 ;
517
505
string shard_id = 5 ;
518
506
}
@@ -544,7 +532,7 @@ message GetRecordsResult {
544
532
message PutRecordRequest {
545
533
Ydb.Operations.OperationParams operation_params = 1 ;
546
534
// Data blob
547
- bytes data = 2 [(FieldTransformer) = TRANSFORM_BASE64 ];
535
+ bytes data = 2 [(Ydb.FieldTransformation . FieldTransformer ) = TRANSFORM_BASE64 ];
548
536
// Hash value used to explicitly determine the shard
549
537
string explicit_hash_key = 3 ;
550
538
// Used as input to hash function that maps partition key to a specific shard
@@ -600,7 +588,7 @@ message GetShardIteratorRequest {
600
588
// Name of the stream
601
589
string stream_name = 5 ;
602
590
// Used with shard iterator type AT_TIMESTAMP
603
- int64 timestamp = 6 [(FieldTransformer) = TRANSFORM_DOUBLE_S_TO_INT_MS ];
591
+ int64 timestamp = 6 [(Ydb.FieldTransformation . FieldTransformer ) = TRANSFORM_DOUBLE_S_TO_INT_MS ];
604
592
}
605
593
606
594
message GetShardIteratorResponse {
0 commit comments