public void setSegments(java.util.Collection<CoreNetworkSegment> segments) {
        if (segments == null) {
            this.segments = null;
            return;
        }

        this.segments = new java.util.ArrayList<CoreNetworkSegment>(segments);
    }
<p>
The segments within a core network.
</p>

@param segments
       The segments within a core network.
aws-java-sdk-networkmanager/src/main/java/com/amazonaws/services/networkmanager/model/CoreNetwork.java