#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateKeyRegistrationOutput {
pub failed_key_registration: ::std::option::Option<::std::vec::Vec<crate::types::FailedKeyRegistrationEntry>>,
pub successful_key_registration: ::std::option::Option<::std::vec::Vec<crate::types::SuccessfulKeyRegistrationEntry>>,
pub request_id: ::std::option::Option<::std::string::String>,
_request_id: Option<String>,
}
impl UpdateKeyRegistrationOutput {
pub fn failed_key_registration(&self) -> &[crate::types::FailedKeyRegistrationEntry] {
self.failed_key_registration.as_deref().unwrap_or_default()
}
pub fn successful_key_registration(&self) -> &[crate::types::SuccessfulKeyRegistrationEntry] {
self.successful_key_registration.as_deref().unwrap_or_default()
}
pub fn request_id(&self) -> ::std::option::Option<&str> {
self.request_id.as_deref()
}
}
impl ::aws_types::request_id::RequestId for UpdateKeyRegistrationOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl UpdateKeyRegistrationOutput {
pub fn builder() -> crate::operation::update_key_registration::builders::UpdateKeyRegistrationOutputBuilder {
crate::operation::update_key_registration::builders::UpdateKeyRegistrationOutputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateKeyRegistrationOutputBuilder {
pub(crate) failed_key_registration: ::std::option::Option<::std::vec::Vec<crate::types::FailedKeyRegistrationEntry>>,
pub(crate) successful_key_registration: ::std::option::Option<::std::vec::Vec<crate::types::SuccessfulKeyRegistrationEntry>>,
pub(crate) request_id: ::std::option::Option<::std::string::String>,
_request_id: Option<String>,
}
impl UpdateKeyRegistrationOutputBuilder {
pub fn failed_key_registration(mut self, input: crate::types::FailedKeyRegistrationEntry) -> Self {
let mut v = self.failed_key_registration.unwrap_or_default();
v.push(input);
self.failed_key_registration = ::std::option::Option::Some(v);
self
}
pub fn set_failed_key_registration(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::FailedKeyRegistrationEntry>>) -> Self {
self.failed_key_registration = input;
self
}
pub fn get_failed_key_registration(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::FailedKeyRegistrationEntry>> {
&self.failed_key_registration
}
pub fn successful_key_registration(mut self, input: crate::types::SuccessfulKeyRegistrationEntry) -> Self {
let mut v = self.successful_key_registration.unwrap_or_default();
v.push(input);
self.successful_key_registration = ::std::option::Option::Some(v);
self
}
pub fn set_successful_key_registration(
mut self,
input: ::std::option::Option<::std::vec::Vec<crate::types::SuccessfulKeyRegistrationEntry>>,
) -> Self {
self.successful_key_registration = input;
self
}
pub fn get_successful_key_registration(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::SuccessfulKeyRegistrationEntry>> {
&self.successful_key_registration
}
pub fn request_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.request_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_request_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.request_id = input;
self
}
pub fn get_request_id(&self) -> &::std::option::Option<::std::string::String> {
&self.request_id
}
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::update_key_registration::UpdateKeyRegistrationOutput {
crate::operation::update_key_registration::UpdateKeyRegistrationOutput {
failed_key_registration: self.failed_key_registration,
successful_key_registration: self.successful_key_registration,
request_id: self.request_id,
_request_id: self._request_id,
}
}
}