aws_sdk_glacier/operation/describe_vault/
_describe_vault_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Contains the Amazon S3 Glacier response to your request.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct DescribeVaultOutput {
7    /// <p>The Amazon Resource Name (ARN) of the vault.</p>
8    pub vault_arn: ::std::option::Option<::std::string::String>,
9    /// <p>The name of the vault.</p>
10    pub vault_name: ::std::option::Option<::std::string::String>,
11    /// <p>The Universal Coordinated Time (UTC) date when the vault was created. This value should be a string in the ISO 8601 date format, for example <code>2012-03-20T17:03:43.221Z</code>.</p>
12    pub creation_date: ::std::option::Option<::std::string::String>,
13    /// <p>The Universal Coordinated Time (UTC) date when Amazon S3 Glacier completed the last vault inventory. This value should be a string in the ISO 8601 date format, for example <code>2012-03-20T17:03:43.221Z</code>.</p>
14    pub last_inventory_date: ::std::option::Option<::std::string::String>,
15    /// <p>The number of archives in the vault as of the last inventory date. This field will return <code>null</code> if an inventory has not yet run on the vault, for example if you just created the vault.</p>
16    pub number_of_archives: i64,
17    /// <p>Total size, in bytes, of the archives in the vault as of the last inventory date. This field will return null if an inventory has not yet run on the vault, for example if you just created the vault.</p>
18    pub size_in_bytes: i64,
19    _request_id: Option<String>,
20}
21impl DescribeVaultOutput {
22    /// <p>The Amazon Resource Name (ARN) of the vault.</p>
23    pub fn vault_arn(&self) -> ::std::option::Option<&str> {
24        self.vault_arn.as_deref()
25    }
26    /// <p>The name of the vault.</p>
27    pub fn vault_name(&self) -> ::std::option::Option<&str> {
28        self.vault_name.as_deref()
29    }
30    /// <p>The Universal Coordinated Time (UTC) date when the vault was created. This value should be a string in the ISO 8601 date format, for example <code>2012-03-20T17:03:43.221Z</code>.</p>
31    pub fn creation_date(&self) -> ::std::option::Option<&str> {
32        self.creation_date.as_deref()
33    }
34    /// <p>The Universal Coordinated Time (UTC) date when Amazon S3 Glacier completed the last vault inventory. This value should be a string in the ISO 8601 date format, for example <code>2012-03-20T17:03:43.221Z</code>.</p>
35    pub fn last_inventory_date(&self) -> ::std::option::Option<&str> {
36        self.last_inventory_date.as_deref()
37    }
38    /// <p>The number of archives in the vault as of the last inventory date. This field will return <code>null</code> if an inventory has not yet run on the vault, for example if you just created the vault.</p>
39    pub fn number_of_archives(&self) -> i64 {
40        self.number_of_archives
41    }
42    /// <p>Total size, in bytes, of the archives in the vault as of the last inventory date. This field will return null if an inventory has not yet run on the vault, for example if you just created the vault.</p>
43    pub fn size_in_bytes(&self) -> i64 {
44        self.size_in_bytes
45    }
46}
47impl ::aws_types::request_id::RequestId for DescribeVaultOutput {
48    fn request_id(&self) -> Option<&str> {
49        self._request_id.as_deref()
50    }
51}
52impl DescribeVaultOutput {
53    /// Creates a new builder-style object to manufacture [`DescribeVaultOutput`](crate::operation::describe_vault::DescribeVaultOutput).
54    pub fn builder() -> crate::operation::describe_vault::builders::DescribeVaultOutputBuilder {
55        crate::operation::describe_vault::builders::DescribeVaultOutputBuilder::default()
56    }
57}
58
59/// A builder for [`DescribeVaultOutput`](crate::operation::describe_vault::DescribeVaultOutput).
60#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
61#[non_exhaustive]
62pub struct DescribeVaultOutputBuilder {
63    pub(crate) vault_arn: ::std::option::Option<::std::string::String>,
64    pub(crate) vault_name: ::std::option::Option<::std::string::String>,
65    pub(crate) creation_date: ::std::option::Option<::std::string::String>,
66    pub(crate) last_inventory_date: ::std::option::Option<::std::string::String>,
67    pub(crate) number_of_archives: ::std::option::Option<i64>,
68    pub(crate) size_in_bytes: ::std::option::Option<i64>,
69    _request_id: Option<String>,
70}
71impl DescribeVaultOutputBuilder {
72    /// <p>The Amazon Resource Name (ARN) of the vault.</p>
73    pub fn vault_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
74        self.vault_arn = ::std::option::Option::Some(input.into());
75        self
76    }
77    /// <p>The Amazon Resource Name (ARN) of the vault.</p>
78    pub fn set_vault_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
79        self.vault_arn = input;
80        self
81    }
82    /// <p>The Amazon Resource Name (ARN) of the vault.</p>
83    pub fn get_vault_arn(&self) -> &::std::option::Option<::std::string::String> {
84        &self.vault_arn
85    }
86    /// <p>The name of the vault.</p>
87    pub fn vault_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
88        self.vault_name = ::std::option::Option::Some(input.into());
89        self
90    }
91    /// <p>The name of the vault.</p>
92    pub fn set_vault_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
93        self.vault_name = input;
94        self
95    }
96    /// <p>The name of the vault.</p>
97    pub fn get_vault_name(&self) -> &::std::option::Option<::std::string::String> {
98        &self.vault_name
99    }
100    /// <p>The Universal Coordinated Time (UTC) date when the vault was created. This value should be a string in the ISO 8601 date format, for example <code>2012-03-20T17:03:43.221Z</code>.</p>
101    pub fn creation_date(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
102        self.creation_date = ::std::option::Option::Some(input.into());
103        self
104    }
105    /// <p>The Universal Coordinated Time (UTC) date when the vault was created. This value should be a string in the ISO 8601 date format, for example <code>2012-03-20T17:03:43.221Z</code>.</p>
106    pub fn set_creation_date(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
107        self.creation_date = input;
108        self
109    }
110    /// <p>The Universal Coordinated Time (UTC) date when the vault was created. This value should be a string in the ISO 8601 date format, for example <code>2012-03-20T17:03:43.221Z</code>.</p>
111    pub fn get_creation_date(&self) -> &::std::option::Option<::std::string::String> {
112        &self.creation_date
113    }
114    /// <p>The Universal Coordinated Time (UTC) date when Amazon S3 Glacier completed the last vault inventory. This value should be a string in the ISO 8601 date format, for example <code>2012-03-20T17:03:43.221Z</code>.</p>
115    pub fn last_inventory_date(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
116        self.last_inventory_date = ::std::option::Option::Some(input.into());
117        self
118    }
119    /// <p>The Universal Coordinated Time (UTC) date when Amazon S3 Glacier completed the last vault inventory. This value should be a string in the ISO 8601 date format, for example <code>2012-03-20T17:03:43.221Z</code>.</p>
120    pub fn set_last_inventory_date(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
121        self.last_inventory_date = input;
122        self
123    }
124    /// <p>The Universal Coordinated Time (UTC) date when Amazon S3 Glacier completed the last vault inventory. This value should be a string in the ISO 8601 date format, for example <code>2012-03-20T17:03:43.221Z</code>.</p>
125    pub fn get_last_inventory_date(&self) -> &::std::option::Option<::std::string::String> {
126        &self.last_inventory_date
127    }
128    /// <p>The number of archives in the vault as of the last inventory date. This field will return <code>null</code> if an inventory has not yet run on the vault, for example if you just created the vault.</p>
129    pub fn number_of_archives(mut self, input: i64) -> Self {
130        self.number_of_archives = ::std::option::Option::Some(input);
131        self
132    }
133    /// <p>The number of archives in the vault as of the last inventory date. This field will return <code>null</code> if an inventory has not yet run on the vault, for example if you just created the vault.</p>
134    pub fn set_number_of_archives(mut self, input: ::std::option::Option<i64>) -> Self {
135        self.number_of_archives = input;
136        self
137    }
138    /// <p>The number of archives in the vault as of the last inventory date. This field will return <code>null</code> if an inventory has not yet run on the vault, for example if you just created the vault.</p>
139    pub fn get_number_of_archives(&self) -> &::std::option::Option<i64> {
140        &self.number_of_archives
141    }
142    /// <p>Total size, in bytes, of the archives in the vault as of the last inventory date. This field will return null if an inventory has not yet run on the vault, for example if you just created the vault.</p>
143    pub fn size_in_bytes(mut self, input: i64) -> Self {
144        self.size_in_bytes = ::std::option::Option::Some(input);
145        self
146    }
147    /// <p>Total size, in bytes, of the archives in the vault as of the last inventory date. This field will return null if an inventory has not yet run on the vault, for example if you just created the vault.</p>
148    pub fn set_size_in_bytes(mut self, input: ::std::option::Option<i64>) -> Self {
149        self.size_in_bytes = input;
150        self
151    }
152    /// <p>Total size, in bytes, of the archives in the vault as of the last inventory date. This field will return null if an inventory has not yet run on the vault, for example if you just created the vault.</p>
153    pub fn get_size_in_bytes(&self) -> &::std::option::Option<i64> {
154        &self.size_in_bytes
155    }
156    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
157        self._request_id = Some(request_id.into());
158        self
159    }
160
161    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
162        self._request_id = request_id;
163        self
164    }
165    /// Consumes the builder and constructs a [`DescribeVaultOutput`](crate::operation::describe_vault::DescribeVaultOutput).
166    pub fn build(self) -> crate::operation::describe_vault::DescribeVaultOutput {
167        crate::operation::describe_vault::DescribeVaultOutput {
168            vault_arn: self.vault_arn,
169            vault_name: self.vault_name,
170            creation_date: self.creation_date,
171            last_inventory_date: self.last_inventory_date,
172            number_of_archives: self.number_of_archives.unwrap_or_default(),
173            size_in_bytes: self.size_in_bytes.unwrap_or_default(),
174            _request_id: self._request_id,
175        }
176    }
177}