aws_sdk_glue/operation/get_triggers/
_get_triggers_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct GetTriggersInput {
6    /// <p>A continuation token, if this is a continuation call.</p>
7    pub next_token: ::std::option::Option<::std::string::String>,
8    /// <p>The name of the job to retrieve triggers for. The trigger that can start this job is returned, and if there is no such trigger, all triggers are returned.</p>
9    pub dependent_job_name: ::std::option::Option<::std::string::String>,
10    /// <p>The maximum size of the response.</p>
11    pub max_results: ::std::option::Option<i32>,
12}
13impl GetTriggersInput {
14    /// <p>A continuation token, if this is a continuation call.</p>
15    pub fn next_token(&self) -> ::std::option::Option<&str> {
16        self.next_token.as_deref()
17    }
18    /// <p>The name of the job to retrieve triggers for. The trigger that can start this job is returned, and if there is no such trigger, all triggers are returned.</p>
19    pub fn dependent_job_name(&self) -> ::std::option::Option<&str> {
20        self.dependent_job_name.as_deref()
21    }
22    /// <p>The maximum size of the response.</p>
23    pub fn max_results(&self) -> ::std::option::Option<i32> {
24        self.max_results
25    }
26}
27impl GetTriggersInput {
28    /// Creates a new builder-style object to manufacture [`GetTriggersInput`](crate::operation::get_triggers::GetTriggersInput).
29    pub fn builder() -> crate::operation::get_triggers::builders::GetTriggersInputBuilder {
30        crate::operation::get_triggers::builders::GetTriggersInputBuilder::default()
31    }
32}
33
34/// A builder for [`GetTriggersInput`](crate::operation::get_triggers::GetTriggersInput).
35#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
36#[non_exhaustive]
37pub struct GetTriggersInputBuilder {
38    pub(crate) next_token: ::std::option::Option<::std::string::String>,
39    pub(crate) dependent_job_name: ::std::option::Option<::std::string::String>,
40    pub(crate) max_results: ::std::option::Option<i32>,
41}
42impl GetTriggersInputBuilder {
43    /// <p>A continuation token, if this is a continuation call.</p>
44    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
45        self.next_token = ::std::option::Option::Some(input.into());
46        self
47    }
48    /// <p>A continuation token, if this is a continuation call.</p>
49    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
50        self.next_token = input;
51        self
52    }
53    /// <p>A continuation token, if this is a continuation call.</p>
54    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
55        &self.next_token
56    }
57    /// <p>The name of the job to retrieve triggers for. The trigger that can start this job is returned, and if there is no such trigger, all triggers are returned.</p>
58    pub fn dependent_job_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
59        self.dependent_job_name = ::std::option::Option::Some(input.into());
60        self
61    }
62    /// <p>The name of the job to retrieve triggers for. The trigger that can start this job is returned, and if there is no such trigger, all triggers are returned.</p>
63    pub fn set_dependent_job_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
64        self.dependent_job_name = input;
65        self
66    }
67    /// <p>The name of the job to retrieve triggers for. The trigger that can start this job is returned, and if there is no such trigger, all triggers are returned.</p>
68    pub fn get_dependent_job_name(&self) -> &::std::option::Option<::std::string::String> {
69        &self.dependent_job_name
70    }
71    /// <p>The maximum size of the response.</p>
72    pub fn max_results(mut self, input: i32) -> Self {
73        self.max_results = ::std::option::Option::Some(input);
74        self
75    }
76    /// <p>The maximum size of the response.</p>
77    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
78        self.max_results = input;
79        self
80    }
81    /// <p>The maximum size of the response.</p>
82    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
83        &self.max_results
84    }
85    /// Consumes the builder and constructs a [`GetTriggersInput`](crate::operation::get_triggers::GetTriggersInput).
86    pub fn build(self) -> ::std::result::Result<crate::operation::get_triggers::GetTriggersInput, ::aws_smithy_types::error::operation::BuildError> {
87        ::std::result::Result::Ok(crate::operation::get_triggers::GetTriggersInput {
88            next_token: self.next_token,
89            dependent_job_name: self.dependent_job_name,
90            max_results: self.max_results,
91        })
92    }
93}