1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
5pub struct CreateSessionOutput {
6/// <p>The server-side encryption algorithm used when you store objects in the directory bucket.</p>
7pub server_side_encryption: ::std::option::Option<crate::types::ServerSideEncryption>,
8/// <p>If you specify <code>x-amz-server-side-encryption</code> with <code>aws:kms</code>, this header indicates the ID of the KMS symmetric encryption customer managed key that was used for object encryption.</p>
9pub ssekms_key_id: ::std::option::Option<::std::string::String>,
10/// <p>If present, indicates the Amazon Web Services KMS Encryption Context to use for object encryption. The value of this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs. This value is stored as object metadata and automatically gets passed on to Amazon Web Services KMS for future <code>GetObject</code> operations on this object.</p>
11pub ssekms_encryption_context: ::std::option::Option<::std::string::String>,
12/// <p>Indicates whether to use an S3 Bucket Key for server-side encryption with KMS keys (SSE-KMS).</p>
13pub bucket_key_enabled: ::std::option::Option<bool>,
14/// <p>The established temporary security credentials for the created session.</p>
15pub credentials: ::std::option::Option<crate::types::SessionCredentials>,
16 _extended_request_id: Option<String>,
17 _request_id: Option<String>,
18}
19impl CreateSessionOutput {
20/// <p>The server-side encryption algorithm used when you store objects in the directory bucket.</p>
21pub fn server_side_encryption(&self) -> ::std::option::Option<&crate::types::ServerSideEncryption> {
22self.server_side_encryption.as_ref()
23 }
24/// <p>If you specify <code>x-amz-server-side-encryption</code> with <code>aws:kms</code>, this header indicates the ID of the KMS symmetric encryption customer managed key that was used for object encryption.</p>
25pub fn ssekms_key_id(&self) -> ::std::option::Option<&str> {
26self.ssekms_key_id.as_deref()
27 }
28/// <p>If present, indicates the Amazon Web Services KMS Encryption Context to use for object encryption. The value of this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs. This value is stored as object metadata and automatically gets passed on to Amazon Web Services KMS for future <code>GetObject</code> operations on this object.</p>
29pub fn ssekms_encryption_context(&self) -> ::std::option::Option<&str> {
30self.ssekms_encryption_context.as_deref()
31 }
32/// <p>Indicates whether to use an S3 Bucket Key for server-side encryption with KMS keys (SSE-KMS).</p>
33pub fn bucket_key_enabled(&self) -> ::std::option::Option<bool> {
34self.bucket_key_enabled
35 }
36/// <p>The established temporary security credentials for the created session.</p>
37pub fn credentials(&self) -> ::std::option::Option<&crate::types::SessionCredentials> {
38self.credentials.as_ref()
39 }
40}
41impl ::std::fmt::Debug for CreateSessionOutput {
42fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
43let mut formatter = f.debug_struct("CreateSessionOutput");
44 formatter.field("server_side_encryption", &self.server_side_encryption);
45 formatter.field("ssekms_key_id", &"*** Sensitive Data Redacted ***");
46 formatter.field("ssekms_encryption_context", &"*** Sensitive Data Redacted ***");
47 formatter.field("bucket_key_enabled", &self.bucket_key_enabled);
48 formatter.field("credentials", &self.credentials);
49 formatter.field("_extended_request_id", &self._extended_request_id);
50 formatter.field("_request_id", &self._request_id);
51 formatter.finish()
52 }
53}
54impl crate::s3_request_id::RequestIdExt for CreateSessionOutput {
55fn extended_request_id(&self) -> Option<&str> {
56self._extended_request_id.as_deref()
57 }
58}
59impl ::aws_types::request_id::RequestId for CreateSessionOutput {
60fn request_id(&self) -> Option<&str> {
61self._request_id.as_deref()
62 }
63}
64impl CreateSessionOutput {
65/// Creates a new builder-style object to manufacture [`CreateSessionOutput`](crate::operation::create_session::CreateSessionOutput).
66pub fn builder() -> crate::operation::create_session::builders::CreateSessionOutputBuilder {
67crate::operation::create_session::builders::CreateSessionOutputBuilder::default()
68 }
69}
7071/// A builder for [`CreateSessionOutput`](crate::operation::create_session::CreateSessionOutput).
72#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
73#[non_exhaustive]
74pub struct CreateSessionOutputBuilder {
75pub(crate) server_side_encryption: ::std::option::Option<crate::types::ServerSideEncryption>,
76pub(crate) ssekms_key_id: ::std::option::Option<::std::string::String>,
77pub(crate) ssekms_encryption_context: ::std::option::Option<::std::string::String>,
78pub(crate) bucket_key_enabled: ::std::option::Option<bool>,
79pub(crate) credentials: ::std::option::Option<crate::types::SessionCredentials>,
80 _extended_request_id: Option<String>,
81 _request_id: Option<String>,
82}
83impl CreateSessionOutputBuilder {
84/// <p>The server-side encryption algorithm used when you store objects in the directory bucket.</p>
85pub fn server_side_encryption(mut self, input: crate::types::ServerSideEncryption) -> Self {
86self.server_side_encryption = ::std::option::Option::Some(input);
87self
88}
89/// <p>The server-side encryption algorithm used when you store objects in the directory bucket.</p>
90pub fn set_server_side_encryption(mut self, input: ::std::option::Option<crate::types::ServerSideEncryption>) -> Self {
91self.server_side_encryption = input;
92self
93}
94/// <p>The server-side encryption algorithm used when you store objects in the directory bucket.</p>
95pub fn get_server_side_encryption(&self) -> &::std::option::Option<crate::types::ServerSideEncryption> {
96&self.server_side_encryption
97 }
98/// <p>If you specify <code>x-amz-server-side-encryption</code> with <code>aws:kms</code>, this header indicates the ID of the KMS symmetric encryption customer managed key that was used for object encryption.</p>
99pub fn ssekms_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
100self.ssekms_key_id = ::std::option::Option::Some(input.into());
101self
102}
103/// <p>If you specify <code>x-amz-server-side-encryption</code> with <code>aws:kms</code>, this header indicates the ID of the KMS symmetric encryption customer managed key that was used for object encryption.</p>
104pub fn set_ssekms_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
105self.ssekms_key_id = input;
106self
107}
108/// <p>If you specify <code>x-amz-server-side-encryption</code> with <code>aws:kms</code>, this header indicates the ID of the KMS symmetric encryption customer managed key that was used for object encryption.</p>
109pub fn get_ssekms_key_id(&self) -> &::std::option::Option<::std::string::String> {
110&self.ssekms_key_id
111 }
112/// <p>If present, indicates the Amazon Web Services KMS Encryption Context to use for object encryption. The value of this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs. This value is stored as object metadata and automatically gets passed on to Amazon Web Services KMS for future <code>GetObject</code> operations on this object.</p>
113pub fn ssekms_encryption_context(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
114self.ssekms_encryption_context = ::std::option::Option::Some(input.into());
115self
116}
117/// <p>If present, indicates the Amazon Web Services KMS Encryption Context to use for object encryption. The value of this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs. This value is stored as object metadata and automatically gets passed on to Amazon Web Services KMS for future <code>GetObject</code> operations on this object.</p>
118pub fn set_ssekms_encryption_context(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
119self.ssekms_encryption_context = input;
120self
121}
122/// <p>If present, indicates the Amazon Web Services KMS Encryption Context to use for object encryption. The value of this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs. This value is stored as object metadata and automatically gets passed on to Amazon Web Services KMS for future <code>GetObject</code> operations on this object.</p>
123pub fn get_ssekms_encryption_context(&self) -> &::std::option::Option<::std::string::String> {
124&self.ssekms_encryption_context
125 }
126/// <p>Indicates whether to use an S3 Bucket Key for server-side encryption with KMS keys (SSE-KMS).</p>
127pub fn bucket_key_enabled(mut self, input: bool) -> Self {
128self.bucket_key_enabled = ::std::option::Option::Some(input);
129self
130}
131/// <p>Indicates whether to use an S3 Bucket Key for server-side encryption with KMS keys (SSE-KMS).</p>
132pub fn set_bucket_key_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
133self.bucket_key_enabled = input;
134self
135}
136/// <p>Indicates whether to use an S3 Bucket Key for server-side encryption with KMS keys (SSE-KMS).</p>
137pub fn get_bucket_key_enabled(&self) -> &::std::option::Option<bool> {
138&self.bucket_key_enabled
139 }
140/// <p>The established temporary security credentials for the created session.</p>
141 /// This field is required.
142pub fn credentials(mut self, input: crate::types::SessionCredentials) -> Self {
143self.credentials = ::std::option::Option::Some(input);
144self
145}
146/// <p>The established temporary security credentials for the created session.</p>
147pub fn set_credentials(mut self, input: ::std::option::Option<crate::types::SessionCredentials>) -> Self {
148self.credentials = input;
149self
150}
151/// <p>The established temporary security credentials for the created session.</p>
152pub fn get_credentials(&self) -> &::std::option::Option<crate::types::SessionCredentials> {
153&self.credentials
154 }
155pub(crate) fn _extended_request_id(mut self, extended_request_id: impl Into<String>) -> Self {
156self._extended_request_id = Some(extended_request_id.into());
157self
158}
159160pub(crate) fn _set_extended_request_id(&mut self, extended_request_id: Option<String>) -> &mut Self {
161self._extended_request_id = extended_request_id;
162self
163}
164pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
165self._request_id = Some(request_id.into());
166self
167}
168169pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
170self._request_id = request_id;
171self
172}
173/// Consumes the builder and constructs a [`CreateSessionOutput`](crate::operation::create_session::CreateSessionOutput).
174pub fn build(self) -> crate::operation::create_session::CreateSessionOutput {
175crate::operation::create_session::CreateSessionOutput {
176 server_side_encryption: self.server_side_encryption,
177 ssekms_key_id: self.ssekms_key_id,
178 ssekms_encryption_context: self.ssekms_encryption_context,
179 bucket_key_enabled: self.bucket_key_enabled,
180 credentials: self.credentials,
181 _extended_request_id: self._extended_request_id,
182 _request_id: self._request_id,
183 }
184 }
185}
186impl ::std::fmt::Debug for CreateSessionOutputBuilder {
187fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
188let mut formatter = f.debug_struct("CreateSessionOutputBuilder");
189 formatter.field("server_side_encryption", &self.server_side_encryption);
190 formatter.field("ssekms_key_id", &"*** Sensitive Data Redacted ***");
191 formatter.field("ssekms_encryption_context", &"*** Sensitive Data Redacted ***");
192 formatter.field("bucket_key_enabled", &self.bucket_key_enabled);
193 formatter.field("credentials", &self.credentials);
194 formatter.field("_extended_request_id", &self._extended_request_id);
195 formatter.field("_request_id", &self._request_id);
196 formatter.finish()
197 }
198}