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