#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct PortRange {
pub begin: ::std::option::Option<i32>,
pub end: ::std::option::Option<i32>,
}
impl PortRange {
pub fn begin(&self) -> ::std::option::Option<i32> {
self.begin
}
pub fn end(&self) -> ::std::option::Option<i32> {
self.end
}
}
impl PortRange {
pub fn builder() -> crate::types::builders::PortRangeBuilder {
crate::types::builders::PortRangeBuilder::default()
}
}
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct PortRangeBuilder {
pub(crate) begin: ::std::option::Option<i32>,
pub(crate) end: ::std::option::Option<i32>,
}
impl PortRangeBuilder {
pub fn begin(mut self, input: i32) -> Self {
self.begin = ::std::option::Option::Some(input);
self
}
pub fn set_begin(mut self, input: ::std::option::Option<i32>) -> Self {
self.begin = input;
self
}
pub fn get_begin(&self) -> &::std::option::Option<i32> {
&self.begin
}
pub fn end(mut self, input: i32) -> Self {
self.end = ::std::option::Option::Some(input);
self
}
pub fn set_end(mut self, input: ::std::option::Option<i32>) -> Self {
self.end = input;
self
}
pub fn get_end(&self) -> &::std::option::Option<i32> {
&self.end
}
pub fn build(self) -> crate::types::PortRange {
crate::types::PortRange {
begin: self.begin,
end: self.end,
}
}
}