#[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 InvalidWebhookUrl {
#[builder(into)]
#[serde(rename = "url")]
url: String,
#[builder(into)]
#[serde(rename = "reason")]
reason: String,
}
impl InvalidWebhookUrl {
#[inline]
pub fn new(url: impl Into<String>, reason: impl Into<String>) -> Self {
Self::builder().url(url).reason(reason).build()
}
#[inline]
pub fn url(&self) -> &str {
&*self.url
}
#[inline]
pub fn reason(&self) -> &str {
&*self.reason
}
}
impl conjure_error::ErrorType for InvalidWebhookUrl {
#[inline]
fn code() -> conjure_error::ErrorCode {
conjure_error::ErrorCode::InvalidArgument
}
#[inline]
fn name() -> &'static str {
"Scout:InvalidWebhookUrl"
}
#[inline]
fn safe_args() -> &'static [&'static str] {
&["reason", "url"]
}
}