public SubnetGroup withSubnets(java.util.Collection<Subnet> subnets) {
        setSubnets(subnets);
        return this;
    }
<p>
A list of subnets associated with the subnet group.
</p>

@param subnets
       A list of subnets associated with the subnet group.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-memorydb/src/main/java/com/amazonaws/services/memorydb/model/SubnetGroup.java