pub struct FileVersionBuilder { /* private fields */ }Expand description
Builder for FileVersion entity
Provides a fluent API for constructing FileVersion instances. System fields (id, metadata, timestamps) are auto-initialized.
Implementations§
Source§impl FileVersionBuilder
impl FileVersionBuilder
Sourcepub fn version_number(self, value: i32) -> Self
pub fn version_number(self, value: i32) -> Self
Set the version_number field (required)
Sourcepub fn version_type(self, value: VersionType) -> Self
pub fn version_type(self, value: VersionType) -> Self
Set the version_type field (required)
Sourcepub fn storage_key(self, value: String) -> Self
pub fn storage_key(self, value: String) -> Self
Set the storage_key field (required)
Sourcepub fn storage_backend(self, value: String) -> Self
pub fn storage_backend(self, value: String) -> Self
Set the storage_backend field (default: "local".to_string())
Sourcepub fn checksum_md5(self, value: String) -> Self
pub fn checksum_md5(self, value: String) -> Self
Set the checksum_md5 field (optional)
Sourcepub fn checksum_sha256(self, value: String) -> Self
pub fn checksum_sha256(self, value: String) -> Self
Set the checksum_sha256 field (optional)
Sourcepub fn created_by_id(self, value: Uuid) -> Self
pub fn created_by_id(self, value: Uuid) -> Self
Set the created_by_id field (required)
Sourcepub fn change_summary(self, value: String) -> Self
pub fn change_summary(self, value: String) -> Self
Set the change_summary field (optional)
Sourcepub fn is_current(self, value: bool) -> Self
pub fn is_current(self, value: bool) -> Self
Set the is_current field (default: false)
Sourcepub fn restored_from_id(self, value: Uuid) -> Self
pub fn restored_from_id(self, value: Uuid) -> Self
Set the restored_from_id field (optional)
Sourcepub fn expires_at(self, value: DateTime<Utc>) -> Self
pub fn expires_at(self, value: DateTime<Utc>) -> Self
Set the expires_at field (optional)
Sourcepub fn status(self, value: FileVersionStatus) -> Self
pub fn status(self, value: FileVersionStatus) -> Self
Set the status field (default: FileVersionStatus::default())
Sourcepub fn size_bytes(self, value: i64) -> Self
pub fn size_bytes(self, value: i64) -> Self
Set the size_bytes field (required)
Sourcepub fn build(self) -> Result<FileVersion, String>
pub fn build(self) -> Result<FileVersion, String>
Build the FileVersion entity
Returns Err if any required field without a default is missing.
Trait Implementations§
Source§impl Clone for FileVersionBuilder
impl Clone for FileVersionBuilder
Source§impl Debug for FileVersionBuilder
impl Debug for FileVersionBuilder
Auto Trait Implementations§
impl Freeze for FileVersionBuilder
impl RefUnwindSafe for FileVersionBuilder
impl Send for FileVersionBuilder
impl Sync for FileVersionBuilder
impl Unpin for FileVersionBuilder
impl UnsafeUnpin for FileVersionBuilder
impl UnwindSafe for FileVersionBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more