#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Country {
pub country_code: ::std::option::Option<::std::string::String>,
pub country_name: ::std::option::Option<::std::string::String>,
}
impl Country {
pub fn country_code(&self) -> ::std::option::Option<&str> {
self.country_code.as_deref()
}
pub fn country_name(&self) -> ::std::option::Option<&str> {
self.country_name.as_deref()
}
}
impl Country {
pub fn builder() -> crate::types::builders::CountryBuilder {
crate::types::builders::CountryBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CountryBuilder {
pub(crate) country_code: ::std::option::Option<::std::string::String>,
pub(crate) country_name: ::std::option::Option<::std::string::String>,
}
impl CountryBuilder {
pub fn country_code(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.country_code = ::std::option::Option::Some(input.into());
self
}
pub fn set_country_code(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.country_code = input;
self
}
pub fn get_country_code(&self) -> &::std::option::Option<::std::string::String> {
&self.country_code
}
pub fn country_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.country_name = ::std::option::Option::Some(input.into());
self
}
pub fn set_country_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.country_name = input;
self
}
pub fn get_country_name(&self) -> &::std::option::Option<::std::string::String> {
&self.country_name
}
pub fn build(self) -> crate::types::Country {
crate::types::Country {
country_code: self.country_code,
country_name: self.country_name,
}
}
}