Skip to main content

nominal_api/conjure/errors/timeseries/seriescache/api/
chunk_already_exists.rs

1#[derive(
2    Debug,
3    Clone,
4    conjure_object::serde::Serialize,
5    conjure_object::serde::Deserialize,
6    PartialEq,
7    Eq,
8    PartialOrd,
9    Ord,
10    Hash
11)]
12#[serde(crate = "conjure_object::serde")]
13#[conjure_object::private::staged_builder::staged_builder]
14#[builder(crate = conjure_object::private::staged_builder, update, inline)]
15pub struct ChunkAlreadyExists {
16    #[serde(rename = "logicalSeriesRid")]
17    logical_series_rid: conjure_object::ResourceIdentifier,
18    #[builder(
19        custom(
20            type = super::super::super::super::super::objects::api::Timestamp,
21            convert = Box::new
22        )
23    )]
24    #[serde(rename = "startTimestamp")]
25    start_timestamp: Box<super::super::super::super::super::objects::api::Timestamp>,
26    #[builder(
27        custom(
28            type = super::super::super::super::super::objects::api::Timestamp,
29            convert = Box::new
30        )
31    )]
32    #[serde(rename = "endTimestamp")]
33    end_timestamp: Box<super::super::super::super::super::objects::api::Timestamp>,
34    #[serde(rename = "resolution")]
35    resolution: super::super::super::super::super::objects::timeseries::seriescache::api::Resolution,
36}
37impl ChunkAlreadyExists {
38    #[inline]
39    pub fn logical_series_rid(&self) -> &conjure_object::ResourceIdentifier {
40        &self.logical_series_rid
41    }
42    #[inline]
43    pub fn start_timestamp(
44        &self,
45    ) -> &super::super::super::super::super::objects::api::Timestamp {
46        &*self.start_timestamp
47    }
48    #[inline]
49    pub fn end_timestamp(
50        &self,
51    ) -> &super::super::super::super::super::objects::api::Timestamp {
52        &*self.end_timestamp
53    }
54    #[inline]
55    pub fn resolution(
56        &self,
57    ) -> super::super::super::super::super::objects::timeseries::seriescache::api::Resolution {
58        self.resolution
59    }
60}
61impl conjure_error::ErrorType for ChunkAlreadyExists {
62    #[inline]
63    fn code() -> conjure_error::ErrorCode {
64        conjure_error::ErrorCode::Conflict
65    }
66    #[inline]
67    fn name() -> &'static str {
68        "SeriesCache:ChunkAlreadyExists"
69    }
70    #[inline]
71    fn safe_args() -> &'static [&'static str] {
72        &["endTimestamp", "logicalSeriesRid", "resolution", "startTimestamp"]
73    }
74}