aws_sdk_s3/types/
_progress.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>This data type contains information about progress of an operation.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct Progress {
7    /// <p>The current number of object bytes scanned.</p>
8    pub bytes_scanned: ::std::option::Option<i64>,
9    /// <p>The current number of uncompressed object bytes processed.</p>
10    pub bytes_processed: ::std::option::Option<i64>,
11    /// <p>The current number of bytes of records payload data returned.</p>
12    pub bytes_returned: ::std::option::Option<i64>,
13}
14impl Progress {
15    /// <p>The current number of object bytes scanned.</p>
16    pub fn bytes_scanned(&self) -> ::std::option::Option<i64> {
17        self.bytes_scanned
18    }
19    /// <p>The current number of uncompressed object bytes processed.</p>
20    pub fn bytes_processed(&self) -> ::std::option::Option<i64> {
21        self.bytes_processed
22    }
23    /// <p>The current number of bytes of records payload data returned.</p>
24    pub fn bytes_returned(&self) -> ::std::option::Option<i64> {
25        self.bytes_returned
26    }
27}
28impl Progress {
29    /// Creates a new builder-style object to manufacture [`Progress`](crate::types::Progress).
30    pub fn builder() -> crate::types::builders::ProgressBuilder {
31        crate::types::builders::ProgressBuilder::default()
32    }
33}
34
35/// A builder for [`Progress`](crate::types::Progress).
36#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
37#[non_exhaustive]
38pub struct ProgressBuilder {
39    pub(crate) bytes_scanned: ::std::option::Option<i64>,
40    pub(crate) bytes_processed: ::std::option::Option<i64>,
41    pub(crate) bytes_returned: ::std::option::Option<i64>,
42}
43impl ProgressBuilder {
44    /// <p>The current number of object bytes scanned.</p>
45    pub fn bytes_scanned(mut self, input: i64) -> Self {
46        self.bytes_scanned = ::std::option::Option::Some(input);
47        self
48    }
49    /// <p>The current number of object bytes scanned.</p>
50    pub fn set_bytes_scanned(mut self, input: ::std::option::Option<i64>) -> Self {
51        self.bytes_scanned = input;
52        self
53    }
54    /// <p>The current number of object bytes scanned.</p>
55    pub fn get_bytes_scanned(&self) -> &::std::option::Option<i64> {
56        &self.bytes_scanned
57    }
58    /// <p>The current number of uncompressed object bytes processed.</p>
59    pub fn bytes_processed(mut self, input: i64) -> Self {
60        self.bytes_processed = ::std::option::Option::Some(input);
61        self
62    }
63    /// <p>The current number of uncompressed object bytes processed.</p>
64    pub fn set_bytes_processed(mut self, input: ::std::option::Option<i64>) -> Self {
65        self.bytes_processed = input;
66        self
67    }
68    /// <p>The current number of uncompressed object bytes processed.</p>
69    pub fn get_bytes_processed(&self) -> &::std::option::Option<i64> {
70        &self.bytes_processed
71    }
72    /// <p>The current number of bytes of records payload data returned.</p>
73    pub fn bytes_returned(mut self, input: i64) -> Self {
74        self.bytes_returned = ::std::option::Option::Some(input);
75        self
76    }
77    /// <p>The current number of bytes of records payload data returned.</p>
78    pub fn set_bytes_returned(mut self, input: ::std::option::Option<i64>) -> Self {
79        self.bytes_returned = input;
80        self
81    }
82    /// <p>The current number of bytes of records payload data returned.</p>
83    pub fn get_bytes_returned(&self) -> &::std::option::Option<i64> {
84        &self.bytes_returned
85    }
86    /// Consumes the builder and constructs a [`Progress`](crate::types::Progress).
87    pub fn build(self) -> crate::types::Progress {
88        crate::types::Progress {
89            bytes_scanned: self.bytes_scanned,
90            bytes_processed: self.bytes_processed,
91            bytes_returned: self.bytes_returned,
92        }
93    }
94}