Skip to main content

nominal_api_conjure/conjure/objects/scout/compute/api/
assets_search_target.rs

1/// Search assets. Each match expands to one grouping per data scope on that asset.
2#[derive(
3    Debug,
4    Clone,
5    conjure_object::serde::Serialize,
6    conjure_object::serde::Deserialize,
7    conjure_object::private::DeriveWith
8)]
9#[serde(crate = "conjure_object::serde")]
10#[derive_with(PartialEq, Eq, PartialOrd, Ord, Hash)]
11#[conjure_object::private::staged_builder::staged_builder]
12#[builder(crate = conjure_object::private::staged_builder, update, inline)]
13pub struct AssetsSearchTarget {
14    #[builder(custom(type = super::ResourceSearchQuery, convert = Box::new))]
15    #[serde(rename = "query")]
16    query: Box<super::ResourceSearchQuery>,
17}
18impl AssetsSearchTarget {
19    /// Constructs a new instance of the type.
20    #[inline]
21    pub fn new(query: super::ResourceSearchQuery) -> Self {
22        Self::builder().query(query).build()
23    }
24    /// Predicate tree used to filter matching assets.
25    #[inline]
26    pub fn query(&self) -> &super::ResourceSearchQuery {
27        &*self.query
28    }
29}