aws_sdk_s3/operation/create_session/
_create_session_output.rs#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct CreateSessionOutput {
pub server_side_encryption: ::std::option::Option<crate::types::ServerSideEncryption>,
pub ssekms_key_id: ::std::option::Option<::std::string::String>,
pub ssekms_encryption_context: ::std::option::Option<::std::string::String>,
pub bucket_key_enabled: ::std::option::Option<bool>,
pub credentials: ::std::option::Option<crate::types::SessionCredentials>,
_extended_request_id: Option<String>,
_request_id: Option<String>,
}
impl CreateSessionOutput {
pub fn server_side_encryption(&self) -> ::std::option::Option<&crate::types::ServerSideEncryption> {
self.server_side_encryption.as_ref()
}
pub fn ssekms_key_id(&self) -> ::std::option::Option<&str> {
self.ssekms_key_id.as_deref()
}
pub fn ssekms_encryption_context(&self) -> ::std::option::Option<&str> {
self.ssekms_encryption_context.as_deref()
}
pub fn bucket_key_enabled(&self) -> ::std::option::Option<bool> {
self.bucket_key_enabled
}
pub fn credentials(&self) -> ::std::option::Option<&crate::types::SessionCredentials> {
self.credentials.as_ref()
}
}
impl ::std::fmt::Debug for CreateSessionOutput {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("CreateSessionOutput");
formatter.field("server_side_encryption", &self.server_side_encryption);
formatter.field("ssekms_key_id", &"*** Sensitive Data Redacted ***");
formatter.field("ssekms_encryption_context", &"*** Sensitive Data Redacted ***");
formatter.field("bucket_key_enabled", &self.bucket_key_enabled);
formatter.field("credentials", &self.credentials);
formatter.field("_extended_request_id", &self._extended_request_id);
formatter.field("_request_id", &self._request_id);
formatter.finish()
}
}
impl crate::s3_request_id::RequestIdExt for CreateSessionOutput {
fn extended_request_id(&self) -> Option<&str> {
self._extended_request_id.as_deref()
}
}
impl ::aws_types::request_id::RequestId for CreateSessionOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl CreateSessionOutput {
pub fn builder() -> crate::operation::create_session::builders::CreateSessionOutputBuilder {
crate::operation::create_session::builders::CreateSessionOutputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct CreateSessionOutputBuilder {
pub(crate) server_side_encryption: ::std::option::Option<crate::types::ServerSideEncryption>,
pub(crate) ssekms_key_id: ::std::option::Option<::std::string::String>,
pub(crate) ssekms_encryption_context: ::std::option::Option<::std::string::String>,
pub(crate) bucket_key_enabled: ::std::option::Option<bool>,
pub(crate) credentials: ::std::option::Option<crate::types::SessionCredentials>,
_extended_request_id: Option<String>,
_request_id: Option<String>,
}
impl CreateSessionOutputBuilder {
pub fn server_side_encryption(mut self, input: crate::types::ServerSideEncryption) -> Self {
self.server_side_encryption = ::std::option::Option::Some(input);
self
}
pub fn set_server_side_encryption(mut self, input: ::std::option::Option<crate::types::ServerSideEncryption>) -> Self {
self.server_side_encryption = input;
self
}
pub fn get_server_side_encryption(&self) -> &::std::option::Option<crate::types::ServerSideEncryption> {
&self.server_side_encryption
}
pub fn ssekms_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.ssekms_key_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_ssekms_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.ssekms_key_id = input;
self
}
pub fn get_ssekms_key_id(&self) -> &::std::option::Option<::std::string::String> {
&self.ssekms_key_id
}
pub fn ssekms_encryption_context(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.ssekms_encryption_context = ::std::option::Option::Some(input.into());
self
}
pub fn set_ssekms_encryption_context(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.ssekms_encryption_context = input;
self
}
pub fn get_ssekms_encryption_context(&self) -> &::std::option::Option<::std::string::String> {
&self.ssekms_encryption_context
}
pub fn bucket_key_enabled(mut self, input: bool) -> Self {
self.bucket_key_enabled = ::std::option::Option::Some(input);
self
}
pub fn set_bucket_key_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
self.bucket_key_enabled = input;
self
}
pub fn get_bucket_key_enabled(&self) -> &::std::option::Option<bool> {
&self.bucket_key_enabled
}
pub fn credentials(mut self, input: crate::types::SessionCredentials) -> Self {
self.credentials = ::std::option::Option::Some(input);
self
}
pub fn set_credentials(mut self, input: ::std::option::Option<crate::types::SessionCredentials>) -> Self {
self.credentials = input;
self
}
pub fn get_credentials(&self) -> &::std::option::Option<crate::types::SessionCredentials> {
&self.credentials
}
pub(crate) fn _extended_request_id(mut self, extended_request_id: impl Into<String>) -> Self {
self._extended_request_id = Some(extended_request_id.into());
self
}
pub(crate) fn _set_extended_request_id(&mut self, extended_request_id: Option<String>) -> &mut Self {
self._extended_request_id = extended_request_id;
self
}
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
}
pub fn build(self) -> crate::operation::create_session::CreateSessionOutput {
crate::operation::create_session::CreateSessionOutput {
server_side_encryption: self.server_side_encryption,
ssekms_key_id: self.ssekms_key_id,
ssekms_encryption_context: self.ssekms_encryption_context,
bucket_key_enabled: self.bucket_key_enabled,
credentials: self.credentials,
_extended_request_id: self._extended_request_id,
_request_id: self._request_id,
}
}
}
impl ::std::fmt::Debug for CreateSessionOutputBuilder {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("CreateSessionOutputBuilder");
formatter.field("server_side_encryption", &self.server_side_encryption);
formatter.field("ssekms_key_id", &"*** Sensitive Data Redacted ***");
formatter.field("ssekms_encryption_context", &"*** Sensitive Data Redacted ***");
formatter.field("bucket_key_enabled", &self.bucket_key_enabled);
formatter.field("credentials", &self.credentials);
formatter.field("_extended_request_id", &self._extended_request_id);
formatter.field("_request_id", &self._request_id);
formatter.finish()
}
}