1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StorageUnits {
#[prost(string, tag = "1")]
pub unit_kind: ::prost::alloc::string::String,
#[prost(uint64, tag = "2")]
pub count: u64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ComputationalUnits {
#[prost(string, tag = "1")]
pub unit_kind: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub availability_zone: ::prost::alloc::string::String,
#[prost(uint64, tag = "3")]
pub count: u64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AllocatedComputationalUnit {
#[prost(string, tag = "1")]
pub host: ::prost::alloc::string::String,
#[prost(uint32, tag = "2")]
pub port: u32,
#[prost(string, tag = "3")]
pub unit_kind: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Resources {
#[prost(message, repeated, tag = "1")]
pub storage_units: ::prost::alloc::vec::Vec<StorageUnits>,
#[prost(message, repeated, tag = "2")]
pub computational_units: ::prost::alloc::vec::Vec<ComputationalUnits>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ServerlessResources {
#[prost(string, tag = "1")]
pub shared_database_path: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DatabaseOptions {
#[prost(bool, tag = "1")]
pub disable_tx_service: bool,
#[prost(bool, tag = "2")]
pub disable_external_subdomain: bool,
#[prost(uint32, tag = "3")]
pub plan_resolution: u32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Attribute {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub value: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SchemaOperationQuotas {
#[prost(message, repeated, tag = "1")]
pub leaky_bucket_quotas: ::prost::alloc::vec::Vec<schema_operation_quotas::LeakyBucket>,
}
pub mod schema_operation_quotas {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LeakyBucket {
#[prost(double, tag = "1")]
pub bucket_size: f64,
#[prost(uint64, tag = "2")]
pub bucket_seconds: u64,
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DatabaseQuotas {
#[prost(uint64, tag = "1")]
pub data_size_hard_quota: u64,
#[prost(uint64, tag = "2")]
pub data_size_soft_quota: u64,
#[prost(uint64, tag = "3")]
pub data_stream_shards_quota: u64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateDatabaseRequest {
#[prost(message, optional, tag = "1")]
pub operation_params: ::core::option::Option<super::operations::OperationParams>,
#[prost(string, tag = "2")]
pub path: ::prost::alloc::string::String,
#[prost(message, optional, tag = "4")]
pub options: ::core::option::Option<DatabaseOptions>,
#[prost(message, repeated, tag = "5")]
pub attributes: ::prost::alloc::vec::Vec<Attribute>,
#[prost(message, optional, tag = "8")]
pub schema_operation_quotas: ::core::option::Option<SchemaOperationQuotas>,
#[prost(string, tag = "9")]
pub idempotency_key: ::prost::alloc::string::String,
#[prost(message, optional, tag = "10")]
pub database_quotas: ::core::option::Option<DatabaseQuotas>,
#[prost(oneof = "create_database_request::ResourcesKind", tags = "3, 6, 7")]
pub resources_kind: ::core::option::Option<create_database_request::ResourcesKind>,
}
pub mod create_database_request {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum ResourcesKind {
#[prost(message, tag = "3")]
Resources(super::Resources),
#[prost(message, tag = "6")]
SharedResources(super::Resources),
#[prost(message, tag = "7")]
ServerlessResources(super::ServerlessResources),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateDatabaseResponse {
#[prost(message, optional, tag = "1")]
pub operation: ::core::option::Option<super::operations::Operation>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetDatabaseStatusRequest {
#[prost(string, tag = "1")]
pub path: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub operation_params: ::core::option::Option<super::operations::OperationParams>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetDatabaseStatusResponse {
#[prost(message, optional, tag = "1")]
pub operation: ::core::option::Option<super::operations::Operation>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetDatabaseStatusResult {
#[prost(string, tag = "1")]
pub path: ::prost::alloc::string::String,
#[prost(enumeration = "get_database_status_result::State", tag = "2")]
pub state: i32,
#[prost(message, optional, tag = "4")]
pub allocated_resources: ::core::option::Option<Resources>,
#[prost(message, repeated, tag = "5")]
pub registered_resources: ::prost::alloc::vec::Vec<AllocatedComputationalUnit>,
#[prost(uint64, tag = "6")]
pub generation: u64,
#[prost(message, optional, tag = "9")]
pub schema_operation_quotas: ::core::option::Option<SchemaOperationQuotas>,
#[prost(message, optional, tag = "10")]
pub database_quotas: ::core::option::Option<DatabaseQuotas>,
#[prost(oneof = "get_database_status_result::ResourcesKind", tags = "3, 7, 8")]
pub resources_kind: ::core::option::Option<get_database_status_result::ResourcesKind>,
}
pub mod get_database_status_result {
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum State {
Unspecified = 0,
Creating = 1,
Running = 2,
Removing = 3,
PendingResources = 4,
Configuring = 5,
}
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum ResourcesKind {
#[prost(message, tag = "3")]
RequiredResources(super::Resources),
#[prost(message, tag = "7")]
RequiredSharedResources(super::Resources),
#[prost(message, tag = "8")]
ServerlessResources(super::ServerlessResources),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AlterDatabaseRequest {
#[prost(string, tag = "1")]
pub path: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub computational_units_to_add: ::prost::alloc::vec::Vec<ComputationalUnits>,
#[prost(message, repeated, tag = "3")]
pub computational_units_to_remove: ::prost::alloc::vec::Vec<ComputationalUnits>,
#[prost(message, repeated, tag = "4")]
pub storage_units_to_add: ::prost::alloc::vec::Vec<StorageUnits>,
#[prost(message, repeated, tag = "5")]
pub computational_units_to_register: ::prost::alloc::vec::Vec<AllocatedComputationalUnit>,
#[prost(message, repeated, tag = "6")]
pub computational_units_to_deregister: ::prost::alloc::vec::Vec<AllocatedComputationalUnit>,
#[prost(message, optional, tag = "7")]
pub operation_params: ::core::option::Option<super::operations::OperationParams>,
#[prost(uint64, tag = "8")]
pub generation: u64,
#[prost(message, optional, tag = "9")]
pub schema_operation_quotas: ::core::option::Option<SchemaOperationQuotas>,
#[prost(string, tag = "10")]
pub idempotency_key: ::prost::alloc::string::String,
#[prost(message, optional, tag = "11")]
pub database_quotas: ::core::option::Option<DatabaseQuotas>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AlterDatabaseResponse {
#[prost(message, optional, tag = "1")]
pub operation: ::core::option::Option<super::operations::Operation>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListDatabasesRequest {
#[prost(message, optional, tag = "1")]
pub operation_params: ::core::option::Option<super::operations::OperationParams>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListDatabasesResponse {
#[prost(message, optional, tag = "1")]
pub operation: ::core::option::Option<super::operations::Operation>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListDatabasesResult {
#[prost(string, repeated, tag = "1")]
pub paths: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RemoveDatabaseRequest {
#[prost(string, tag = "1")]
pub path: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub operation_params: ::core::option::Option<super::operations::OperationParams>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RemoveDatabaseResponse {
#[prost(message, optional, tag = "1")]
pub operation: ::core::option::Option<super::operations::Operation>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StorageUnitDescription {
#[prost(string, tag = "1")]
pub kind: ::prost::alloc::string::String,
#[prost(map = "string, string", tag = "2")]
pub labels:
::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AvailabilityZoneDescription {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(map = "string, string", tag = "2")]
pub labels:
::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ComputationalUnitDescription {
#[prost(string, tag = "1")]
pub kind: ::prost::alloc::string::String,
#[prost(map = "string, string", tag = "2")]
pub labels:
::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
#[prost(string, repeated, tag = "3")]
pub allowed_availability_zones: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DescribeDatabaseOptionsRequest {
#[prost(message, optional, tag = "1")]
pub operation_params: ::core::option::Option<super::operations::OperationParams>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DescribeDatabaseOptionsResponse {
#[prost(message, optional, tag = "1")]
pub operation: ::core::option::Option<super::operations::Operation>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DescribeDatabaseOptionsResult {
#[prost(message, repeated, tag = "1")]
pub storage_units: ::prost::alloc::vec::Vec<StorageUnitDescription>,
#[prost(message, repeated, tag = "2")]
pub availability_zones: ::prost::alloc::vec::Vec<AvailabilityZoneDescription>,
#[prost(message, repeated, tag = "3")]
pub computational_units: ::prost::alloc::vec::Vec<ComputationalUnitDescription>,
}