ydb_grpc_bindings/generated/
ydb.import.rs

1/// / Common
2#[allow(clippy::derive_partial_eq_without_eq)]
3#[derive(Clone, PartialEq, ::prost::Message)]
4pub struct ImportProgress {}
5/// Nested message and enum types in `ImportProgress`.
6pub mod import_progress {
7    #[derive(
8        Clone,
9        Copy,
10        Debug,
11        PartialEq,
12        Eq,
13        Hash,
14        PartialOrd,
15        Ord,
16        ::prost::Enumeration
17    )]
18    #[repr(i32)]
19    pub enum Progress {
20        Unspecified = 0,
21        Preparing = 1,
22        TransferData = 2,
23        BuildIndexes = 3,
24        Done = 4,
25        Cancellation = 5,
26        Cancelled = 6,
27    }
28    impl Progress {
29        /// String value of the enum field names used in the ProtoBuf definition.
30        ///
31        /// The values are not transformed in any way and thus are considered stable
32        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
33        pub fn as_str_name(&self) -> &'static str {
34            match self {
35                Progress::Unspecified => "PROGRESS_UNSPECIFIED",
36                Progress::Preparing => "PROGRESS_PREPARING",
37                Progress::TransferData => "PROGRESS_TRANSFER_DATA",
38                Progress::BuildIndexes => "PROGRESS_BUILD_INDEXES",
39                Progress::Done => "PROGRESS_DONE",
40                Progress::Cancellation => "PROGRESS_CANCELLATION",
41                Progress::Cancelled => "PROGRESS_CANCELLED",
42            }
43        }
44        /// Creates an enum from field names used in the ProtoBuf definition.
45        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
46            match value {
47                "PROGRESS_UNSPECIFIED" => Some(Self::Unspecified),
48                "PROGRESS_PREPARING" => Some(Self::Preparing),
49                "PROGRESS_TRANSFER_DATA" => Some(Self::TransferData),
50                "PROGRESS_BUILD_INDEXES" => Some(Self::BuildIndexes),
51                "PROGRESS_DONE" => Some(Self::Done),
52                "PROGRESS_CANCELLATION" => Some(Self::Cancellation),
53                "PROGRESS_CANCELLED" => Some(Self::Cancelled),
54                _ => None,
55            }
56        }
57    }
58}
59#[allow(clippy::derive_partial_eq_without_eq)]
60#[derive(Clone, PartialEq, ::prost::Message)]
61pub struct ImportItemProgress {
62    #[prost(uint32, tag = "1")]
63    pub parts_total: u32,
64    #[prost(uint32, tag = "2")]
65    pub parts_completed: u32,
66    #[prost(message, optional, tag = "3")]
67    pub start_time: ::core::option::Option<super::super::google::protobuf::Timestamp>,
68    #[prost(message, optional, tag = "4")]
69    pub end_time: ::core::option::Option<super::super::google::protobuf::Timestamp>,
70}
71/// / S3
72#[allow(clippy::derive_partial_eq_without_eq)]
73#[derive(Clone, PartialEq, ::prost::Message)]
74pub struct ImportFromS3Settings {
75    #[prost(string, tag = "1")]
76    pub endpoint: ::prost::alloc::string::String,
77    /// HTTPS if not specified
78    #[prost(enumeration = "import_from_s3_settings::Scheme", tag = "2")]
79    pub scheme: i32,
80    #[prost(string, tag = "3")]
81    pub bucket: ::prost::alloc::string::String,
82    #[prost(string, tag = "4")]
83    pub access_key: ::prost::alloc::string::String,
84    #[prost(string, tag = "5")]
85    pub secret_key: ::prost::alloc::string::String,
86    #[prost(message, repeated, tag = "6")]
87    pub items: ::prost::alloc::vec::Vec<import_from_s3_settings::Item>,
88    #[prost(string, tag = "7")]
89    pub description: ::prost::alloc::string::String,
90    #[prost(uint32, tag = "8")]
91    pub number_of_retries: u32,
92}
93/// Nested message and enum types in `ImportFromS3Settings`.
94pub mod import_from_s3_settings {
95    #[allow(clippy::derive_partial_eq_without_eq)]
96    #[derive(Clone, PartialEq, ::prost::Message)]
97    pub struct Item {
98        /// YDB tables in S3 are stored in one or more objects (see ydb_export.proto).
99        /// The object name begins with 'source_prefix'.
100        /// This prefix is followed by:
101        /// '/data_PartNumber', where 'PartNumber' represents the index of the part, starting at zero;
102        /// '/scheme.pb' - object with information about scheme, indexes, etc.
103        #[prost(string, tag = "1")]
104        pub source_prefix: ::prost::alloc::string::String,
105        /// Database path to a table to import to.
106        #[prost(string, tag = "2")]
107        pub destination_path: ::prost::alloc::string::String,
108    }
109    #[derive(
110        Clone,
111        Copy,
112        Debug,
113        PartialEq,
114        Eq,
115        Hash,
116        PartialOrd,
117        Ord,
118        ::prost::Enumeration
119    )]
120    #[repr(i32)]
121    pub enum Scheme {
122        Unspecified = 0,
123        Http = 1,
124        Https = 2,
125    }
126    impl Scheme {
127        /// String value of the enum field names used in the ProtoBuf definition.
128        ///
129        /// The values are not transformed in any way and thus are considered stable
130        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
131        pub fn as_str_name(&self) -> &'static str {
132            match self {
133                Scheme::Unspecified => "UNSPECIFIED",
134                Scheme::Http => "HTTP",
135                Scheme::Https => "HTTPS",
136            }
137        }
138        /// Creates an enum from field names used in the ProtoBuf definition.
139        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
140            match value {
141                "UNSPECIFIED" => Some(Self::Unspecified),
142                "HTTP" => Some(Self::Http),
143                "HTTPS" => Some(Self::Https),
144                _ => None,
145            }
146        }
147    }
148}
149#[allow(clippy::derive_partial_eq_without_eq)]
150#[derive(Clone, PartialEq, ::prost::Message)]
151pub struct ImportFromS3Result {}
152#[allow(clippy::derive_partial_eq_without_eq)]
153#[derive(Clone, PartialEq, ::prost::Message)]
154pub struct ImportFromS3Metadata {
155    #[prost(message, optional, tag = "1")]
156    pub settings: ::core::option::Option<ImportFromS3Settings>,
157    #[prost(enumeration = "import_progress::Progress", tag = "2")]
158    pub progress: i32,
159    #[prost(message, repeated, tag = "3")]
160    pub items_progress: ::prost::alloc::vec::Vec<ImportItemProgress>,
161}
162#[allow(clippy::derive_partial_eq_without_eq)]
163#[derive(Clone, PartialEq, ::prost::Message)]
164pub struct ImportFromS3Request {
165    #[prost(message, optional, tag = "1")]
166    pub operation_params: ::core::option::Option<super::operations::OperationParams>,
167    #[prost(message, optional, tag = "2")]
168    pub settings: ::core::option::Option<ImportFromS3Settings>,
169}
170#[allow(clippy::derive_partial_eq_without_eq)]
171#[derive(Clone, PartialEq, ::prost::Message)]
172pub struct ImportFromS3Response {
173    /// operation.result = ImportFromS3Result
174    /// operation.metadata = ImportFromS3Metadata
175    #[prost(message, optional, tag = "1")]
176    pub operation: ::core::option::Option<super::operations::Operation>,
177}
178/// / Data
179#[allow(clippy::derive_partial_eq_without_eq)]
180#[derive(Clone, PartialEq, ::prost::Message)]
181pub struct YdbDumpFormat {
182    #[prost(string, repeated, tag = "1")]
183    pub columns: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
184}
185#[allow(clippy::derive_partial_eq_without_eq)]
186#[derive(Clone, PartialEq, ::prost::Message)]
187pub struct ImportDataResult {}
188#[allow(clippy::derive_partial_eq_without_eq)]
189#[derive(Clone, PartialEq, ::prost::Message)]
190pub struct ImportDataRequest {
191    #[prost(message, optional, tag = "1")]
192    pub operation_params: ::core::option::Option<super::operations::OperationParams>,
193    /// Full path to table
194    #[prost(string, tag = "2")]
195    pub path: ::prost::alloc::string::String,
196    /// Data serialized in the selected format. Restrictions:
197    /// - sorted by primary key;
198    /// - all keys must be from the same partition;
199    /// - table has no global secondary indexes;
200    /// - size of serialized data is limited to 8 MB.
201    #[prost(bytes = "vec", tag = "3")]
202    pub data: ::prost::alloc::vec::Vec<u8>,
203    #[prost(oneof = "import_data_request::Format", tags = "4")]
204    pub format: ::core::option::Option<import_data_request::Format>,
205}
206/// Nested message and enum types in `ImportDataRequest`.
207pub mod import_data_request {
208    #[allow(clippy::derive_partial_eq_without_eq)]
209    #[derive(Clone, PartialEq, ::prost::Oneof)]
210    pub enum Format {
211        /// Result of `ydb tools dump`
212        #[prost(message, tag = "4")]
213        YdbDump(super::YdbDumpFormat),
214    }
215}
216#[allow(clippy::derive_partial_eq_without_eq)]
217#[derive(Clone, PartialEq, ::prost::Message)]
218pub struct ImportDataResponse {
219    /// operation.result = ImportDataResult
220    #[prost(message, optional, tag = "1")]
221    pub operation: ::core::option::Option<super::operations::Operation>,
222}