aws_sdk_amplify/operation/list_jobs/
_list_jobs_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>The request structure for the list jobs request.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct ListJobsInput {
7    /// <p>The unique ID for an Amplify app.</p>
8    pub app_id: ::std::option::Option<::std::string::String>,
9    /// <p>The name of the branch to use for the request.</p>
10    pub branch_name: ::std::option::Option<::std::string::String>,
11    /// <p>A pagination token. Set to null to start listing steps from the start. If a non-null pagination token is returned in a result, pass its value in here to list more steps.</p>
12    pub next_token: ::std::option::Option<::std::string::String>,
13    /// <p>The maximum number of records to list in a single response.</p>
14    pub max_results: ::std::option::Option<i32>,
15}
16impl ListJobsInput {
17    /// <p>The unique ID for an Amplify app.</p>
18    pub fn app_id(&self) -> ::std::option::Option<&str> {
19        self.app_id.as_deref()
20    }
21    /// <p>The name of the branch to use for the request.</p>
22    pub fn branch_name(&self) -> ::std::option::Option<&str> {
23        self.branch_name.as_deref()
24    }
25    /// <p>A pagination token. Set to null to start listing steps from the start. If a non-null pagination token is returned in a result, pass its value in here to list more steps.</p>
26    pub fn next_token(&self) -> ::std::option::Option<&str> {
27        self.next_token.as_deref()
28    }
29    /// <p>The maximum number of records to list in a single response.</p>
30    pub fn max_results(&self) -> ::std::option::Option<i32> {
31        self.max_results
32    }
33}
34impl ListJobsInput {
35    /// Creates a new builder-style object to manufacture [`ListJobsInput`](crate::operation::list_jobs::ListJobsInput).
36    pub fn builder() -> crate::operation::list_jobs::builders::ListJobsInputBuilder {
37        crate::operation::list_jobs::builders::ListJobsInputBuilder::default()
38    }
39}
40
41/// A builder for [`ListJobsInput`](crate::operation::list_jobs::ListJobsInput).
42#[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    /// <p>The unique ID for an Amplify app.</p>
52    /// This field is required.
53    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    /// <p>The unique ID for an Amplify app.</p>
58    pub fn set_app_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
59        self.app_id = input;
60        self
61    }
62    /// <p>The unique ID for an Amplify app.</p>
63    pub fn get_app_id(&self) -> &::std::option::Option<::std::string::String> {
64        &self.app_id
65    }
66    /// <p>The name of the branch to use for the request.</p>
67    /// This field is required.
68    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    /// <p>The name of the branch to use for the request.</p>
73    pub fn set_branch_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
74        self.branch_name = input;
75        self
76    }
77    /// <p>The name of the branch to use for the request.</p>
78    pub fn get_branch_name(&self) -> &::std::option::Option<::std::string::String> {
79        &self.branch_name
80    }
81    /// <p>A pagination token. Set to null to start listing steps from the start. If a non-null pagination token is returned in a result, pass its value in here to list more steps.</p>
82    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    /// <p>A pagination token. Set to null to start listing steps from the start. If a non-null pagination token is returned in a result, pass its value in here to list more steps.</p>
87    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
88        self.next_token = input;
89        self
90    }
91    /// <p>A pagination token. Set to null to start listing steps from the start. If a non-null pagination token is returned in a result, pass its value in here to list more steps.</p>
92    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
93        &self.next_token
94    }
95    /// <p>The maximum number of records to list in a single response.</p>
96    pub fn max_results(mut self, input: i32) -> Self {
97        self.max_results = ::std::option::Option::Some(input);
98        self
99    }
100    /// <p>The maximum number of records to list in a single response.</p>
101    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
102        self.max_results = input;
103        self
104    }
105    /// <p>The maximum number of records to list in a single response.</p>
106    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
107        &self.max_results
108    }
109    /// Consumes the builder and constructs a [`ListJobsInput`](crate::operation::list_jobs::ListJobsInput).
110    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}