public CoreNetworkChangeValues withSharedSegments(String... sharedSegments) {
        if (this.sharedSegments == null) {
            setSharedSegments(new java.util.ArrayList<String>(sharedSegments.length));
        }
        for (String ele : sharedSegments) {
            this.sharedSegments.add(ele);
        }
        return this;
    }
<p>
The shared segments for a core network change value.
</p>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setSharedSegments(java.util.Collection)} or {@link #withSharedSegments(java.util.Collection)} if you want
to override the existing values.
</p>

@param sharedSegments
       The shared segments for a core network change value.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-networkmanager/src/main/java/com/amazonaws/services/networkmanager/model/CoreNetworkChangeValues.java