Skip to main content

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