/** * Construct a synchronous implementation of AmazonMTurk using the current builder configuration. * * @param params * Current builder configuration represented as a parameter object. * @return Fully configured implementation of AmazonMTurk. */ @Override protected AmazonMTurk build(AwsSyncClientParams params) { return new AmazonMTurkClient(params); }
/** * <p> * The <code>GetHIT</code> operation retrieves the details of the specified HIT. * </p> * * @param getHITRequest * @return Result of the GetHIT operation returned by the service. * @throws ServiceException * Amazon Mechanical Turk is temporarily unable to process your request. Try your call again. * @throws RequestErrorException * Your request is invalid. * @sample AmazonMTurk.GetHIT * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/mturk-requester-2017-01-17/GetHIT" target="_top">AWS API * Documentation</a> */ @Override public GetHITResult getHIT(GetHITRequest request) { request = beforeClientExecution(request); return executeGetHIT(request); }
/** * Invoke with no authentication. Credentials are not required and any credentials set on the client or request will * be ignored for this operation. **/ private <X, Y extends AmazonWebServiceRequest> Response<X> anonymousInvoke(Request<Y> request, HttpResponseHandler<AmazonWebServiceResponse<X>> responseHandler, ExecutionContext executionContext) { return doInvoke(request, responseHandler, executionContext, null, null); }
/** * <p> * The <code>GetQualificationType</code>operation retrieves information about a Qualification type using its ID. * </p> * * @param getQualificationTypeRequest * @return Result of the GetQualificationType operation returned by the service. * @throws ServiceException * Amazon Mechanical Turk is temporarily unable to process your request. Try your call again. * @throws RequestErrorException * Your request is invalid. * @sample AmazonMTurk.GetQualificationType * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/mturk-requester-2017-01-17/GetQualificationType" * target="_top">AWS API Documentation</a> */ @Override public GetQualificationTypeResult getQualificationType(GetQualificationTypeRequest request) { request = beforeClientExecution(request); return executeGetQualificationType(request); }
/** * <p> * The <code>GetAssignment</code> operation retrieves the details of the specified Assignment. * </p> * * @param getAssignmentRequest * @return Result of the GetAssignment operation returned by the service. * @throws ServiceException * Amazon Mechanical Turk is temporarily unable to process your request. Try your call again. * @throws RequestErrorException * Your request is invalid. * @sample AmazonMTurk.GetAssignment * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/mturk-requester-2017-01-17/GetAssignment" target="_top">AWS * API Documentation</a> */ @Override public GetAssignmentResult getAssignment(GetAssignmentRequest request) { request = beforeClientExecution(request); return executeGetAssignment(request); }
@SdkInternalApi final RejectAssignmentResult executeRejectAssignment(RejectAssignmentRequest rejectAssignmentRequest) { ExecutionContext executionContext = createExecutionContext(rejectAssignmentRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request<RejectAssignmentRequest> request = null; Response<RejectAssignmentResult> response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new RejectAssignmentRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(rejectAssignmentRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "MTurk"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "RejectAssignment"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler<AmazonWebServiceResponse<RejectAssignmentResult>> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new RejectAssignmentResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } }
/** * <p> * The <code>UpdateHITReviewStatus</code> operation updates the status of a HIT. If the status is Reviewable, this * operation can update the status to Reviewing, or it can revert a Reviewing HIT back to the Reviewable status. * </p> * * @param updateHITReviewStatusRequest * @return Result of the UpdateHITReviewStatus operation returned by the service. * @throws ServiceException * Amazon Mechanical Turk is temporarily unable to process your request. Try your call again. * @throws RequestErrorException * Your request is invalid. * @sample AmazonMTurk.UpdateHITReviewStatus * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/mturk-requester-2017-01-17/UpdateHITReviewStatus" * target="_top">AWS API Documentation</a> */ @Override public UpdateHITReviewStatusResult updateHITReviewStatus(UpdateHITReviewStatusRequest request) { request = beforeClientExecution(request); return executeUpdateHITReviewStatus(request); }
/** * <p> * The <code>ListHITs</code> operation returns all of a Requester's HITs. The operation returns HITs of any status, * except for HITs that have been deleted of with the DeleteHIT operation or that have been auto-deleted. * </p> * * @param listHITsRequest * @return Result of the ListHITs operation returned by the service. * @throws ServiceException * Amazon Mechanical Turk is temporarily unable to process your request. Try your call again. * @throws RequestErrorException * Your request is invalid. * @sample AmazonMTurk.ListHITs * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/mturk-requester-2017-01-17/ListHITs" target="_top">AWS API * Documentation</a> */ @Override public ListHITsResult listHITs(ListHITsRequest request) { request = beforeClientExecution(request); return executeListHITs(request); }
/** * <p> * The <code>ListQualificationTypes</code> operation returns a list of Qualification types, filtered by an optional * search term. * </p> * * @param listQualificationTypesRequest * @return Result of the ListQualificationTypes operation returned by the service. * @throws ServiceException * Amazon Mechanical Turk is temporarily unable to process your request. Try your call again. * @throws RequestErrorException * Your request is invalid. * @sample AmazonMTurk.ListQualificationTypes * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/mturk-requester-2017-01-17/ListQualificationTypes" * target="_top">AWS API Documentation</a> */ @Override public ListQualificationTypesResult listQualificationTypes(ListQualificationTypesRequest request) { request = beforeClientExecution(request); return executeListQualificationTypes(request); }
/** * <p> * The <code>CreateWorkerBlock</code> operation allows you to prevent a Worker from working on your HITs. For * example, you can block a Worker who is producing poor quality work. You can block up to 100,000 Workers. * </p> * * @param createWorkerBlockRequest * @return Result of the CreateWorkerBlock operation returned by the service. * @throws ServiceException * Amazon Mechanical Turk is temporarily unable to process your request. Try your call again. * @throws RequestErrorException * Your request is invalid. * @sample AmazonMTurk.CreateWorkerBlock * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/mturk-requester-2017-01-17/CreateWorkerBlock" * target="_top">AWS API Documentation</a> */ @Override public CreateWorkerBlockResult createWorkerBlock(CreateWorkerBlockRequest request) { request = beforeClientExecution(request); return executeCreateWorkerBlock(request); }
/** * <p> * The <code>GetAccountBalance</code> operation retrieves the amount of money in your Amazon Mechanical Turk * account. * </p> * * @param getAccountBalanceRequest * @return Result of the GetAccountBalance operation returned by the service. * @throws ServiceException * Amazon Mechanical Turk is temporarily unable to process your request. Try your call again. * @throws RequestErrorException * Your request is invalid. * @sample AmazonMTurk.GetAccountBalance * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/mturk-requester-2017-01-17/GetAccountBalance" * target="_top">AWS API Documentation</a> */ @Override public GetAccountBalanceResult getAccountBalance(GetAccountBalanceRequest request) { request = beforeClientExecution(request); return executeGetAccountBalance(request); }
/** * <p> * The <code>ListBonusPayments</code> operation retrieves the amounts of bonuses you have paid to Workers for a * given HIT or assignment. * </p> * * @param listBonusPaymentsRequest * @return Result of the ListBonusPayments operation returned by the service. * @throws ServiceException * Amazon Mechanical Turk is temporarily unable to process your request. Try your call again. * @throws RequestErrorException * Your request is invalid. * @sample AmazonMTurk.ListBonusPayments * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/mturk-requester-2017-01-17/ListBonusPayments" * target="_top">AWS API Documentation</a> */ @Override public ListBonusPaymentsResult listBonusPayments(ListBonusPaymentsRequest request) { request = beforeClientExecution(request); return executeListBonusPayments(request); }
/** * <p> * The <code>ListReviewableHITs</code> operation retrieves the HITs with Status equal to Reviewable or Status equal * to Reviewing that belong to the Requester calling the operation. * </p> * * @param listReviewableHITsRequest * @return Result of the ListReviewableHITs operation returned by the service. * @throws ServiceException * Amazon Mechanical Turk is temporarily unable to process your request. Try your call again. * @throws RequestErrorException * Your request is invalid. * @sample AmazonMTurk.ListReviewableHITs * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/mturk-requester-2017-01-17/ListReviewableHITs" * target="_top">AWS API Documentation</a> */ @Override public ListReviewableHITsResult listReviewableHITs(ListReviewableHITsRequest request) { request = beforeClientExecution(request); return executeListReviewableHITs(request); }
/** * <p> * The <code>ListWorkersWithQualificationType</code> operation returns all of the Workers that have been associated * with a given Qualification type. * </p> * * @param listWorkersWithQualificationTypeRequest * @return Result of the ListWorkersWithQualificationType operation returned by the service. * @throws ServiceException * Amazon Mechanical Turk is temporarily unable to process your request. Try your call again. * @throws RequestErrorException * Your request is invalid. * @sample AmazonMTurk.ListWorkersWithQualificationType * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/mturk-requester-2017-01-17/ListWorkersWithQualificationType" * target="_top">AWS API Documentation</a> */ @Override public ListWorkersWithQualificationTypeResult listWorkersWithQualificationType(ListWorkersWithQualificationTypeRequest request) { request = beforeClientExecution(request); return executeListWorkersWithQualificationType(request); }
/** * <p> * The <code>UpdateHITTypeOfHIT</code> operation allows you to change the HITType properties of a HIT. This * operation disassociates the HIT from its old HITType properties and associates it with the new HITType * properties. The HIT takes on the properties of the new HITType in place of the old ones. * </p> * * @param updateHITTypeOfHITRequest * @return Result of the UpdateHITTypeOfHIT operation returned by the service. * @throws ServiceException * Amazon Mechanical Turk is temporarily unable to process your request. Try your call again. * @throws RequestErrorException * Your request is invalid. * @sample AmazonMTurk.UpdateHITTypeOfHIT * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/mturk-requester-2017-01-17/UpdateHITTypeOfHIT" * target="_top">AWS API Documentation</a> */ @Override public UpdateHITTypeOfHITResult updateHITTypeOfHIT(UpdateHITTypeOfHITRequest request) { request = beforeClientExecution(request); return executeUpdateHITTypeOfHIT(request); }
/** * <p> * The <code>CreateQualificationType</code> operation creates a new Qualification type, which is represented by a * <code>QualificationType</code> data structure. * </p> * * @param createQualificationTypeRequest * @return Result of the CreateQualificationType operation returned by the service. * @throws ServiceException * Amazon Mechanical Turk is temporarily unable to process your request. Try your call again. * @throws RequestErrorException * Your request is invalid. * @sample AmazonMTurk.CreateQualificationType * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/mturk-requester-2017-01-17/CreateQualificationType" * target="_top">AWS API Documentation</a> */ @Override public CreateQualificationTypeResult createQualificationType(CreateQualificationTypeRequest request) { request = beforeClientExecution(request); return executeCreateQualificationType(request); }
/** * <p> * The <code>ListWorkersBlocks</code> operation retrieves a list of Workers who are blocked from working on your * HITs. * </p> * * @param listWorkerBlocksRequest * @return Result of the ListWorkerBlocks operation returned by the service. * @throws ServiceException * Amazon Mechanical Turk is temporarily unable to process your request. Try your call again. * @throws RequestErrorException * Your request is invalid. * @sample AmazonMTurk.ListWorkerBlocks * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/mturk-requester-2017-01-17/ListWorkerBlocks" * target="_top">AWS API Documentation</a> */ @Override public ListWorkerBlocksResult listWorkerBlocks(ListWorkerBlocksRequest request) { request = beforeClientExecution(request); return executeListWorkerBlocks(request); }
/** * <p> * The <code>UpdateExpirationForHIT</code> operation allows you update the expiration time of a HIT. If you update * it to a time in the past, the HIT will be immediately expired. * </p> * * @param updateExpirationForHITRequest * @return Result of the UpdateExpirationForHIT operation returned by the service. * @throws ServiceException * Amazon Mechanical Turk is temporarily unable to process your request. Try your call again. * @throws RequestErrorException * Your request is invalid. * @sample AmazonMTurk.UpdateExpirationForHIT * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/mturk-requester-2017-01-17/UpdateExpirationForHIT" * target="_top">AWS API Documentation</a> */ @Override public UpdateExpirationForHITResult updateExpirationForHIT(UpdateExpirationForHITRequest request) { request = beforeClientExecution(request); return executeUpdateExpirationForHIT(request); }
/** * <p> * The <code>CreateHITType</code> operation creates a new HIT type. This operation allows you to define a standard * set of HIT properties to use when creating HITs. If you register a HIT type with values that match an existing * HIT type, the HIT type ID of the existing type will be returned. * </p> * * @param createHITTypeRequest * @return Result of the CreateHITType operation returned by the service. * @throws ServiceException * Amazon Mechanical Turk is temporarily unable to process your request. Try your call again. * @throws RequestErrorException * Your request is invalid. * @sample AmazonMTurk.CreateHITType * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/mturk-requester-2017-01-17/CreateHITType" target="_top">AWS * API Documentation</a> */ @Override public CreateHITTypeResult createHITType(CreateHITTypeRequest request) { request = beforeClientExecution(request); return executeCreateHITType(request); }
/** * <p> * The <code>NotifyWorkers</code> operation sends an email to one or more Workers that you specify with the Worker * ID. You can specify up to 100 Worker IDs to send the same message with a single call to the NotifyWorkers * operation. The NotifyWorkers operation will send a notification email to a Worker only if you have previously * approved or rejected work from the Worker. * </p> * * @param notifyWorkersRequest * @return Result of the NotifyWorkers operation returned by the service. * @throws ServiceException * Amazon Mechanical Turk is temporarily unable to process your request. Try your call again. * @throws RequestErrorException * Your request is invalid. * @sample AmazonMTurk.NotifyWorkers * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/mturk-requester-2017-01-17/NotifyWorkers" target="_top">AWS * API Documentation</a> */ @Override public NotifyWorkersResult notifyWorkers(NotifyWorkersRequest request) { request = beforeClientExecution(request); return executeNotifyWorkers(request); }