#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct AddEndpointsInput {
pub endpoint_configurations: ::std::option::Option<::std::vec::Vec<crate::types::EndpointConfiguration>>,
pub endpoint_group_arn: ::std::option::Option<::std::string::String>,
}
impl AddEndpointsInput {
pub fn endpoint_configurations(&self) -> &[crate::types::EndpointConfiguration] {
self.endpoint_configurations.as_deref().unwrap_or_default()
}
pub fn endpoint_group_arn(&self) -> ::std::option::Option<&str> {
self.endpoint_group_arn.as_deref()
}
}
impl AddEndpointsInput {
pub fn builder() -> crate::operation::add_endpoints::builders::AddEndpointsInputBuilder {
crate::operation::add_endpoints::builders::AddEndpointsInputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct AddEndpointsInputBuilder {
pub(crate) endpoint_configurations: ::std::option::Option<::std::vec::Vec<crate::types::EndpointConfiguration>>,
pub(crate) endpoint_group_arn: ::std::option::Option<::std::string::String>,
}
impl AddEndpointsInputBuilder {
pub fn endpoint_configurations(mut self, input: crate::types::EndpointConfiguration) -> Self {
let mut v = self.endpoint_configurations.unwrap_or_default();
v.push(input);
self.endpoint_configurations = ::std::option::Option::Some(v);
self
}
pub fn set_endpoint_configurations(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::EndpointConfiguration>>) -> Self {
self.endpoint_configurations = input;
self
}
pub fn get_endpoint_configurations(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::EndpointConfiguration>> {
&self.endpoint_configurations
}
pub fn endpoint_group_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.endpoint_group_arn = ::std::option::Option::Some(input.into());
self
}
pub fn set_endpoint_group_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.endpoint_group_arn = input;
self
}
pub fn get_endpoint_group_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.endpoint_group_arn
}
pub fn build(
self,
) -> ::std::result::Result<crate::operation::add_endpoints::AddEndpointsInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::add_endpoints::AddEndpointsInput {
endpoint_configurations: self.endpoint_configurations,
endpoint_group_arn: self.endpoint_group_arn,
})
}
}