nominal_api/conjure/objects/scout/internal/search/api/
date_time_field.rs1#[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 DateTimeField {
16 #[builder(into)]
17 #[serde(rename = "name")]
18 name: String,
19 #[serde(rename = "value")]
20 value: conjure_object::DateTime<conjure_object::Utc>,
21 #[serde(rename = "operator")]
22 operator: super::Operator,
23}
24impl DateTimeField {
25 #[inline]
27 pub fn new(
28 name: impl Into<String>,
29 value: conjure_object::DateTime<conjure_object::Utc>,
30 operator: super::Operator,
31 ) -> Self {
32 Self::builder().name(name).value(value).operator(operator).build()
33 }
34 #[inline]
35 pub fn name(&self) -> &str {
36 &*self.name
37 }
38 #[inline]
39 pub fn value(&self) -> conjure_object::DateTime<conjure_object::Utc> {
40 self.value
41 }
42 #[inline]
43 pub fn operator(&self) -> &super::Operator {
44 &self.operator
45 }
46}