aws_sdk_comprehend/types/_entity_recognizer_filter.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Provides information for filtering a list of entity recognizers. You can only specify one filtering parameter in a request. For more information, see the <code>ListEntityRecognizers</code> operation./></p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct EntityRecognizerFilter {
7 /// <p>The status of an entity recognizer.</p>
8 pub status: ::std::option::Option<crate::types::ModelStatus>,
9 /// <p>The name that you assigned the entity recognizer.</p>
10 pub recognizer_name: ::std::option::Option<::std::string::String>,
11 /// <p>Filters the list of entities based on the time that the list was submitted for processing. Returns only jobs submitted before the specified time. Jobs are returned in descending order, newest to oldest.</p>
12 pub submit_time_before: ::std::option::Option<::aws_smithy_types::DateTime>,
13 /// <p>Filters the list of entities based on the time that the list was submitted for processing. Returns only jobs submitted after the specified time. Jobs are returned in ascending order, oldest to newest.</p>
14 pub submit_time_after: ::std::option::Option<::aws_smithy_types::DateTime>,
15}
16impl EntityRecognizerFilter {
17 /// <p>The status of an entity recognizer.</p>
18 pub fn status(&self) -> ::std::option::Option<&crate::types::ModelStatus> {
19 self.status.as_ref()
20 }
21 /// <p>The name that you assigned the entity recognizer.</p>
22 pub fn recognizer_name(&self) -> ::std::option::Option<&str> {
23 self.recognizer_name.as_deref()
24 }
25 /// <p>Filters the list of entities based on the time that the list was submitted for processing. Returns only jobs submitted before the specified time. Jobs are returned in descending order, newest to oldest.</p>
26 pub fn submit_time_before(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
27 self.submit_time_before.as_ref()
28 }
29 /// <p>Filters the list of entities based on the time that the list was submitted for processing. Returns only jobs submitted after the specified time. Jobs are returned in ascending order, oldest to newest.</p>
30 pub fn submit_time_after(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
31 self.submit_time_after.as_ref()
32 }
33}
34impl EntityRecognizerFilter {
35 /// Creates a new builder-style object to manufacture [`EntityRecognizerFilter`](crate::types::EntityRecognizerFilter).
36 pub fn builder() -> crate::types::builders::EntityRecognizerFilterBuilder {
37 crate::types::builders::EntityRecognizerFilterBuilder::default()
38 }
39}
40
41/// A builder for [`EntityRecognizerFilter`](crate::types::EntityRecognizerFilter).
42#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
43#[non_exhaustive]
44pub struct EntityRecognizerFilterBuilder {
45 pub(crate) status: ::std::option::Option<crate::types::ModelStatus>,
46 pub(crate) recognizer_name: ::std::option::Option<::std::string::String>,
47 pub(crate) submit_time_before: ::std::option::Option<::aws_smithy_types::DateTime>,
48 pub(crate) submit_time_after: ::std::option::Option<::aws_smithy_types::DateTime>,
49}
50impl EntityRecognizerFilterBuilder {
51 /// <p>The status of an entity recognizer.</p>
52 pub fn status(mut self, input: crate::types::ModelStatus) -> Self {
53 self.status = ::std::option::Option::Some(input);
54 self
55 }
56 /// <p>The status of an entity recognizer.</p>
57 pub fn set_status(mut self, input: ::std::option::Option<crate::types::ModelStatus>) -> Self {
58 self.status = input;
59 self
60 }
61 /// <p>The status of an entity recognizer.</p>
62 pub fn get_status(&self) -> &::std::option::Option<crate::types::ModelStatus> {
63 &self.status
64 }
65 /// <p>The name that you assigned the entity recognizer.</p>
66 pub fn recognizer_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
67 self.recognizer_name = ::std::option::Option::Some(input.into());
68 self
69 }
70 /// <p>The name that you assigned the entity recognizer.</p>
71 pub fn set_recognizer_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
72 self.recognizer_name = input;
73 self
74 }
75 /// <p>The name that you assigned the entity recognizer.</p>
76 pub fn get_recognizer_name(&self) -> &::std::option::Option<::std::string::String> {
77 &self.recognizer_name
78 }
79 /// <p>Filters the list of entities based on the time that the list was submitted for processing. Returns only jobs submitted before the specified time. Jobs are returned in descending order, newest to oldest.</p>
80 pub fn submit_time_before(mut self, input: ::aws_smithy_types::DateTime) -> Self {
81 self.submit_time_before = ::std::option::Option::Some(input);
82 self
83 }
84 /// <p>Filters the list of entities based on the time that the list was submitted for processing. Returns only jobs submitted before the specified time. Jobs are returned in descending order, newest to oldest.</p>
85 pub fn set_submit_time_before(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
86 self.submit_time_before = input;
87 self
88 }
89 /// <p>Filters the list of entities based on the time that the list was submitted for processing. Returns only jobs submitted before the specified time. Jobs are returned in descending order, newest to oldest.</p>
90 pub fn get_submit_time_before(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
91 &self.submit_time_before
92 }
93 /// <p>Filters the list of entities based on the time that the list was submitted for processing. Returns only jobs submitted after the specified time. Jobs are returned in ascending order, oldest to newest.</p>
94 pub fn submit_time_after(mut self, input: ::aws_smithy_types::DateTime) -> Self {
95 self.submit_time_after = ::std::option::Option::Some(input);
96 self
97 }
98 /// <p>Filters the list of entities based on the time that the list was submitted for processing. Returns only jobs submitted after the specified time. Jobs are returned in ascending order, oldest to newest.</p>
99 pub fn set_submit_time_after(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
100 self.submit_time_after = input;
101 self
102 }
103 /// <p>Filters the list of entities based on the time that the list was submitted for processing. Returns only jobs submitted after the specified time. Jobs are returned in ascending order, oldest to newest.</p>
104 pub fn get_submit_time_after(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
105 &self.submit_time_after
106 }
107 /// Consumes the builder and constructs a [`EntityRecognizerFilter`](crate::types::EntityRecognizerFilter).
108 pub fn build(self) -> crate::types::EntityRecognizerFilter {
109 crate::types::EntityRecognizerFilter {
110 status: self.status,
111 recognizer_name: self.recognizer_name,
112 submit_time_before: self.submit_time_before,
113 submit_time_after: self.submit_time_after,
114 }
115 }
116}