aws_sdk_m2/types/
_engine_versions_summary.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct EngineVersionsSummary {
7 pub engine_type: ::std::string::String,
9 pub engine_version: ::std::string::String,
11}
12impl EngineVersionsSummary {
13 pub fn engine_type(&self) -> &str {
15 use std::ops::Deref;
16 self.engine_type.deref()
17 }
18 pub fn engine_version(&self) -> &str {
20 use std::ops::Deref;
21 self.engine_version.deref()
22 }
23}
24impl EngineVersionsSummary {
25 pub fn builder() -> crate::types::builders::EngineVersionsSummaryBuilder {
27 crate::types::builders::EngineVersionsSummaryBuilder::default()
28 }
29}
30
31#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
33#[non_exhaustive]
34pub struct EngineVersionsSummaryBuilder {
35 pub(crate) engine_type: ::std::option::Option<::std::string::String>,
36 pub(crate) engine_version: ::std::option::Option<::std::string::String>,
37}
38impl EngineVersionsSummaryBuilder {
39 pub fn engine_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
42 self.engine_type = ::std::option::Option::Some(input.into());
43 self
44 }
45 pub fn set_engine_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
47 self.engine_type = input;
48 self
49 }
50 pub fn get_engine_type(&self) -> &::std::option::Option<::std::string::String> {
52 &self.engine_type
53 }
54 pub fn engine_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
57 self.engine_version = ::std::option::Option::Some(input.into());
58 self
59 }
60 pub fn set_engine_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
62 self.engine_version = input;
63 self
64 }
65 pub fn get_engine_version(&self) -> &::std::option::Option<::std::string::String> {
67 &self.engine_version
68 }
69 pub fn build(self) -> ::std::result::Result<crate::types::EngineVersionsSummary, ::aws_smithy_types::error::operation::BuildError> {
74 ::std::result::Result::Ok(crate::types::EngineVersionsSummary {
75 engine_type: self.engine_type.ok_or_else(|| {
76 ::aws_smithy_types::error::operation::BuildError::missing_field(
77 "engine_type",
78 "engine_type was not specified but it is required when building EngineVersionsSummary",
79 )
80 })?,
81 engine_version: self.engine_version.ok_or_else(|| {
82 ::aws_smithy_types::error::operation::BuildError::missing_field(
83 "engine_version",
84 "engine_version was not specified but it is required when building EngineVersionsSummary",
85 )
86 })?,
87 })
88 }
89}