aws_sdk_amplify/operation/start_job/
_start_job_input.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct StartJobInput {
7 pub app_id: ::std::option::Option<::std::string::String>,
9 pub branch_name: ::std::option::Option<::std::string::String>,
11 pub job_id: ::std::option::Option<::std::string::String>,
13 pub job_type: ::std::option::Option<crate::types::JobType>,
16 pub job_reason: ::std::option::Option<::std::string::String>,
18 pub commit_id: ::std::option::Option<::std::string::String>,
20 pub commit_message: ::std::option::Option<::std::string::String>,
22 pub commit_time: ::std::option::Option<::aws_smithy_types::DateTime>,
24}
25impl StartJobInput {
26 pub fn app_id(&self) -> ::std::option::Option<&str> {
28 self.app_id.as_deref()
29 }
30 pub fn branch_name(&self) -> ::std::option::Option<&str> {
32 self.branch_name.as_deref()
33 }
34 pub fn job_id(&self) -> ::std::option::Option<&str> {
36 self.job_id.as_deref()
37 }
38 pub fn job_type(&self) -> ::std::option::Option<&crate::types::JobType> {
41 self.job_type.as_ref()
42 }
43 pub fn job_reason(&self) -> ::std::option::Option<&str> {
45 self.job_reason.as_deref()
46 }
47 pub fn commit_id(&self) -> ::std::option::Option<&str> {
49 self.commit_id.as_deref()
50 }
51 pub fn commit_message(&self) -> ::std::option::Option<&str> {
53 self.commit_message.as_deref()
54 }
55 pub fn commit_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
57 self.commit_time.as_ref()
58 }
59}
60impl StartJobInput {
61 pub fn builder() -> crate::operation::start_job::builders::StartJobInputBuilder {
63 crate::operation::start_job::builders::StartJobInputBuilder::default()
64 }
65}
66
67#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
69#[non_exhaustive]
70pub struct StartJobInputBuilder {
71 pub(crate) app_id: ::std::option::Option<::std::string::String>,
72 pub(crate) branch_name: ::std::option::Option<::std::string::String>,
73 pub(crate) job_id: ::std::option::Option<::std::string::String>,
74 pub(crate) job_type: ::std::option::Option<crate::types::JobType>,
75 pub(crate) job_reason: ::std::option::Option<::std::string::String>,
76 pub(crate) commit_id: ::std::option::Option<::std::string::String>,
77 pub(crate) commit_message: ::std::option::Option<::std::string::String>,
78 pub(crate) commit_time: ::std::option::Option<::aws_smithy_types::DateTime>,
79}
80impl StartJobInputBuilder {
81 pub fn app_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
84 self.app_id = ::std::option::Option::Some(input.into());
85 self
86 }
87 pub fn set_app_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
89 self.app_id = input;
90 self
91 }
92 pub fn get_app_id(&self) -> &::std::option::Option<::std::string::String> {
94 &self.app_id
95 }
96 pub fn branch_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
99 self.branch_name = ::std::option::Option::Some(input.into());
100 self
101 }
102 pub fn set_branch_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
104 self.branch_name = input;
105 self
106 }
107 pub fn get_branch_name(&self) -> &::std::option::Option<::std::string::String> {
109 &self.branch_name
110 }
111 pub fn job_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
113 self.job_id = ::std::option::Option::Some(input.into());
114 self
115 }
116 pub fn set_job_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
118 self.job_id = input;
119 self
120 }
121 pub fn get_job_id(&self) -> &::std::option::Option<::std::string::String> {
123 &self.job_id
124 }
125 pub fn job_type(mut self, input: crate::types::JobType) -> Self {
129 self.job_type = ::std::option::Option::Some(input);
130 self
131 }
132 pub fn set_job_type(mut self, input: ::std::option::Option<crate::types::JobType>) -> Self {
135 self.job_type = input;
136 self
137 }
138 pub fn get_job_type(&self) -> &::std::option::Option<crate::types::JobType> {
141 &self.job_type
142 }
143 pub fn job_reason(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
145 self.job_reason = ::std::option::Option::Some(input.into());
146 self
147 }
148 pub fn set_job_reason(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
150 self.job_reason = input;
151 self
152 }
153 pub fn get_job_reason(&self) -> &::std::option::Option<::std::string::String> {
155 &self.job_reason
156 }
157 pub fn commit_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
159 self.commit_id = ::std::option::Option::Some(input.into());
160 self
161 }
162 pub fn set_commit_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
164 self.commit_id = input;
165 self
166 }
167 pub fn get_commit_id(&self) -> &::std::option::Option<::std::string::String> {
169 &self.commit_id
170 }
171 pub fn commit_message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
173 self.commit_message = ::std::option::Option::Some(input.into());
174 self
175 }
176 pub fn set_commit_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
178 self.commit_message = input;
179 self
180 }
181 pub fn get_commit_message(&self) -> &::std::option::Option<::std::string::String> {
183 &self.commit_message
184 }
185 pub fn commit_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
187 self.commit_time = ::std::option::Option::Some(input);
188 self
189 }
190 pub fn set_commit_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
192 self.commit_time = input;
193 self
194 }
195 pub fn get_commit_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
197 &self.commit_time
198 }
199 pub fn build(self) -> ::std::result::Result<crate::operation::start_job::StartJobInput, ::aws_smithy_types::error::operation::BuildError> {
201 ::std::result::Result::Ok(crate::operation::start_job::StartJobInput {
202 app_id: self.app_id,
203 branch_name: self.branch_name,
204 job_id: self.job_id,
205 job_type: self.job_type,
206 job_reason: self.job_reason,
207 commit_id: self.commit_id,
208 commit_message: self.commit_message,
209 commit_time: self.commit_time,
210 })
211 }
212}