@SdkInternalApi
    final DeleteRegexPatternSetResult executeDeleteRegexPatternSet(DeleteRegexPatternSetRequest deleteRegexPatternSetRequest) {

        ExecutionContext executionContext = createExecutionContext(deleteRegexPatternSetRequest);
        AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
        awsRequestMetrics.startEvent(Field.ClientExecuteTime);
        Request<DeleteRegexPatternSetRequest> request = null;
        Response<DeleteRegexPatternSetResult> response = null;

        try {
            awsRequestMetrics.startEvent(Field.RequestMarshallTime);
            try {
                request = new DeleteRegexPatternSetRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteRegexPatternSetRequest));
                // 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, "WAF Regional");
                request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteRegexPatternSet");
                request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);

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

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

            return response.getAwsResponse();

        } finally {

            endClientExecution(awsRequestMetrics, request, response);
        }
    }
<note>
<p>
This is <b>AWS WAF Classic</b> documentation. For more information, see <a
href="https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html">AWS WAF Classic</a> in the
developer guide.
</p>
<p>
<b>For the latest version of AWS WAF</b>, use the AWS WAFV2 API and see the <a
href="https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html">AWS WAF Developer Guide</a>. With
the latest version, AWS WAF has a single set of endpoints for regional and global use.
</p>
</note>
<p>
Permanently deletes a <a>RegexPatternSet</a>. You can't delete a <code>RegexPatternSet</code> if it's still used
in any <code>RegexMatchSet</code> or if the <code>RegexPatternSet</code> is not empty.
</p>

@param deleteRegexPatternSetRequest
@return Result of the DeleteRegexPatternSet operation returned by the service.
@throws WAFInternalErrorException
        The operation failed because of a system problem, even though the request was valid. Retry your request.
@throws WAFInvalidAccountException
        The operation failed because you tried to create, update, or delete an object by using an invalid account
        identifier.
@throws WAFNonexistentItemException
        The operation failed because the referenced object doesn't exist.
@throws WAFReferencedItemException
        The operation failed because you tried to delete an object that is still in use. For example:</p>
        <ul>
        <li>
        <p>
        You tried to delete a <code>ByteMatchSet</code> that is still referenced by a <code>Rule</code>.
        </p>
        </li>
        <li>
        <p>
        You tried to delete a <code>Rule</code> that is still referenced by a <code>WebACL</code>.
        </p>
        </li>
@throws WAFStaleDataException
        The operation failed because you tried to create, update, or delete an object by using a change token
        that has already been used.
@throws WAFNonEmptyEntityException
        The operation failed because you tried to delete an object that isn't empty. For example:</p>
        <ul>
        <li>
        <p>
        You tried to delete a <code>WebACL</code> that still contains one or more <code>Rule</code> objects.
        </p>
        </li>
        <li>
        <p>
        You tried to delete a <code>Rule</code> that still contains one or more <code>ByteMatchSet</code> objects
        or other predicates.
        </p>
        </li>
        <li>
        <p>
        You tried to delete a <code>ByteMatchSet</code> that contains one or more <code>ByteMatchTuple</code>
        objects.
        </p>
        </li>
        <li>
        <p>
        You tried to delete an <code>IPSet</code> that references one or more IP addresses.
        </p>
        </li>
@sample AWSWAFRegional.DeleteRegexPatternSet
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/DeleteRegexPatternSet"
     target="_top">AWS API Documentation</a>
aws-java-sdk-waf/src/main/java/com/amazonaws/services/waf/AWSWAFRegionalClient.java