#[non_exhaustive]pub struct DatabaseViewSpec {
pub view_type: ViewType,
pub source_definition: Option<SourceDefinition>,
/* private fields */
}Expand description
Specification that applies to database view.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.view_type: ViewTypeType of this view.
source_definition: Option<SourceDefinition>Definition of the view.
Implementations§
Source§impl DatabaseViewSpec
impl DatabaseViewSpec
pub fn new() -> Self
Sourcepub fn set_view_type<T: Into<ViewType>>(self, v: T) -> Self
pub fn set_view_type<T: Into<ViewType>>(self, v: T) -> Self
Sourcepub fn set_source_definition<T: Into<Option<SourceDefinition>>>(
self,
v: T,
) -> Self
pub fn set_source_definition<T: Into<Option<SourceDefinition>>>( self, v: T, ) -> Self
Sets the value of source_definition.
Note that all the setters affecting source_definition are mutually
exclusive.
§Example
ⓘ
use google_cloud_datacatalog_v1::model::database_table_spec::database_view_spec::SourceDefinition;
let x = DatabaseViewSpec::new().set_source_definition(Some(SourceDefinition::BaseTable("example".to_string())));Sourcepub fn base_table(&self) -> Option<&String>
pub fn base_table(&self) -> Option<&String>
The value of source_definition
if it holds a BaseTable, None if the field is not set or
holds a different branch.
Sourcepub fn set_base_table<T: Into<String>>(self, v: T) -> Self
pub fn set_base_table<T: Into<String>>(self, v: T) -> Self
Sets the value of source_definition
to hold a BaseTable.
Note that all the setters affecting source_definition are
mutually exclusive.
§Example
ⓘ
let x = DatabaseViewSpec::new().set_base_table("example");
assert!(x.base_table().is_some());
assert!(x.sql_query().is_none());Sourcepub fn sql_query(&self) -> Option<&String>
pub fn sql_query(&self) -> Option<&String>
The value of source_definition
if it holds a SqlQuery, None if the field is not set or
holds a different branch.
Sourcepub fn set_sql_query<T: Into<String>>(self, v: T) -> Self
pub fn set_sql_query<T: Into<String>>(self, v: T) -> Self
Sets the value of source_definition
to hold a SqlQuery.
Note that all the setters affecting source_definition are
mutually exclusive.
§Example
ⓘ
let x = DatabaseViewSpec::new().set_sql_query("example");
assert!(x.sql_query().is_some());
assert!(x.base_table().is_none());Trait Implementations§
Source§impl Clone for DatabaseViewSpec
impl Clone for DatabaseViewSpec
Source§fn clone(&self) -> DatabaseViewSpec
fn clone(&self) -> DatabaseViewSpec
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DatabaseViewSpec
impl Debug for DatabaseViewSpec
Source§impl Default for DatabaseViewSpec
impl Default for DatabaseViewSpec
Source§fn default() -> DatabaseViewSpec
fn default() -> DatabaseViewSpec
Returns the “default value” for a type. Read more
Source§impl Message for DatabaseViewSpec
impl Message for DatabaseViewSpec
Source§impl PartialEq for DatabaseViewSpec
impl PartialEq for DatabaseViewSpec
impl StructuralPartialEq for DatabaseViewSpec
Auto Trait Implementations§
impl Freeze for DatabaseViewSpec
impl RefUnwindSafe for DatabaseViewSpec
impl Send for DatabaseViewSpec
impl Sync for DatabaseViewSpec
impl Unpin for DatabaseViewSpec
impl UnsafeUnpin for DatabaseViewSpec
impl UnwindSafe for DatabaseViewSpec
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
Mutably borrows from an owned value. Read more