#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Relationship {
pub target_component_type_id: ::std::option::Option<::std::string::String>,
pub relationship_type: ::std::option::Option<::std::string::String>,
}
impl Relationship {
pub fn target_component_type_id(&self) -> ::std::option::Option<&str> {
self.target_component_type_id.as_deref()
}
pub fn relationship_type(&self) -> ::std::option::Option<&str> {
self.relationship_type.as_deref()
}
}
impl Relationship {
pub fn builder() -> crate::types::builders::RelationshipBuilder {
crate::types::builders::RelationshipBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct RelationshipBuilder {
pub(crate) target_component_type_id: ::std::option::Option<::std::string::String>,
pub(crate) relationship_type: ::std::option::Option<::std::string::String>,
}
impl RelationshipBuilder {
pub fn target_component_type_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.target_component_type_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_target_component_type_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.target_component_type_id = input;
self
}
pub fn get_target_component_type_id(&self) -> &::std::option::Option<::std::string::String> {
&self.target_component_type_id
}
pub fn relationship_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.relationship_type = ::std::option::Option::Some(input.into());
self
}
pub fn set_relationship_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.relationship_type = input;
self
}
pub fn get_relationship_type(&self) -> &::std::option::Option<::std::string::String> {
&self.relationship_type
}
pub fn build(self) -> crate::types::Relationship {
crate::types::Relationship {
target_component_type_id: self.target_component_type_id,
relationship_type: self.relationship_type,
}
}
}