aws_sdk_quicksight/types/
_snapshot_job_result.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>An object that provides information on the result of a snapshot job. This object provides information about the job, the job status, and the location of the generated file.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct SnapshotJobResult {
7    /// <p>A list of <code>AnonymousUserSnapshotJobResult</code> objects that contain information on anonymous users and their user configurations. This data provided by you when you make a <code>StartDashboardSnapshotJob</code> API call.</p>
8    pub anonymous_users: ::std::option::Option<::std::vec::Vec<crate::types::AnonymousUserSnapshotJobResult>>,
9}
10impl SnapshotJobResult {
11    /// <p>A list of <code>AnonymousUserSnapshotJobResult</code> objects that contain information on anonymous users and their user configurations. This data provided by you when you make a <code>StartDashboardSnapshotJob</code> API call.</p>
12    ///
13    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.anonymous_users.is_none()`.
14    pub fn anonymous_users(&self) -> &[crate::types::AnonymousUserSnapshotJobResult] {
15        self.anonymous_users.as_deref().unwrap_or_default()
16    }
17}
18impl SnapshotJobResult {
19    /// Creates a new builder-style object to manufacture [`SnapshotJobResult`](crate::types::SnapshotJobResult).
20    pub fn builder() -> crate::types::builders::SnapshotJobResultBuilder {
21        crate::types::builders::SnapshotJobResultBuilder::default()
22    }
23}
24
25/// A builder for [`SnapshotJobResult`](crate::types::SnapshotJobResult).
26#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
27#[non_exhaustive]
28pub struct SnapshotJobResultBuilder {
29    pub(crate) anonymous_users: ::std::option::Option<::std::vec::Vec<crate::types::AnonymousUserSnapshotJobResult>>,
30}
31impl SnapshotJobResultBuilder {
32    /// Appends an item to `anonymous_users`.
33    ///
34    /// To override the contents of this collection use [`set_anonymous_users`](Self::set_anonymous_users).
35    ///
36    /// <p>A list of <code>AnonymousUserSnapshotJobResult</code> objects that contain information on anonymous users and their user configurations. This data provided by you when you make a <code>StartDashboardSnapshotJob</code> API call.</p>
37    pub fn anonymous_users(mut self, input: crate::types::AnonymousUserSnapshotJobResult) -> Self {
38        let mut v = self.anonymous_users.unwrap_or_default();
39        v.push(input);
40        self.anonymous_users = ::std::option::Option::Some(v);
41        self
42    }
43    /// <p>A list of <code>AnonymousUserSnapshotJobResult</code> objects that contain information on anonymous users and their user configurations. This data provided by you when you make a <code>StartDashboardSnapshotJob</code> API call.</p>
44    pub fn set_anonymous_users(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::AnonymousUserSnapshotJobResult>>) -> Self {
45        self.anonymous_users = input;
46        self
47    }
48    /// <p>A list of <code>AnonymousUserSnapshotJobResult</code> objects that contain information on anonymous users and their user configurations. This data provided by you when you make a <code>StartDashboardSnapshotJob</code> API call.</p>
49    pub fn get_anonymous_users(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AnonymousUserSnapshotJobResult>> {
50        &self.anonymous_users
51    }
52    /// Consumes the builder and constructs a [`SnapshotJobResult`](crate::types::SnapshotJobResult).
53    pub fn build(self) -> crate::types::SnapshotJobResult {
54        crate::types::SnapshotJobResult {
55            anonymous_users: self.anonymous_users,
56        }
57    }
58}