nominal-api 0.1216.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,
        }
    }
}
/// Selects between relative-offset and absolute-timestamp parsing strategies.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TimestampType {
    #[prost(oneof = "timestamp_type::Option", tags = "1, 2")]
    pub option: ::core::option::Option<timestamp_type::Option>,
}
/// Nested message and enum types in `TimestampType`.
pub mod timestamp_type {
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Option {
        #[prost(message, tag = "1")]
        Relative(super::RelativeTimestamp),
        #[prost(message, tag = "2")]
        Absolute(super::AbsoluteTimestamp),
    }
}
/// Relative timestamp parser: interprets each row's timestamp as an offset from a fixed origin.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RelativeTimestamp {
    /// Unit in which relative offsets are expressed. Aliases the Conjure TimeUnit alias.
    #[prost(string, tag = "1")]
    pub time_unit: ::prost::alloc::string::String,
    /// Starting timestamp to use when indexing the file.
    #[prost(message, optional, tag = "2")]
    pub offset: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
}
/// Absolute timestamp parser variants.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AbsoluteTimestamp {
    #[prost(oneof = "absolute_timestamp::Option", tags = "1, 2, 3")]
    pub option: ::core::option::Option<absolute_timestamp::Option>,
}
/// Nested message and enum types in `AbsoluteTimestamp`.
pub mod absolute_timestamp {
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Option {
        #[prost(message, tag = "1")]
        Iso8601(super::Iso8601Timestamp),
        #[prost(message, tag = "2")]
        EpochOfTimeUnit(super::EpochTimestamp),
        #[prost(message, tag = "3")]
        CustomFormat(super::CustomTimestamp),
    }
}
/// Absolute timestamps serialized in ISO-8601 form. No additional parser configuration is needed.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Iso8601Timestamp {}
/// Absolute timestamps expressed as an integer count of some time unit since the Unix epoch.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EpochTimestamp {
    /// Unit in which epoch values are expressed (e.g. SECONDS, MILLISECONDS).
    #[prost(string, tag = "1")]
    pub time_unit: ::prost::alloc::string::String,
}
/// Absolute timestamps parsed with a user-supplied format string.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CustomTimestamp {
    /// The format string should be in the format of the `DateTimeFormatter` class in Java.
    #[prost(string, tag = "1")]
    pub format: ::prost::alloc::string::String,
    /// Default year is accepted as an optional field for cases like IRIG time format.
    /// Will be overridden by year in time format.
    #[prost(int32, optional, tag = "2")]
    pub default_year: ::core::option::Option<i32>,
    /// Default day of year is accepted as an optional field for cases like IRIG time format.
    /// Will be overridden by day of year in time format.
    #[prost(int32, optional, tag = "3")]
    pub default_day_of_year: ::core::option::Option<i32>,
}