public AgentInfo withHierarchyGroups(HierarchyGroups hierarchyGroups) {
        setHierarchyGroups(hierarchyGroups);
        return this;
    }
<p>
The agent hierarchy groups for the agent.
</p>

@param hierarchyGroups
       The agent hierarchy groups for the agent.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-connect/src/main/java/com/amazonaws/services/connect/model/AgentInfo.java