pub struct MaintenanceRequestBuilder { /* private fields */ }Expand description
Builder for MaintenanceRequest entity
Provides a fluent API for constructing MaintenanceRequest instances. System fields (id, metadata, timestamps) are auto-initialized.
Implementations§
Source§impl MaintenanceRequestBuilder
impl MaintenanceRequestBuilder
Sourcepub fn description(self, value: String) -> Self
pub fn description(self, value: String) -> Self
Set the description field (optional)
Sourcepub fn request_date(self, value: NaiveDate) -> Self
pub fn request_date(self, value: NaiveDate) -> Self
Set the request_date field (default: Default::default())
Sourcepub fn schedule_date(self, value: DateTime<Utc>) -> Self
pub fn schedule_date(self, value: DateTime<Utc>) -> Self
Set the schedule_date field (optional)
Sourcepub fn schedule_end(self, value: DateTime<Utc>) -> Self
pub fn schedule_end(self, value: DateTime<Utc>) -> Self
Set the schedule_end field (optional)
Sourcepub fn close_date(self, value: NaiveDate) -> Self
pub fn close_date(self, value: NaiveDate) -> Self
Set the close_date field (optional)
Sourcepub fn duration(self, value: Decimal) -> Self
pub fn duration(self, value: Decimal) -> Self
Set the duration field (default: Decimal::from(0))
Sourcepub fn owner_user_id(self, value: Uuid) -> Self
pub fn owner_user_id(self, value: Uuid) -> Self
Set the owner_user_id field (optional)
Sourcepub fn kanban_state(self, value: RequestKanbanState) -> Self
pub fn kanban_state(self, value: RequestKanbanState) -> Self
Set the kanban_state field (default: RequestKanbanState::default())
Sourcepub fn priority(self, value: RequestPriority) -> Self
pub fn priority(self, value: RequestPriority) -> Self
Set the priority field (required)
Sourcepub fn maintenance_type(self, value: MaintenanceType) -> Self
pub fn maintenance_type(self, value: MaintenanceType) -> Self
Set the maintenance_type field (default: MaintenanceType::default())
Sourcepub fn repeat_interval(self, value: i32) -> Self
pub fn repeat_interval(self, value: i32) -> Self
Set the repeat_interval field (default: 1)
Sourcepub fn repeat_unit(self, value: RepeatUnit) -> Self
pub fn repeat_unit(self, value: RepeatUnit) -> Self
Set the repeat_unit field (default: RepeatUnit::default())
Sourcepub fn repeat_type(self, value: RepeatType) -> Self
pub fn repeat_type(self, value: RepeatType) -> Self
Set the repeat_type field (default: RepeatType::default())
Sourcepub fn repeat_until(self, value: NaiveDate) -> Self
pub fn repeat_until(self, value: NaiveDate) -> Self
Set the repeat_until field (optional)
Sourcepub fn successor_request_id(self, value: Uuid) -> Self
pub fn successor_request_id(self, value: Uuid) -> Self
Set the successor_request_id field (optional)
Sourcepub fn successor_of_request_id(self, value: Uuid) -> Self
pub fn successor_of_request_id(self, value: Uuid) -> Self
Set the successor_of_request_id field (optional)
Sourcepub fn build(self) -> Result<MaintenanceRequest, String>
pub fn build(self) -> Result<MaintenanceRequest, String>
Build the MaintenanceRequest entity
Returns Err if any required field without a default is missing.
Trait Implementations§
Source§impl Clone for MaintenanceRequestBuilder
impl Clone for MaintenanceRequestBuilder
Source§impl Debug for MaintenanceRequestBuilder
impl Debug for MaintenanceRequestBuilder
Auto Trait Implementations§
impl Freeze for MaintenanceRequestBuilder
impl RefUnwindSafe for MaintenanceRequestBuilder
impl Send for MaintenanceRequestBuilder
impl Sync for MaintenanceRequestBuilder
impl Unpin for MaintenanceRequestBuilder
impl UnsafeUnpin for MaintenanceRequestBuilder
impl UnwindSafe for MaintenanceRequestBuilder
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