Skip to main content

nominal_api/conjure/objects/scout/video/api/
search_videos_response.rs

1#[derive(
2    Debug,
3    Clone,
4    conjure_object::serde::Serialize,
5    conjure_object::serde::Deserialize,
6    conjure_object::private::DeriveWith
7)]
8#[serde(crate = "conjure_object::serde")]
9#[derive_with(PartialEq, Eq, PartialOrd, Ord, Hash)]
10#[conjure_object::private::staged_builder::staged_builder]
11#[builder(crate = conjure_object::private::staged_builder, update, inline)]
12pub struct SearchVideosResponse {
13    #[builder(default, list(item(type = super::Video)))]
14    #[serde(rename = "results", skip_serializing_if = "Vec::is_empty", default)]
15    results: Vec<super::Video>,
16    #[builder(default, into)]
17    #[serde(rename = "nextPageToken", skip_serializing_if = "Option::is_none", default)]
18    next_page_token: Option<super::super::super::super::api::Token>,
19}
20impl SearchVideosResponse {
21    /// Constructs a new instance of the type.
22    #[inline]
23    pub fn new() -> Self {
24        Self::builder().build()
25    }
26    #[inline]
27    pub fn results(&self) -> &[super::Video] {
28        &*self.results
29    }
30    #[inline]
31    pub fn next_page_token(&self) -> Option<&super::super::super::super::api::Token> {
32        self.next_page_token.as_ref().map(|o| &*o)
33    }
34}