#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Secondary {
pub route: ::std::string::String,
}
impl Secondary {
pub fn route(&self) -> &str {
use std::ops::Deref;
self.route.deref()
}
}
impl Secondary {
pub fn builder() -> crate::types::builders::SecondaryBuilder {
crate::types::builders::SecondaryBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct SecondaryBuilder {
pub(crate) route: ::std::option::Option<::std::string::String>,
}
impl SecondaryBuilder {
pub fn route(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.route = ::std::option::Option::Some(input.into());
self
}
pub fn set_route(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.route = input;
self
}
pub fn get_route(&self) -> &::std::option::Option<::std::string::String> {
&self.route
}
pub fn build(self) -> ::std::result::Result<crate::types::Secondary, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::types::Secondary {
route: self.route.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"route",
"route was not specified but it is required when building Secondary",
)
})?,
})
}
}