aws_sdk_kms/operation/create_key/
_create_key_output.rs#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateKeyOutput {
pub key_metadata: ::std::option::Option<crate::types::KeyMetadata>,
_request_id: Option<String>,
}
impl CreateKeyOutput {
pub fn key_metadata(&self) -> ::std::option::Option<&crate::types::KeyMetadata> {
self.key_metadata.as_ref()
}
}
impl ::aws_types::request_id::RequestId for CreateKeyOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl CreateKeyOutput {
pub fn builder() -> crate::operation::create_key::builders::CreateKeyOutputBuilder {
crate::operation::create_key::builders::CreateKeyOutputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateKeyOutputBuilder {
pub(crate) key_metadata: ::std::option::Option<crate::types::KeyMetadata>,
_request_id: Option<String>,
}
impl CreateKeyOutputBuilder {
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::create_key::CreateKeyOutput {
crate::operation::create_key::CreateKeyOutput {
key_metadata: self.key_metadata,
_request_id: self._request_id,
}
}
}