@SdkInternalApi
    final GetRecommendationsResult executeGetRecommendations(GetRecommendationsRequest getRecommendationsRequest) {

        ExecutionContext executionContext = createExecutionContext(getRecommendationsRequest);
        AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
        awsRequestMetrics.startEvent(Field.ClientExecuteTime);
        Request<GetRecommendationsRequest> request = null;
        Response<GetRecommendationsResult> response = null;

        try {
            awsRequestMetrics.startEvent(Field.RequestMarshallTime);
            try {
                request = new GetRecommendationsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getRecommendationsRequest));
                // Binds the request metrics to the current request.
                request.setAWSRequestMetrics(awsRequestMetrics);
                request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
                request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
                request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
                request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Personalize Runtime");
                request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetRecommendations");
                request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);

            } finally {
                awsRequestMetrics.endEvent(Field.RequestMarshallTime);
            }

            HttpResponseHandler<AmazonWebServiceResponse<GetRecommendationsResult>> responseHandler = protocolFactory.createResponseHandler(
                    new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetRecommendationsResultJsonUnmarshaller());
            response = invoke(request, responseHandler, executionContext);

            return response.getAwsResponse();

        } finally {

            endClientExecution(awsRequestMetrics, request, response);
        }
    }
<p>
Returns a list of recommended items. For campaigns, the campaign's Amazon Resource Name (ARN) is required and the
required user and item input depends on the recipe type used to create the solution backing the campaign as
follows:
</p>
<ul>
<li>
<p>
USER_PERSONALIZATION - <code>userId</code> required, <code>itemId</code> not used
</p>
</li>
<li>
<p>
RELATED_ITEMS - <code>itemId</code> required, <code>userId</code> not used
</p>
</li>
</ul>
<note>
<p>
Campaigns that are backed by a solution created using a recipe of type PERSONALIZED_RANKING use the API.
</p>
</note>
<p>
For recommenders, the recommender's ARN is required and the required item and user input depends on the use case
(domain-based recipe) backing the recommender. For information on use case requirements see <a
href="https://docs.aws.amazon.com/personalize/latest/dg/domain-use-cases.html">Choosing recommender use
cases</a>.
</p>

@param getRecommendationsRequest
@return Result of the GetRecommendations operation returned by the service.
@throws InvalidInputException
        Provide a valid value for the field or parameter.
@throws ResourceNotFoundException
        The specified resource does not exist.
@sample AmazonPersonalizeRuntime.GetRecommendations
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/personalize-runtime-2018-05-22/GetRecommendations"
     target="_top">AWS API Documentation</a>
aws-java-sdk-personalizeruntime/src/main/java/com/amazonaws/services/personalizeruntime/AmazonPersonalizeRuntimeClient.java