1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetEncryptionConfigurationOutput {
/// <p>The ID of the KMS key that is used for encryption.</p>
pub kms_key_id: ::std::option::Option<::std::string::String>,
/// <p>The encryption status.</p>
pub encryption_status: crate::types::EncryptionStatus,
/// <p>The type of encryption. Set to <code>KMS_BASED_ENCRYPTION</code> to use a KMS key that you own and manage. Set to <code>FLEETWISE_DEFAULT_ENCRYPTION</code> to use an Amazon Web Services managed key that is owned by the Amazon Web Services IoT FleetWise service account.</p>
pub encryption_type: crate::types::EncryptionType,
/// <p>The error message that describes why encryption settings couldn't be configured, if applicable.</p>
pub error_message: ::std::option::Option<::std::string::String>,
/// <p>The time when encryption was configured in seconds since epoch (January 1, 1970 at midnight UTC time).</p>
pub creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
/// <p>The time when encryption was last updated in seconds since epoch (January 1, 1970 at midnight UTC time).</p>
pub last_modification_time: ::std::option::Option<::aws_smithy_types::DateTime>,
_request_id: Option<String>,
}
impl GetEncryptionConfigurationOutput {
/// <p>The ID of the KMS key that is used for encryption.</p>
pub fn kms_key_id(&self) -> ::std::option::Option<&str> {
self.kms_key_id.as_deref()
}
/// <p>The encryption status.</p>
pub fn encryption_status(&self) -> &crate::types::EncryptionStatus {
&self.encryption_status
}
/// <p>The type of encryption. Set to <code>KMS_BASED_ENCRYPTION</code> to use a KMS key that you own and manage. Set to <code>FLEETWISE_DEFAULT_ENCRYPTION</code> to use an Amazon Web Services managed key that is owned by the Amazon Web Services IoT FleetWise service account.</p>
pub fn encryption_type(&self) -> &crate::types::EncryptionType {
&self.encryption_type
}
/// <p>The error message that describes why encryption settings couldn't be configured, if applicable.</p>
pub fn error_message(&self) -> ::std::option::Option<&str> {
self.error_message.as_deref()
}
/// <p>The time when encryption was configured in seconds since epoch (January 1, 1970 at midnight UTC time).</p>
pub fn creation_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.creation_time.as_ref()
}
/// <p>The time when encryption was last updated in seconds since epoch (January 1, 1970 at midnight UTC time).</p>
pub fn last_modification_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.last_modification_time.as_ref()
}
}
impl ::aws_types::request_id::RequestId for GetEncryptionConfigurationOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl GetEncryptionConfigurationOutput {
/// Creates a new builder-style object to manufacture [`GetEncryptionConfigurationOutput`](crate::operation::get_encryption_configuration::GetEncryptionConfigurationOutput).
pub fn builder() -> crate::operation::get_encryption_configuration::builders::GetEncryptionConfigurationOutputBuilder {
crate::operation::get_encryption_configuration::builders::GetEncryptionConfigurationOutputBuilder::default()
}
}
/// A builder for [`GetEncryptionConfigurationOutput`](crate::operation::get_encryption_configuration::GetEncryptionConfigurationOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetEncryptionConfigurationOutputBuilder {
pub(crate) kms_key_id: ::std::option::Option<::std::string::String>,
pub(crate) encryption_status: ::std::option::Option<crate::types::EncryptionStatus>,
pub(crate) encryption_type: ::std::option::Option<crate::types::EncryptionType>,
pub(crate) error_message: ::std::option::Option<::std::string::String>,
pub(crate) creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) last_modification_time: ::std::option::Option<::aws_smithy_types::DateTime>,
_request_id: Option<String>,
}
impl GetEncryptionConfigurationOutputBuilder {
/// <p>The ID of the KMS key that is used for encryption.</p>
pub fn kms_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.kms_key_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The ID of the KMS key that is used for encryption.</p>
pub fn set_kms_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.kms_key_id = input;
self
}
/// <p>The ID of the KMS key that is used for encryption.</p>
pub fn get_kms_key_id(&self) -> &::std::option::Option<::std::string::String> {
&self.kms_key_id
}
/// <p>The encryption status.</p>
/// This field is required.
pub fn encryption_status(mut self, input: crate::types::EncryptionStatus) -> Self {
self.encryption_status = ::std::option::Option::Some(input);
self
}
/// <p>The encryption status.</p>
pub fn set_encryption_status(mut self, input: ::std::option::Option<crate::types::EncryptionStatus>) -> Self {
self.encryption_status = input;
self
}
/// <p>The encryption status.</p>
pub fn get_encryption_status(&self) -> &::std::option::Option<crate::types::EncryptionStatus> {
&self.encryption_status
}
/// <p>The type of encryption. Set to <code>KMS_BASED_ENCRYPTION</code> to use a KMS key that you own and manage. Set to <code>FLEETWISE_DEFAULT_ENCRYPTION</code> to use an Amazon Web Services managed key that is owned by the Amazon Web Services IoT FleetWise service account.</p>
/// This field is required.
pub fn encryption_type(mut self, input: crate::types::EncryptionType) -> Self {
self.encryption_type = ::std::option::Option::Some(input);
self
}
/// <p>The type of encryption. Set to <code>KMS_BASED_ENCRYPTION</code> to use a KMS key that you own and manage. Set to <code>FLEETWISE_DEFAULT_ENCRYPTION</code> to use an Amazon Web Services managed key that is owned by the Amazon Web Services IoT FleetWise service account.</p>
pub fn set_encryption_type(mut self, input: ::std::option::Option<crate::types::EncryptionType>) -> Self {
self.encryption_type = input;
self
}
/// <p>The type of encryption. Set to <code>KMS_BASED_ENCRYPTION</code> to use a KMS key that you own and manage. Set to <code>FLEETWISE_DEFAULT_ENCRYPTION</code> to use an Amazon Web Services managed key that is owned by the Amazon Web Services IoT FleetWise service account.</p>
pub fn get_encryption_type(&self) -> &::std::option::Option<crate::types::EncryptionType> {
&self.encryption_type
}
/// <p>The error message that describes why encryption settings couldn't be configured, if applicable.</p>
pub fn error_message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.error_message = ::std::option::Option::Some(input.into());
self
}
/// <p>The error message that describes why encryption settings couldn't be configured, if applicable.</p>
pub fn set_error_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.error_message = input;
self
}
/// <p>The error message that describes why encryption settings couldn't be configured, if applicable.</p>
pub fn get_error_message(&self) -> &::std::option::Option<::std::string::String> {
&self.error_message
}
/// <p>The time when encryption was configured in seconds since epoch (January 1, 1970 at midnight UTC time).</p>
pub fn creation_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.creation_time = ::std::option::Option::Some(input);
self
}
/// <p>The time when encryption was configured in seconds since epoch (January 1, 1970 at midnight UTC time).</p>
pub fn set_creation_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.creation_time = input;
self
}
/// <p>The time when encryption was configured in seconds since epoch (January 1, 1970 at midnight UTC time).</p>
pub fn get_creation_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.creation_time
}
/// <p>The time when encryption was last updated in seconds since epoch (January 1, 1970 at midnight UTC time).</p>
pub fn last_modification_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.last_modification_time = ::std::option::Option::Some(input);
self
}
/// <p>The time when encryption was last updated in seconds since epoch (January 1, 1970 at midnight UTC time).</p>
pub fn set_last_modification_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.last_modification_time = input;
self
}
/// <p>The time when encryption was last updated in seconds since epoch (January 1, 1970 at midnight UTC time).</p>
pub fn get_last_modification_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.last_modification_time
}
pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
self._request_id = Some(request_id.into());
self
}
pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
self._request_id = request_id;
self
}
/// Consumes the builder and constructs a [`GetEncryptionConfigurationOutput`](crate::operation::get_encryption_configuration::GetEncryptionConfigurationOutput).
/// This method will fail if any of the following fields are not set:
/// - [`encryption_status`](crate::operation::get_encryption_configuration::builders::GetEncryptionConfigurationOutputBuilder::encryption_status)
/// - [`encryption_type`](crate::operation::get_encryption_configuration::builders::GetEncryptionConfigurationOutputBuilder::encryption_type)
pub fn build(
self,
) -> ::std::result::Result<
crate::operation::get_encryption_configuration::GetEncryptionConfigurationOutput,
::aws_smithy_types::error::operation::BuildError,
> {
::std::result::Result::Ok(crate::operation::get_encryption_configuration::GetEncryptionConfigurationOutput {
kms_key_id: self.kms_key_id,
encryption_status: self.encryption_status.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"encryption_status",
"encryption_status was not specified but it is required when building GetEncryptionConfigurationOutput",
)
})?,
encryption_type: self.encryption_type.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"encryption_type",
"encryption_type was not specified but it is required when building GetEncryptionConfigurationOutput",
)
})?,
error_message: self.error_message,
creation_time: self.creation_time,
last_modification_time: self.last_modification_time,
_request_id: self._request_id,
})
}
}