public final List<Segment> getSegments() {
        return Collections.unmodifiableList(segments);
    }
Gets all segments, in order.

@return All segments, in order, in an unmodifiable list.
smithy-model/src/main/java/software/amazon/smithy/model/pattern/SmithyPattern.java