pub struct B2CopyFileBody {
pub source_file_id: String,
pub large_file_id: Option<String>,
pub file_name: String,
pub range: Option<String>,
pub metadata_directive: Option<B2MetadataDirective>,
pub content_type: Option<String>,
pub file_info: Option<HashMap<String, String>>,
pub file_retention: Option<B2BucketFileRetention>,
pub legal_hold: Option<B2FileLegalHold>,
pub source_server_side_encryption: Option<B2CustomerAgnosticServerSideEncryption>,
pub destination_server_side_encryption: Option<B2CustomerAgnosticServerSideEncryption>,
}Fields§
§source_file_id: StringThe ID of the source file being copied.
large_file_id: Option<String>The ID of the bucket where the copied file will be stored. If this is not set, the copied file will be added to the same bucket as the source file.
Note that the bucket containing the source file and the destination bucket must belong to the same account.
file_name: StringThe name of the new file being created.
range: Option<String>The range of bytes to copy. If not provided, the whole source file will be copied.
metadata_directive: Option<B2MetadataDirective>The strategy for how to populate metadata for the new file.
If COPY is the indicated strategy, then supplying the contentType or fileInfo param is an error.
content_type: Option<String>Must only be supplied if the metadataDirective is REPLACE.
The MIME type of the content of the file, which will be returned in the Content-Type header when downloading the file.
Use the Content-Type b2/x-auto to automatically set the stored Content-Type post upload.
In the case where a file extension is absent or the lookup fails, the Content-Type is set to application/octet-stream. The Content-Type mappings can be perused here.
file_info: Option<HashMap<String, String>>Must only be supplied if the metadataDirective is REPLACE.
This field stores the metadata that will be stored with the file. It follows the same rules that are applied to b2_upload_file.
file_retention: Option<B2BucketFileRetention>If present, specifies the Object Lock retention settings for the new file.
Setting the value requires the writeFileRetentions capability and that the destination bucket is Object Lock-enabled. See Object Lock for details.
legal_hold: Option<B2FileLegalHold>If present, specifies the Object Lock legal hold status for the new file.
Setting the value requires the writeFileLegalHolds capability and that the destination bucket is Object Lock-enabled. Object Lock for details.
source_server_side_encryption: Option<B2CustomerAgnosticServerSideEncryption>If present, specifies the parameters for Backblaze B2 to use for accessing the source file data using Server-Side Encryption.
This parameter is required if and only if the source file has been encrypted using Server-Side Encryption with Customer-Managed Keys (SSE-C),
and the provided encryption key must match the one with which the source file was encrypted. See [Server-Side Encryption][https://www.backblaze.com/docs/cloud-storage-enable-server-side-encryption-with-the-native-api] for details.
destination_server_side_encryption: Option<B2CustomerAgnosticServerSideEncryption>If present, specifies the parameters for Backblaze B2 to use for encrypting the copied data before storing the destination file using Server-Side Encryption. See [Server-Side Encryption][https://www.backblaze.com/docs/cloud-storage-enable-server-side-encryption-with-the-native-api] for details.
Implementations§
Source§impl B2CopyFileBody
impl B2CopyFileBody
Sourcepub fn builder() -> B2CopyFileBodyBuilder<((), (), (), (), (), (), (), (), (), (), ())>
pub fn builder() -> B2CopyFileBodyBuilder<((), (), (), (), (), (), (), (), (), (), ())>
Create a builder for building B2CopyFileBody.
On the builder, call .source_file_id(...), .large_file_id(...)(optional), .file_name(...), .range(...)(optional), .metadata_directive(...)(optional), .content_type(...)(optional), .file_info(...)(optional), .file_retention(...)(optional), .legal_hold(...)(optional), .source_server_side_encryption(...)(optional), .destination_server_side_encryption(...)(optional) to set the values of the fields.
Finally, call .build() to create the instance of B2CopyFileBody.
Trait Implementations§
Source§impl Clone for B2CopyFileBody
impl Clone for B2CopyFileBody
Source§fn clone(&self) -> B2CopyFileBody
fn clone(&self) -> B2CopyFileBody
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more