aws_sdk_devopsguru/types/
_list_insights_any_status_filter.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct ListInsightsAnyStatusFilter {
7 pub r#type: crate::types::InsightType,
9 pub start_time_range: ::std::option::Option<crate::types::StartTimeRange>,
11}
12impl ListInsightsAnyStatusFilter {
13 pub fn r#type(&self) -> &crate::types::InsightType {
15 &self.r#type
16 }
17 pub fn start_time_range(&self) -> ::std::option::Option<&crate::types::StartTimeRange> {
19 self.start_time_range.as_ref()
20 }
21}
22impl ListInsightsAnyStatusFilter {
23 pub fn builder() -> crate::types::builders::ListInsightsAnyStatusFilterBuilder {
25 crate::types::builders::ListInsightsAnyStatusFilterBuilder::default()
26 }
27}
28
29#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
31#[non_exhaustive]
32pub struct ListInsightsAnyStatusFilterBuilder {
33 pub(crate) r#type: ::std::option::Option<crate::types::InsightType>,
34 pub(crate) start_time_range: ::std::option::Option<crate::types::StartTimeRange>,
35}
36impl ListInsightsAnyStatusFilterBuilder {
37 pub fn r#type(mut self, input: crate::types::InsightType) -> Self {
40 self.r#type = ::std::option::Option::Some(input);
41 self
42 }
43 pub fn set_type(mut self, input: ::std::option::Option<crate::types::InsightType>) -> Self {
45 self.r#type = input;
46 self
47 }
48 pub fn get_type(&self) -> &::std::option::Option<crate::types::InsightType> {
50 &self.r#type
51 }
52 pub fn start_time_range(mut self, input: crate::types::StartTimeRange) -> Self {
55 self.start_time_range = ::std::option::Option::Some(input);
56 self
57 }
58 pub fn set_start_time_range(mut self, input: ::std::option::Option<crate::types::StartTimeRange>) -> Self {
60 self.start_time_range = input;
61 self
62 }
63 pub fn get_start_time_range(&self) -> &::std::option::Option<crate::types::StartTimeRange> {
65 &self.start_time_range
66 }
67 pub fn build(self) -> ::std::result::Result<crate::types::ListInsightsAnyStatusFilter, ::aws_smithy_types::error::operation::BuildError> {
71 ::std::result::Result::Ok(crate::types::ListInsightsAnyStatusFilter {
72 r#type: self.r#type.ok_or_else(|| {
73 ::aws_smithy_types::error::operation::BuildError::missing_field(
74 "r#type",
75 "r#type was not specified but it is required when building ListInsightsAnyStatusFilter",
76 )
77 })?,
78 start_time_range: self.start_time_range,
79 })
80 }
81}