aws_sdk_amplify/operation/list_jobs/
_list_jobs_input.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct ListJobsInput {
7 pub app_id: ::std::option::Option<::std::string::String>,
9 pub branch_name: ::std::option::Option<::std::string::String>,
11 pub next_token: ::std::option::Option<::std::string::String>,
13 pub max_results: ::std::option::Option<i32>,
15}
16impl ListJobsInput {
17 pub fn app_id(&self) -> ::std::option::Option<&str> {
19 self.app_id.as_deref()
20 }
21 pub fn branch_name(&self) -> ::std::option::Option<&str> {
23 self.branch_name.as_deref()
24 }
25 pub fn next_token(&self) -> ::std::option::Option<&str> {
27 self.next_token.as_deref()
28 }
29 pub fn max_results(&self) -> ::std::option::Option<i32> {
31 self.max_results
32 }
33}
34impl ListJobsInput {
35 pub fn builder() -> crate::operation::list_jobs::builders::ListJobsInputBuilder {
37 crate::operation::list_jobs::builders::ListJobsInputBuilder::default()
38 }
39}
40
41#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
43#[non_exhaustive]
44pub struct ListJobsInputBuilder {
45 pub(crate) app_id: ::std::option::Option<::std::string::String>,
46 pub(crate) branch_name: ::std::option::Option<::std::string::String>,
47 pub(crate) next_token: ::std::option::Option<::std::string::String>,
48 pub(crate) max_results: ::std::option::Option<i32>,
49}
50impl ListJobsInputBuilder {
51 pub fn app_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
54 self.app_id = ::std::option::Option::Some(input.into());
55 self
56 }
57 pub fn set_app_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
59 self.app_id = input;
60 self
61 }
62 pub fn get_app_id(&self) -> &::std::option::Option<::std::string::String> {
64 &self.app_id
65 }
66 pub fn branch_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
69 self.branch_name = ::std::option::Option::Some(input.into());
70 self
71 }
72 pub fn set_branch_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
74 self.branch_name = input;
75 self
76 }
77 pub fn get_branch_name(&self) -> &::std::option::Option<::std::string::String> {
79 &self.branch_name
80 }
81 pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
83 self.next_token = ::std::option::Option::Some(input.into());
84 self
85 }
86 pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
88 self.next_token = input;
89 self
90 }
91 pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
93 &self.next_token
94 }
95 pub fn max_results(mut self, input: i32) -> Self {
97 self.max_results = ::std::option::Option::Some(input);
98 self
99 }
100 pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
102 self.max_results = input;
103 self
104 }
105 pub fn get_max_results(&self) -> &::std::option::Option<i32> {
107 &self.max_results
108 }
109 pub fn build(self) -> ::std::result::Result<crate::operation::list_jobs::ListJobsInput, ::aws_smithy_types::error::operation::BuildError> {
111 ::std::result::Result::Ok(crate::operation::list_jobs::ListJobsInput {
112 app_id: self.app_id,
113 branch_name: self.branch_name,
114 next_token: self.next_token,
115 max_results: self.max_results,
116 })
117 }
118}