#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct PutIntelligenceConfigurationOutput {
pub account_id: ::std::string::String,
pub kms_key_arn: ::std::option::Option<::std::string::String>,
pub updated_at: ::aws_smithy_types::DateTime,
pub created_at: ::aws_smithy_types::DateTime,
_request_id: Option<String>,
}
impl PutIntelligenceConfigurationOutput {
pub fn account_id(&self) -> &str {
use std::ops::Deref;
self.account_id.deref()
}
pub fn kms_key_arn(&self) -> ::std::option::Option<&str> {
self.kms_key_arn.as_deref()
}
pub fn updated_at(&self) -> &::aws_smithy_types::DateTime {
&self.updated_at
}
pub fn created_at(&self) -> &::aws_smithy_types::DateTime {
&self.created_at
}
}
impl ::aws_types::request_id::RequestId for PutIntelligenceConfigurationOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl PutIntelligenceConfigurationOutput {
pub fn builder() -> crate::operation::put_intelligence_configuration::builders::PutIntelligenceConfigurationOutputBuilder {
crate::operation::put_intelligence_configuration::builders::PutIntelligenceConfigurationOutputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct PutIntelligenceConfigurationOutputBuilder {
pub(crate) account_id: ::std::option::Option<::std::string::String>,
pub(crate) kms_key_arn: ::std::option::Option<::std::string::String>,
pub(crate) updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
_request_id: Option<String>,
}
impl PutIntelligenceConfigurationOutputBuilder {
pub fn account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.account_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.account_id = input;
self
}
pub fn get_account_id(&self) -> &::std::option::Option<::std::string::String> {
&self.account_id
}
pub fn kms_key_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.kms_key_arn = ::std::option::Option::Some(input.into());
self
}
pub fn set_kms_key_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.kms_key_arn = input;
self
}
pub fn get_kms_key_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.kms_key_arn
}
pub fn updated_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.updated_at = ::std::option::Option::Some(input);
self
}
pub fn set_updated_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.updated_at = input;
self
}
pub fn get_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.updated_at
}
pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.created_at = ::std::option::Option::Some(input);
self
}
pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.created_at = input;
self
}
pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.created_at
}
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,
) -> ::std::result::Result<
crate::operation::put_intelligence_configuration::PutIntelligenceConfigurationOutput,
::aws_smithy_types::error::operation::BuildError,
> {
::std::result::Result::Ok(crate::operation::put_intelligence_configuration::PutIntelligenceConfigurationOutput {
account_id: self.account_id.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"account_id",
"account_id was not specified but it is required when building PutIntelligenceConfigurationOutput",
)
})?,
kms_key_arn: self.kms_key_arn,
updated_at: self.updated_at.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"updated_at",
"updated_at was not specified but it is required when building PutIntelligenceConfigurationOutput",
)
})?,
created_at: self.created_at.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"created_at",
"created_at was not specified but it is required when building PutIntelligenceConfigurationOutput",
)
})?,
_request_id: self._request_id,
})
}
}