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