aws_sdk_mturk/operation/associate_qualification_with_worker/
_associate_qualification_with_worker_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct AssociateQualificationWithWorkerInput {
6 pub qualification_type_id: ::std::option::Option<::std::string::String>,
8 pub worker_id: ::std::option::Option<::std::string::String>,
10 pub integer_value: ::std::option::Option<i32>,
12 pub send_notification: ::std::option::Option<bool>,
14}
15impl AssociateQualificationWithWorkerInput {
16 pub fn qualification_type_id(&self) -> ::std::option::Option<&str> {
18 self.qualification_type_id.as_deref()
19 }
20 pub fn worker_id(&self) -> ::std::option::Option<&str> {
22 self.worker_id.as_deref()
23 }
24 pub fn integer_value(&self) -> ::std::option::Option<i32> {
26 self.integer_value
27 }
28 pub fn send_notification(&self) -> ::std::option::Option<bool> {
30 self.send_notification
31 }
32}
33impl AssociateQualificationWithWorkerInput {
34 pub fn builder() -> crate::operation::associate_qualification_with_worker::builders::AssociateQualificationWithWorkerInputBuilder {
36 crate::operation::associate_qualification_with_worker::builders::AssociateQualificationWithWorkerInputBuilder::default()
37 }
38}
39
40#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
42#[non_exhaustive]
43pub struct AssociateQualificationWithWorkerInputBuilder {
44 pub(crate) qualification_type_id: ::std::option::Option<::std::string::String>,
45 pub(crate) worker_id: ::std::option::Option<::std::string::String>,
46 pub(crate) integer_value: ::std::option::Option<i32>,
47 pub(crate) send_notification: ::std::option::Option<bool>,
48}
49impl AssociateQualificationWithWorkerInputBuilder {
50 pub fn qualification_type_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53 self.qualification_type_id = ::std::option::Option::Some(input.into());
54 self
55 }
56 pub fn set_qualification_type_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58 self.qualification_type_id = input;
59 self
60 }
61 pub fn get_qualification_type_id(&self) -> &::std::option::Option<::std::string::String> {
63 &self.qualification_type_id
64 }
65 pub fn worker_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
68 self.worker_id = ::std::option::Option::Some(input.into());
69 self
70 }
71 pub fn set_worker_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
73 self.worker_id = input;
74 self
75 }
76 pub fn get_worker_id(&self) -> &::std::option::Option<::std::string::String> {
78 &self.worker_id
79 }
80 pub fn integer_value(mut self, input: i32) -> Self {
82 self.integer_value = ::std::option::Option::Some(input);
83 self
84 }
85 pub fn set_integer_value(mut self, input: ::std::option::Option<i32>) -> Self {
87 self.integer_value = input;
88 self
89 }
90 pub fn get_integer_value(&self) -> &::std::option::Option<i32> {
92 &self.integer_value
93 }
94 pub fn send_notification(mut self, input: bool) -> Self {
96 self.send_notification = ::std::option::Option::Some(input);
97 self
98 }
99 pub fn set_send_notification(mut self, input: ::std::option::Option<bool>) -> Self {
101 self.send_notification = input;
102 self
103 }
104 pub fn get_send_notification(&self) -> &::std::option::Option<bool> {
106 &self.send_notification
107 }
108 pub fn build(
110 self,
111 ) -> ::std::result::Result<
112 crate::operation::associate_qualification_with_worker::AssociateQualificationWithWorkerInput,
113 ::aws_smithy_types::error::operation::BuildError,
114 > {
115 ::std::result::Result::Ok(
116 crate::operation::associate_qualification_with_worker::AssociateQualificationWithWorkerInput {
117 qualification_type_id: self.qualification_type_id,
118 worker_id: self.worker_id,
119 integer_value: self.integer_value,
120 send_notification: self.send_notification,
121 },
122 )
123 }
124}