aws_sdk_vpclattice/operation/deregister_targets/
_deregister_targets_input.rs#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct DeregisterTargetsInput {
pub target_group_identifier: ::std::option::Option<::std::string::String>,
pub targets: ::std::option::Option<::std::vec::Vec<crate::types::Target>>,
}
impl DeregisterTargetsInput {
pub fn target_group_identifier(&self) -> ::std::option::Option<&str> {
self.target_group_identifier.as_deref()
}
pub fn targets(&self) -> &[crate::types::Target] {
self.targets.as_deref().unwrap_or_default()
}
}
impl DeregisterTargetsInput {
pub fn builder() -> crate::operation::deregister_targets::builders::DeregisterTargetsInputBuilder {
crate::operation::deregister_targets::builders::DeregisterTargetsInputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DeregisterTargetsInputBuilder {
pub(crate) target_group_identifier: ::std::option::Option<::std::string::String>,
pub(crate) targets: ::std::option::Option<::std::vec::Vec<crate::types::Target>>,
}
impl DeregisterTargetsInputBuilder {
pub fn target_group_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.target_group_identifier = ::std::option::Option::Some(input.into());
self
}
pub fn set_target_group_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.target_group_identifier = input;
self
}
pub fn get_target_group_identifier(&self) -> &::std::option::Option<::std::string::String> {
&self.target_group_identifier
}
pub fn targets(mut self, input: crate::types::Target) -> Self {
let mut v = self.targets.unwrap_or_default();
v.push(input);
self.targets = ::std::option::Option::Some(v);
self
}
pub fn set_targets(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Target>>) -> Self {
self.targets = input;
self
}
pub fn get_targets(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Target>> {
&self.targets
}
pub fn build(
self,
) -> ::std::result::Result<crate::operation::deregister_targets::DeregisterTargetsInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::deregister_targets::DeregisterTargetsInput {
target_group_identifier: self.target_group_identifier,
targets: self.targets,
})
}
}