public FunctionAssociation withEventType(String eventType) {
        setEventType(eventType);
        return this;
    }
<p>
The event type of the function, either <code>viewer-request</code> or <code>viewer-response</code>. You cannot
use origin-facing event types (<code>origin-request</code> and <code>origin-response</code>) with a CloudFront
function.
</p>

@param eventType
       The event type of the function, either <code>viewer-request</code> or <code>viewer-response</code>. You
       cannot use origin-facing event types (<code>origin-request</code> and <code>origin-response</code>) with a
       CloudFront function.
@return Returns a reference to this object so that method calls can be chained together.
@see EventType
aws-java-sdk-cloudfront/src/main/java/com/amazonaws/services/cloudfront/model/FunctionAssociation.java