public RepositoryScanningConfiguration withScanOnPush(Boolean scanOnPush) {
        setScanOnPush(scanOnPush);
        return this;
    }
<p>
Whether or not scan on push is configured for the repository.
</p>

@param scanOnPush
       Whether or not scan on push is configured for the repository.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-ecr/src/main/java/com/amazonaws/services/ecr/model/RepositoryScanningConfiguration.java