class StackResponseHardwareInfoProvider implements ResponseProvider {

    @Override
    public StackV4Response providerEntriesToStackResponse(Stack stack, StackV4Response stackResponse) {
        Set<HardwareInfoGroupV4Response> hardwareInfoResponses = stack.getInstanceGroups().stream()
                .map(instanceGroup -> hardwareInfoGroupResponse(stack, instanceGroup))
                .collect(Collectors.toSet());
        stackResponse.setHardwareInfoGroups(hardwareInfoResponses);
        return stackResponse;
    }

}