nominal-api 0.1239.0

API bindings for the Nominal platform
Documentation
/// Request to dismiss a coachmark
#[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 DismissCoachmarkRequest {
    #[builder(into)]
    #[serde(rename = "coachmarkId")]
    coachmark_id: String,
    #[builder(into)]
    #[serde(rename = "appVersion")]
    app_version: String,
    #[builder(default, into)]
    #[serde(rename = "stepIndex", skip_serializing_if = "Option::is_none", default)]
    step_index: Option<i32>,
}
impl DismissCoachmarkRequest {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(coachmark_id: impl Into<String>, app_version: impl Into<String>) -> Self {
        Self::builder().coachmark_id(coachmark_id).app_version(app_version).build()
    }
    /// The coachmark identifier to dismiss
    #[inline]
    pub fn coachmark_id(&self) -> &str {
        &*self.coachmark_id
    }
    /// The apps-scout version (semver) when dismissing
    #[inline]
    pub fn app_version(&self) -> &str {
        &*self.app_version
    }
    /// The step index when dismissed (for multi-step coachmarks)
    #[inline]
    pub fn step_index(&self) -> Option<i32> {
        self.step_index.as_ref().map(|o| *o)
    }
}