public Trace withSegments(java.util.Collection<Segment> segments) {
        setSegments(segments);
        return this;
    }
<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.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-xray/src/main/java/com/amazonaws/services/xray/model/Trace.java