@Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getLevel1() != null)
            sb.append("Level1: ").append(getLevel1()).append(",");
        if (getLevel2() != null)
            sb.append("Level2: ").append(getLevel2()).append(",");
        if (getLevel3() != null)
            sb.append("Level3: ").append(getLevel3()).append(",");
        if (getLevel4() != null)
            sb.append("Level4: ").append(getLevel4()).append(",");
        if (getLevel5() != null)
            sb.append("Level5: ").append(getLevel5());
        sb.append("}");
        return sb.toString();
    }
Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
redacted from this string using a placeholder value.

@return A string representation of this object.

@see java.lang.Object#toString()
aws-java-sdk-connect/src/main/java/com/amazonaws/services/connect/model/HierarchyGroups.java