#[non_exhaustive]pub struct CodegenGenericDataModelBuilder { /* private fields */ }Expand description
A builder for CodegenGenericDataModel.
Implementations§
source§impl CodegenGenericDataModelBuilder
impl CodegenGenericDataModelBuilder
sourcepub fn fields(self, k: impl Into<String>, v: CodegenGenericDataField) -> Self
pub fn fields(self, k: impl Into<String>, v: CodegenGenericDataField) -> Self
Adds a key-value pair to fields.
To override the contents of this collection use set_fields.
The fields in the generic data model.
sourcepub fn set_fields(
self,
input: Option<HashMap<String, CodegenGenericDataField>>
) -> Self
pub fn set_fields( self, input: Option<HashMap<String, CodegenGenericDataField>> ) -> Self
The fields in the generic data model.
sourcepub fn get_fields(&self) -> &Option<HashMap<String, CodegenGenericDataField>>
pub fn get_fields(&self) -> &Option<HashMap<String, CodegenGenericDataField>>
The fields in the generic data model.
sourcepub fn is_join_table(self, input: bool) -> Self
pub fn is_join_table(self, input: bool) -> Self
Specifies whether the generic data model is a join table.
sourcepub fn set_is_join_table(self, input: Option<bool>) -> Self
pub fn set_is_join_table(self, input: Option<bool>) -> Self
Specifies whether the generic data model is a join table.
sourcepub fn get_is_join_table(&self) -> &Option<bool>
pub fn get_is_join_table(&self) -> &Option<bool>
Specifies whether the generic data model is a join table.
sourcepub fn primary_keys(self, input: impl Into<String>) -> Self
pub fn primary_keys(self, input: impl Into<String>) -> Self
Appends an item to primary_keys.
To override the contents of this collection use set_primary_keys.
The primary keys of the generic data model.
sourcepub fn set_primary_keys(self, input: Option<Vec<String>>) -> Self
pub fn set_primary_keys(self, input: Option<Vec<String>>) -> Self
The primary keys of the generic data model.
sourcepub fn get_primary_keys(&self) -> &Option<Vec<String>>
pub fn get_primary_keys(&self) -> &Option<Vec<String>>
The primary keys of the generic data model.
sourcepub fn build(self) -> Result<CodegenGenericDataModel, BuildError>
pub fn build(self) -> Result<CodegenGenericDataModel, BuildError>
Consumes the builder and constructs a CodegenGenericDataModel.
This method will fail if any of the following fields are not set:
Trait Implementations§
source§impl Clone for CodegenGenericDataModelBuilder
impl Clone for CodegenGenericDataModelBuilder
source§fn clone(&self) -> CodegenGenericDataModelBuilder
fn clone(&self) -> CodegenGenericDataModelBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Default for CodegenGenericDataModelBuilder
impl Default for CodegenGenericDataModelBuilder
source§fn default() -> CodegenGenericDataModelBuilder
fn default() -> CodegenGenericDataModelBuilder
source§impl PartialEq for CodegenGenericDataModelBuilder
impl PartialEq for CodegenGenericDataModelBuilder
source§fn eq(&self, other: &CodegenGenericDataModelBuilder) -> bool
fn eq(&self, other: &CodegenGenericDataModelBuilder) -> bool
self and other values to be equal, and is used
by ==.impl StructuralPartialEq for CodegenGenericDataModelBuilder
Auto Trait Implementations§
impl Freeze for CodegenGenericDataModelBuilder
impl RefUnwindSafe for CodegenGenericDataModelBuilder
impl Send for CodegenGenericDataModelBuilder
impl Sync for CodegenGenericDataModelBuilder
impl Unpin for CodegenGenericDataModelBuilder
impl UnwindSafe for CodegenGenericDataModelBuilder
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
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