1#[allow(clippy::derive_partial_eq_without_eq)]
4#[derive(Clone, PartialEq, ::prost::Message)]
5pub struct StorageUnits {
6 #[prost(string, tag = "1")]
10 pub unit_kind: ::prost::alloc::string::String,
11 #[prost(uint64, tag = "2")]
13 pub count: u64,
14}
15#[allow(clippy::derive_partial_eq_without_eq)]
17#[derive(Clone, PartialEq, ::prost::Message)]
18pub struct ComputationalUnits {
19 #[prost(string, tag = "1")]
22 pub unit_kind: ::prost::alloc::string::String,
23 #[prost(string, tag = "2")]
26 pub availability_zone: ::prost::alloc::string::String,
27 #[prost(uint64, tag = "3")]
29 pub count: u64,
30}
31#[allow(clippy::derive_partial_eq_without_eq)]
34#[derive(Clone, PartialEq, ::prost::Message)]
35pub struct AllocatedComputationalUnit {
36 #[prost(string, tag = "1")]
38 pub host: ::prost::alloc::string::String,
39 #[prost(uint32, tag = "2")]
41 pub port: u32,
42 #[prost(string, tag = "3")]
44 pub unit_kind: ::prost::alloc::string::String,
45}
46#[allow(clippy::derive_partial_eq_without_eq)]
48#[derive(Clone, PartialEq, ::prost::Message)]
49pub struct Resources {
50 #[prost(message, repeated, tag = "1")]
52 pub storage_units: ::prost::alloc::vec::Vec<StorageUnits>,
53 #[prost(message, repeated, tag = "2")]
55 pub computational_units: ::prost::alloc::vec::Vec<ComputationalUnits>,
56}
57#[allow(clippy::derive_partial_eq_without_eq)]
58#[derive(Clone, PartialEq, ::prost::Message)]
59pub struct ServerlessResources {
60 #[prost(string, tag = "1")]
62 pub shared_database_path: ::prost::alloc::string::String,
63}
64#[allow(clippy::derive_partial_eq_without_eq)]
65#[derive(Clone, PartialEq, ::prost::Message)]
66pub struct DatabaseOptions {
67 #[prost(bool, tag = "1")]
69 pub disable_tx_service: bool,
70 #[prost(bool, tag = "2")]
72 pub disable_external_subdomain: bool,
73 #[prost(uint32, tag = "3")]
75 pub plan_resolution: u32,
76}
77#[allow(clippy::derive_partial_eq_without_eq)]
79#[derive(Clone, PartialEq, ::prost::Message)]
80pub struct SchemaOperationQuotas {
81 #[prost(message, repeated, tag = "1")]
83 pub leaky_bucket_quotas: ::prost::alloc::vec::Vec<
84 schema_operation_quotas::LeakyBucket,
85 >,
86}
87pub mod schema_operation_quotas {
89 #[allow(clippy::derive_partial_eq_without_eq)]
91 #[derive(Clone, PartialEq, ::prost::Message)]
92 pub struct LeakyBucket {
93 #[prost(double, tag = "1")]
95 pub bucket_size: f64,
96 #[prost(uint64, tag = "2")]
98 pub bucket_seconds: u64,
99 }
100}
101#[allow(clippy::derive_partial_eq_without_eq)]
103#[derive(Clone, PartialEq, ::prost::Message)]
104pub struct DatabaseQuotas {
105 #[prost(uint64, tag = "1")]
107 pub data_size_hard_quota: u64,
108 #[prost(uint64, tag = "2")]
113 pub data_size_soft_quota: u64,
114 #[prost(uint64, tag = "3")]
116 pub data_stream_shards_quota: u64,
117 #[prost(uint64, tag = "5")]
119 pub data_stream_reserved_storage_quota: u64,
120 #[prost(uint32, tag = "4")]
123 pub ttl_min_run_internal_seconds: u32,
124}
125#[allow(clippy::derive_partial_eq_without_eq)]
129#[derive(Clone, PartialEq, ::prost::Message)]
130pub struct CreateDatabaseRequest {
131 #[prost(message, optional, tag = "1")]
132 pub operation_params: ::core::option::Option<super::operations::OperationParams>,
133 #[prost(string, tag = "2")]
135 pub path: ::prost::alloc::string::String,
136 #[prost(message, optional, tag = "4")]
138 pub options: ::core::option::Option<DatabaseOptions>,
139 #[prost(map = "string, string", tag = "5")]
141 pub attributes: ::std::collections::HashMap<
142 ::prost::alloc::string::String,
143 ::prost::alloc::string::String,
144 >,
145 #[prost(message, optional, tag = "8")]
147 pub schema_operation_quotas: ::core::option::Option<SchemaOperationQuotas>,
148 #[prost(string, tag = "9")]
150 pub idempotency_key: ::prost::alloc::string::String,
151 #[prost(message, optional, tag = "10")]
153 pub database_quotas: ::core::option::Option<DatabaseQuotas>,
154 #[prost(oneof = "create_database_request::ResourcesKind", tags = "3, 6, 7")]
155 pub resources_kind: ::core::option::Option<create_database_request::ResourcesKind>,
156}
157pub mod create_database_request {
159 #[allow(clippy::derive_partial_eq_without_eq)]
160 #[derive(Clone, PartialEq, ::prost::Oneof)]
161 pub enum ResourcesKind {
162 #[prost(message, tag = "3")]
164 Resources(super::Resources),
165 #[prost(message, tag = "6")]
167 SharedResources(super::Resources),
168 #[prost(message, tag = "7")]
170 ServerlessResources(super::ServerlessResources),
171 }
172}
173#[allow(clippy::derive_partial_eq_without_eq)]
174#[derive(Clone, PartialEq, ::prost::Message)]
175pub struct CreateDatabaseResponse {
176 #[prost(message, optional, tag = "1")]
177 pub operation: ::core::option::Option<super::operations::Operation>,
178}
179#[allow(clippy::derive_partial_eq_without_eq)]
181#[derive(Clone, PartialEq, ::prost::Message)]
182pub struct GetDatabaseStatusRequest {
183 #[prost(string, tag = "1")]
185 pub path: ::prost::alloc::string::String,
186 #[prost(message, optional, tag = "2")]
188 pub operation_params: ::core::option::Option<super::operations::OperationParams>,
189}
190#[allow(clippy::derive_partial_eq_without_eq)]
191#[derive(Clone, PartialEq, ::prost::Message)]
192pub struct GetDatabaseStatusResponse {
193 #[prost(message, optional, tag = "1")]
195 pub operation: ::core::option::Option<super::operations::Operation>,
196}
197#[allow(clippy::derive_partial_eq_without_eq)]
198#[derive(Clone, PartialEq, ::prost::Message)]
199pub struct GetDatabaseStatusResult {
200 #[prost(string, tag = "1")]
202 pub path: ::prost::alloc::string::String,
203 #[prost(enumeration = "get_database_status_result::State", tag = "2")]
205 pub state: i32,
206 #[prost(message, optional, tag = "4")]
208 pub allocated_resources: ::core::option::Option<Resources>,
209 #[prost(message, repeated, tag = "5")]
211 pub registered_resources: ::prost::alloc::vec::Vec<AllocatedComputationalUnit>,
212 #[prost(uint64, tag = "6")]
215 pub generation: u64,
216 #[prost(message, optional, tag = "9")]
218 pub schema_operation_quotas: ::core::option::Option<SchemaOperationQuotas>,
219 #[prost(message, optional, tag = "10")]
221 pub database_quotas: ::core::option::Option<DatabaseQuotas>,
222 #[prost(oneof = "get_database_status_result::ResourcesKind", tags = "3, 7, 8")]
223 pub resources_kind: ::core::option::Option<
224 get_database_status_result::ResourcesKind,
225 >,
226}
227pub mod get_database_status_result {
229 #[derive(
230 Clone,
231 Copy,
232 Debug,
233 PartialEq,
234 Eq,
235 Hash,
236 PartialOrd,
237 Ord,
238 ::prost::Enumeration
239 )]
240 #[repr(i32)]
241 pub enum State {
242 Unspecified = 0,
243 Creating = 1,
244 Running = 2,
245 Removing = 3,
246 PendingResources = 4,
247 Configuring = 5,
248 }
249 impl State {
250 pub fn as_str_name(&self) -> &'static str {
255 match self {
256 State::Unspecified => "STATE_UNSPECIFIED",
257 State::Creating => "CREATING",
258 State::Running => "RUNNING",
259 State::Removing => "REMOVING",
260 State::PendingResources => "PENDING_RESOURCES",
261 State::Configuring => "CONFIGURING",
262 }
263 }
264 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
266 match value {
267 "STATE_UNSPECIFIED" => Some(Self::Unspecified),
268 "CREATING" => Some(Self::Creating),
269 "RUNNING" => Some(Self::Running),
270 "REMOVING" => Some(Self::Removing),
271 "PENDING_RESOURCES" => Some(Self::PendingResources),
272 "CONFIGURING" => Some(Self::Configuring),
273 _ => None,
274 }
275 }
276 }
277 #[allow(clippy::derive_partial_eq_without_eq)]
278 #[derive(Clone, PartialEq, ::prost::Oneof)]
279 pub enum ResourcesKind {
280 #[prost(message, tag = "3")]
282 RequiredResources(super::Resources),
283 #[prost(message, tag = "7")]
284 RequiredSharedResources(super::Resources),
285 #[prost(message, tag = "8")]
286 ServerlessResources(super::ServerlessResources),
287 }
288}
289#[allow(clippy::derive_partial_eq_without_eq)]
291#[derive(Clone, PartialEq, ::prost::Message)]
292pub struct AlterDatabaseRequest {
293 #[prost(string, tag = "1")]
295 pub path: ::prost::alloc::string::String,
296 #[prost(message, repeated, tag = "2")]
298 pub computational_units_to_add: ::prost::alloc::vec::Vec<ComputationalUnits>,
299 #[prost(message, repeated, tag = "3")]
301 pub computational_units_to_remove: ::prost::alloc::vec::Vec<ComputationalUnits>,
302 #[prost(message, repeated, tag = "4")]
304 pub storage_units_to_add: ::prost::alloc::vec::Vec<StorageUnits>,
305 #[prost(message, repeated, tag = "5")]
307 pub computational_units_to_register: ::prost::alloc::vec::Vec<
308 AllocatedComputationalUnit,
309 >,
310 #[prost(message, repeated, tag = "6")]
312 pub computational_units_to_deregister: ::prost::alloc::vec::Vec<
313 AllocatedComputationalUnit,
314 >,
315 #[prost(message, optional, tag = "7")]
317 pub operation_params: ::core::option::Option<super::operations::OperationParams>,
318 #[prost(uint64, tag = "8")]
320 pub generation: u64,
321 #[prost(message, optional, tag = "9")]
323 pub schema_operation_quotas: ::core::option::Option<SchemaOperationQuotas>,
324 #[prost(string, tag = "10")]
326 pub idempotency_key: ::prost::alloc::string::String,
327 #[prost(message, optional, tag = "11")]
329 pub database_quotas: ::core::option::Option<DatabaseQuotas>,
330 #[prost(map = "string, string", tag = "12")]
332 pub alter_attributes: ::std::collections::HashMap<
333 ::prost::alloc::string::String,
334 ::prost::alloc::string::String,
335 >,
336}
337#[allow(clippy::derive_partial_eq_without_eq)]
338#[derive(Clone, PartialEq, ::prost::Message)]
339pub struct AlterDatabaseResponse {
340 #[prost(message, optional, tag = "1")]
341 pub operation: ::core::option::Option<super::operations::Operation>,
342}
343#[allow(clippy::derive_partial_eq_without_eq)]
345#[derive(Clone, PartialEq, ::prost::Message)]
346pub struct ListDatabasesRequest {
347 #[prost(message, optional, tag = "1")]
349 pub operation_params: ::core::option::Option<super::operations::OperationParams>,
350}
351#[allow(clippy::derive_partial_eq_without_eq)]
352#[derive(Clone, PartialEq, ::prost::Message)]
353pub struct ListDatabasesResponse {
354 #[prost(message, optional, tag = "1")]
356 pub operation: ::core::option::Option<super::operations::Operation>,
357}
358#[allow(clippy::derive_partial_eq_without_eq)]
359#[derive(Clone, PartialEq, ::prost::Message)]
360pub struct ListDatabasesResult {
361 #[prost(string, repeated, tag = "1")]
362 pub paths: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
363}
364#[allow(clippy::derive_partial_eq_without_eq)]
366#[derive(Clone, PartialEq, ::prost::Message)]
367pub struct RemoveDatabaseRequest {
368 #[prost(string, tag = "1")]
370 pub path: ::prost::alloc::string::String,
371 #[prost(message, optional, tag = "2")]
372 pub operation_params: ::core::option::Option<super::operations::OperationParams>,
373}
374#[allow(clippy::derive_partial_eq_without_eq)]
375#[derive(Clone, PartialEq, ::prost::Message)]
376pub struct RemoveDatabaseResponse {
377 #[prost(message, optional, tag = "1")]
378 pub operation: ::core::option::Option<super::operations::Operation>,
379}
380#[allow(clippy::derive_partial_eq_without_eq)]
381#[derive(Clone, PartialEq, ::prost::Message)]
382pub struct StorageUnitDescription {
383 #[prost(string, tag = "1")]
384 pub kind: ::prost::alloc::string::String,
385 #[prost(map = "string, string", tag = "2")]
386 pub labels: ::std::collections::HashMap<
387 ::prost::alloc::string::String,
388 ::prost::alloc::string::String,
389 >,
390}
391#[allow(clippy::derive_partial_eq_without_eq)]
392#[derive(Clone, PartialEq, ::prost::Message)]
393pub struct AvailabilityZoneDescription {
394 #[prost(string, tag = "1")]
395 pub name: ::prost::alloc::string::String,
396 #[prost(map = "string, string", tag = "2")]
397 pub labels: ::std::collections::HashMap<
398 ::prost::alloc::string::String,
399 ::prost::alloc::string::String,
400 >,
401}
402#[allow(clippy::derive_partial_eq_without_eq)]
403#[derive(Clone, PartialEq, ::prost::Message)]
404pub struct ComputationalUnitDescription {
405 #[prost(string, tag = "1")]
406 pub kind: ::prost::alloc::string::String,
407 #[prost(map = "string, string", tag = "2")]
408 pub labels: ::std::collections::HashMap<
409 ::prost::alloc::string::String,
410 ::prost::alloc::string::String,
411 >,
412 #[prost(string, repeated, tag = "3")]
413 pub allowed_availability_zones: ::prost::alloc::vec::Vec<
414 ::prost::alloc::string::String,
415 >,
416}
417#[allow(clippy::derive_partial_eq_without_eq)]
418#[derive(Clone, PartialEq, ::prost::Message)]
419pub struct DescribeDatabaseOptionsRequest {
420 #[prost(message, optional, tag = "1")]
422 pub operation_params: ::core::option::Option<super::operations::OperationParams>,
423}
424#[allow(clippy::derive_partial_eq_without_eq)]
425#[derive(Clone, PartialEq, ::prost::Message)]
426pub struct DescribeDatabaseOptionsResponse {
427 #[prost(message, optional, tag = "1")]
429 pub operation: ::core::option::Option<super::operations::Operation>,
430}
431#[allow(clippy::derive_partial_eq_without_eq)]
432#[derive(Clone, PartialEq, ::prost::Message)]
433pub struct DescribeDatabaseOptionsResult {
434 #[prost(message, repeated, tag = "1")]
435 pub storage_units: ::prost::alloc::vec::Vec<StorageUnitDescription>,
436 #[prost(message, repeated, tag = "2")]
437 pub availability_zones: ::prost::alloc::vec::Vec<AvailabilityZoneDescription>,
438 #[prost(message, repeated, tag = "3")]
439 pub computational_units: ::prost::alloc::vec::Vec<ComputationalUnitDescription>,
440}