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
349
350
351
352
353
// This file is @generated by prost-build.
/// AWS S3 object metadata.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AwsS3ObjectMetadata {
    /// Required. Name of the S3 bucket.
    #[prost(string, tag = "1")]
    pub bucket: ::prost::alloc::string::String,
    /// Required. Name/key of the object.
    #[prost(string, tag = "2")]
    pub object_key: ::prost::alloc::string::String,
    /// Last modified time of the object.
    #[prost(message, optional, tag = "3")]
    pub last_modified_time: ::core::option::Option<::prost_types::Timestamp>,
    /// The MD5 checksum of the object's content.
    #[prost(string, tag = "4")]
    pub md5: ::prost::alloc::string::String,
    /// Required. Size of the object in bytes.
    #[prost(int64, tag = "5")]
    pub size: i64,
}
/// AWS S3 bucket metadata.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AwsS3BucketMetadata {
    /// Required. Name of the S3 bucket.
    #[prost(string, tag = "1")]
    pub bucket: ::prost::alloc::string::String,
    /// The path of transfer objects as an object key prefix ending with "/".
    #[prost(string, tag = "2")]
    pub path: ::prost::alloc::string::String,
}
/// Google Cloud Storage object metadata.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GcsObjectMetadata {
    /// Required. Name of the Cloud Storage bucket.
    #[prost(string, tag = "1")]
    pub bucket: ::prost::alloc::string::String,
    /// Required. Name/key of the object.
    #[prost(string, tag = "2")]
    pub object_key: ::prost::alloc::string::String,
    /// Last modified time of the object.
    #[prost(message, optional, tag = "3")]
    pub last_modified_time: ::core::option::Option<::prost_types::Timestamp>,
    /// The MD5 checksum of the object's content.
    #[prost(string, tag = "4")]
    pub md5: ::prost::alloc::string::String,
    /// The CRC32C checksum of the object's content.
    #[prost(string, tag = "5")]
    pub crc32c: ::prost::alloc::string::String,
    /// Required. Size of the object in bytes.
    #[prost(int64, tag = "6")]
    pub size: i64,
}
/// Google Cloud Storage bucket metadata.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GcsBucketMetadata {
    /// Required. Name of the Cloud Storage bucket.
    #[prost(string, tag = "1")]
    pub bucket: ::prost::alloc::string::String,
    /// The path of transfer objects as an object key prefix ending with "/".
    #[prost(string, tag = "2")]
    pub path: ::prost::alloc::string::String,
}
/// Azure Blob Storage blob metadata.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AzureBlobMetadata {
    /// Required. Name of the Azure Blob storage account.
    #[prost(string, tag = "1")]
    pub account: ::prost::alloc::string::String,
    /// Required. Name of the container.
    #[prost(string, tag = "2")]
    pub container: ::prost::alloc::string::String,
    /// Required. Name of the blob.
    #[prost(string, tag = "3")]
    pub blob_name: ::prost::alloc::string::String,
    /// Last modified time of the blob.
    #[prost(message, optional, tag = "4")]
    pub last_modified_time: ::core::option::Option<::prost_types::Timestamp>,
    /// The MD5 checksum of the object's content.
    #[prost(string, tag = "5")]
    pub md5: ::prost::alloc::string::String,
    /// Required. Size of the blob in bytes.
    #[prost(int64, tag = "6")]
    pub size: i64,
}
/// Azure Blob Storage container metadata.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AzureBlobContainerMetadata {
    /// Required. Name of the Azure Blob storage account.
    #[prost(string, tag = "1")]
    pub account: ::prost::alloc::string::String,
    /// Required. Name of the container.
    #[prost(string, tag = "2")]
    pub container: ::prost::alloc::string::String,
    /// The path of transfer blobs as a blob name prefix ending with "/".
    #[prost(string, tag = "3")]
    pub path: ::prost::alloc::string::String,
}
/// POSIX file metadata.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PosixFileMetadata {
    /// Required. Path of a file.
    #[prost(string, tag = "1")]
    pub path: ::prost::alloc::string::String,
    /// Last modified time (mtime) of the file.
    #[prost(message, optional, tag = "2")]
    pub last_modified_time: ::core::option::Option<::prost_types::Timestamp>,
    /// The CRC32C checksum of the object's content.
    #[prost(string, tag = "3")]
    pub crc32c: ::prost::alloc::string::String,
    /// Required. Size of the file in bytes.
    #[prost(int64, tag = "4")]
    pub size: i64,
}
/// HTTP file metadata.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HttpFileMetadata {
    /// Required. Url of the HTTP file.
    #[prost(string, tag = "1")]
    pub url: ::prost::alloc::string::String,
    /// The MD5 checksum of the file's content.
    #[prost(string, tag = "2")]
    pub md5: ::prost::alloc::string::String,
    /// Size of the file in bytes.
    #[prost(int64, tag = "3")]
    pub size: i64,
}
/// HTTP manifest file metadata.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HttpManifestMetadata {
    /// Required. Url of the HTTP manifest which contains the list of HTTP files to
    /// transfer.
    #[prost(string, tag = "1")]
    pub url: ::prost::alloc::string::String,
}
/// Metadata of a blob/file/object.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ObjectMetadata {
    /// Required. Storage system type of the object.
    #[prost(enumeration = "StorageSystemType", tag = "1")]
    pub r#type: i32,
    #[prost(oneof = "object_metadata::Metadata", tags = "3, 4, 5, 6, 7")]
    pub metadata: ::core::option::Option<object_metadata::Metadata>,
}
/// Nested message and enum types in `ObjectMetadata`.
pub mod object_metadata {
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Metadata {
        /// Object metadata of AWS S3.
        #[prost(message, tag = "3")]
        AwsS3Object(super::AwsS3ObjectMetadata),
        /// Blob metadata of Azure Blob Storage.
        #[prost(message, tag = "4")]
        AzureBlob(super::AzureBlobMetadata),
        /// Object metadata of Google Cloud Storage.
        #[prost(message, tag = "5")]
        GcsObject(super::GcsObjectMetadata),
        /// File/directory metadata of POSIX file system.
        #[prost(message, tag = "6")]
        PosixFile(super::PosixFileMetadata),
        /// Metadata of a file on a HTTP server.
        #[prost(message, tag = "7")]
        HttpFile(super::HttpFileMetadata),
    }
}
/// Metadata of a bucket/container/directory
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ContainerMetadata {
    /// Required. Storage system type of the object.
    #[prost(enumeration = "StorageSystemType", tag = "1")]
    pub r#type: i32,
    #[prost(oneof = "container_metadata::Metadata", tags = "3, 4, 5, 6, 7")]
    pub metadata: ::core::option::Option<container_metadata::Metadata>,
}
/// Nested message and enum types in `ContainerMetadata`.
pub mod container_metadata {
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Metadata {
        /// Bucket metadata of AWS S3.
        #[prost(message, tag = "3")]
        AwsS3Bucket(super::AwsS3BucketMetadata),
        /// Container metadata of Azure Blob Storage.
        #[prost(message, tag = "4")]
        AzureBlobContainer(super::AzureBlobContainerMetadata),
        /// Bucket metadata of Google Cloud Storage.
        #[prost(message, tag = "5")]
        GcsBucket(super::GcsBucketMetadata),
        /// Directory metadata of POSIX file system.
        #[prost(message, tag = "6")]
        PosixDirectory(super::PosixFileMetadata),
        /// Metadata of a manifest file on a HTTP server.
        #[prost(message, tag = "7")]
        HttpManifest(super::HttpManifestMetadata),
    }
}
/// Schema of log payload of transfer activity.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TransferActivityLog {
    /// Required. Name of the transfer operation.
    #[prost(string, tag = "1")]
    pub operation: ::prost::alloc::string::String,
    /// Required. The action which the transfer operation made.
    #[prost(enumeration = "transfer_activity_log::Action", tag = "2")]
    pub action: i32,
    /// Required. Status of the action.
    #[prost(message, optional, tag = "3")]
    pub status: ::core::option::Option<transfer_activity_log::Status>,
    /// Metadata of source bucket/container/directory. Only set if the action is
    /// FIND.
    #[prost(message, optional, tag = "4")]
    pub source_container: ::core::option::Option<ContainerMetadata>,
    /// Metadata of destination bucket/container/directory. Only set if the action
    /// is FIND.
    #[prost(message, optional, tag = "5")]
    pub destination_container: ::core::option::Option<ContainerMetadata>,
    /// Metadata of the source blob/file/object. Only set if the action is COPY or
    /// DELETE when deletion is applied to source.
    #[prost(message, optional, tag = "6")]
    pub source_object: ::core::option::Option<ObjectMetadata>,
    /// Metadata of the destination blob/file/object. Only set if the action is
    /// or DELETE when deletion is applied to destination.
    #[prost(message, optional, tag = "7")]
    pub destination_object: ::core::option::Option<ObjectMetadata>,
    /// Required. Completion time of the action.
    #[prost(message, optional, tag = "8")]
    pub complete_time: ::core::option::Option<::prost_types::Timestamp>,
}
/// Nested message and enum types in `TransferActivityLog`.
pub mod transfer_activity_log {
    /// Status of an action.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct Status {
        /// Required. A string value of the Google RPC code as the status of the
        /// action. The action succeeded if it's `OK`, and failed otherwise.
        #[prost(string, tag = "1")]
        pub status_code: ::prost::alloc::string::String,
        /// A string that represents the type of error encountered. Populated only if
        /// status_code is not `OK`.
        #[prost(string, tag = "2")]
        pub error_type: ::prost::alloc::string::String,
        /// A human-readable error message for the failure. Populated only if
        /// status_code is not `OK`.
        #[prost(string, tag = "3")]
        pub error_message: ::prost::alloc::string::String,
    }
    /// Possible actions which a transfer operation can make.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum Action {
        /// Unspeficied action.
        Unspecified = 0,
        /// Finding work to do, such as listing files in a directory or listing
        /// objects in a bucket.
        Find = 1,
        /// Copying files or objects.
        Copy = 2,
        /// Deleting files or objects at destination.
        Delete = 3,
    }
    impl Action {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Action::Unspecified => "ACTION_UNSPECIFIED",
                Action::Find => "FIND",
                Action::Copy => "COPY",
                Action::Delete => "DELETE",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "ACTION_UNSPECIFIED" => Some(Self::Unspecified),
                "FIND" => Some(Self::Find),
                "COPY" => Some(Self::Copy),
                "DELETE" => Some(Self::Delete),
                _ => None,
            }
        }
    }
}
/// Type of the storage system.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum StorageSystemType {
    /// Unspecified.
    Unspecified = 0,
    /// AWS S3.
    AwsS3 = 1,
    /// Azure Blob Storage.
    AzureBlob = 2,
    /// Google Cloud Storage.
    Gcs = 3,
    /// POSIX file system.
    PosixFs = 4,
    /// HTTP/HTTPS servers.
    Http = 5,
}
impl StorageSystemType {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            StorageSystemType::Unspecified => "STORAGE_SYSTEM_TYPE_UNSPECIFIED",
            StorageSystemType::AwsS3 => "AWS_S3",
            StorageSystemType::AzureBlob => "AZURE_BLOB",
            StorageSystemType::Gcs => "GCS",
            StorageSystemType::PosixFs => "POSIX_FS",
            StorageSystemType::Http => "HTTP",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "STORAGE_SYSTEM_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
            "AWS_S3" => Some(Self::AwsS3),
            "AZURE_BLOB" => Some(Self::AzureBlob),
            "GCS" => Some(Self::Gcs),
            "POSIX_FS" => Some(Self::PosixFs),
            "HTTP" => Some(Self::Http),
            _ => None,
        }
    }
}