public Target withRetryPolicy(RetryPolicy retryPolicy) {
        setRetryPolicy(retryPolicy);
        return this;
    }
<p>
The <code>RetryPolicy</code> object that contains the retry policy configuration to use for the dead-letter
queue.
</p>

@param retryPolicy
       The <code>RetryPolicy</code> object that contains the retry policy configuration to use for the
       dead-letter queue.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-eventbridge/src/main/java/com/amazonaws/services/eventbridge/model/Target.java