public AutoEnable withEc2(Boolean ec2) {
        setEc2(ec2);
        return this;
    }
<p>
Represents whether Amazon EC2 scans are automatically enabled for new members of your Amazon Inspector
organization.
</p>

@param ec2
       Represents whether Amazon EC2 scans are automatically enabled for new members of your Amazon Inspector
       organization.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-inspector2/src/main/java/com/amazonaws/services/inspector2/model/AutoEnable.java