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