code: public Target getTarget(long id, TargetType type) throws WorkspaceApiException {
          try {
              TargetsResponse resp = targetsApi.getTarget(new BigDecimal(id), type.getValue());
              Util.throwIfNotOk(resp.getStatus());
              
              Target target = null;
              if(resp.getData() != null) {
                  List<com.genesys.internal.workspace.model.Target> targets = resp.getData().getTargets();
                  if(targets != null && targets.size() > 0) {
                     target = Target.fromTarget(targets.get(0));
                  }
              }
              
              return target;
              
          }
          catch(ApiException ex) {
              throw new WorkspaceApiException("Cannot get target", ex);
          }
      }
docs: Get a specific target by type and ID. Targets can be agents, agent groups, queues, route points, skills, and custom contacts.
  @param id The ID of the target.
  @param type The type of target to retrieve. The possible values are AGENT, AGENT_GROUP, ACD_QUEUE, ROUTE_POINT, SKILL, and CUSTOM_CONTACT.
  @return Target