Struct aws_sdk_mturk::Client
source · pub struct Client { /* private fields */ }
Expand description
Client for Amazon Mechanical Turk
Client for invoking operations on Amazon Mechanical Turk. Each operation on Amazon Mechanical Turk is a method on this
this struct. .send()
MUST be invoked on the generated operations to dispatch the request to the service.
§Constructing a Client
A Config
is required to construct a client. For most use cases, the aws-config
crate should be used to automatically resolve this config using
aws_config::load_from_env()
, since this will resolve an SdkConfig
which can be shared
across multiple different AWS SDK clients. This config resolution process can be customized
by calling aws_config::from_env()
instead, which returns a ConfigLoader
that uses
the builder pattern to customize the default config.
In the simplest case, creating a client looks as follows:
let config = aws_config::load_from_env().await;
let client = aws_sdk_mturk::Client::new(&config);
Occasionally, SDKs may have additional service-specific values that can be set on the Config
that
is absent from SdkConfig
, or slightly different settings for a specific client may be desired.
The Config
struct implements From<&SdkConfig>
, so setting these specific settings can be
done as follows:
let sdk_config = ::aws_config::load_from_env().await;
let config = aws_sdk_mturk::config::Builder::from(&sdk_config)
.some_service_specific_setting("value")
.build();
See the aws-config
docs and Config
for more information on customizing configuration.
Note: Client construction is expensive due to connection thread pool initialization, and should be done once at application start-up.
§Using the Client
A client has a function for every operation that can be performed by the service.
For example, the AcceptQualificationRequest
operation has
a Client::accept_qualification_request
, function which returns a builder for that operation.
The fluent builder ultimately has a send()
function that returns an async future that
returns a result, as illustrated below:
let result = client.accept_qualification_request()
.qualification_request_id("example")
.send()
.await;
The underlying HTTP requests that get made by this can be modified with the customize_operation
function on the fluent builder. See the customize
module for more
information.
Implementations§
source§impl Client
impl Client
sourcepub fn accept_qualification_request(
&self
) -> AcceptQualificationRequestFluentBuilder
pub fn accept_qualification_request( &self ) -> AcceptQualificationRequestFluentBuilder
Constructs a fluent builder for the AcceptQualificationRequest
operation.
- The fluent builder is configurable:
qualification_request_id(impl Into<String>)
/set_qualification_request_id(Option<String>)
:
required: trueThe ID of the Qualification request, as returned by the
GetQualificationRequests
operation.integer_value(i32)
/set_integer_value(Option<i32>)
:
required: falseThe value of the Qualification. You can omit this value if you are using the presence or absence of the Qualification as the basis for a HIT requirement.
- On success, responds with
AcceptQualificationRequestOutput
- On failure, responds with
SdkError<AcceptQualificationRequestError>
source§impl Client
impl Client
sourcepub fn approve_assignment(&self) -> ApproveAssignmentFluentBuilder
pub fn approve_assignment(&self) -> ApproveAssignmentFluentBuilder
Constructs a fluent builder for the ApproveAssignment
operation.
- The fluent builder is configurable:
assignment_id(impl Into<String>)
/set_assignment_id(Option<String>)
:
required: trueThe ID of the assignment. The assignment must correspond to a HIT created by the Requester.
requester_feedback(impl Into<String>)
/set_requester_feedback(Option<String>)
:
required: falseA message for the Worker, which the Worker can see in the Status section of the web site.
override_rejection(bool)
/set_override_rejection(Option<bool>)
:
required: falseA flag indicating that an assignment should be approved even if it was previously rejected. Defaults to
False
.
- On success, responds with
ApproveAssignmentOutput
- On failure, responds with
SdkError<ApproveAssignmentError>
source§impl Client
impl Client
sourcepub fn associate_qualification_with_worker(
&self
) -> AssociateQualificationWithWorkerFluentBuilder
pub fn associate_qualification_with_worker( &self ) -> AssociateQualificationWithWorkerFluentBuilder
Constructs a fluent builder for the AssociateQualificationWithWorker
operation.
- The fluent builder is configurable:
qualification_type_id(impl Into<String>)
/set_qualification_type_id(Option<String>)
:
required: trueThe ID of the Qualification type to use for the assigned Qualification.
worker_id(impl Into<String>)
/set_worker_id(Option<String>)
:
required: trueThe ID of the Worker to whom the Qualification is being assigned. Worker IDs are included with submitted HIT assignments and Qualification requests.
integer_value(i32)
/set_integer_value(Option<i32>)
:
required: falseThe value of the Qualification to assign.
send_notification(bool)
/set_send_notification(Option<bool>)
:
required: falseSpecifies 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.
- On success, responds with
AssociateQualificationWithWorkerOutput
- On failure, responds with
SdkError<AssociateQualificationWithWorkerError>
source§impl Client
impl Client
sourcepub fn create_additional_assignments_for_hit(
&self
) -> CreateAdditionalAssignmentsForHITFluentBuilder
pub fn create_additional_assignments_for_hit( &self ) -> CreateAdditionalAssignmentsForHITFluentBuilder
Constructs a fluent builder for the CreateAdditionalAssignmentsForHIT
operation.
- The fluent builder is configurable:
hit_id(impl Into<String>)
/set_hit_id(Option<String>)
:
required: trueThe ID of the HIT to extend.
number_of_additional_assignments(i32)
/set_number_of_additional_assignments(Option<i32>)
:
required: trueThe number of additional assignments to request for this HIT.
unique_request_token(impl Into<String>)
/set_unique_request_token(Option<String>)
:
required: falseA unique identifier for this request, which allows you to retry the call on error without extending the HIT multiple times. This is useful in cases such as network timeouts where it is unclear whether or not the call succeeded on the server. If the extend HIT already exists in the system from a previous call using the same
UniqueRequestToken
, subsequent calls will return an error with a message containing the request ID.
- On success, responds with
CreateAdditionalAssignmentsForHitOutput
- On failure, responds with
SdkError<CreateAdditionalAssignmentsForHITError>
source§impl Client
impl Client
sourcepub fn create_hit(&self) -> CreateHITFluentBuilder
pub fn create_hit(&self) -> CreateHITFluentBuilder
Constructs a fluent builder for the CreateHIT
operation.
- The fluent builder is configurable:
max_assignments(i32)
/set_max_assignments(Option<i32>)
:
required: falseThe number of times the HIT can be accepted and completed before the HIT becomes unavailable.
auto_approval_delay_in_seconds(i64)
/set_auto_approval_delay_in_seconds(Option<i64>)
:
required: falseThe number of seconds after an assignment for the HIT has been submitted, after which the assignment is considered Approved automatically unless the Requester explicitly rejects it.
lifetime_in_seconds(i64)
/set_lifetime_in_seconds(Option<i64>)
:
required: trueAn amount of time, in seconds, after which the HIT is no longer available for users to accept. After the lifetime of the HIT elapses, the HIT no longer appears in HIT searches, even if not all of the assignments for the HIT have been accepted.
assignment_duration_in_seconds(i64)
/set_assignment_duration_in_seconds(Option<i64>)
:
required: trueThe amount of time, in seconds, that a Worker has to complete the HIT after accepting it. If a Worker does not complete the assignment within the specified duration, the assignment is considered abandoned. If the HIT is still active (that is, its lifetime has not elapsed), the assignment becomes available for other users to find and accept.
reward(impl Into<String>)
/set_reward(Option<String>)
:
required: trueThe amount of money the Requester will pay a Worker for successfully completing the HIT.
title(impl Into<String>)
/set_title(Option<String>)
:
required: trueThe title of the HIT. A title should be short and descriptive about the kind of task the HIT contains. On the Amazon Mechanical Turk web site, the HIT title appears in search results, and everywhere the HIT is mentioned.
keywords(impl Into<String>)
/set_keywords(Option<String>)
:
required: falseOne or more words or phrases that describe the HIT, separated by commas. These words are used in searches to find HITs.
description(impl Into<String>)
/set_description(Option<String>)
:
required: trueA general description of the HIT. A description includes detailed information about the kind of task the HIT contains. On the Amazon Mechanical Turk web site, the HIT description appears in the expanded view of search results, and in the HIT and assignment screens. A good description gives the user enough information to evaluate the HIT before accepting it.
question(impl Into<String>)
/set_question(Option<String>)
:
required: falseThe data the person completing the HIT uses to produce the results.
Constraints: Must be a QuestionForm data structure, an ExternalQuestion data structure, or an HTMLQuestion data structure. The XML question data must not be larger than 64 kilobytes (65,535 bytes) in size, including whitespace.
Either a Question parameter or a HITLayoutId parameter must be provided.
requester_annotation(impl Into<String>)
/set_requester_annotation(Option<String>)
:
required: falseAn arbitrary data field. The RequesterAnnotation parameter lets your application attach arbitrary data to the HIT for tracking purposes. For example, this parameter could be an identifier internal to the Requester’s application that corresponds with the HIT.
The RequesterAnnotation parameter for a HIT is only visible to the Requester who created the HIT. It is not shown to the Worker, or any other Requester.
The RequesterAnnotation parameter may be different for each HIT you submit. It does not affect how your HITs are grouped.
qualification_requirements(QualificationRequirement)
/set_qualification_requirements(Option<Vec::<QualificationRequirement>>)
:
required: falseConditions that a Worker’s Qualifications must meet in order to accept the HIT. A HIT can have between zero and ten Qualification requirements. All requirements must be met in order for a Worker to accept the HIT. Additionally, other actions can be restricted using the
ActionsGuarded
field on eachQualificationRequirement
structure.unique_request_token(impl Into<String>)
/set_unique_request_token(Option<String>)
:
required: falseA unique identifier for this request which allows you to retry the call on error without creating duplicate HITs. This is useful in cases such as network timeouts where it is unclear whether or not the call succeeded on the server. If the HIT already exists in the system from a previous call using the same UniqueRequestToken, subsequent calls will return a AWS.MechanicalTurk.HitAlreadyExists error with a message containing the HITId.
Note: It is your responsibility to ensure uniqueness of the token. The unique token expires after 24 hours. Subsequent calls using the same UniqueRequestToken made after the 24 hour limit could create duplicate HITs.
assignment_review_policy(ReviewPolicy)
/set_assignment_review_policy(Option<ReviewPolicy>)
:
required: falseThe Assignment-level Review Policy applies to the assignments under the HIT. You can specify for Mechanical Turk to take various actions based on the policy.
hit_review_policy(ReviewPolicy)
/set_hit_review_policy(Option<ReviewPolicy>)
:
required: falseThe HIT-level Review Policy applies to the HIT. You can specify for Mechanical Turk to take various actions based on the policy.
hit_layout_id(impl Into<String>)
/set_hit_layout_id(Option<String>)
:
required: falseThe HITLayoutId allows you to use a pre-existing HIT design with placeholder values and create an additional HIT by providing those values as HITLayoutParameters.
Constraints: Either a Question parameter or a HITLayoutId parameter must be provided.
hit_layout_parameters(HitLayoutParameter)
/set_hit_layout_parameters(Option<Vec::<HitLayoutParameter>>)
:
required: falseIf the HITLayoutId is provided, any placeholder values must be filled in with values using the HITLayoutParameter structure. For more information, see HITLayout.
- On success, responds with
CreateHitOutput
with field(s):hit(Option<Hit>)
:Contains the newly created HIT data. For a description of the HIT data structure as it appears in responses, see the HIT Data Structure documentation.
- On failure, responds with
SdkError<CreateHITError>
source§impl Client
impl Client
sourcepub fn create_hit_type(&self) -> CreateHITTypeFluentBuilder
pub fn create_hit_type(&self) -> CreateHITTypeFluentBuilder
Constructs a fluent builder for the CreateHITType
operation.
- The fluent builder is configurable:
auto_approval_delay_in_seconds(i64)
/set_auto_approval_delay_in_seconds(Option<i64>)
:
required: falseThe number of seconds after an assignment for the HIT has been submitted, after which the assignment is considered Approved automatically unless the Requester explicitly rejects it.
assignment_duration_in_seconds(i64)
/set_assignment_duration_in_seconds(Option<i64>)
:
required: trueThe amount of time, in seconds, that a Worker has to complete the HIT after accepting it. If a Worker does not complete the assignment within the specified duration, the assignment is considered abandoned. If the HIT is still active (that is, its lifetime has not elapsed), the assignment becomes available for other users to find and accept.
reward(impl Into<String>)
/set_reward(Option<String>)
:
required: trueThe amount of money the Requester will pay a Worker for successfully completing the HIT.
title(impl Into<String>)
/set_title(Option<String>)
:
required: trueThe title of the HIT. A title should be short and descriptive about the kind of task the HIT contains. On the Amazon Mechanical Turk web site, the HIT title appears in search results, and everywhere the HIT is mentioned.
keywords(impl Into<String>)
/set_keywords(Option<String>)
:
required: falseOne or more words or phrases that describe the HIT, separated by commas. These words are used in searches to find HITs.
description(impl Into<String>)
/set_description(Option<String>)
:
required: trueA general description of the HIT. A description includes detailed information about the kind of task the HIT contains. On the Amazon Mechanical Turk web site, the HIT description appears in the expanded view of search results, and in the HIT and assignment screens. A good description gives the user enough information to evaluate the HIT before accepting it.
qualification_requirements(QualificationRequirement)
/set_qualification_requirements(Option<Vec::<QualificationRequirement>>)
:
required: falseConditions that a Worker’s Qualifications must meet in order to accept the HIT. A HIT can have between zero and ten Qualification requirements. All requirements must be met in order for a Worker to accept the HIT. Additionally, other actions can be restricted using the
ActionsGuarded
field on eachQualificationRequirement
structure.
- On success, responds with
CreateHitTypeOutput
with field(s):hit_type_id(Option<String>)
:The ID of the newly registered HIT type.
- On failure, responds with
SdkError<CreateHITTypeError>
source§impl Client
impl Client
sourcepub fn create_hit_with_hit_type(&self) -> CreateHITWithHITTypeFluentBuilder
pub fn create_hit_with_hit_type(&self) -> CreateHITWithHITTypeFluentBuilder
Constructs a fluent builder for the CreateHITWithHITType
operation.
- The fluent builder is configurable:
hit_type_id(impl Into<String>)
/set_hit_type_id(Option<String>)
:
required: trueThe HIT type ID you want to create this HIT with.
max_assignments(i32)
/set_max_assignments(Option<i32>)
:
required: falseThe number of times the HIT can be accepted and completed before the HIT becomes unavailable.
lifetime_in_seconds(i64)
/set_lifetime_in_seconds(Option<i64>)
:
required: trueAn amount of time, in seconds, after which the HIT is no longer available for users to accept. After the lifetime of the HIT elapses, the HIT no longer appears in HIT searches, even if not all of the assignments for the HIT have been accepted.
question(impl Into<String>)
/set_question(Option<String>)
:
required: falseThe data the person completing the HIT uses to produce the results.
Constraints: Must be a QuestionForm data structure, an ExternalQuestion data structure, or an HTMLQuestion data structure. The XML question data must not be larger than 64 kilobytes (65,535 bytes) in size, including whitespace.
Either a Question parameter or a HITLayoutId parameter must be provided.
requester_annotation(impl Into<String>)
/set_requester_annotation(Option<String>)
:
required: falseAn arbitrary data field. The RequesterAnnotation parameter lets your application attach arbitrary data to the HIT for tracking purposes. For example, this parameter could be an identifier internal to the Requester’s application that corresponds with the HIT.
The RequesterAnnotation parameter for a HIT is only visible to the Requester who created the HIT. It is not shown to the Worker, or any other Requester.
The RequesterAnnotation parameter may be different for each HIT you submit. It does not affect how your HITs are grouped.
unique_request_token(impl Into<String>)
/set_unique_request_token(Option<String>)
:
required: falseA unique identifier for this request which allows you to retry the call on error without creating duplicate HITs. This is useful in cases such as network timeouts where it is unclear whether or not the call succeeded on the server. If the HIT already exists in the system from a previous call using the same UniqueRequestToken, subsequent calls will return a AWS.MechanicalTurk.HitAlreadyExists error with a message containing the HITId.
Note: It is your responsibility to ensure uniqueness of the token. The unique token expires after 24 hours. Subsequent calls using the same UniqueRequestToken made after the 24 hour limit could create duplicate HITs.
assignment_review_policy(ReviewPolicy)
/set_assignment_review_policy(Option<ReviewPolicy>)
:
required: falseThe Assignment-level Review Policy applies to the assignments under the HIT. You can specify for Mechanical Turk to take various actions based on the policy.
hit_review_policy(ReviewPolicy)
/set_hit_review_policy(Option<ReviewPolicy>)
:
required: falseThe HIT-level Review Policy applies to the HIT. You can specify for Mechanical Turk to take various actions based on the policy.
hit_layout_id(impl Into<String>)
/set_hit_layout_id(Option<String>)
:
required: falseThe HITLayoutId allows you to use a pre-existing HIT design with placeholder values and create an additional HIT by providing those values as HITLayoutParameters.
Constraints: Either a Question parameter or a HITLayoutId parameter must be provided.
hit_layout_parameters(HitLayoutParameter)
/set_hit_layout_parameters(Option<Vec::<HitLayoutParameter>>)
:
required: falseIf the HITLayoutId is provided, any placeholder values must be filled in with values using the HITLayoutParameter structure. For more information, see HITLayout.
- On success, responds with
CreateHitWithHitTypeOutput
with field(s):hit(Option<Hit>)
:Contains the newly created HIT data. For a description of the HIT data structure as it appears in responses, see the HIT Data Structure documentation.
- On failure, responds with
SdkError<CreateHITWithHITTypeError>
source§impl Client
impl Client
sourcepub fn create_qualification_type(&self) -> CreateQualificationTypeFluentBuilder
pub fn create_qualification_type(&self) -> CreateQualificationTypeFluentBuilder
Constructs a fluent builder for the CreateQualificationType
operation.
- The fluent builder is configurable:
name(impl Into<String>)
/set_name(Option<String>)
:
required: trueThe name you give to the Qualification type. The type name is used to represent the Qualification to Workers, and to find the type using a Qualification type search. It must be unique across all of your Qualification types.
keywords(impl Into<String>)
/set_keywords(Option<String>)
:
required: falseOne or more words or phrases that describe the Qualification type, separated by commas. The keywords of a type make the type easier to find during a search.
description(impl Into<String>)
/set_description(Option<String>)
:
required: trueA long description for the Qualification type. On the Amazon Mechanical Turk website, the long description is displayed when a Worker examines a Qualification type.
qualification_type_status(QualificationTypeStatus)
/set_qualification_type_status(Option<QualificationTypeStatus>)
:
required: trueThe initial status of the Qualification type.
Constraints: Valid values are: Active | Inactive
retry_delay_in_seconds(i64)
/set_retry_delay_in_seconds(Option<i64>)
:
required: falseThe number of seconds that a Worker must wait after requesting a Qualification of the Qualification type before the worker can retry the Qualification request.
Constraints: None. If not specified, retries are disabled and Workers can request a Qualification of this type only once, even if the Worker has not been granted the Qualification. It is not possible to disable retries for a Qualification type after it has been created with retries enabled. If you want to disable retries, you must delete existing retry-enabled Qualification type and then create a new Qualification type with retries disabled.
test(impl Into<String>)
/set_test(Option<String>)
:
required: falseThe questions for the Qualification test a Worker must answer correctly to obtain a Qualification of this type. If this parameter is specified,
TestDurationInSeconds
must also be specified.Constraints: Must not be longer than 65535 bytes. Must be a QuestionForm data structure. This parameter cannot be specified if AutoGranted is true.
Constraints: None. If not specified, the Worker may request the Qualification without answering any questions.
answer_key(impl Into<String>)
/set_answer_key(Option<String>)
:
required: falseThe answers to the Qualification test specified in the Test parameter, in the form of an AnswerKey data structure.
Constraints: Must not be longer than 65535 bytes.
Constraints: None. If not specified, you must process Qualification requests manually.
test_duration_in_seconds(i64)
/set_test_duration_in_seconds(Option<i64>)
:
required: falseThe number of seconds the Worker has to complete the Qualification test, starting from the time the Worker requests the Qualification.
auto_granted(bool)
/set_auto_granted(Option<bool>)
:
required: falseSpecifies whether requests for the Qualification type are granted immediately, without prompting the Worker with a Qualification test.
Constraints: If the Test parameter is specified, this parameter cannot be true.
auto_granted_value(i32)
/set_auto_granted_value(Option<i32>)
:
required: falseThe Qualification value to use for automatically granted Qualifications. This parameter is used only if the AutoGranted parameter is true.
- On success, responds with
CreateQualificationTypeOutput
with field(s):qualification_type(Option<QualificationType>)
:The created Qualification type, returned as a QualificationType data structure.
- On failure, responds with
SdkError<CreateQualificationTypeError>
source§impl Client
impl Client
sourcepub fn create_worker_block(&self) -> CreateWorkerBlockFluentBuilder
pub fn create_worker_block(&self) -> CreateWorkerBlockFluentBuilder
Constructs a fluent builder for the CreateWorkerBlock
operation.
- The fluent builder is configurable:
worker_id(impl Into<String>)
/set_worker_id(Option<String>)
:
required: trueThe ID of the Worker to block.
reason(impl Into<String>)
/set_reason(Option<String>)
:
required: trueA message explaining the reason for blocking the Worker. This parameter enables you to keep track of your Workers. The Worker does not see this message.
- On success, responds with
CreateWorkerBlockOutput
- On failure, responds with
SdkError<CreateWorkerBlockError>
source§impl Client
impl Client
sourcepub fn delete_hit(&self) -> DeleteHITFluentBuilder
pub fn delete_hit(&self) -> DeleteHITFluentBuilder
Constructs a fluent builder for the DeleteHIT
operation.
- The fluent builder is configurable:
hit_id(impl Into<String>)
/set_hit_id(Option<String>)
:
required: trueThe ID of the HIT to be deleted.
- On success, responds with
DeleteHitOutput
- On failure, responds with
SdkError<DeleteHITError>
source§impl Client
impl Client
sourcepub fn delete_qualification_type(&self) -> DeleteQualificationTypeFluentBuilder
pub fn delete_qualification_type(&self) -> DeleteQualificationTypeFluentBuilder
Constructs a fluent builder for the DeleteQualificationType
operation.
- The fluent builder is configurable:
qualification_type_id(impl Into<String>)
/set_qualification_type_id(Option<String>)
:
required: trueThe ID of the QualificationType to dispose.
- On success, responds with
DeleteQualificationTypeOutput
- On failure, responds with
SdkError<DeleteQualificationTypeError>
source§impl Client
impl Client
sourcepub fn delete_worker_block(&self) -> DeleteWorkerBlockFluentBuilder
pub fn delete_worker_block(&self) -> DeleteWorkerBlockFluentBuilder
Constructs a fluent builder for the DeleteWorkerBlock
operation.
- The fluent builder is configurable:
worker_id(impl Into<String>)
/set_worker_id(Option<String>)
:
required: trueThe ID of the Worker to unblock.
reason(impl Into<String>)
/set_reason(Option<String>)
:
required: falseA message that explains the reason for unblocking the Worker. The Worker does not see this message.
- On success, responds with
DeleteWorkerBlockOutput
- On failure, responds with
SdkError<DeleteWorkerBlockError>
source§impl Client
impl Client
sourcepub fn disassociate_qualification_from_worker(
&self
) -> DisassociateQualificationFromWorkerFluentBuilder
pub fn disassociate_qualification_from_worker( &self ) -> DisassociateQualificationFromWorkerFluentBuilder
Constructs a fluent builder for the DisassociateQualificationFromWorker
operation.
- The fluent builder is configurable:
worker_id(impl Into<String>)
/set_worker_id(Option<String>)
:
required: trueThe ID of the Worker who possesses the Qualification to be revoked.
qualification_type_id(impl Into<String>)
/set_qualification_type_id(Option<String>)
:
required: trueThe ID of the Qualification type of the Qualification to be revoked.
reason(impl Into<String>)
/set_reason(Option<String>)
:
required: falseA text message that explains why the Qualification was revoked. The user who had the Qualification sees this message.
- On success, responds with
DisassociateQualificationFromWorkerOutput
- On failure, responds with
SdkError<DisassociateQualificationFromWorkerError>
source§impl Client
impl Client
sourcepub fn get_account_balance(&self) -> GetAccountBalanceFluentBuilder
pub fn get_account_balance(&self) -> GetAccountBalanceFluentBuilder
Constructs a fluent builder for the GetAccountBalance
operation.
- The fluent builder takes no input, just
send
it. - On success, responds with
GetAccountBalanceOutput
with field(s):available_balance(Option<String>)
:A string representing a currency amount.
on_hold_balance(Option<String>)
:A string representing a currency amount.
- On failure, responds with
SdkError<GetAccountBalanceError>
source§impl Client
impl Client
sourcepub fn get_assignment(&self) -> GetAssignmentFluentBuilder
pub fn get_assignment(&self) -> GetAssignmentFluentBuilder
Constructs a fluent builder for the GetAssignment
operation.
- The fluent builder is configurable:
assignment_id(impl Into<String>)
/set_assignment_id(Option<String>)
:
required: trueThe ID of the Assignment to be retrieved.
- On success, responds with
GetAssignmentOutput
with field(s):assignment(Option<Assignment>)
:The assignment. The response includes one Assignment element.
hit(Option<Hit>)
:The HIT associated with this assignment. The response includes one HIT element.
- On failure, responds with
SdkError<GetAssignmentError>
source§impl Client
impl Client
sourcepub fn get_file_upload_url(&self) -> GetFileUploadURLFluentBuilder
pub fn get_file_upload_url(&self) -> GetFileUploadURLFluentBuilder
Constructs a fluent builder for the GetFileUploadURL
operation.
- The fluent builder is configurable:
assignment_id(impl Into<String>)
/set_assignment_id(Option<String>)
:
required: trueThe ID of the assignment that contains the question with a FileUploadAnswer.
question_identifier(impl Into<String>)
/set_question_identifier(Option<String>)
:
required: trueThe identifier of the question with a FileUploadAnswer, as specified in the QuestionForm of the HIT.
- On success, responds with
GetFileUploadUrlOutput
with field(s):file_upload_url(Option<String>)
:A temporary URL for the file that the Worker uploaded for the answer.
- On failure, responds with
SdkError<GetFileUploadURLError>
source§impl Client
impl Client
sourcepub fn get_hit(&self) -> GetHITFluentBuilder
pub fn get_hit(&self) -> GetHITFluentBuilder
Constructs a fluent builder for the GetHIT
operation.
- The fluent builder is configurable:
hit_id(impl Into<String>)
/set_hit_id(Option<String>)
:
required: trueThe ID of the HIT to be retrieved.
- On success, responds with
GetHitOutput
with field(s):hit(Option<Hit>)
:Contains the requested HIT data.
- On failure, responds with
SdkError<GetHITError>
source§impl Client
impl Client
sourcepub fn get_qualification_score(&self) -> GetQualificationScoreFluentBuilder
pub fn get_qualification_score(&self) -> GetQualificationScoreFluentBuilder
Constructs a fluent builder for the GetQualificationScore
operation.
- The fluent builder is configurable:
qualification_type_id(impl Into<String>)
/set_qualification_type_id(Option<String>)
:
required: trueThe ID of the QualificationType.
worker_id(impl Into<String>)
/set_worker_id(Option<String>)
:
required: trueThe ID of the Worker whose Qualification is being updated.
- On success, responds with
GetQualificationScoreOutput
with field(s):qualification(Option<Qualification>)
:The Qualification data structure of the Qualification assigned to a user, including the Qualification type and the value (score).
- On failure, responds with
SdkError<GetQualificationScoreError>
source§impl Client
impl Client
sourcepub fn get_qualification_type(&self) -> GetQualificationTypeFluentBuilder
pub fn get_qualification_type(&self) -> GetQualificationTypeFluentBuilder
Constructs a fluent builder for the GetQualificationType
operation.
- The fluent builder is configurable:
qualification_type_id(impl Into<String>)
/set_qualification_type_id(Option<String>)
:
required: trueThe ID of the QualificationType.
- On success, responds with
GetQualificationTypeOutput
with field(s):qualification_type(Option<QualificationType>)
:The returned Qualification Type
- On failure, responds with
SdkError<GetQualificationTypeError>
source§impl Client
impl Client
sourcepub fn list_assignments_for_hit(&self) -> ListAssignmentsForHITFluentBuilder
pub fn list_assignments_for_hit(&self) -> ListAssignmentsForHITFluentBuilder
Constructs a fluent builder for the ListAssignmentsForHIT
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
hit_id(impl Into<String>)
/set_hit_id(Option<String>)
:
required: trueThe ID of the HIT.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falsePagination token
max_results(i32)
/set_max_results(Option<i32>)
:
required: false
(undocumented)assignment_statuses(AssignmentStatus)
/set_assignment_statuses(Option<Vec::<AssignmentStatus>>)
:
required: falseThe status of the assignments to return: Submitted | Approved | Rejected
- On success, responds with
ListAssignmentsForHitOutput
with field(s):next_token(Option<String>)
:If the previous response was incomplete (because there is more data to retrieve), Amazon Mechanical Turk returns a pagination token in the response. You can use this pagination token to retrieve the next set of results.
num_results(Option<i32>)
:The number of assignments on the page in the filtered results list, equivalent to the number of assignments returned by this call.
assignments(Option<Vec::<Assignment>>)
:The collection of Assignment data structures returned by this call.
- On failure, responds with
SdkError<ListAssignmentsForHITError>
source§impl Client
impl Client
sourcepub fn list_bonus_payments(&self) -> ListBonusPaymentsFluentBuilder
pub fn list_bonus_payments(&self) -> ListBonusPaymentsFluentBuilder
Constructs a fluent builder for the ListBonusPayments
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
hit_id(impl Into<String>)
/set_hit_id(Option<String>)
:
required: falseThe ID of the HIT associated with the bonus payments to retrieve. If not specified, all bonus payments for all assignments for the given HIT are returned. Either the HITId parameter or the AssignmentId parameter must be specified
assignment_id(impl Into<String>)
/set_assignment_id(Option<String>)
:
required: falseThe ID of the assignment associated with the bonus payments to retrieve. If specified, only bonus payments for the given assignment are returned. Either the HITId parameter or the AssignmentId parameter must be specified
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falsePagination token
max_results(i32)
/set_max_results(Option<i32>)
:
required: false
(undocumented)
- On success, responds with
ListBonusPaymentsOutput
with field(s):num_results(Option<i32>)
:The number of bonus payments on this page in the filtered results list, equivalent to the number of bonus payments being returned by this call.
next_token(Option<String>)
:If the previous response was incomplete (because there is more data to retrieve), Amazon Mechanical Turk returns a pagination token in the response. You can use this pagination token to retrieve the next set of results.
bonus_payments(Option<Vec::<BonusPayment>>)
:A successful request to the ListBonusPayments operation returns a list of BonusPayment objects.
- On failure, responds with
SdkError<ListBonusPaymentsError>
source§impl Client
impl Client
sourcepub fn list_hits(&self) -> ListHITsFluentBuilder
pub fn list_hits(&self) -> ListHITsFluentBuilder
Constructs a fluent builder for the ListHITs
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falsePagination token
max_results(i32)
/set_max_results(Option<i32>)
:
required: false
(undocumented)
- On success, responds with
ListHiTsOutput
with field(s):next_token(Option<String>)
:If the previous response was incomplete (because there is more data to retrieve), Amazon Mechanical Turk returns a pagination token in the response. You can use this pagination token to retrieve the next set of results.
num_results(Option<i32>)
:The number of HITs on this page in the filtered results list, equivalent to the number of HITs being returned by this call.
hits(Option<Vec::<Hit>>)
:The list of HIT elements returned by the query.
- On failure, responds with
SdkError<ListHITsError>
source§impl Client
impl Client
sourcepub fn list_hits_for_qualification_type(
&self
) -> ListHITsForQualificationTypeFluentBuilder
pub fn list_hits_for_qualification_type( &self ) -> ListHITsForQualificationTypeFluentBuilder
Constructs a fluent builder for the ListHITsForQualificationType
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
qualification_type_id(impl Into<String>)
/set_qualification_type_id(Option<String>)
:
required: trueThe ID of the Qualification type to use when querying HITs.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falsePagination Token
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseLimit the number of results returned.
- On success, responds with
ListHiTsForQualificationTypeOutput
with field(s):next_token(Option<String>)
:If the previous response was incomplete (because there is more data to retrieve), Amazon Mechanical Turk returns a pagination token in the response. You can use this pagination token to retrieve the next set of results.
num_results(Option<i32>)
:The number of HITs on this page in the filtered results list, equivalent to the number of HITs being returned by this call.
hits(Option<Vec::<Hit>>)
:The list of HIT elements returned by the query.
- On failure, responds with
SdkError<ListHITsForQualificationTypeError>
source§impl Client
impl Client
sourcepub fn list_qualification_requests(
&self
) -> ListQualificationRequestsFluentBuilder
pub fn list_qualification_requests( &self ) -> ListQualificationRequestsFluentBuilder
Constructs a fluent builder for the ListQualificationRequests
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
qualification_type_id(impl Into<String>)
/set_qualification_type_id(Option<String>)
:
required: falseThe ID of the QualificationType.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseIf the previous response was incomplete (because there is more data to retrieve), Amazon Mechanical Turk returns a pagination token in the response. You can use this pagination token to retrieve the next set of results.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of results to return in a single call.
- On success, responds with
ListQualificationRequestsOutput
with field(s):num_results(Option<i32>)
:The number of Qualification requests on this page in the filtered results list, equivalent to the number of Qualification requests being returned by this call.
next_token(Option<String>)
:If the previous response was incomplete (because there is more data to retrieve), Amazon Mechanical Turk returns a pagination token in the response. You can use this pagination token to retrieve the next set of results.
qualification_requests(Option<Vec::<QualificationRequest>>)
:The Qualification request. The response includes one QualificationRequest element for each Qualification request returned by the query.
- On failure, responds with
SdkError<ListQualificationRequestsError>
source§impl Client
impl Client
sourcepub fn list_qualification_types(&self) -> ListQualificationTypesFluentBuilder
pub fn list_qualification_types(&self) -> ListQualificationTypesFluentBuilder
Constructs a fluent builder for the ListQualificationTypes
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
query(impl Into<String>)
/set_query(Option<String>)
:
required: falseA text query against all of the searchable attributes of Qualification types.
must_be_requestable(bool)
/set_must_be_requestable(Option<bool>)
:
required: trueSpecifies that only Qualification types that a user can request through the Amazon Mechanical Turk web site, such as by taking a Qualification test, are returned as results of the search. Some Qualification types, such as those assigned automatically by the system, cannot be requested directly by users. If false, all Qualification types, including those managed by the system, are considered. Valid values are True | False.
must_be_owned_by_caller(bool)
/set_must_be_owned_by_caller(Option<bool>)
:
required: falseSpecifies that only Qualification types that the Requester created are returned. If false, the operation returns all Qualification types.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseIf the previous response was incomplete (because there is more data to retrieve), Amazon Mechanical Turk returns a pagination token in the response. You can use this pagination token to retrieve the next set of results.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of results to return in a single call.
- On success, responds with
ListQualificationTypesOutput
with field(s):num_results(Option<i32>)
:The number of Qualification types on this page in the filtered results list, equivalent to the number of types this operation returns.
next_token(Option<String>)
:If the previous response was incomplete (because there is more data to retrieve), Amazon Mechanical Turk returns a pagination token in the response. You can use this pagination token to retrieve the next set of results.
qualification_types(Option<Vec::<QualificationType>>)
:The list of QualificationType elements returned by the query.
- On failure, responds with
SdkError<ListQualificationTypesError>
source§impl Client
impl Client
sourcepub fn list_review_policy_results_for_hit(
&self
) -> ListReviewPolicyResultsForHITFluentBuilder
pub fn list_review_policy_results_for_hit( &self ) -> ListReviewPolicyResultsForHITFluentBuilder
Constructs a fluent builder for the ListReviewPolicyResultsForHIT
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
hit_id(impl Into<String>)
/set_hit_id(Option<String>)
:
required: trueThe unique identifier of the HIT to retrieve review results for.
policy_levels(ReviewPolicyLevel)
/set_policy_levels(Option<Vec::<ReviewPolicyLevel>>)
:
required: falseThe Policy Level(s) to retrieve review results for - HIT or Assignment. If omitted, the default behavior is to retrieve all data for both policy levels. For a list of all the described policies, see Review Policies.
retrieve_actions(bool)
/set_retrieve_actions(Option<bool>)
:
required: falseSpecify if the operation should retrieve a list of the actions taken executing the Review Policies and their outcomes.
retrieve_results(bool)
/set_retrieve_results(Option<bool>)
:
required: falseSpecify if the operation should retrieve a list of the results computed by the Review Policies.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falsePagination token
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseLimit the number of results returned.
- On success, responds with
ListReviewPolicyResultsForHitOutput
with field(s):hit_id(Option<String>)
:The HITId of the HIT for which results have been returned.
assignment_review_policy(Option<ReviewPolicy>)
:The name of the Assignment-level Review Policy. This contains only the PolicyName element.
hit_review_policy(Option<ReviewPolicy>)
:The name of the HIT-level Review Policy. This contains only the PolicyName element.
assignment_review_report(Option<ReviewReport>)
:Contains both ReviewResult and ReviewAction elements for an Assignment.
hit_review_report(Option<ReviewReport>)
:Contains both ReviewResult and ReviewAction elements for a particular HIT.
next_token(Option<String>)
:If the previous response was incomplete (because there is more data to retrieve), Amazon Mechanical Turk returns a pagination token in the response. You can use this pagination token to retrieve the next set of results.
- On failure, responds with
SdkError<ListReviewPolicyResultsForHITError>
source§impl Client
impl Client
sourcepub fn list_reviewable_hits(&self) -> ListReviewableHITsFluentBuilder
pub fn list_reviewable_hits(&self) -> ListReviewableHITsFluentBuilder
Constructs a fluent builder for the ListReviewableHITs
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
hit_type_id(impl Into<String>)
/set_hit_type_id(Option<String>)
:
required: falseThe ID of the HIT type of the HITs to consider for the query. If not specified, all HITs for the Reviewer are considered
status(ReviewableHitStatus)
/set_status(Option<ReviewableHitStatus>)
:
required: falseCan be either
Reviewable
orReviewing
. Reviewable is the default value.next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falsePagination Token
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseLimit the number of results returned.
- On success, responds with
ListReviewableHiTsOutput
with field(s):next_token(Option<String>)
:If the previous response was incomplete (because there is more data to retrieve), Amazon Mechanical Turk returns a pagination token in the response. You can use this pagination token to retrieve the next set of results.
num_results(Option<i32>)
:The number of HITs on this page in the filtered results list, equivalent to the number of HITs being returned by this call.
hits(Option<Vec::<Hit>>)
:The list of HIT elements returned by the query.
- On failure, responds with
SdkError<ListReviewableHITsError>
source§impl Client
impl Client
sourcepub fn list_worker_blocks(&self) -> ListWorkerBlocksFluentBuilder
pub fn list_worker_blocks(&self) -> ListWorkerBlocksFluentBuilder
Constructs a fluent builder for the ListWorkerBlocks
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falsePagination token
max_results(i32)
/set_max_results(Option<i32>)
:
required: false
(undocumented)
- On success, responds with
ListWorkerBlocksOutput
with field(s):next_token(Option<String>)
:If the previous response was incomplete (because there is more data to retrieve), Amazon Mechanical Turk returns a pagination token in the response. You can use this pagination token to retrieve the next set of results.
num_results(Option<i32>)
:The number of assignments on the page in the filtered results list, equivalent to the number of assignments returned by this call.
worker_blocks(Option<Vec::<WorkerBlock>>)
:The list of WorkerBlocks, containing the collection of Worker IDs and reasons for blocking.
- On failure, responds with
SdkError<ListWorkerBlocksError>
source§impl Client
impl Client
sourcepub fn list_workers_with_qualification_type(
&self
) -> ListWorkersWithQualificationTypeFluentBuilder
pub fn list_workers_with_qualification_type( &self ) -> ListWorkersWithQualificationTypeFluentBuilder
Constructs a fluent builder for the ListWorkersWithQualificationType
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
qualification_type_id(impl Into<String>)
/set_qualification_type_id(Option<String>)
:
required: trueThe ID of the Qualification type of the Qualifications to return.
status(QualificationStatus)
/set_status(Option<QualificationStatus>)
:
required: falseThe status of the Qualifications to return. Can be
Granted | Revoked
.next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falsePagination Token
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseLimit the number of results returned.
- On success, responds with
ListWorkersWithQualificationTypeOutput
with field(s):next_token(Option<String>)
:If the previous response was incomplete (because there is more data to retrieve), Amazon Mechanical Turk returns a pagination token in the response. You can use this pagination token to retrieve the next set of results.
num_results(Option<i32>)
:The number of Qualifications on this page in the filtered results list, equivalent to the number of Qualifications being returned by this call.
qualifications(Option<Vec::<Qualification>>)
:The list of Qualification elements returned by this call.
- On failure, responds with
SdkError<ListWorkersWithQualificationTypeError>
source§impl Client
impl Client
sourcepub fn notify_workers(&self) -> NotifyWorkersFluentBuilder
pub fn notify_workers(&self) -> NotifyWorkersFluentBuilder
Constructs a fluent builder for the NotifyWorkers
operation.
- The fluent builder is configurable:
subject(impl Into<String>)
/set_subject(Option<String>)
:
required: trueThe subject line of the email message to send. Can include up to 200 characters.
message_text(impl Into<String>)
/set_message_text(Option<String>)
:
required: trueThe text of the email message to send. Can include up to 4,096 characters
worker_ids(impl Into<String>)
/set_worker_ids(Option<Vec::<String>>)
:
required: trueA list of Worker IDs you wish to notify. You can notify upto 100 Workers at a time.
- On success, responds with
NotifyWorkersOutput
with field(s):notify_workers_failure_statuses(Option<Vec::<NotifyWorkersFailureStatus>>)
:When MTurk sends notifications to the list of Workers, it returns back any failures it encounters in this list of NotifyWorkersFailureStatus objects.
- On failure, responds with
SdkError<NotifyWorkersError>
source§impl Client
impl Client
sourcepub fn reject_assignment(&self) -> RejectAssignmentFluentBuilder
pub fn reject_assignment(&self) -> RejectAssignmentFluentBuilder
Constructs a fluent builder for the RejectAssignment
operation.
- The fluent builder is configurable:
assignment_id(impl Into<String>)
/set_assignment_id(Option<String>)
:
required: trueThe ID of the assignment. The assignment must correspond to a HIT created by the Requester.
requester_feedback(impl Into<String>)
/set_requester_feedback(Option<String>)
:
required: trueA message for the Worker, which the Worker can see in the Status section of the web site.
- On success, responds with
RejectAssignmentOutput
- On failure, responds with
SdkError<RejectAssignmentError>
source§impl Client
impl Client
sourcepub fn reject_qualification_request(
&self
) -> RejectQualificationRequestFluentBuilder
pub fn reject_qualification_request( &self ) -> RejectQualificationRequestFluentBuilder
Constructs a fluent builder for the RejectQualificationRequest
operation.
- The fluent builder is configurable:
qualification_request_id(impl Into<String>)
/set_qualification_request_id(Option<String>)
:
required: trueThe ID of the Qualification request, as returned by the
ListQualificationRequests
operation.reason(impl Into<String>)
/set_reason(Option<String>)
:
required: falseA text message explaining why the request was rejected, to be shown to the Worker who made the request.
- On success, responds with
RejectQualificationRequestOutput
- On failure, responds with
SdkError<RejectQualificationRequestError>
source§impl Client
impl Client
sourcepub fn send_bonus(&self) -> SendBonusFluentBuilder
pub fn send_bonus(&self) -> SendBonusFluentBuilder
Constructs a fluent builder for the SendBonus
operation.
- The fluent builder is configurable:
worker_id(impl Into<String>)
/set_worker_id(Option<String>)
:
required: trueThe ID of the Worker being paid the bonus.
bonus_amount(impl Into<String>)
/set_bonus_amount(Option<String>)
:
required: trueThe Bonus amount is a US Dollar amount specified using a string (for example, “5” represents $5.00 USD and “101.42” represents $101.42 USD). Do not include currency symbols or currency codes.
assignment_id(impl Into<String>)
/set_assignment_id(Option<String>)
:
required: trueThe ID of the assignment for which this bonus is paid.
reason(impl Into<String>)
/set_reason(Option<String>)
:
required: trueA message that explains the reason for the bonus payment. The Worker receiving the bonus can see this message.
unique_request_token(impl Into<String>)
/set_unique_request_token(Option<String>)
:
required: falseA unique identifier for this request, which allows you to retry the call on error without granting multiple bonuses. This is useful in cases such as network timeouts where it is unclear whether or not the call succeeded on the server. If the bonus already exists in the system from a previous call using the same UniqueRequestToken, subsequent calls will return an error with a message containing the request ID.
- On success, responds with
SendBonusOutput
- On failure, responds with
SdkError<SendBonusError>
source§impl Client
impl Client
sourcepub fn send_test_event_notification(
&self
) -> SendTestEventNotificationFluentBuilder
pub fn send_test_event_notification( &self ) -> SendTestEventNotificationFluentBuilder
Constructs a fluent builder for the SendTestEventNotification
operation.
- The fluent builder is configurable:
notification(NotificationSpecification)
/set_notification(Option<NotificationSpecification>)
:
required: trueThe notification specification to test. This value is identical to the value you would provide to the UpdateNotificationSettings operation when you establish the notification specification for a HIT type.
test_event_type(EventType)
/set_test_event_type(Option<EventType>)
:
required: trueThe event to simulate to test the notification specification. This event is included in the test message even if the notification specification does not include the event type. The notification specification does not filter out the test event.
- On success, responds with
SendTestEventNotificationOutput
- On failure, responds with
SdkError<SendTestEventNotificationError>
source§impl Client
impl Client
sourcepub fn update_expiration_for_hit(&self) -> UpdateExpirationForHITFluentBuilder
pub fn update_expiration_for_hit(&self) -> UpdateExpirationForHITFluentBuilder
Constructs a fluent builder for the UpdateExpirationForHIT
operation.
- The fluent builder is configurable:
hit_id(impl Into<String>)
/set_hit_id(Option<String>)
:
required: trueThe HIT to update.
expire_at(DateTime)
/set_expire_at(Option<DateTime>)
:
required: trueThe date and time at which you want the HIT to expire
- On success, responds with
UpdateExpirationForHitOutput
- On failure, responds with
SdkError<UpdateExpirationForHITError>
source§impl Client
impl Client
sourcepub fn update_hit_review_status(&self) -> UpdateHITReviewStatusFluentBuilder
pub fn update_hit_review_status(&self) -> UpdateHITReviewStatusFluentBuilder
Constructs a fluent builder for the UpdateHITReviewStatus
operation.
- The fluent builder is configurable:
hit_id(impl Into<String>)
/set_hit_id(Option<String>)
:
required: trueThe ID of the HIT to update.
revert(bool)
/set_revert(Option<bool>)
:
required: falseSpecifies how to update the HIT status. Default is
False
.-
Setting this to false will only transition a HIT from
Reviewable
toReviewing
-
Setting this to true will only transition a HIT from
Reviewing
toReviewable
-
- On success, responds with
UpdateHitReviewStatusOutput
- On failure, responds with
SdkError<UpdateHITReviewStatusError>
source§impl Client
impl Client
sourcepub fn update_hit_type_of_hit(&self) -> UpdateHITTypeOfHITFluentBuilder
pub fn update_hit_type_of_hit(&self) -> UpdateHITTypeOfHITFluentBuilder
Constructs a fluent builder for the UpdateHITTypeOfHIT
operation.
- The fluent builder is configurable:
hit_id(impl Into<String>)
/set_hit_id(Option<String>)
:
required: trueThe HIT to update.
hit_type_id(impl Into<String>)
/set_hit_type_id(Option<String>)
:
required: trueThe ID of the new HIT type.
- On success, responds with
UpdateHitTypeOfHitOutput
- On failure, responds with
SdkError<UpdateHITTypeOfHITError>
source§impl Client
impl Client
sourcepub fn update_notification_settings(
&self
) -> UpdateNotificationSettingsFluentBuilder
pub fn update_notification_settings( &self ) -> UpdateNotificationSettingsFluentBuilder
Constructs a fluent builder for the UpdateNotificationSettings
operation.
- The fluent builder is configurable:
hit_type_id(impl Into<String>)
/set_hit_type_id(Option<String>)
:
required: trueThe ID of the HIT type whose notification specification is being updated.
notification(NotificationSpecification)
/set_notification(Option<NotificationSpecification>)
:
required: falseThe notification specification for the HIT type.
active(bool)
/set_active(Option<bool>)
:
required: falseSpecifies whether notifications are sent for HITs of this HIT type, according to the notification specification. You must specify either the Notification parameter or the Active parameter for the call to UpdateNotificationSettings to succeed.
- On success, responds with
UpdateNotificationSettingsOutput
- On failure, responds with
SdkError<UpdateNotificationSettingsError>
source§impl Client
impl Client
sourcepub fn update_qualification_type(&self) -> UpdateQualificationTypeFluentBuilder
pub fn update_qualification_type(&self) -> UpdateQualificationTypeFluentBuilder
Constructs a fluent builder for the UpdateQualificationType
operation.
- The fluent builder is configurable:
qualification_type_id(impl Into<String>)
/set_qualification_type_id(Option<String>)
:
required: trueThe ID of the Qualification type to update.
description(impl Into<String>)
/set_description(Option<String>)
:
required: falseThe new description of the Qualification type.
qualification_type_status(QualificationTypeStatus)
/set_qualification_type_status(Option<QualificationTypeStatus>)
:
required: falseThe new status of the Qualification type - Active | Inactive
test(impl Into<String>)
/set_test(Option<String>)
:
required: falseThe questions for the Qualification test a Worker must answer correctly to obtain a Qualification of this type. If this parameter is specified,
TestDurationInSeconds
must also be specified.Constraints: Must not be longer than 65535 bytes. Must be a QuestionForm data structure. This parameter cannot be specified if AutoGranted is true.
Constraints: None. If not specified, the Worker may request the Qualification without answering any questions.
answer_key(impl Into<String>)
/set_answer_key(Option<String>)
:
required: falseThe answers to the Qualification test specified in the Test parameter, in the form of an AnswerKey data structure.
test_duration_in_seconds(i64)
/set_test_duration_in_seconds(Option<i64>)
:
required: falseThe number of seconds the Worker has to complete the Qualification test, starting from the time the Worker requests the Qualification.
retry_delay_in_seconds(i64)
/set_retry_delay_in_seconds(Option<i64>)
:
required: falseThe amount of time, in seconds, that Workers must wait after requesting a Qualification of the specified Qualification type before they can retry the Qualification request. It is not possible to disable retries for a Qualification type after it has been created with retries enabled. If you want to disable retries, you must dispose of the existing retry-enabled Qualification type using DisposeQualificationType and then create a new Qualification type with retries disabled using CreateQualificationType.
auto_granted(bool)
/set_auto_granted(Option<bool>)
:
required: falseSpecifies whether requests for the Qualification type are granted immediately, without prompting the Worker with a Qualification test.
Constraints: If the Test parameter is specified, this parameter cannot be true.
auto_granted_value(i32)
/set_auto_granted_value(Option<i32>)
:
required: falseThe Qualification value to use for automatically granted Qualifications. This parameter is used only if the AutoGranted parameter is true.
- On success, responds with
UpdateQualificationTypeOutput
with field(s):qualification_type(Option<QualificationType>)
:Contains a QualificationType data structure.
- On failure, responds with
SdkError<UpdateQualificationTypeError>
source§impl Client
impl Client
sourcepub fn from_conf(conf: Config) -> Self
pub fn from_conf(conf: Config) -> Self
Creates a new client from the service Config
.
§Panics
This method will panic in the following cases:
- Retries or timeouts are enabled without a
sleep_impl
configured. - Identity caching is enabled without a
sleep_impl
andtime_source
configured. - No
behavior_version
is provided.
The panic message for each of these will have instructions on how to resolve them.
source§impl Client
impl Client
sourcepub fn new(sdk_config: &SdkConfig) -> Self
pub fn new(sdk_config: &SdkConfig) -> Self
Creates a new client from an SDK Config.
§Panics
- This method will panic if the
sdk_config
is missing an async sleep implementation. If you experience this panic, set thesleep_impl
on the Config passed into this function to fix it. - This method will panic if the
sdk_config
is missing an HTTP connector. If you experience this panic, set thehttp_connector
on the Config passed into this function to fix it. - This method will panic if no
BehaviorVersion
is provided. If you experience this panic, setbehavior_version
on the Config or enable thebehavior-version-latest
Cargo feature.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Client
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more