aws_sdk_evidently/operation/test_segment_pattern/
_test_segment_pattern_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct TestSegmentPatternOutput {
6 pub r#match: bool,
8 _request_id: Option<String>,
9}
10impl TestSegmentPatternOutput {
11 pub fn r#match(&self) -> bool {
13 self.r#match
14 }
15}
16impl ::aws_types::request_id::RequestId for TestSegmentPatternOutput {
17 fn request_id(&self) -> Option<&str> {
18 self._request_id.as_deref()
19 }
20}
21impl TestSegmentPatternOutput {
22 pub fn builder() -> crate::operation::test_segment_pattern::builders::TestSegmentPatternOutputBuilder {
24 crate::operation::test_segment_pattern::builders::TestSegmentPatternOutputBuilder::default()
25 }
26}
27
28#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
30#[non_exhaustive]
31pub struct TestSegmentPatternOutputBuilder {
32 pub(crate) r#match: ::std::option::Option<bool>,
33 _request_id: Option<String>,
34}
35impl TestSegmentPatternOutputBuilder {
36 pub fn r#match(mut self, input: bool) -> Self {
39 self.r#match = ::std::option::Option::Some(input);
40 self
41 }
42 pub fn set_match(mut self, input: ::std::option::Option<bool>) -> Self {
44 self.r#match = input;
45 self
46 }
47 pub fn get_match(&self) -> &::std::option::Option<bool> {
49 &self.r#match
50 }
51 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
52 self._request_id = Some(request_id.into());
53 self
54 }
55
56 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
57 self._request_id = request_id;
58 self
59 }
60 pub fn build(
64 self,
65 ) -> ::std::result::Result<crate::operation::test_segment_pattern::TestSegmentPatternOutput, ::aws_smithy_types::error::operation::BuildError>
66 {
67 ::std::result::Result::Ok(crate::operation::test_segment_pattern::TestSegmentPatternOutput {
68 r#match: self.r#match.ok_or_else(|| {
69 ::aws_smithy_types::error::operation::BuildError::missing_field(
70 "r#match",
71 "r#match was not specified but it is required when building TestSegmentPatternOutput",
72 )
73 })?,
74 _request_id: self._request_id,
75 })
76 }
77}