public synchronized String prettyString() {
        switch (subscriptionType) {
            case NONE:
                return "None";
            case AUTO_TOPICS:
                return "Subscribe(" + String.join(",", subscription) + ")";
            case AUTO_PATTERN:
                return "Subscribe(" + subscribedPattern + ")";
            case USER_ASSIGNED:
                return "Assign(" + assignedPartitions() + " , id=" + assignmentId + ")";
            case AUTO_TOPICS_SHARE:
                return "Subscribe to Share Group(" + String.join(",", subscription) + ")";
            default:
                throw new IllegalStateException("Unrecognized subscription type: " + subscriptionType);
        }
    }
A class for tracking the topics, partitions, and offsets for the consumer. A partition
is "assigned" either directly with {@link #assignFromUser(Set)} (manual assignment)
or with {@link #assignFromSubscribed(Collection)} (automatic assignment from subscription).
<p>
Once assigned, the partition is not considered "fetchable" until its initial position has
been set with {@link #seekValidated(TopicPartition, FetchPosition)}. Fetchable partitions
track a position which is the last offset that has been returned to the user. You can
suspend fetching from a partition through {@link #pause(TopicPartition)} without affecting the consumed
position. The partition will remain unfetchable until the {@link #resume(TopicPartition)} is
used. You can also query the pause state independently with {@link #isPaused(TopicPartition)}.
<p>
Note that pause state as well as the consumed positions are not preserved when partition
assignment is changed whether directly by the user or through a group rebalance.
<p>
Thread Safety: this class is thread-safe.
clients/src/main/java/org/apache/kafka/clients/consumer/internals/SubscriptionState.java