public InAppMessageCampaign withTotalCap(Integer totalCap) {
        setTotalCap(totalCap);
        return this;
    }
<p>
Total cap which controls the number of times an in-app message can be shown to the endpoint.
</p>

@param totalCap
       Total cap which controls the number of times an in-app message can be shown to the endpoint.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/model/InAppMessageCampaign.java