#[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 BatchedLocatorWithDelimiter {
    #[builder(custom(type = super::BatchedLocator, convert = Box::new))]
    #[serde(rename = "locator")]
    locator: Box<super::BatchedLocator>,
    #[builder(default, into)]
    #[serde(rename = "delimiter", skip_serializing_if = "Option::is_none", default)]
    delimiter: Option<String>,
}
impl BatchedLocatorWithDelimiter {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(locator: super::BatchedLocator) -> Self {
        Self::builder().locator(locator).build()
    }
    #[inline]
    pub fn locator(&self) -> &super::BatchedLocator {
        &*self.locator
    }
    /// Absent when the locator's data source has no indexed prefix tree
    /// (callers should fall back to flat search for those locators).
    #[inline]
    pub fn delimiter(&self) -> Option<&str> {
        self.delimiter.as_ref().map(|o| &**o)
    }
}
