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