nominal-api 0.1239.0

API bindings for the Nominal platform
Documentation
/// Nanosecond precision timestamp type, represented by an epoch time in seconds and a nanosecond offset.
/// The nanosecond offset is from the start of the epoch second, so must be less than 1 billion.
#[derive(
    Debug,
    Clone,
    conjure_object::serde::Serialize,
    conjure_object::serde::Deserialize,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash,
    Copy
)]
#[serde(crate = "conjure_object::serde")]
#[conjure_object::private::staged_builder::staged_builder]
#[builder(crate = conjure_object::private::staged_builder, update, inline)]
pub struct Timestamp {
    #[serde(rename = "seconds")]
    seconds: conjure_object::SafeLong,
    #[serde(rename = "nanos")]
    nanos: conjure_object::SafeLong,
}
impl Timestamp {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(
        seconds: conjure_object::SafeLong,
        nanos: conjure_object::SafeLong,
    ) -> Self {
        Self::builder().seconds(seconds).nanos(nanos).build()
    }
    #[inline]
    pub fn seconds(&self) -> conjure_object::SafeLong {
        self.seconds
    }
    #[inline]
    pub fn nanos(&self) -> conjure_object::SafeLong {
        self.nanos
    }
}