public void setSubnets(java.util.Collection<Subnet> subnets) {
        if (subnets == null) {
            this.subnets = null;
            return;
        }

        this.subnets = new java.util.ArrayList<Subnet>(subnets);
    }
<p>
A list of subnets associated with the subnet group.
</p>

@param subnets
       A list of subnets associated with the subnet group.
aws-java-sdk-memorydb/src/main/java/com/amazonaws/services/memorydb/model/SubnetGroup.java