nominal-api 0.1200.0

API bindings for the Nominal platform
Documentation
// This file is @generated by prost-build.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Range {
    #[prost(message, optional, tag = "1")]
    pub start: ::core::option::Option<Timestamp>,
    #[prost(message, optional, tag = "2")]
    pub end: ::core::option::Option<Timestamp>,
}
/// 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(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Timestamp {
    #[prost(int64, optional, tag = "1")]
    pub seconds: ::core::option::Option<i64>,
    #[prost(int64, optional, tag = "2")]
    pub nanos: ::core::option::Option<i64>,
}
/// buf:lint:ignore ENUM_VALUE_PREFIX
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum TimeUnit {
    Unspecified = 0,
    Days = 1,
    Hours = 2,
    Minutes = 3,
    Seconds = 4,
    Milliseconds = 5,
    Microseconds = 6,
    Nanoseconds = 7,
}
impl TimeUnit {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::Unspecified => "TIME_UNIT_UNSPECIFIED",
            Self::Days => "DAYS",
            Self::Hours => "HOURS",
            Self::Minutes => "MINUTES",
            Self::Seconds => "SECONDS",
            Self::Milliseconds => "MILLISECONDS",
            Self::Microseconds => "MICROSECONDS",
            Self::Nanoseconds => "NANOSECONDS",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "TIME_UNIT_UNSPECIFIED" => Some(Self::Unspecified),
            "DAYS" => Some(Self::Days),
            "HOURS" => Some(Self::Hours),
            "MINUTES" => Some(Self::Minutes),
            "SECONDS" => Some(Self::Seconds),
            "MILLISECONDS" => Some(Self::Milliseconds),
            "MICROSECONDS" => Some(Self::Microseconds),
            "NANOSECONDS" => Some(Self::Nanoseconds),
            _ => None,
        }
    }
}