/// Sensor configuration for 3D scene.
#[derive(
    Debug,
    Clone,
    conjure_object::serde::Serialize,
    conjure_object::serde::Deserialize,
    conjure_object::private::DeriveWith
)]
#[serde(crate = "conjure_object::serde")]
#[derive_with(PartialEq, Eq, PartialOrd, Ord, Hash)]
#[conjure_object::private::staged_builder::staged_builder]
#[builder(crate = conjure_object::private::staged_builder, update, inline)]
pub struct Geo3dSensor {
    #[builder(into)]
    #[serde(rename = "sensorId")]
    sensor_id: String,
    #[builder(default, into)]
    #[serde(rename = "enabled", skip_serializing_if = "Option::is_none", default)]
    enabled: Option<bool>,
    #[builder(default, into)]
    #[serde(rename = "name", skip_serializing_if = "Option::is_none", default)]
    name: Option<String>,
    #[builder(
        default,
        custom(
            type = impl
            Into<Option<super::Geo3dSensorOrientationConfig>>,
            convert = |v|v.into().map(Box::new)
        )
    )]
    #[serde(rename = "orientation", skip_serializing_if = "Option::is_none", default)]
    orientation: Option<Box<super::Geo3dSensorOrientationConfig>>,
    #[builder(default, into)]
    #[serde(rename = "color", skip_serializing_if = "Option::is_none", default)]
    color: Option<super::super::super::api::HexColor>,
    #[builder(
        default,
        custom(
            type = impl
            Into<Option<super::Geo3dSensorShape>>,
            convert = |v|v.into().map(Box::new)
        )
    )]
    #[serde(rename = "viewShape", skip_serializing_if = "Option::is_none", default)]
    view_shape: Option<Box<super::Geo3dSensorShape>>,
}
impl Geo3dSensor {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(sensor_id: impl Into<String>) -> Self {
        Self::builder().sensor_id(sensor_id).build()
    }
    #[inline]
    pub fn sensor_id(&self) -> &str {
        &*self.sensor_id
    }
    #[inline]
    pub fn enabled(&self) -> Option<bool> {
        self.enabled.as_ref().map(|o| *o)
    }
    /// The name of the sensor.
    #[inline]
    pub fn name(&self) -> Option<&str> {
        self.name.as_ref().map(|o| &**o)
    }
    /// The orientation of the sensor.
    #[inline]
    pub fn orientation(&self) -> Option<&super::Geo3dSensorOrientationConfig> {
        self.orientation.as_ref().map(|o| &**o)
    }
    /// The color of the sensor.
    #[inline]
    pub fn color(&self) -> Option<&super::super::super::api::HexColor> {
        self.color.as_ref().map(|o| &*o)
    }
    /// The shape of the sensor's view volume.
    #[inline]
    pub fn view_shape(&self) -> Option<&super::Geo3dSensorShape> {
        self.view_shape.as_ref().map(|o| &**o)
    }
}
