@SdkInternalApi
    final ForecastGeofenceEventsResult executeForecastGeofenceEvents(ForecastGeofenceEventsRequest forecastGeofenceEventsRequest) {

        ExecutionContext executionContext = createExecutionContext(forecastGeofenceEventsRequest);
        AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
        awsRequestMetrics.startEvent(Field.ClientExecuteTime);
        Request<ForecastGeofenceEventsRequest> request = null;
        Response<ForecastGeofenceEventsResult> response = null;

        try {
            awsRequestMetrics.startEvent(Field.RequestMarshallTime);
            try {
                request = new ForecastGeofenceEventsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(forecastGeofenceEventsRequest));
                // 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, "Location");
                request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ForecastGeofenceEvents");
                request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);

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

            URI endpointTraitHost = null;
            if (!clientConfiguration.isDisableHostPrefixInjection()) {

                String hostPrefix = "geofencing.";
                String resolvedHostPrefix = String.format("geofencing.");

                endpointTraitHost = UriResourcePathUtils.updateUriHost(endpoint, resolvedHostPrefix);
            }

            HttpResponseHandler<AmazonWebServiceResponse<ForecastGeofenceEventsResult>> responseHandler = protocolFactory.createResponseHandler(
                    new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
                    new ForecastGeofenceEventsResultJsonUnmarshaller());
            response = invoke(request, responseHandler, executionContext, null, endpointTraitHost);

            return response.getAwsResponse();

        } finally {

            endClientExecution(awsRequestMetrics, request, response);
        }
    }
<p>
Evaluates device positions against geofence geometries from a given geofence collection. The event forecasts
three states for which a device can be in relative to a geofence:
</p>
<p>
<code>ENTER</code>: If a device is outside of a geofence, but would breach the fence if the device is moving at
its current speed within time horizon window.
</p>
<p>
<code>EXIT</code>: If a device is inside of a geofence, but would breach the fence if the device is moving at its
current speed within time horizon window.
</p>
<p>
<code>IDLE</code>: If a device is inside of a geofence, and the device is not moving.
</p>

@param forecastGeofenceEventsRequest
@return Result of the ForecastGeofenceEvents operation returned by the service.
@throws InternalServerException
        The request has failed to process because of an unknown server error, exception, or failure.
@throws ResourceNotFoundException
        The resource that you've entered was not found in your AWS account.
@throws AccessDeniedException
        The request was denied because of insufficient access or permissions. Check with an administrator to
        verify your permissions.
@throws ValidationException
        The input failed to meet the constraints specified by the AWS service.
@throws ThrottlingException
        The request was denied because of request throttling.
@sample AmazonLocation.ForecastGeofenceEvents
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/location-2020-11-19/ForecastGeofenceEvents"
     target="_top">AWS API Documentation</a>
aws-java-sdk-location/src/main/java/com/amazonaws/services/location/AmazonLocationClient.java