public Rule withEventPattern(String eventPattern) {
        setEventPattern(eventPattern);
        return this;
    }
<p>
The event pattern of the rule. For more information, see <a
href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eventbridge-and-event-patterns.html">Events and
Event Patterns</a> in the <i>Amazon EventBridge User Guide</i>.
</p>

@param eventPattern
       The event pattern of the rule. For more information, see <a
       href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eventbridge-and-event-patterns.html">Events
       and Event Patterns</a> in the <i>Amazon EventBridge User Guide</i>.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-events/src/main/java/com/amazonaws/services/cloudwatchevents/model/Rule.java