#[derive(
Debug,
Clone,
conjure_object::serde::Serialize,
conjure_object::serde::Deserialize,
PartialEq,
Eq,
PartialOrd,
Ord,
Hash
)]
#[serde(crate = "conjure_object::serde")]
#[conjure_object::private::staged_builder::staged_builder]
#[builder(crate = conjure_object::private::staged_builder, update, inline)]
pub struct OktaRegistrationErrorCause {
#[builder(into)]
#[serde(rename = "errorSummary")]
error_summary: String,
#[builder(default, into)]
#[serde(rename = "reason", skip_serializing_if = "Option::is_none", default)]
reason: Option<String>,
#[builder(default, into)]
#[serde(rename = "locationType", skip_serializing_if = "Option::is_none", default)]
location_type: Option<String>,
#[builder(default, into)]
#[serde(rename = "location", skip_serializing_if = "Option::is_none", default)]
location: Option<String>,
#[builder(default, into)]
#[serde(rename = "domain", skip_serializing_if = "Option::is_none", default)]
domain: Option<String>,
}
impl OktaRegistrationErrorCause {
#[inline]
pub fn new(error_summary: impl Into<String>) -> Self {
Self::builder().error_summary(error_summary).build()
}
#[inline]
pub fn error_summary(&self) -> &str {
&*self.error_summary
}
#[inline]
pub fn reason(&self) -> Option<&str> {
self.reason.as_ref().map(|o| &**o)
}
#[inline]
pub fn location_type(&self) -> Option<&str> {
self.location_type.as_ref().map(|o| &**o)
}
#[inline]
pub fn location(&self) -> Option<&str> {
self.location.as_ref().map(|o| &**o)
}
#[inline]
pub fn domain(&self) -> Option<&str> {
self.domain.as_ref().map(|o| &**o)
}
}