nominal-api-conjure 0.1287.0

Conjure HTTP API bindings for the Nominal platform
Documentation
#[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 JournalJsonOpts {
    #[builder(custom(type = super::IngestSource, convert = Box::new))]
    #[serde(rename = "source")]
    source: Box<super::IngestSource>,
    #[builder(custom(type = super::DatasetIngestTarget, convert = Box::new))]
    #[serde(rename = "target")]
    target: Box<super::DatasetIngestTarget>,
    #[builder(default, into)]
    #[serde(rename = "channel", skip_serializing_if = "Option::is_none", default)]
    channel: Option<String>,
    #[builder(
        default,
        custom(
            type = impl
            Into<Option<super::JournalTimestampMetadata>>,
            convert = |v|v.into().map(Box::new)
        )
    )]
    #[serde(
        rename = "timestampMetadata",
        skip_serializing_if = "Option::is_none",
        default
    )]
    timestamp_metadata: Option<Box<super::JournalTimestampMetadata>>,
}
impl JournalJsonOpts {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(source: super::IngestSource, target: super::DatasetIngestTarget) -> Self {
        Self::builder().source(source).target(target).build()
    }
    #[inline]
    pub fn source(&self) -> &super::IngestSource {
        &*self.source
    }
    #[inline]
    pub fn target(&self) -> &super::DatasetIngestTarget {
        &*self.target
    }
    /// If provided, ingests logs to the given channel.
    /// By default, log data will be ingested to a channel named 'logs'.
    #[inline]
    pub fn channel(&self) -> Option<&str> {
        self.channel.as_ref().map(|o| &**o)
    }
    /// Optional timestamp field for the JSON lines. When provided, each line is timestamped from this
    /// field instead of the journald default `__REALTIME_TIMESTAMP`, allowing non-journald JSON logs to
    /// ingest. Each line must still contain a `MESSAGE` field. Only numeric epoch timestamps are supported.
    /// When absent, the journald default (`__REALTIME_TIMESTAMP`, microseconds) is used.
    #[inline]
    pub fn timestamp_metadata(&self) -> Option<&super::JournalTimestampMetadata> {
        self.timestamp_metadata.as_ref().map(|o| &**o)
    }
}