Skip to main content

aws_sdk_sagemakergeospatial/types/
_time_range_filter_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>The output structure of the time range filter.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
6pub struct TimeRangeFilterOutput {
7    /// <p>The starting time for the time range filter.</p>
8    pub start_time: ::aws_smithy_types::DateTime,
9    /// <p>The ending time for the time range filter.</p>
10    pub end_time: ::aws_smithy_types::DateTime,
11}
12impl TimeRangeFilterOutput {
13    /// <p>The starting time for the time range filter.</p>
14    pub fn start_time(&self) -> &::aws_smithy_types::DateTime {
15        &self.start_time
16    }
17    /// <p>The ending time for the time range filter.</p>
18    pub fn end_time(&self) -> &::aws_smithy_types::DateTime {
19        &self.end_time
20    }
21}
22impl ::std::fmt::Debug for TimeRangeFilterOutput {
23    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
24        let mut formatter = f.debug_struct("TimeRangeFilterOutput");
25        formatter.field("start_time", &"*** Sensitive Data Redacted ***");
26        formatter.field("end_time", &"*** Sensitive Data Redacted ***");
27        formatter.finish()
28    }
29}
30impl TimeRangeFilterOutput {
31    /// Creates a new builder-style object to manufacture [`TimeRangeFilterOutput`](crate::types::TimeRangeFilterOutput).
32    pub fn builder() -> crate::types::builders::TimeRangeFilterOutputBuilder {
33        crate::types::builders::TimeRangeFilterOutputBuilder::default()
34    }
35}
36
37/// A builder for [`TimeRangeFilterOutput`](crate::types::TimeRangeFilterOutput).
38#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
39#[non_exhaustive]
40pub struct TimeRangeFilterOutputBuilder {
41    pub(crate) start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
42    pub(crate) end_time: ::std::option::Option<::aws_smithy_types::DateTime>,
43}
44impl TimeRangeFilterOutputBuilder {
45    /// <p>The starting time for the time range filter.</p>
46    /// This field is required.
47    pub fn start_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
48        self.start_time = ::std::option::Option::Some(input);
49        self
50    }
51    /// <p>The starting time for the time range filter.</p>
52    pub fn set_start_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
53        self.start_time = input;
54        self
55    }
56    /// <p>The starting time for the time range filter.</p>
57    pub fn get_start_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
58        &self.start_time
59    }
60    /// <p>The ending time for the time range filter.</p>
61    /// This field is required.
62    pub fn end_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
63        self.end_time = ::std::option::Option::Some(input);
64        self
65    }
66    /// <p>The ending time for the time range filter.</p>
67    pub fn set_end_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
68        self.end_time = input;
69        self
70    }
71    /// <p>The ending time for the time range filter.</p>
72    pub fn get_end_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
73        &self.end_time
74    }
75    /// Consumes the builder and constructs a [`TimeRangeFilterOutput`](crate::types::TimeRangeFilterOutput).
76    /// This method will fail if any of the following fields are not set:
77    /// - [`start_time`](crate::types::builders::TimeRangeFilterOutputBuilder::start_time)
78    /// - [`end_time`](crate::types::builders::TimeRangeFilterOutputBuilder::end_time)
79    pub fn build(self) -> ::std::result::Result<crate::types::TimeRangeFilterOutput, ::aws_smithy_types::error::operation::BuildError> {
80        ::std::result::Result::Ok(crate::types::TimeRangeFilterOutput {
81            start_time: self.start_time.ok_or_else(|| {
82                ::aws_smithy_types::error::operation::BuildError::missing_field(
83                    "start_time",
84                    "start_time was not specified but it is required when building TimeRangeFilterOutput",
85                )
86            })?,
87            end_time: self.end_time.ok_or_else(|| {
88                ::aws_smithy_types::error::operation::BuildError::missing_field(
89                    "end_time",
90                    "end_time was not specified but it is required when building TimeRangeFilterOutput",
91                )
92            })?,
93        })
94    }
95}
96impl ::std::fmt::Debug for TimeRangeFilterOutputBuilder {
97    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
98        let mut formatter = f.debug_struct("TimeRangeFilterOutputBuilder");
99        formatter.field("start_time", &"*** Sensitive Data Redacted ***");
100        formatter.field("end_time", &"*** Sensitive Data Redacted ***");
101        formatter.finish()
102    }
103}