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

        this.segments = new java.util.ArrayList<Segment>(segments);
    }
<p>
Segment documents for the segments and subsegments that comprise the trace.
</p>

@param segments
       Segment documents for the segments and subsegments that comprise the trace.
aws-java-sdk-xray/src/main/java/com/amazonaws/services/xray/model/Trace.java