#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct DescribeKeyOutput {
pub key_metadata: ::std::option::Option<crate::types::KeyMetadata>,
_request_id: Option<String>,
}
impl DescribeKeyOutput {
pub fn key_metadata(&self) -> ::std::option::Option<&crate::types::KeyMetadata> {
self.key_metadata.as_ref()
}
}
impl ::aws_types::request_id::RequestId for DescribeKeyOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl DescribeKeyOutput {
pub fn builder() -> crate::operation::describe_key::builders::DescribeKeyOutputBuilder {
crate::operation::describe_key::builders::DescribeKeyOutputBuilder::default()
}
}
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct DescribeKeyOutputBuilder {
pub(crate) key_metadata: ::std::option::Option<crate::types::KeyMetadata>,
_request_id: Option<String>,
}
impl DescribeKeyOutputBuilder {
pub fn key_metadata(mut self, input: crate::types::KeyMetadata) -> Self {
self.key_metadata = ::std::option::Option::Some(input);
self
}
pub fn set_key_metadata(mut self, input: ::std::option::Option<crate::types::KeyMetadata>) -> Self {
self.key_metadata = input;
self
}
pub fn get_key_metadata(&self) -> &::std::option::Option<crate::types::KeyMetadata> {
&self.key_metadata
}
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::describe_key::DescribeKeyOutput {
crate::operation::describe_key::DescribeKeyOutput {
key_metadata: self.key_metadata,
_request_id: self._request_id,
}
}
}