#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ExportKeyInput {
pub key_material: ::std::option::Option<crate::types::ExportKeyMaterial>,
pub export_key_identifier: ::std::option::Option<::std::string::String>,
pub export_attributes: ::std::option::Option<crate::types::ExportAttributes>,
}
impl ExportKeyInput {
pub fn key_material(&self) -> ::std::option::Option<&crate::types::ExportKeyMaterial> {
self.key_material.as_ref()
}
pub fn export_key_identifier(&self) -> ::std::option::Option<&str> {
self.export_key_identifier.as_deref()
}
pub fn export_attributes(&self) -> ::std::option::Option<&crate::types::ExportAttributes> {
self.export_attributes.as_ref()
}
}
impl ExportKeyInput {
pub fn builder() -> crate::operation::export_key::builders::ExportKeyInputBuilder {
crate::operation::export_key::builders::ExportKeyInputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ExportKeyInputBuilder {
pub(crate) key_material: ::std::option::Option<crate::types::ExportKeyMaterial>,
pub(crate) export_key_identifier: ::std::option::Option<::std::string::String>,
pub(crate) export_attributes: ::std::option::Option<crate::types::ExportAttributes>,
}
impl ExportKeyInputBuilder {
pub fn key_material(mut self, input: crate::types::ExportKeyMaterial) -> Self {
self.key_material = ::std::option::Option::Some(input);
self
}
pub fn set_key_material(mut self, input: ::std::option::Option<crate::types::ExportKeyMaterial>) -> Self {
self.key_material = input;
self
}
pub fn get_key_material(&self) -> &::std::option::Option<crate::types::ExportKeyMaterial> {
&self.key_material
}
pub fn export_key_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.export_key_identifier = ::std::option::Option::Some(input.into());
self
}
pub fn set_export_key_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.export_key_identifier = input;
self
}
pub fn get_export_key_identifier(&self) -> &::std::option::Option<::std::string::String> {
&self.export_key_identifier
}
pub fn export_attributes(mut self, input: crate::types::ExportAttributes) -> Self {
self.export_attributes = ::std::option::Option::Some(input);
self
}
pub fn set_export_attributes(mut self, input: ::std::option::Option<crate::types::ExportAttributes>) -> Self {
self.export_attributes = input;
self
}
pub fn get_export_attributes(&self) -> &::std::option::Option<crate::types::ExportAttributes> {
&self.export_attributes
}
pub fn build(self) -> ::std::result::Result<crate::operation::export_key::ExportKeyInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::export_key::ExportKeyInput {
key_material: self.key_material,
export_key_identifier: self.export_key_identifier,
export_attributes: self.export_attributes,
})
}
}