Skip to main content

aws_sdk_cloudtrail/types/
_import_statistics.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Provides statistics for the specified <code>ImportID</code>. CloudTrail does not update import statistics in real-time. Returned values for parameters such as <code>EventsCompleted</code> may be lower than the actual value, because CloudTrail updates statistics incrementally over the course of the import.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct ImportStatistics {
7    /// <p>The number of S3 prefixes found for the import.</p>
8    pub prefixes_found: ::std::option::Option<i64>,
9    /// <p>The number of S3 prefixes that completed import.</p>
10    pub prefixes_completed: ::std::option::Option<i64>,
11    /// <p>The number of log files that completed import.</p>
12    pub files_completed: ::std::option::Option<i64>,
13    /// <p>The number of trail events imported into the event data store.</p>
14    pub events_completed: ::std::option::Option<i64>,
15    /// <p>The number of failed entries.</p>
16    pub failed_entries: ::std::option::Option<i64>,
17}
18impl ImportStatistics {
19    /// <p>The number of S3 prefixes found for the import.</p>
20    pub fn prefixes_found(&self) -> ::std::option::Option<i64> {
21        self.prefixes_found
22    }
23    /// <p>The number of S3 prefixes that completed import.</p>
24    pub fn prefixes_completed(&self) -> ::std::option::Option<i64> {
25        self.prefixes_completed
26    }
27    /// <p>The number of log files that completed import.</p>
28    pub fn files_completed(&self) -> ::std::option::Option<i64> {
29        self.files_completed
30    }
31    /// <p>The number of trail events imported into the event data store.</p>
32    pub fn events_completed(&self) -> ::std::option::Option<i64> {
33        self.events_completed
34    }
35    /// <p>The number of failed entries.</p>
36    pub fn failed_entries(&self) -> ::std::option::Option<i64> {
37        self.failed_entries
38    }
39}
40impl ImportStatistics {
41    /// Creates a new builder-style object to manufacture [`ImportStatistics`](crate::types::ImportStatistics).
42    pub fn builder() -> crate::types::builders::ImportStatisticsBuilder {
43        crate::types::builders::ImportStatisticsBuilder::default()
44    }
45}
46
47/// A builder for [`ImportStatistics`](crate::types::ImportStatistics).
48#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
49#[non_exhaustive]
50pub struct ImportStatisticsBuilder {
51    pub(crate) prefixes_found: ::std::option::Option<i64>,
52    pub(crate) prefixes_completed: ::std::option::Option<i64>,
53    pub(crate) files_completed: ::std::option::Option<i64>,
54    pub(crate) events_completed: ::std::option::Option<i64>,
55    pub(crate) failed_entries: ::std::option::Option<i64>,
56}
57impl ImportStatisticsBuilder {
58    /// <p>The number of S3 prefixes found for the import.</p>
59    pub fn prefixes_found(mut self, input: i64) -> Self {
60        self.prefixes_found = ::std::option::Option::Some(input);
61        self
62    }
63    /// <p>The number of S3 prefixes found for the import.</p>
64    pub fn set_prefixes_found(mut self, input: ::std::option::Option<i64>) -> Self {
65        self.prefixes_found = input;
66        self
67    }
68    /// <p>The number of S3 prefixes found for the import.</p>
69    pub fn get_prefixes_found(&self) -> &::std::option::Option<i64> {
70        &self.prefixes_found
71    }
72    /// <p>The number of S3 prefixes that completed import.</p>
73    pub fn prefixes_completed(mut self, input: i64) -> Self {
74        self.prefixes_completed = ::std::option::Option::Some(input);
75        self
76    }
77    /// <p>The number of S3 prefixes that completed import.</p>
78    pub fn set_prefixes_completed(mut self, input: ::std::option::Option<i64>) -> Self {
79        self.prefixes_completed = input;
80        self
81    }
82    /// <p>The number of S3 prefixes that completed import.</p>
83    pub fn get_prefixes_completed(&self) -> &::std::option::Option<i64> {
84        &self.prefixes_completed
85    }
86    /// <p>The number of log files that completed import.</p>
87    pub fn files_completed(mut self, input: i64) -> Self {
88        self.files_completed = ::std::option::Option::Some(input);
89        self
90    }
91    /// <p>The number of log files that completed import.</p>
92    pub fn set_files_completed(mut self, input: ::std::option::Option<i64>) -> Self {
93        self.files_completed = input;
94        self
95    }
96    /// <p>The number of log files that completed import.</p>
97    pub fn get_files_completed(&self) -> &::std::option::Option<i64> {
98        &self.files_completed
99    }
100    /// <p>The number of trail events imported into the event data store.</p>
101    pub fn events_completed(mut self, input: i64) -> Self {
102        self.events_completed = ::std::option::Option::Some(input);
103        self
104    }
105    /// <p>The number of trail events imported into the event data store.</p>
106    pub fn set_events_completed(mut self, input: ::std::option::Option<i64>) -> Self {
107        self.events_completed = input;
108        self
109    }
110    /// <p>The number of trail events imported into the event data store.</p>
111    pub fn get_events_completed(&self) -> &::std::option::Option<i64> {
112        &self.events_completed
113    }
114    /// <p>The number of failed entries.</p>
115    pub fn failed_entries(mut self, input: i64) -> Self {
116        self.failed_entries = ::std::option::Option::Some(input);
117        self
118    }
119    /// <p>The number of failed entries.</p>
120    pub fn set_failed_entries(mut self, input: ::std::option::Option<i64>) -> Self {
121        self.failed_entries = input;
122        self
123    }
124    /// <p>The number of failed entries.</p>
125    pub fn get_failed_entries(&self) -> &::std::option::Option<i64> {
126        &self.failed_entries
127    }
128    /// Consumes the builder and constructs a [`ImportStatistics`](crate::types::ImportStatistics).
129    pub fn build(self) -> crate::types::ImportStatistics {
130        crate::types::ImportStatistics {
131            prefixes_found: self.prefixes_found,
132            prefixes_completed: self.prefixes_completed,
133            files_completed: self.files_completed,
134            events_completed: self.events_completed,
135            failed_entries: self.failed_entries,
136        }
137    }
138}