code: public boolean createOrReplaceEntityGroup(EntityGroup entityGroup) {
          String entityGroupName = entityGroup.getName();
          checkEntityGroupIsEmpty(entityGroupName);
          QueryPart<EntityGroup> query = new Query<EntityGroup>("entity-groups")
                  .path(entityGroupName, true);
          return httpClientManager.updateMetaData(query, put(entityGroup));
      }
docs: Create an entity group with specified properties and tags or replace an existing entity group.
  <p>
  This method creates a new entity group or replaces an existing entity group.
  </p>
  If only a subset of fields is provided for an existing entity group, the remaining properties
  and tags will be deleted.
  
  @param entityGroup the entity group to create or replace
  @return {@code true} if entity group is created or updated.