aws_sdk_mturk/operation/associate_qualification_with_worker/
_associate_qualification_with_worker_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 AssociateQualificationWithWorkerInput {
6    /// <p>The ID of the Qualification type to use for the assigned Qualification.</p>
7    pub qualification_type_id: ::std::option::Option<::std::string::String>,
8    /// <p>The ID of the Worker to whom the Qualification is being assigned. Worker IDs are included with submitted HIT assignments and Qualification requests.</p>
9    pub worker_id: ::std::option::Option<::std::string::String>,
10    /// <p>The value of the Qualification to assign.</p>
11    pub integer_value: ::std::option::Option<i32>,
12    /// <p>Specifies whether to send a notification email message to the Worker saying that the qualification was assigned to the Worker. Note: this is true by default.</p>
13    pub send_notification: ::std::option::Option<bool>,
14}
15impl AssociateQualificationWithWorkerInput {
16    /// <p>The ID of the Qualification type to use for the assigned Qualification.</p>
17    pub fn qualification_type_id(&self) -> ::std::option::Option<&str> {
18        self.qualification_type_id.as_deref()
19    }
20    /// <p>The ID of the Worker to whom the Qualification is being assigned. Worker IDs are included with submitted HIT assignments and Qualification requests.</p>
21    pub fn worker_id(&self) -> ::std::option::Option<&str> {
22        self.worker_id.as_deref()
23    }
24    /// <p>The value of the Qualification to assign.</p>
25    pub fn integer_value(&self) -> ::std::option::Option<i32> {
26        self.integer_value
27    }
28    /// <p>Specifies whether to send a notification email message to the Worker saying that the qualification was assigned to the Worker. Note: this is true by default.</p>
29    pub fn send_notification(&self) -> ::std::option::Option<bool> {
30        self.send_notification
31    }
32}
33impl AssociateQualificationWithWorkerInput {
34    /// Creates a new builder-style object to manufacture [`AssociateQualificationWithWorkerInput`](crate::operation::associate_qualification_with_worker::AssociateQualificationWithWorkerInput).
35    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/// A builder for [`AssociateQualificationWithWorkerInput`](crate::operation::associate_qualification_with_worker::AssociateQualificationWithWorkerInput).
41#[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    /// <p>The ID of the Qualification type to use for the assigned Qualification.</p>
51    /// This field is required.
52    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    /// <p>The ID of the Qualification type to use for the assigned Qualification.</p>
57    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    /// <p>The ID of the Qualification type to use for the assigned Qualification.</p>
62    pub fn get_qualification_type_id(&self) -> &::std::option::Option<::std::string::String> {
63        &self.qualification_type_id
64    }
65    /// <p>The ID of the Worker to whom the Qualification is being assigned. Worker IDs are included with submitted HIT assignments and Qualification requests.</p>
66    /// This field is required.
67    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    /// <p>The ID of the Worker to whom the Qualification is being assigned. Worker IDs are included with submitted HIT assignments and Qualification requests.</p>
72    pub fn set_worker_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
73        self.worker_id = input;
74        self
75    }
76    /// <p>The ID of the Worker to whom the Qualification is being assigned. Worker IDs are included with submitted HIT assignments and Qualification requests.</p>
77    pub fn get_worker_id(&self) -> &::std::option::Option<::std::string::String> {
78        &self.worker_id
79    }
80    /// <p>The value of the Qualification to assign.</p>
81    pub fn integer_value(mut self, input: i32) -> Self {
82        self.integer_value = ::std::option::Option::Some(input);
83        self
84    }
85    /// <p>The value of the Qualification to assign.</p>
86    pub fn set_integer_value(mut self, input: ::std::option::Option<i32>) -> Self {
87        self.integer_value = input;
88        self
89    }
90    /// <p>The value of the Qualification to assign.</p>
91    pub fn get_integer_value(&self) -> &::std::option::Option<i32> {
92        &self.integer_value
93    }
94    /// <p>Specifies whether to send a notification email message to the Worker saying that the qualification was assigned to the Worker. Note: this is true by default.</p>
95    pub fn send_notification(mut self, input: bool) -> Self {
96        self.send_notification = ::std::option::Option::Some(input);
97        self
98    }
99    /// <p>Specifies whether to send a notification email message to the Worker saying that the qualification was assigned to the Worker. Note: this is true by default.</p>
100    pub fn set_send_notification(mut self, input: ::std::option::Option<bool>) -> Self {
101        self.send_notification = input;
102        self
103    }
104    /// <p>Specifies whether to send a notification email message to the Worker saying that the qualification was assigned to the Worker. Note: this is true by default.</p>
105    pub fn get_send_notification(&self) -> &::std::option::Option<bool> {
106        &self.send_notification
107    }
108    /// Consumes the builder and constructs a [`AssociateQualificationWithWorkerInput`](crate::operation::associate_qualification_with_worker::AssociateQualificationWithWorkerInput).
109    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}