aws_sdk_vpclattice/operation/deregister_targets/
_deregister_targets_output.rs#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct DeregisterTargetsOutput {
pub successful: ::std::option::Option<::std::vec::Vec<crate::types::Target>>,
pub unsuccessful: ::std::option::Option<::std::vec::Vec<crate::types::TargetFailure>>,
_request_id: Option<String>,
}
impl DeregisterTargetsOutput {
pub fn successful(&self) -> &[crate::types::Target] {
self.successful.as_deref().unwrap_or_default()
}
pub fn unsuccessful(&self) -> &[crate::types::TargetFailure] {
self.unsuccessful.as_deref().unwrap_or_default()
}
}
impl ::aws_types::request_id::RequestId for DeregisterTargetsOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl DeregisterTargetsOutput {
pub fn builder() -> crate::operation::deregister_targets::builders::DeregisterTargetsOutputBuilder {
crate::operation::deregister_targets::builders::DeregisterTargetsOutputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DeregisterTargetsOutputBuilder {
pub(crate) successful: ::std::option::Option<::std::vec::Vec<crate::types::Target>>,
pub(crate) unsuccessful: ::std::option::Option<::std::vec::Vec<crate::types::TargetFailure>>,
_request_id: Option<String>,
}
impl DeregisterTargetsOutputBuilder {
pub fn successful(mut self, input: crate::types::Target) -> Self {
let mut v = self.successful.unwrap_or_default();
v.push(input);
self.successful = ::std::option::Option::Some(v);
self
}
pub fn set_successful(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Target>>) -> Self {
self.successful = input;
self
}
pub fn get_successful(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Target>> {
&self.successful
}
pub fn unsuccessful(mut self, input: crate::types::TargetFailure) -> Self {
let mut v = self.unsuccessful.unwrap_or_default();
v.push(input);
self.unsuccessful = ::std::option::Option::Some(v);
self
}
pub fn set_unsuccessful(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::TargetFailure>>) -> Self {
self.unsuccessful = input;
self
}
pub fn get_unsuccessful(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::TargetFailure>> {
&self.unsuccessful
}
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::deregister_targets::DeregisterTargetsOutput {
crate::operation::deregister_targets::DeregisterTargetsOutput {
successful: self.successful,
unsuccessful: self.unsuccessful,
_request_id: self._request_id,
}
}
}